This is the mail archive of the gcc-bugs@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]

[Bug c++/10479] __alignof__(double) not compile time constant inside template class


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


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