From 44d100c3b90473c1995acaf74ee3a424aedb9701 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Mon, 1 Jul 2013 19:50:11 +0000 Subject: add -Wold-style-declaration This adds -Wold-style-declaration to gdb's list of warnings. It turns out that a few places use "const static" rather than "static const". The former is deprecated according to the C standard. Tested by rebuilding with --enable-targets=all on x86-64 Fedora 18. * configure.ac (build_warnings): Add -Wold-style-declaration. * configure: Rebuild. * dsrec.c (make_srec): Use "static const", not "const static". * h8300-tdep.c (h8300_breakpoint_from_pc): Use "static const", not "const static". * mi/mi-parse.c (mi_no_values, mi_simple_values, mi_all_values): Use "static const", not "const static". * mn10300-tdep.c (mn10300_breakpoint_from_pc): Use "static const", not "const static". * moxie-tdep.c (moxie_breakpoint_from_pc): Use "static const", not "const static". * rs6000-tdep.c (rs6000_breakpoint_from_pc): Use "static const", not "const static". * v850-tdep.c (v850_breakpoint_from_pc): Use "static const", not "const static". (v850_dbtrap_breakpoint_from_pc): Likewise. * xstormy16-tdep.c (xstormy16_breakpoint_from_pc): Use "static const", not "const static". --- gdb/mi/mi-parse.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'gdb/mi') diff --git a/gdb/mi/mi-parse.c b/gdb/mi/mi-parse.c index 0f35f1d..a3c1849 100644 --- a/gdb/mi/mi-parse.c +++ b/gdb/mi/mi-parse.c @@ -28,9 +28,9 @@ #include "gdb_string.h" #include "cli/cli-utils.h" -const static char mi_no_values[] = "--no-values"; -const static char mi_simple_values[] = "--simple-values"; -const static char mi_all_values[] = "--all-values"; +static const char mi_no_values[] = "--no-values"; +static const char mi_simple_values[] = "--simple-values"; +static const char mi_all_values[] = "--all-values"; /* Like parse_escape, but leave the results as a host char, not a target char. */ -- cgit v1.1