This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/77618] warn for explicit instantiation that occurs after an explicit specialization


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77618

Eric Gallager <egallager at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2017-09-28
                 CC|                            |egallager at gcc dot gnu.org
     Ever confirmed|0                           |1

--- Comment #1 from Eric Gallager <egallager at gcc dot gnu.org> ---
Confirmed, my (old) version of clang says:

$ /sw/opt/llvm-3.1/bin/clang++ -c -Wall -Wextra -pedantic 77618.cc
77618.cc:3:15: warning: explicit instantiation of 'foo<int>' that occurs after
an explicit specialization will be ignored (C++11 extension)
[-pedantic,-Wc++11-extensions]
template void foo<int>();
              ^
77618.cc:2:18: note: previous template specialization is here
template <> void foo<int>() {}
                 ^
1 warning generated.
$

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]