Fix constants involved parenthesised char literals

Fixes https://sourceforge.net/p/swig/bugs/1168/
This commit is contained in:
Olly Betts 2017-10-07 14:30:42 +13:00 • committed by Olly Betts
commit 0863eca5e7
2 changed files with 10 additions and 2 deletions

View file

@ -6316,9 +6316,12 @@ valexpr : exprnum { $$ = $1; }
/* grouping */
| LPAREN expr RPAREN %prec CAST {
$$.val = NewStringf("(%s)",$2.val);
$$.val = NewStringf("(%s)",$2.val);
if ($2.rawval) {
$$.rawval = NewStringf("(%s)",$2.rawval);
}
$$.type = $2.type;
}
}
/* A few common casting operations */