diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-07-18 09:36:24 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-07-18 09:36:24 +0000 |
commit | 4949ddd585dfca397363f1ffd0a76e769da50331 (patch) | |
tree | 275adb1503ca3ea11102cee669ab69591c42a362 | |
parent | 2ff55065e125bf8b532dfd898e65c9eac6939ca9 (diff) | |
download | gcc-4949ddd585dfca397363f1ffd0a76e769da50331.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@212790 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ada/ChangeLog | 26 | ||||
-rw-r--r-- | gcc/ada/gnat_ugn.texi | 4 | ||||
-rw-r--r-- | gcc/ada/opt.adb | 12 | ||||
-rw-r--r-- | gcc/ada/opt.ads | 21 | ||||
-rw-r--r-- | gcc/ada/par-prag.adb | 1 | ||||
-rw-r--r-- | gcc/ada/repinfo.ads | 4 | ||||
-rw-r--r-- | gcc/ada/sem_ch13.adb | 2 | ||||
-rw-r--r-- | gcc/ada/sem_ch13.ads | 2 | ||||
-rw-r--r-- | gcc/ada/sem_prag.adb | 25 | ||||
-rw-r--r-- | gcc/ada/snames.ads-tmpl | 4 | ||||
-rw-r--r-- | gcc/ada/tree_io.ads | 7 |
11 files changed, 86 insertions, 22 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 90853093d78..33e45e970a3 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -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. diff --git a/gcc/ada/gnat_ugn.texi b/gcc/ada/gnat_ugn.texi index c8b8ca69906..57939c3d6b7 100644 --- a/gcc/ada/gnat_ugn.texi +++ b/gcc/ada/gnat_ugn.texi @@ -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}) diff --git a/gcc/ada/opt.adb b/gcc/ada/opt.adb index 0ff90a163fe..c8edad417ce 100644 --- a/gcc/ada/opt.adb +++ b/gcc/ada/opt.adb @@ -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); diff --git a/gcc/ada/opt.ads b/gcc/ada/opt.ads index a8447065c69..59737769468 100644 --- a/gcc/ada/opt.ads +++ b/gcc/ada/opt.ads @@ -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 diff --git a/gcc/ada/par-prag.adb b/gcc/ada/par-prag.adb index 61ba85903e8..a7509af8c20 100644 --- a/gcc/ada/par-prag.adb +++ b/gcc/ada/par-prag.adb @@ -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 | diff --git a/gcc/ada/repinfo.ads b/gcc/ada/repinfo.ads index 7896439a0b5..5654c1a0f30 100644 --- a/gcc/ada/repinfo.ads +++ b/gcc/ada/repinfo.ads @@ -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: diff --git a/gcc/ada/sem_ch13.adb b/gcc/ada/sem_ch13.adb index aab0ea10df4..b89bd74c76f 100644 --- a/gcc/ada/sem_ch13.adb +++ b/gcc/ada/sem_ch13.adb @@ -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; ------------------ diff --git a/gcc/ada/sem_ch13.ads b/gcc/ada/sem_ch13.ads index 9bef91cc384..f666a3f1b43 100644 --- a/gcc/ada/sem_ch13.ads +++ b/gcc/ada/sem_ch13.ads @@ -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); diff --git a/gcc/ada/sem_prag.adb b/gcc/ada/sem_prag.adb index 5e2667224db..c36a8fb6d0f 100644 --- a/gcc/ada/sem_prag.adb +++ b/gcc/ada/sem_prag.adb @@ -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, diff --git a/gcc/ada/snames.ads-tmpl b/gcc/ada/snames.ads-tmpl index 755c0169e85..f4b5faca91a 100644 --- a/gcc/ada/snames.ads-tmpl +++ b/gcc/ada/snames.ads-tmpl @@ -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, diff --git a/gcc/ada/tree_io.ads b/gcc/ada/tree_io.ads index bab7f9e6a4a..75816be2d11 100644 --- a/gcc/ada/tree_io.ads +++ b/gcc/ada/tree_io.ads @@ -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 |