From owner-freebsd-hackers Mon Aug 27 12:48:16 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from mail.rpi.edu (mail.rpi.edu [128.113.22.40]) by hub.freebsd.org (Postfix) with ESMTP id EDC0737B407 for ; Mon, 27 Aug 2001 12:48:13 -0700 (PDT) (envelope-from drosih@rpi.edu) Received: from [128.113.24.47] (gilead.acs.rpi.edu [128.113.24.47]) by mail.rpi.edu (8.11.3/8.11.3) with ESMTP id f7RJmAs12568; Mon, 27 Aug 2001 15:48:10 -0400 Mime-Version: 1.0 X-Sender: drosih@mail.rpi.edu Message-Id: In-Reply-To: <20010827134752.G81307@elvis.mu.org> References: <5FE9B713CCCDD311A03400508B8B30130828F33F@bdr-xcln.corp.matchlogic.com> <20010827134752.G81307@elvis.mu.org> Date: Mon, 27 Aug 2001 15:48:07 -0400 To: Alfred Perlstein , Charles Randall From: Garance A Drosihn Subject: Re: Portability of #warning in /usr/include Cc: Content-Type: text/plain; charset="us-ascii" ; format="flowed" 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 At 1:47 PM -0500 8/27/01, Alfred Perlstein wrote: >* Charles Randall [010827 12:44] wrote: >> I've noted that several include files in /usr/include use the C preprocessor >> #warning directive. This isn't standard C and prevents some software from >> compiling using a compiler like TenDRA. What's the current opinion on this? > >My opinion is that #warning should be standardized, however since it's >not, diffs to surround them with #ifdef __GNU_C__ (or whatever it is) >will probably be committed. This may not work. I know I had some problem with #warn and #warning with some code I was working on, where some C compilers would only recognize one and other C compilers would only recognize the other. Some of those compilers would NOT let you '#ifdef' out the version that it did not recognize (perhaps thinking that '#warn' or '#warning' might be some gross typo for '#else' or '#endif', I guess...). -- Garance Alistair Drosehn = gad@eclipse.acs.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-hackers" in the body of the message