https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93739 --- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> --- template<typename T> [[gnu::warning("your type here")]] bool print_type() { return true; } int i; bool b = print_type<int>();