Re: portability question



> I might be wrong here, but doesn't that go against the C standard?

You are wrong :-)

> Shouldn't long be (at least) 64 bits on a 64-bit platform? I thought
> ANSI C guaranteed that a pointer should fit inside a long. If that's not
> the case this might be a huge portability problem then 64-bit platforms
> become more common.

There's no guarantee that sizeof (long) >= sizeof (void*) so indeed,
any such code will cause trouble on several 64 bit platforms.

Arno



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]