bug-bison
[Top][All Lists]
Advanced

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

Re: SEGV running tests on IRIX 6.5.19m


From: Paul Eggert
Subject: Re: SEGV running tests on IRIX 6.5.19m
Date: Sat, 29 May 2004 18:02:24 -0700
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux)

Albert Chin <address@hidden> writes:

> How do we change C++ filenames to input.cc or input.cpp?

I installed the patch below, which should fix that.

> ...
> cxx: Error: input.h, line 132: namespace "std" has no member "cerr"
>       cdebug_ (std::cerr),

Sorry, I don't know C++ namespaces that well, but I'll guess that this
is because the Tru64 C++ compiler doesn't conform to the latest C++
standard.  The easiest fix for me is to check that "std:cerr" works,
and to reject the C++ compiler otherwise.  I hope the patch below
accomplishes that.

Thanks for reporting these problems.

2004-05-29  Paul Eggert  <address@hidden>

        Fix some "make check" problems with C++ reported by
        Albert Chin-A-Young for Tru64 C++ in this thread:
        http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00049.html

        * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check for std::cerr.
        * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
        Output to a .cc file for C++, not to a .c file.
        * tests/calc.at (AT_CHECK_CALC): Likewise.
        * tests/regression.at (AT_CHECK_DANCER): Likewise.
        * tests/local.at (AT_COMPILE_CXX): Default to OUTPUT.cc, not OUTPUT.c.

Index: m4/cxx.m4
===================================================================
RCS file: /cvsroot/bison/bison/m4/cxx.m4,v
retrieving revision 1.1
diff -p -u -r1.1 cxx.m4
--- m4/cxx.m4   24 May 2004 06:57:33 -0000      1.1
+++ m4/cxx.m4   30 May 2004 00:53:17 -0000
@@ -29,7 +29,8 @@ AC_DEFUN([BISON_TEST_FOR_WORKING_CXX_COM
       [AC_LANG_PROGRAM(
         [#include <iostream>
          using namespace std;],
-         [cout << "";])],
+         [std::cerr << "";
+          cout << "";])],
       [bison_cv_cxx_works=yes],
       [bison_cv_cxx_works=no],
       [bison_cv_cxx_works=cross])
Index: tests/actions.at
===================================================================
RCS file: /cvsroot/bison/bison/tests/actions.at,v
retrieving revision 1.31
diff -p -u -r1.31 actions.at
--- tests/actions.at    29 May 2004 07:16:29 -0000      1.31
+++ tests/actions.at    30 May 2004 00:53:18 -0000
@@ -500,9 +500,11 @@ main (void)
 }
 ]])
 
-AT_CHECK([bison -o input.c input.y])
-AT_LALR1_CC_IF([AT_COMPILE_CXX([input])],
-               [AT_COMPILE([input])])
+AT_LALR1_CC_IF(
+  [AT_CHECK([bison -o input.cc input.y])
+   AT_COMPILE_CXX([input])],
+  [AT_CHECK([bison -o input.c input.y])
+   AT_COMPILE([input])])
 AT_PARSER_CHECK([./input], 1,
 [[sending: 'x' (address@hidden)
 thing (address@hidden): 'x' (address@hidden)
Index: tests/calc.at
===================================================================
RCS file: /cvsroot/bison/bison/tests/calc.at,v
retrieving revision 1.61
diff -p -u -r1.61 calc.at
--- tests/calc.at       29 May 2004 07:16:28 -0000      1.61
+++ tests/calc.at       30 May 2004 00:53:18 -0000
@@ -442,11 +442,11 @@ AT_BISON_OPTION_PUSHDEFS([$1])
 
 AT_DATA_CALC_Y([$1])
 
-# Specify the output files to avoid problems on different file systems.
-AT_CHECK([bison -o calc.c calc.y])
-
-AT_LALR1_CC_IF([AT_COMPILE_CXX([calc])],
-               [AT_COMPILE([calc])])
+AT_LALR1_CC_IF(
+  [AT_CHECK([bison -o calc.cc calc.y])
+   AT_COMPILE_CXX([calc])],
+  [AT_CHECK([bison -o calc.c calc.y])
+   AT_COMPILE([calc])])
 
 # Test the priorities.
 _AT_CHECK_CALC([$1],
Index: tests/local.at
===================================================================
RCS file: /cvsroot/bison/bison/tests/local.at,v
retrieving revision 1.6
diff -p -u -r1.6 local.at
--- tests/local.at      24 May 2004 06:58:02 -0000      1.6
+++ tests/local.at      30 May 2004 00:53:18 -0000
@@ -173,13 +173,13 @@ m4_define([AT_COMPILE],
 [AT_CHECK([$CC $CFLAGS $CPPFLAGS m4_bmatch([$1], [[.]], [], [$LDFLAGS 
])m4_default([$2], [$1.c]) m4_bmatch([$1], [[.]], [], [$LIBS ])-o $1],
           0, [ignore], [ignore])])
 
-# AT_COMPILE_CXX(OUTPUT, [SOURCES = OUTPUT.c])
+# AT_COMPILE_CXX(OUTPUT, [SOURCES = OUTPUT.cc])
 # --------------------------------------------
 # If the C++ compiler does not work, ignore the test.
 m4_define([AT_COMPILE_CXX],
 [AT_KEYWORDS(c++)
 AT_CHECK([$BISON_CXX_WORKS], 0, ignore, ignore)
-AT_CHECK([$CXX $CXXFLAGS $CPPFLAGS m4_default([$2], [$1.c]) -o $1],
+AT_CHECK([$CXX $CXXFLAGS $CPPFLAGS m4_default([$2], [$1.cc]) -o $1],
          0, [ignore], [ignore])])
 
 
Index: tests/regression.at
===================================================================
RCS file: /cvsroot/bison/bison/tests/regression.at,v
retrieving revision 1.82
diff -p -u -r1.82 regression.at
--- tests/regression.at 31 Mar 2004 00:37:21 -0000      1.82
+++ tests/regression.at 30 May 2004 00:53:18 -0000
@@ -780,8 +780,11 @@ m4_define([AT_CHECK_DANCER],
 AT_BISON_OPTION_PUSHDEFS([$1])
 _AT_DATA_DANCER_Y([$1])
 AT_CHECK([bison -o dancer.c dancer.y])
-AT_LALR1_CC_IF([AT_COMPILE_CXX([dancer])],
-               [AT_COMPILE([dancer])])
+AT_LALR1_CC_IF(
+  [AT_CHECK([bison -o dancer.cc dancer.y])
+   AT_COMPILE_CXX([dancer])],
+  [AT_CHECK([bison -o dancer.c dancer.y])
+   AT_COMPILE([dancer])])
 AT_PARSER_CHECK([./dancer], 1, [],
 [syntax error, unexpected ':'
 ])




reply via email to

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