This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
__alignof__(T) not compile time constant?
- From: Richard Guenther <rguenth at tat dot physik dot uni-tuebingen dot de>
- To: gcc at gcc dot gnu dot org
- Date: Mon, 29 Sep 2003 16:34:15 +0200 (CEST)
- Subject: __alignof__(T) not compile time constant?
Hi!
Can someone please look at C++/10479 and verify if the current behavior is
intentional? Just fyi:
template <int i>
struct foo2 {
float bar __attribute__((aligned(__alignof__(double))));
};
doesnt work because:
bellatrix:~/src/tests$ g++ -c attribute.cpp
attribute.cpp:7: requested alignment is not a constant
it works with the template <int i> removed.
Richard.
--
Richard Guenther <richard dot guenther at uni-tuebingen dot de>
WWW: http://www.tat.physik.uni-tuebingen.de/~rguenth/