Type safe vector API
Andreas Schwab
schwab@suse.de
Tue Jun 29 17:01:00 GMT 2004
Andreas Schwab <schwab@suse.de> writes:
> Paul Brook <paul@codesourcery.com> writes:
>
>> On Tuesday 29 June 2004 16:29, Andrew Pinski wrote:
>>> > I can no longer bootstrap after this patch. It's because
>>> > ~0u is not necessarily as wide as size_t.
>>> >
>>> > With this patch I can bootstrap:
>>>
>>> But it is wrong as ll is a C99 but not C90. I cannot remember
>>> if ul is C90 though.
>>
>> Isn't the proper solution ~(size_t)0
>
> The proper solution is (size_t)-1.
And you don't even need the cast if you have prototypes in scope.
Andreas.
--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux AG, MaxfeldstraÃe 5, 90409 Nürnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
More information about the Gcc-patches
mailing list