[Bug c++/78440] New: [7 Regression] [c++17] Incompatible exception-specification not diagnosed in explicit instantiation
trippels at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Nov 21 03:20:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78440
Bug ID: 78440
Summary: [7 Regression] [c++17] Incompatible
exception-specification not diagnosed in explicit
instantiation
Product: gcc
Version: 7.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: trippels at gcc dot gnu.org
CC: jason at gcc dot gnu.org
Target Milestone: ---
markus@x4 tmp % cat compat.ii
template <typename T> void foo() noexcept {}
template <typename T> void bar() throw() {}
template void foo<int>();
template void bar<int>();
markus@x4 tmp % g++ -Wall -Wextra -std=c++1z -c compat.ii
markus@x4 tmp % clang++ -std=c++1z -c compat.ii
compat.ii:3:15: error: explicit instantiation of 'foo' does not refer to a
function template, variable template, member function, member class, or static
data member
template void foo<int>();
^
compat.ii:1:28: note: candidate template ignored: could not match 'void ()
noexcept' against 'void ()'
template <typename T> void foo() noexcept {}
^
compat.ii:4:15: error: explicit instantiation of 'bar' does not refer to a
function template, variable template, member function, member class, or static
data member
template void bar<int>();
^
compat.ii:2:28: note: candidate template ignored: could not match 'void ()
throw()' against 'void ()'
template <typename T> void bar() throw() {}
^
2 errors generated.
More information about the Gcc-bugs
mailing list