tinycc-devel
[Top][All Lists]
Advanced

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

Re: [Tinycc-devel] Problem with struct initialization.


From: s duclos
Subject: Re: [Tinycc-devel] Problem with struct initialization.
Date: Thu, 19 Dec 2002 14:03:42 -0800 (PST)

--- 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 ! It will be fixed in next
> release.
> 
> Fabrice.


For the record ... Its C but not C++ !

// t8.c
struct S_tag { int i;} S;
struct S_tag S = { 1 };

%gcc -c t8.c
%g++ -c t8.c
t8.c:2: redefinition of `struct S_tag S'
t8.c:1: `struct S_tag S' previously declared here

So this is probably why it look suspicious in the
first place.


Sylvain.



__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com



reply via email to

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