Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 7 Aug 1998 01:36:31 +0000 (GMT)
From:      Terry Lambert <tlambert@primenet.com>
To:        jdp@polstra.com (John Polstra)
Cc:        Nicolas.Souchu@prism.uvsq.fr, hackers@FreeBSD.ORG
Subject:   Re: C and static initialization with unions
Message-ID:  <199808070136.SAA24978@usr06.primenet.com>
In-Reply-To: <199808061622.JAA26353@austin.polstra.com> from "John Polstra" at Aug 6, 98 09:22:37 am

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
---
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



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