errout.adb: Minor reformatting
authorRobert Dewar <dewar@adacore.com>
Wed, 6 May 2009 12:53:27 +0000 (12:53 +0000)
committerArnaud Charlet <charlet@gcc.gnu.org>
Wed, 6 May 2009 12:53:27 +0000 (14:53 +0200)
2009-05-06  Robert Dewar  <dewar@adacore.com>

* errout.adb: Minor reformatting

* scng.adb, sem_prag.adb, par-ch4.adb, sem_res.adb, par-ch6.adb,
sem_ch6.adb, par-prag.adb, sem_ch8.adb, sem_warn.adb, par-util.adb,
styleg.adb: Add stylized comments to error messages that are included
in the codefix circuitry of IDE's such as GPS.

From-SVN: r147173

13 files changed:
gcc/ada/ChangeLog
gcc/ada/errout.adb
gcc/ada/par-ch4.adb
gcc/ada/par-ch6.adb
gcc/ada/par-prag.adb
gcc/ada/par-util.adb
gcc/ada/scng.adb
gcc/ada/sem_ch6.adb
gcc/ada/sem_ch8.adb
gcc/ada/sem_prag.adb
gcc/ada/sem_res.adb
gcc/ada/sem_warn.adb
gcc/ada/styleg.adb

index 05c34ab5684c169ae552b34e5aa388a67459a53b..04513875ba37625b7d5ec20faba2c0fdc97ae429 100644 (file)
@@ -1,3 +1,12 @@
+2009-05-06  Robert Dewar  <dewar@adacore.com>
+
+       * errout.adb: Minor reformatting
+
+       * scng.adb, sem_prag.adb, par-ch4.adb, sem_res.adb, par-ch6.adb,
+       sem_ch6.adb, par-prag.adb, sem_ch8.adb, sem_warn.adb, par-util.adb,
+       styleg.adb: Add stylized comments to error messages that are included
+       in the codefix circuitry of IDE's such as GPS.
+
 2009-05-06  Sergey Rybin  <rybin@adacore.com>
 
        * gnat_ugn.texi: For Misnamed_Identifiers rule all description of the
index 76d465a05f3e795ebc84dbc057e30ca1e66167d3..c762be166fcb7a33db45b011bc87ca6b536ec0e3 100644 (file)
@@ -53,9 +53,9 @@ with Uname;    use Uname;
 package body Errout is
 
    Errors_Must_Be_Ignored : Boolean := False;
-   --  Set to True by procedure Set_Ignore_Errors (True), when calls to
-   --  error message procedures should be ignored (when parsing irrelevant
-   --  text in sources being preprocessed).
+   --  Set to True by procedure Set_Ignore_Errors (True), when calls to error
+   --  message procedures should be ignored (when parsing irrelevant text in
+   --  sources being preprocessed).
 
    Finalize_Called : Boolean := False;
    --  Set True if the Finalize routine has been called
index 80a566beb5ce9bfc7cd7c8de9f87256134abab5a..af91f1668d76d116a4e0f624a7b4be74ef481eef 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 B o d y                                  --
 --                                                                          --
---          Copyright (C) 1992-2008, Free Software Foundation, Inc.         --
+--          Copyright (C) 1992-2009, Free Software Foundation, Inc.         --
 --                                                                          --
 -- GNAT is free software;  you can  redistribute it  and/or modify it under --
 -- terms of the  GNU General Public License as published  by the Free Soft- --
@@ -607,7 +607,8 @@ package body Ch4 is
 
          elsif Token = Tok_Range then
             if Expr_Form /= EF_Simple_Name then
-               Error_Msg_SC ("subtype mark must precede RANGE");
+               Error_Msg_SC -- CODEFIX???
+                 ("subtype mark must precede RANGE");
                raise Error_Resync;
             end if;
 
index 0cf71a79e1544d73e920643ba1dc88510fe8b996..ea5df6dfb3b4ed3b8a8a3b43f95733fc795383ea 100644 (file)
@@ -1302,7 +1302,8 @@ package body Ch6 is
       end if;
 
       if Token = Tok_In then
-         Error_Msg_SC ("IN must precede OUT in parameter mode");
+         Error_Msg_SC -- CODEFIX ???
+           ("IN must precede OUT in parameter mode");
          Scan; -- past IN
          Set_In_Present (Node, True);
       end if;
index 7ca247035076dbffbc7e0bc3bb379b4f35a9ca75..eb77f860b4fff07d21740903682efd62fb9c769f 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 B o d y                                  --
 --                                                                          --
---          Copyright (C) 1992-2008, Free Software Foundation, Inc.         --
+--          Copyright (C) 1992-2009, Free Software Foundation, Inc.         --
 --                                                                          --
 -- GNAT is free software;  you can  redistribute it  and/or modify it under --
 -- terms of the  GNU General Public License as published  by the Free Soft- --
@@ -818,7 +818,7 @@ begin
            and then Num_SRef_Pragmas (Current_Source_File) = 0
            and then Operating_Mode /= Check_Syntax
          then
-            Error_Msg
+            Error_Msg -- CODEFIX
               ("first % pragma must be first line of file", Pragma_Sloc);
             raise Error_Resync;
          end if;
index 82ffdd00f1cc5aada5f36773a40d4a3251c4621c..3672ca8145e384aa1db20dabadc0ec5c7569019d 100644 (file)
@@ -163,7 +163,8 @@ package body Util is
       if RM_Column_Check and then Token_Is_At_Start_Of_Line
         and then Start_Column <= Scope.Table (Scope.Last).Ecol
       then
-         Error_Msg_BC ("(style) incorrect layout");
+         Error_Msg_BC -- CODEFIX
+           ("(style) incorrect layout");
       end if;
    end Check_Bad_Layout;
 
index 914c101afdc52198b4f69171b86e6879424cc7ad..56b1e4cc4042e09186a95be6d82fbc0837895312 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 B o d y                                  --
 --                                                                          --
---          Copyright (C) 1992-2008, Free Software Foundation, Inc.         --
+--          Copyright (C) 1992-2009, Free Software Foundation, Inc.         --
 --                                                                          --
 -- GNAT is free software;  you can  redistribute it  and/or modify it under --
 -- terms of the  GNU General Public License as published  by the Free Soft- --
@@ -377,19 +377,19 @@ package body Scng is
 
          if Source (Scan_Ptr) = '_' then
             if Source (Scan_Ptr - 1) = '_' then
-               Error_Msg_S
+               Error_Msg_S -- CODEFIX
                  ("two consecutive underlines not permitted");
             else
-               Error_Msg_S
+               Error_Msg_S -- CODEFIX???
                  ("underline cannot follow punctuation character");
             end if;
 
          else
             if Source (Scan_Ptr - 1) = '_' then
-               Error_Msg_S
+               Error_Msg_S -- CODEFIX???
                  ("punctuation character cannot follow underline");
             else
-               Error_Msg_S
+               Error_Msg_S -- CODEFIX???
                  ("two consecutive punctuation characters not permitted");
             end if;
          end if;
index 1e7bf886d6a17e5b5cea6462edf1382c1490e23e..b51128705ae6ea848347dcd6a4aaa194819251f3 100644 (file)
@@ -3480,36 +3480,36 @@ package body Sem_Ch6 is
 
             case Ctype is
                when Type_Conformant =>
-                  Error_Msg_N
+                  Error_Msg_N -- CODEFIX
                     ("not type conformant with declaration#!", Enode);
 
                when Mode_Conformant =>
                   if Nkind (Parent (Old_Id)) = N_Full_Type_Declaration then
-                     Error_Msg_N
+                     Error_Msg_N -- CODEFIX???
                        ("not mode conformant with operation inherited#!",
                          Enode);
                   else
-                     Error_Msg_N
+                     Error_Msg_N -- CODEFIX???
                        ("not mode conformant with declaration#!", Enode);
                   end if;
 
                when Subtype_Conformant =>
                   if Nkind (Parent (Old_Id)) = N_Full_Type_Declaration then
-                     Error_Msg_N
+                     Error_Msg_N -- CODEFIX???
                        ("not subtype conformant with operation inherited#!",
                          Enode);
                   else
-                     Error_Msg_N
+                     Error_Msg_N -- CODEFIX???
                        ("not subtype conformant with declaration#!", Enode);
                   end if;
 
                when Fully_Conformant =>
                   if Nkind (Parent (Old_Id)) = N_Full_Type_Declaration then
-                     Error_Msg_N
+                     Error_Msg_N -- CODEFIX
                        ("not fully conformant with operation inherited#!",
                          Enode);
                   else
-                     Error_Msg_N
+                     Error_Msg_N -- CODEFIX
                        ("not fully conformant with declaration#!", Enode);
                   end if;
             end case;
@@ -4157,7 +4157,8 @@ package body Sem_Ch6 is
       procedure Conformance_Error (Msg : String; N : Node_Id) is
       begin
          Error_Msg_Sloc := Sloc (Prev_Loc);
-         Error_Msg_N ("not fully conformant with declaration#!", N);
+         Error_Msg_N -- CODEFIX
+           ("not fully conformant with declaration#!", N);
          Error_Msg_NE (Msg, N, N);
       end Conformance_Error;
 
index d8cfb4b00c365efb41fe898fe2128661df576ce0..8ddefb58af054e013e98add6747188ef62f1d5da 100644 (file)
@@ -2581,11 +2581,12 @@ package body Sem_Ch8 is
               and then Etype (Pack) /= Any_Type
             then
                if Ekind (Pack) = E_Generic_Package then
-                  Error_Msg_N
+                  Error_Msg_N  -- CODEFIX
                    ("a generic package is not allowed in a use clause",
                       Pack_Name);
                else
-                  Error_Msg_N ("& is not a usable package", Pack_Name);
+                  Error_Msg_N -- CODEFIX???
+                    ("& is not a usable package", Pack_Name);
                end if;
 
             else
@@ -3781,7 +3782,8 @@ package body Sem_Ch8 is
                   if Is_Hidden (Ent) then
                      Error_Msg_N ("non-visible (private) declaration#!", N);
                   else
-                     Error_Msg_N ("non-visible declaration#!", N);
+                     Error_Msg_N -- CODEFIX
+                       ("non-visible declaration#!", N);
 
                      if Is_Compilation_Unit (Ent)
                        and then
index 6d12b8fe4e752fe915b7ab167283c69d598975e1..505fbea96fe4797b1f716aa4b5638fcc9e885d1a 100644 (file)
@@ -3106,7 +3106,7 @@ package body Sem_Prag is
             Prag_Id = Pragma_Import_Valued_Procedure
          then
             if not Is_Imported (Ent) then
-               Error_Pragma
+               Error_Pragma -- CODEFIX???
                  ("pragma Import or Interface must precede pragma%");
             end if;
 
index 7914e4a06e39db51359ee1bcbd40876662942fa7..9b285c3cde2b099f8abce2d2273cd35fd842e82a 100644 (file)
@@ -1996,7 +1996,7 @@ package body Sem_Res is
                              ("ambiguous expression "
                                & "(cannot resolve indirect call)!", N);
                         else
-                           Error_Msg_NE
+                           Error_Msg_NE -- CODEFIX
                              ("ambiguous expression (cannot resolve&)!",
                               N, It.Nam);
                         end if;
@@ -8288,7 +8288,7 @@ package body Sem_Res is
                      and then Covers (Orig_T, Etype (Entity (Orig_N)))))
          then
             Error_Msg_Node_2 := Orig_T;
-            Error_Msg_NE
+            Error_Msg_NE -- CODEFIX
               ("?redundant conversion, & is of type &!", N, Entity (Orig_N));
          end if;
       end if;
index 515e727bdb8fa49c6e63ed0f036f3626f1a97aa1..8132531cc0ca87cfdeb8b4ec74921e1e897b9543 100644 (file)
@@ -1005,7 +1005,7 @@ package body Sem_Warn is
                           and then not Has_Pragma_Unmodified_Check_Spec (E1)
                         then
                            if not Warnings_Off_E1 then
-                              Error_Msg_N
+                              Error_Msg_N -- CODEFIX
                                 ("?& is not modified, "
                                  & "could be declared constant!",
                                  E1);
@@ -1155,7 +1155,7 @@ package body Sem_Warn is
                      elsif not Has_Unreferenced (E1)
                        and then not Warnings_Off_E1
                      then
-                        Output_Reference_Error
+                        Output_Reference_Error -- CODEFIX
                           ("?variable& is never read and never assigned!");
                      end if;
 
@@ -2342,7 +2342,7 @@ package body Sem_Warn is
                            end if;
 
                            if not Is_Visible_Renaming then
-                              Error_Msg_N
+                              Error_Msg_N -- CODEFIX
                                 ("\?with clause might be moved to body!",
                                  Name (Item));
                            end if;
@@ -2370,7 +2370,7 @@ package body Sem_Warn is
                      if Unit = Spec_Unit then
                         Set_Unreferenced_In_Spec (Item);
                      else
-                        Error_Msg_N
+                        Error_Msg_N -- CODEFIX
                           ("?unit& is never instantiated!", Name (Item));
                      end if;
 
@@ -2381,7 +2381,7 @@ package body Sem_Warn is
                   elsif Unreferenced_In_Spec (Item) then
                      Error_Msg_N
                        ("?unit& is not instantiated in spec!", Name (Item));
-                     Error_Msg_N
+                     Error_Msg_N -- CODEFIX
                        ("\?with clause can be moved to body!", Name (Item));
                   end if;
                end if;
@@ -3782,7 +3782,7 @@ package body Sem_Warn is
                     and then No (Renamed_Object (E))
                   then
                      if not Has_Pragma_Unmodified_Check_Spec (E) then
-                        Error_Msg_N
+                        Error_Msg_N -- CODEFIX
                           ("?variable & is assigned but never read!", E);
                      end if;
 
@@ -3871,11 +3871,11 @@ package body Sem_Warn is
                Error_Msg_N ("?procedure & is not referenced!", E);
 
             when E_Generic_Procedure =>
-               Error_Msg_N
+               Error_Msg_N -- CODEFIX
                  ("?generic procedure & is never instantiated!", E);
 
             when E_Generic_Function  =>
-               Error_Msg_N
+               Error_Msg_N -- CODEFIX
                  ("?generic function & is never instantiated!", E);
 
             when Type_Kind          =>
index d3ce9e101d341b1687d45d7f95f1745c9d62338d..c92231d60b3cd5498c9ce6660b5e1d946629969d 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 B o d y                                  --
 --                                                                          --
---          Copyright (C) 1992-2008, Free Software Foundation, Inc.         --
+--          Copyright (C) 1992-2009, Free Software Foundation, Inc.         --
 --                                                                          --
 -- GNAT is free software;  you can  redistribute it  and/or modify it under --
 -- terms of the  GNU General Public License as published  by the Free Soft- --
@@ -145,7 +145,8 @@ package body Styleg is
    begin
       if Style_Check_Attribute_Casing then
          if Determine_Token_Casing /= Mixed_Case then
-            Error_Msg_SC ("(style) bad capitalization, mixed case required");
+            Error_Msg_SC -- CODEFIX
+              ("(style) bad capitalization, mixed case required");
          end if;
       end if;
    end Check_Attribute_Name;
@@ -379,7 +380,8 @@ package body Styleg is
          if Style_Check_Indentation /= 0 then
             if Start_Column rem Style_Check_Indentation /= 0 then
                if not Same_Column_As_Next_Non_Blank_Line then
-                  Error_Msg_S ("(style) bad column");
+                  Error_Msg_S -- CODEFIX
+                    ("(style) bad column");
                end if;
 
                return;
@@ -656,7 +658,7 @@ package body Styleg is
 
       else
          if Style_Check_Blank_Lines and then Blank_Lines > 1 then
-            Error_Msg
+            Error_Msg -- CODEFIX
               ("(style) multiple blank lines", Blank_Line_Location);
          end if;
 
@@ -720,7 +722,8 @@ package body Styleg is
    begin
       if Style_Check_Pragma_Casing then
          if Determine_Token_Casing /= Mixed_Case then
-            Error_Msg_SC ("(style) bad capitalization, mixed case required");
+            Error_Msg_SC -- CODEFIX
+              ("(style) bad capitalization, mixed case required");
          end if;
       end if;
    end Check_Pragma_Name;
@@ -978,7 +981,8 @@ package body Styleg is
    procedure Non_Lower_Case_Keyword is
    begin
       if Style_Check_Keyword_Casing then
-         Error_Msg_SC ("(style) reserved words must be all lower case");
+         Error_Msg_SC -- CODEIX
+           ("(style) reserved words must be all lower case");
       end if;
    end Non_Lower_Case_Keyword;