tinycc-devel
[Top][All Lists]
Advanced

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

Re: [Tinycc-devel] Today's bug...


From: Rob Landley
Subject: Re: [Tinycc-devel] Today's bug...
Date: Sat, 8 Sep 2007 03:38:40 -0500
User-agent: KMail/1.9.6

On Thursday 06 September 2007 5:19:15 pm Dave Dodge wrote:
> On Thu, Sep 06, 2007 at 06:33:14AM -0500, Rob Landley wrote:
> > It seems that the right thing to do is set __STDC_VERSION__ to show we
> > have c99, which I did, although now includes of regex.h are barfing. 
> > This might be a glibc bug, or might be that we need to understand
> > "restrict",
>
> Note that if "restrict" turns out to be the problem, one option is to
> recognize but ignore the keyword entirely.  Assuming the program being
> compiled is written correctly, it won't make any semantic difference
> to simply pretend that the "restrict" isn't there:
>
>     The intended use of the restrict qualifier (like the register
>     storage class) is to promote optimization, and deleting all
>     instances of the qualifier from a conforming program does not
>     change its meaning (i.e., observable behavior).

It turns out that we already do ignore restrict: when it appears in the right 
place.

But that's not what's happening here:

$ echo -e "#include <regex.h>\n" > temp.c
$ tcc -E temp.c > temp2.c
$ gcc temp2.c
temp2.c:300: error: ‘restrict’ undeclared here (not in a function)

Ok, I'm very slightly glossing over the fact I need to add a second line to 
temp.c because if I do _just_ that then tcc -E doesn't produce any output.  
(Yes, debugging often goes like this for me.  Before I can fix THIS bug I 
have to go work around this OTHER bug to make the first problem manifest...  
I believe I've gotten this stack to six before, although not on tcc yet.  I 
BREAK STUFF!)

>                                                   -Dave Dodge

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]