From: Jakub Jelinek <jakub@redhat.com>
To: Stephan Bergmann <sbergman@redhat.com>
Cc: gcc@gcc.gnu.org
Subject: Re: C++: Letting compiler know asm block can call function that can throw?
Date: Thu, 29 Mar 2012 07:44:00 -0000 [thread overview]
Message-ID: <20120329074411.GE6148@sunsite.ms.mff.cuni.cz> (raw)
In-Reply-To: <4F7409B9.2010407@redhat.com>
On Thu, Mar 29, 2012 at 09:05:29AM +0200, Stephan Bergmann wrote:
> In LibreOffice's ever-beloved low-level code to synthesize calls to
> C++ virtual functions, I'm having the following problem (on Linux
> x86_64). The function callVirtualMethod at <http://cgit.freedesktop.org/libreoffice/core/tree/bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx?id=571876c1234ae55aab0198c7e2caf9049fcd230e#n61>
> effectively does the following:
>
> First, call dummy_can_throw_anything that can potentially throw (see
> below for why that's there). Second, in an asm block, call some
> virtual function (that can potentially throw). Third, call
> x86_64::fill_struct that can potentially throw (it doesn't, but
> nobody bothered to annotate it as "throw ()").
If the asm isn't in headers, but just in a single short source file
or two, you could try compiling that file with -fnon-call-exceptions.
It is nothing I'd recommend for the whole codebase though.
Jakub
next prev parent reply other threads:[~2012-03-29 7:44 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-29 7:05 Stephan Bergmann
2012-03-29 7:44 ` Jakub Jelinek [this message]
2012-03-29 8:48 ` Stephan Bergmann
2012-03-29 9:16 ` Richard Guenther
2012-03-29 12:51 ` Stephan Bergmann
2012-03-29 13:59 ` Michael Matz
2012-03-29 14:12 ` Andrew Haley
2012-03-29 15:10 ` Stephan Bergmann
2012-03-29 15:43 ` Michael Matz
2012-03-29 20:38 ` Eric Botcazou
2012-03-30 8:23 ` Richard Guenther
2012-03-29 16:14 ` Richard Henderson
2012-03-29 17:16 ` Jan Hubicka
2012-03-29 18:34 ` Richard Henderson
2012-03-30 8:19 ` Richard Guenther
2012-03-30 12:21 ` Jan Hubicka
2012-03-30 12:23 ` Richard Guenther
2012-03-30 15:46 ` Jan Hubicka
2012-04-02 14:08 ` Michael Matz
2012-04-02 14:17 ` Jakub Jelinek
2012-04-02 16:04 ` Michael Matz
2012-04-16 20:01 ` Hans-Peter Nilsson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120329074411.GE6148@sunsite.ms.mff.cuni.cz \
--to=jakub@redhat.com \
--cc=gcc@gcc.gnu.org \
--cc=sbergman@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).