Article ID: 128600 - Last Review: July 5, 2005 - Revision: 1.1 BUG: Redefinition of Enum Data Type Does Not Cause an ErrorThis article was previously published under Q128600 On This PageSYMPTOMS
When an enumerated type is declared in class scope, if it is declared again
at global scope, the compiler will not generate an error. However, once
redefined, the result of using those enumerated types is unpredictable.
RESOLUTION
An enumerated type should be defined only once within any scope.
STATUSMicrosoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article. MORE INFORMATIONSample Code to Demonstrate ProblemREFERENCES
"The Annotated C++ Reference Manual" by Ellis and Stroustrup (Jan 1994),
section 7.2
APPLIES TO
| Article Translations
|
Back to the top
