X-Recipient: archive-cygwin@delorie.com
X-SWARE-Spam-Status: No, hits=0.1 required=5.0	tests=AWL,BAYES_00
X-Spam-Check-By: sourceware.org
Content-Type: text/plain; charset=us-ascii
Mime-Version: 1.0 (Apple Message framework v1084)
Subject: Re: exception under g++
From: Kraus Philipp <philipp.kraus@flashpixx.de>
In-Reply-To: <CAAWYfq02G-rq6Up3Vq1_ioh+M==1KTRubgF0L3N4Y-pa0tmfhQ@mail.gmail.com>
Date: Sat, 16 Jul 2011 19:53:01 +0200
Message-Id: <433A3DF3-D24E-4867-8AF0-3C8B35EE3578@flashpixx.de>
References: <68B76592-8AB8-4CE6-A75D-5EEB857D500A@flashpixx.de> <CAAWYfq02G-rq6Up3Vq1_ioh+M==1KTRubgF0L3N4Y-pa0tmfhQ@mail.gmail.com>
To: cygwin@cygwin.com
X-IsSubscribed: yes
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
Precedence: bulk
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id p6GHv5Jg030450

Hi Dima,

thanks for your answer.

Am 16.07.2011 um 15:02 schrieb Dima Pasechnik:

> you ought to post steps to reproduce the problem, if there is one.
> By the way, can you check that you link against libgcc using -shared-libgcc?
> 
> You can also try to figure out whether is this not a purely g++ problem, by
> installing g++ 4.3.4 on Linux, say, and trying your code with it.

I can locate the problem in the code, that the problem is only produced in this class, in which C and C++ code is mixed.
I use a call of the libxml2, which is a C library. The code works under Linux and OSX. 

> Windows has a number of ways to handle exceptions, e.g. MSVC++
> exceptions used to be (or maybe are, still) not conforming to C++
> standard.

I use for my project only Cygwins g++ / gcc, not MinGW or MSVC, so do you know any things about this? On some websites
there are the -fexceptions flag is seen, but if I set them, the problem isn't be solved. 

I have try to catch my thrown exception with catch (...), catch (myexception e) or some other catches, but the exception is not
be caught. Should I recompile all my libraries with the -fexceptions flag or only my code? Are there other flags for correct 
exception handling under the Cygwin gcc / g++?

Thanks

Phil

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


