[Bug c++/77618] warn for explicit instantiation that occurs after an explicit specialization
egallager at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Sep 28 16:05:00 GMT 2017
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.
$
More information about the Gcc-bugs
mailing list