This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: c_std/ and throw()
- To: Benjamin Kosnik <bkoz at redhat dot com>
- Subject: Re: c_std/ and throw()
- From: Jason Merrill <jason_merrill at redhat dot com>
- Date: 12 Apr 2001 08:37:38 +0100
- Cc: Jakub Jelinek <jakub at redhat dot com>, Artem Khodush <artem at duma dot gov dot ru>, libstdc++ at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- References: <Pine.SOL.3.91.1010411101025.19232C-100000@cse.cygnus.com>
>>>>> "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