[cfe-commits] r68221 - in /cfe/trunk: include/clang/Basic/LangOptions.h include/clang/Driver/Options.def lib/CodeGen/CGExprScalar.cpp tools/clang-cc/clang-cc.cpp
clattner at apple.com
Wed Apr 1 16:53:06 CDT 2009
On Apr 1, 2009, at 2:27 PM, Mike Stump wrote:
> On Apr 1, 2009, at 11:28 AM, Eli Friedman wrote:
>> Hmm... this doesn't appear to be compatible with the gcc
>> implementation of -ftrapv, so it might not be a good idea to give the
>> option the same name.
> Or better, bug fix it...
I agree, I think that -ftrapv means "trap on signed integer overflow",
as long as we do that, I think it's reasonable to call it -ftrapv.
>> Unsigned "overflow" is perfectly well-defined per C99; I don't think
>> we want to trap without the user explicitly asking for it.
> Yes. Other clients can ask for unsigned overflow, if they want, but
> for C languages, there should be no check.
I'm not sure what you mean, clang should never generate code that
traps on unsigned overflow.
More information about the cfe-commits