Re: C89, size_t, and long
- From: Yevgen Muntyan <muntyan.removethis@xxxxxxxx>
- Date: Wed, 14 Mar 2007 19:57:08 GMT
Eric Sosman wrote:
Yevgen Muntyan wrote On 03/14/07 15:14,:Eric Sosman wrote:
Yevgen Muntyan wrote On 03/14/07 14:26,:It has 32-bit long, same as int, and naturally 64-bit size_t.[...]I don't know MS' Win64 implementation well enough to comment
Was it required by C89 that result of sizeof() fits into unsigned long,
and that pointer subtraction result fits into long? [...]
If yes, then MS
Win64 implementation is not C89-conforming (while sizeof case may be
arguable, I guess, we certainly can ask to malloc more than ULONG_MAX
bytes, and get pointer arithmetics which needs more than (unsigned)
long). [...]
on whether it's broken or not.
If size_t is wider than long, the implementation cannot
conform to C89. It could, however, conform to C99, with
size_t being as wide as long long or as some other wide type.
One of the (many) things I don't know about MS Win64 is what
standards it claims to conform to.
It claims conformance to C90. It does not conform to C99.
....
[...] Anyway, is MS Win64 implementation not
C89-conforming (it's an important thing, isn't it)? Or I do miss
something?
From your description, it cannot be a conforming C89
implementation. Is that important? Well, to whom?
Well, to people who want to write code which would work on win64.
Yevgen
.
- Follow-Ups:
- Re: C89, size_t, and long
- From: Stephen Sprunk
- Re: C89, size_t, and long
- From: Eric Sosman
- Re: C89, size_t, and long
- References:
- C89, size_t, and long
- From: Yevgen Muntyan
- Re: C89, size_t, and long
- From: Eric Sosman
- Re: C89, size_t, and long
- From: Yevgen Muntyan
- Re: C89, size_t, and long
- From: Eric Sosman
- C89, size_t, and long
- Prev by Date: Re: modifying the strings pointed to by argv
- Next by Date: Re: [OT] Is Islam Really a Religion of Terror?
- Previous by thread: Re: C89, size_t, and long
- Next by thread: Re: C89, size_t, and long
- Index(es):
Relevant Pages
|