[Bug c/78359] Redeclaration of global variables is not reported
pinskia at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Nov 15 07:34:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78359
--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to hugo74 from comment #2)
> (In reply to Andrew Pinski from comment #1)
> > Because
> > int Counter
> >
> > in the global scope is consider a tentative definition.
>
> What is meant by "tentative declaration" ? It is very misleading.
C is a weird langauge.
> It should not work that way. I checked it in other C compilers and each of
> them reports an redefinition error in such case.
Are you sure they were C compilers and not C++ compilers?
C and C++ differ here.
More information about the Gcc-bugs
mailing list