This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: C++: Letting compiler know asm block can call function that can throw?
Hi,
On Thu, 29 Mar 2012, Andrew Haley wrote:
> On 03/29/2012 02:59 PM, Michael Matz wrote:
> > Actually, with -fnon-call-exceptions volatile asms are already supposed to
> > be throwing. It's just that this got lost with tree-ssa. With the patch
> > and -fnon-call-exceptions a simple "__asm__ volatile (...)" is regarded as
> > possibly throwing.
> >
> > Without -fnon-call-exceptions some parser changes would be required. How
> > about "asm throw (...)" ?
>
> Is there any point? I would have thought that -fnon-call-exceptions was
> exactly what you need.
non-call-exceptions is a relatively big hammer. It marks _all_
non-trivial instructions as throwing. Providing an explicit marker would
allow for more granularity. Granted, the request didn't come often over
the last years, but it seems like a relatively self-contained and useful
addition to inline asms.
Ciao,
Michael.