This is the mail archive of the gcc-help@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: custom compiler warnings


Antonio Coralles wrote:

Is it possible with gcc-3.3.5 to emit custom compiler warnings when specific functions are called, like: "warning: foo() is deprecated; use bar() instead" ?
thanks,
antonio

not really but you can sign a deprecated function to do a warning


a) void foo();
b) void foo() __attribute__ ((deprecated)) ;

b) is issuing a warning if your programm is calling/referencing it

regards
mws






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