This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

PATCH: Fix Tru64 UNIX bootstrap: fix braces in sdbout.c


Tru64 UNIX bootstrap broke again in stage 2 like so:

/vol/gccsrc/obj/gcc-4.5.0-20090622/4.0f-gcc/./prev-gcc/xgcc -B/vol/gccsrc/obj/gcc-4.5.0-20090622/4.0f-gcc/./prev-gcc/ -B/vol/gcc/alpha-dec-osf4.0f/bin/ -B/vol/gcc/alpha-dec-osf4.0f/bin/ -B/vol/gcc/alpha-dec-osf4.0f/lib/ -isystem /vol/gcc/alpha-dec-osf4.0f/include -isystem /vol/gcc/alpha-dec-osf4.0f/sys-include    -c  -g -O2 -DIN_GCC   -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wcast-qual -Wold-style-definition -Wc++-compat -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Werror -fno-common  -DHAVE_CONFIG_H -I. -I. -I/vol/gcc/src/gcc-dist/gcc -I/vol/gcc/src/gcc-dist/gcc/. -I/vol/gcc/src/gcc-dist/gcc/../include -I/vol/gcc/src/gcc-dist/gcc/../libcpp/include -I/vol/gcc/include -I/vol/gcc/include -I/vol/gcc/src/gcc-dist/gcc/../libdecnumber -I/vol/gcc/src/gcc-dist/gcc/../libdecnumber/dpd -I../libdecnumber    /vol/gcc/src/gcc-dist/gcc/sdbout.c -o sdbout.o
cc1: warnings being treated as errors
/vol/gcc/src/gcc-dist/gcc/sdbout.c: In function 'sdbout_one_type':
/vol/gcc/src/gcc-dist/gcc/sdbout.c:1241:7: error: switch jumps over variable initialization
/vol/gcc/src/gcc-dist/gcc/sdbout.c:1056:3: note: switch starts here
/vol/gcc/src/gcc-dist/gcc/sdbout.c:1103:6: note: 'member_scl' declared here
/vol/gcc/src/gcc-dist/gcc/sdbout.c:1241:7: error: switch jumps over variable initialization
/vol/gcc/src/gcc-dist/gcc/sdbout.c:1056:3: note: switch starts here
/vol/gcc/src/gcc-dist/gcc/sdbout.c:1102:6: note: 'size' declared here
make[3]: *** [sdbout.o] Error 1

It turned out that a brace was misplaced, moving the default: case into the
wrong block (although size and member_scl weren't initialized in this case,
they weren't used, so it's unclear what the warning is about here).

Anyway, the following patch fixes this and allows bootstrap to continue.

Ok for mainline?

	Rainer

-----------------------------------------------------------------------------
Rainer Orth, Faculty of Technology, Bielefeld University


Mon Jun 22 16:20:12 2009  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>

	* sdbout.c (sdbout_one_type): Fix braces in switch.

Index: gcc/sdbout.c
===================================================================
--- gcc/sdbout.c	(revision 148784)
+++ gcc/sdbout.c	(working copy)
@@ -1237,10 +1237,10 @@ sdbout_one_type (tree type)
 	PUT_SDB_SIZE (size);
 	PUT_SDB_ENDEF;
 	break;
-
-      default:
-	break;
       }
+
+    default:
+      break;
     }
 }
 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]