[Bug c++/104584] New: Bad diagnostic
Theodore.Papadopoulo at inria dot fr
gcc-bugzilla@gcc.gnu.org
Thu Feb 17 17:10:19 GMT 2022
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104584
Bug ID: 104584
Summary: Bad diagnostic
Product: gcc
Version: 11.2.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: Theodore.Papadopoulo at inria dot fr
Target Milestone: ---
Created attachment 52462
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=52462&action=edit
A small test program
The attached code give a poor diagnostic hinting at a wrong number of arguments
instead of stating a non valid first argument as in the one argument case which
says "template argument 1 is invalid".
mururoa-> g++ test.C
test.C:4:33: error: wrong number of template arguments (1, should be 2)
4 | typedef A<constexpr int,unsigned> B;
| ^
test.C:2:7: note: provided for ‘template<class T1, class T2> class A’
2 | class A { };
More information about the Gcc-bugs
mailing list