From owner-freebsd-current Mon Mar 10 8: 3:45 2003 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6920737B401; Mon, 10 Mar 2003 08:03:43 -0800 (PST) Received: from stork.mail.pas.earthlink.net (stork.mail.pas.earthlink.net [207.217.120.188]) by mx1.FreeBSD.org (Postfix) with ESMTP id DFB0443F3F; Mon, 10 Mar 2003 08:03:42 -0800 (PST) (envelope-from tlambert2@mindspring.com) Received: from dialup-209.244.104.52.dial1.sanjose1.level3.net ([209.244.104.52] helo=mindspring.com) by stork.mail.pas.earthlink.net with asmtp (SSLv3:RC4-MD5:128) (Exim 3.33 #1) id 18sPkV-0001Os-00; Mon, 10 Mar 2003 08:03:36 -0800 Message-ID: <3E6CB703.98FD0A2E@mindspring.com> Date: Mon, 10 Mar 2003 08:02:11 -0800 From: Terry Lambert X-Mailer: Mozilla 4.79 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: Craig Rodrigues Cc: freebsd-hackers@freebsd.org, freebsd-current@freebsd.org Subject: Re: #warning must be protected by #if __GNUC__ in headers? References: <20030308161943.GA54921@attbi.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-ELNK-Trace: b1a02af9316fbb217a47c185c03b154d40683398e744b8a41313399b37b9e09ee7a6b564a7512eed350badd9bab72f9c350badd9bab72f9c350badd9bab72f9c Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Craig Rodrigues wrote: > 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? Yes. It is a preprocessor directive specific the GCC preprocessor. This was discussed in great detail about a month ago, when the people trying to get TenDRA to compile FreeBSD discovered to their horror that TenDRA's preprocessor incorrectly assigns meaning to code that's #if'ed out, and blew chunks on the #warning, when it should have ignored it. > Some other header files check for __GNUC__ before using #warning, > such as , but does not. is wrong. Please see the original discussion for more details. -- Terry To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message