On Mar 27, 2012, at 4:58 PM, Chandler Carruth wrote:
> URL: http://llvm.org/viewvc/llvm-project?rev=153550&view=rev
> Log:
> Move the emission of strict enum range metadata behind a flag (the same
> flag as GCC uses: -fstrict-enums). There is a *lot* of code making
> unwarranted assumptions about the underlying type of enums, and it
> doesn't seem entirely reasonable to eagerly break all of it.
> 
> Much more importantly, the current state of affairs is *very* good at
> optimizing based upon this information, which causes failures that are
> very distant from the actual enum. Before we push for enabling this by
> default, I think we need to implement -fcatch-undefined-behavior support
> for instrumenting and trappig whenever we store or load a value outside
> of the range. That way we can track down the misbehaving code very
> quickly.

This is sad, but I agree that this is the right thing to do.  Thanks Chandler,

-Chris
> 

_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to