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: Hermann Peifer
Subject: Re: Yet another small observation about warnings
Date: Sat, 21 Oct 2023 19:52:25 +0200
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.15.1

Indeed. It does. Thanks, Hermann

On 21/10/2023 19.40, arnold@skeeve.com wrote:
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




reply via email to

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