[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Tinycc-devel] Problem with struct initialization.
From: |
Karel Gardas |
Subject: |
Re: [Tinycc-devel] Problem with struct initialization. |
Date: |
Thu, 12 Dec 2002 10:56:09 +0100 (CET) |
On Thu, 12 Dec 2002 address@hidden wrote:
> Quoting Karel Gardas <address@hidden>:
>
> > I have following code, which is perfectly compilable by gcc, but which
> > fails with tcc:
> >
> >
> > struct __X { struct __X *next;};
> >
> > static struct __X __link;
> > static struct __X __link = {((struct __X *)0),};
> >
> > tcc error is:
> >
> > tcc-test3.c:5: redefinition of '__link'
> >
> > Is it a known bug?
>
> It was not known. I was just unaware that it was perfectly legal to redefine
> several times the same variable in a translation unit !
I'm not awary if it's legal either. On the other hand both gcc2.95.4 and
gcc3.2.1 compile this fragment well.
> It will be fixed in next
> release.
Great!
Thanks a lot,
Karel
--
Karel Gardas address@hidden
ObjectSecurity Ltd. http://www.objectsecurity.com