https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60916
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Seems fixed in GCC 11+:
The extra output is now:
<source>:20:27: error: type/value mismatch at argument 2 in template parameter
list for 'template<class T1, class T2, int (* F)(const T1*, const T2*)> int
wrapper()'
20 | return wrapper<char, f> ();
| ~~~~~~~~~~~~~~~~~^~
<source>:20:27: note: expected a type, got 'f'
