New max() problem with integer promotion and narrow size_t

Alexandre Oliva aoliva@redhat.com
Tue Apr 8 12:03:00 GMT 2003


New problem that affects this target with narrower size_t than int.
Integer promotion causes max() to get two different data types, so it
can't match.  BTW, I'm not sure it wouldn't be appropriate to cast the
second argument to __size_type as well, since it is my understanding
that there's no guarantee that the string and the buf size_types are
going to be the same.  Anyway, I'm going ahead and checking this in as
obvious.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: lcxx-more-minmax-promotion.patch
Type: text/x-patch
Size: 1264 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20030408/066bf8d9/attachment.bin>
-------------- next part --------------

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                 aoliva@{redhat.com, gcc.gnu.org}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist                Professional serial bug killer


More information about the Gcc-patches mailing list