]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[multiple changes]
authorArnaud Charlet <charlet@gcc.gnu.org>
Wed, 27 Apr 2016 12:42:03 +0000 (14:42 +0200)
committerArnaud Charlet <charlet@gcc.gnu.org>
Wed, 27 Apr 2016 12:42:03 +0000 (14:42 +0200)
2016-04-27  Vincent Celier  <celier@adacore.com>

* gnatcmd.adb: For "gnat ls -V -P", recognize switch
--unchecked-shared-lib-imports and set the flag
Opt.Unchecked_Shared_Lib_Imports accordingly.

2016-04-27  Ed Schonberg  <schonberg@adacore.com>

* sem_prag.adb (Analyze_Pre_Post_Condition_In_Decl_Part):
A generic subprogram is never a primitive operation, and thus
a classwide condition for it is not legal.

2016-04-27  Hristian Kirtchev  <kirtchev@adacore.com>

* sem_aggr.adb, sem_dim.adb, sem_dim.ads, einfo.adb: Minor
reformatting.

From-SVN: r235494

gcc/ada/ChangeLog
gcc/ada/einfo.adb
gcc/ada/gnatcmd.adb
gcc/ada/sem_aggr.adb
gcc/ada/sem_dim.adb
gcc/ada/sem_dim.ads
gcc/ada/sem_prag.adb

index eb0f5ae046f8fc1a5d02cb13a8941e5f6de8bd4d..1cf844c700a95161ea714efa862d531bbb1d4fb5 100644 (file)
@@ -1,3 +1,20 @@
+2016-04-27  Vincent Celier  <celier@adacore.com>
+
+       * gnatcmd.adb: For "gnat ls -V -P", recognize switch
+       --unchecked-shared-lib-imports and set the flag
+       Opt.Unchecked_Shared_Lib_Imports accordingly.
+
+2016-04-27  Ed Schonberg  <schonberg@adacore.com>
+
+       * sem_prag.adb (Analyze_Pre_Post_Condition_In_Decl_Part):
+       A generic subprogram is never a primitive operation, and thus
+       a classwide condition for it is not legal.
+
+2016-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
+
+       * sem_aggr.adb, sem_dim.adb, sem_dim.ads, einfo.adb: Minor
+       reformatting.
+
 2016-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
 
        * sem_res.adb (Flag_Effectively_Volatile_Objects): New routine.
index 32a56a6f8f11d34462364b18b2c4d246f9d900fd..eade226f0428e608c89af463d622cace1b7d1f73 100644 (file)
@@ -3935,17 +3935,13 @@ package body Einfo is
 
    procedure Set_Corresponding_Function (Id : E; V : E) is
    begin
-      pragma Assert
-        (Ekind (Id) = E_Procedure
-          and then Rewritten_For_C (V));
+      pragma Assert (Ekind (Id) = E_Procedure and then Rewritten_For_C (V));
       Set_Node32 (Id, V);
    end Set_Corresponding_Function;
 
    procedure Set_Corresponding_Procedure (Id : E; V : E) is
    begin
-      pragma Assert
-        (Ekind (Id) = E_Function
-          and then Rewritten_For_C (Id));
+      pragma Assert (Ekind (Id) = E_Function and then Rewritten_For_C (Id));
       Set_Node32 (Id, V);
    end Set_Corresponding_Procedure;
 
index 2432f89f8f43022b83bcd5e3b2d7072d2a8f74ab..433ac7d2bb0cac25323f6884713a424bff94c9d9 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 B o d y                                  --
 --                                                                          --
---          Copyright (C) 1996-2015, Free Software Foundation, Inc.         --
+--          Copyright (C) 1996-2016, 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- --
@@ -983,6 +983,14 @@ begin
 
                      Remove_Switch (Arg_Num);
 
+                  --  --unchecked-shared-lib-imports
+
+                  elsif Argv.all = "--unchecked-shared-lib-imports" then
+                     Opt.Unchecked_Shared_Lib_Imports := True;
+                     Remove_Switch (Arg_Num);
+
+                  --  gnat list -U
+
                   elsif
                     The_Command = List
                     and then Argv'Length = 2
index 575a1d2ea3ccf8d1ca7aa210694589d885937a2e..876521b6d23cd3b04b21895dc8bf805996433bee 100644 (file)
@@ -2052,8 +2052,8 @@ package body Sem_Aggr is
                      Set_Parent (Expr, Parent (Expression (Assoc)));
                      Analyze (Expr);
 
-                     --  Compute its dimensions now, rather than at the end
-                     --  of resolution, because in the case of multidimensional
+                     --  Compute its dimensions now, rather than at the end of
+                     --  resolution, because in the case of multidimensional
                      --  aggregates subsequent expansion may lead to spurious
                      --  errors.
 
index 754be84ab0df9812d896daee8654af56467af2bd..4a9201570bdffebbeb18ba8e6ebbebd762d6e054 100644 (file)
@@ -2277,8 +2277,8 @@ package body Sem_Dim is
    ---------------------------------
 
    procedure Check_Expression_Dimensions
-      (Expr : Node_Id;
-       Typ  : Entity_Id)
+     (Expr : Node_Id;
+      Typ  : Entity_Id)
    is
    begin
       if Is_Floating_Point_Type (Etype (Expr)) then
index bce497a5850864aa6554076cead611cf9421157a..44f4e86fced7abddff656e10278f59faf3d8ce6c 100644 (file)
@@ -165,14 +165,14 @@ package Sem_Dim is
    --  literal default value in the list of formals Formals.
 
    procedure Check_Expression_Dimensions
-      (Expr : Node_Id;
-       Typ  : Entity_Id);
-   --  Compute dimensions of a floating-point expression and compare them
-   --  with the dimensions of a the given type. Used to verify dimensions
-   --  of the components of a multidimensional array type, for which components
-   --  are typically themselves arrays. The resolution of such arrays delays
-   --  the resolution of the ultimate components to a separate phase, which
-   --  forces this separate dimension verification.
+     (Expr : Node_Id;
+      Typ  : Entity_Id);
+   --  Compute dimensions of a floating-point expression and compare them with
+   --  the dimensions of a the given type. Used to verify dimensions of the
+   --  components of a multidimensional array type, for which components are
+   --  typically themselves arrays. The resolution of such arrays delays the
+   --  resolution of the ultimate components to a separate phase, which forces
+   --  this separate dimension verification.
 
    procedure Copy_Dimensions (From, To : Node_Id);
    --  Copy dimension vector of node From to node To. Note that To must be a
index 3d3683c9ba0e71a4486c77f0988d72deffbb262b..14b53ee3c41bd80ac02cac7b200097f0de91f32c 100644 (file)
@@ -23319,11 +23319,12 @@ package body Sem_Prag is
       if Class_Present (N) then
 
          --  Verify that a class-wide condition is legal, i.e. the operation is
-         --  a primitive of a tagged type.
+         --  a primitive of a tagged type. Note that a generic subprogram is
+         --  not a primitive operation.
 
          Disp_Typ := Find_Dispatching_Type (Spec_Id);
 
-         if No (Disp_Typ) then
+         if No (Disp_Typ) or else Is_Generic_Subprogram (Spec_Id) then
             Error_Msg_Name_1 := Original_Aspect_Pragma_Name (N);
 
             if From_Aspect_Specification (N) then