* m4/regex.m4 (gl_REGEX): Ensure that re_compiler_pattern
diagnoses [b-a] as invalid when using RE_SYNTAX_POSIX_EGREP.
Currently, glibc-2.11.90-10 fails to do that.
if (!s)
return 1;
+ /* Ensure that [b-a] is diagnosed as invalid. */
+ re_set_syntax (RE_SYNTAX_POSIX_EGREP);
+ memset (®ex, 0, sizeof regex);
+ s = re_compile_pattern ("a[b-a]", 6, ®ex);
+ if (s == 0)
+ return 1;
+
/* This should succeed, but does not for glibc-2.1.3. */
memset (®ex, 0, sizeof regex);
s = re_compile_pattern ("{1", 2, ®ex);