]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
2014-07-18 Arnaud Charlet <charlet@adacore.com>
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 18 Jul 2014 09:36:24 +0000 (09:36 +0000)
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 18 Jul 2014 09:36:24 +0000 (09:36 +0000)
* gnat_ugn.texi: Doc clarification.
* sem_ch13.adb (Kill_Rep_Clause): Use Replace not Rewrite.
* sem_ch13.ads: Minor comment update.

2014-07-18  Robert Dewar  <dewar@adacore.com>

* repinfo.ads: Minor comment fix.

2014-07-18  Robert Dewar  <dewar@adacore.com>

* par-prag.adb: Add dummy entry for Default_Scalar_Storage_Order.
* sem_prag.adb: Add dummy implementation of
Default_Scalar_Storage_Order.
* snames.ads-tmpl: Add dummy entry for
Default_Scalar_Storage_Order pragma.

2014-07-18  Robert Dewar  <dewar@adacore.com>

* opt.adb (Tree_Read): Read Address_Is_Private,
Ignore_Rep_Clauses, Ignore_Style_Check_Pragmas, Multiple_Unit_Index.
(Tree_Write): Corresponding writes
* opt.ads: Minor comment reformatting and fixes.
* tree_io.ads: Increment ASIS_Version_Number.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@212790 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ada/ChangeLog
gcc/ada/gnat_ugn.texi
gcc/ada/opt.adb
gcc/ada/opt.ads
gcc/ada/par-prag.adb
gcc/ada/repinfo.ads
gcc/ada/sem_ch13.adb
gcc/ada/sem_ch13.ads
gcc/ada/sem_prag.adb
gcc/ada/snames.ads-tmpl
gcc/ada/tree_io.ads

index 90853093d7855882b7fb2d99b3f2e01044fd6daa..33e45e970a3524813949e6ab6bcee2d82037f35b 100644 (file)
@@ -1,3 +1,29 @@
+2014-07-18  Arnaud Charlet  <charlet@adacore.com>
+
+       * gnat_ugn.texi: Doc clarification.
+       * sem_ch13.adb (Kill_Rep_Clause): Use Replace not Rewrite.
+       * sem_ch13.ads: Minor comment update.
+
+2014-07-18  Robert Dewar  <dewar@adacore.com>
+
+       * repinfo.ads: Minor comment fix.
+
+2014-07-18  Robert Dewar  <dewar@adacore.com>
+
+       * par-prag.adb: Add dummy entry for Default_Scalar_Storage_Order.
+       * sem_prag.adb: Add dummy implementation of
+       Default_Scalar_Storage_Order.
+       * snames.ads-tmpl: Add dummy entry for
+       Default_Scalar_Storage_Order pragma.
+
+2014-07-18  Robert Dewar  <dewar@adacore.com>
+
+       * opt.adb (Tree_Read): Read Address_Is_Private,
+       Ignore_Rep_Clauses, Ignore_Style_Check_Pragmas, Multiple_Unit_Index.
+       (Tree_Write): Corresponding writes
+       * opt.ads: Minor comment reformatting and fixes.
+       * tree_io.ads: Increment ASIS_Version_Number.
+
 2014-07-18  Robert Dewar  <dewar@adacore.com>
 
        * sem_attr.adb, s-os_lib.ads, prj-tree.adb: Minor reformatting.
index c8b8ca699062f7020ac1935fdf798e049fa097b4..57939c3d6b7f9551aa9f56f77ebee91f01d348ac 100644 (file)
@@ -4093,9 +4093,7 @@ code is likely to malfunction at run time.
 
 Note that when @code{-gnatct} is used to generate trees for input
 into @code{ASIS} tools, these representation clauses are removed
-from the tree. This means that the tool will not see them. For
-example, if you use @command{gnatpp} with @code{-gnatI}, the pretty printed
-output will not include the ignored representation clauses.
+from the tree and ignored. This means that the tool will not see them.
 
 @item -gnatjnn
 @cindex @option{-gnatjnn} (@command{gcc})
index 0ff90a163fef1424543cfcc77a4754bdc9ce0859..c8edad417cee67783cd1e60ee3a14e50d77c22b7 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 B o d y                                  --
 --                                                                          --
---          Copyright (C) 1992-2013, Free Software Foundation, Inc.         --
+--          Copyright (C) 1992-2014, 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- --
@@ -249,9 +249,13 @@ package body Opt is
 
    begin
       Tree_Read_Int  (Tree_ASIS_Version_Number);
+
+      Tree_Read_Bool (Address_Is_Private);
       Tree_Read_Bool (Brief_Output);
       Tree_Read_Bool (GNAT_Mode);
       Tree_Read_Char (Identifier_Character_Set);
+      Tree_Read_Bool (Ignore_Rep_Clauses);
+      Tree_Read_Bool (Ignore_Style_Checks_Pragmas);
       Tree_Read_Int  (Maximum_File_Name_Length);
       Tree_Read_Data (Suppress_Options'Address,
                       (Suppress_Options'Size + SU - 1) / SU);
@@ -294,6 +298,7 @@ package body Opt is
       Tree_Read_Bool (Inline_Active);
       Tree_Read_Bool (Inline_Processing_Required);
       Tree_Read_Bool (List_Units);
+      Tree_Read_Int  (Multiple_Unit_Index);
       Tree_Read_Bool (Configurable_Run_Time_Mode);
       Tree_Read_Data (Operating_Mode'Address,
                       (Operating_Mode'Size + SU - 1) / Storage_Unit);
@@ -314,9 +319,13 @@ package body Opt is
 
    begin
       Tree_Write_Int  (ASIS_Version_Number);
+
+      Tree_Write_Bool (Address_Is_Private);
       Tree_Write_Bool (Brief_Output);
       Tree_Write_Bool (GNAT_Mode);
       Tree_Write_Char (Identifier_Character_Set);
+      Tree_Write_Bool (Ignore_Rep_Clauses);
+      Tree_Write_Bool (Ignore_Style_Checks_Pragmas);
       Tree_Write_Int  (Maximum_File_Name_Length);
       Tree_Write_Data (Suppress_Options'Address,
                        (Suppress_Options'Size + SU - 1) / SU);
@@ -339,6 +348,7 @@ package body Opt is
       Tree_Write_Bool (Inline_Active);
       Tree_Write_Bool (Inline_Processing_Required);
       Tree_Write_Bool (List_Units);
+      Tree_Write_Int  (Multiple_Unit_Index);
       Tree_Write_Bool (Configurable_Run_Time_Mode);
       Tree_Write_Data (Operating_Mode'Address,
                        (Operating_Mode'Size + SU - 1) / SU);
index a8447065c69949b9902aadee0745159da5279e4a..5973776946827c61078c3b2cc1ae95c664889d69 100644 (file)
@@ -486,7 +486,7 @@ package Opt is
 
    Do_Not_Execute : Boolean := False;
    --  GNATMAKE
-   --  Set to True if no actual compilations should be undertaken.
+   --  Set to True if no actual compilations should be undertaken
 
    Dump_Source_Text : Boolean := False;
    --  GNAT
@@ -775,7 +775,7 @@ package Opt is
    Init_Or_Norm_Scalars : Boolean := False;
    --  GNAT, GANTBIND
    --  Set True if a pragma Initialize_Scalars applies to the current unit.
-   --  Also set True if a pragma Normalize_Scalars applies.
+   --  Also set True if a pragma Restriction (Normalize_Scalars) applies.
 
    Initialize_Scalars : Boolean := False;
    --  GNAT
@@ -1035,8 +1035,7 @@ package Opt is
 
    No_Backup : Boolean := False;
    --  GNATNAME
-   --  Set by switch --no-backup.
-   --  Do not create backup copies of project files.
+   --  Do not create backup copies of project files. Set by switch --no-backup.
 
    No_Deletion : Boolean := False;
    --  GNATPREP
@@ -1057,20 +1056,20 @@ package Opt is
    No_Split_Units : Boolean := False;
    --  GPRBUILD
    --  Set to True with switch --no-split-units. When True, unit sources, spec,
-   --  body and subunits, must all be in the same project.This is checked after
-   --  each compilation.
+   --  body and subunits, must all be in the same project. This is checked
+   --  after each compilation.
 
    No_Stdinc : Boolean := False;
    --  GNAT, GNATBIND, GNATMAKE, GNATFIND, GNATXREF
-   --  Set to True if no default source search dirs added to search list
+   --  Set to True if no default source search dirs added to search list.
 
    No_Stdlib : Boolean := False;
    --  GNATMAKE, GNATBIND, GNATFIND, GNATXREF
-   --  Set to True if no default library search dirs added to search list
+   --  Set to True if no default library search dirs added to search list.
 
    No_Strict_Aliasing : Boolean := False;
    --  GNAT
-   --  Set True if pragma No_Strict_Aliasing with no parameters encountered
+   --  Set True if pragma No_Strict_Aliasing with no parameters encountered.
 
    Normalize_Scalars : Boolean := False;
    --  GNAT, GNATBIND
@@ -1246,7 +1245,7 @@ package Opt is
 
    Replace_In_Comments : Boolean := False;
    --  GNATPREP
-   --  Set to True if -C switch used
+   --  Set to True if -C switch used.
 
    RTS_Lib_Path_Name : String_Ptr := null;
    RTS_Src_Path_Name : String_Ptr := null;
@@ -1301,7 +1300,7 @@ package Opt is
 
    SPARK_Mode : SPARK_Mode_Type := None;
    --  GNAT
-   --  Current SPARK mode setting
+   --  Current SPARK mode setting.
 
    SPARK_Mode_Pragma : Node_Id := Empty;
    --  GNAT
index 61ba85903e8f56a3168a8255fb49747f8e155ee6..a7509af8c201b8f6cfb49a3eb72255d590e56b68 100644 (file)
@@ -1187,6 +1187,7 @@ begin
            Pragma_Debug_Policy                   |
            Pragma_Depends                        |
            Pragma_Detect_Blocking                |
+           Pragma_Default_Scalar_Storage_Order   |
            Pragma_Default_Storage_Pool           |
            Pragma_Disable_Atomic_Synchronization |
            Pragma_Discard_Names                  |
index 7896439a0b5ae1d0bc7f2b2c83a255e04ad48976..5654c1a0f300bd054a1658fdc4149864e8048b83 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
---          Copyright (C) 1999-2013, Free Software Foundation, Inc.         --
+--          Copyright (C) 1999-2014, 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- --
@@ -88,7 +88,7 @@ package Repinfo is
 
    --    For E_Component and E_Discriminant entities, the Esize (size
    --    of component) and Component_Bit_Offset fields. Note that gigi
-   --    does not (yet ???) back annotate Normalized_Position/First_Bit.
+   --    does not back annotate Normalized_Position/First_Bit.
 
    --  There are three cases to consider:
 
index aab0ea10df4b654a8a7e4e8331e331cc5c049672..b89bd74c76f62cda65057a74726ffce6383179ca 100644 (file)
@@ -10295,7 +10295,7 @@ package body Sem_Ch13 is
    procedure Kill_Rep_Clause (N : Node_Id) is
    begin
       pragma Assert (Ignore_Rep_Clauses);
-      Rewrite (N, Make_Null_Statement (Sloc (N)));
+      Replace (N, Make_Null_Statement (Sloc (N)));
    end Kill_Rep_Clause;
 
    ------------------
index 9bef91cc3849f6f240bb4e9530a6992bb5e5a7df..f666a3f1b430b9d82d300af9e8de56c4c8964f7b 100644 (file)
@@ -81,7 +81,7 @@ package Sem_Ch13 is
 
    procedure Kill_Rep_Clause (N : Node_Id);
    --  This procedure is called for a rep clause N when we are in -gnatI mode
-   --  (Ignore_Rep_Clauses). It rewrites the node N to a null statement. This
+   --  (Ignore_Rep_Clauses). It replaces the node N with a null statement. This
    --  is only called if Ignore_Rep_Clauses is True.
 
    procedure Set_Enum_Esize (T : Entity_Id);
index 5e2667224db45ff7005937038ce0a7ec567bbff3..c36a8fb6d0fcfe72991344e631f18555d2ae3ac5 100644 (file)
@@ -13168,6 +13168,28 @@ package body Sem_Prag is
             Check_Valid_Configuration_Pragma;
             Detect_Blocking := True;
 
+         ----------------------------------
+         -- Default_Scalar_Storage_Order --
+         ----------------------------------
+
+         --  pragma Default_Scalar_Storage_Order
+         --           (High_Order_First | Low_Order_First);
+
+         when Pragma_Default_Scalar_Storage_Order =>
+            GNAT_Pragma;
+            Check_Arg_Count (1);
+
+            --  Default_Scalar_Storage_Order can appear as a configuration
+            --  pragma, or in a declarative part of a package spec.
+
+            if not Is_Configuration_Pragma then
+               Check_Is_In_Decl_Part_Or_Package_Spec;
+            end if;
+
+            Check_No_Identifiers;
+            Check_Arg_Is_One_Of
+              (Arg1, Name_Low_Order_First, Name_High_Order_First);
+
          --------------------------
          -- Default_Storage_Pool --
          --------------------------
@@ -13179,7 +13201,7 @@ package body Sem_Prag is
             Check_Arg_Count (1);
 
             --  Default_Storage_Pool can appear as a configuration pragma, or
-            --  in a declarative part or a package spec.
+            --  in a declarative part of a package spec.
 
             if not Is_Configuration_Pragma then
                Check_Is_In_Decl_Part_Or_Package_Spec;
@@ -25483,6 +25505,7 @@ package body Sem_Prag is
       Pragma_Debug                          => -1,
       Pragma_Debug_Policy                   =>  0,
       Pragma_Detect_Blocking                => -1,
+      Pragma_Default_Scalar_Storage_Order   =>  0,
       Pragma_Default_Storage_Pool           => -1,
       Pragma_Depends                        => -1,
       Pragma_Disable_Atomic_Synchronization => -1,
index 755c0169e85b10935379a6dd1c90a43d48a4dc05..f4b5faca91ac69bb08f71037618e9c7a827e1577 100644 (file)
@@ -380,6 +380,7 @@ package Snames is
    Name_Convention_Identifier          : constant Name_Id := N + $; -- GNAT
    Name_Debug_Policy                   : constant Name_Id := N + $; -- GNAT
    Name_Detect_Blocking                : constant Name_Id := N + $; -- Ada 05
+   Name_Default_Scalar_Storage_Order   : constant Name_Id := N + $; -- GNAT
    Name_Default_Storage_Pool           : constant Name_Id := N + $; -- Ada 12
    Name_Disable_Atomic_Synchronization : constant Name_Id := N + $; -- GNAT
    Name_Discard_Names                  : constant Name_Id := N + $;
@@ -721,6 +722,7 @@ package Snames is
    Name_General                        : constant Name_Id := N + $;
    Name_Gnat                           : constant Name_Id := N + $;
    Name_GPL                            : constant Name_Id := N + $;
+   Name_High_Order_First               : constant Name_Id := N + $;
    Name_IEEE_Float                     : constant Name_Id := N + $;
    Name_Ignore                         : constant Name_Id := N + $;
    Name_In_Out                         : constant Name_Id := N + $;
@@ -729,6 +731,7 @@ package Snames is
    Name_Internal                       : constant Name_Id := N + $;
    Name_Ivdep                          : constant Name_Id := N + $;
    Name_Link_Name                      : constant Name_Id := N + $;
+   Name_Low_Order_First                : constant Name_Id := N + $;
    Name_Lowercase                      : constant Name_Id := N + $;
    Name_Max_Entry_Queue_Depth          : constant Name_Id := N + $;
    Name_Max_Entry_Queue_Length         : constant Name_Id := N + $;
@@ -1740,6 +1743,7 @@ package Snames is
       Pragma_Convention_Identifier,
       Pragma_Debug_Policy,
       Pragma_Detect_Blocking,
+      Pragma_Default_Scalar_Storage_Order,
       Pragma_Default_Storage_Pool,
       Pragma_Disable_Atomic_Synchronization,
       Pragma_Discard_Names,
index bab7f9e6a4a97676eecd27d6d1a6b9f681a36074..75816be2d1189da87582a95980eab7bec0101ce8 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
---          Copyright (C) 1992-2013, Free Software Foundation, Inc.         --
+--          Copyright (C) 1992-2014, 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- --
@@ -47,7 +47,7 @@ package Tree_IO is
    Tree_Format_Error : exception;
    --  Raised if a format error is detected in the input file
 
-   ASIS_Version_Number : constant := 33;
+   ASIS_Version_Number : constant := 34;
    --  ASIS Version. This is used to check for consistency between the compiler
    --  used to generate trees and an ASIS application that is reading the
    --  trees. It must be incremented whenever a change is made to the tree
@@ -64,6 +64,9 @@ package Tree_IO is
    --      the hierarchy of child units
    --  33  Add copying subtrees for rewriting infix calls of operator
    --      functions for the corresponding original nodes.
+   --  34  Add read/write of Address_Is_Private, Ignore_Rep_Clauses,
+   --      Ignore_Style_Check_Pragmas, Multiple_Unit_Index. Also this
+   --      is the version where rep clauses are removed by -gnatI.
 
    procedure Tree_Read_Initialize (Desc : File_Descriptor);
    --  Called to initialize reading of a tree file. This call must be made