comp.std.c

Doug Gwyn gwyn at smoke.BRL.MIL
Sun Sep 3 09:08:33 AEST 1989


In article <619 at targon.UUCP> andre at targon.UUCP (andre) writes:
>Does this mean that on OS/2 on an '386 with a buffer gotten from
>the system, the compiler sees to it that the char *head does never!
>ends up in an address register?

I'm not familiar enough with that environment to answer definitively,
but I don't understand the problem.  The whole reason the Standard
does not guarantee array[0]-1 is to accommodate such address space issues.
The reason it does guarantee array[last]+1 is because otherwise looping
would be painful; since only a single byte (or maybe word) extra is
required at the end, the compiler should arrange for the extra slop
and all will be well.



More information about the Comp.lang.c mailing list