Related articles |
---|
Re: Removing GCC warnings from flex- and bison- generated C code fjh@cs.mu.oz.au (Fergus Henderson) (2004-01-12) |
Re: Removing GCC warnings from flex- and bison- generated C fjh@cs.mu.oz.au (Fergus Henderson) (2004-01-16) |
From: | Fergus Henderson <fjh@cs.mu.oz.au> |
Newsgroups: | comp.compilers |
Date: | 16 Jan 2004 22:29:46 -0500 |
Organization: | Compilers Central |
References: | 04-01-065 <20040112185347.7612.qmail@web40502.mail.yahoo.com> |
Keywords: | lex |
Posted-Date: | 16 Jan 2004 22:29:46 EST |
On 12-Jan-2004, John Millaway <johnmillaway@yahoo.com> wrote:
> > >ncap_lex.c:2865: warning: no previous prototype for `yyget_leng'
> > >ncap_lex.c:2874: warning: no previous prototype for `yyget_text'
> > >ncap_lex.c:2883: warning: no previous prototype for `yyset_lineno'
> > >ncap_lex.c:2895: warning: no previous prototype for `yyset_in'
> > >ncap_lex.c:2900: warning: no previous prototype for `yyset_out'
> > >ncap_lex.c:2905: warning: no previous prototype for `yyget_debug'
> > >ncap_lex.c:2910: warning: no previous prototype for `yyset_debug'
> > >ncap_lex.c:2916: warning: no previous prototype for `yylex_destroy'
> >
> > Those warnings can all be eliminated by declaring prototypes
> > for the corresponding functions.
>
> Or, preferably, use the option --header=FILE (%header=FILE) to generate a C
> header file which contains the prototypes. -John M
$ flex --header=foo.h foo.l
flex: unknown flag '-'. For usage, try
flex --help
$ flex --version
flex version 2.5.4
--
Fergus Henderson <fjh@cs.mu.oz.au> | "I have always known that the pursuit
The University of Melbourne | of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh> | -- the last words of T. S. Garp.
Return to the
comp.compilers page.
Search the
comp.compilers archives again.