[warning control] New #pragma GCC diagnostic
Gabriel Dos Reis
gdr@cs.tamu.edu
Tue Jan 17 05:44:00 GMT 2006
DJ Delorie <dj@redhat.com> writes:
| This is the second part of what I've talked about; this patch requires
| my previous diagnostic patch.
|
| Note that this implementation is simplistic. It requires the user
| take care to place the pragmas before anything that might generate the
| related warnings. The syntax, however, allows for the diagnostic
| machinery to, in the future, keep track of the state of the diagnostic
| flags for each line and manage the diagnostics based on the reported
| line number.
I've already commented that that machinery is encouraging anarchic
code development, but I'll comment in the hope of limiting damages :-)
The pragma handler should check that the directive indeed appears at
non-local scope and diagnose the improper use, instead of deferring to
daemons flying out of nose :-)
-- Gaby
More information about the Gcc-patches
mailing list