This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/72786] New: Odd spelling suggestion with later defined macro: Suggestion is identical to unknown identifier
- From: "burnus at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 03 Aug 2016 12:09:35 +0000
- Subject: [Bug c++/72786] New: Odd spelling suggestion with later defined macro: Suggestion is identical to unknown identifier
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72786
Bug ID: 72786
Summary: Odd spelling suggestion with later defined macro:
Suggestion is identical to unknown identifier
Product: gcc
Version: unknown
Status: UNCONFIRMED
Keywords: diagnostic
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: burnus at gcc dot gnu.org
CC: dmalcolm at gcc dot gnu.org
Target Milestone: ---
The suggestion in the error message is odd:
inp5.ii:2:30: error: ‘OVERRIDE’ does not name a type; did you mean ‘OVERRIDE’?
virtual void clone() const OVERRIDE { }
^~~~~~~~
OVERRIDE
The reason for it is an ordering issue:
class DocTargetDriver {
virtual void clone() const OVERRIDE { }
};
#define OVERRIDE override
I am not sure how to best resolve it. Filtering out would be simple (input and
output are identical); however, I wonder whether it makes more sense to
explicitly point out the ordering issue.