Bug 19138
| Summary: | c++ segfaults on some bad code. | ||
|---|---|---|---|
| Product: | [Retired] Red Hat Linux | Reporter: | Sam Varshavchik <mrsam> |
| Component: | gcc | Assignee: | Jakub Jelinek <jakub> |
| Status: | CLOSED RAWHIDE | QA Contact: | David Lawrence <dkl> |
| Severity: | medium | Docs Contact: | |
| Priority: | low | ||
| Version: | 7.0 | CC: | jblanco |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | i386 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2000-10-17 14:10:13 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
Fixed in gcc-c++-2.96-63 in rawhide. |
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.