Commit 9dc30a5f by Arnaud Charlet

[multiple changes]

2014-07-16  Vincent Celier  <celier@adacore.com>

	* gnatls.adb: Get the target parameters only if -nostdinc was
	not specified.

2014-07-16  Ed Schonberg  <schonberg@adacore.com>

	* checks.adb (Insert_Valid_Check): If the expression is a packed
	component of a modular type of the right size the data is always
	valid. This os particularly useful if the component is part of
	a volatile variable.

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

	* gnat_rm.texi, sinfo.ads, freeze.adb, exp_aggr.adb: Minor reformatting

2014-07-16  Thomas Quinot  <quinot@adacore.com>

	* exp_ch7.ads: Minor documentation fix.

From-SVN: r212663
parent 2ffcbaa5
2014-07-16 Vincent Celier <celier@adacore.com>
* gnatls.adb: Get the target parameters only if -nostdinc was
not specified.
2014-07-16 Ed Schonberg <schonberg@adacore.com>
* checks.adb (Insert_Valid_Check): If the expression is a packed
component of a modular type of the right size the data is always
valid. This os particularly useful if the component is part of
a volatile variable.
2014-07-16 Robert Dewar <dewar@adacore.com>
* gnat_rm.texi, sinfo.ads, freeze.adb, exp_aggr.adb: Minor reformatting
2014-07-16 Thomas Quinot <quinot@adacore.com>
* exp_ch7.ads: Minor documentation fix.
2014-07-16 Ed Schonberg <schonberg@adacore.com> 2014-07-16 Ed Schonberg <schonberg@adacore.com>
* sem_ch3.adb (Find_Type_Name): Diagnose properly * sem_ch3.adb (Find_Type_Name): Diagnose properly
......
...@@ -6444,6 +6444,17 @@ package body Checks is ...@@ -6444,6 +6444,17 @@ package body Checks is
return; return;
end if; end if;
-- If the expression is a packed component of a modular type of the
-- right size, the data is always valid.
if Nkind (Expr) = N_Selected_Component
and then Present (Component_Clause (Entity (Selector_Name (Expr))))
and then Is_Modular_Integer_Type (Typ)
and then Modulus (Typ) = 2 ** Esize (Entity (Selector_Name (Expr)))
then
return;
end if;
-- If we have a checked conversion, then validity check applies to -- If we have a checked conversion, then validity check applies to
-- the expression inside the conversion, not the result, since if -- the expression inside the conversion, not the result, since if
-- the expression inside is valid, then so is the conversion result. -- the expression inside is valid, then so is the conversion result.
......
...@@ -3049,8 +3049,7 @@ package body Exp_Aggr is ...@@ -3049,8 +3049,7 @@ package body Exp_Aggr is
end loop; end loop;
if not Is_Empty_List (Init_Actions) then if not Is_Empty_List (Init_Actions) then
Comp_Stmt := Make_Compound_Statement (Loc, Comp_Stmt := Make_Compound_Statement (Loc, Actions => Init_Actions);
Actions => Init_Actions);
Insert_Action_After (Init_Node, Comp_Stmt); Insert_Action_After (Init_Node, Comp_Stmt);
Set_Initialization_Statements (Obj, Comp_Stmt); Set_Initialization_Statements (Obj, Comp_Stmt);
end if; end if;
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
-- -- -- --
-- S p e c -- -- S p e c --
-- -- -- --
-- Copyright (C) 1992-2012, 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 -- -- 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- -- -- terms of the GNU General Public License as published by the Free Soft- --
...@@ -298,8 +298,8 @@ package Exp_Ch7 is ...@@ -298,8 +298,8 @@ package Exp_Ch7 is
-- the top of the scope stack. -- the top of the scope stack.
procedure Store_After_Actions_In_Scope (L : List_Id); procedure Store_After_Actions_In_Scope (L : List_Id);
-- Append the list L of actions to the beginning of the after-actions store -- Prepend the list L of actions to the beginning of the after-actions
-- in the top of the scope stack. -- store in the top of the scope stack.
procedure Wrap_Transient_Declaration (N : Node_Id); procedure Wrap_Transient_Declaration (N : Node_Id);
-- N is an object declaration. Expand the finalization calls after the -- N is an object declaration. Expand the finalization calls after the
......
...@@ -1372,6 +1372,7 @@ package body Freeze is ...@@ -1372,6 +1372,7 @@ package body Freeze is
procedure Explode_Initialization_Compound_Statement (E : Entity_Id) is procedure Explode_Initialization_Compound_Statement (E : Entity_Id) is
Init_Stmts : constant Node_Id := Initialization_Statements (E); Init_Stmts : constant Node_Id := Initialization_Statements (E);
begin begin
if Present (Init_Stmts) if Present (Init_Stmts)
and then Nkind (Init_Stmts) = N_Compound_Statement and then Nkind (Init_Stmts) = N_Compound_Statement
......
...@@ -19572,9 +19572,9 @@ Henry Spencer (and binary compatible with this C library). ...@@ -19572,9 +19572,9 @@ Henry Spencer (and binary compatible with this C library).
@noindent @noindent
A unit to rewrite on-the-fly string occurrences in a stream of A unit to rewrite on-the-fly string occurrences in a stream of
data. The implementation has a very minimum memory footprint as the data. The implementation has a very minimal memory footprint as the
full content to be processed is not loaded into memory. This makes full content to be processed is not loaded into memory all at once. This makes
this implementation usable for large files or socket streams. this interface usable for large files or socket streams.
@node GNAT.Secondary_Stack_Info (g-sestin.ads) @node GNAT.Secondary_Stack_Info (g-sestin.ads)
@section @code{GNAT.Secondary_Stack_Info} (@file{g-sestin.ads}) @section @code{GNAT.Secondary_Stack_Info} (@file{g-sestin.ads})
......
...@@ -1622,10 +1622,16 @@ begin ...@@ -1622,10 +1622,16 @@ begin
First_Lib_Dir := First_Lib_Dir.Next; First_Lib_Dir := First_Lib_Dir.Next;
end loop; end loop;
-- Finally, add the default directories and obtain target parameters -- Finally, add the default directories
Osint.Add_Default_Search_Dirs; Osint.Add_Default_Search_Dirs;
Get_Target_Parameters;
-- Get the target parameters to know if the target is OpenVMS, but only if
-- switch -nostdinc was not specified.
if not Opt.No_Stdinc then
Get_Target_Parameters;
end if;
if Verbose_Mode then if Verbose_Mode then
Write_Eol; Write_Eol;
......
...@@ -81,7 +81,7 @@ package Sinfo is ...@@ -81,7 +81,7 @@ package Sinfo is
-- the utility program which creates the Treeprs spec (in file treeprs.ads) -- the utility program which creates the Treeprs spec (in file treeprs.ads)
-- must be updated appropriately, since it special cases expression fields. -- must be updated appropriately, since it special cases expression fields.
-- If a new tree node is added, then the following changes are made -- If a new tree node is added, then the following changes are made:
-- Add it to the documentation in the appropriate place -- Add it to the documentation in the appropriate place
-- Add its fields to this documentation section -- Add its fields to this documentation section
...@@ -487,6 +487,16 @@ package Sinfo is ...@@ -487,6 +487,16 @@ package Sinfo is
-- they are set to Empty. This needs sorting out ??? It would be much -- they are set to Empty. This needs sorting out ??? It would be much
-- cleaner if they could always be set in the original node ??? -- cleaner if they could always be set in the original node ???
-- There are a few cases when ASIS has to use not the original, but the
-- rewritten tree structures. This happens when because of some important
-- technical reasons it is impossible or very hard to have the original
-- structure properly decorated by semantic information, and the rewritten
-- structure fully reproduces the original source. Below is the (incomplete
-- for the moment) list of such exceptions:
--
-- * generic specifications and generic bodies;
-- * function calls that use prefixed notation (Operand.Operation [(...)]);
-- Representation Information -- Representation Information
-- For the purposes of the data description annex, the representation -- For the purposes of the data description annex, the representation
...@@ -7323,8 +7333,8 @@ package Sinfo is ...@@ -7323,8 +7333,8 @@ package Sinfo is
-- entire list of actions to be moved around as a whole) appearing -- entire list of actions to be moved around as a whole) appearing
-- in a sequence of statements. -- in a sequence of statements.
-- This is the statement counterpart to expression node N_Expression_ -- This is the statement counterpart to the expression node
-- With_Actions. -- N_Expression_With_Actions.
-- The required semantics is that the set of actions is executed in -- The required semantics is that the set of actions is executed in
-- the order in which it appears, as though they appeared by themselves -- the order in which it appears, as though they appeared by themselves
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment