This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [tree-ssa] Computed gotos
Erik Trulsson <ertr1013@student.uu.se> writes:
> On Sun, Jul 06, 2003 at 05:10:31PM -0700, Zack Weinberg wrote:
>> Branko ?ibej <brane@xbc.nu> writes:
>>
>> > Zack Weinberg wrote:
>> >
>> >>If the first one isn't a suitable definition of uintptr_t for some
>> >>target, the ABI is broken. (I know C99 allows
>> >>sizeof(long) < sizeof(void *). C99 is wrong.)
>> >>
>> > Oh bah. C has allowed this forever.
>>
>> To the contrary, C90 specifically forbids it.
>
> Chapter and verse, please?
> As far as I know neither C90 nor C99 guarantees that there even exists
> an integer type large enough to hold a pointer.
I slightly misspoke. C90 does not require sizeof(void*) <= sizeof(long).
What C90 does require is that sizeof(size_t) <= sizeof(long). On a
machine with a flat address space, this implies that
sizeof(void*) <= sizeof(long), and there is lots of live code that
relies on that implication.
C99 relaxed the requirement that sizeof(size_t) <= sizeof(long),
potentially breaking all that code, without (IMO) adequate reason.
And uintptr_t is not a mandatory type, although it should be.
zw