[Bug c/59022] Bogus "warning: conversion to 'short int' from 'int' may alter its value [-Wconversion]"
rguenth at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Nov 6 14:09:00 GMT 2013
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59022
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |INVALID
--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
The warning is correct, short + short may overflow when computed in 'int' and
thus may get truncated with the conversion to short. -original shows the
code after some (premature) optimization.
More information about the Gcc-bugs
mailing list