[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: bison-2.1 compilation warnings
From: |
Akim Demaille |
Subject: |
Re: bison-2.1 compilation warnings |
Date: |
Wed, 10 May 2006 22:36:41 +0200 |
Le 10 mai 06 à 22:00, Bruno Haible a écrit :
hi Bruno,
============================
/* Begin user sect3 */
#define yywrap(n) 1
#define YY_SKIP_YYWRAP
============================
That's weird, yywrap is not expected to take arguments. There is a
problem in the Bison distro, agreed, but the problem is with lex
generated code, improperly used by itself. None of the code you
quote is shipped or generated by bison.
What lex is that? Hm, it looks like flex code, I have similar comments
in my output, but
sulaco% lex --version
lex version 2.5.4
sulaco% grep yywrap _build/examples/calc++/calc++-scanner.cc
/* Flag which is used to allow yywrap()'s to do buffer switches
#define yywrap() 1
# undef yywrap
# define yywrap() 1
extern "C" int yywrap YY_PROTO(( void ));
extern int yywrap YY_PROTO(( void ));
if ( yywrap() )
if ( yywrap() )
* EOF (yywrap()) processing, but the only time this flag
* is looked at is after yywrap() is called, so it's safe
and on another machine, I have:
~/src/bison % flex --version
nostromo 22:34
flex 2.5.33
~/src/bison % grep yywrap _build/examples/calc++/calc++-scanner.cc
/* Flag which is used to allow yywrap()'s to do buffer switches
#define yywrap() 1
# undef yywrap
# define yywrap() 1
extern "C" int yywrap (void );
extern int yywrap (void );
if ( yywrap( ) )
if ( yywrap( ) )
* EOF (yywrap()) processing, but the only time this flag
* is looked at is after yywrap() is called, so it's safe
~/src/bison % grep -A3 sect3 _build/examples/calc++/calc++-scanner.cc
/* Begin user sect3 */
#define yywrap() 1
#define YY_SKIP_YYWRAP
You seem to be using a broken version of Flex.