[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: bison 3.3.2 fails to build or run testsuite
From: |
Akim Demaille |
Subject: |
Re: bison 3.3.2 fails to build or run testsuite |
Date: |
Wed, 6 Feb 2019 06:46:14 +0100 |
Hi Dennis!
> Le 5 févr. 2019 à 20:57, Dennis Clarke <address@hidden> a écrit :
>
> Given that the well loved and much used bison has a brand new fresh
> release I had to give it a try on a very strict and not very well loved
> environment. :-)
That's a nice ambition :)
> This is ye old Solaris 10 sparc server with Oracle Studio C99 compiler
> from the Oracle Studio 12.6 release. Very very strict and very very
> standards compliant and the compile goes smoothly.
Excellent news!
> /bin/bash ./build-aux/ylwrap `test -f 'examples/c++/variant.yy' || echo
> './'`examples/c++/variant.yy y.tab.c examples/c++/variant.cc y.tab.h `echo
> examples/c++/variant.cc | sed -e s/cc$/hh/ -e s/cpp$/hpp/ -e s/cxx$/hxx/ -e
> s/c++$/h++/ -e s/c$/h/` y.output examples/c++/variant.output -- ./tests/bison
> -o y.tab.c -d -v -Werror -Wall -Wno-yacc --report=all
> updating examples/c++/variant.output
> updating examples/c++/variant.hh
> source='examples/c++/variant.cc' object='examples/c++/variant-variant.o'
> libtool=no \
> DEPDIR=.deps depmode=dashXmstdout /bin/bash ./build-aux/depcomp \
> /opt/developerstudio12.6/bin/CC -DEXEEXT=\"\" -I. -I/usr/local/include
> -D_POSIX_PTHREAD_SEMANTICS -D_LARGEFILE64_SOURCE -D_TS_ERRNO -D_REENTRANT
> -m64 -xarch=sparc -dalign -erroff=%none -errtags=yes -ftrap=%none -g
> -xcode=pic32 -m64 -mc -xunroll=1 -xbuiltin=%none -xdepend=no -xnolibmopt
> -xlinkopt=0 -xnolibmil -xregs=no%appl -xs -c -o
> examples/c++/variant-variant.o `test -f 'examples/c++/variant.cc' || echo
> './'`examples/c++/variant.cc
> "/opt/developerstudio12.6/lib/compilers/include/CC/Cstd/vector.cc", line 127:
> Error: Cannot assign const yy::parser::stack_symbol_type to
> yy::parser::stack_symbol_type without
> "yy::parser::stack_symbol_type::operator=(const
> yy::parser::stack_symbol_type&)";.
> "/opt/developerstudio12.6/lib/compilers/include/CC/Cstd/vector", line 475:
> Where, temwhileinst: While instantiating
> "std::vector<yy::parser::stack_symbol_type>::__insert_aux(yy::parser::stack_symbol_type*,
> const yy::parser::stack_symbol_type&)".
> "/opt/developerstudio12.6/lib/compilers/include/CC/Cstd/vector", line 475:
> Where, teminstfrom: Instantiated from
> std::vector<yy::parser::stack_symbol_type>::push_back(const
> yy::parser::stack_symbol_type&).
> "examples/c++/variant.hh", line 1220: Where, teminstfrom: Instantiated
> from yy::parser::stack<yy::parser::stack_symbol_type,
> std::vector<yy::parser::stack_symbol_type>>::push(yy::parser::stack_symbol_type&).
> "examples/c++/variant.cc", line 384: Where, teminstend: Instantiated from
> non-template code.
So, it appears that your compiler does not like that our copy-assignment is not
const:
/// "Internal" symbol: element of the stack.
struct stack_symbol_type : basic_symbol<by_state>
{
/// Superclass.
typedef basic_symbol<by_state> super_type;
/// Construct an empty symbol.
stack_symbol_type ();
/// Move or copy construction.
stack_symbol_type (YY_RVREF (stack_symbol_type) that);
/// Steal the contents from \a sym to build this.
stack_symbol_type (state_type s, YY_MOVE_REF (symbol_type) sym);
#if YY_CPLUSPLUS < 201103L
/// Assignment, needed by push_back by some old implementations.
/// Moves the contents of that.
stack_symbol_type& operator= (stack_symbol_type& that);
#endif
};
It is not const to save cycle: it implements a sort of move in C++98. So I
guess your compiler fails to compile this?
#include <iostream>
struct foo
{
foo(int v = 42)
: val(v)
{}
foo& operator=(foo& rhs)
{
this->val = rhs.val;
--rhs.val;
return *this;
}
int val;
};
int
main()
{
foo f(10);
foo b(20);
b = f;
std::cout << f.val << ", " << b.val << '\n';
}
> That looks messy.
>
> Any suggestions on getting the tests to run ?
Try `make check -k` and `make check-local`. The latter will run the full test
suite.
Thanks for your help!