-
Notifications
You must be signed in to change notification settings - Fork 14.9k
Open
Labels
clang:diagnosticsNew/improved warning or error message in Clang, but not in clang-tidy or static analyzerNew/improved warning or error message in Clang, but not in clang-tidy or static analyzercwg-issueAn issue that was filed to the Core Working GroupAn issue that was filed to the Core Working Group
Description
Clang rejects the following with -pedantic-errors
in C++ (https://godbolt.org/z/jbaPKMqhs):
union X{;};
<source>:1:9: error: extra ';' inside a union [-Werror,-Wextra-semi]
1 | union X{;};
| ^
However, I do not see anything prohibiting empty declarations in unions in general. They are only prohibited in anonymous unions.
Metadata
Metadata
Assignees
Labels
clang:diagnosticsNew/improved warning or error message in Clang, but not in clang-tidy or static analyzerNew/improved warning or error message in Clang, but not in clang-tidy or static analyzercwg-issueAn issue that was filed to the Core Working GroupAn issue that was filed to the Core Working Group