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

* [Bug c++/55275] abi_tag attribute doesn't work on explicit specializations of class templates
  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 ` jason at gcc dot gnu.org
  2012-11-12 18:05 ` redi at gcc dot gnu.org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: jason at gcc dot gnu.org @ 2012-11-12 17:29 UTC (permalink / raw)
  To: gcc-bugs


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

Jason Merrill <jason at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2012-11-12
     Ever Confirmed|0                           |1

--- Comment #1 from Jason Merrill <jason at gcc dot gnu.org> 2012-11-12 17:28:59 UTC ---
I agree this is a bug, but I still don't think you need to tag future, since
it's new in C++11.


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

* [Bug c++/55275] abi_tag attribute doesn't work on explicit specializations of class templates
  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
  3 siblings, 0 replies; 5+ messages in thread
From: redi at gcc dot gnu.org @ 2012-11-12 18:05 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-11-12 18:04:53 UTC ---
Yep, I filed this before your reply on the list.  I'm happy to change <future>
without using the tag, I was just being (maybe too) cautious about ABI changes.
 Thanks.


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

* [Bug c++/55275] abi_tag attribute doesn't work on explicit specializations of class templates
  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
  3 siblings, 0 replies; 5+ messages in thread
From: jason at gcc dot gnu.org @ 2012-11-15  1:54 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #3 from Jason Merrill <jason at gcc dot gnu.org> 2012-11-15 01:53:34 UTC ---
Author: jason
Date: Thu Nov 15 01:53:23 2012
New Revision: 193524

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=193524
Log:
    PR c++/55275
    * pt.c (maybe_process_partial_specialization): Update
    DECL_SOURCE_LOCATION for new specializations.

Added:
    trunk/gcc/testsuite/g++.dg/abi/abi-tag3.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/pt.c
    trunk/gcc/testsuite/g++.dg/cpp0x/pr31439.C
    trunk/gcc/testsuite/g++.dg/template/crash98.C
    trunk/libstdc++-v3/testsuite/ext/type_traits/add_unsigned_integer_neg.cc
    trunk/libstdc++-v3/testsuite/ext/type_traits/remove_unsigned_integer_neg.cc


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

* [Bug c++/55275] abi_tag attribute doesn't work on explicit specializations of class templates
  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
                   ` (2 preceding siblings ...)
  2012-11-15  1:54 ` jason at gcc dot gnu.org
@ 2012-11-15 14:49 ` jason at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: jason at gcc dot gnu.org @ 2012-11-15 14:49 UTC (permalink / raw)
  To: gcc-bugs


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

Jason Merrill <jason at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED

--- Comment #4 from Jason Merrill <jason at gcc dot gnu.org> 2012-11-15 14:48:41 UTC ---
Fixed.


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