This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/16171] Problems when deriving from basic stream classes


------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]