This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
GDB -Wmissing-prototypes and flex troubles
- From: "Pierre Muller" <pierre dot muller at ics-cnrs dot unistra dot fr>
- To: <gdb at sourceware dot org>
- Cc: "'Joel Brobecker'" <brobecker at adacore dot com>
- Date: Wed, 13 Jun 2012 01:20:03 +0200
- Subject: GDB -Wmissing-prototypes and flex troubles
I am working on MIPS CPU support
for Free Pascal and found a problem
inside GDB related to that.
I treid to set up a gdb automatic tester on
GCC compile farm gcc42.
muller@gcc42:~$ uname -a
Linux gcc42 2.6.27.1 #476 Tue Oct 20 14:25:23 CST 2009 mips64 GNU/Linux
But the compilation of GDB fails because the installed flex version
muller@gcc42:~$ flex --version
flex 2.5.33
(Cygwin installed flex 2.5.35 does add those prototypes)
Doesn't provide the missing prototypes required by the
use of this new warning used together with -Werror option.
I didn't really find any version requirement
for flex.
Should we:
1) Specify a minimal version for flex?
2) disable missing-prototypes option
for ada-exp.c compilation?
3) Do 2) if version if below
minimum version adding those prototypes?
Pierre Muller
Part of diff -u output:
--- ada-lex.c.mips 2012-06-12 17:04:54.789877300 +0200
+++ ada-lex.c 2012-06-12 17:11:39.852185300 +0200
@@ -9,7 +9,7 @@
#define FLEX_SCANNER
#define YY_FLEX_MAJOR_VERSION 2
#define YY_FLEX_MINOR_VERSION 5
-#define YY_FLEX_SUBMINOR_VERSION 33
+#define YY_FLEX_SUBMINOR_VERSION 35
#if YY_FLEX_SUBMINOR_VERSION > 0
#define FLEX_BETA
#endif
>>> Below
@@ -776,6 +889,35 @@
static int yy_init_globals (void );
+/* Accessor methods to globals.
+ These are made visible to non-reentrant scanners for convenience. */
+
+int yylex_destroy (void );
+
+int yyget_debug (void );
+
+void yyset_debug (int debug_flag );
+
+YY_EXTRA_TYPE yyget_extra (void );
+
+void yyset_extra (YY_EXTRA_TYPE user_defined );
+
+FILE *yyget_in (void );
+
+void yyset_in (FILE * in_str );
+
+FILE *yyget_out (void );
+
+void yyset_out (FILE * out_str );
+
+int yyget_leng (void );
+
+char *yyget_text (void );
+
+int yyget_lineno (void );
+
+void yyset_lineno (int line_number );
+
/* Macros after this point can all be overridden by user definitions in
* section 1.
*/