Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 7 Aug 1998 10:11:00 -0400 (EDT)
From:      Thomas David Rivers <rivers@dignus.com>
To:        jdp@polstra.com, tlambert@primenet.com
Cc:        hackers@FreeBSD.ORG, Nicolas.Souchu@prism.uvsq.fr
Subject:   Re: C and static initialization with unions
Message-ID:  <199808071411.KAA23820@lakes.dignus.com>
In-Reply-To: <199808070136.SAA24978@usr06.primenet.com>

next in thread | previous in thread | raw e-mail | index | archive | help
> 
> > > 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 <sys/cdefs.h> for some examples of (b).
> 
> This is not quite correct.  The <sys/cdefs.h> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199808071411.KAA23820>