This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[PATCH] sim build failure to use ENDSWITCH macro with gcc-3.4.2
- From: Kazuhiro Inaoka <inaoka dot kazuhiro at renesas dot com>
- To: "gdb-patches at sources dot redhat dot com" <gdb-patches at sources dot redhat dot com>
- Date: Thu, 07 Oct 2004 16:12:47 +0900
- Subject: [PATCH] sim build failure to use ENDSWITCH macro with gcc-3.4.2
Hello,
I found a build failure to use ENDSWITCH macro with gcc-3.4.2.
The error message is "error: label at end of compaund statement".
This path fixes the failure. Please commit it.
sim/common/ChangeLog
2004-10-07 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
* cgen-defs.h (ENDSWITCH): Changed to compile with gcc-3.4.2.
Regards,
Kazuhiro Inaoka
Index: cgen-defs.h
===================================================================
RCS file: /cvs/src/src/sim/common/cgen-defs.h,v
retrieving revision 1.1.1.3
diff -c -r1.1.1.3 cgen-defs.h
*** cgen-defs.h 5 Oct 1999 23:13:21 -0000 1.1.1.3
--- cgen-defs.h 7 Oct 2004 06:52:27 -0000
***************
*** 130,136 ****
#define CASE(N, X) case_##N##_##X
#define BREAK(N) goto end_switch_##N
#define DEFAULT(N) default_##N
! #define ENDSWITCH(N) end_switch_##N:
#else
#define SWITCH(N, X) switch (X)
#define CASE(N, X) case X /* FIXME: old sem-switch had (@arch@_,X) here */
--- 130,136 ----
#define CASE(N, X) case_##N##_##X
#define BREAK(N) goto end_switch_##N
#define DEFAULT(N) default_##N
! #define ENDSWITCH(N) end_switch_##N:;
#else
#define SWITCH(N, X) switch (X)
#define CASE(N, X) case X /* FIXME: old sem-switch had (@arch@_,X) here */