Re: [PATCH 1/9] Define a structure for object IDs.

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: [PATCH 1/9] Define a structure for object IDs.

From: Andreas Schwab <hidden>
Date: 2016-06-15 23:01:00

David Kastrup [off-list ref] writes:
It does not as far as I can see guarantee that a pointer to something
of the same type of its first member can be converted to a pointer to
a struct even if the struct only contains a member of such type.
This sentence doesn't make any sense.  If you have an object of struct
type then any pointer to the first member of the object can only be a
pointer to the one and same object.

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

Re: [PATCH 1/9] Define a structure for object IDs.

From: James Denholm <hidden>
Date: 2016-06-15 23:01:01

On 5 May 2014 19:23:06 GMT+10:00, Andreas Schwab [off-list ref] wrote:
David Kastrup [off-list ref] writes:
quoted
It does not as far as I can see guarantee that a pointer to something
of the same type of its first member can be converted to a pointer to
a struct even if the struct only contains a member of such type.
This sentence doesn't make any sense.  If you have an object of struct
type then any pointer to the first member of the object can only be a
pointer to the one and same object.
I think what David means is that a pointer to a wrapper
can be derefed into its internal, sure, but an object of
that internal type can't necessarily pretend to be a
wrapper.

That said, obviously I'm not David, so I could be wrong.
That's what I got from his statement, though.

Regards,
James Denholm.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help