|
|
Message-ID: <20120809072832.GQ27715@brightrain.aerifal.cx>
Date: Thu, 9 Aug 2012 03:28:32 -0400
From: Rich Felker <dalias@...ifal.cx>
To: musl@...ts.openwall.com
Subject: Re: crypt* files in crypt directory
On Thu, Aug 09, 2012 at 03:13:32PM +0800, orc wrote:
>
> > Is use of GNU C extensions (also supported in clang) acceptable? I am
> > thinking of a "Labels as Values" trick to share more code. This would
> > make the source code less readable, though.
> >
> > Alexander
>
> They should be avoided (since the library is not targetting only gcc or
> clang compilers only).
Yes. To clarify, of course musl uses _some_ features outside of plain
C99, mainly for weak symbols, atomic operations, and inline syscalls.
Unless/until we get a "coding standards" document of some sort, the
best description of current practice I can make is that extensions to
the C language are used mostly/entirely for controlling linking and
for interfacing with asm, not for making C into a different high level
language that's a superset of C. In particular, statement expressions
(in the form of ({x;y;z;})), nested functions, computed gotos/labels
as values, and other "GNU C" features that are particularly different
from normal C are not presently used in musl, and I don't have plans
to start using them.
Rich
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.