g++: exceptions thrown from asm declarations

Richard Henderson rth@redhat.com
Wed Sep 22 17:45:00 GMT 2004


On Wed, Sep 22, 2004 at 03:22:15PM +0200, Stephan Bergmann wrote:
> -  If a future g++ version is smart enough to inline both static 
> functions and functions within unnamed namespaces, the problem reappears 
> (and has to be worked around with more drastic measures, like moving 
> inner to a different translation unit).

__attribute__((noinline)) will fix this.

> -  The call to dummy is a hack, and it would be nice to get rid of it.

Indeed.

> The real solution would be to somehow specify that (the call instruction 
> within) the asm declaration can throw exceptions.  Is that possible in 
> g++?

No.  Really, this is the sort of thing that needs to be written
entirely in assembly.


r~



More information about the Gcc mailing list