Date: Sat, 8 Mar 2003 10:32:55 -0800 From: Marcel Moolenaar <marcel@xcllnt.net> To: Craig Rodrigues <rodrigc@attbi.com> Cc: freebsd-hackers@FreeBSD.ORG, freebsd-current@FreeBSD.ORG Subject: Re: #warning must be protected by #if __GNUC__ in headers? Message-ID: <20030308183255.GB543@dhcp01.pn.xcllnt.net> In-Reply-To: <20030308161943.GA54921@attbi.com> References: <20030308161943.GA54921@attbi.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Mar 08, 2003 at 11:19:43AM -0500, Craig Rodrigues wrote: > Hi, > > In <sys/syslimits.h>, I see: > > #if __GNUC__ > #warning "No user-serviceable parts inside." > #endif > > > Does the use of #warning need to be protected by > #if __GNUC__ in FreeBSD header files? I am working > on something similar for <machine/limits.h>. I think the use of #warning should be protected against abuse :-) In general I probably would opt to not protect it with #if __GNUC__ because #warning is not specific to gcc and since we're only compiling with gcc (officially) it's better to have it fail when somebody does use a different compiler. I think the discussion that it will trigger will yield a less gratuitous convention. Possibly documented. YMMV. -- Marcel Moolenaar USPA: A-39004 marcel@xcllnt.net 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?20030308183255.GB543>