gawk-diffs
[Top][All Lists]
Advanced

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

[SCM] gawk branch, gawk-5.2-stable, updated. gawk-4.1.0-5079-g7d3a83d4


From: Arnold Robbins
Subject: [SCM] gawk branch, gawk-5.2-stable, updated. gawk-4.1.0-5079-g7d3a83d4
Date: Tue, 3 Oct 2023 08:37:58 -0400 (EDT)

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "gawk".

The branch, gawk-5.2-stable has been updated
       via  7d3a83d4bdca0f4b442acaef11d5840ca74032b5 (commit)
      from  ab4c3b5f1ba954788b0e817c16de1b380a6d1396 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.sv.gnu.org/cgit/gawk.git/commit/?id=7d3a83d4bdca0f4b442acaef11d5840ca74032b5

commit 7d3a83d4bdca0f4b442acaef11d5840ca74032b5
Author: Arnold D. Robbins <arnold@skeeve.com>
Date:   Tue Oct 3 15:37:28 2023 +0300

    Fix a bug combining --lint, --pretty and operator +.

diff --git a/ChangeLog b/ChangeLog
index ce408146..92ecb80b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2023-10-03         Arnold D. Robbins     <arnold@skeeve.com>
+
+       * profile.c (pprint): Add case for Op_lint_plus. Thanks to
+       Hermann Peifer for the report.
+
 2023-09-19         Arnold D. Robbins     <arnold@skeeve.com>
 
        * NEWS: Updated.
diff --git a/pc/ChangeLog b/pc/ChangeLog
index ba84284e..f776f7bd 100644
--- a/pc/ChangeLog
+++ b/pc/ChangeLog
@@ -1,3 +1,7 @@
+2023-10-03         Arnold D. Robbins     <arnold@skeeve.com>
+
+       * Makefile.tst: Regenerated.
+
 2023-09-13         Arnold D. Robbins     <arnold@skeeve.com>
 
        * Makefile.tst: Regenerated.
diff --git a/pc/Makefile.tst b/pc/Makefile.tst
index afc7124d..630903d1 100644
--- a/pc/Makefile.tst
+++ b/pc/Makefile.tst
@@ -206,8 +206,8 @@ GAWK_EXT_TESTS = \
        incdupe3 incdupe4 incdupe5 incdupe6 incdupe7 include include2 \
        indirectbuiltin indirectcall indirectcall2 \
        indirectcall3 intarray iolint isarrayunset lint \
-       lintexp lintindex lintint lintlength lintold lintplus lintset \
-       lintwarn manyfiles match1 match2 match3 mbstr1 mbstr2 \
+       lintexp lintindex lintint lintlength lintold lintplus lintplus2 \
+       lintset lintwarn manyfiles match1 match2 match3 mbstr1 mbstr2 \
        mdim1 mdim2 mdim3 mdim4 mdim5 mdim6 mdim7 mdim8 \
        mixed1 mktime modifiers muldimposix nastyparm negtime \
        next nondec nondec2 nonfatal1 nonfatal2 nonfatal3 nsawk1a nsawk1b \
@@ -255,7 +255,7 @@ NEED_DEBUG = dbugtypedre1 dbugtypedre2 dbugeval2 dbugeval3 
dbugeval4
 
 # List of the tests which should be run with --lint option:
 NEED_LINT = \
-       defref fmtspcl lintexp lintindex lintint lintlength lintplus \
+       defref fmtspcl lintexp lintindex lintint lintlength lintplus lintplus2 \
        lintwarn noeffect nofmtch nonl shadow uninit2 uninit3 uninit4 \
        uninit5 uninitialized
 
@@ -278,7 +278,7 @@ NEED_NONDEC = mpfrbigint2 nondec2 intarray forcenum
 NEED_POSIX = escapebrace printf0 posix2008sub paramasfunc1 paramasfunc2 
muldimposix posix_compare
 
 # List of tests that need --pretty-print
-NEED_PRETTY = nsprof1 nsprof2 \
+NEED_PRETTY = lintplus2 nsprof1 nsprof2 \
        profile4 profile5 profile8 profile9 profile10 profile11 profile13 \
        profile14 profile15 profile16 profile17
 
@@ -3092,6 +3092,11 @@ lintplus:
        @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk  --lint >_$@ 2>&1 || echo EXIT 
CODE: $$? >>_$@
        @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
 
+lintplus2:
+       @echo $@
+       @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk  --lint --pretty-print=_$@ >_$@ 
2>&1 || echo EXIT CODE: $$? >>_$@
+       @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+
 lintset:
        @echo $@
        @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk  >_$@ 2>&1 || echo EXIT CODE: 
$$? >>_$@
diff --git a/profile.c b/profile.c
index aa091c58..256c641d 100644
--- a/profile.c
+++ b/profile.c
@@ -624,6 +624,7 @@ cleanup:
                case Op_newfile:
                case Op_get_record:
                case Op_lint:
+               case Op_lint_plus:
                case Op_jmp:
                case Op_jmp_false:
                case Op_jmp_true:
diff --git a/test/ChangeLog b/test/ChangeLog
index 28a0a0db..f9f59031 100644
--- a/test/ChangeLog
+++ b/test/ChangeLog
@@ -1,3 +1,8 @@
+2023-10-03         Arnold D. Robbins     <arnold@skeeve.com>
+
+       * Makefile.am (EXTRA_DIST): New test, lintplus2.
+       * lintplus2.awk, lintplus2.ok: New files.
+
 2023-09-13         Arnold D. Robbins     <arnold@skeeve.com>
 
        * Makefile.am (EXTRA_DIST): New test, gsubnulli18n.
diff --git a/test/Makefile.am b/test/Makefile.am
index b20fa576..46af1c13 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -684,6 +684,8 @@ EXTRA_DIST = \
        lintold.ok \
        lintplus.awk \
        lintplus.ok \
+       lintplus2.awk \
+       lintplus2.ok \
        lintset.awk \
        lintset.ok \
        lintwarn.awk \
@@ -1532,8 +1534,8 @@ GAWK_EXT_TESTS = \
        incdupe3 incdupe4 incdupe5 incdupe6 incdupe7 include include2 \
        indirectbuiltin indirectcall indirectcall2 \
        indirectcall3 intarray iolint isarrayunset lint \
-       lintexp lintindex lintint lintlength lintold lintplus lintset \
-       lintwarn manyfiles match1 match2 match3 mbstr1 mbstr2 \
+       lintexp lintindex lintint lintlength lintold lintplus lintplus2 \
+       lintset lintwarn manyfiles match1 match2 match3 mbstr1 mbstr2 \
        mdim1 mdim2 mdim3 mdim4 mdim5 mdim6 mdim7 mdim8 \
        mixed1 mktime modifiers muldimposix nastyparm negtime \
        next nondec nondec2 nonfatal1 nonfatal2 nonfatal3 nsawk1a nsawk1b \
@@ -1584,7 +1586,7 @@ NEED_DEBUG = dbugtypedre1 dbugtypedre2 dbugeval2 
dbugeval3 dbugeval4
 
 # List of the tests which should be run with --lint option:
 NEED_LINT = \
-       defref fmtspcl lintexp lintindex lintint lintlength lintplus \
+       defref fmtspcl lintexp lintindex lintint lintlength lintplus lintplus2 \
        lintwarn noeffect nofmtch nonl shadow uninit2 uninit3 uninit4 \
        uninit5 uninitialized
 
@@ -1605,7 +1607,7 @@ NEED_NONDEC = mpfrbigint2 nondec2 intarray forcenum
 NEED_POSIX = escapebrace printf0 posix2008sub paramasfunc1 paramasfunc2 
muldimposix posix_compare
 
 # List of tests that need --pretty-print
-NEED_PRETTY = nsprof1 nsprof2 \
+NEED_PRETTY = lintplus2 nsprof1 nsprof2 \
        profile4 profile5 profile8 profile9 profile10 profile11 profile13 \
        profile14 profile15 profile16 profile17
 
diff --git a/test/Makefile.in b/test/Makefile.in
index 5ed1b735..e49220b4 100644
--- a/test/Makefile.in
+++ b/test/Makefile.in
@@ -952,6 +952,8 @@ EXTRA_DIST = \
        lintold.ok \
        lintplus.awk \
        lintplus.ok \
+       lintplus2.awk \
+       lintplus2.ok \
        lintset.awk \
        lintset.ok \
        lintwarn.awk \
@@ -1800,8 +1802,8 @@ GAWK_EXT_TESTS = \
        incdupe3 incdupe4 incdupe5 incdupe6 incdupe7 include include2 \
        indirectbuiltin indirectcall indirectcall2 \
        indirectcall3 intarray iolint isarrayunset lint \
-       lintexp lintindex lintint lintlength lintold lintplus lintset \
-       lintwarn manyfiles match1 match2 match3 mbstr1 mbstr2 \
+       lintexp lintindex lintint lintlength lintold lintplus lintplus2 \
+       lintset lintwarn manyfiles match1 match2 match3 mbstr1 mbstr2 \
        mdim1 mdim2 mdim3 mdim4 mdim5 mdim6 mdim7 mdim8 \
        mixed1 mktime modifiers muldimposix nastyparm negtime \
        next nondec nondec2 nonfatal1 nonfatal2 nonfatal3 nsawk1a nsawk1b \
@@ -1849,7 +1851,7 @@ NEED_DEBUG = dbugtypedre1 dbugtypedre2 dbugeval2 
dbugeval3 dbugeval4
 
 # List of the tests which should be run with --lint option:
 NEED_LINT = \
-       defref fmtspcl lintexp lintindex lintint lintlength lintplus \
+       defref fmtspcl lintexp lintindex lintint lintlength lintplus lintplus2 \
        lintwarn noeffect nofmtch nonl shadow uninit2 uninit3 uninit4 \
        uninit5 uninitialized
 
@@ -1872,7 +1874,7 @@ NEED_NONDEC = mpfrbigint2 nondec2 intarray forcenum
 NEED_POSIX = escapebrace printf0 posix2008sub paramasfunc1 paramasfunc2 
muldimposix posix_compare
 
 # List of tests that need --pretty-print
-NEED_PRETTY = nsprof1 nsprof2 \
+NEED_PRETTY = lintplus2 nsprof1 nsprof2 \
        profile4 profile5 profile8 profile9 profile10 profile11 profile13 \
        profile14 profile15 profile16 profile17
 
@@ -4868,6 +4870,11 @@ lintplus:
        @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk  --lint >_$@ 2>&1 || echo EXIT 
CODE: $$? >>_$@
        @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
 
+lintplus2:
+       @echo $@
+       @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk  --lint --pretty-print=_$@ >_$@ 
2>&1 || echo EXIT CODE: $$? >>_$@
+       @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+
 lintset:
        @echo $@
        @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk  >_$@ 2>&1 || echo EXIT CODE: 
$$? >>_$@
diff --git a/test/Maketests b/test/Maketests
index e7ad8c52..4a2f3a0e 100644
--- a/test/Maketests
+++ b/test/Maketests
@@ -1774,6 +1774,11 @@ lintplus:
        @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk  --lint >_$@ 2>&1 || echo EXIT 
CODE: $$? >>_$@
        @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
 
+lintplus2:
+       @echo $@
+       @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk  --lint --pretty-print=_$@ >_$@ 
2>&1 || echo EXIT CODE: $$? >>_$@
+       @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+
 lintset:
        @echo $@
        @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk  >_$@ 2>&1 || echo EXIT CODE: 
$$? >>_$@
diff --git a/test/lintplus2.awk b/test/lintplus2.awk
new file mode 100644
index 00000000..99435bc9
--- /dev/null
+++ b/test/lintplus2.awk
@@ -0,0 +1,3 @@
+BEGIN {
+       1 > 2 ? 1 + 1 : 2
+}
diff --git a/test/lintplus2.ok b/test/lintplus2.ok
new file mode 100644
index 00000000..470ab5cd
--- /dev/null
+++ b/test/lintplus2.ok
@@ -0,0 +1,4 @@
+BEGIN {
+       1 > 2 ? 1 + 1 : 2
+}
+

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog          |  5 +++++
 pc/ChangeLog       |  4 ++++
 pc/Makefile.tst    | 13 +++++++++----
 profile.c          |  1 +
 test/ChangeLog     |  5 +++++
 test/Makefile.am   | 10 ++++++----
 test/Makefile.in   | 15 +++++++++++----
 test/Maketests     |  5 +++++
 test/lintplus2.awk |  3 +++
 test/lintplus2.ok  |  4 ++++
 10 files changed, 53 insertions(+), 12 deletions(-)
 create mode 100644 test/lintplus2.awk
 create mode 100644 test/lintplus2.ok


hooks/post-receive
-- 
gawk



reply via email to

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