1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-23 22:52:11 +02:00

Partial fix for bug 62359

This commit is contained in:
John Camelon 2004-05-14 20:33:17 +00:00
parent e22d8fbc58
commit 1ce41b077c
2 changed files with 7 additions and 2 deletions

View file

@ -33,7 +33,7 @@ public class DefaultProblemHandler
case IProblem.PREPROCESSOR_POUND_ERROR:
case IProblem.PREPROCESSOR_UNBALANCE_CONDITION:
case IProblem.PREPROCESSOR_INVALID_MACRO_DEFN:
case IProblem.PREPROCESSOR_MACRO_USAGE_ERROR:
// case IProblem.PREPROCESSOR_MACRO_USAGE_ERROR:
case IProblem.PREPROCESSOR_MACRO_PASTING_ERROR:
case IProblem.PREPROCESSOR_CONDITIONAL_EVAL_ERROR:
case IProblem.SCANNER_UNEXPECTED_EOF:

View file

@ -154,7 +154,12 @@ public class ASTExpression implements IASTExpression {
return( ( getLHSExpression().evaluateExpression() != 0 ) && ( getRHSExpression().evaluateExpression() != 0 ) ) ? 1 : 0 ;
// logical or
if( getExpressionKind() == IASTExpression.Kind.LOGICALOREXPRESSION )
return( ( getLHSExpression().evaluateExpression() != 0 ) || ( getRHSExpression().evaluateExpression() != 0 ) ) ? 1 : 0 ;
return( ( getLHSExpression().evaluateExpression() != 0 ) || ( getRHSExpression().evaluateExpression() != 0 ) ) ? 1 : 0 ;
if( getExpressionKind() == IASTExpression.Kind.CONDITIONALEXPRESSION )
{
return ( getLHSExpression().evaluateExpression() != 0 ) ? getRHSExpression().evaluateExpression() : getThirdExpression().evaluateExpression();
}
throw new ASTExpressionEvaluationException();
}