g-sercom-mingw.adb, [...]: Minor reformatting.

2014-02-24  Robert Dewar  <dewar@adacore.com>

	* g-sercom-mingw.adb, g-sercom-linux.adb, sem_prag.adb, freeze.adb,
	atree.adb, atree.ads: Minor reformatting.

From-SVN: r208088
This commit is contained in:
Robert Dewar 2014-02-24 17:13:34 +00:00 committed by Arnaud Charlet
parent 2dade09735
commit f34b5d88f0
7 changed files with 42 additions and 30 deletions

View file

@ -1,3 +1,8 @@
2014-02-24 Robert Dewar <dewar@adacore.com>
* g-sercom-mingw.adb, g-sercom-linux.adb, sem_prag.adb, freeze.adb,
atree.adb, atree.ads: Minor reformatting.
2014-02-24 Hristian Kirtchev <kirtchev@adacore.com> 2014-02-24 Hristian Kirtchev <kirtchev@adacore.com>
* sem_ch6.adb (Analyze_Subprogram_Body_Contract): Do not enforce * sem_ch6.adb (Analyze_Subprogram_Body_Contract): Do not enforce

View file

@ -772,8 +772,7 @@ package body Atree is
-- Copy_Separate_Tree -- -- Copy_Separate_Tree --
------------------------ ------------------------
function Copy_Separate_Tree (Source : Node_Id) return Node_Id function Copy_Separate_Tree (Source : Node_Id) return Node_Id is
is
New_Id : Node_Id; New_Id : Node_Id;
function Copy_Entity (E : Entity_Id) return Entity_Id; function Copy_Entity (E : Entity_Id) return Entity_Id;
@ -794,7 +793,7 @@ package body Atree is
New_Ent : Entity_Id; New_Ent : Entity_Id;
begin begin
-- Build appropriate node. -- Build appropriate node
case N_Entity (Nkind (E)) is case N_Entity (Nkind (E)) is
when N_Defining_Identifier => when N_Defining_Identifier =>
@ -902,8 +901,8 @@ package body Atree is
Set_Entity (New_Id, Empty); Set_Entity (New_Id, Empty);
end if; end if;
-- Reset all Etype fields and Analyzed flags, because tree may -- Reset all Etype fields and Analyzed flags, because input tree may
-- have been partly analyzed. -- have been fully or partially analyzed.
if Nkind (New_Id) in N_Has_Etype then if Nkind (New_Id) in N_Has_Etype then
Set_Etype (New_Id, Empty); Set_Etype (New_Id, Empty);

View file

@ -501,14 +501,17 @@ package Atree is
-- a copied node by the parent field are also copied.) The parent pointers -- a copied node by the parent field are also copied.) The parent pointers
-- in the copy are properly set. Copy_Separate_Tree (Empty/Error) returns -- in the copy are properly set. Copy_Separate_Tree (Empty/Error) returns
-- Empty/Error. The new subtree does not share entities with the source, -- Empty/Error. The new subtree does not share entities with the source,
-- but has new entities with the same name. Most of the time this routine -- but has new entities with the same name.
-- is called on an unanalyzed tree, and no semantic information is copied. --
-- However, to ensure that no entities are shared between the two when the -- Most of the time this routine is called on an unanalyzed tree, and no
-- source is already analyzed, entity fields in the copy are zeroed out, -- semantic information is copied. However, to ensure that no entities
-- as well as Etype fields and the Analyzed flag. -- are shared between the two when the source is already analyzed, and
-- that the result looks like an unanalyzed tree from the parser, Entity
-- fields and Etype fields are set to Empty, and Analyzed flags set False.
--
-- In addition, Expanded_Name nodes are converted back into the original -- In addition, Expanded_Name nodes are converted back into the original
-- parser form (where they are Selected_Components), so that renalysis does -- parser form (where they are Selected_Components), so that reanalysis
-- the right thing. -- does the right thing.
function Copy_Separate_List (Source : List_Id) return List_Id; function Copy_Separate_List (Source : List_Id) return List_Id;
-- Applies Copy_Separate_Tree to each element of the Source list, returning -- Applies Copy_Separate_Tree to each element of the Source list, returning

View file

@ -3426,7 +3426,8 @@ package body Freeze is
-- Note on calls to Copy_Separate_Tree. The trees we are copying -- Note on calls to Copy_Separate_Tree. The trees we are copying
-- here are fully analyzed, but we definitely want fully syntactic -- here are fully analyzed, but we definitely want fully syntactic
-- unanalyzed trees in the body we construct, so that the analysis -- unanalyzed trees in the body we construct, so that the analysis
-- generates the right visibility. -- generates the right visibility, and that is exactly what the
-- calls to Copy_Separate_Tree give us.
-- Acquire copy of Inline pragma -- Acquire copy of Inline pragma

View file

@ -220,23 +220,23 @@ package body GNAT.Serial_Communications is
-- Change settings now -- Change settings now
Current.c_cflag := C_Data_Rate (Rate) Current.c_cflag := C_Data_Rate (Rate)
or C_Bits (Bits) or C_Bits (Bits)
or C_Stop_Bits (Stop_Bits) or C_Stop_Bits (Stop_Bits)
or C_Parity (Parity) or C_Parity (Parity)
or CREAD; or CREAD;
Current.c_iflag := 0; Current.c_iflag := 0;
Current.c_lflag := 0; Current.c_lflag := 0;
Current.c_oflag := 0; Current.c_oflag := 0;
if Local then if Local then
Current.c_cflag := Current.c_cflag or CLOCAL; Current.c_cflag := Current.c_cflag or CLOCAL;
end if; end if;
case Flow is case Flow is
when None => when None =>
null; null;
when RTS_CTS => when RTS_CTS =>
Current.c_cflag := Current.c_cflag or CRTSCTS; Current.c_cflag := Current.c_cflag or CRTSCTS;
when Xon_Xoff => when Xon_Xoff =>
Current.c_iflag := Current.c_iflag or IXON; Current.c_iflag := Current.c_iflag or IXON;

View file

@ -93,10 +93,11 @@ package body GNAT.Serial_Communications is
N_Img : constant String := Positive'Image (Number); N_Img : constant String := Positive'Image (Number);
begin begin
if Number > 9 then if Number > 9 then
return Port_Name ("\\.\COM" & N_Img (N_Img'First + 1 .. N_Img'Last)); return
Port_Name ("\\.\COM" & N_Img (N_Img'First + 1 .. N_Img'Last));
else else
return Port_Name return
("COM" & N_Img (N_Img'First + 1 .. N_Img'Last) & ':'); Port_Name ("COM" & N_Img (N_Img'First + 1 .. N_Img'Last) & ':');
end if; end if;
end Name; end Name;
@ -234,10 +235,10 @@ package body GNAT.Serial_Communications is
Com_Settings.fOutxCtsFlow := 0; Com_Settings.fOutxCtsFlow := 0;
end case; end case;
Com_Settings.fAbortOnError := 0; Com_Settings.fAbortOnError := 0;
Com_Settings.ByteSize := BYTE (C_Bits (Bits)); Com_Settings.ByteSize := BYTE (C_Bits (Bits));
Com_Settings.Parity := BYTE (C_Parity (Parity)); Com_Settings.Parity := BYTE (C_Parity (Parity));
Com_Settings.StopBits := BYTE (C_Stop_Bits (Stop_Bits)); Com_Settings.StopBits := BYTE (C_Stop_Bits (Stop_Bits));
Success := SetCommState (HANDLE (Port.H.all), Com_Settings'Access); Success := SetCommState (HANDLE (Port.H.all), Com_Settings'Access);

View file

@ -24403,6 +24403,9 @@ package body Sem_Prag is
Next (Assoc); Next (Assoc);
end loop; end loop;
end if; end if;
-- Anything else is an error
else else
Error_Msg_N ("malformed global list", List); Error_Msg_N ("malformed global list", List);
end if; end if;