[Bug c++/92034] extern template declarations cannot have internal linkage (unnamed namespace)

2021-08-03 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92034

--- Comment #5 from Andrew Pinski  ---
Only clang errors out.
ICC, GCC and MSVC all accept the code.

[Bug c++/92034] extern template declarations cannot have internal linkage (unnamed namespace)

2019-10-09 Thread alisdairm at me dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92034

--- Comment #4 from Alisdair Meredith  ---
(In reply to Jonathan Wakely from comment #3)
> I'm not sure if a diagnostic is required. The standard doesn't specifically
> say it's ill-formed to do this. By my reading it's undefined, and so
> silently accepting it is a conforming (but unhelpful) implementation.

My reading of [intro.compliance]p1 is that this would be a diagnosable error,
but navigating core wording is hard if you do not know all of the exact places
that contribute, and could easily have missed a clarification?

[Bug c++/92034] extern template declarations cannot have internal linkage (unnamed namespace)

2019-10-09 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92034

Jonathan Wakely  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2019-10-09
 Ever confirmed|0   |1

--- Comment #3 from Jonathan Wakely  ---
I'm not sure if a diagnostic is required. The standard doesn't specifically say
it's ill-formed to do this. By my reading it's undefined, and so silently
accepting it is a conforming (but unhelpful) implementation.

Confirming as a diagnostic enhancement at least (and maybe accepts-invalid if
it's supposed to require a diagnostic).

[Bug c++/92034] extern template declarations cannot have internal linkage (unnamed namespace)

2019-10-09 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92034

Richard Biener  changed:

   What|Removed |Added

   Keywords||diagnostic

--- Comment #2 from Richard Biener  ---
The question is whether a diagnostic is required or not.  Having one would of
course be good (maybe this "feature" can be used to elide instantiation of
unneeded but eventually auto-instantiated pieces?)

[Bug c++/92034] extern template declarations cannot have internal linkage (unnamed namespace)

2019-10-08 Thread alisdairm at me dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92034

--- Comment #1 from Alisdair Meredith  ---
Sorry, link to Compiler Explorer showing the right compiler test (Clang 9):
   https://godbolt.org/z/9QIIrE