This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

__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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]