Re: Why error "variable previously declared ‘static’ redeclared ‘extern’"?

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

 



On 7 July 2014 15:19, Alec Teal wrote:
> All wrong:
>
> http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1124.pdf
>
> Top of page 144.

I don't think that page is relevant.

Try section 6.2.2 paragraphs 4 and 7.

The code has undefined behaviour, which means the compiler can issue a
diagnostic, or ignore it, or generate a binary with unexpected
results.

N.B. in C++ the code is not undefined, instead there are three
different objects called i5 with internal linkage, no linkage and
external linkage respectively (see the example in section 3.5 paragaph
6 in the C++ standard).




[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux