https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62245
--- Comment #8 from Joost VandeVondele <Joost.VandeVondele at mat dot ethz.ch> --- (In reply to Julian Taylor from comment #7) > But the docs indicate that there is no undefined behavior. > As I interpret them the result of int() is always well defined. > If the documentation would not state what happens in the case of overflow it > would be fine to not mention it, but as is one has to know the standard to > know that this part of the documentation is wrong. I'll submit a patchlet to clarify the wording in the docs (the issue is the use of range vs magnitude, which suggests defining behavior in the case of overflow).