diff options
Diffstat (limited to 'winsup/cygwin/regex/regcomp.c')
-rw-r--r-- | winsup/cygwin/regex/regcomp.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/winsup/cygwin/regex/regcomp.c b/winsup/cygwin/regex/regcomp.c index 30502f7f1..b44ba2c62 100644 --- a/winsup/cygwin/regex/regcomp.c +++ b/winsup/cygwin/regex/regcomp.c @@ -324,7 +324,10 @@ p_ere(struct parse *p, conc = HERE(); while (MORE() && (c = PEEK()) != '|' && c != stop) p_ere_exp(p); +#ifndef __CYGWIN__ + /* undefined behaviour according to POSIX; allowed by glibc */ (void)REQUIRE(HERE() != conc, REG_EMPTY); /* require nonempty */ +#endif if (!EAT('|')) break; /* NOTE BREAK OUT */ |