Generating custom warning messages.
Andreas Schwab
schwab@issan.informatik.uni-dortmund.de
Mon Oct 12 08:04:00 GMT 1998
Alexandre Oliva <oliva@dcc.unicamp.br> writes:
|> Ben Scherrey <scherrey@gte.net> writes:
|>
|> > What I would like to be able to do is generate a warning message during
|> > compile/link time whenever a deprecated method is called and have it
|> > suggest use of the new one.
|>
|> The easiest way to accomplish that would be to define a new
|> __attribute__ to g++, such as __attribute__((deprecated)), and arrange
|> that it prints a warning message when the method is called. I don't
|> know how easy it would be to implement it, though.
That is already implemented in GNU ld, using the so called "warning
symbols". See the GNU libc for an application.
--
Andreas Schwab "And now for something
schwab@issan.cs.uni-dortmund.de completely different"
schwab@gnu.org
More information about the Gcc
mailing list