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++/19457] [4.0 Regression] Warning depends on cached constant


------- Additional Comments From schlie at comcast dot net  2005-01-15 17:36 -------
(In reply to comment #0)

Lasly, (sorry for not collecting all thoughts first), suspect the problem may be that
~ is being considered as being analogous to an arithmetic -, which it shoudn't be;
therefore ~(any constant value >= 0) should be compatible with either signed or unsiged.
although  -(any constant value >= 0) should be compatible with only signed witout a cast.
(as ~ is a bit-wise operation, not a arithmetic one, otherwise one couldn't even specify:
 (unsigned)x = (unsigned)x & 0x3; without a cast, likely generating tons of useless warnings)


-- 


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


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