Bug 19138 - c++ segfaults on some bad code.
c++ segfaults on some bad code.
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: gcc (Show other bugs)
7.0
i386 Linux
low Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
David Lawrence
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2000-10-15 11:44 EDT by Sam Varshavchik
Modified: 2007-03-26 23:36 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2000-10-17 10:10:13 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Sam Varshavchik 2000-10-15 11:44:40 EDT
The following intentionally bad code causes c++ to segfault:

[mrsam@gwl oak]$ cat t.C

class X {

public:
	X();
	virtual ~X();
}

X::x()
{
}

X::~x()
{
}


[mrsam@gwl oak]$ c++ -Wall -c t.C
t.C:10: ISO C++ forbids defining types within return type
t.C:10: no `X X::x ()' member function declared in class `X'
t.C:10: semicolon missing after declaration of `class X'
t.C: In method `int X::x (X *)':
t.C:11: warning: no return statement in function returning non-void
t.C: At top level:
t.C:14: destructor `x' must match class name `X'
t.C: In method `X::~X ()':
t.C:15: Internal error: Segmentation fault.
Please submit a full bug report.
See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.
Comment 1 Jakub Jelinek 2000-11-13 04:18:50 EST
Fixed in gcc-c++-2.96-63 in rawhide.

Note You need to log in before you can comment on or make changes to this bug.