http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53863
Jonathan Wakely redi at gcc dot gnu.org changed:
What|Removed |Added
Keywords||diagnostic
--- Comment #1 from Jonathan Wakely redi at gcc dot gnu.org 2012-07-05
10:45:51 UTC ---
In the words of the C++ standard a = 1 is an enumerator-definition, which
declares the name a
(EDG says declaration for C and C++, Clang says definition for C and C++)
I think the reason for the G++ wording is that the same diagnostic is used in
this case:
extern int a;
extern long a;
t.cc:2:13: error: conflicting declaration 'long int a'
t.cc:1:12: error: 'a' has a previous declaration as 'int a'
And in this case they are declarations, not definitions.
Interestingly the C front end gives a different diagnostic here, changing
definition to declaration
t.c:2:13: error: conflicting types for 'a'
t.c:1:12: note: previous declaration of 'a' was here