Tracker: Bugs

5 Ignore --noreject and --noyymore with -l - ID: 3510440
Last Update: Comment added ( wlestes )

When use in lex-compatible mode, flex generates REJECT and yymore() macros whenever them are used by actions or not.
These leads to warnings when compile generated file with '-Wall' option to compiler:

test.c: In function ‘yylex’:
test.c:876: warning: label ‘find_rule’ defined but not used
parser.l: At top level:
test.c:2073: warning: ‘yy_flex_strlen’ defined but not used

I inspect flex source files, and found in "main.c" next lines:


661 if ( lex_compat )
...
669 /* Don't rely on detecting use of yymore() and REJECT,
670 * just assume they'll be used.
671 */
672 yymore_really_used = reject_really_used = true;

I don't understand why autodetection needed to be disabled, but this also disable (make been ignored) --noreject and --noyymore options.

When remove last 4 lines, everything OK: REJECT and yymore() are not generated and warnings disappear.


Andrey Tsyvarev ( tsyvarev ) - 2012-03-23 02:40:47 PDT

5

Closed

Fixed

Nobody/Anonymous

Generating the scanner

2.5.35

Public


Comment ( 1 )

Date: 2012-08-07 18:51:17 PDT
Sender: wlestesProject Admin

This has been fixed in the flex codebase and will be included in the next
release.



Attached File ( 1 )

Filename Description Download
parser.l Some lex-file which produce warnings described Download

Changes ( 5 )

Field Old Value Date By
status_id Open 2012-08-07 18:51:17 PDT wlestes
resolution_id None 2012-08-07 18:51:17 PDT wlestes
allow_comments 1 2012-08-07 18:51:17 PDT wlestes
close_date - 2012-08-07 18:51:17 PDT wlestes
File Added 439125: parser.l 2012-03-23 02:40:49 PDT tsyvarev