[multiple changes]
authorArnaud Charlet <charlet@gcc.gnu.org>
Wed, 24 Apr 2013 13:04:40 +0000 (15:04 +0200)
committerArnaud Charlet <charlet@gcc.gnu.org>
Wed, 24 Apr 2013 13:04:40 +0000 (15:04 +0200)
2013-04-24  Robert Dewar  <dewar@adacore.com>

* exp_ch13.adb, sem_prag.adb: Update comments.
* sem_ch3.adb, exp_ch9.adb, g-socket.adb, sem_ch13.adb: Minor
reformatting.

2013-04-24  Doug Rupp  <rupp@adacore.com>

* vms_data.ads (/{NO}INHIBIT-EXEC): Document new default behavior.

2013-04-24  Yannick Moy  <moy@adacore.com>

* sinfo.ads: Minor correction of typo.

From-SVN: r198223

gcc/ada/ChangeLog
gcc/ada/exp_ch13.adb
gcc/ada/exp_ch9.adb
gcc/ada/g-socket.adb
gcc/ada/sem_ch13.adb
gcc/ada/sem_ch3.adb
gcc/ada/sem_prag.adb
gcc/ada/sinfo.ads
gcc/ada/vms_data.ads

index 44f42f35823ef2f91989172961427f8b3f5d93bd..8353e50a00019a8da30248b698293c3b48836aff 100644 (file)
@@ -1,3 +1,17 @@
+2013-04-24  Robert Dewar  <dewar@adacore.com>
+
+       * exp_ch13.adb, sem_prag.adb: Update comments.
+       * sem_ch3.adb, exp_ch9.adb, g-socket.adb, sem_ch13.adb: Minor
+       reformatting.
+
+2013-04-24  Doug Rupp  <rupp@adacore.com>
+
+       * vms_data.ads (/{NO}INHIBIT-EXEC): Document new default behavior.
+
+2013-04-24  Yannick Moy  <moy@adacore.com>
+
+       * sinfo.ads: Minor correction of typo.
+
 2013-04-24  Ed Schonberg  <schonberg@adacore.com>
 
        * sem_ch3.adb: Create packed array only when expander is
index d6525b2912cf6dc24c5638805f00d256bf1843e1..24e5e39ab7663f652fcc87aae70657201fc121a8 100644 (file)
@@ -567,19 +567,26 @@ package body Exp_Ch13 is
                then
                   declare
                      Prag : Node_Id;
+
                   begin
+                     --  Comment this loop ???
+
                      Prag := Pre_Post_Conditions (Contract (E));
                      while Present (Prag) loop
                         Analyze_PPC_In_Decl_Part (Prag, E);
-
                         Prag := Next_Pragma (Prag);
                      end loop;
 
+                     --  Why don't we do the same for Contract_Test_Cases ???
+
+                     --  Comment this loop?
+
                      Prag := Classifications (Contract (E));
                      while Present (Prag) loop
                         if Pragma_Name (Prag) = Name_Depends then
                            Analyze_Depends_In_Decl_Part (Prag);
                         else
+                           pragma Assert (Pragma_Name (Prag) = Name_Global);
                            Analyze_Global_In_Decl_Part (Prag);
                         end if;
 
index 84b50ac9d86cbf1af463ac46a97c015c47023b48..20a346ceec2cb385eaea5163f2e62cc39547ca25 100644 (file)
@@ -1926,6 +1926,7 @@ package body Exp_Ch9 is
 
       begin
          P := Pre_Post_Conditions (Contract (E));
+
          if No (P) then
             return;
          end if;
index 04a4b86c692fa99b3d6e9629b92915aa2afba166..87493d2f60b772fa412374fac61b8ca2bb7246d3 100644 (file)
@@ -2221,10 +2221,8 @@ package body GNAT.Sockets is
       Status        : out Boolean)
    is
       function C_Set_Close_On_Exec
-        (Socket : Socket_Type; Close_On_Exec : C.int)
-         return C.int;
+        (Socket : Socket_Type; Close_On_Exec : C.int) return C.int;
       pragma Import (C, C_Set_Close_On_Exec, "__gnat_set_close_on_exec");
-
    begin
       Status := C_Set_Close_On_Exec (Socket, Boolean'Pos (Close_On_Exec)) = 0;
    end Set_Close_On_Exec;
index b91dd895b19fcc0d71342234b90a918f08c58dde..40749addb0fac6bcd0989b64ab9416e113812f99 100644 (file)
@@ -929,6 +929,8 @@ package body Sem_Ch13 is
       --  Insert a postcondition-like pragma into the tree depending on the
       --  context. Prag one of the following: Pre, Post, Depends or Global.
 
+      --  Why not also Contract_Cases ???
+
       ---------------------------
       -- Insert_Delayed_Pragma --
       ---------------------------
@@ -986,6 +988,8 @@ package body Sem_Ch13 is
       --  Insert pragmas/attribute definition clause after this node when no
       --  delayed analysis is required.
 
+      --  Start of processing for Analyze_Aspect_Specifications
+
       --  The general processing involves building an attribute definition
       --  clause or a pragma node that corresponds to the aspect. Then in order
       --  to delay the evaluation of this aspect to the freeze point, we attach
index 079c0ecac97de2d71fcfa0715347b72f566c85f1..3751ead0970911bc5e41b3e13b70aadec3901176 100644 (file)
@@ -2223,6 +2223,7 @@ package body Sem_Ch3 is
                   if Pragma_Name (Prag) = Name_Depends then
                      Analyze_Depends_In_Decl_Part (Prag);
                   else
+                     pragma Assert (Pragma_Name (Prag) = Name_Global);
                      Analyze_Global_In_Decl_Part (Prag);
                   end if;
 
@@ -11530,7 +11531,8 @@ package body Sem_Ch3 is
          --  If the component of the parent is packed, and the record type is
          --  already frozen, as is the case for an itype, the component type
          --  itself will not be frozen, and the packed array type for it must
-         --  be constructed explicitly.
+         --  be constructed explicitly. Since the creation of packed types is
+         --  an expansion activity, we only do this if expansion is active.
 
          if Expander_Active
            and then Is_Packed (Compon_Type)
index 59d0858af89880207365aab592aa1f0358cbbd1e..80b316b4f2216d365a2f089df1e5d37227885eda 100644 (file)
@@ -338,7 +338,8 @@ package body Sem_Prag is
             Get_Requires_From_CTC_Pragma (N),
             Get_Ensures_From_CTC_Pragma (N));
 
-      elsif Pragma_Name (N) = Name_Contract_Cases then
+      else
+         pragma Assert (Pragma_Name (N) = Name_Contract_Cases);
          Analyze_Contract_Cases
            (Expression (First (Pragma_Argument_Associations (N))));
 
@@ -6259,8 +6260,8 @@ package body Sem_Prag is
                end if;
             end loop;
 
-         --  When the convention is Java or CIL, we also allow Import to be
-         --  given for packages, generic packages, exceptions, record
+         --  When the convention is Java or CIL, we also allow Import to
+         --  be given for packages, generic packages, exceptions, record
          --  components, and access to subprograms.
 
          elsif (C = Convention_Java or else C = Convention_CIL)
@@ -8297,7 +8298,7 @@ package body Sem_Prag is
 
                elsif Nkind (State) = N_Null then
                   Name := New_Internal_Name ('S');
-                  Is_Null   := True;
+                  Is_Null := True;
                   Null_Seen := True;
 
                   --  Catch a case where a null state appears in a list of
@@ -8352,11 +8353,13 @@ package body Sem_Prag is
 
                   --  Volatile requires exactly one Input or Output
 
+                  --  Isn't this just Input_Seen = Output_Seen ???
+
                   if Volatile_Seen
                     and then
-                      ((Input_Seen and then Output_Seen)           --  both
+                      ((Input_Seen and Output_Seen)           --  both
                          or else
-                       (not Input_Seen and then not Output_Seen))  --  none
+                       (not Input_Seen and not Output_Seen))  --  none
                   then
                      Error_Msg_N
                        ("property Volatile requires exactly one Input or "
index 5529bd53855adef133342cd5218cf264c9646155..04a64ab9d3bbe08a2ea66f9169ea79add1e65510 100644 (file)
@@ -7043,18 +7043,18 @@ package Sinfo is
       --  Classifications (Node3) (set to Empty if none)
 
       --  Pre_Post_Conditions contains a collection of pragmas that correspond
-      --  to pre- and post-conditions associated with an entry or a subprogram.
+      --  to pre- and postconditions associated with an entry or a subprogram.
       --  The pragmas can either come from source or be the byproduct of aspect
-      --  expansion. The ordering in the list is of LIFO fasion.
+      --  expansion. The ordering in the list is of LIFO fashion.
 
       --  Contract_Test_Cases contains a collection of pragmas that correspond
       --  to aspects/pragmas Contract_Cases and Test_Case. The ordering in the
-      --  list is of LIFO fasion.
+      --  list is of LIFO fashion.
 
       --  Classifications contains pragmas that either categorize subprogram
       --  inputs and outputs or establish dependencies between them. Currently
       --  pragmas Depends and Global are stored in this list. The ordering is
-      --  of LIFO fasion.
+      --  of LIFO fashion.
 
       -------------------
       -- Expanded_Name --
index e2d926032396d186a0757ec4f29422439a4cddd8..91ee51db11919cd1a1e7dc9a5ecbe9c325ffc968 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
---          Copyright (C) 1996-2012, Free Software Foundation, Inc.         --
+--          Copyright (C) 1996-2013, Free Software Foundation, Inc.         --
 --                                                                          --
 -- GNAT is free software;  you can  redistribute it  and/or modify it under --
 -- terms of the  GNU General Public License as published  by the Free Soft- --
@@ -4287,6 +4287,18 @@ package VMS_Data is
    --   ification field in the image header. It overrides any pragma Ident
    --   specified string.
 
+   S_Link_NoInhib : aliased constant S := "/NOINHIBIT-EXEC "               &
+                                            "--for-linker=--noinhibit-exec";
+   --        /NOINHIBIT-EXEC (D)
+   --
+   --   Preserve executable if there are warnings. This is the default.
+
+   S_Link_Inhib : aliased constant S := "/INHIBIT-EXEC "                   &
+                                            "--for-linker=--inhibit-exec";
+   --        /INHIBIT-EXEC
+   --
+   --   Remove executable if there are warnings.
+
    S_Link_Libdir  : aliased constant S := "/LIBDIR=*"                      &
                                             "-L*";
    --        /LIBDIR=(directory, ...)
@@ -4326,12 +4338,6 @@ package VMS_Data is
    --   This may be used when a link is rerun with different options,
    --   but there is no need to recompile the binder generated file.
 
-   S_Link_Noinhib : aliased constant S := "/NOINHIBIT-EXEC "               &
-                                            "--for-linker=--noinhibit-exec";
-   --        /NOINHIBIT-EXEC
-   --
-   --   Delete executable if there are errors or warnings.
-
    S_Link_Nofiles : aliased constant S := "/NOSTART_FILES "                &
                                             "-nostartfiles";
    --        /NOSTART_FILES
@@ -4407,12 +4413,13 @@ package VMS_Data is
                       S_Link_Forlink 'Access,
                       S_Link_Force   'Access,
                       S_Link_Ident   'Access,
+                      S_Link_NoInhib 'Access,
+                      S_Link_Inhib   'Access,
                       S_Link_Libdir  'Access,
                       S_Link_Library 'Access,
                       S_Link_Mess    'Access,
                       S_Link_Nocomp  'Access,
                       S_Link_Nofiles 'Access,
-                      S_Link_Noinhib 'Access,
                       S_Link_Project 'Access,
                       S_Link_Return  'Access,
                       S_Link_Static  'Access,
@@ -6636,18 +6643,24 @@ package VMS_Data is
    --   ification field in the image header. It overrides any pragma Ident
    --   specified string.
 
+   S_Shared_NoInhib : aliased constant S := "/NOINHIBIT-IMAGE "            &
+                                            "--for-linker=--noinhibit-exec";
+   --        /NOINHIBIT-EXEC (D)
+   --
+   --   Preserve image if there are warnings. This is the default.
+
+   S_Shared_Inhib : aliased constant S := "/INHIBIT-IMAGE "                &
+                                            "--for-linker=--inhibit-exec";
+   --        /INHIBIT-EXEC
+   --
+   --   Remove image if there are warnings.
+
    S_Shared_Nofiles : aliased constant S := "/NOSTART_FILES "              &
                                             "-nostartfiles";
    --        /NOSTART_FILES
    --
    --   Link in default image initialization and startup functions.
 
-   S_Shared_Noinhib : aliased constant S := "/NOINHIBIT-IMAGE "            &
-                                            "--for-linker=--noinhibit-exec";
-   --        /NOINHIBIT-IMAGE
-   --
-   --   Delete image if there are errors or warnings.
-
    S_Shared_Verb    : aliased constant S := "/VERBOSE "                    &
                                             "-v";
    --        /NOVERBOSE (D)
@@ -6667,8 +6680,9 @@ package VMS_Data is
                        (S_Shared_Debug   'Access,
                         S_Shared_Image   'Access,
                         S_Shared_Ident   'Access,
+                        S_Shared_NoInhib 'Access,
+                        S_Shared_Inhib   'Access,
                         S_Shared_Nofiles 'Access,
-                        S_Shared_Noinhib 'Access,
                         S_Shared_Verb    'Access,
                         S_Shared_ZZZZZ   'Access);