]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
g-sercom-mingw.adb, [...]: Minor reformatting.
authorRobert Dewar <dewar@adacore.com>
Mon, 24 Feb 2014 17:13:34 +0000 (17:13 +0000)
committerArnaud Charlet <charlet@gcc.gnu.org>
Mon, 24 Feb 2014 17:13:34 +0000 (18:13 +0100)
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

gcc/ada/ChangeLog
gcc/ada/atree.adb
gcc/ada/atree.ads
gcc/ada/freeze.adb
gcc/ada/g-sercom-linux.adb
gcc/ada/g-sercom-mingw.adb
gcc/ada/sem_prag.adb

index be02a0e4d14a58b9a41947942f2d02d418770ade..b4ee2084caf767f2f753bd0303081f051c3034e3 100644 (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>
 
        * sem_ch6.adb (Analyze_Subprogram_Body_Contract): Do not enforce
index 1e4e251b6b576a5b61a3b5400c3bad6f70cdd662..19517734867674d239164a59bd58dea66af97edf 100644 (file)
@@ -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);
index ee2ecde0b36d65337deb6021c674d724c0dbedce..de6fd2e89319f3089534ad4e0f00be86981dd592 100644 (file)
@@ -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
index 9fdc0216eccdf1ba28e02867f2592272632b3ad0..789aa660ddc3396f1f1c3c4c17209528fa17c928 100644 (file)
@@ -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
 
index a3d866a33071f8d5722f24cdc17a617f4421f53e..7a5638262c7eed97a9c7cd6bb3147d5f1a47008f 100644 (file)
@@ -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;
index 700665feed7292765651851bd000a015fb120819..0144c235697f8dfae74e21fd18886bbd3f957127 100644 (file)
@@ -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);
 
index a4c247dfa0f4ff1b648a030f153c6dea3e85dfaf..9f4ce2a72a2b82f1eee006e884159ff58bdb76bf 100644 (file)
@@ -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;