Suppressing specific compiler warnings

Stan Shebs shebs@apple.com
Thu May 27 18:28:00 GMT 2004


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





More information about the Gcc mailing list