+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.
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})
-- --
-- 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- --
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);
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);
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);
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);
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
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
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
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
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;
SPARK_Mode : SPARK_Mode_Type := None;
-- GNAT
- -- Current SPARK mode setting
+ -- Current SPARK mode setting.
SPARK_Mode_Pragma : Node_Id := Empty;
-- GNAT
Pragma_Debug_Policy |
Pragma_Depends |
Pragma_Detect_Blocking |
+ Pragma_Default_Scalar_Storage_Order |
Pragma_Default_Storage_Pool |
Pragma_Disable_Atomic_Synchronization |
Pragma_Discard_Names |
-- --
-- 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- --
-- 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:
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;
------------------
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);
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 --
--------------------------
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;
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,
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 + $;
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 + $;
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 + $;
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,
-- --
-- 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- --
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
-- 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