tinycc-devel
[Top][All Lists]
Advanced

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

Re: [Tinycc-devel] defined twice error commented out


From: Michael Matz
Subject: Re: [Tinycc-devel] defined twice error commented out
Date: Wed, 28 Oct 2015 16:38:50 +0100 (CET)
User-agent: Alpine 2.20 (LSU 67 2015-01-07)

Hi,

On Sun, 25 Oct 2015, Sergey Korshunoff wrote:

> Hi! Commented out a tcc_error_noabort("'%s' defined twice"... on mob
> gcc-3.4.6 don't give such error by default
> example file1.c
>   char __version_303_xxxxxxxx;
>   void func1() {}
> example file2.c
>   char __version_303_xxxxxxxx;
>   void func2() {}
>   int main() { return 0; }
> I think there must be a switch to supress such message as minimum

No, please keep the message.  That GNU ld doesn't error out in this case 
is a side-effect of GCC using common symbols.  If it wouldn't then also ld 
would error.  Try compiling the above with -fno-common and GCC and you'll 
see it.

It would also error out if you would initialize both definitions.  So, 
please revert.


Ciao,
Michael.



reply via email to

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