make a nothrow call a throwing function

Ali Çehreli acehreli at yahoo.com
Fri Feb 8 06:22:42 PST 2013


On 02/08/2013 01:32 AM, Jonathan M Davis wrote:
 > On Friday, February 08, 2013 09:30:41 Artur Skawina wrote:
 >> On 02/08/13 01:33, Jonathan M Davis wrote:
 >>> Hmmm. I wouldn't have thought that you could get the function 
pointer at
 >>> compiler time. Regardless, you lose any possibility of inlining the
 >>> function call, which is the main problem AFAIK, though I don't know if
 >>> they would have been an option in the case of dup anyway.
 >>
 >> It doesn't affect inlining. (Obviously, that's compiler dependent, but
 >> there's no reason why it should and indeed does not w/ gdc)
 >
 > How could it not affect inlining? You're using a pointer to a 
function instead
 > of the function itself, so it can't be inlined.

Taking the address of a function ensures that the function exists but it 
does not preclude inlining the code of that function.

Ali



More information about the Digitalmars-d-learn mailing list