Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!MCC.COM!rfg From: rfg@MCC.COM (Ron Guilmette) Newsgroups: gnu.g++.bug Subject: BUG in G++ 1.35-.0- (a028 - new) Message-ID: <8905032051.AA20693@riunite.aca.mcc.com> Date: 3 May 89 20:51:52 GMT Sender: daemon@tut.cis.ohio-state.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 49 The following program causes G++ 1.35-.0-/Sun3 to abort. ------------------------------------------------------------------ // Check that it is legal to use the address of the current // function as one of the default arguments to the function // itself. void cheshire_cat (void* parm = (void*) &cheshire_cat); void cheshire_2 (void* parm = (void*) &cheshire_2) { } class base { private: void cheshire_3 (void* parm = (void*) &base::cheshire_3); public: void cheshire_4 (void* parm = (void*) &base::cheshire_4); }; int main () { return 0; } void base::cheshire_3 (void* parm = (void*) &base::cheshire_3) { } void cheshire_4 (void* parm = (void*) &base::cheshire_4) { } --------------------------------------------------------------------- /usr/local/src/src/g++/build/sun3/1.35-.0-.0/g++ -B/usr/local/src/src/g++/build/sun3/1.35-.0-.0/ -Wall -Wwrite-strings -g -S -v a028.C g++ version 1.35.0-.0 /usr/local/src/src/g++/build/sun3/1.35-.0-.0/cpp -+ -v -undef -D__GNU__ -D__GNUG__ -Dmc68000 -Dsun -Dunix -D__mc68000__ -D__sun__ -D__unix__ -Wall -D__HAVE_68881__ -Dmc68020 a028.C /tmp/cca20684.cpp GNU CPP version 1.35.0-.0 /usr/local/src/src/g++/build/sun3/1.35-.0-.0/c++ /tmp/cca20684.cpp -quiet -dumpbase a028.C -Wall -Wwrite-strings -noreg -version -G -o a028.s GNU C++ version 1.35.0-.0 (68k, MIT syntax) compiled by GNU C version 1.34.1. a028.C:5: `cheshire_cat' undeclared, outside of functions a028.C:7: `cheshire_2' undeclared, outside of functions a028.C:13: field `cheshire_3' is not a member of type `base' a028.C:15: field `cheshire_4' is not a member of type `base' a028.C:24: sorry, not implemented: that operation not supported for default parameters In method void base::cheshire_3 (void *: a028.C:24: conflicting types for `void base::cheshire_3 (void *' a028.C:13: previous declaration of `void base::cheshire_3 (void *' /usr/local/src/src/g++/build/sun3/1.35-.0-.0/g++: Program c++ got fatal signal 6.