Commit 67b8ac46 by Arnaud Charlet

[multiple changes]

2013-01-04  Robert Dewar  <dewar@adacore.com>

	* exp_util.adb (Remove_Side_Effects): Make sure scope suppress
	is restored on exit.

2013-01-04  Robert Dewar  <dewar@adacore.com>

	* usage.adb: Document -gnateF (check overflow for predefined Float).

2013-01-04  Robert Dewar  <dewar@adacore.com>

	* sem_res.adb (Resolve_Type_Conversion): Remove incorrect
	prevention of call to Apply_Type_Conversion_Checks, which resulted
	in missing check flags in formal mode.

2013-01-04  Vincent Celier  <celier@adacore.com>

	* makeutl.ads (Db_Switch_Args): New table used by gprbuild.
	* prj-conf.adb (Check_Builder_Switches): Check for switches
	--config= (Get_Db_Switches): New procedure to get the --db
	switches so that they are used when invoking gprconfig in
	auto-configuration.
	(Do_Autoconf): When invoking gprconfig, use the --db switches, if any.

From-SVN: r194894
parent dc8b370a
2013-01-04 Robert Dewar <dewar@adacore.com>
* exp_util.adb (Remove_Side_Effects): Make sure scope suppress
is restored on exit.
2013-01-04 Robert Dewar <dewar@adacore.com>
* usage.adb: Document -gnateF (check overflow for predefined Float).
2013-01-04 Robert Dewar <dewar@adacore.com>
* sem_res.adb (Resolve_Type_Conversion): Remove incorrect
prevention of call to Apply_Type_Conversion_Checks, which resulted
in missing check flags in formal mode.
2013-01-04 Vincent Celier <celier@adacore.com>
* makeutl.ads (Db_Switch_Args): New table used by gprbuild.
* prj-conf.adb (Check_Builder_Switches): Check for switches
--config= (Get_Db_Switches): New procedure to get the --db
switches so that they are used when invoking gprconfig in
auto-configuration.
(Do_Autoconf): When invoking gprconfig, use the --db switches, if any.
2013-01-04 Pascal Obry <obry@adacore.com>
* prj-nmsc.adb: Minor reformatting.
......
......@@ -6712,8 +6712,8 @@ package body Exp_Util is
or else Nkind (N) = N_Selected_Component
then
return Within_In_Parameter (Prefix (N));
else
else
return False;
end if;
end Within_In_Parameter;
......@@ -6743,7 +6743,10 @@ package body Exp_Util is
return;
end if;
-- All this must not have any checks
-- The remaining procesaing is done with all checks suppressed
-- Note: from now on, don't use return statements, instead do a goto
-- Leave, to ensure that we properly restore Scope_Suppress.Suppress.
Scope_Suppress.Suppress := (others => True);
......@@ -6809,8 +6812,7 @@ package body Exp_Util is
and then Nkind (Expression (Exp)) = N_Explicit_Dereference
then
Remove_Side_Effects (Expression (Exp), Name_Req, Variable_Ref);
Scope_Suppress := Svg_Suppress;
return;
goto Leave;
-- If this is a type conversion, leave the type conversion and remove
-- the side effects in the expression. This is important in several
......@@ -6820,8 +6822,7 @@ package body Exp_Util is
elsif Nkind (Exp) = N_Type_Conversion then
Remove_Side_Effects (Expression (Exp), Name_Req, Variable_Ref);
Scope_Suppress := Svg_Suppress;
return;
goto Leave;
-- If this is an unchecked conversion that Gigi can't handle, make
-- a copy or a use a renaming to capture the value.
......@@ -6935,7 +6936,7 @@ package body Exp_Util is
if Alfa_Mode
and then Nkind (Parent (Exp)) = N_Object_Declaration
then
return;
goto Leave;
end if;
-- Special processing for function calls that return a limited type.
......@@ -6965,7 +6966,7 @@ package body Exp_Util is
Insert_Action (Exp, Decl);
Set_Etype (Obj, Exp_Type);
Rewrite (Exp, New_Occurrence_Of (Obj, Loc));
return;
goto Leave;
end;
end if;
......@@ -7064,6 +7065,8 @@ package body Exp_Util is
Rewrite (Exp, Res);
Analyze_And_Resolve (Exp, Exp_Type);
<<Leave>>
Scope_Suppress := Svg_Suppress;
end Remove_Side_Effects;
......
......@@ -82,6 +82,15 @@ package Makeutl is
Load_Standard_Base : Boolean := True;
-- False when gprbuild is called with --db-
package Db_Switch_Args is new Table.Table
(Table_Component_Type => Name_Id,
Table_Index_Type => Integer,
Table_Low_Bound => 1,
Table_Initial => 200,
Table_Increment => 100,
Table_Name => "Makegpr.Db_Switch_Args");
-- Table of all the arguments of --db switches of gprbuild
package Directories is new Table.Table
(Table_Component_Type => Path_Name_Type,
Table_Index_Type => Integer,
......
......@@ -9474,8 +9474,8 @@ package body Sem_Res is
and then abs (Realval (Rop)) < Delta_Value (Standard_Duration)
then
Error_Msg_N
("??universal real operand can only " &
"be interpreted as Duration!", Rop);
("??universal real operand can only "
& "be interpreted as Duration!", Rop);
Error_Msg_N
("\??precision will be lost in the conversion!", Rop);
end if;
......@@ -9556,11 +9556,6 @@ package body Sem_Res is
and then not Is_Generic_Type (Root_Type (Target_Typ))
and then Target_Typ /= Universal_Fixed
and then Operand_Typ /= Universal_Fixed
-- Also skip type conversion checks in formal verification mode, as
-- the formal verification backend deals directly with these checks.
and then not Alfa_Mode
then
Apply_Type_Conversion_Checks (N);
end if;
......
......@@ -202,6 +202,11 @@ begin
Write_Switch_Char ("ef");
Write_Line ("Full source path in brief error messages");
-- Line for -gnateF switch
Write_Switch_Char ("eF");
Write_Line ("Check overflow on predefined Float types");
-- Line for -gnateG switch
Write_Switch_Char ("eG");
......
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