Commit 3996951a by Thomas Quinot Committed by Arnaud Charlet

sem_eval.adb: Minor reformatting

2009-04-10  Thomas Quinot  <quinot@adacore.com>

	* sem_eval.adb: Minor reformatting

From-SVN: r145894
parent b62a90f2
2009-04-10 Thomas Quinot <quinot@adacore.com> 2009-04-10 Thomas Quinot <quinot@adacore.com>
* sem_eval.adb: Minor reformatting
2009-04-10 Thomas Quinot <quinot@adacore.com>
* snames.h, snames.ads, snames.adb: Remove files, now generated from * snames.h, snames.ads, snames.adb: Remove files, now generated from
templates. templates.
...@@ -1489,8 +1489,8 @@ package body Sem_Eval is ...@@ -1489,8 +1489,8 @@ package body Sem_Eval is
-- Eval_Concatenation -- -- Eval_Concatenation --
------------------------ ------------------------
-- Concatenation is a static function, so the result is static if -- Concatenation is a static function, so the result is static if both
-- both operands are static (RM 4.9(7), 4.9(21)). -- operands are static (RM 4.9(7), 4.9(21)).
procedure Eval_Concatenation (N : Node_Id) is procedure Eval_Concatenation (N : Node_Id) is
Left : constant Node_Id := Left_Opnd (N); Left : constant Node_Id := Left_Opnd (N);
...@@ -1500,8 +1500,8 @@ package body Sem_Eval is ...@@ -1500,8 +1500,8 @@ package body Sem_Eval is
Fold : Boolean; Fold : Boolean;
begin begin
-- Concatenation is never static in Ada 83, so if Ada 83 -- Concatenation is never static in Ada 83, so if Ada 83 check operand
-- check operand non-static context -- non-static context.
if Ada_Version = Ada_83 if Ada_Version = Ada_83
and then Comes_From_Source (N) and then Comes_From_Source (N)
...@@ -1520,20 +1520,16 @@ package body Sem_Eval is ...@@ -1520,20 +1520,16 @@ package body Sem_Eval is
Test_Expression_Is_Foldable (N, Left, Right, Stat, Fold); Test_Expression_Is_Foldable (N, Left, Right, Stat, Fold);
if Is_Standard_Character_Type (C_Typ) if not (Is_Standard_Character_Type (C_Typ) and then Fold) then
and then Fold
then
null;
else
Set_Is_Static_Expression (N, False); Set_Is_Static_Expression (N, False);
return; return;
end if; end if;
-- Compile time string concatenation -- Compile time string concatenation
-- ??? Note that operands that are aggregates can be marked as -- ??? Note that operands that are aggregates can be marked as static,
-- static, so we should attempt at a later stage to fold -- so we should attempt at a later stage to fold concatenations with
-- concatenations with such aggregates. -- such aggregates.
declare declare
Left_Str : constant Node_Id := Get_String_Val (Left); Left_Str : constant Node_Id := Get_String_Val (Left);
......
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