summaryrefslogtreecommitdiff
path: root/ext/json/json.c
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2019-12-06 11:07:57 +0100
committerNikita Popov <nikita.ppv@gmail.com>2019-12-06 11:07:57 +0100
commit249e49092d0e7f4b38a83e59947797d4e255991f (patch)
treefb8717b9ca1ed2b4acdfdc60ceabb80d44a6786f /ext/json/json.c
parentfac43d6515adb932083edeacd40f87d6b8393d66 (diff)
downloadphp-git-249e49092d0e7f4b38a83e59947797d4e255991f.tar.gz
Fix constant evaluation of && and ||
The "return" in the for loop should have been a break on the switch, otherwise the result is just ignored... but because it prevents evaluation of the other operand, it also violates the invariant that everything has been constant evaluated, resulting in an assertion failure. The for loop isn't correct in any case though, because it's not legal to determine the result based on just the second operand, as the first one may have a side-effect that cannot be optimized away.
Diffstat (limited to 'ext/json/json.c')
0 files changed, 0 insertions, 0 deletions