From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/1482 Path: news.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: crypt* files in crypt directory Date: Thu, 9 Aug 2012 03:28:32 -0400 Message-ID: <20120809072832.GQ27715@brightrain.aerifal.cx> References: <20120808022421.GE27715@brightrain.aerifal.cx> <20120808044235.GA22470@openwall.com> <20120808052844.GF27715@brightrain.aerifal.cx> <20120808062706.GA23135@openwall.com> <20120808214855.GL27715@brightrain.aerifal.cx> <20120809033613.GA24926@openwall.com> <20120809151332.5a8f36fe@sibserver.ru> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1344497274 30574 80.91.229.3 (9 Aug 2012 07:27:54 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 9 Aug 2012 07:27:54 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-1483-gllmg-musl=m.gmane.org@lists.openwall.com Thu Aug 09 09:27:54 2012 Return-path: Envelope-to: gllmg-musl@plane.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1SzN9u-00011t-1e for gllmg-musl@plane.gmane.org; Thu, 09 Aug 2012 09:27:54 +0200 Original-Received: (qmail 19591 invoked by uid 550); 9 Aug 2012 07:27:52 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 19583 invoked from network); 9 Aug 2012 07:27:52 -0000 Content-Disposition: inline In-Reply-To: <20120809151332.5a8f36fe@sibserver.ru> User-Agent: Mutt/1.5.21 (2010-09-15) Xref: news.gmane.org gmane.linux.lib.musl.general:1482 Archived-At: 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