https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85385
Bug ID: 85385 Summary: [8 Regression] Bogus "macro had not yet been defined" message when macro used with wrong arg count Product: gcc Version: 8.0 Status: UNCONFIRMED Keywords: diagnostic Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: dmalcolm at gcc dot gnu.org Target Milestone: --- $ cat test.c #define MACRO(X,Y) void test () { MACRO(42); } $ ./xg++ -B. -c test.c test.c:5:11: error: macro "MACRO" requires 2 arguments, but only 1 given MACRO(42); ^ test.c: In function ‘void test()’: test.c:5:3: error: ‘MACRO’ was not declared in this scope MACRO(42); ^~~~~ test.c:5:3: note: test.c:1: note: it was later defined here #define MACRO(X,Y) We shouldn't emit the note "the macro ‘MACRO’ had not yet been defined" for cases like these: the macro *had* been defined.