This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [rfc] fix libstdc++/10606


On Tue, Jan 04, 2005 at 03:52:18PM -0600, Benjamin Kosnik wrote:
> +	{
> +	  S s0;
> +	  throw s0;	// s1 is the exception object
> 
> we want
> 
> +  { 1, 0, false },	
> 
> for the s1 temporary object test data. I think this is correct because
> this test occurs in the temporary object's ctor body, before the the
> object is considered complete. I don't think it makes sense to have
> uncaught_exception return true here, since the "uncaught exception
> object" in question hasn't yet been (fully) constructed.

On the other hand, we *will* std::terminate if the s0->s1 copy
constructor throws -- just like if the s1->s2 copy constructor
throws while setting up the catch handler.

Given that the copy constructor cannot throw, I think it makes
sense to consider that we've begun processing the exception, 
and thus there must be an uncaught exception.

It all depends on what you consider uncaught_exception useful
for, I guess.


r~


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