From owner-freebsd-hackers Thu Aug 6 18:37:15 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id SAA24929 for freebsd-hackers-outgoing; Thu, 6 Aug 1998 18:37:15 -0700 (PDT) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from smtp01.primenet.com (smtp01.primenet.com [206.165.6.131]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id SAA24888 for ; Thu, 6 Aug 1998 18:36:55 -0700 (PDT) (envelope-from tlambert@usr06.primenet.com) Received: (from daemon@localhost) by smtp01.primenet.com (8.8.8/8.8.8) id SAA02306; Thu, 6 Aug 1998 18:36:39 -0700 (MST) Received: from usr06.primenet.com(206.165.6.206) via SMTP by smtp01.primenet.com, id smtpd002281; Thu Aug 6 18:36:34 1998 Received: (from tlambert@localhost) by usr06.primenet.com (8.8.5/8.8.5) id SAA24978; Thu, 6 Aug 1998 18:36:32 -0700 (MST) From: Terry Lambert Message-Id: <199808070136.SAA24978@usr06.primenet.com> Subject: Re: C and static initialization with unions To: jdp@polstra.com (John Polstra) Date: Fri, 7 Aug 1998 01:36:31 +0000 (GMT) Cc: Nicolas.Souchu@prism.uvsq.fr, hackers@FreeBSD.ORG In-Reply-To: <199808061622.JAA26353@austin.polstra.com> from "John Polstra" at Aug 6, 98 09:22:37 am X-Mailer: ELM [version 2.4 PL25] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > > Is all FreeBSD C source code portable? > > GCC extensions are occasionally used in FreeBSD. However, they > are virtually always optional and for the purpose of (a) better > efficiency, or (b) better compiler warnings. When GCC extensions are > used, they are protected by "#ifdef __GNUC__", and an alternative > portable implementation is provided in the "#else" clause. For case > (a) the alternative implementation is less efficient; for case (b), > it's a no-op. See for some examples of (b). This is not quite correct. The defined __P(), for example, and this appears to have been deprecated despite its ability to ensure portability; which is really bizarre, because "const", "volatile", and __CONCAT() all haven't, and it the same portability barrier that all 4 address (non-ANSI K&R compilers). Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message