Mail Archives: djgpp/1998/01/14/19:31:15
> >> -- [ Why isn't %p printed with a '0x' prefix ] --
> > `p'
> > A pointer. This is printed with an `x' specifier.
> >
> >I interpret that to mean that "%p" works just like "%x", which it does.
> >
> >In any case, the way a pointer is printed is considered
> >"implementation-dependent". It is not necessary that DJGPP print pointers
> >the same way as any other system. Of course, if you have a compelling reason
> >you think it should, let's hear it.
>
> Well, Linux does it that way for one, and DJGPP should be as compatible as
> possible with Linux, don't you think?
Not always. POSIX compliance, yes. Common practice, perhaps. We
don't always side with Linux, because we're a DOS compiler, and some
practices aren't all that common.
In this case, Turbo C returns (i.e.) FF48 or 145E:8D30
SGI IRIX (another unix) returns (i.e.) 7fff2ef0
Linux is the odd-one-out in this case.
- Raw text -