This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/31165] [4.2/4.3 Regression] Error: symbol `an_empty_string' is already defined
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 13 Mar 2007 21:40:44 -0000
- Subject: [Bug c++/31165] [4.2/4.3 Regression] Error: symbol `an_empty_string' is already defined
- References: <bug-31165-10179@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #5 from pinskia at gcc dot gnu dot org 2007-03-13 21:40 -------
A quick patch which I am testing right now:
Index: cp/call.c
===================================================================
--- cp/call.c (revision 122871)
+++ cp/call.c (working copy)
@@ -4671,7 +4671,7 @@
VAR_DECL. We can avoid the copy for constants, since they
are never modified in place. */
if (!CONSTANT_CLASS_P (arg))
- arg = copy_node (arg);
+ arg = unshare_expr (arg);
arg = convert_for_initialization (0, type, arg, LOOKUP_NORMAL,
"default argument", fn, parmnum);
arg = convert_for_arg_passing (type, arg);
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31165