This is the mail archive of the gcc-patches@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]

Re: Patches: Squelch `U' suffix warnings from md5.h and getext.h


 > From: John David Anglin <dave@hiauly1.hia.nrc.ca>
 > 
 > These two patches modify md5.h and gettext.h to use INT_MAX instead
 > of UINT_MAX to determine the appropriate type to use for an
 > unsigned 32 bit integer.  This avoids using the `U' suffix.  Tested
 > with a complete bootstrap and check.
 > Dave

So you're effectively checking the size of the signed types to
determine which unsigned type to use as the unsigned 32bit type.  This
is only valid if we can assume sizeof(type) == sizeof(unsigned type).
Does the C standard conveniently guarantee this for us?

(Also, you'll want to provide a ChangeLog entry.)

		Thanks,
		--Kaveh
--
Kaveh R. Ghazi			Engagement Manager / Project Services
ghazi@caip.rutgers.edu		Qwest Internet Solutions

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