duplicate_decls was being lenient about extern-c mismatches, allowing
you to have two declarations in the symbol table after emitting an
error. This resulted in duplicate error messages in modules, when we
find the same problem multiple times. Let's just not let that happen.
gcc/cp/
* decl.c (duplicate_decls): Return error_mark_node fo extern-c
mismatch.
newdecl);
inform (olddecl_loc,
"previous declaration %q#D", olddecl);
- return NULL_TREE;
+ return error_mark_node;
}
/* For function versions, params and types match, but they
are not ambiguous. */