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

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

Re: pgawk bug


From: Aharon Robbins
Subject: Re: pgawk bug
Date: Thu, 30 Jun 2005 11:55:42 +0300

Greetings. Re this:

> Date: Wed, 29 Jun 2005 21:22:51 -0400
> From: "Nielsen, Dan (Corporate)" <address@hidden>
> Subject: pgawk bug
> To: address@hidden
>
> Arnold,
>
> First off. Thank you for all the time and energy you put into maintaining
> gawk. It is very much appreciated. And yes, I do support you indirectly
> by purchasing all of your O'Reilly books. They might not be the latest
> editions but they are well worn.
> 
> Now, here is my problem. I am running the script shown below. Actually,
> it is part of something much larger but this highlights the area where the
> profiler is inaccurate. The program executes properly but the profiler
> output in awkprof.out is missing an exclamation character following the
> "if" test.
>
> environment: gawk/pgawk version 3.1.4 under Microsoft Windows 2000
>
> source:
>
> # ZERROR4.AWK - PGAWK 3.1.4 profile error
> # How to run:
> #   PGAWK -f C:\AWK\ZERROR4.AWK
> #   TYPE AWKPROF.OUT
> BEGIN {
> a = 0
> if (!(a == 0)) {} # awkprof.out lacks the "!"
> if ( (a == 0)) {}
> }
>
> awkprof.out:
>
>       # gawk profile, created Wed Jun 29 19:43:19 2005
>
>       # BEGIN block(s)
>
>       BEGIN {
>      1        a = 0
>      1        if ((a == 0)) {
>               }
>      1        if (a == 0) { # 1
>               }
>       }

Thanks for the bug report. Talk about a Day One Bug.  Here is the fix.

Arnold
------------------------------------------------------------------
Thu Jun 30 11:52:34 2005  Arnold D. Robbins  <address@hidden>

        * profile.c (tree_eval): Node_not: Remember to print the exclamation
        point!  Thanks to Dan Nielsen <address@hidden>
        for the bug report.

--- ../gawk-3.1.4/profile.c     2004-07-28 16:47:17.000000000 +0300
+++ profile.c   2005-06-30 11:51:36.593133078 +0300
@@ -491,6 +491,7 @@
                return;
 
        case Node_not:
+               fprintf(prof_fp, "! ");
                parenthesize(tree->type, tree->lnode);
                return;
 




reply via email to

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