]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
a68: fix handling of underscores in PARSE_INDICANT
authorJose E. Marchesi <jose.marchesi@oracle.com>
Mon, 22 Dec 2025 19:39:37 +0000 (20:39 +0100)
committerJose E. Marchesi <jose.marchesi@oracle.com>
Mon, 22 Dec 2025 19:42:11 +0000 (20:42 +0100)
Signed-off-by: Jose E. Marchesi <jemarch@gnu.org>
gcc/algol68/ChangeLog

* a68-imports.cc (PARSE_INDICANT): Fix handling of uderscore
characters.

gcc/testsuite/ChangeLog

* algol68/execute/modules/Modules20.map (module-bar): Add
underscores.

gcc/algol68/a68-imports.cc
gcc/testsuite/algol68/execute/modules/Modules20.map

index 2fbe15d4156fc7744d569376c32a427af0f5c217..d8c1f1f7ba92a648b0a5514d98d4573cc7cf5a80 100644 (file)
@@ -69,7 +69,9 @@
          (W)[i++] = *((P)++);                                          \
          while (ISALPHA (*(P)) || ISDIGIT(*(P)) || (*(P)) == '_')      \
            {                                                           \
-             if ((*(P)) != '_')                                        \
+             if ((*(P)) == '_')                                        \
+               (P)++;                                                  \
+             else                                                      \
                (W)[i++] = *((P)++);                                    \
            }                                                           \
        }                                                               \
index 4bcb669570eb3f01bf95f1dc7025a2cc147bce88..9dbfa071942bf5312558c58bb183b38a5d400155 100644 (file)
@@ -1,2 +1,2 @@
-module-foo=Foo:
-module-bar=Bar
+module-foo=F_oo:
+module-bar=Bar_