The following code causes a bad case 7. Compiling it
gives "Bad case 7, line 3" and then compilation
finishes and it assembles without trouble. However, I
believe that the generated code is wrong because I was
getting INF when I discovered this rather than the
numbers I was expecting. Also, note that the reported
line is one too low, the ternary hook is on line 4, not 3.
--------
void main()
{
double y=6667;
y!=0?y:1;
}
--------
Logged In: YES
user_id=192791
duplicated on m515, OBC v2.3
Logged In: YES
user_id=192791
I have also simplified the test case. It is not in the y!=0
section, but after the ? that the bug occurs. These two
cases also cause the bug:
void main()
{
double y=42;
int x=7;
x==1?1:y;
x==0?y:1;
}
So the bug is the 2nd half of the statement, not the first,
because this works:
y==0?1:x