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 middle-end/25125] [4.1/4.2 Regression] (short) ((int)(unsigned short) + (int)) is done in the wrong type



------- Comment #8 from mmitchel at gcc dot gnu dot org  2005-12-19 18:29 -------
(Why should we get 1?  Upon entry to f, a will be 1, since 32769 will be
reduced modulo 2^16.  Then, b will be 1 - 32768, or -32767.  I don't see why
that should be converted to 1 -- but I certainly don't see why it should be
32768 either.)

In any case, wrong-code: P1.


-- 


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


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