[multiple changes]
authorArnaud Charlet <charlet@gcc.gnu.org>
Fri, 12 Apr 2013 13:23:23 +0000 (15:23 +0200)
committerArnaud Charlet <charlet@gcc.gnu.org>
Fri, 12 Apr 2013 13:23:23 +0000 (15:23 +0200)
2013-04-12  Hristian Kirtchev  <kirtchev@adacore.com>

* sem_prag.adb (Analyze_Input_List): Detect an illegal dependency
clause where both input and output lists are null.
(Analyze_Pragma): Update the grammar of pragma Depends.

2013-04-12  Vincent Celier  <celier@adacore.com>

* gnatbind.adb (No_Restriction_List): Exclude restrictions that
take a parameter value, not a count.
* prj.ads, prj.adb (Remove_All_Restricted_Languages): New procedure.
* projects.texi: Complete documentation of attribute Roots.

2013-04-12  Thomas Quinot  <quinot@adacore.com>

* exp_ch3.adb, exp_util.ads, checks.adb, freeze.adb, sem_attr.adb,
sem_ch3.adb: Minor reformatting.
* exp_ch4.adb (Size_In_Storage_Elements): Minor documentation
improvement: note that the computation is pessimistic for bit
packed arrays.
* gnat_rm.texi (Range_Length): Fix minor error in description
of attribute.

From-SVN: r197912

gcc/ada/ChangeLog
gcc/ada/checks.adb
gcc/ada/exp_ch3.adb
gcc/ada/exp_ch4.adb
gcc/ada/exp_util.ads
gcc/ada/freeze.adb
gcc/ada/gnat_rm.texi
gcc/ada/gnatbind.adb
gcc/ada/prj.adb
gcc/ada/prj.ads
gcc/ada/sem_prag.adb

index a4abd21692d3d1721130fd5a71d0da9c763ea4f5..cf86c6f8ccb93afe8adfa18160c06bce0a3502aa 100644 (file)
@@ -1,3 +1,26 @@
+2013-04-12  Hristian Kirtchev  <kirtchev@adacore.com>
+
+       * sem_prag.adb (Analyze_Input_List): Detect an illegal dependency
+       clause where both input and output lists are null.
+       (Analyze_Pragma): Update the grammar of pragma Depends.
+
+2013-04-12  Vincent Celier  <celier@adacore.com>
+
+       * gnatbind.adb (No_Restriction_List): Exclude restrictions that
+       take a parameter value, not a count.
+       * prj.ads, prj.adb (Remove_All_Restricted_Languages): New procedure.
+       * projects.texi: Complete documentation of attribute Roots.
+
+2013-04-12  Thomas Quinot  <quinot@adacore.com>
+
+       * exp_ch3.adb, exp_util.ads, checks.adb, freeze.adb, sem_attr.adb,
+       sem_ch3.adb: Minor reformatting.
+       * exp_ch4.adb (Size_In_Storage_Elements): Minor documentation
+       improvement: note that the computation is pessimistic for bit
+       packed arrays.
+       * gnat_rm.texi (Range_Length): Fix minor error in description
+       of attribute.
+
 2013-04-12  Hristian Kirtchev  <kirtchev@adacore.com>
 
        * aspects.adb (Find_Aspect): New routine.
index 5544aad1a46d19950dfb2097fb31ad643f01d236..73aefb0698ca527bd07f85f04b560fcc5532aff3 100644 (file)
@@ -996,7 +996,7 @@ package body Checks is
          elsif Dsiz <= Standard_Long_Long_Integer_Size then
             Ctyp := Standard_Long_Long_Integer;
 
-            --  No check type exists, use runtime call
+         --  No check type exists, use runtime call
 
          else
             if Nkind (N) = N_Op_Add then
index 5637c2ff754622b95a3a62a0151db5d1828ff40c..e16adfb56ca0b5defdb148c008f226dd7b8d41cc 100644 (file)
@@ -2780,8 +2780,8 @@ package body Exp_Ch3 is
 
          --  Loop through components, skipping pragmas, in 2 steps. The first
          --  step deals with regular components. The second step deals with
-         --  components have per object constraints, and no explicit initia-
-         --  lization.
+         --  components that have per object constraints and no explicit
+         --  initialization.
 
          Has_POC := False;
 
@@ -2799,9 +2799,7 @@ package body Exp_Ch3 is
             --  Leave any processing of per-object constrained component for
             --  the second pass.
 
-            if Has_Access_Constraint (Id)
-              and then No (Expression (Decl))
-            then
+            if Has_Access_Constraint (Id) and then No (Expression (Decl)) then
                Has_POC := True;
 
             --  Regular component cases
index e9458cf6bed954fbccd9f896544bd3ea8a595153..7eca831d2772e7ce98486e347ebf48857d0813ce 100644 (file)
@@ -4149,6 +4149,10 @@ package body Exp_Ch4 is
          --  are too large, and which in the absence of a check results in
          --  undetected chaos ???
 
+         --  Note in particular that this is a pessimistic estimate in the
+         --  case of packed array types, where an array element might occupy
+         --  just a fraction of a storage element???
+
          declare
             Len : Node_Id;
             Res : Node_Id;
index 68dc1882e0e8eb1297189e502b1708582db3a256..39d1c0b0b848446e2ce6da00c3dcb80e413b81af 100644 (file)
@@ -345,7 +345,7 @@ package Exp_Util is
    --  This procedure ensures that type referenced by Typ is defined. For the
    --  case of a type other than an Itype, nothing needs to be done, since
    --  all such types have declaration nodes. For Itypes, an N_Itype_Reference
-   --  node is generated and inserted at the given node N. This is typically
+   --  node is generated and inserted as an action on node N. This is typically
    --  used to ensure that an Itype is properly defined outside a conditional
    --  construct when it is referenced in more than one branch.
 
index 234cdd2cb42d62045dbd7ff1579358fe62a624d6..6731022c3f5dd4a5b01616032f1c846975a6a8ca 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 B o d y                                  --
 --                                                                          --
---          Copyright (C) 1992-2012, Free Software Foundation, Inc.         --
+--          Copyright (C) 1992-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- --
@@ -3484,7 +3484,7 @@ package body Freeze is
                                  Set_Is_Packed            (Btyp);
                                  Set_Has_Non_Standard_Rep (Btyp);
 
-                                 --  Otherwise give an error message
+                              --  Otherwise give an error message
 
                               else
                                  Error_Msg_NE
index 8e94e4e07a79ddd7b4a643941f4f00e377ade96a..29ba674911223755a2b4549c7bf3e5a37e2b6be6 100644 (file)
@@ -7135,7 +7135,7 @@ what is passed to @code{Allocate} and returned from @code{Deallocate}.
 the number of values represented by the subtype (zero for a null
 range).  The result is static for static subtypes.  @code{Range_Length}
 applied to the index subtype of a one dimensional array always gives the
-same result as @code{Range} applied to the array itself.
+same result as @code{Length} applied to the array itself.
 
 @node Ref
 @unnumberedsec Ref
index 9e451391230d1c5b8e3a3b2bb86fca8a278e2421..b332b13b85a5b75b2ae5b8aa3704918e057f53d8 100644 (file)
@@ -176,6 +176,15 @@ procedure Gnatbind is
          Max_Storage_At_Blocking         => True,
          --  Not checkable at compile time
 
+         No_Specification_Of_Aspect      => True,
+         --  Requires a parameter value, not a count
+
+         No_Use_Of_Attribute             => True,
+         --  Requires a parameter value, not a count
+
+         No_Use_Of_Pragma                => True,
+         --  Requires a parameter value, not a count
+
          others                          => False);
 
       Additional_Restrictions_Listed : Boolean := False;
index de2254cb222ee448c7e01dc45080574c0d2d8e9d..9e0e0aa38d1492e5009d04bd3962f830f25d8fcb 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 B o d y                                  --
 --                                                                          --
---          Copyright (C) 2001-2012, Free Software Foundation, Inc.         --
+--          Copyright (C) 2001-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- --
@@ -112,6 +112,15 @@ package body Prj is
         new Restricted_Lang'(Name => Name_Find, Next => Restricted_Languages);
    end Add_Restricted_Language;
 
+   -------------------------------------
+   -- Remove_All_Restricted_Languages --
+   -------------------------------------
+
+   procedure Remove_All_Restricted_Languages is
+   begin
+      Restricted_Languages := null;
+   end Remove_All_Restricted_Languages;
+
    -------------------
    -- Add_To_Buffer --
    -------------------
index 449b038e475a2e2f4672f1144487ee02839c0e8e..66f878688d0ace59361b3f70a6e799ba06698046 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
---          Copyright (C) 2001-2012, Free Software Foundation, Inc.         --
+--          Copyright (C) 2001-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- --
@@ -45,6 +45,10 @@ package Prj is
    --  Call by gprbuild for each language specify by switch
    --  --restricted-to-languages=.
 
+   procedure Remove_All_Restricted_Languages;
+   --  Call by gprbuild in CodePeer mode to ignore switches
+   --  --restricted-to-languages=.
+
    function Is_Allowed_Language (Name : Name_Id) return Boolean;
    --  Returns True if --restricted-to-languages= is not used or if Name
    --  is one of the restricted languages.
@@ -1829,6 +1833,7 @@ package Prj is
 
    Gprbuild_Flags : constant Processing_Flags;
    Gprclean_Flags : constant Processing_Flags;
+   Gprexec_Flags  : constant Processing_Flags;
    Gnatmake_Flags : constant Processing_Flags;
    --  Flags used by the various tools. They all display the error messages
    --  through Prj.Err.
@@ -2003,6 +2008,18 @@ private
                        Missing_Source_Files       => Error,
                        Ignore_Missing_With        => False);
 
+   Gprexec_Flags :  constant Processing_Flags :=
+                      (Report_Error               => null,
+                       When_No_Sources            => Silent,
+                       Require_Sources_Other_Lang => False,
+                       Allow_Duplicate_Basenames  => False,
+                       Compiler_Driver_Mandatory  => False,
+                       Error_On_Unknown_Language  => True,
+                       Require_Obj_Dirs           => Silent,
+                       Allow_Invalid_External     => Error,
+                       Missing_Source_Files       => Silent,
+                       Ignore_Missing_With        => False);
+
    Gnatmake_Flags : constant Processing_Flags :=
                       (Report_Error               => null,
                        When_No_Sources            => Error,
index d60c41ef9564cd9f55ee02794a9b1cf6fd613eaf..695bdb7ca40f1f98407beab5fce36a443308074c 100644 (file)
@@ -8986,9 +8986,13 @@ package body Sem_Prag is
          --    null
          --  | DEPENDENCY_CLAUSE {, DEPENDENCY_CLAUSE}
 
-         --  DEPENDENCY_CLAUSE ::= OUTPUT_LIST =>[+] INPUT_LIST
+         --  DEPENDENCY_CLAUSE ::=
+         --    OUTPUT_LIST =>[+] INPUT_LIST
+         --  | NULL_DEPENDENCY_CLAUSE
 
-         --  OUTPUT_LIST ::= null | OUTPUT | (OUTPUT {, OUTPUT})
+         --  NULL_DEPENDENCY_CLAUSE ::= null => INPUT_LIST
+
+         --  OUTPUT_LIST ::= OUTPUT | (OUTPUT {, OUTPUT})
 
          --  INPUT_LIST ::= null | INPUT | (INPUT {, INPUT})
 
@@ -9141,6 +9145,16 @@ package body Sem_Prag is
                         Seen      => Inputs_Seen,
                         Null_Seen => Null_Input_Seen);
                   end if;
+
+                  --  Detect an illegal dependency clause of the form
+
+                  --    (null =>[+] null)
+
+                  if Null_Output_Seen and then Null_Input_Seen then
+                     Error_Msg_N
+                       ("null dependency clause cannot have a null input list",
+                        Inputs);
+                  end if;
                end Analyze_Input_List;
 
                --------------------------