help-flex
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Warning in Flex


From: Hans-Bernhard Broeker
Subject: Re: Warning in Flex
Date: Tue, 21 May 2002 00:47:05 +0200 (MET DST)

On Mon, 20 May 2002, Artur Kedzierski wrote:

>       Is there any way to remove the warning:
> "warning: label `find_rule' defined but not used" ?

Well, there always is: go into the source, find it, and remove it (or
rather, #ifdef it out based on some appropriate test).

>       I've noticed it appears when %option yylineno is used. I've search
> the net and found that other projects are having problems with it but
> nobody has the solution.

I don't quite agree to calling this a problem that needs to be solved.
It's some bit of an inconvenience that your compiler won't accept the code
generated by flex without warnings, but that's all it is.  It's just a
*warning*.  The situation it complains about is essentially harmless.

It's questionable whether it's even a good idea to compile
machine-generated source using compiler warning options originally meant
to check and improve human-written code.  The warnings about unused or
unreachable code fall into this category: for human-written code, they
provide an early warning concerning quality of coders' workmanship or
means to simplify the code, whereas for machine-generated code, they can
be hard enough to avoid as to cause more harm than good.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]