I committed this.
Index: ChangeLog
===================================================================
RCS file: /sources/bison/bison/ChangeLog,v
retrieving revision 1.1595
diff -p -u -r1.1595 ChangeLog
--- ChangeLog 22 Oct 2006 00:28:16 -0000 1.1595
+++ ChangeLog 31 Oct 2006 22:22:55 -0000
@@ -1,3 +1,8 @@
+2006-10-31 Joel E. Denny <[EMAIL PROTECTED]>
+
+ * src/getargs.c (flags_argmatch): Don't cause segmentation fault for
+ empty subargument list. For example: `bison --warnings= parser.y'.
+
2006-10-21 Joel E. Denny <[EMAIL PROTECTED]>
* data/push.c, data/yacc.c: Make sure there's a newline at the end of
Index: src/getargs.c
===================================================================
RCS file: /sources/bison/bison/src/getargs.c,v
retrieving revision 1.81
diff -p -u -r1.81 getargs.c
--- src/getargs.c 12 Oct 2006 23:29:52 -0000 1.81
+++ src/getargs.c 31 Oct 2006 22:22:55 -0000
@@ -91,15 +91,15 @@ flags_argmatch (const char *option,
if (args)
{
args = strtok (args, ",");
- do
+ while (args)
{
int value = XARGMATCH (option, args, keys, values);
if (value == 0)
*flags = 0;
else
*flags |= value;
+ args = strtok (NULL, ",");
}
- while ((args = strtok (NULL, ",")));
}
else
*flags = ~0;