This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/86440] New: -Wignored-qualifiers diagnostic highlights wrong token with pointer
- From: "nightstrike at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 09 Jul 2018 12:19:26 +0000
- Subject: [Bug c++/86440] New: -Wignored-qualifiers diagnostic highlights wrong token with pointer
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86440
Bug ID: 86440
Summary: -Wignored-qualifiers diagnostic highlights wrong token
with pointer
Product: gcc
Version: 8.1.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: nightstrike at gmail dot com
Target Milestone: ---
$ cat a.cc
int const f() { return 0; }
int * const g() { return 0; }
$ g++ a.cc -c -Wignored-qualifiers
a.cc:1:5: warning: type qualifiers ignored on function return type
[-Wignored-qualifiers]
int const f() { return 0; }
^~~~~
a.cc:3:1: warning: type qualifiers ignored on function return type
[-Wignored-qualifiers]
int * const g() { return 0; }
^~~