public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/19163] New: __attribute__((aligned)) not working in template
@ 2004-12-27 11:25 pcarlini at suse dot de
  2004-12-27 11:26 ` [Bug c++/19163] " pcarlini at suse dot de
                   ` (7 more replies)
  0 siblings, 8 replies; 15+ messages in thread
From: pcarlini at suse dot de @ 2004-12-27 11:25 UTC (permalink / raw)
  To: gcc-bugs

Unfortunately, it looks like even the very limited functionality of aligned vs
template (see, e.g., c++/17743) is broken and I cannot even attempt implementing
tr1::type_traits::aligned_storage: the attribute seems completely ignored,
otherwise I could at least provide specializations for Align = 1,2,4,8,16...

Needless to say, Icc seems ok :(

Testcase (but, in case please test partial specializations too!):

//////////////

struct A
{ typedef char type[4] __attribute__((aligned(4))); };

template<unsigned _Len>
  struct B
  { typedef char type[_Len] __attribute__((aligned(4))); };

template<bool> struct StaticAssert;
template<> struct StaticAssert<true> {};

StaticAssert<__alignof__(A::type) == __alignof__(B<4>::type)> a1;
StaticAssert<__alignof__(B<4>::type) == 4> a2;

/////////////////

Giovanni can you please have a look?!? Thanks!

-- 
           Summary: __attribute__((aligned)) not working in template
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: giovannibajo at libero dot it
        ReportedBy: pcarlini at suse dot de
                CC: gcc-bugs at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19163


^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2007-09-22 14:29 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-19163-133@http.gcc.gnu.org/bugzilla/>
2005-10-06  6:44 ` [Bug c++/19163] __attribute__((aligned)) not working in template giovannibajo at libero dot it
2007-09-06  5:51 ` jason at gcc dot gnu dot org
2007-09-06  6:11 ` jason at gcc dot gnu dot org
2007-09-06  6:17 ` mark at codesourcery dot com
2007-09-06  8:15 ` nathan at codesourcery dot com
2007-09-06 21:01 ` bkoz at gcc dot gnu dot org
2007-09-22 14:29 ` jason at gcc dot gnu dot org
2004-12-27 11:25 [Bug c++/19163] New: " pcarlini at suse dot de
2004-12-27 11:26 ` [Bug c++/19163] " pcarlini at suse dot de
2004-12-27 13:18 ` giovannibajo at libero dot it
2004-12-27 13:24 ` pcarlini at suse dot de
2004-12-27 15:45 ` pcarlini at suse dot de
2004-12-27 15:46 ` pcarlini at suse dot de
2004-12-27 22:07 ` giovannibajo at libero dot it
2004-12-29 18:57 ` gdr at integrable-solutions dot net
2004-12-29 19:05 ` pcarlini at suse dot de

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).