Thread View: gnu.g++.bug
1 messages
1 total messages
Started by "Douglas C. Schmidt"
Thu, 19 Jan 1989 10:49
fix for g++ segmentation fault
Author: "Douglas C. Schmidt"
Date: Thu, 19 Jan 1989 10:49
Date: Thu, 19 Jan 1989 10:49
48 lines
2189 bytes
2189 bytes
Hi,
G++ 1.32 fails when presented with strange input like this:
----------------------------------------
typedef int *win_error_function(int, int);
int win_errorhandler(win_error_function);
----------------------------------------
The following patches fix this problem:
----------------------------------------
*** cplus-decl.c.~1~ Tue Jan 17 23:07:21 1989
--- cplus-decl.c Thu Jan 19 02:40:53 1989
***************
*** 4245,4256 ****
if (TREE_CODE (type) == FUNCTION_TYPE)
{
! error ("parameter `%s' invalidly declared function type", IDENTIFIER_POINTER (declarator));
type = build_pointer_type (type);
}
else if (TREE_CODE (type) == MEMBER_TYPE)
{
! error ("parameter `%s' invalidly declared member type", IDENTIFIER_POINTER (declarator));
type = build_pointer_type (type);
}
--- 4245,4262 ----
if (TREE_CODE (type) == FUNCTION_TYPE)
{
! if (declarator == NULL_TREE)
! error ("formal parameter invalidly declared function type");
! else
! error ("parameter `%s' invalidly declared function type", IDENTIFIER_POINTER (declarator));
type = build_pointer_type (type);
}
else if (TREE_CODE (type) == MEMBER_TYPE)
{
! if (declarator == NULL_TREE)
! error ("formal parameter invalidly declared member type");
! else
! error ("parameter `%s' invalidly declared member type", IDENTIFIER_POINTER (declarator));
type = build_pointer_type (type);
}
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