https://gcc.gnu.org/g:111c680dc8e2bbcb82c3ffb5bf2d65d6f71c000e

commit r17-4427-g111c680dc8e2bbcb82c3ffb5bf2d65d6f71c000e
Author: Xavier Del Campo Romero <[email protected]>
Date:   Thu Sep 17 22:56:46 2026 +0200

    cobol: Remove trailing pipe on time_fmt_b
    
    This invalid regular expression was somehow tolerated by glibc's
    implementation for regcomp(3), but was rejected by other
    implementations, such as those found in FreeBSD and OpenBSD.
    
    gcc/cobol/ChangeLog:
    
            PR cobol/127074
            * scan_post.h (datetime_format_of): Remove trailing pipe.

Diff:
---
 gcc/cobol/scan_post.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/cobol/scan_post.h b/gcc/cobol/scan_post.h
index 967d81662f4d..d7cf5abbe5bf 100644
--- a/gcc/cobol/scan_post.h
+++ b/gcc/cobol/scan_post.h
@@ -87,7 +87,7 @@ datetime_format_of( const char input[] ) {
   static const char date_fmt_e[] = "YYYY-MM-DD|YYYY-DDD|YYYY-Www-D";
 
   static const char time_fmt_b[] =
-    "hhmmss([.,]s+)?|hhmmss([.,]s+)?Z|hhmmss([.,]s+)?[+]hhmm|";
+    "hhmmss([.,]s+)?|hhmmss([.,]s+)?Z|hhmmss([.,]s+)?[+]hhmm";
   static const char time_fmt_e[] =
     "hh:mm:ss([.,]s+)?|hh:mm:ss([.,]s+)?Z|hh:mm:ss([.,]s+)?[+]hh:mm";

Reply via email to