tests: fix incorrect object construction

Reported by Ken Moffat.
http://lists.gnu.org/archive/html/bug-bison/2013-10/msg00009.html

* tests/c++.at (Exception safety): Here.
This commit is contained in:
Akim Demaille
2013-10-18 16:22:23 +02:00
parent 071863b3d8
commit 39bace5da8
3 changed files with 11 additions and 2 deletions

View File

@@ -818,7 +818,8 @@ yylex (yy::parser::semantic_type *lvalp)
case 'l':
throw std::runtime_error ("yylex");
default:
lvalp]AT_VARIANT_IF([->build (res)], [->obj = new Object (res)])[;
lvalp->]AT_VARIANT_IF([build (Object (res))],
[obj = new Object (res)])[;
// Fall through.
case 0:
return res;