bison-patches
[Top][All Lists]
Advanced

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

Re: typo g++


From: Paul Eggert
Subject: Re: typo g++
Date: Thu, 14 Jul 2005 10:29:07 -0700
User-agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux)

address@hidden writes:

> And Bison needs valgrind-2.4.0 or better. fixed.

Older versions of valgrind work too, I think.  As far as I have
observed it's just a few intermediate valgrind versions that didn't
work.  I don't know which ones, unfortunately.  Or perhaps it's an
installation option for valgrind.

> ./bootstrap is looking for
> http://www.iro.umontreal.ca/translation/maint/bison-runtime/
> but that doesn't exists yet.

We have to distribute bison-2.0b first, before we can notify the
translators.  In the meantime the bootstrap will still work, though.

> looks like there is a typo in tests/Makefile.am
> needed for `make maintainer-check' to use g++...
> Now only `make maintainer-check' fails at these:
> ## ------------------------ ##
> ## Summary of the failures. ##
> ## ------------------------ ##
> Failed tests:
> GNU Bison 2.0a test suite test groups:
>
>  NUM: FILENAME:LINE      TEST-GROUP-NAME
>       KEYWORDS
>
>  119: cxx-type.at:316    GLR: Resolve ambiguity, impure, no locations
>  120: cxx-type.at:323    GLR: Resolve ambiguity, impure, locations
>  121: cxx-type.at:329    GLR: Resolve ambiguity, pure, no locations
>  122: cxx-type.at:336    GLR: Resolve ambiguity, pure, locations
>  123: cxx-type.at:343    GLR: Merge conflicting parses, impure, no locations
>  124: cxx-type.at:350    GLR: Merge conflicting parses, impure, locations
>  125: cxx-type.at:357    GLR: Merge conflicting parses, pure, no locations
>  126: cxx-type.at:363    GLR: Merge conflicting parses, pure, locations
>  127: cxx-type.at:370    GLR: Verbose messages, resolve ambiguity, impure,
> no locations
>  129: glr-regression.at:117 Improper handling of embedded actions and
> dollar(-N) in GLR parsers
>  130: glr-regression.at:230 Improper merging of GLR delayed action sets

Thanks for reporting that.  I installed this fix:

2005-07-14  Paul Eggert  <address@hidden>

        Fix problems reported by address@hidden
        * tests/Makefile.am (maintainer-check-g++): Fix a stray
        $(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.

Index: tests/Makefile.am
===================================================================
RCS file: /cvsroot/bison/bison/tests/Makefile.am,v
retrieving revision 1.37
diff -p -u -r1.37 Makefile.am
--- tests/Makefile.am   14 May 2005 06:49:48 -0000      1.37
+++ tests/Makefile.am   14 Jul 2005 17:22:52 -0000
@@ -1,7 +1,9 @@
 ## Process this file with automake to create Makefile.in.
 
 ## Makefile for Bison testsuite.
-## Copyright (C) 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
+
+## Copyright (C) 2000, 2001, 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
@@ -77,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='$(GXX)';            \
-       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)
Index: tests/cxx-type.at
===================================================================
RCS file: /cvsroot/bison/bison/tests/cxx-type.at,v
retrieving revision 1.19
diff -p -u -r1.19 cxx-type.at
--- tests/cxx-type.at   14 May 2005 06:49:48 -0000      1.19
+++ tests/cxx-type.at   14 Jul 2005 17:22:56 -0000
@@ -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 <stdio.h>
-  #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);
 }
 
 ]]




reply via email to

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