libstdc++/8836: char_traits<signed char> undefined at link time ( char_traits<char> is OK )
richarda@vecien.com
richarda@vecien.com
Thu Dec 5 16:26:00 GMT 2002
>Number: 8836
>Category: libstdc++
>Synopsis: char_traits<signed char> undefined at link time ( char_traits<char> is OK )
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Dec 05 16:26:01 PST 2002
>Closed-Date:
>Last-Modified:
>Originator: richarda@vecien.com
>Release: 3.2.1
>Organization:
>Environment:
i386-pc-linux-gnu (RedHat 7.3)
>Description:
gint8 from glib is
typedef signed char gint8;
using basic_streambuf<gint8> fails at link with
undefined reference to `std::char_traits<signed char>::eof()'
undefined reference to `std::char_traits<signed char>::eq_int_type(unsigned long const&, unsigned long const&)'
undefined reference to `std::char_traits<signed char>::eof()'
undefined reference to `std::char_traits<signed char>::not_eof(unsigned long const&)'
etc...
Works fine if typedef is changed to use 'char' instead of 'signed char'.
>How-To-Repeat:
#include <istream>
typedef signed char c_type;
class buf : public std::basic_streambuf<c_type>
{
public:
buf()
{
}
virtual ~buf()
{
}
};
int main (int argc, char * argv[] )
{
buf * b = new buf;
return 0;
}
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the Gcc-bugs
mailing list