This commit is contained in:
Kugel Fuhr 2024-09-14 21:12:19 +02:00
parent fe6afa621b
commit 175ec65af1
2 changed files with 5 additions and 1 deletions

View File

@ -726,7 +726,7 @@ static void PPhieQuest (PPExpr* Expr)
PPhieQuest (&Expr3); PPhieQuest (&Expr3);
/* Set the result */ /* Set the result */
Expr->IVal = Expr->IVal ? Expr2.IVal != 0 : Expr3.IVal != 0; Expr->IVal = Expr->IVal ? Expr2.IVal : Expr3.IVal;
/* Restore evaluation as before */ /* Restore evaluation as before */
PPEvaluationEnabled = PPEvaluationEnabledPrev; PPEvaluationEnabled = PPEvaluationEnabledPrev;

4
test/val/bug2520.c Normal file
View File

@ -0,0 +1,4 @@
#if (1 ? 2 : 0) != 2
#error
#endif
int main() { return 0; }