PR preprocessor/83602
* name-lookup.c (lookup_name_fuzzy): Don't use macro_use_before_def
for builtin macros.
* g++.dg/cpp/pr83602.C: New test.
From-SVN: r256175
2018-01-03 Jakub Jelinek <jakub@redhat.com>
+ PR preprocessor/83602
+ * name-lookup.c (lookup_name_fuzzy): Don't use macro_use_before_def
+ for builtin macros.
+
PR c++/83634
* cp-gimplify.c (cp_fold) <case NOP_EXPR>: If the operand folds to
error_mark_node, return error_mark_node.
/* If we have an exact match for a macro name, then the
macro has been used before it was defined. */
cpp_hashnode *macro = bmm.blithely_get_best_candidate ();
- if (macro)
+ if (macro && (macro->flags & NODE_BUILTIN) == 0)
return name_hint (NULL,
new macro_use_before_def (loc, macro));
}
2018-01-03 Jakub Jelinek <jakub@redhat.com>
+ PR preprocessor/83602
+ * g++.dg/cpp/pr83602.C: New test.
+
PR c++/83634
* g++.dg/parse/pr83634.C: New test.
--- /dev/null
+// PR preprocessor/83602
+// { dg-do compile }
+
+_Pragma // { dg-error "_Pragma" }