This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Failure to bootstrap gcc cvs HEAD 20040309 on i686-linux: cp/call.c:6459:warning: 'init' might be used uninitialized in this function
- From: Mark Mitchell <mark at codesourcery dot com>
- To: Christian Joensson <christian at j-son dot org>
- Cc: gcc <gcc at gcc dot gnu dot org>
- Date: Tue, 09 Mar 2004 10:03:30 -0800
- Subject: Re: Failure to bootstrap gcc cvs HEAD 20040309 on i686-linux: cp/call.c:6459:warning: 'init' might be used uninitialized in this function
- Organization: CodeSourcery, LLC
- References: <20040309171704.A27494@fw.j-son.org> <20040309172013.B27494@fw.j-son.org>
Might be related to this:
http://gcc.gnu.org/ml/gcc-cvs/2004-03/msg00434.html
Mark?
Indeed. I'm amazed that survived a test run, but then, thinking about
it, I can see why it did. A miraculously harmless error. :-)
I checked in the following patch on both the 3.4 branch and the
mainline, as obvious, and verifying that the test cases that patch fixed
still pass.
Thanks!
--
Mark Mitchell
CodeSourcery, LLC
(916) 791-8304
mark@codesourcery.com
2004-03-09 Mark Mitchell <mark@codesourcery.com>
* call.c (initialize_reference): Fix typo.
Index: call.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/call.c,v
retrieving revision 1.452.2.10
diff -c -5 -p -r1.452.2.10 call.c
*** call.c 9 Mar 2004 10:07:27 -0000 1.452.2.10
--- call.c 9 Mar 2004 17:35:30 -0000
*************** initialize_reference (tree type, tree ex
*** 6183,6193 ****
itself the result of a function call), turn it into a
TARGET_EXPR here. It is important that EXPR be a
TARGET_EXPR below since otherwise the INIT_EXPR will
attempt to make a bitwise copy of EXPR to intialize
VAR. */
! if (TREE_CODE (init) != TARGET_EXPR)
expr = get_target_expr (expr);
/* Create the INIT_EXPR that will initialize the temporary
variable. */
init = build (INIT_EXPR, type, var, expr);
if (at_function_scope_p ())
--- 6183,6193 ----
itself the result of a function call), turn it into a
TARGET_EXPR here. It is important that EXPR be a
TARGET_EXPR below since otherwise the INIT_EXPR will
attempt to make a bitwise copy of EXPR to intialize
VAR. */
! if (TREE_CODE (expr) != TARGET_EXPR)
expr = get_target_expr (expr);
/* Create the INIT_EXPR that will initialize the temporary
variable. */
init = build (INIT_EXPR, type, var, expr);
if (at_function_scope_p ())