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: grischka
Subject: Re: [Tinycc-devel] defined twice error commented out
Date: Thu, 29 Oct 2015 09:39:11 +0100
User-agent: Thunderbird 2.0.0.23 (Windows/20090812)

Sergey Korshunoff wrote:
Removing a valid warning is never a goid idea long-term.
A tcc message was: Error And this condition is an error only if an
initialization with diffenet values asked. In other cases it can be
only warning. And there must be a flag to supress it

TCC already has that flag: -fcommon

Also, your patch does wrong things:

Example:

foo.c:
    int xxx = 12;
    int main() { printf("--> %d\n", xxx); return 0; }
bar.c:
    int xxx = 34;
tcc foo.c bar.c && ./a.out
    --> 12

This is wrong.  Result must be "error: xxx defined twice"

Another example:

foo.c:
    int xxx;
    int main() { printf("--> %d\n", xxx); return 0; }
bar.c:
    int xxx = 34;
tcc foo.c bar.c && ./a.out
    --> 0

Wrong too.  Result must be "--> 34"

-- gr




reply via email to

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