--On Monday, June 21, 2004 3:33 PM -0400 Aleksandar Donev
<[log in to unmask]> wrote:
> So these two pointers must be ASSOCIATED? I mean, the two obviously
> share the same target since the address is the same, and they have the
> same type, and are both scalar, so my reading of the description of
> ASSOCIATED says it should print true.
I think you need to show more data. Associated can be tricky, particularly
when things like dummy arguments get involved (not clear to me whether
they are or are not).
The standard does not have a concept of "memory address", so that is
only indirectly relevant. While one can make "obvious" guesses about
how to translate standard-speak into things like memory addresses, one can
also make mistaken assumptions in doing that. It has happened before.
No, the compiler is *NOT* required to implement the associated intrinsic
by anything based on the target address. One can imagine such
implementations (and probably most do), but one can also imagine other
implementations that would also be standard-conforming.
If I take out the bit about memory addresses, there obviously isn't enough
data to say (two scalars of the same type might or might not be
associated), so that part is absolutely critical to your question - no I
cannot just
assume how to interpret it, because it is the crux of the question.
Oh, and I find it suspicious that you didn't mention another
matter, because it is high on the list of pointer-related errors.
Might one of the pointers in question have an undefined pointer
association status? If the association status is undefined, then
you aren't allowed to even call associated. Or for that matter, is
one of them disassociated? If you are just looking at pointer innards
such as the target address, that might be irrelevant if there is a
bit somewhere else saying that the pointer is disassociated.
--
Richard Maine | Good judgment comes from experience;
[log in to unmask] | experience comes from bad judgment.
| -- Mark Twain
|