[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Tinycc-devel] global variables in tcc
From: |
Daniel Glöckner |
Subject: |
Re: [Tinycc-devel] global variables in tcc |
Date: |
Mon, 1 Apr 2013 20:58:06 +0200 |
User-agent: |
Mutt/1.5.20 (2009-06-14) |
Hi,
On Mon, Apr 01, 2013 at 04:55:18PM +0200, Lluís Batlle i Rossell wrote:
> > GCC and Clang allow these to be merged together at link-time, which
> > means users who make mistakes such as missing `extern' in header files
> > still get the multiple definitions merged.
> >
> > tcc is stricter and perhaps more conformant in disallowing this.
>
> I think that the C standard requires the gcc and clang behaviour, 'extern'
> never being a required word.
>
> No?
I just took a look inside the N1570 C11 draft.
Chapter 6.9 paragraph 5 says:
"If an identifier declared with external linkage is used in an expression
([...]), somewhere in the entire program there shall be exactly one external
definition for the identifier; otherwise, there shall be no more than one."
Daniel
- [Tinycc-devel] global variables in tcc, Lluís Batlle i Rossell, 2013/04/01
- Re: [Tinycc-devel] global variables in tcc, Rob, 2013/04/01
- Re: [Tinycc-devel] global variables in tcc, Lluís Batlle i Rossell, 2013/04/01
- Re: [Tinycc-devel] global variables in tcc,
Daniel Glöckner <=
- Re: [Tinycc-devel] global variables in tcc, Lluís Batlle i Rossell, 2013/04/01
- Re: [Tinycc-devel] global variables in tcc, Rob, 2013/04/01
- Re: [Tinycc-devel] global variables in tcc, Lluís Batlle i Rossell, 2013/04/02
- Re: [Tinycc-devel] global variables in tcc, Rob, 2013/04/02
- Re: [Tinycc-devel] global variables in tcc, grischka, 2013/04/02
- Re: [Tinycc-devel] global variables in tcc, Lluís Batlle i Rossell, 2013/04/02
- Re: [Tinycc-devel] global variables in tcc, Rob, 2013/04/04