* regex/regcomp.c (p_ere): Allow vertical-line following

left-parenthesis in ERE, as in glibc.
This commit is contained in:
Yaakov Selkowitz
2012-06-11 22:15:27 +00:00
parent 53943a2e87
commit 3e5a48af5e
2 changed files with 8 additions and 0 deletions

View File

@@ -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 */