Thread View: gnu.g++.bug
1 messages
1 total messages
Started by Ron Guilmette
Wed, 03 May 1989 20:51
BUG in G++ 1.35-.0- (a028 - new)
Author: Ron Guilmette
Date: Wed, 03 May 1989 20:51
Date: Wed, 03 May 1989 20:51
49 lines
2355 bytes
2355 bytes
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.
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads