This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH: silence warnings from gengtype-lex.c
- From: "Kaveh R. GHAZI" <ghazi at caip dot rutgers dot edu>
- To: Ben Elliston <bje at au1 dot ibm dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Sat, 6 Jan 2007 03:13:19 -0500 (EST)
- Subject: Re: PATCH: silence warnings from gengtype-lex.c
- References: <1167964457.24478.21.camel@localhost>
On Fri, 5 Jan 2007, Ben Elliston wrote:
> This patch adds some flex %option directives to avoid generating
> functions that GCC subsequently warns about. From looking at the other
> options being used, it seems we're not even pretending to retain lex
> compatibility, so these seem harmless. Okay for the trunk?
>
> (I evaluated a few options and this seems to be the cleanest.)
>
> Ben
>
>
> 2007-01-05 Ben Elliston <bje@au.ibm.com>
>
> * gengtype-lex.l: Add %option directives to exclude the following
> routines from the generated scanner: yyget_lineno, yyget_in,
> yyget_out, yyget_leng, yyget_text, yyset_lineno, yyset_in,
> yyset_out, yyget_debug, yyset_debug. Tidy up other %options.
Does your patch make it possible to to remove these lines from
Makefile.in?
# flex output may yield harmless "no previous prototype" warnings
build/gengtype-lex.o-warn = -Wno-error
Hmm, I get these warnings:
gengtype-lex.c: In function 'yy_get_next_buffer':
gengtype-lex.c:2658: warning: old-style function definition
gengtype-lex.c: In function 'yy_get_previous_state':
gengtype-lex.c:2790: warning: old-style function definition
gengtype-lex.c: In function 'input':
gengtype-lex.c:2903: warning: old-style function definition
so I'm not sure.
Thanks,
--Kaveh
--
Kaveh R. Ghazi ghazi@caip.rutgers.edu