Feature request for "friendship" of pointers in "C"
Andreas Schwab
schwab@linux-m68k.org
Tue Mar 17 21:41:25 GMT 2020
On Mär 17 2020, Holger Lamm wrote:
> No. The order of elements of structures in memory is implementation
> defined and not guaranteed to be the order of enumeration in the
> definition.
That is not true. The first member is guaranteed to have the same
address as the whole structure, and subsequent members have increasing
addresses, in declaration order.
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1
"And now for something completely different."
More information about the Gcc
mailing list