Fixed errors in the conditional operator "? :" parser.

This commit is contained in:
acqn
2022-11-02 13:56:55 +08:00
parent ad7c5a6617
commit d84cc2d122
3 changed files with 18 additions and 8 deletions

8
test/err/bug1893.c Normal file
View File

@@ -0,0 +1,8 @@
/* bug #1893 - Compiler accepts a ternary expression where it shouldn't */
int main(void)
{
int a, b, c;
a == 1? b : c = 3;
return 0;
}