This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/10479] __alignof__(double) not compile time constant inside template class
- From: "rguenth at tat dot physik dot uni-tuebingen dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 14 Sep 2004 14:51:38 -0000
- Subject: [Bug c++/10479] __alignof__(double) not compile time constant inside template class
- References: <20030424121601.10479.rguenth@tat.physik.uni-tuebingen.de>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From rguenth at tat dot physik dot uni-tuebingen dot de 2004-09-14 14:51 -------
Subject: Re: __alignof__(double) not compile time constant
inside template class
> To solve, this problem, one would have to redesign the name lookup
> rules for attributes. Or/and provide an "escaping" mechanism for the
> compiler to follow usual language rules.
Does this "match" with that it works for non-template classes? I.e.
struct foo2 {
float bar __attribute__((aligned(__alignof__(double))));
};
just works. Remember that "double" is not a dependent type - I would
certainly understand that using a dependent type would not work (or
would be harder to do). But not allowing non-dependent types in template
classes doesn't look difficult (from a users point of view), are they?
Thanks for trying to explain,
Richard.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=10479