This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: c_std/ and throw()


>>>>> "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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]