https://gcc.gnu.org/bugzilla/show_bug.cgi?id=41475

Andrey Tarasevich <atarasevich at comcast dot net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |atarasevich at comcast dot net

--- Comment #10 from Andrey Tarasevich <atarasevich at comcast dot net> ---
(In reply to Andrew Pinski from comment #8)
> This code is undefined I think (and really it is not valid C90/C99 code).

You are absolutely right - this code is not valid from the point of view of
formal standard C language. It is illegal to provide multiple definitions of
external objects with the same name.

However, this is a popular extension in C implementations with Unix heritage.
So, this entry is about the intended non-standard behavior of GCC
compiler/linker.

Reply via email to