https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86440
--- Comment #2 from nightstrike <nightstrike at gmail dot com> --- gcc 11.2 changes it somewhat: a.c:1:5: warning: type qualifiers ignored on function return type [-Wignored-qualifiers] 1 | int const f() { return 0; } | ^~~~~ a.c:3:13: warning: type qualifiers ignored on function return type [-Wignored-qualifiers] 3 | int * const g() { return 0; } | ^