This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [C++ Patch] PR 26099 (first part)
- From: Paolo Carlini <pcarlini at suse dot de>
- To: Mark Mitchell <mark at codesourcery dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Fri, 30 Mar 2007 10:22:43 +0200
- Subject: Re: [C++ Patch] PR 26099 (first part)
- References: <460BD971.3090100@suse.de> <460C8F07.5040303@codesourcery.com>
Hi Mark,
and thanks for your quick reply.
I agree with all your comments and I'm going to do the various changes,
updated patch forthcoming. Only:
+ if (t && !TREE_NOTHROW (t))
I think you need to check the exception declaration on the type, not
TREE_NOTHROW. TREE_NOTHROW may be set by the optimizers when a function
can be proven not to throw, but I assume the standard is talking about
the declared exception specification?
This is interesting. In fact, the most recent specifications, per N2157,
don't talk at all about exception specifications, but only about "... is
known not to throw an exception..." (at some point, in TR1, it was empty
exception specifications OR can otherwise be deduced never to throw an
exception). Therefore, I think the code is OK. In fact this specific
semantics is reflected in the testcases where I added a throw(int) which
is trivially empty and the compiler can tell it will not actually throw.
Please make the parser "sorry" if __is_convertible_to is used, since
it's not implemented yet.
Good point, I was wondering about that. I'm going either to emit "sorry"
or remove __is_convertible_to completely, for now.
Thanks again,
Paolo.