From a22ff96f325e8feac2ca36604ea570bebc766b2b Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Thu, 14 Jul 2005 17:27:01 +0000 Subject: [PATCH] * tests/Makefile.am (maintainer-check-g++): Remove bogus test for valgrind; valgrind is independent of g++. (maintainer-check-posix): Add _POSIX2_VERSION=200112, to check for compatibility with POSIX 1003.1-2001 (if running coreutils). * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Port to stricter C++. Use a destructor, so that we can expand the stack. Change YYSTYPE to char * so that we can free it. Cast result of malloc. --- ChangeLog | 10 ++++++++-- tests/Makefile.am | 8 ++------ tests/cxx-type.at | 10 ++++++---- 3 files changed, 16 insertions(+), 12 deletions(-) diff --git a/ChangeLog b/ChangeLog index d9084092..dca3af61 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,8 +1,14 @@ 2005-07-14 Paul Eggert + Fix problems reported by twlevo@xs4all.nl. * tests/Makefile.am (maintainer-check-g++): Fix a stray - $(GXX) that escaped the renaming of GXX to CXX. Problem - reported by twlevo@xs4all.nl. + $(GXX) that escaped the renaming of GXX to CXX. Remove bogus + test for valgrind; valgrind is independent of g++. + (maintainer-check-posix): Add _POSIX2_VERSION=200112, to check + for compatibility with POSIX 1003.1-2001 (if running coreutils). + * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Port to stricter C++. + Use a destructor, so that we can expand the stack. Change + YYSTYPE to char * so that we can free it. Cast result of malloc. 2005-07-13 Paul Hilfinger diff --git a/tests/Makefile.am b/tests/Makefile.am index 2a499f29..1d9b619e 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -79,15 +79,11 @@ installcheck-local: # Be real mean with it. .PHONY: maintainer-check-g++ maintainer-check-g++: $(TESTSUITE) - if test -n "$(VALGRIND)"; then \ - $(TESTSUITE) CC='$(CXX)'; \ - else \ - true; \ - fi + $(TESTSUITE) CC='$(CXX)' .PHONY: maintainer-check-posix maintainer-check-posix: $(TESTSUITE) - $(TESTSUITE) POSIXLY_CORRECT=1 + $(TESTSUITE) POSIXLY_CORRECT=1 _POSIX2_VERSION=200112 .PHONY: maintainer-check-valgrind maintainer-check-valgrind: $(TESTSUITE) diff --git a/tests/cxx-type.at b/tests/cxx-type.at index 7cd22bce..e5b8778c 100644 --- a/tests/cxx-type.at +++ b/tests/cxx-type.at @@ -1,5 +1,5 @@ # Checking GLR Parsing. -*- Autotest -*- -# Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc. +# Copyright (C) 2002, 2003, 2004, 2005 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 @@ -34,7 +34,7 @@ $1 %{ #include - #define YYSTYPE char const * + #define YYSTYPE char * ]m4_bmatch([$2], [stmtMerge], [ static YYSTYPE stmtMerge (YYSTYPE x0, YYSTYPE x1);])[ #define YYINITDEPTH 10 @@ -65,6 +65,8 @@ $1 %glr-parser +%destructor { free ($$); } TYPENAME ID + %% prog : @@ -171,7 +173,7 @@ yylex (LEX_PARAMETERS) ungetc (c, stdin); buffer[i++] = 0; tok = isupper ((unsigned char) buffer[0]) ? TYPENAME : ID; - yylval = strcpy (malloc (i), buffer); + yylval = strcpy ((char *) malloc (i), buffer); } else { @@ -209,7 +211,7 @@ format (char const *form, ...) va_start (args, form); vsprintf (buffer, form, args); va_end (args); - return strcpy (malloc (strlen (buffer) + 1), buffer); + return strcpy ((char *) malloc (strlen (buffer) + 1), buffer); } ]] -- 2.45.2