------- Comment #1 from pinskia at gcc dot gnu dot org  2010-06-07 17:34 -------
>  foo = bar << 20;

Yes this can overflow but so can "bar * 2" and "bar + 1".  Maybe I am missing
something here because we don't warn for those cases.  Do you want a warning
where the assignment happens to be a wider type?  That is:

uint64_t = uint32_t OP uint32_t;  With an implicit casting to uint64_t?


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |enhancement
          Component|middle-end                  |c
           Keywords|                            |diagnostic


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

Reply via email to