bug-gawk
[Top][All Lists]
Advanced

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

Re: Yet another small observation about warnings


From: arnold
Subject: Re: Yet another small observation about warnings
Date: Sat, 21 Oct 2023 11:40:04 -0600
User-agent: Heirloom mailx 12.5 7/5/10

The attached patch fixes the problem.

Thanks,

Arnold

arnold@skeeve.com wrote:

> 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

Attachment: noeffect.diff
Description: Text document


reply via email to

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