[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
flex 2.5.31 make check bugs
From: |
Bruce Lilly |
Subject: |
flex 2.5.31 make check bugs |
Date: |
Wed, 16 Apr 2003 17:31:35 -0400 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.3) Gecko/20030312 |
A number of tests fail because of bugs in flex 2.5.31. E.g.:
$ cat test-basic-nr/OUTPUT
make[4]: Entering directory `/D/TEMP/flex/flex-2.5.31/tests/test-basic-nr'
../../flex scanner.l
cc -c -o scanner.o -I. -I../.. -I../.. -g scanner.c
cpp: "scanner.c", line 867: warning: testwrap: 1 actual argument expected
cpp: "scanner.c", line 1158: warning: testwrap: 1 actual argument expected
scanner.c(867) : error C2065: 'testwrap' : undeclared identifier
scanner.c(1298) : warning C4273: 'isatty' : inconsistent dll linkage.
dllexport assumed.
make[4]: *** [scanner.o] Error 1
make[4]: Leaving directory `/D/TEMP/flex/flex-2.5.31/tests/test-basic-nr'
$ grep wrap test-basic-nr/scanner.l
%option nounput noyywrap noyylineno warn nodefault
$
The problem in this case (there are failures in other tests) is that
1. %option noyywrap is specified
2. a prefix is used
3. testwrap is defined as a macro taking one argument
4. normally (i.e. w/o %option noyywrap) testwrap would be declared as
an external function taking no argument
5. testwrap() appears in the flex-generated code as a function/macro
call, but with no argument given.
Clearly, the macro definition is incompatible with the code usage.
$ grep -i wrap test-basic-nr/scanner.c
/* Flag which is used to allow testwrap()'s to do buffer switches
#define testwrap(n) 1
#define YY_SKIP_YYWRAP
#ifndef YY_SKIP_YYWRAP
extern "C" int testwrap (void );
extern int testwrap (void );
if ( testwrap( ) )
if ( testwrap( ) )
* EOF (testwrap()) processing, but the only time this flag
* is looked at is after testwrap() is called, so it's safe
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- flex 2.5.31 make check bugs,
Bruce Lilly <=