[llvm-commits][llvm-gcc-4.2] r49171 - in /llvm-gcc-4.2/trunk/gcc: llvm-convert.cpp llvm-types.cpp

Duncan Sands baldrick at free.fr
Mon Apr 7 09:39:53 PDT 2008


Hi Eric,

> > Since there is no difficulty in doing the slightly more general "this
> > file does not have to deal with the possibility that exceptions get
> > thrown or unwound *in this file*", why not do so?
> 
> 
> I think there is a slight difference. There's the "this file doesn't  
> throw
> exceptions" and "this file doesn't throw or propagate exceptions".

it's a bit different: we're discussing what you should get if a file
is compiled with -fno-exceptions, which is a gcc flag saying that this
file doesn't need to support exceptions unwinding through it (it also
means that nothing in the file throws or catches exceptions).

> I   
> think
> Dale is doing the first, though I'd like to personally have files able  
> to unwind across even if nothing in the file throws.

If a function does not throw exceptions and the compiler can prove that
functions it calls don't throw exceptions either (or, rather, any exceptions
they throw don't unwind out of the function), then the compiler can discard
some exception handling info needed to unwind out of it because that info
is pointless.  But that's a different issue to what we're discussing here.

Best wishes,

Duncan.



More information about the llvm-commits mailing list