This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/81764] [6/7/8 Regression] Visibility attributes for explicitly instantiated template class get warned if it has been implicitly instantiated
- From: "jason at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 06 Apr 2018 02:58:49 +0000
- Subject: [Bug c++/81764] [6/7/8 Regression] Visibility attributes for explicitly instantiated template class get warned if it has been implicitly instantiated
- Auto-submitted: auto-generated
- References: <bug-81764-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81764
Jason Merrill <jason at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
CC| |jason at gcc dot gnu.org
Resolution|--- |INVALID
--- Comment #2 from Jason Merrill <jason at gcc dot gnu.org> ---
Yes, this behavior is intended; just like you can't explicitly specialize a
class after it's been instantiated, you can't specify attributes either.
The C++ standard is even stricter, saying "No attribute-specifier-seq shall
appertain to an explicit instantiation."