EmbDev.net

Forum: ARM programming with GCC/GNU tools gcc AND operator precedence?


von Guest (Guest)


Rate this post
useful
not useful
Not sure where to look it up: in order to save a few cycles of precious 
processing time, I need to have the less expensive expression evaluated 
first; apparently, C does not specify an order. I thought it was from 
right to left but I'm not sure.

if(expr1 && expr2)

von seb (Guest)


Rate this post
useful
not useful
C does specify an order (left to right).

von Guest (Guest)


Rate this post
useful
not useful
Good to know, thanks.

Please log in before posting. Registration is free and takes only a minute.
Existing account
Do you have a Google/GoogleMail account? No registration required!
Log in with Google account
No account? Register here.