custom compiler warnings

Mws mws@twisted-brains.org
Thu Mar 24 21:13:00 GMT 2005


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







More information about the Gcc-help mailing list