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: RFC: Named warnings


On Thursday, January 23, 2003, at 05:06  PM, Stan Shebs wrote:

This RFC proposes a uniform system for handling GCC's warnings, based
on the use of names to distinguish every type of warning.  A uniform
system would make every one of GCC's warnings individually
controllable, and enable the use of pragmas and/or attributes to
control warnings within a translation unit.
Good idea!  It's also a necessary step if we ever want to do
more in the way of i18n.

(It would be possible to have warning control pragmas with a push/pop
behavior, but this seems excessive complicated, both to implement and
to use correctly.)
Actually, my experience with other compilers is that this sort of thing
is very important.  EDG has a pragma to turn warnings on and off with
a push and pop mechanism, and I used it heavily in STL headers.  There
were a lot of times when I wanted to turn off a warning in a function
template, but, of course, turning it off for user code, just because a
user happened to include that header, would have been antisocial.  C++
headers have a lot of code in them, and it's important to be able to
control warnings for that code without interfering with warnings in the
headers' clients.

			--Matt


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