[Bug c++/72708] error on anonymous union in an unnamed namespace

2021-08-03 Thread pinskia at gcc dot gnu.org via Gcc-bugs
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

[Bug c++/72708] error on anonymous union in an unnamed namespace

2020-02-05 Thread the1987.6 at gmail dot com
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.

[Bug c++/72708] error on anonymous union in an unnamed namespace

2016-07-29 Thread msebor at gcc dot gnu.org
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

[Bug c++/72708] error on anonymous union in an unnamed namespace

2016-07-27 Thread msebor at gcc dot gnu.org
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

[Bug c++/72708] error on anonymous union in an unnamed namespace

2016-07-26 Thread pinskia at gcc dot gnu.org
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.