Commit 1d00bef8 by Jim Wilson

(duplicate_decls): When make void* match char*, set

DECL_IN_SYSTEM_HEADER.

From-SVN: r7645
parent a516ce54
...@@ -1472,6 +1472,10 @@ duplicate_decls (newdecl, olddecl) ...@@ -1472,6 +1472,10 @@ duplicate_decls (newdecl, olddecl)
/* Make sure we keep void * as ret type, not char *. */ /* Make sure we keep void * as ret type, not char *. */
if (TYPE_MAIN_VARIANT (TREE_TYPE (TREE_TYPE (oldtype))) == void_type_node) if (TYPE_MAIN_VARIANT (TREE_TYPE (TREE_TYPE (oldtype))) == void_type_node)
TREE_TYPE (newdecl) = newtype = oldtype; TREE_TYPE (newdecl) = newtype = oldtype;
/* Set DECL_IN_SYSTEM_HEADER, so that if we see another declaration
we will come back here again. */
DECL_IN_SYSTEM_HEADER (newdecl) = 1;
} }
else if (!types_match else if (!types_match
/* Permit char *foo (int, ...); followed by char *foo (); /* Permit char *foo (int, ...); followed by char *foo ();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment