[Bug c++/81764] [6/7/8 Regression] Visibility attributes for explicitly instantiated template class get warned if it has been implicitly instantiated

jason at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Apr 6 02:58:00 GMT 2018


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."


More information about the Gcc-bugs mailing list