This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[cfg-branch] Fix one warning
- To: Jan Hubicka <jh at suse dot cz>
- Subject: [cfg-branch] Fix one warning
- From: Andreas Jaeger <aj at suse dot de>
- Date: Tue, 13 Nov 2001 14:25:17 +0100
- Cc: gcc-patches at gcc dot gnu dot org
Honza,
I just got:
stage1/xgcc -Bstage1/ -B/opt/gcc/cfg/i686-pc-linux-gnu/bin/ -c -DIN_GCC -g -O2 -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wtraditional -pedantic -Wno-long-long -DHAVE_CONFIG_H -I. -I. -I/cvs/gcc-cfg-branch/gcc -I/cvs/gcc-cfg-branch/gcc/. -I/cvs/gcc-cfg-branch/gcc/config -I/cvs/gcc-cfg-branch/gcc/../include /cvs/gcc-cfg-branch/gcc/cfgcleanup.c -o cfgcleanup.o
/cvs/gcc-cfg-branch/gcc/cfgcleanup.c: In function `thread_jump':
/cvs/gcc-cfg-branch/gcc/cfgcleanup.c:323: warning: traditional C lacks a separate namespace for labels, identifier `failed' conflicts
/cvs/gcc-cfg-branch/gcc/cfgcleanup.c: In function `try_forward_edges':
/cvs/gcc-cfg-branch/gcc/cfgcleanup.c:338: warning: `threaded_edge' might be used uninitialized in this function
The first warning has been fixed with the appended patch (committed as
obvious) and the second warning looks right. Can you check the usage
of 'threaded_edge', something wrong is happening here.
Andreas
2001-11-13 Andreas Jaeger <aj@suse.de>
* cfgcleanup.c (thread_jump): Rename label fail to avoid warning.
Index: cfgcleanup.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/cfgcleanup.c,v
retrieving revision 1.18.2.2
diff -u -p -r1.18.2.2 cfgcleanup.c
--- cfgcleanup.c 2001/11/12 17:57:41 1.18.2.2
+++ cfgcleanup.c 2001/11/13 13:24:31
@@ -303,14 +303,14 @@ thread_jump (mode, e, b)
/* Later we should clear nonequal of dead registers. So far we don't
have life information in cfg_cleanup. */
if (failed)
- goto failed;
+ goto failed_exit;
/* In case liveness information is available, we need to prove equivalence
only of the live values. */
if (mode & CLEANUP_UPDATE_LIFE)
AND_REG_SET (nonequal, b->global_live_at_end);
- EXECUTE_IF_SET_IN_REG_SET (nonequal, 0, i, goto failed;);
+ EXECUTE_IF_SET_IN_REG_SET (nonequal, 0, i, goto failed_exit;);
BITMAP_XFREE (nonequal);
cselib_finish ();
@@ -320,7 +320,7 @@ thread_jump (mode, e, b)
else
return FALLTHRU_EDGE (b);
-failed:
+failed_exit:
BITMAP_XFREE (nonequal);
cselib_finish ();
return NULL;
--
Andreas Jaeger
SuSE Labs aj@suse.de
private aj@arthur.inka.de
http://www.suse.de/~aj