Steven L. Zook wrote:
I guess what I don't understand is why struct A isn't POD. A reference
to something is basically just a pointer. It has no alignment
restrictions that a pointer wouldn't.
a reference type is not a pod type because the language says so.
nathan
--
Nathan Sidwell:: ht
Sent: Wednesday, December 07, 2005 8:03 AM
To: Steven L. Zook
Cc: gcc@gcc.gnu.org
Subject: Re: C++ 3.4.5 packed reference warning
Steven L. Zook wrote:
> When I compile this using gcc rev 3.4.5 (m68k-elf):
>
> struct A { charB;
>unsigned char & C; } __attribute_
Steven L. Zook wrote:
When I compile this using gcc rev 3.4.5 (m68k-elf):
struct A { charB;
unsigned char & C; } __attribute__((packed));
unsigned char D;
A E = { 'F', D };
I get:
testpp.cpp:2: warning: ignoring packed attribute on unpacked non-POD
field `unsigned char&A