From owner-freebsd-hackers Fri Aug 7 07:07:24 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id HAA09214 for freebsd-hackers-outgoing; Fri, 7 Aug 1998 07:07:24 -0700 (PDT) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from elvis.vnet.net (elvis.vnet.net [166.82.1.5]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id HAA09201 for ; Fri, 7 Aug 1998 07:07:17 -0700 (PDT) (envelope-from rivers@dignus.com) Received: from dignus.com (ponds.vnet.net [166.82.177.48]) by elvis.vnet.net (8.8.8/8.8.4) with ESMTP id KAA12102; Fri, 7 Aug 1998 10:06:53 -0400 (EDT) Received: from lakes.dignus.com (lakes [10.0.0.3]) by dignus.com (8.8.8/8.8.5) with ESMTP id KAA07454; Fri, 7 Aug 1998 10:40:34 -0400 (EDT) Received: (from rivers@localhost) by lakes.dignus.com (8.8.8/8.6.9) id KAA23820; Fri, 7 Aug 1998 10:11:00 -0400 (EDT) Date: Fri, 7 Aug 1998 10:11:00 -0400 (EDT) From: Thomas David Rivers Message-Id: <199808071411.KAA23820@lakes.dignus.com> To: jdp@polstra.com, tlambert@primenet.com Subject: Re: C and static initialization with unions Cc: hackers@FreeBSD.ORG, Nicolas.Souchu@prism.uvsq.fr In-Reply-To: <199808070136.SAA24978@usr06.primenet.com> 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 Let me add to this discussion my (now somewhat tired) song regarding compiling older pre-ANSI software. It's very nice that we can 'turn off' "const", "volatile", prototypes in the header files; just for this purpose... Every now-and-then, a stray "const" seems to slip into the headers; which breaks some of my older software... - Dave Rivers - To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message