[cfe-commits] PATCH: Warn on left shifts which overflow, even when not due to the RHS
Abramo Bagnara
abramo.bagnara at gmail.com
Mon Feb 21 01:01:14 PST 2011
Il 21/02/2011 09:48, Chandler Carruth ha scritto:
>
>
> Having now read the C99 standard, it has the exact same wording as C++0x
> drafts (I suppose that the 0x drafts are based on the C99 wording). The
> C89 standard is silent on the issue (likely leading to the C++03
> silence). I don't think there is any inconsistency between the
> languages, or backwards incompatibility here. I think this restriction
> has merely been clarified over time.
Also if I don't think that something might be considered an undefined
behaviour "due to omission", your interpretation of the
evolution/clarification of 5.8p2 from C++98, C++03 to C++0x (also to be
congruent with C99) sounds very reasonable to me.
I agree with you this is the most likely scenario.
More information about the cfe-commits
mailing list