bug-gawk
[Top][All Lists]
Advanced

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

Re: [bug-gawk] gawk erroneous comparison with large negative exponents


From: Andrew J. Schorr
Subject: Re: [bug-gawk] gawk erroneous comparison with large negative exponents
Date: Fri, 17 Apr 2015 15:31:16 -0400
User-agent: Mutt/1.5.23 (2014-03-12)

Hi,

Also, towards the top of r_force_number, I see this logic:

        if (! do_posix) {
                if (is_alpha((unsigned char) *cp)) {
                        return n;
                } else if (n->stlen == 4 && is_ieee_magic_val(n->stptr)) {
                        if ((n->flags & MAYBE_NUM) != 0)
                                n->flags &= ~MAYBE_NUM;
                        n->flags |= NUMBER|NUMCUR;
                        n->numbr = get_ieee_magic_val(n->stptr);

                        return n;
                }
                /* else
                        fall through */
        }

As you can see, it is possible to set the NUMBER flag even if MAYBE_NUM
was not previously set.  Is this logic correct, or should we avoid setting
NUMBER unless MAYBE_NUM was set?

Regards,
Andy



reply via email to

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