https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102773
Jonathan Wakely <redi at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever confirmed|0 |1 Last reconfirmed| |2022-10-27 --- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> --- Another example: long i = reintepret_cast<long>((void*)0); cast.C:1:10: error: ‘reintepret_cast’ was not declared in this scope 1 | long i = reintepret_cast<long>((void*)0); | ^~~~~~~~~~~~~~~ cast.C:1:26: error: expected primary-expression before ‘long’ 1 | long i = reintepret_cast<long>((void*)0); | ^~~~ And this one with -std=c++20: template<class T> void f(const void* v) { auto u = reintepret_cast<long>(v); } cast.C: In function 'void f(const void*)': cast.C:5:12: error: there are no arguments to 'reintepret_cast' that depend on a template parameter, so a declaration of 'reintepret_cast' must be available [-fpermissive] 5 | auto u = reintepret_cast<long>(v); | ^~~~~~~~~~~~~~~~~~~~~ cast.C:5:12: note: (if you use '-fpermissive', G++ will accept your code, but allowing the use of an undeclared name is deprecated)