You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@stdcxx.apache.org by "Martin Sebor (JIRA)" <ji...@apache.org> on 2006/01/07 01:20:15 UTC

[jira] Commented: (STDCXX-100) [aCC 3, 5] extern template inconsistently mangled

    [ http://issues.apache.org/jira/browse/STDCXX-100?page=comments#action_12362019 ] 

Martin Sebor commented on STDCXX-100:
-------------------------------------

-------- Original Message --------
Subject: Re:  aCC 3.52 extern template inconsistently mangled
Date: Mon, 1 Nov 2004 17:57:24 -0800 (PST)
From: Dennis Handly <dh...@cup.hp.com>
To: acxx-beta@cup.hp.com, sebor@roguewave.com

>From: Martin Sebor <se...@roguewave.com>
>I came across this bug after I worked around JAGaf22319:

Extern template is only supported for complete classes.  Not member
functions.

> extern template N::A<char>& foo(N::A<char>&, int);

This isn't valid.
aCC5 is broken the same as aCC3.
aCC6 seems to have the same mangling for -D and not, though.

>FWIW, this is how gcc 3.4 mangles the symbol:
>foo__H2ZcZi_1MRQ21Nt1A1ZX01X11_RQ21Nt1A1ZX01
Martin

There is no connection between g++ and aC++ mangling on PA.


> [aCC 3, 5] extern template inconsistently mangled
> -------------------------------------------------
>
>          Key: STDCXX-100
>          URL: http://issues.apache.org/jira/browse/STDCXX-100
>      Project: STDCXX
>         Type: Bug
>   Components: External
>     Versions: 4.1.2
>  Environment: HP aCC 3, 5
>     Reporter: Martin Sebor
>     Priority: Critical

>
> ****Created By: sebor @ Nov 01, 2004 03:00:09 PM****
> -------- Original Message --------
> Subject: aCC 3.52 extern template inconsistently mangled
> Date: Mon, 01 Nov 2004 11:49:12 -0700
> From: Martin Sebor <se...@roguewave.com>
> To: acxx-beta@cup.hp.com
> Hi,
> I came across this bug after I worked around JAGaf22319:
> $ cat t.cpp && aCC -Dextern="" -V -c t.cpp && nm t.o | grep foo && aCC
> -AA -c t.cpp && nm t.o | grep foo
> namespace N {
> template <class T> struct A { };
> }
> namespace M {
> template <class T, class V>
> N::A<T>& foo (N::A<T>&, V);
> extern template N::A<char>& foo (N::A<char>&, int);
> }
> #ifndef extern
> int main ()
> {
>    N::A<char> a;
>    M::foo (a, 0);
> }
> #else
> namespace M {
> template <class T, class V>
> N::A<T>& foo (N::A<T> &a, V) { return a; }
> }
> #endif
> aCC: HP ANSI C++ B3910B A.03.52
> foo__1MXTcTi_FRQ2_1N1AXTc_i|         0|extern|entry  |$CODE$
> foo__1MFRQ2_1N1AXTc_i|          |undef |code   |
> FWIW, this is how gcc 3.4 mangles the symbol:
> foo__H2ZcZi_1MRQ21Nt1A1ZX01X11_RQ21Nt1A1ZX01
> Martin

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira