bison-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

tests: fix 250: parse.error=verbose overflow


From: Akim Demaille
Subject: tests: fix 250: parse.error=verbose overflow
Date: Fri, 26 Mar 2010 09:51:24 +0100

On OS X, this test fails with a hard error.  On this machine, the cpp guard for 
stdlib.h is not _STDLIB_H, which I guess it is on GNU/Linux, which would 
explain why we don't have the problem there (since the second inclusion of 
stdlib.h in yacc.c is protected by _STDLIB_H).

Installed in master and branch-2.5.   2.4.3 has no such test.


        * tests/regression.at (parse.error=verbose overflow): Avoid the
        double inclusion of stdlib.h as it triggers hard errors.
---
 ChangeLog           |    6 ++++++
 tests/regression.at |    7 +++++--
 2 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index bf67e12..e8091e3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2010-03-25  Akim Demaille  <address@hidden>
+
+       tests: fix 250: parse.error=verbose overflow.
+       * tests/regression.at (parse.error=verbose overflow): Avoid the
+       double inclusion of stdlib.h as it triggers hard errors.
+
 2010-03-23  Joel E. Denny  <address@hidden>
 
        portability: fix for BSD make.
diff --git a/tests/regression.at b/tests/regression.at
index 3ef8541..1533447 100644
--- a/tests/regression.at
+++ b/tests/regression.at
@@ -1366,9 +1366,12 @@ AT_DATA_GRAMMAR([input.y],
      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 _STDLIB_H so yacc.c doesn't try to
+     provide a malloc prototype using our YYSIZE_T.  */
   #include <stdlib.h>
+  #ifndef _STDLIB_H
+  # define _STDLIB_H 1
+  #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
-- 
1.7.0.3






reply via email to

[Prev in Thread] Current Thread [Next in Thread]