]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
(duplicate_decls): When make void* match char*, set
authorJim Wilson <wilson@gcc.gnu.org>
Sat, 2 Jul 1994 23:09:49 +0000 (16:09 -0700)
committerJim Wilson <wilson@gcc.gnu.org>
Sat, 2 Jul 1994 23:09:49 +0000 (16:09 -0700)
DECL_IN_SYSTEM_HEADER.

From-SVN: r7645

gcc/c-decl.c

index 901d0d93decdfcfa4795cf4d60b860f130bafcde..3dea89aea4a2cafb0524f337cddd71f4462aba2d 100644 (file)
@@ -1472,6 +1472,10 @@ duplicate_decls (newdecl, olddecl)
       /* Make sure we keep void * as ret type, not char *.  */
       if (TYPE_MAIN_VARIANT (TREE_TYPE (TREE_TYPE (oldtype))) == void_type_node)
        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
           /* Permit char *foo (int, ...); followed by char *foo ();