This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


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

Re: Stephen Webb's staging headers patch


>>>>> Benjamin Kosnik writes:

Ben> One problem is that the generic limits file is 32bit, and I 
Ben> suppose using it for a 64bit target would be incorrect.

Ben> Gaby, do you have any thoughts?

Ben> I suppose the following would work and be robust:

Ben> Have
Ben> 1) 16bit generic limits file
Ben> 2) 32bit generic limits file
Ben> 3) 64bit generic limits file
Ben> (to be honest, Red Hat's already needed a 16bit limits file)

Ben> As part of gen_numeric_limits, some kind of check is done to see if 
Ben> sizeof(native_int) != sizeof(target_int)

Ben> if so, then pick

Ben> generic_limits_(sizeof(target_int)) file.

	What part of limits_generic.h is 32-bit specific?  The "digits"
member?  min() and max() use LONG_MIN and LONG_MAX, etc. so those values
will be correct if the target header file supplies correct values.

Thanks, David


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