This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Generating custom warning messages.
- To: Alexandre Oliva <oliva at dcc dot unicamp dot br>
- Subject: Re: Generating custom warning messages.
- From: Andreas Schwab <schwab at issan dot informatik dot uni-dortmund dot de>
- Date: 12 Oct 1998 15:33:00 +0200
- Cc: scherrey at proteus-tech dot com, egcs at cygnus dot com
- References: <361FD3F2.BF745E9B@gte.net> <oryaqmqw73.fsf@araguaia.dcc.unicamp.br>
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