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]

egcs-1.0.0 v.2.90.23 && v.2.91.06 acces problems to inherited data members


/*
  Hi again!

  We came up with some new stuff regarding egcs. We had to try find a way out 
  of linker problems regarding strings under Linux so I gave it a shot with
  2.91.06. It worked fine till right now, so I have one question:

  Shouldn't iterator and const_iterator be accessable in my, from map 
  derived, class X ??

  Code compiles with one version und not with the other...


  Hopefullt it helps...

  Thanx!

  m.




    STL example:
*/

# include <map>


template <class Key, class Value >
class X : public map<Key,Value, less<Key* > >
{
 public :
 class bingo { int b_; };

        void foo();
};

template <class Key, class Value >
void             X<Key,Value >::foo()
{
 bingo b1_;

 iterator it1_;
 map<Key,Value, less<Key* > >::iterator it2_;

 const_iterator cit1_;
 map<Key,Value, less<Key* > >::const_iterator cit2_;

 return;
};


    Compiles with : egcs-2.90.23

rt95:gcl/example/Tests[1261]$> g++ -v egcs_2.90.23_2.91.06_inheritance_probs.cpp 
Reading specs from /usr/local/lib/gcc-lib/hppa1.1-hp-hpux10.20/egcs-2.90.23/specs
gcc version egcs-2.90.23 980102 (egcs-1.0.1 release)
 /usr/local/lib/gcc-lib/hppa1.1-hp-hpux10.20/egcs-2.90.23/cpp -lang-c++ -v -undef -D__GNUC__=2 -D__GNUG__=2 -D__cplusplus -D__GNUC_MINOR__=90 -Dhppa -Dhp9000s800 -D__hp9000s800 -Dhp9k8 -DPWB -Dhpux -Dunix -D__hppa__ -D__hp9000s800__ -D__hp9000s800 -D__hp9
k8__ -D__PWB__ -D__hpux__ -D__unix__ -D__hppa -D__hp9000s800 -D__hp9k8 -D__PWB -D__hpux -D__unix -Asystem(unix) -Asystem(hpux) -Acpu(hppa) -Amachine(hppa) -D__EXCEPTIONS -D__hp9000s700 -D_PA_RISC1_1 -D_HPUX_SOURCE -D_HIUX_SOURCE egcs_2.90.23_2.91.06_inher
itance_probs.cpp /var/tmp/cca12043.ii
GNU CPP version egcs-2.90.23 980102 (egcs-1.0.1 release) (hppa)
#include "..." search starts here:
#include <...> search starts here:
 /usr/local/include/g++
 /usr/local/lib/g++-include
 /usr/local/include
 /usr/local/hppa1.1-hp-hpux10.20/include
 /usr/local/lib/gcc-lib/hppa1.1-hp-hpux10.20/egcs-2.90.23/include
 /usr/include
End of search list.
 /usr/local/lib/gcc-lib/hppa1.1-hp-hpux10.20/egcs-2.90.23/cc1plus /var/tmp/cca12043.ii -quiet -dumpbase egcs_2.90.23_2.91.06_inheritance_probs.cc -version -o /var/tmp/cca12043.s
GNU C++ version egcs-2.90.23 980102 (egcs-1.0.1 release) (hppa1.1-hp-hpux10.20) compiled by GNU C version egcs-2.90.23 980102 (egcs-1.0.1 release).
 /usr/local/hppa1.1-hp-hpux10.20/bin/as -o /var/tmp/cca120431.o /var/tmp/cca12043.s
 /usr/local/lib/gcc-lib/hppa1.1-hp-hpux10.20/egcs-2.90.23/ld -L/lib/pa1.1 -L/usr/lib/pa1.1 -z -u main /usr/ccs/lib/crt0.o -L/usr/local/lib/gcc-lib/hppa1.1-hp-hpux10.20/egcs-2.90.23 -L/usr/local/hppa1.1-hp-hpux10.20/lib -L/usr/ccs/bin -L/usr/ccs/lib -L/usr
/local/lib /var/tmp/cca120431.o -lstdc++ -lm -lgcc -lc -lgcc

    Fails with    : egcs-2.91.06

cvjetko@rt99:/home/cvjet/gcl/example/Tests > g++ -v egcs_2.90.23_2.91.06_inheritance_probs.cpp 
Reading specs from /usr/lib/gcc-lib/i586-pc-linux-gnulibc1/egcs-2.91.06/specs
gcc version egcs-2.91.06 980122 (gcc-2.8.0 release)
 /usr/lib/gcc-lib/i586-pc-linux-gnulibc1/egcs-2.91.06/cpp -lang-c++ -v -undef -D__GNUC__=2 -D__GNUG__=2 -D__cplusplus -D__GNUC_MINOR__=91 -D__ELF__ -Dunix -Dlinux -D__ELF__ -D__unix__ -D__linux__ -D__unix -D__linux -Asystem(posix) -D__EXCEPTIONS -Di386 -D
i586 -Asystem(unix) -Acpu(i386) -Amachine(i386) -D__i386__ -D__i586__ -Asystem(unix) -Acpu(i386) -Amachine(i386) egcs_2.90.23_2.91.06_inheritance_probs.cpp /tmp/cca00230.ii
GNU CPP version egcs-2.91.06 980122 (gcc-2.8.0 release) (i386 Linux/ELF)
#include "..." search starts here:
#include <...> search starts here:
 /usr/include/g++
 /usr/local/include
 /usr/i586-pc-linux-gnulibc1/include
 /usr/lib/gcc-lib/i586-pc-linux-gnulibc1/egcs-2.91.06/include
 /usr/include
End of search list.
 /usr/lib/gcc-lib/i586-pc-linux-gnulibc1/egcs-2.91.06/cc1plus /tmp/cca00230.ii -quiet -dumpbase egcs_2.90.23_2.91.06_inheritance_probs.cc -version -o /tmp/cca00230.s
GNU C++ version egcs-2.91.06 980122 (gcc-2.8.0 release) (i586-pc-linux-gnulibc1) compiled by GNU C version egcs-2.91.06 980122 (gcc-2.8.0 release).
egcs_2.90.23_2.91.06_inheritance_probs.cpp: In method `void X<Key,Value>::foo()':
egcs_2.90.23_2.91.06_inheritance_probs.cpp:49: parse error before `;'
egcs_2.90.23_2.91.06_inheritance_probs.cpp:52: parse error before `;'
*/


/*
-------------------------------------------------------------------------
    Only main ...
 */

int main()
{
 X<int,int> xi_;
 
 Foo f;
 Bar b;

 return 0;
}










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