https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100720
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- clang rejects the first example: <source>:7:20: error: function 'f<int>' with deduced return type cannot be used before it is defined return f(0); ^ <source>:2:10: note: 'f<int>' declared here auto f(auto); ^ And rejects the second with a similar message as GCC.