Hi.
Hermann Peifer <peifer@gmx.eu> wrote:
For information. Hermann
> # No warning here, that's fine for me.
> ./gawk 'BEGIN{0}'
>
> # A lint warning here, makes sense to me.
> ./gawk --lint 'BEGIN{0}'
gawk: cmd. line:1: warning: statement has no effect
>
> # --profile makes the lint warning go away. Why?
> ./gawk --lint --profile 'BEGIN{0}'
Different internal code is produced with both --lint and
--profile. The combination isn't one I generally use. I
will have to take a look at this in a debugger to understand
why adding --profile drops the lint warning.
Do understand that there are two types of lint warnings. One
type is issued when gawk parses the program. The other is
issued as gawk runs and discovers unusual things. "no effect"
warning is a parse time warning.
Thanks,
Arnold