throw(), pure and const flags on functions

Mark Mitchell mark@codesourcery.com
Thu Apr 16 03:58:00 GMT 2009


Gabriel Dos Reis wrote:

> Yes.  But now, if f() is a standard C function that cannot
> possibly throw, then annotating g() 'throw()' makes g unnecessarily
> bigger and slower.  Thus my suggestion of having the compiler
> uses the standard semantics of f() it already has as opposed
> to having to annotate g().

That's not in dispute.  Of course if the compiler knows something
valuable, it should use that fact.

-- 
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713



More information about the Libstdc++ mailing list