This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Suppressing specific compiler warnings
- From: Stan Shebs <shebs at apple dot com>
- To: Robert Dewar <dewar at gnat dot com>
- Cc: Banibrata Dutta <dutta at india dot hp dot com>, gcc at gcc dot gnu dot org, llewelly at xmission dot com, "'Ranjit Mathew'" <rmathew at gmail dot com>
- Date: Thu, 27 May 2004 11:28:27 -0700
- Subject: Re: Suppressing specific compiler warnings
- References: <004501c443a6$73d6ddf0$c0714c0f@nt13192> <40B59E77.8010008@gnat.com>
Robert Dewar wrote:
One general and significant drawback of these complex schemes
for naming or numbering warnings is that they make it
significantly more work to introduce new warnings, and that
is an unfortunate scenario.
Part of my proposal of a year ago was to have the name be supplied
as part of the warning, so you'd say something like
if (...)
WARN(unbuttoned_fly, "your fly is unbuttoned");
where WARN is a macro that would expand into
"if (warn_unbuttoned_fly) warn (...);" etc.
Whatever the details of the scheme, the mass of warning control
infrastructure should be auto-constructed.
Stan