diff options
author | Robert Dewar <dewar@adacore.com> | 2014-02-24 17:13:34 +0000 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2014-02-24 18:13:34 +0100 |
commit | f34b5d88f05e8908d717355339bbded72d7c18d5 (patch) | |
tree | 70832e0c0a55635b5e21af2b4975858632902e52 /gcc/ada | |
parent | 2dade09735a63a5bd57e353bc02d99b2991aa441 (diff) | |
download | gcc-f34b5d88f05e8908d717355339bbded72d7c18d5.zip gcc-f34b5d88f05e8908d717355339bbded72d7c18d5.tar.gz gcc-f34b5d88f05e8908d717355339bbded72d7c18d5.tar.bz2 |
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
Diffstat (limited to 'gcc/ada')
-rw-r--r-- | gcc/ada/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/ada/atree.adb | 9 | ||||
-rw-r--r-- | gcc/ada/atree.ads | 17 | ||||
-rw-r--r-- | gcc/ada/freeze.adb | 3 | ||||
-rw-r--r-- | gcc/ada/g-sercom-linux.adb | 20 | ||||
-rw-r--r-- | gcc/ada/g-sercom-mingw.adb | 15 | ||||
-rw-r--r-- | gcc/ada/sem_prag.adb | 3 |
7 files changed, 42 insertions, 30 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index be02a0e..b4ee208 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -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> * sem_ch6.adb (Analyze_Subprogram_Body_Contract): Do not enforce diff --git a/gcc/ada/atree.adb b/gcc/ada/atree.adb index 1e4e251..1951773 100644 --- a/gcc/ada/atree.adb +++ b/gcc/ada/atree.adb @@ -772,8 +772,7 @@ package body Atree is -- Copy_Separate_Tree -- ------------------------ - function Copy_Separate_Tree (Source : Node_Id) return Node_Id - is + function Copy_Separate_Tree (Source : Node_Id) return Node_Id is New_Id : Node_Id; function Copy_Entity (E : Entity_Id) return Entity_Id; @@ -794,7 +793,7 @@ package body Atree is New_Ent : Entity_Id; begin - -- Build appropriate node. + -- Build appropriate node case N_Entity (Nkind (E)) is when N_Defining_Identifier => @@ -902,8 +901,8 @@ package body Atree is Set_Entity (New_Id, Empty); end if; - -- Reset all Etype fields and Analyzed flags, because tree may - -- have been partly analyzed. + -- Reset all Etype fields and Analyzed flags, because input tree may + -- have been fully or partially analyzed. if Nkind (New_Id) in N_Has_Etype then Set_Etype (New_Id, Empty); diff --git a/gcc/ada/atree.ads b/gcc/ada/atree.ads index ee2ecde..de6fd2e8 100644 --- a/gcc/ada/atree.ads +++ b/gcc/ada/atree.ads @@ -501,14 +501,17 @@ package Atree is -- 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 -- 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 - -- 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 - -- source is already analyzed, entity fields in the copy are zeroed out, - -- as well as Etype fields and the Analyzed flag. + -- but has new entities with the same name. + -- + -- Most of the time this routine 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 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 - -- parser form (where they are Selected_Components), so that renalysis does - -- the right thing. + -- parser form (where they are Selected_Components), so that reanalysis + -- does the right thing. function Copy_Separate_List (Source : List_Id) return List_Id; -- Applies Copy_Separate_Tree to each element of the Source list, returning diff --git a/gcc/ada/freeze.adb b/gcc/ada/freeze.adb index 9fdc021..789aa66 100644 --- a/gcc/ada/freeze.adb +++ b/gcc/ada/freeze.adb @@ -3426,7 +3426,8 @@ package body Freeze is -- Note on calls to Copy_Separate_Tree. The trees we are copying -- here are fully analyzed, but we definitely want fully syntactic -- 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 diff --git a/gcc/ada/g-sercom-linux.adb b/gcc/ada/g-sercom-linux.adb index a3d866a..7a56382 100644 --- a/gcc/ada/g-sercom-linux.adb +++ b/gcc/ada/g-sercom-linux.adb @@ -220,23 +220,23 @@ package body GNAT.Serial_Communications is -- Change settings now - Current.c_cflag := C_Data_Rate (Rate) - or C_Bits (Bits) - or C_Stop_Bits (Stop_Bits) - or C_Parity (Parity) - or CREAD; - Current.c_iflag := 0; - Current.c_lflag := 0; - Current.c_oflag := 0; + Current.c_cflag := C_Data_Rate (Rate) + or C_Bits (Bits) + or C_Stop_Bits (Stop_Bits) + or C_Parity (Parity) + or CREAD; + Current.c_iflag := 0; + Current.c_lflag := 0; + Current.c_oflag := 0; if Local then Current.c_cflag := Current.c_cflag or CLOCAL; end if; case Flow is - when None => + when None => null; - when RTS_CTS => + when RTS_CTS => Current.c_cflag := Current.c_cflag or CRTSCTS; when Xon_Xoff => Current.c_iflag := Current.c_iflag or IXON; diff --git a/gcc/ada/g-sercom-mingw.adb b/gcc/ada/g-sercom-mingw.adb index 700665f..0144c23 100644 --- a/gcc/ada/g-sercom-mingw.adb +++ b/gcc/ada/g-sercom-mingw.adb @@ -93,10 +93,11 @@ package body GNAT.Serial_Communications is N_Img : constant String := Positive'Image (Number); begin 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 - 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) & ':'); end if; end Name; @@ -234,10 +235,10 @@ package body GNAT.Serial_Communications is Com_Settings.fOutxCtsFlow := 0; end case; - Com_Settings.fAbortOnError := 0; - Com_Settings.ByteSize := BYTE (C_Bits (Bits)); - Com_Settings.Parity := BYTE (C_Parity (Parity)); - Com_Settings.StopBits := BYTE (C_Stop_Bits (Stop_Bits)); + Com_Settings.fAbortOnError := 0; + Com_Settings.ByteSize := BYTE (C_Bits (Bits)); + Com_Settings.Parity := BYTE (C_Parity (Parity)); + Com_Settings.StopBits := BYTE (C_Stop_Bits (Stop_Bits)); Success := SetCommState (HANDLE (Port.H.all), Com_Settings'Access); diff --git a/gcc/ada/sem_prag.adb b/gcc/ada/sem_prag.adb index a4c247d..9f4ce2a 100644 --- a/gcc/ada/sem_prag.adb +++ b/gcc/ada/sem_prag.adb @@ -24403,6 +24403,9 @@ package body Sem_Prag is Next (Assoc); end loop; end if; + + -- Anything else is an error + else Error_Msg_N ("malformed global list", List); end if; |