Ignore YYSTACK_USE_ALLOCA for push parsers since the stacks can't be

locals.  Reported by Juan Manuel Guerrero at
<http://lists.gnu.org/archive/html/bug-bison/2007-01/msg00000.html>.
* data/push.c: Enclose the #ifdef YYSTACK_USE_ALLOCA in b4_push_if.
Fix some indentation also.
* tests/torture.at (Exploding the Stack Size with Alloca): Add comment
explaining this issue.
This commit is contained in:
Joel E. Denny committed 2007-01-10 00:50:55 +00:00
1 parent 8f7ebfc81f
commit 78143faa16
3 files changed
+26 -11

No files matched your search

+3
View File
@@ -490,6 +490,9 @@ AT_PARSER_CHECK([./input 900], 0, [], [ignore])
# multiply by two starting at 200 => 5120 is the last possible).
AT_PARSER_CHECK([./input 10000], 2, [], [ignore])
# The push parser can't use alloca since the stacks can't be locals. This test
# just helps guarantee we don't let the YYSTACK_USE_ALLOCA feature affect
# push parsers.
AT_DATA_STACK_TORTURE([AT_USE_ALLOCA],
[[%push-pull-parser
]])