This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
| Other format: | [Raw text] | |
Tested on i686-linux, committed on trunk
The warning messages from -gnatwl in static elaboration mode
can be misread to understand that they are recommending you
to add pragmas, instead of simply informing you that this is
the case. A new style of message preceded by info: is introduced
and used for this purpose.
with gnatwl_pkg; use gnatwl_pkg;
package gnatwl is
X : Integer := F;
end;
package gnatwl_pkg is
function f return Integer;
end;
gnatwl.ads:3:19: info: call to "f" during elaboration
gnatwl.ads:3:19: info: implicit pragma Elaborate_All
for "gnatwl_pkg" generated
Also, allow multiple * in pragma warnings off string:
The previous implementation allowed * at the start/end of the
warnings off pattern string. This patch allows * anywhere within
the string.
See gnat.dg/specs/warnstar.ads
2008-04-08 Robert Dewar <dewar@adacore.com>
* errout.ads: Update comments for new handling of info: messages
* erroutc.adb (Matches): New procedure
(Warning_Specifically_Suppressed): Modified to handle multiple * chars
(Is_Style_Or_Info_Msg): New name for Is_Style_Msg, now set for
info messages as well as style messages.
* erroutc.ads: Remove unneeded fields from Specific_Warning_Entry
* sem_elab.adb (Supply_Bodies): Create actual bodies for stubbed
subprograms.
(Check_A_Call): Special "info: " warnings now have ? in the text
(Elab_Warning): Use info message in static case
Attachment:
difs
Description: Text document
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |