This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/16171] Problems when deriving from basic stream classes
- From: "reichelt at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 24 Jun 2004 14:16:47 -0000
- Subject: [Bug c++/16171] Problems when deriving from basic stream classes
- References: <20040624070753.16171.mark@emantic.co.uk>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From reichelt at gcc dot gnu dot org 2004-06-24 14:16 -------
Here's a reduced testcase which causes assembler errors since gcc 3.3:
=============================================================================
struct A {};
namespace std
{
template<typename> struct char_traits;
template<typename, typename> struct basic_iostream : virtual A {};
}
template <typename T, typename U = std::char_traits<T> > struct basic_iostream
: std::basic_iostream<T, U> {};
basic_iostream<char> s;
=============================================================================
With mainline, for example, I get:
/tmp/ccmexVtk.s: Assembler messages:
/tmp/ccmexVtk.s:124: Error: symbol `_ZTVSd' is already defined
/tmp/ccmexVtk.s:133: Error: symbol `_ZTTSd' is already defined
What really strikes me is the fact that the errors go away if I replace
"std" or "char_traits" or "basic_iostream" by a different name.
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |reichelt at gcc dot gnu dot
| |org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16171