Fix constant expressions containing <= or >=

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11687 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2009-09-11 18:47:05 +00:00
commit 2726424a7f
6 changed files with 13 additions and 6 deletions

View file

@ -5620,11 +5620,11 @@ exprcompound : expr PLUS expr {
/* Putting >= in the expression literally causes an infinite
* loop somewhere in the type system. Just workaround for now
* - SWIG_GE is defined in swiglabels.swg. */
$$.val = NewStringf("%s SWIG_GE %s", $1.val, $3.val);
$$.val = NewStringf("%s >= %s", $1.val, $3.val);
$$.type = cparse_cplusplus ? T_BOOL : T_INT;
}
| expr LESSTHANOREQUALTO expr {
$$.val = NewStringf("%s SWIG_LE %s", $1.val, $3.val);
$$.val = NewStringf("%s <= %s", $1.val, $3.val);
$$.type = cparse_cplusplus ? T_BOOL : T_INT;
}
| expr QUESTIONMARK expr COLON expr %prec QUESTIONMARK {