Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 77440 - g++ does not do exception handling.
g++ does not do exception handling.
Product: Red Hat Linux
Classification: Retired
Component: gcc (Show other bugs)
i386 Linux
medium Severity high
: ---
: ---
Assigned To: Jakub Jelinek
Brian Brock
Depends On:
  Show dependency treegraph
Reported: 2002-11-06 21:42 EST by simra
Modified: 2007-04-18 12:48 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2002-11-06 21:42:22 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description simra 2002-11-06 21:42:15 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.1) Gecko/20020826

Description of problem:
g++ exception handling is not functional-- catch blocks are completely ignored.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Compile the following program:

g++ -o foo foo.cc 
g++ -fexceptions -o foo foo.cc
#include <iostream>
#include <exception>
using namespace std;
int main(int argc, char ** argv) {
        try {
                throw exception();
        catch (...) {

2. Run foo.


Actual Results:  Program aborts with the message "Abort".

Expected Results:  Program should exit() with message "Caught!!" 

Additional info:

simra@water:[simra] 55>g++ -v
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/3.2/specs
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
--infodir=/usr/share/info --enable-shared --enable-threads=posix
--disable-checking --host=i386-redhat-linux --with-system-zlib --enable-__cxa_atexit
Thread model: posix
gcc version 3.2 20020903 (Red Hat Linux 8.0 3.2-7)
simra@water:[simra] 56>rpm -q gcc
Comment 1 simra 2002-11-06 21:53:13 EST
Oops. My bad.. at run time the dynamic linker was using a locally built
libstdc++ from gcc 3.1.

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