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: Fri, 21 Sep 2007 16:30:12 -0500
User-agent: KMail/1.9.6

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:
> > Rob Landley wrote:
> >> 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];"
> >
> > According to the comment in sys/cdefs.h this is valid C99 don't know
> > whether this is true or not.
> >
> > /* 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?  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)

Note that temp.c is one line:

> #include <regex.h>

This is why my checkin called it a bug workaround.  In the absence of gcc 
version symbols, the glibc headers a resolving to something that gcc can't 
parse either.

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]