[Bug c++/86440] -Wignored-qualifiers diagnostic highlights wrong token with pointer
nightstrike at gmail dot com
gcc-bugzilla@gcc.gnu.org
Thu Aug 19 21:51:18 GMT 2021
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; }
| ^
More information about the Gcc-bugs
mailing list