Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


Compiler - assign negative values #6

ghost opened this Issue · 1 comment

1 participant

Patrick Flick
Deleted user

James, I got another one for you even though you moved your bugtracker... ;-)

When trying to assign a negative number to a variable, it results in a compiler error.

expected behavior: assign 0xffff to variable
observed behavior: Compiler error "syntax error, unexpected SUBTRACT"

Test case:

void main()
    int a;
    a = -1;     // 'a' should be 0xffff but results in compiler error
//  a = 0-1;        // this one works
Patrick Flick r4d2 was assigned
Patrick Flick

now this is finally solved with implementing unary operations :)

Patrick Flick r4d2 closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.