This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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]

Re: PATCH: silence warnings from gengtype-lex.c


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


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