From owner-freebsd-hackers Sat Mar 8 10:33: 1 2003 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2942637B401; Sat, 8 Mar 2003 10:33:00 -0800 (PST) Received: from ns1.xcllnt.net (209-128-86-226.BAYAREA.NET [209.128.86.226]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3A10843FB1; Sat, 8 Mar 2003 10:32:58 -0800 (PST) (envelope-from marcel@xcllnt.net) Received: from dhcp01.pn.xcllnt.net (dhcp01.pn.xcllnt.net [192.168.4.201]) by ns1.xcllnt.net (8.12.8/8.12.8) with ESMTP id h28IWtSd030043; Sat, 8 Mar 2003 10:32:55 -0800 (PST) (envelope-from marcel@piii.pn.xcllnt.net) Received: from dhcp01.pn.xcllnt.net (localhost [127.0.0.1]) by dhcp01.pn.xcllnt.net (8.12.7/8.12.7) with ESMTP id h28IWt79000622; Sat, 8 Mar 2003 10:32:55 -0800 (PST) (envelope-from marcel@dhcp01.pn.xcllnt.net) Received: (from marcel@localhost) by dhcp01.pn.xcllnt.net (8.12.7/8.12.7/Submit) id h28IWttm000621; Sat, 8 Mar 2003 10:32:55 -0800 (PST) (envelope-from marcel) Date: Sat, 8 Mar 2003 10:32:55 -0800 From: Marcel Moolenaar To: Craig Rodrigues 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> References: <20030308161943.GA54921@attbi.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030308161943.GA54921@attbi.com> User-Agent: Mutt/1.5.3i Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Sat, Mar 08, 2003 at 11:19:43AM -0500, Craig Rodrigues wrote: > Hi, > > In , 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 . 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-hackers" in the body of the message