This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/17743] dependent expressions in attributes
- From: "giovannibajo at libero dot it" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 18 Oct 2004 16:38:52 -0000
- Subject: [Bug c++/17743] dependent expressions in attributes
- References: <20040930042632.17743.bkoz@gcc.gnu.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From giovannibajo at libero dot it 2004-10-18 16:38 -------
(In reply to comment #15)
> I guess I don't see why/how alignof should be different than sizeof
> here (which works):
> template <class T>
> struct A
> {
> char foo[sizeof(T)];
> };
Yes, but how do you force the compiler to ensure that the alignment of char foo
[] is sufficient to placement-allocate an object of type T into it?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17743