https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72708
--- Comment #5 from Andrew Pinski ---
This code is accepted:
namespace {
static union { int x; };
}
---
For the original testcase, only clang accepts the code; ICC, GCC and MSVC all
reject the code with the simi
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72708
--- Comment #4 from 高橋将 ---
cppreference.com also says:
"Namespace-scope anonymous unions must be declared static unless they appear in
an unnamed namespace."
on Union declaration.
It would be best if this bug was fixed.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72708
Martin Sebor changed:
What|Removed |Added
Last reconfirmed||2016-7-29
--- Comment #3 from Martin Sebo
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72708
--- Comment #2 from Martin Sebor ---
(In reply to Andrew Pinski from comment #1)
> I don't think so. Static != internal linkage.
Quoting also from [basic.link], paragraph 3, to avoid confusion:
A name having namespace scope (3.3.6) has inter
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72708
--- Comment #1 from Andrew Pinski ---
I don't think so. Static != internal linkage. If anything you found a defect
in the C++ language.