This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/40752] -Wconversion generates false warnings for operands not larger than target type



------- Comment #18 from photon at seznam dot cz  2010-06-12 16:46 -------
(In reply to comment #17)
> The patch was rejected but it may be accepted by using a new -Wno-* option to
> disable these warnings. Perhaps -Wno-conversion-after-promotion?
> 
> Suggestions are welcome.
> 


-Wconversion should be fixed to work as specified. No warning should be
generated for the following code:

char c = 2;
// warning: conversion to ?char? from ?int? may alter its value
c >>= 1;


-- 


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]