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
The coalesce and sort operations that are performed on the nodes of a PreorderAST implicitly re-associate the operands of + and * operators. If an expression like P + (E1 + E2) where the subexpression P has a checked pointer type and the subexpressions E1 and E2 have integral types, is re-associated as (P + E1) + E2, this is fine as this re-association does not introduce any new overflow scenarios that are not caught by runtime checks on checked pointer arithmetic. Whereas, if an expression like (P + E1) + E2 is re-associated as P + (E1 + E2), then there is a possibility that the subexpression (E1 + E2) may overflow and this overflow is not detected at runtime. Such a re-association should be performed by the compiler only if it can verify at compile-time that the subexpression (E1 + E2) will not overflow.
The text was updated successfully, but these errors were encountered:
The coalesce and sort operations that are performed on the nodes of a
PreorderAST
implicitly re-associate the operands of+
and*
operators. If an expression likeP + (E1 + E2)
where the subexpressionP
has a checked pointer type and the subexpressionsE1
andE2
have integral types, is re-associated as(P + E1) + E2
, this is fine as this re-association does not introduce any new overflow scenarios that are not caught by runtime checks on checked pointer arithmetic. Whereas, if an expression like(P + E1) + E2
is re-associated asP + (E1 + E2)
, then there is a possibility that the subexpression(E1 + E2)
may overflow and this overflow is not detected at runtime. Such a re-association should be performed by the compiler only if it can verify at compile-time that the subexpression(E1 + E2)
will not overflow.The text was updated successfully, but these errors were encountered: