public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/14655] New: linker cannot find const static template members on HP
@ 2004-03-19 17:40 thomas dot rudlof at gmx dot de
  2004-03-19 18:17 ` [Bug target/14655] " pinskia at gcc dot gnu dot org
  0 siblings, 1 reply; 2+ messages in thread
From: thomas dot rudlof at gmx dot de @ 2004-03-19 17:40 UTC (permalink / raw)
  To: gcc-bugs

the following program:
--------------------------------------------------
template<class T>
struct S {
  static const int _i;
};

template<class T> const int S<T>::_i = 0;

int main()
{
  return S<char>::_i;
}
-----------------------------------------
result in this error:

northend:~/c> /usr/cygnus/gnupro-03r1p3/H-hppa1.1-hp-hpux11.00/bin/gcc  temp.cc
/usr/ccs/bin/ld: Unsatisfied symbols:
   S<char>::_i  (first referenced in /var/tmp//ccQMvubh.o) (data)
collect2: ld returned 1 exit status

I am working with ...

northend:~/c> /usr/cygnus/gnupro-03r1p3/H-hppa1.1-hp-hpux11.00/bin/gcc -v
Reading specs from
/usr/cygnus/gnupro-03r1p3/H-hppa1.1-hp-hpux11.00/lib/gcc-lib/hppa1.1-hp-hpux11.00/3.2-gnupro-03r1/specs
Configured with: /wv/cst7/gnupro-03r1/src/gnupro-03r1/src-native/configure
--src=/wv/cst7/gnupro-03r1/src/gnupro-03r1/src-native
--host=hppa1.1-hp-hpux11.00 --target=hppa1.1-hp-hpux11.00
--prefix=/usr/cygnus/gnupro-03r1p3
--exec-prefix=/usr/cygnus/gnupro-03r1p3/H-hppa1.1-hp-hpux11.00
--enable-languages=c,c++ --disable-nls

-- 
           Summary: linker cannot find const static template members on HP
           Product: gcc
           Version: 3.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: thomas dot rudlof at gmx dot de
                CC: gcc-bugs at gcc dot gnu dot org


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


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

* [Bug target/14655] linker cannot find const static template members on HP
  2004-03-19 17:40 [Bug c++/14655] New: linker cannot find const static template members on HP thomas dot rudlof at gmx dot de
@ 2004-03-19 18:17 ` pinskia at gcc dot gnu dot org
  0 siblings, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-03-19 18:17 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-03-19 18:17 -------
From: <http://gcc.gnu.org/install/specific.html>:
GCC 3.3 and later support weak symbols on the 32-bit port using SOM secondary definition symbols. 
This feature is not enabled for earlier versions of HP-UX since there have been bugs in the linker 
support for secondary symbols. The HP linker patches PHSS_26559 and PHSS_24304 for HP-UX 11.00 
and 11.11, respectively, correct the problem of linker core dumps creating C++ libraries. Earlier 
patches may work but they have not been tested.
So this is fixed for 3.3 so closing.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
          Component|c++                         |target
         Resolution|                            |FIXED
            Summary|linker cannot find const    |linker cannot find const
                   |static template members on  |static template members on
                   |HP                          |HP
   Target Milestone|---                         |3.3


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


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

end of thread, other threads:[~2004-03-19 18:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-03-19 17:40 [Bug c++/14655] New: linker cannot find const static template members on HP thomas dot rudlof at gmx dot de
2004-03-19 18:17 ` [Bug target/14655] " pinskia at gcc dot gnu dot 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).