This is the mail archive of the gcc@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]

Re: Suppressing specific compiler warnings


> Another warnings should be listen to and have the source fixed
> instead of just disabled the warnings.

As has been brought up many times before in the past, there are some
warnings where the programmer really does know what they're doing and
there is no feasible way to avoid the construct.  Combine this with
corporate policies of building with warnings enabled and you can see
why it would be useful for the programmer to say "I know about this
warning for this source line, ignore it, and here's why."

DJGPP's libc, for example, builds with most warnings enabled - by
policy.  We have to jump through hoops to unconstify pointers in cases
where the API spec requires it, which is a pain we've hidden behind a
macro.  I'd like to enable more warnings, but I can't macro-hide them
in the few cases where we can't work around them.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]