Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 77440 - g++ does not do exception handling.
Summary: g++ does not do exception handling.
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: gcc
Version: 8.0
Hardware: i386
OS: Linux
medium
high
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: Brian Brock
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2002-11-07 02:42 UTC by simra
Modified: 2007-04-18 16:48 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2002-11-07 02:42:22 UTC


Attachments (Terms of Use)

Description simra 2002-11-07 02:42:15 UTC
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:
Always

Steps to Reproduce:
1. Compile the following program:

g++ -o foo foo.cc 
or
g++ -fexceptions -o foo foo.cc
foo.cc:
#include <iostream>
#include <exception>
using namespace std;
int main(int argc, char ** argv) {
        try {
                throw exception();
        }
        catch (...) {
                cerr<<"Caught!!";
                exit(0);
        }
}


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
gcc-3.2-7

Comment 1 simra 2002-11-07 02:53:13 UTC
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.