__alignof__(T) not compile time constant?

Richard Guenther rguenth@tat.physik.uni-tuebingen.de
Mon Sep 29 15:39:00 GMT 2003


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/



More information about the Gcc mailing list