This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: -O3 bug
- To: Carlo Wood <carlo at alinoe dot com>
- Subject: Re: -O3 bug
- From: scott snyder <snyder at fnal dot gov>
- Date: 29 Jun 2000 17:32:17 -0500
- Cc: gcc-bugs at gcc dot gnu dot org
- References: <20000629202000.A19852@a2000.nl>
This looks like the same problem i reported in
http://gcc.gnu.org/ml/gcc-bugs/2000-03/msg01289.html
I've been using the appended patch to work around it.
Note that this patch isn't correct --- it simply attacks the symptoms
by disabing the error; that's why i haven't submitted it. But it suffices
to get things working for me...
sss
2000-04-09 scott snyder <sss@karma.fnal.gov>
* decl.c (check_default_argument): Disable local variable check.
Index: decl.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/cp/decl.c,v
retrieving revision 1.645
diff -u -p -r1.645 decl.c
--- decl.c 2000/06/29 14:03:09 1.645
+++ decl.c 2000/06/29 22:30:23
@@ -11974,9 +11974,11 @@ check_default_argument (decl, arg)
var = walk_tree (&arg, local_variable_p_walkfn, NULL);
if (var)
{
+#if 0 /* sss */
cp_error ("default argument `%E' uses local variable `%D'",
arg, var);
return error_mark_node;
+#endif
}
/* All is well. */