public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/19646] New: link error calling do_tolower using template type unsigned char
@ 2005-01-26 19:59 vwktsang at ca dot ibm dot com
  2005-01-26 20:33 ` [Bug libstdc++/19646] " pinskia at gcc dot gnu dot org
  2005-01-26 20:43 ` pinskia at gcc dot gnu dot org
  0 siblings, 2 replies; 3+ messages in thread
From: vwktsang at ca dot ibm dot com @ 2005-01-26 19:59 UTC (permalink / raw)
  To: gcc-bugs

Source code for a.cpp
---------------------------------------
#include <locale>

struct mystruct : public std::ctype<unsigned char> 
{
   unsigned char my_do_tolower(unsigned char ch) const
   {
      return (do_tolower(ch));
   }
};

int main()
{
       int rc = 0;
       mystruct structA;
       if (structA.my_do_tolower('A') != 'a') rc++;
       return rc;
}

---------------------------------------

Actual Output:
/tmp/cc8bTl0c.o(.gnu.linkonce.t._ZN8mystructD1Ev+0x2c): In function 
`mystruct::~mystruct [in-charge]()':
: undefined reference to `std::ctype<unsigned char>::~ctype [not-in-charge]()'
/tmp/cc8bTl0c.o(.gnu.linkonce.r._ZTV8mystruct+0x10): undefined reference to 
`std::ctype<unsigned char>::do_is(unsigned short, unsigned char) const'
/tmp/cc8bTl0c.o(.gnu.linkonce.r._ZTV8mystruct+0x14): undefined reference to 
`std::ctype<unsigned char>::do_is(unsigned char const*, unsigned char const*, 
unsigned short*) const'
/tmp/cc8bTl0c.o(.gnu.linkonce.r._ZTV8mystruct+0x18): undefined reference to 
`std::ctype<unsigned char>::do_scan_is(unsigned short, unsigned char const*, 
unsigned char const*) const'
/tmp/cc8bTl0c.o(.gnu.linkonce.r._ZTV8mystruct+0x1c): undefined reference to 
`std::ctype<unsigned char>::do_scan_not(unsigned short, unsigned char const*, 
unsigned char const*) const'
/tmp/cc8bTl0c.o(.gnu.linkonce.r._ZTV8mystruct+0x20): undefined reference to 
`std::ctype<unsigned char>::do_toupper(unsigned char) const'
/tmp/cc8bTl0c.o(.gnu.linkonce.r._ZTV8mystruct+0x24): undefined reference to 
`std::ctype<unsigned char>::do_toupper(unsigned char*, unsigned char const*) 
const'
/tmp/cc8bTl0c.o(.gnu.linkonce.r._ZTV8mystruct+0x28): undefined reference to 
`std::ctype<unsigned char>::do_tolower(unsigned char) const'
/tmp/cc8bTl0c.o(.gnu.linkonce.r._ZTV8mystruct+0x2c): undefined reference to 
`std::ctype<unsigned char>::do_tolower(unsigned char*, unsigned char const*) 
const'
/tmp/cc8bTl0c.o(.gnu.linkonce.r._ZTV8mystruct+0x30): undefined reference to 
`std::ctype<unsigned char>::do_widen(char) const'
/tmp/cc8bTl0c.o(.gnu.linkonce.r._ZTV8mystruct+0x34): undefined reference to 
`std::ctype<unsigned char>::do_widen(char const*, char const*, unsigned char*) 
const'
/tmp/cc8bTl0c.o(.gnu.linkonce.r._ZTV8mystruct+0x38): undefined reference to 
`std::ctype<unsigned char>::do_narrow(unsigned char, char) const'
/tmp/cc8bTl0c.o(.gnu.linkonce.r._ZTV8mystruct+0x3c): undefined reference to 
`std::ctype<unsigned char>::do_narrow(unsigned char const*, unsigned char 
const*, char, char*) const'
/tmp/cc8bTl0c.o(.gnu.linkonce.r._ZTVSt5ctypeIhE+0x8): undefined reference to 
`std::ctype<unsigned char>::~ctype [in-charge]()'
/tmp/cc8bTl0c.o(.gnu.linkonce.r._ZTVSt5ctypeIhE+0xc): undefined reference to 
`std::ctype<unsigned char>::~ctype [in-charge deleting]()'
/tmp/cc8bTl0c.o(.gnu.linkonce.r._ZTVSt5ctypeIhE+0x10): undefined reference to 
`std::ctype<unsigned char>::do_is(unsigned short, unsigned char) const'
/tmp/cc8bTl0c.o(.gnu.linkonce.r._ZTVSt5ctypeIhE+0x14): undefined reference to 
`std::ctype<unsigned char>::do_is(unsigned char const*, unsigned char const*, 
unsigned short*) const'
/tmp/cc8bTl0c.o(.gnu.linkonce.r._ZTVSt5ctypeIhE+0x18): undefined reference to 
`std::ctype<unsigned char>::do_scan_is(unsigned short, unsigned char const*, 
unsigned char const*) const'
/tmp/cc8bTl0c.o(.gnu.linkonce.r._ZTVSt5ctypeIhE+0x1c): undefined reference to 
`std::ctype<unsigned char>::do_scan_not(unsigned short, unsigned char const*, 
unsigned char const*) const'
/tmp/cc8bTl0c.o(.gnu.linkonce.r._ZTVSt5ctypeIhE+0x20): undefined reference to 
`std::ctype<unsigned char>::do_toupper(unsigned char) const'
/tmp/cc8bTl0c.o(.gnu.linkonce.r._ZTVSt5ctypeIhE+0x24): undefined reference to 
`std::ctype<unsigned char>::do_toupper(unsigned char*, unsigned char const*) 
const'
/tmp/cc8bTl0c.o(.gnu.linkonce.r._ZTVSt5ctypeIhE+0x28): undefined reference to 
`std::ctype<unsigned char>::do_tolower(unsigned char) const'
/tmp/cc8bTl0c.o(.gnu.linkonce.r._ZTVSt5ctypeIhE+0x2c): undefined reference to 
`std::ctype<unsigned char>::do_tolower(unsigned char*, unsigned char const*) 
const'
/tmp/cc8bTl0c.o(.gnu.linkonce.r._ZTVSt5ctypeIhE+0x30): undefined reference to 
`std::ctype<unsigned char>::do_widen(char) const'
/tmp/cc8bTl0c.o(.gnu.linkonce.r._ZTVSt5ctypeIhE+0x34): undefined reference to 
`std::ctype<unsigned char>::do_widen(char const*, char const*, unsigned char*) 
const'
/tmp/cc8bTl0c.o(.gnu.linkonce.r._ZTVSt5ctypeIhE+0x38): undefined reference to 
`std::ctype<unsigned char>::do_narrow(unsigned char, char) const'
/tmp/cc8bTl0c.o(.gnu.linkonce.r._ZTVSt5ctypeIhE+0x3c): undefined reference to 
`std::ctype<unsigned char>::do_narrow(unsigned char const*, unsigned char 
const*, char, char*) const'
/tmp/cc8bTl0c.o(.gnu.linkonce.t._ZN8mystructD0Ev+0x2c): In function 
`mystruct::~mystruct [in-charge deleting]()':
: undefined reference to `std::ctype<unsigned char>::~ctype [not-in-charge]()'
collect2: ld returned 1 exit status


Release:
gcc version 3.3.3 (SuSE Linux)

Environment:
Configured with: ../configure --enable-threads=posix --prefix=/usr --with-local-
prefix=/usr/local --infodir=/usr/share/info --mandir=/usr/share/man --enable-
languages=c,c++,f77,objc,java,ada --disable-checking --libdir=/usr/lib --enable-
libgcj --with-gxx-include-dir=/usr/include/g++ --with-slibdir=/lib --with-
system-zlib --enable-shared --enable-__cxa_atexit --host=powerpc-suse-linux --
build=powerpc-suse-linux --target=powerpc-suse-linux --enable-targets=powerpc64-
suse-linux --enable-biarch
Thread model: posix
gcc version 3.3.3 (SuSE Linux)

How to repeat:
g++ a.cpp

-- 
           Summary: link error calling do_tolower using template type
                    unsigned char
           Product: gcc
           Version: 3.3.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: vwktsang at ca dot ibm dot com
                CC: gcc-bugs at gcc dot gnu dot org


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


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

* [Bug libstdc++/19646] link error calling do_tolower using template type unsigned char
  2005-01-26 19:59 [Bug c++/19646] New: link error calling do_tolower using template type unsigned char vwktsang at ca dot ibm dot com
@ 2005-01-26 20:33 ` pinskia at gcc dot gnu dot org
  2005-01-26 20:43 ` pinskia at gcc dot gnu dot org
  1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-01-26 20:33 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|c++                         |libstdc++


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


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

* [Bug libstdc++/19646] link error calling do_tolower using template type unsigned char
  2005-01-26 19:59 [Bug c++/19646] New: link error calling do_tolower using template type unsigned char vwktsang at ca dot ibm dot com
  2005-01-26 20:33 ` [Bug libstdc++/19646] " pinskia at gcc dot gnu dot org
@ 2005-01-26 20:43 ` pinskia at gcc dot gnu dot org
  1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-01-26 20:43 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-01-26 20:43 -------
This is not a bug.
See <http://gcc.gnu.org/onlinedocs/libstdc++/21_strings/howto.html#5> for why.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |INVALID


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


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

end of thread, other threads:[~2005-01-26 20:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-01-26 19:59 [Bug c++/19646] New: link error calling do_tolower using template type unsigned char vwktsang at ca dot ibm dot com
2005-01-26 20:33 ` [Bug libstdc++/19646] " pinskia at gcc dot gnu dot org
2005-01-26 20:43 ` 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).