PR c/7741
* c-decl.c (duplicate_decls): Discard the initializer of the
new decl when the types are conflicting.
Co-Authored-By: Christian Ehrhardt <ehrhardt@mathematik.uni-ulm.de>
From-SVN: r62636
+2003-02-10 Eric Botcazou <ebotcazou@libertysurf.fr>
+ Christian Ehrhardt <ehrhardt@mathematik.uni-ulm.de>
+
+ PR c/7741
+ * c-decl.c (duplicate_decls): Discard the initializer of the
+ new decl when the types are conflicting.
+
2003-02-01 Daniel Jacobowitz <drow@mvista.com>
* dwarf2out.c (gen_type_die): Check for typedefs before calling
}
}
error_with_decl (olddecl, "previous declaration of `%s'");
+
+ /* This is safer because the initializer might contain references
+ to variables that were declared between olddecl and newdecl. This
+ will make the initializer invalid for olddecl in case it gets
+ assigned to olddecl below. */
+ DECL_INITIAL (newdecl) = 0;
}
else
{
+2003-02-10 Eric Botcazou <ebotcazou@libertysurf.fr>
+ Christian Ehrhardt <ehrhardt@mathematik.uni-ulm.de>
+
+ * gcc.dg/decl-2.c: New test.
+
2003-02-06 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* gcc.dg/20020430-1.c: Fix dg command typos.