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: Anything like #pragma warn "my message" in GCC?


For GCC (at least, GCC 3.3.1):

#warning "This is a warning"

#error "This is an error"

I'm not 100% sure, but I think #warning is an extension. And #error is in the standard.

For an "info" you may want to use this convention:

#warning "INFO: this is informative"

HTH,
--Eljay


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