> Le 10 mai 2018 à 12:12, Akim Demaille <[email protected]> a écrit : > > > >> Le 27 avr. 2018 à 23:55, Raffaele Izzo <[email protected]> a écrit : >> >> >> <testsuite.log> > > According to your logs, you get: > > 430. c++.at:374: testing Variants lalr1.cc parse.assert api.token.constructor > ... > ./c++.at:374: bison -fno-caret -o list.cc list.y > ./c++.at:374: $BISON_CXX_WORKS > stderr: > stdout: > ./c++.at:374: $CXX $CXXFLAGS $CPPFLAGS $LDFLAGS -o list list.cc $LIBS > stderr: > In file included from list.y:2:0: > /mnt/lfs/sources/bison-3.0.4/lib/config.h:2220:5: warning: option > '-Wmissing-prototypes' is valid for C/ObjC but not for C++ [-Wpragmas] > _Pragma ("GCC diagnostic ignored \"-Wmissing-prototypes\"") \ > ^ > list.y: In member function 'void yy::parser::basic_symbol<Base>::clear()': > list.y:75:36: error: no match for 'operator<<' (operand types are > 'std::basic_ostream<char>' and > 'std::__cxx11::list<std::__cxx11::basic_string<char> >') > %destructor { std::cerr << "Destroy: " << $$ << '\n'; } <*>; > ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~ > > > Which seems to indicate that $$ is a std::list<std::string>. > But I don’t understand how this would be possible, there is > only std::vector in there.
That’s because I had forgotten of this commit: commit 952416114729b95209dccfc4edacfc1ff13b4e82 Author: Akim Demaille <[email protected]> Date: Mon Jan 26 18:23:12 2015 +0100 tests: c++: fix symbol lookup issue Sun C 5.13 SunOS_sparc 2014/10/20 reports errors on tests 430-432. Reported by Dennis Clarke. <http://lists.gnu.org/archive/html/bug-bison/2015-01/msg00087.html> * tests/c++.at (Variants): Be sure to emit operator<< before using it: use "%code top" rather than "%code". Prefer std::vector to std::list. Do not define anything in std::, to avoid undefined behavior. So this was fixed 3y ago, but never released.
