# Bison Regressions. -*- Autotest -*-
-# Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software
-# Foundation, Inc.
+# Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
+# 2010 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# Imagine the case where YYSTACK_ALLOC_MAXIMUM = YYSIZE_MAXIMUM and an
# invocation of yysyntax_error has caused yymsg_alloc to grow to exactly
# YYSTACK_ALLOC_MAXIMUM (perhaps because the normal doubling of size had
-# to be clipped to YYSTACK_ALLOC_MAXIMUM). Now imagine a subsequent
-# invocation of yysyntax_error that overflows during its size
-# calculation and thus returns YYSIZE_MAXIMUM to yyparse. Then, yyparse
-# will invoke yyerror using the old contents of yymsg. This bug needs
-# to be fixed.
+# to be clipped to YYSTACK_ALLOC_MAXIMUM). In an old version of yacc.c,
+# a subsequent invocation of yysyntax_error that overflows during its
+# size calculation would return YYSIZE_MAXIMUM to yyparse. Then,
+# yyparse would invoke yyerror using the old contents of yymsg.
AT_SETUP([[%error-verbose overflow]])
-AT_XFAIL_IF([[:]])
-
AT_DATA_GRAMMAR([input.y],
[[%code {
#include <stdio.h>
large enough to overflow size_t. */
#define YYSIZE_T unsigned char
- /* Bring in malloc so yacc.c doesn't try to provide a malloc prototype
- using our YYSIZE_T. */
+ /* Bring in malloc and set EXIT_SUCCESS so yacc.c doesn't try to
+ provide a malloc prototype using our YYSIZE_T. */
#include <stdlib.h>
+ #ifndef EXIT_SUCCESS
+ # define EXIT_SUCCESS 0
+ #endif
/* Max depth is usually much smaller than YYSTACK_ALLOC_MAXIMUM, and
we don't want gcc to warn everywhere this constant would be too big