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
in 30cc, f() is evaluated twice, thus its side-effects are applied twice, but in regular C, only the f() in the second if-statement is applied.
The text was updated successfully, but these errors were encountered:
keyvank
changed the title
WARN: Logical expression, do not apply of not needed?
WARN: Logical expression, do not apply the second operand if not needed?
Nov 25, 2024
I have a hackish implementation of short circuiting here while this contains some stuff from my refactor I think the general idea should still work of breaking out the short circuiting things out into a new function and processing everything there. It was basically a copy of the normal function, chop out all the unneeded bits and then shit the binop->right->apply till after the result of the left has been checked.
Imagine these two if statements:
in
30cc
,f()
is evaluated twice, thus its side-effects are applied twice, but in regular C, only thef()
in the second if-statement is applied.The text was updated successfully, but these errors were encountered: