You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What steps will reproduce the problem?
Simple input to generate the problem using interactive mode:
$ ./picoc -i
picoc> int *i = NULL;
picoc> if (i) printf("i\n"); else printf("NULL\n");
What is the expected output? What do you see instead?
Expected: NULL
Instead: :2:6 integer value expected instead of int*
What version of the product are you using? On what operating system?
OS X, picoc 603
Please provide any additional information below.
The problem is with expression.c:ExpressionParseInt(). The method uses "if
(!IS_NUMERIC_COERCIBLE(Val))" to decide if the value can be used. It's legal to
use a pointer in this form of if statement as a shorthand form of "if (pointer
!= NULL)" but this macro doesn't allow for that. Changing the check to the
following works but may introduce other problems? if
(!IS_NUMERIC_COERCIBLE(Val) && !(Val->Typ->Base == TypePointer))
Original issue reported on code.google.com by [email protected] on 4 Nov 2013 at 6:22
The text was updated successfully, but these errors were encountered:
Original issue reported on code.google.com by
[email protected]
on 4 Nov 2013 at 6:22The text was updated successfully, but these errors were encountered: