c_std/ and throw()

Jason Merrill jason_merrill@redhat.com
Thu Apr 12 00:40:00 GMT 2001


>>>>> "Benjamin" == Benjamin Kosnik <bkoz@redhat.com> writes:

> Your approach seems valid. It would be nice to see real evidence of 
> savings before the code gets all freaked out with macros though.

Jakub's example seems to me to be real evidence.  Or just take my word for
it; I implemented the optimization in question.

> I don't suppose you can post an example of codegen for calling 
> std::strcpy, or whatever, with and without your patch? That might be 
> easier to see.

It won't have any effect for strcpy, as the compiler already knows that
can't throw (see nothrow_libfn_p).  Adding throw() is only useful for C
library functions that aren't in the C standard, and thus in cfns.gperf.

Jason



More information about the Libstdc++ mailing list