From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/4 Path: news.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: musl 0.7.10 released Date: Wed, 18 May 2011 08:32:54 -0400 Message-ID: <20110518123254.GM277@brightrain.aerifal.cx> References: <20110518014947.GL277@brightrain.aerifal.cx> <20110518114947.GO6142@port70.net> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1305722545 9516 80.91.229.12 (18 May 2011 12:42:25 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 18 May 2011 12:42:25 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-87-gllmg-musl=m.gmane.org@lists.openwall.com Wed May 18 14:42:21 2011 Return-path: Envelope-to: gllmg-musl@lo.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by lo.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1QMg4y-0004OV-Dh for gllmg-musl@lo.gmane.org; Wed, 18 May 2011 14:42:20 +0200 Original-Received: (qmail 24262 invoked by uid 550); 18 May 2011 12:42:19 -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 24254 invoked from network); 18 May 2011 12:42:19 -0000 Content-Disposition: inline In-Reply-To: <20110518114947.GO6142@port70.net> User-Agent: Mutt/1.5.21 (2010-09-15) Xref: news.gmane.org gmane.linux.lib.musl.general:4 Archived-At: On Wed, May 18, 2011 at 01:49:47PM +0200, Szabolcs Nagy wrote: > nice > > i see compiler workaround Yes. Fortunately it's not so ugly and it might even make the code more readable to people not familiat with the intricacies of the C preprocessor. > - pcc preprocessor bug with recursive macro expansion > in WHATSNEW > > have you reported the issue to the pcc developers? No. I was planning to but haven't gotten around to it. If you or someone else would be willing to handle it I'd appreciate it. > or can you show me an example where pcc is incorrect? See src/internal/syscall.h I haven't tried reproducing it with a simpler test case, but the basic issue is that the preprocessor does not suppress recursive macro expansion. The __syscall_cp() macro expands to __syscall_cpN (where N=0..6 depending on the number of arguments), which is another macro which expands to __syscall_cp(...). Per the C standard (since original ANSI C), since this instance of __syscall_cp was generated from expanding the __syscall_cp macro earlier, it's not subject to being expanded as a macro again, but pcc tries to expand it anyway and gets in an infinite loop. Rich