In order To get more compatibility between flex and other version of lex , we should add -l option in flex command.
One of these incompatibilities is yylineno (global variable to store line number). Although there are two ways to activate this option :
-
using %option yylineno
-
or -l option
I have always this kind of warning :
warning C4102: ‘find_rule’ : unreferenced label
any help please to avoid this warning!
Since you say that the code triggering the warning is auto-generated and can’t be controlled by you, the only way to get rid of the warning is to suppress it for that code only. You have two options.
Option one is to alter the compiler settings for the specific file (not the best thing to maintain).
Option 2 is to
#includethe .c file into another file and wrap that into#pragma warning:and (important!) either not include the problematic .c file into the project or exclude the original .c file from build (“Excluded from build” property) so that it is not compiled and linked twice.