https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124666

--- Comment #3 from Jerry DeLisle <jvdelisle at gcc dot gnu.org> ---
(In reply to anlauf from comment #2)
> I wonder if adding parentheses like
> 
>               value = 10 * value + (c - '0');
> 
> also helps to avoid wrapping in corner cases.

Assuming the c++ compiler obeys rules of precedence and parens, this should be
sufficient.

Reply via email to