public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* Re: Exception allocation bug?
@ 2003-07-05 18:25 Andrew Pinski
2003-07-05 20:39 ` Mike Harrold
0 siblings, 1 reply; 3+ messages in thread
From: Andrew Pinski @ 2003-07-05 18:25 UTC (permalink / raw)
To: mharrold, Gcc-Bugs@Gcc. Gnu. Org
http://gcc.gnu.org/ml/gcc-bugs/2003-07/msg00468.html
What version of gcc are you trying it on?
With 3.3.1 (20030616), I get the optimization you recommend but with
3.2.3,
I do not get this optimization.
Try 3.3 and then report back if it is fixed.
Thanks,
Andrew Pinski
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Exception allocation bug?
2003-07-05 18:25 Exception allocation bug? Andrew Pinski
@ 2003-07-05 20:39 ` Mike Harrold
0 siblings, 0 replies; 3+ messages in thread
From: Mike Harrold @ 2003-07-05 20:39 UTC (permalink / raw)
To: Andrew Pinski; +Cc: mharrold, Gcc-Bugs@Gcc. Gnu. Org
>
> http://gcc.gnu.org/ml/gcc-bugs/2003-07/msg00468.html
>
>
> What version of gcc are you trying it on?
> With 3.3.1 (20030616), I get the optimization you recommend but with
> 3.2.3,
> I do not get this optimization.
>
> Try 3.3 and then report back if it is fixed.
>
> Thanks,
> Andrew Pinski
>
>
It's 3.2.2. Good news that is seems to be in place for the 3.3 series!
I'll check it out once we install that.
Thanks,
/Mike
^ permalink raw reply [flat|nested] 3+ messages in thread
* Exception allocation bug?
@ 2003-07-05 17:42 Mike Harrold
0 siblings, 0 replies; 3+ messages in thread
From: Mike Harrold @ 2003-07-05 17:42 UTC (permalink / raw)
To: gcc-bugs
Hi,
I don't know if this is a bug or a feature, but I am wondering why
the following code:
throw MyException();
results in the following:
MyException is constructed on the stack using default ctor.
__cxa_allocate_exception is called
A second MyException is constructed using the memory returned by
__cxa_allocate_exception, using MyException's copy ctor.
The first MyException is destroyed.
Couldn't this be optimised to:
__cxa_allocate_exception is called
MyException is constructed using the memory returned by
__cxa_allocate_exception, using MyExceptions' default ctor.
Thanks,
/Mike
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2003-07-05 20:39 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-07-05 18:25 Exception allocation bug? Andrew Pinski
2003-07-05 20:39 ` Mike Harrold
-- strict thread matches above, loose matches on Subject: below --
2003-07-05 17:42 Mike Harrold
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).