[Bug c++/31165] [4.2/4.3 Regression] Error: symbol `an_empty_string' is already defined
pinskia at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Tue Mar 13 21:40:00 GMT 2007
------- 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
More information about the Gcc-bugs
mailing list