> Le 21 janv. 2015 à 15:27, Thomas Jahns <ja...@dkrz.de> a écrit : > > Hello Akim,
Hi Thomas, > Now there's only tests > > 95 because of an internal compiler error On this, I need help :) > and > > 241 the name lookup of report I missed that one, thanks for the reminder! Please try this patch (in next, again): commit 6082c96050ef9924329ee5067d102d3a0b2bd640 Author: Akim Demaille <a...@lrde.epita.fr> Date: Wed Jan 21 18:34:01 2015 +0100 tests: c++: fix a C++03 conformance issue This fixes test 241 on xLC: "input.y", line 42.11: 1540-0274 (S) The name lookup for "report" did not find a declaration. "input.y", line 42.11: 1540-1292 (I) Static declarations are not considered for a function call if the function is not qualified. where report is: static void report (std::ostream& yyo, int ival, float fval) { yyo << "ival: " << ival << ", fval: " << fval; } and line 42 is: %printer { report (yyo, $$, $<fval>$); } <ival>; It turns out that indeed this function must not be declared static, <http://stackoverflow.com/a/17662745/1353549>. Let's put it into an anonymous namespace. Reported by Thomas Jahns. http://lists.gnu.org/archive/html/bug-bison/2015-01/msg00059.html * tests/actions.at (Qualified $$ in actions): Don't use "static", prefer anonymous namespace. diff --git a/tests/actions.at b/tests/actions.at index 7220b71..2671ca5 100644 --- a/tests/actions.at +++ b/tests/actions.at @@ -1530,10 +1530,13 @@ AT_DATA_GRAMMAR([[input.y]], ]AT_SKEL_CC_IF([[ # include <iostream> - static void - report (std::ostream& yyo, int ival, float fval) + namespace { - yyo << "ival: " << ival << ", fval: " << fval; + void + report (std::ostream& yyo, int ival, float fval) + { + yyo << "ival: " << ival << ", fval: " << fval; + } } ]], [[ # include <stdio.h>