Path: utzoo!utgpu!attcan!uunet!husc6!rutgers!gatech!bloom-beacon!mcgill-vision!mouse
From: mouse@mcgill-vision.UUCP (der Mouse)
Newsgroups: comp.lang.c
Subject: Re: Is range(ptrdiff_t) > range(size_t)?
Message-ID: <1237@mcgill-vision.UUCP>
Date: 11 Aug 88 08:46:03 GMT
References: <3740@psuvax1.cs.psu.edu> <485@draken.nada.kth.se>
Organization: McGill University, Montreal
Lines: 17

In article <485@draken.nada.kth.se>, pk-tle@nada.kth.se (Tommy Levitte) writes:
>> Is the following relationship always true?
>>      sizeof(char a[]) == &a[sizeof(a)] - &a[0]
> No! If you use any C on a PC system, this will never be true, due to
> the segment:offset adress format.

I believe that ANSI C will require (ie, draft ANSI C does require) that
this be true, and that the compiler arrange whatever is necessary when
subtracting pointers to make it so.

What's this about segment:offset address format?  My idea of a PC is a
MicroVAX-II, at least.  (Oh, you mean *IBM* PC?  Shoulda said so.)

					der Mouse

			uucp: mouse@mcgill-vision.uucp
			arpa: mouse@larry.mcrcim.mcgill.edu