tinycc-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Tinycc-devel] New fun bug! #include <regex.h>


From: Rob Landley
Subject: Re: [Tinycc-devel] New fun bug! #include <regex.h>
Date: Thu, 20 Sep 2007 21:15:05 -0500
User-agent: KMail/1.9.6

On Thursday 20 September 2007 4:00:33 pm Marc Andre Tanner wrote:
> And since recent tcc sets __STDC_VERSION__ to 199901L __restrict_arr is
> defined as restrict which causes the problem because tcc doesn't know
> how to handle this.

gcc doesn't know how to handle this either.  If I save the tcc -E output and 
then feed it to gcc, gcc dies at the exact same point with an equivalent 
error.

tcc knows how to handle restrict when it's applied in other contexts, but in 
this context it seems to make about as much sense as "int array[long];"

> > I notice that the test here is 199901L <= __STDC_VERSION__ and the
> > earlier test was >=, and when they're == it gets _confused_...
> >
> > I'm going to bed now.  Fixit in the morning...
>
> Did you actually fix it?

Nope, because I'm not quite sure how I should.

This is either a bug in the glibc headers, or it's a bug in the #defines were 
setting.  I'm strongly leaning towards the first, but would love to come up 
with a workaround...

> Because in todays tip the issue was still 
> present. Anyway i have attached my attempt to fix the problem, the patch
> makes tcc ignore array definitions containing restrict as found in
> regex.h. So the following should now be parseable without an error.

Hmmm...  Well, it's small enough to be a usable workaround, anyway.

I'll poke at it tonight...

Rob
-- 
"One of my most productive days was throwing away 1000 lines of code."
  - Ken Thompson.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]