================

----------------
dtarditi wrote:

I agree that it is fine to not handle this for now. 
 
If we do decide to handle this, we  need to be careful because this equivalence 
does not hold for signed integer arithmetic expressions in C.  The equivalence 
relies on commutativity and associativity of integer arithmetic. Reassociation 
can change whether overflow occurs for integer expressions at runtime and 
signed integer overflow is undefined behavior in C.  If, however, we assume 
that signed integer arithmetic is 2's complement arithmetic (which can be 
specified via a compiler flag), then this equivalence holds for signed integer 
expressions.

https://github.com/llvm/llvm-project/pull/114894
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to