BUG: Error C2011 When Reusing Nested Structure Tag Names (201830)
The information in this article applies to:
- Microsoft Visual C++, 32-bit Editions 2.0
- Microsoft Visual C++, 32-bit Editions 4.0
- 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 Q201830 SYMPTOMS
When the same tag name is used to declare nested structures inside different base structure declarations, the follow error is generated:
error C2011: '<identifier>' : '<type>' type redefinition
NOTE: The C++ compiler does not generate this error.
RESOLUTION
To work around this problem, either don't use tag names for nested structures, or use unique tag names for all structures.
STATUS
Microsoft has confirmed this to be a bug in the Microsoft products
listed at the beginning of this article.
Modification Type: | Minor | Last Reviewed: | 7/5/2005 |
---|
Keywords: | kbbug kbConly kbnofix KB201830 |
---|
|