-
Notifications
You must be signed in to change notification settings - Fork 15.4k
Open
Labels
clang:frontendLanguage frontend issues, e.g. anything involving "Sema"Language frontend issues, e.g. anything involving "Sema"diverges-from:gccDoes the clang frontend diverge from gcc on this issueDoes the clang frontend diverge from gcc on this issuediverges-from:msvcDoes the clang frontend diverge from msvc on this issueDoes the clang frontend diverge from msvc on this issue
Description
The following code is accepted by clang under -std=c++20:
struct S2 {
enum B {
A
};
using enum B ;
};MSVC and GCC choose to reject it as there would be a name conflict:
<source>:5:16: error: 'using S2::B::A' conflicts with a previous declaration
5 | using enum B ;
| ^
<source>:3:5: note: previous declaration 'S2::B S2::A'
3 | A
| ^While the using enum B statement here actually seems to be meaningless, I'm not quite sure whether this should be rejected or not.
Metadata
Metadata
Assignees
Labels
clang:frontendLanguage frontend issues, e.g. anything involving "Sema"Language frontend issues, e.g. anything involving "Sema"diverges-from:gccDoes the clang frontend diverge from gcc on this issueDoes the clang frontend diverge from gcc on this issuediverges-from:msvcDoes the clang frontend diverge from msvc on this issueDoes the clang frontend diverge from msvc on this issue