[Bug c/59022] Bogus "warning: conversion to 'short int' from 'int' may alter its value [-Wconversion]"

manu at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Nov 7 00:07:00 GMT 2013


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59022

Manuel López-Ibáñez <manu at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |manu at gcc dot gnu.org

--- Comment #3 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
There is a bug report open somewhere about not warning when all operands and
destination have the same type. I seem to remember that I even submitted a
patch, but it got rejected. I think Wconversion is quite noisy otherwise: int +
int can also overflow, but we don't warn about that. Clang doesn't warn either
and they are normally much more noisy than GCC.


More information about the Gcc-bugs mailing list