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 tree-optimization/39068] signed short plus and signed char plus not vectorized



------- Comment #5 from pinskia at gcc dot gnu dot org  2009-02-06 01:51 -------
(In reply to comment #4)
> Yes because char = char + char is really char = (char)((int)char + (int)char);

Let me expand on that.  ((char)CHAR_MAX) + 1 is well defined and there is no
overflow that occurs.  Since GCC internally assumes signed integer overflow is
undefined, it has to convert it to be the well defined unsigned integer
version.


-- 


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


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