[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Using GCC 4.8 64bit with SEH on Windows

From: Ali
Subject: Using GCC 4.8 64bit with SEH on Windows
Date: Thu, 22 Jan 2015 21:03:48 -0700 (MST)

I have searched on the forums and didn't find any information on how to
enable Structured Exception Handling in GCC 4.8.2 64 bit.I am using windows

Here is my code:
#include <iostream>
int main(){
std::string *str=new std::string("hello");
str=0; //null is assigned intentionally so to check exception
std::cout<<str->size();//should generate exception instead of crashing
catch(std::exception ep){
std::cout<<"unhandled Exception caught";//never reaches here 
The program is compiled simply as g++ -m64 test.cpp -o test.exe
The expected output of the above program is "Unhandled exception caught",
but in actual it simply crashes which means the try catch clause is not
So is it that GCC 4.8 (64bit) doesn't support full SEH yet or there is
something else I am missing.
Any help would be appreciated.

View this message in context:
Sent from the gcc - Gnu Help List mailing list archive at

reply via email to

[Prev in Thread] Current Thread [Next in Thread]