This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils 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] |
The file arlex.c, generated from arlex.l, generates some warnings. This patch silences those warnings. The only part I am uncertain about is the use of %option nounput. This looks to be a flex-specific option that may not be supported by other versions of lex(1). Is this true? Does it really matter? If it's okay, then I presume it's safe to cease defining YY_NO_UNPUT, as this has no effect in the code generated by modern versions of flex. This is the last in a series of patches from me to eliminate warnings from binutils. On my systems, it now compiles rather silently with make -s. 2004-12-08 Ben Elliston <bje@au.ibm.com> * arlex.l: Use %option nounput instead of .. (YY_NO_UNPUT): Don't #define. (yylex, yyget_lineno, yyget_leng): Provide extern declarations. (yyget_in, yyget_out, yyget_text): Likewise. (yyset_lineno, yyset_in, yyset_out): Likewise. (yyget_debug, yyset_debug, yylex_destroy): Likewise. Index: arlex.l =================================================================== RCS file: /home/bje/src-cvs/src/binutils/arlex.l,v retrieving revision 1.7 diff -u -p -r1.7 arlex.l --- arlex.l 14 Sep 2003 12:20:16 -0000 1.7 +++ arlex.l 8 Dec 2004 03:04:16 -0000 @@ -1,7 +1,7 @@ %{ /* arlex.l - Strange script language lexer */ -/* Copyright 1992, 1997, 2000, 2002, 2003 Free Software Foundation, Inc. +/* Copyright 1992, 1997, 2000, 2002, 2003, 2004 Free Software Foundation, Inc. This file is part of GNU Binutils. @@ -19,25 +19,34 @@ You should have received a copy of the G along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +/* Contributed by Steve Chamberlain <sac@cygnus.com>. */ -/* Contributed by Steve Chamberlain - sac@cygnus.com - -*/ #define DONTDECLARE_MALLOC #include "ansidecl.h" #include "libiberty.h" #include "arparse.h" -#define YY_NO_UNPUT - extern int yylex (void); +extern int yyget_lineno (void); +extern int yyget_leng (void); +extern FILE *yyget_in (void); +extern FILE *yyget_out (void); +extern char *yyget_text (void); +extern void yyset_lineno (int); +extern void yyset_in (FILE *); +extern void yyset_out (FILE *); +extern int yyget_debug (void); +extern void yyset_debug (int); +extern int yylex_destroy (void); int linenumber; %} %a 10000 %o 25000 + +/* Don't emit a yyunput function in the generated scanner. */ +%option nounput %%
Attachment:
signature.asc
Description: Digital signature
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |