[PATCH] D58236: Make address space conversions a bit stricter.

Eli Friedman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Feb 28 11:59:41 PST 2019

efriedma added a comment.

> I think trying to reject code that is doing something dangerous is a good thing!

Refusing to compile code which is suspicious, but not forbidden by the specification, will likely cause compatibility issues; there are legitimate reasons to use casts which look weird.

I'm not against adding some sort of address space suspicious cast warning to catch cases where we think the user meant to do something else.  But that's a separate issue, and it needs a proper cost-benefit analysis, including an analysis of the false-positive rate on existing code.



More information about the cfe-commits mailing list