Commit 3d6c3bd7 by Geert Bosch Committed by Arnaud Charlet

cstand.adb: Fix comments.

2011-08-01  Geert Bosch  <bosch@adacore.com>

	* cstand.adb: Fix comments.
	* sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
	count of arguments.

From-SVN: r177024
parent e7d897b8
2011-08-01 Geert Bosch <bosch@adacore.com>
* cstand.adb: Fix comments.
* sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
count of arguments.
2011-08-01 Robert Dewar <dewar@adacore.com> 2011-08-01 Robert Dewar <dewar@adacore.com>
* exp_ch4.adb, sem_cat.adb: Minor reformatting. * exp_ch4.adb, sem_cat.adb: Minor reformatting.
......
...@@ -817,7 +817,7 @@ package body CStand is ...@@ -817,7 +817,7 @@ package body CStand is
Set_Entity (E_Id, Standard_Positive); Set_Entity (E_Id, Standard_Positive);
Set_Etype (E_Id, Standard_Positive); Set_Etype (E_Id, Standard_Positive);
-- Setup entity for Naturalend Create_Standard; -- Setup entity for Natural
Set_Ekind (Standard_Natural, E_Signed_Integer_Subtype); Set_Ekind (Standard_Natural, E_Signed_Integer_Subtype);
Set_Etype (Standard_Natural, Base_Type (Standard_Integer)); Set_Etype (Standard_Natural, Base_Type (Standard_Integer));
...@@ -1833,14 +1833,15 @@ package body CStand is ...@@ -1833,14 +1833,15 @@ package body CStand is
P (" pragma Pack (Wide_Wide_String);"); P (" pragma Pack (Wide_Wide_String);");
Write_Eol; Write_Eol;
-- Here it's OK to use the Duration type of the host compiler since -- We only have one representation each for 32-bit and 64-bit sizes,
-- the implementation of Duration in GNAT is target independent. -- so select the right one based on Duration_32_Bits_On_Target.
if Duration_32_Bits_On_Target then if Duration_32_Bits_On_Target then
P (" type Duration is delta 0.020"); P (" type Duration is delta 0.020");
P (" range -((2 ** 31 - 1) * 0.020) .."); P (" range -((2 ** 31 - 1) * 0.020) ..");
P (" +((2 ** 31 - 1) * 0.020);"); P (" +((2 ** 31 - 1) * 0.020);");
P (" for Duration'Small use 0.020;"); P (" for Duration'Small use 0.020;");
else else
P (" type Duration is delta 0.000000001"); P (" type Duration is delta 0.000000001");
P (" range -((2 ** 63 - 1) * 0.000000001) .."); P (" range -((2 ** 63 - 1) * 0.000000001) ..");
......
...@@ -5678,12 +5678,14 @@ package body Sem_Prag is ...@@ -5678,12 +5678,14 @@ package body Sem_Prag is
-- Preset arguments -- Preset arguments
Arg_Count := 0;
Arg1 := Empty; Arg1 := Empty;
Arg2 := Empty; Arg2 := Empty;
Arg3 := Empty; Arg3 := Empty;
Arg4 := Empty; Arg4 := Empty;
if Present (Pragma_Argument_Associations (N)) then if Present (Pragma_Argument_Associations (N)) then
Arg_Count := List_Length (Pragma_Argument_Associations (N));
Arg1 := First (Pragma_Argument_Associations (N)); Arg1 := First (Pragma_Argument_Associations (N));
if Present (Arg1) then if Present (Arg1) then
...@@ -5699,19 +5701,6 @@ package body Sem_Prag is ...@@ -5699,19 +5701,6 @@ package body Sem_Prag is
end if; end if;
end if; end if;
-- Count number of arguments
declare
Arg_Node : Node_Id;
begin
Arg_Count := 0;
Arg_Node := Arg1;
while Present (Arg_Node) loop
Arg_Count := Arg_Count + 1;
Next (Arg_Node);
end loop;
end;
-- An enumeration type defines the pragmas that are supported by the -- An enumeration type defines the pragmas that are supported by the
-- implementation. Get_Pragma_Id (in package Prag) transforms a name -- implementation. Get_Pragma_Id (in package Prag) transforms a name
-- into the corresponding enumeration value for the following case. -- into the corresponding enumeration value for the following case.
......
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