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.