Date: Sat, 8 Mar 2003 14:41:41 -0500 From: Garance A Drosihn <drosih@rpi.edu> To: Marcel Moolenaar <marcel@xcllnt.net>, Garrett Wollman <wollman@lcs.mit.edu> Cc: Craig Rodrigues <rodrigc@attbi.com>, freebsd-current@FreeBSD.ORG Subject: Re: #warning must be protected by #if __GNUC__ in headers? Message-ID: <p05200f14ba8ff6b51c12@[128.113.24.47]> In-Reply-To: <p05200f12ba8ff3f9780e@[128.113.24.47]> References: <20030308161943.GA54921@attbi.com> <200303081728.h28HSDWM039984@khavrinen.lcs.mit.edu> <20030308184834.GC543@dhcp01.pn.xcllnt.net> <p05200f12ba8ff3f9780e@[128.113.24.47]>
next in thread | previous in thread | raw e-mail | index | archive | help
At 2:33 PM -0500 3/8/03, Garance A Drosihn wrote: > >By adding that #warning, you are going to have a compile-time error >on some compilers, whether or not you want it. Hiding it inside of >an #if/#endif will help for some compilers, but not on all of them. Er, I should note that I do like the idea of using #warnings for some things. All I meant to say was that I would not waste my time putting it inside of a #if __GNUC__. GNUC is not the only compiler which understands it, and for some of the compilers which do not understand it, you're still going to get a compile-time error even if it's inside that #if/#endif. By putting it inside #if __GNUC__, you're just confusing things by making it look like the warning itself is *because of* GCC. -- Garance Alistair Drosehn = gad@gilead.netel.rpi.edu Senior Systems Programmer or gad@freebsd.org Rensselaer Polytechnic Institute or drosih@rpi.edu To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?p05200f14ba8ff6b51c12>