This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB 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] label at end of statement in arm-tdep.c


An all-targets build revealed a label at the end of a compound
statement in arm-tdep.c.  This is illegal C, and recent GCC's raise a
warning when it happens.  So I've committed the following patch,
adding a break; statement to give the 'default:' something to be
attached to.

I've tested the patch by doing 'make arm-tdep.o' and noting that it
cured the compilation failure; it seems obvious that the patch won't
change GDB's behavior.

Committed as obvious.

David Carlton
carlton at math dot stanford dot edu

2003-02-21  David Carlton  <carlton at math dot stanford dot edu>

	* arm-tdep.c (arm_gdbarch_init): Add break after default label.

Index: arm-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/arm-tdep.c,v
retrieving revision 1.98
diff -u -p -r1.98 arm-tdep.c
--- arm-tdep.c	3 Feb 2003 20:03:00 -0000	1.98
+++ arm-tdep.c	21 Feb 2003 17:01:57 -0000
@@ -2834,6 +2834,7 @@ arm_gdbarch_init (struct gdbarch_info in
 
 	default:
 	  /* Leave it as "unknown".  */
+	  break;
 	}
     }
 


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