8 years, 8 months ago.

Unary minus operator

Just to find out if there is any difference in

y = -x+10; y = -1*x +10;

Thank you

1 Answer

8 years, 8 months ago.

Compiler should recognize it and optimize it, but to be sure you can put it in offline keil for example and check the resulting assembly code.

What was the question above about? :)

posted by Martin Kojtal 02 Sep 2015