gawk-diffs
[Top][All Lists]
Advanced

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

[SCM] gawk branch, feature/minrx, updated. gawk-4.1.0-5504-g1b2042ee


From: Arnold Robbins
Subject: [SCM] gawk branch, feature/minrx, updated. gawk-4.1.0-5504-g1b2042ee
Date: Fri, 22 Dec 2023 03:56:23 -0500 (EST)

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, feature/minrx has been updated
       via  1b2042ee0556dfbdfb0ed6132c1f4e7bfc915dbf (commit)
      from  8c6674cb1c2b28e69bdb3a3897aa4584c25afcc4 (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=1b2042ee0556dfbdfb0ed6132c1f4e7bfc915dbf

commit 1b2042ee0556dfbdfb0ed6132c1f4e7bfc915dbf
Author: Arnold D. Robbins <arnold@skeeve.com>
Date:   Fri Dec 22 10:55:51 2023 +0200

    Fixes after drop 7 (add error messages).

diff --git a/awkgram.c b/awkgram.c
index 1bb00003..74964ad3 100644
--- a/awkgram.c
+++ b/awkgram.c
@@ -2383,7 +2383,7 @@ yyreduce:
                        if (len == 0)
                                lintwarn_ln(yyvsp[0]->source_line,
                                        _("regexp constant `//' looks like a 
C++ comment, but is not"));
-                       else if (re[0] == '*' && re[len-1] == '*')
+                       else if (use_gnu_matchers && re[0] == '*' && re[len-1] 
== '*')
                                /* possible C comment */
                                lintwarn_ln(yyvsp[0]->source_line,
                                        _("regexp constant `/%s/' looks like a 
C comment, but is not"), re);
diff --git a/awkgram.y b/awkgram.y
index 5f0697b0..50918a25 100644
--- a/awkgram.y
+++ b/awkgram.y
@@ -562,7 +562,7 @@ regexp
                        if (len == 0)
                                lintwarn_ln($3->source_line,
                                        _("regexp constant `//' looks like a 
C++ comment, but is not"));
-                       else if (re[0] == '*' && re[len-1] == '*')
+                       else if (use_gnu_matchers && re[0] == '*' && re[len-1] 
== '*')
                                /* possible C comment */
                                lintwarn_ln($3->source_line,
                                        _("regexp constant `/%s/' looks like a 
C comment, but is not"), re);
diff --git a/re.c b/re.c
index 6c773a8a..91c6892e 100644
--- a/re.c
+++ b/re.c
@@ -328,7 +328,7 @@ make_regexp(const char *s, size_t len, bool ignorecase, 
bool dfa, bool canfatal)
                } else
                        rp->dfareg = NULL;
        } else {
-               int flags = MINRX_REG_EXTENDED | MINRX_REG_ESCAPE_BRACK;
+               int flags = MINRX_REG_EXTENDED | MINRX_REG_BRACK_ESCAPE | 
MINRX_REG_BRACE_COMPAT;
                int ret;
 
                if (ignorecase)
diff --git a/test/lintwarn.awk b/test/lintwarn.awk
index cca53d8e..eaf1ebdf 100644
--- a/test/lintwarn.awk
+++ b/test/lintwarn.awk
@@ -26,7 +26,7 @@ BEGIN {
        a
        f(/pqr/)
        //
-       /* */
+       # /* */         # not good with minrx
 }
 END {
        getline
diff --git a/test/lintwarn.ok b/test/lintwarn.ok
index 5a80599a..b30a0824 100644
--- a/test/lintwarn.ok
+++ b/test/lintwarn.ok
@@ -24,8 +24,6 @@ gawk: lintwarn.awk:26: warning: statement has no effect
 gawk: lintwarn.awk:27: warning: regexp constant for parameter #1 yields 
boolean value
 gawk: lintwarn.awk:28: warning: regexp constant `//' looks like a C++ comment, 
but is not
 gawk: lintwarn.awk:28: warning: statement has no effect
-gawk: lintwarn.awk:29: warning: regexp constant `/* */' looks like a C 
comment, but is not
-gawk: lintwarn.awk:29: warning: statement has no effect
 gawk: lintwarn.awk:32: warning: non-redirected `getline' undefined inside END 
action
 gawk: lintwarn.awk:34: error: function `zz': parameter #2, `aa', duplicates 
parameter #1
 gawk: lintwarn.awk:38: warning: `include' is a gawk extension
diff --git a/test/regexpbad.ok b/test/regexpbad.ok
index f9b90b2f..c33d81f6 100644
--- a/test/regexpbad.ok
+++ b/test/regexpbad.ok
@@ -1,2 +1,2 @@
-gawk: regexpbad.awk:1: error: Invalid regular expression: /^[^[]\x5b/
+gawk: regexpbad.awk:1: error: unbalanced [: /^[^[]\x5b/
 EXIT CODE: 1

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

Summary of changes:
 awkgram.c         | 2 +-
 awkgram.y         | 2 +-
 re.c              | 2 +-
 test/lintwarn.awk | 2 +-
 test/lintwarn.ok  | 2 --
 test/regexpbad.ok | 2 +-
 6 files changed, 5 insertions(+), 7 deletions(-)


hooks/post-receive
-- 
gawk



reply via email to

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