Path: csiph.com!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news.iecc.com!.POSTED.news.iecc.com!nerds-end From: BartC Newsgroups: comp.compilers Subject: Re: Alternative C compilers on x86_64 Linux? Date: Mon, 5 Sep 2016 13:19:12 +0100 Organization: A noiseless patient Spider Lines: 26 Sender: news@iecc.com Approved: comp.compilers@iecc.com Message-ID: <16-09-005@comp.compilers> References: <16-09-001@comp.compilers> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: miucha.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970"; logging-data="39865"; mail-complaints-to="abuse@iecc.com" Keywords: C Posted-Date: 05 Sep 2016 21:12:21 EDT X-submission-address: compilers@iecc.com X-moderator-address: compilers-request@iecc.com X-FAQ-and-archives: http://compilers.iecc.com Xref: csiph.com comp.compilers:1744 On 02/09/2016 04:01, Aharon Robbins wrote: > TinyCC is blindingly fast, and can compile gawk, but is broken in that > it won't diagnose duplicate case statements inside switch. The developers > don't consider this a problem. So I refuse to use it. > > In short, I'm looking for a faster compiler that actually works. I'm quite impressed with Tiny CC. I'd considered it a toy compiler that could only compile a small subset of the language until I actually tried it. And yes, on my Win64 version, it does seem to ignore duplicate 'case' labels. But TCC does have problem with compiling switch statements; although the code it generates isn't that great anyway, that for switches is slower. I suspect it just compiles switch as an if-else chain. Which might explain why duplicate case labels are ignored if that conversion is done at at early stage. (Because a duplicate condition in an if-else chain is fine. For a jump-table of course, a duplicate label is ambiguous so can't be allowed.) -- Bartc