aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/ada/ChangeLog9
-rw-r--r--gcc/ada/errout.adb6
-rw-r--r--gcc/ada/par-ch4.adb5
-rw-r--r--gcc/ada/par-ch6.adb3
-rw-r--r--gcc/ada/par-prag.adb4
-rw-r--r--gcc/ada/par-util.adb3
-rw-r--r--gcc/ada/scng.adb10
-rw-r--r--gcc/ada/sem_ch6.adb17
-rw-r--r--gcc/ada/sem_ch8.adb8
-rw-r--r--gcc/ada/sem_prag.adb2
-rw-r--r--gcc/ada/sem_res.adb4
-rw-r--r--gcc/ada/sem_warn.adb16
-rw-r--r--gcc/ada/styleg.adb16
13 files changed, 61 insertions, 42 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 05c34ab..0451387 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -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
diff --git a/gcc/ada/errout.adb b/gcc/ada/errout.adb
index 76d465a..c762be1 100644
--- a/gcc/ada/errout.adb
+++ b/gcc/ada/errout.adb
@@ -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
diff --git a/gcc/ada/par-ch4.adb b/gcc/ada/par-ch4.adb
index 80a566b..af91f16 100644
--- a/gcc/ada/par-ch4.adb
+++ b/gcc/ada/par-ch4.adb
@@ -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;
diff --git a/gcc/ada/par-ch6.adb b/gcc/ada/par-ch6.adb
index 0cf71a7..ea5df6d 100644
--- a/gcc/ada/par-ch6.adb
+++ b/gcc/ada/par-ch6.adb
@@ -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;
diff --git a/gcc/ada/par-prag.adb b/gcc/ada/par-prag.adb
index 7ca2470..eb77f86 100644
--- a/gcc/ada/par-prag.adb
+++ b/gcc/ada/par-prag.adb
@@ -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;
diff --git a/gcc/ada/par-util.adb b/gcc/ada/par-util.adb
index 82ffdd0..3672ca8 100644
--- a/gcc/ada/par-util.adb
+++ b/gcc/ada/par-util.adb
@@ -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;
diff --git a/gcc/ada/scng.adb b/gcc/ada/scng.adb
index 914c101..56b1e4c 100644
--- a/gcc/ada/scng.adb
+++ b/gcc/ada/scng.adb
@@ -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;
diff --git a/gcc/ada/sem_ch6.adb b/gcc/ada/sem_ch6.adb
index 1e7bf88..b511287 100644
--- a/gcc/ada/sem_ch6.adb
+++ b/gcc/ada/sem_ch6.adb
@@ -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;
diff --git a/gcc/ada/sem_ch8.adb b/gcc/ada/sem_ch8.adb
index d8cfb4b..8ddefb5 100644
--- a/gcc/ada/sem_ch8.adb
+++ b/gcc/ada/sem_ch8.adb
@@ -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
diff --git a/gcc/ada/sem_prag.adb b/gcc/ada/sem_prag.adb
index 6d12b8f..505fbea 100644
--- a/gcc/ada/sem_prag.adb
+++ b/gcc/ada/sem_prag.adb
@@ -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;
diff --git a/gcc/ada/sem_res.adb b/gcc/ada/sem_res.adb
index 7914e4a..9b285c3 100644
--- a/gcc/ada/sem_res.adb
+++ b/gcc/ada/sem_res.adb
@@ -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;
diff --git a/gcc/ada/sem_warn.adb b/gcc/ada/sem_warn.adb
index 515e727..8132531 100644
--- a/gcc/ada/sem_warn.adb
+++ b/gcc/ada/sem_warn.adb
@@ -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 =>
diff --git a/gcc/ada/styleg.adb b/gcc/ada/styleg.adb
index d3ce9e1..c92231d 100644
--- a/gcc/ada/styleg.adb
+++ b/gcc/ada/styleg.adb
@@ -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;