No Subject

D Maley d.maley@stmarys-belfast.ac.uk
Tue Dec 8 13:15:00 GMT 1998


Back again, easy one this time (to describe). If I create a class in a
namespace which inherits from a class of the same name from another
namespace, and my class has an inner class, I get error #42. If I remove the
inner class, or don't use the same name for the superclass and subclass,
there isn't a problem.

P200, Solaris 2.6, egcs 1.1b.

#include <vector.h>

namespace xyz {

template <class T, class Alloc = alloc>
class vector : public std::vector<T, Alloc> {
  class empty {};
public:

};
} // namespace xyz

void main()
{
using namespace xyz;
using xyz::vector;
  vector<float> vv;
}


gcc -DXTFUNCPROTO -DSUN -w -falt-external-templates -I/usr/openwin/include
-I/usr/dt/share/include -I.  -c -o test.o test.cpp 2>>err
*** Error code 1
make: Fatal error: Command failed for target `test.o'
test.cpp: In instantiation of
`::xyz::::xyz::vector<float,__default_alloc_template<false,0> >':
test.cpp:18:   instantiated from here
test.cpp:18: Internal compiler error 42.
test.cpp:18: Please submit a full bug report to `egcs-bugs@cygnus.com'.
airforce1% 


        --- |================================================|
      ----  |-=|         Dave Maley, M.A., M.Phil.        |=-| ,---I
      ---   |================================================| |== U-----
        --- | Computer Manager, St. Mary's College, Belfast  | |== U (: |
      ---   |________________________________________________| |   U----'-----
     -----  |________________________________/   ____====______|   U'  ()___(|
        ---  #__ //,-,  ,-,  ,-,\\         \|   ///,-,  ,-, \\ -------/,-,\_[
                ''( 0 )( 0 )( 0 )'          o  -''( 0 )( 0 ) \\#####====( 0 )
     --------------'-'--'-'--'-'-------------------'-'--'-'--------------'-'----





More information about the Gcc-bugs mailing list