bug-gnu-utils
[Top][All Lists]
Advanced

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

Re: bug: print-"6"


From: Aharon Robbins
Subject: Re: bug: print-"6"
Date: Thu, 23 Aug 2001 14:00:33 +0300

Greetings.  Re this:

> To: address@hidden
> Cc: address@hidden
> From: David Jones <address@hidden>
> Subject: bug: print-"6"
> Date: Thu, 23 Aug 2001 09:24:21 +0000
>
> I think this program exhibits a bug:
> ./gawk 'BEGIN{print-"6"}'
> It prints the following:
> 6
>
> Here's the output of ./gawk --version
>
> GNU Awk 3.1.0

This is indeed a bug.  Here's an unofficial patch.  Thanks!

Arnold Robbins
-------------------------------------------
*** ../gawk-3.1.0/awkgram.y     Mon Apr 23 10:25:58 2001
--- awkgram.y   Thu Aug 23 13:57:13 2001
***************
*** 819,825 ****
  
        | '-' simp_exp    %prec UNARY
                {
!                 if ($2->type == Node_val) {
                        $2->numbr = -(force_number($2));
                        $$ = $2;
                  } else
--- 819,825 ----
  
        | '-' simp_exp    %prec UNARY
                {
!                 if ($2->type == Node_val && ($2->flags & (STR|STRING)) == 0) {
                        $2->numbr = -(force_number($2));
                        $$ = $2;
                  } else



reply via email to

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