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]

Re: Generating custom warning messages.


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


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