bug-gawk
[Top][All Lists]
Advanced

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

Re: [bug-gawk] can we get a warning for undefined behavior?


From: Ed Morton
Subject: Re: [bug-gawk] can we get a warning for undefined behavior?
Date: Wed, 8 Aug 2018 07:31:56 -0500
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1

great, thanks for the update and, more importantly, for adding the 
functionality!

    Ed.

On 8/8/2018 7:20 AM, address@hidden wrote:
Hi.

Ed Morton <address@hidden> wrote:

I notice that these:

$ echo 'foo bar' | awk --lint '{NF--}1'        # UB: decrementing NF
foo

$ echo 'foo bar' | awk --lint 'END{print $0}'    # UB: using $0 in END
foo bar
These two are medium hard to do. They're on my list, along with
the other things you sent in private email.

$ echo 'foo bar' | awk --lint '/\o/'    # UB: backslash before literal char
foo bar

$ echo 'foo bar' | awk --lint '{print > "file" 1}'    # UB: unparenthesized
right side of I/O redirection
I have added warnings for these two and they're in the code base.

Thanks,

Arnold




reply via email to

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