[multiple changes]

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.

From-SVN: r212790
This commit is contained in:
Arnaud Charlet 2014-07-18 11:36:24 +02:00
parent cf28c974d4
commit 39678b1cce
11 changed files with 86 additions and 22 deletions

View 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.

View 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})

View 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);

View 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

View 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 |

View 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:

View 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;
------------------

View 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);

View 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,

View 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,

View 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