BUG: Redefinition of Enum Data Type Does Not Cause an Error (128600)
The information in this article applies to:
- Microsoft Visual C++, 32-bit Editions 2.0
- Microsoft Visual C++, 32-bit Editions 2.1
- Microsoft Visual C++, 32-bit Editions 4.0
- Microsoft Visual C++, 32-bit Editions 4.1
- Microsoft Visual C++, 32-bit Enterprise Edition 4.2
- Microsoft Visual C++, 32-bit Professional Edition 4.2
- Microsoft Visual C++, 32-bit Enterprise Edition 5.0
- Microsoft Visual C++, 32-bit Professional Edition 5.0
- Microsoft Visual C++, 32-bit Enterprise Edition 6.0
- Microsoft Visual C++, 32-bit Professional Edition 6.0
- Microsoft Visual C++, 32-bit Learning Edition 6.0
This article was previously published under Q128600 SYMPTOMS
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. REFERENCES
"The Annotated C++ Reference Manual" by Ellis and Stroustrup (Jan 1994),
section 7.2
Modification Type: | Minor | Last Reviewed: | 7/5/2005 |
---|
Keywords: | kbBug kbCompiler kbCPPonly KB128600 |
---|
|