public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/55275] New: abi_tag attribute doesn't work on explicit specializations of class templates
@ 2012-11-11 20:28 redi at gcc dot gnu.org
  2012-11-12 17:29 ` [Bug c++/55275] " jason at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: redi at gcc dot gnu.org @ 2012-11-11 20:28 UTC (permalink / raw)
  To: gcc-bugs


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

             Bug #: 55275
           Summary: abi_tag attribute doesn't work on explicit
                    specializations of class templates
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: redi@gcc.gnu.org
                CC: jason@gcc.gnu.org


This doesn't compile:

template<typename T>
struct __attribute ((abi_tag("cxx11"))) Foo
{
  int f();
};

template<>
struct
__attribute ((abi_tag("cxx11")))
Foo<int>
{
  int f();
};

int main()
{
  Foo<int> f;
  f.f();
}

abi.cc:10:1: error: redeclaration of ‘struct Foo<int>’ adds abi tag "cxx11"
 Foo<int>
 ^
abi.cc:2:41: note: previous declaration here
 struct __attribute ((abi_tag("cxx11"))) Foo
                                         ^

If I remove the attribute from the specialization then it compiles but the name
of the specialization doesn't include the abi_tag:

                 U _ZN3FooIiE1fEv

I want to use this with std::future which has explicit specializations.


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

end of thread, other threads:[~2012-11-15 14:49 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-11-11 20:28 [Bug c++/55275] New: abi_tag attribute doesn't work on explicit specializations of class templates redi at gcc dot gnu.org
2012-11-12 17:29 ` [Bug c++/55275] " jason at gcc dot gnu.org
2012-11-12 18:05 ` redi at gcc dot gnu.org
2012-11-15  1:54 ` jason at gcc dot gnu.org
2012-11-15 14:49 ` jason at gcc dot gnu.org

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