This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/71075] New: Broken diagnostic: 'integer_cst' not supported by 'dump_decl'
- From: "arthur.j.odwyer at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 11 May 2016 22:03:22 +0000
- Subject: [Bug c++/71075] New: Broken diagnostic: 'integer_cst' not supported by 'dump_decl'
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71075
Bug ID: 71075
Summary: Broken diagnostic: 'integer_cst' not supported by
'dump_decl'
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: minor
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: arthur.j.odwyer at gmail dot com
Target Milestone: ---
I'm not sure how this isn't a duplicate of
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=51229 , but that bug has been
marked RESOLVED FIXED since 2011, and this bug still reproduces in GCC 7.0.
template<typename T, int I> struct A {};
template<typename T> void foo(A<T,1>) {}
int main() {
foo(A<int,2>());
}
====
prog.cc: In function 'int main()':
prog.cc:4:19: error: no matching function for call to 'foo(A<int, 2>)'
foo(A<int,2>());
^
prog.cc:2:27: note: candidate: template<class T> void foo(A<T, 1>)
template<typename T> void foo(A<T,1>) {}
^~~
prog.cc:2:27: note: template argument deduction/substitution failed:
prog.cc:4:19: note: template argument '2' does not match '#'integer_cst' not
supported by dump_decl#<declaration error>'
foo(A<int,2>());
^
====
Notice the last diagnostic line above: "template argument '2' does not match
'#'integer_cst' not supported by dump_decl#<declaration error>'".
I think GCC is correct in rejecting the input program; it just doesn't
understand how to print the resulting diagnostic.