]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[multiple changes]
authorArnaud Charlet <charlet@gcc.gnu.org>
Mon, 9 Jul 2012 13:24:20 +0000 (15:24 +0200)
committerArnaud Charlet <charlet@gcc.gnu.org>
Mon, 9 Jul 2012 13:24:20 +0000 (15:24 +0200)
2012-07-09  Robert Dewar  <dewar@adacore.com>

* freeze.adb: Minor code reorganization (use Ekind_In).
* exp_attr.adb, sem_ch9.adb par-ch4.adb, s-taprop-mingw.adb,
sem_attr.adb, exp_ch8.adb, snames.adb-tmpl, par-util.adb,
sem_ch13.adb, snames.ads-tmpl: Minor reformatting.

2012-07-09  Tristan Gingold  <gingold@adacore.com>

* raise-gcc.c: Adjust previous patch.

2012-07-09  Vincent Celier  <celier@adacore.com>

* make.adb (Compilation_Phase): Do not build libraries in
Codepeer mode (do not call Library_Phase).

From-SVN: r189379

14 files changed:
gcc/ada/ChangeLog
gcc/ada/exp_attr.adb
gcc/ada/exp_ch8.adb
gcc/ada/freeze.adb
gcc/ada/make.adb
gcc/ada/par-ch4.adb
gcc/ada/par-util.adb
gcc/ada/raise-gcc.c
gcc/ada/s-taprop-mingw.adb
gcc/ada/sem_attr.adb
gcc/ada/sem_ch13.adb
gcc/ada/sem_ch9.adb
gcc/ada/snames.adb-tmpl
gcc/ada/snames.ads-tmpl

index 57d3b04f3b257befcc8be4f966ae8533222d5f2a..bdb53188c269a4e3c68012c14610ee5d29d8ad76 100644 (file)
@@ -1,3 +1,19 @@
+2012-07-09  Robert Dewar  <dewar@adacore.com>
+
+       * freeze.adb: Minor code reorganization (use Ekind_In).
+       * exp_attr.adb, sem_ch9.adb par-ch4.adb, s-taprop-mingw.adb,
+       sem_attr.adb, exp_ch8.adb, snames.adb-tmpl, par-util.adb,
+       sem_ch13.adb, snames.ads-tmpl: Minor reformatting.
+
+2012-07-09  Tristan Gingold  <gingold@adacore.com>
+
+       * raise-gcc.c: Adjust previous patch.
+
+2012-07-09  Vincent Celier  <celier@adacore.com>
+
+       * make.adb (Compilation_Phase): Do not build libraries in
+       Codepeer mode (do not call Library_Phase).
+
 2012-07-09  Ed Schonberg  <schonberg@adacore.com>
 
        * sem_ch13.adb: Extend previous change to elementary types.
index 5859b6e4585c1ccaa90279d40f59e38a35c65202..4dbd38f4c59d04a3ab91f17ec1c8c16e5f6b47b4 100644 (file)
@@ -838,8 +838,8 @@ package body Exp_Attr is
            Attribute_Variable_Indexing    =>
          null;
 
-      --  Internal attributes used to deal with Ada 2012 delayed aspects
-      --  (already diagnosed by parser, thus nothing more to do here).
+      --  Internal attributes used to deal with Ada 2012 delayed aspects. These
+      --  were already rejected by the parser. Thus they shouldn't appear here.
 
       when Attribute_CPU                |
            Attribute_Dispatching_Domain |
index b0e525eb00980228d6dcc61b17cd0abaad9fe69c..3b5c7d3ae6466868692730a7855db0d824850c64 100644 (file)
@@ -243,8 +243,12 @@ package body Exp_Ch8 is
       Id  : constant Entity_Id  := Defining_Entity (N);
 
       function Build_Body_For_Renaming return Node_Id;
-      --  Build and return the body for the renaming declaration of an
-      --  equality or unequality operator.
+      --  Build and return the body for the renaming declaration of an equality
+      --  or inequality operator.
+
+      -----------------------------
+      -- Build_Body_For_Renaming --
+      -----------------------------
 
       function Build_Body_For_Renaming return Node_Id is
          Body_Id : Entity_Id;
@@ -275,10 +279,12 @@ package body Exp_Ch8 is
          return Decl;
       end Build_Body_For_Renaming;
 
-      --  Local variable
+      --  Local variables
 
       Nam : constant Node_Id := Name (N);
 
+   --  Start of processing for Expand_N_Subprogram_Renaming_Declaration
+
    begin
       --  When the prefix of the name is a function call, we must force the
       --  call to be made by removing side effects from the call, since we
@@ -334,9 +340,9 @@ package body Exp_Ch8 is
                        Expression =>
                          Expand_Record_Equality
                            (Id,
-                            Typ => Typ,
-                            Lhs => Make_Identifier (Loc, Chars (Left)),
-                            Rhs => Make_Identifier (Loc, Chars (Right)),
+                            Typ    => Typ,
+                            Lhs    => Make_Identifier (Loc, Chars (Left)),
+                            Rhs    => Make_Identifier (Loc, Chars (Right)),
                             Bodies => Declarations (Decl))))));
 
                Append (Decl, List_Containing (N));
index 279e08abe4e3f581cdd6d167b7e0d8e0b0772a14..850e96374329ff2e8f62ceecfcbb7029b34f5916 100644 (file)
@@ -1908,8 +1908,8 @@ package body Freeze is
       begin
          --  Deal with delayed aspect specifications for components. The
          --  analysis of the aspect is required to be delayed to the freeze
-         --  point, thus we analyze the pragma or attribute definition clause
-         --  in the tree at this point. We also analyze the aspect
+         --  point, thus we analyze the pragma or attribute definition
+         --  clause in the tree at this point. We also analyze the aspect
          --  specification node at the freeze point when the aspect doesn't
          --  correspond to pragma/attribute definition clause.
 
@@ -1955,9 +1955,7 @@ package body Freeze is
 
             --  Handle the component and discriminant case
 
-            if Ekind (Comp) = E_Component
-              or else Ekind (Comp) = E_Discriminant
-            then
+            if Ekind_In (Comp, E_Component, E_Discriminant) then
                declare
                   CC : constant Node_Id := Component_Clause (Comp);
 
index e43495bd2381d76363abb4c654cf4ee8ae0e6010..5c35a4ebb39dbcec16699a16957a0bb1171261f7 100644 (file)
@@ -4811,6 +4811,7 @@ package body Make is
       --  have been regenerated.
 
       if Main_Project /= No_Project
+        and then not Codepeer_Mode
         and then MLib.Tgt.Support_For_Libraries /= Prj.None
         and then (Do_Bind_Step
                    or Unique_Compile_All_Projects
index f16d82841cfe3b8327df5933efc2d60f6ee2ec92..11ef4c7e3f1585db7dafdd1831b36c39aedef22e 100644 (file)
@@ -435,7 +435,8 @@ package body Ch4 is
                Attr_Name := Token_Name;
 
                --  Note that internal attributes names don't denote real
-               --  attribute.
+               --  attributes, so do not count in this error test. We just
+               --  want to consider them as not being attribute names.
 
                if not Is_Attribute_Name (Attr_Name)
                  or else Is_Internal_Attribute_Name (Attr_Name)
index eb19a0a42e3821d65b791f687bc5196a8d220ff2..ec2d4780f10ad0b67e1b94d6bc60c6f030313254 100644 (file)
@@ -721,8 +721,9 @@ package body Util is
 
       Error_Msg_Name_1 := First_Attribute_Name;
       while Error_Msg_Name_1 <= Last_Attribute_Name loop
+
          --  No mispelling possible with internal attribute names since they
-         --  don't denote real attribute.
+         --  don't denote real attributes.
 
          if not Is_Internal_Attribute_Name (Error_Msg_Name_1)
            and then Is_Bad_Spelling_Of (Token_Name, Error_Msg_Name_1)
index bc79c5d82a1b462433a5492b6de9ebcc6ae38cd6..8a5dbcf5209af4a1e236372d644c46afdf9c8c35 100644 (file)
@@ -1167,7 +1167,7 @@ __gnat_cleanupunwind_handler (int version,
 {
   /* Terminate when the end of the stack is reached.  */
   if ((phases & _UA_END_OF_STACK) != 0
-#if defined (__ia64__) && defined (USE_LIBUNWIND_EXCEPTIONS)
+#if defined (__ia64__) && defined (__hpux__)
       /* Strictely follow the ia64 ABI: when end of stack is reached,
         the callback will be called with a NULL stack pointer.
         No need for that when using libgcc unwinder.  */
index 8b38ad8b635ec74176be43a1441199b45bf5b2ce..75d81cb63274679d75a3ac6b75831512035c3212 100644 (file)
@@ -725,15 +725,17 @@ package body System.Task_Primitives.Operations is
       pragma Unreferenced (Loss_Of_Inheritance);
 
    begin
-      Res := SetThreadPriority
-        (T.Common.LL.Thread, Interfaces.C.int (Underlying_Priorities (Prio)));
+      Res :=
+        SetThreadPriority
+          (T.Common.LL.Thread,
+           Interfaces.C.int (Underlying_Priorities (Prio)));
       pragma Assert (Res = Win32.TRUE);
 
       --  Note: Annex D (RM D.2.3(5/2)) requires the task to be placed at the
       --  head of its priority queue when decreasing its priority as a result
       --  of a loss of inherited priority. This is not the case, but we
-      --  consider it an acceptable variation (RM 1.1.3(6)), given this is the
-      --  built-in behavior offered by the Windows operating system.
+      --  consider it an acceptable variation (RM 1.1.3(6)), given this is
+      --  the built-in behavior offered by the Windows operating system.
 
       --  In older versions we attempted to better approximate the Annex D
       --  required behavior, but this simulation was not entirely accurate,
index dd5faefa3e83e86450c883edb0dceb99e52d4d8a..71e6d7cec4cc6e35ba6c392d05fabddd9d2fe15b 100644 (file)
@@ -2215,8 +2215,8 @@ package body Sem_Attr is
            Attribute_Variable_Indexing    =>
          Error_Msg_N ("illegal attribute", N);
 
-      --  Internal attributes used to deal with Ada 2012 delayed aspects
-      --  (already diagnosed by parser, thus nothing more to do here).
+      --  Internal attributes used to deal with Ada 2012 delayed aspects. These
+      --  were already rejected by the parser. Thus they shouldn't appear here.
 
       when Attribute_CPU                |
            Attribute_Dispatching_Domain |
index 049ba0546ce3fca9b822ff7f4397132897d8699b..a601c7b78cf079e57bbbc2836434b4674f9381e1 100644 (file)
@@ -7741,6 +7741,7 @@ package body Sem_Ch13 is
         and then Siz > UI_From_Int (Int'Last)
       then
          Error_Msg_N ("Size value too large for elementary type", N);
+
          if Nkind (Original_Node (N)) = N_Op_Expon then
             Error_Msg_N
               ("\maybe '* was meant, rather than '*'*", Original_Node (N));
index d85f2798c2f2f6eaa8349ab2fe309869b830cb82..8c570449c117a25ec120d198c9be0dc99a9c4b4d 100644 (file)
@@ -138,8 +138,7 @@ package body Sem_Ch9 is
             Pdef       : constant Node_Id := Protected_Definition (N);
             Priv_Decls : constant List_Id := Private_Declarations (Pdef);
             Vis_Decls  : constant List_Id := Visible_Declarations (Pdef);
-
-            Decl : Node_Id;
+            Decl       : Node_Id;
 
          begin
             --  Examine the visible and the private declarations
@@ -152,8 +151,8 @@ package body Sem_Ch9 is
 
                if Nkind (Decl) = N_Entry_Declaration then
                   if Complain then
-                     Error_Msg_N ("entry not allowed when Lock_Free given",
-                                  Decl);
+                     Error_Msg_N
+                       ("entry not allowed when Lock_Free given", Decl);
                   end if;
 
                   return False;
@@ -162,10 +161,10 @@ package body Sem_Ch9 is
                --  allowed by the lock-free restrictions.
 
                elsif Nkind (Decl) = N_Subprogram_Declaration
-                 and then Nkind (Specification (Decl)) =
-                            N_Procedure_Specification
-                 and then Present
-                            (Parameter_Specifications (Specification (Decl)))
+                 and then
+                   Nkind (Specification (Decl)) = N_Procedure_Specification
+                 and then
+                   Present (Parameter_Specifications (Specification (Decl)))
                then
                   declare
                      Par_Specs : constant List_Id   :=
@@ -192,8 +191,7 @@ package body Sem_Ch9 is
                   end;
                end if;
 
-               --  Examine the private declarations after the visible
-               --  declarations.
+               --  Examine private declarations after visible declarations
 
                if No (Next (Decl))
                  and then List_Containing (Decl) = Vis_Decls
@@ -433,14 +431,13 @@ package body Sem_Ch9 is
 
          begin
             Decl := First (Decls);
-
             while Present (Decl) loop
                if Nkind (Decl) = N_Subprogram_Body
                  and then not Satisfies_Lock_Free_Requirements (Decl)
                then
                   if Complain then
-                     Error_Msg_N ("body not allowed when Lock_Free given",
-                                  Decl);
+                     Error_Msg_N
+                       ("body not allowed when Lock_Free given", Decl);
                   end if;
 
                   return False;
@@ -479,7 +476,7 @@ package body Sem_Ch9 is
          else
             if Ada_Version >= Ada_2005 then
                Error_Msg_N ("expect task name or task interface class-wide "
-                          & "object for ABORT", T_Name);
+                            & "object for ABORT", T_Name);
             else
                Error_Msg_N ("expect task name for ABORT", T_Name);
             end if;
@@ -1782,13 +1779,14 @@ package body Sem_Ch9 is
       --  issued by Allows_Lock_Free_Implementation.
 
       if Uses_Lock_Free (Defining_Identifier (N)) then
+
          --  Complain when there is an explicit aspect/pragma Priority (or
          --  Interrupt_Priority) while the lock-free implementation is forced
          --  by an aspect/pragma.
 
          declare
-            Id        : constant Entity_Id :=
-                          Defining_Identifier (Original_Node (N));
+            Id : constant Entity_Id :=
+                   Defining_Identifier (Original_Node (N));
             --  The warning must be issued on the original identifier in order
             --  to deal properly with the case of a single protected object.
 
@@ -1800,6 +1798,7 @@ package body Sem_Ch9 is
 
          begin
             if Present (Prio_Item) then
+
                --  Aspect case
 
                if Nkind (Prio_Item) = N_Aspect_Specification
index da17d31031020e84c7f51d585e2c6699165b0d77..3a22750b38926076a25885c28ea3a2fd84b1fa7d 100644 (file)
@@ -398,9 +398,10 @@ package body Snames is
 
    function Is_Internal_Attribute_Name (N : Name_Id) return Boolean is
    begin
-      return N = Name_CPU
-        or N = Name_Interrupt_Priority
-        or N = Name_Dispatching_Domain;
+      return
+        N = Name_CPU                or else
+        N = Name_Interrupt_Priority or else
+        N = Name_Dispatching_Domain;
    end Is_Internal_Attribute_Name;
 
    ----------------------------
index 16979578c90f7e8d61bc9fe140e8ec70175b6365..03e6a511ccc9a4f05723fc2b6f2c15e50d7348a6 100644 (file)
@@ -754,9 +754,12 @@ package Snames is
    --  section in Sem_Attr.
 
    --  The entries marked INT are not real attributes. They are special names
-   --  used internally by GNAT in order to deal with delayed aspects
+   --  used internally by GNAT in order to deal with certain delayed aspects
    --  (Aspect_CPU, Aspect_Dispatching_Domain, Aspect_Interrupt_Priority) that
-   --  don't have corresponding pragma or attribute.
+   --  don't have corresponding pragmas or user-referencable attributes. It is
+   --  convenient to have these internal attributes available in processing
+   --  the aspects, since the normal approach is to convert an aspect into its
+   --  corresponding pragma or attribute specification.
 
    --  The entries marked VMS are recognized only in OpenVMS implementations
    --  of GNAT, and are treated as illegal in all other contexts.