Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!gem.mps.ohio-state.edu!samsung!uunet!mcsun!hp4nl!tnosoes!tom From: tom@tnosoes.UUCP (Tom Vijlbrief) Newsgroups: gnu.g++.bug Subject: g++ parse error ? (g++.1.36.1-) Keywords: g++ Message-ID: <504@tnosoes.UUCP> Date: 21 Nov 89 10:57:49 GMT Organization: TNO Institute for Perception, Soesterberg, The Netherlands Lines: 42 g++ cannot parse the following. Is this a compiler error or a C++ problem ? I want access to the global assignment operator. ===============================opis.c========= class test { public: int i; operator=(int ii) { i= ii; } operator=(test& t) { this->::operator=(t);} // operator=(test& t) { *this ::operator= t;} // Fails also }; main() { test a,b; a= b; } =============================================== tom@sunflare:~/src/CC> !g g++ -v opis.c gcc version 1.36.1- (based on GCC 1.36) /usr/local/lib/gcc-cpp -+ -v -undef -D__GNUC__ -D__GNUG__ -D__cplusplus -Dmc68000 -Dsun -Dunix -D__mc68000__ -D__sun__ -D__unix__ -D__HAVE_68881__ -Dmc68020 opis.c /usr/tmp/cca09024.cpp GNU CPP version 1.36 /usr/local/lib/gcc-cc1plus /usr/tmp/cca09024.cpp -quiet -dumpbase opis.c -version -o /usr/tmp/cca09024.s GNU C++ version 1.36.1- (based on GCC 1.36) (68k, MIT syntax) compiled by GNU C version 1.36. default target switches: -m68020 -mc68020 -m68881 -mbitfield opis.c: In method int test::operator = (class test &): opis.c:6: parse error at end of input tom@sunflare:~/src/CC> =============================================================================== Tom Vijlbrief TNO Institute for Perception P.O. Box 23 Phone: +31 34 63 562 11 3769 ZG Soesterberg E-mail: tnosoes!tom@mcvax.cwi.nl The Netherlands or: uunet!mcvax!tnosoes!tom ===============================================================================