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: Antti-Juhani Kaijanaho
Subject: Re: [Tinycc-devel] New fun bug! #include <regex.h>
Date: Sat, 22 Sep 2007 07:12:18 +0300
User-agent: Mutt/1.5.16 (2007-06-11)

On Fri, Sep 21, 2007 at 04:30:12PM -0500, Rob Landley wrote:
> On Friday 21 September 2007 4:58:37 am Antti-Juhani Kaijanaho wrote:
> > On Fri, Sep 21, 2007 at 10:02:19AM +0200, Marc Andre Tanner wrote:
> > > /* ISO C99 also allows to declare arrays as non-overlapping. The syntax
> > > is array_name[restrict]
> > >    GCC 3.1 supports this.  */
> >
> > All type qualifiers and static are allowed there.  The syntax is:
> 
> Really?

Did you not see my quotes from the standard?  Do you perhaps think that
I would make standard quotes up?  Really, the simplest way to verify
that is to pick up your copy of the standard and look.  I gave section
numbers and *paragraph* numbers so checking is easy.

I get identical results for the following from gcc 4.1 and gcc 3.1:
> 
> > $ tcc -E temp.c | gcc -xc -
> > <stdin>:301: error: ‘restrict’ undeclared here (not in a function)

For some reason, I can't reproduce this here (there is no "restrict" in
the tcc output in my machine), but it doesn't matter.

You're asking gcc to compile the code as C90 with GNU extensions.  No
wonder it barfs about "restrict", as it is a C99 thing!

Try with -std=c99.

-- 
Antti-Juhani Kaijanaho, Jyväskylä, Finland
http://antti-juhani.kaijanaho.fi/newblog/
http://www.flickr.com/photos/antti-juhani/





reply via email to

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