--- Comment #13 from paolo at gcc dot gnu dot org 2008-07-21 09:09 ---
Subject: Bug 36870
Author: paolo
Date: Mon Jul 21 09:08:41 2008
New Revision: 138024
URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=138024
Log:
/cp
2008-07-21 Paolo Carlini [EMAIL PROTECTED]
PR
--- Comment #14 from paolo dot carlini at oracle dot com 2008-07-21 09:11
---
Done for mainline (would be 4.4.0).
--
paolo dot carlini at oracle dot com changed:
What|Removed |Added
--- Comment #1 from pinskia at gcc dot gnu dot org 2008-07-18 20:58 ---
I think this is by designed.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36870
--- Comment #2 from paolo dot carlini at oracle dot com 2008-07-18 21:10
---
I'm not sure ;) But I can say that probably when I was playing with testcases I
noticed something going on about this issue and didn't find it meaningless...
Have to think a bit more about this.
Maybe Mark
--- Comment #3 from pinskia at gcc dot gnu dot org 2008-07-18 21:17 ---
(In reply to comment #1)
I think this is by designed.
See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26099 in fact I knew we tested
this too ...
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36870
--- Comment #4 from paolo dot carlini at oracle dot com 2008-07-18 21:31
---
gosh, my memory vanishes. Yes, Andrew is right, we have already discussed this.
In my reading of the specifications (I don't think there are important news
here) the compiler may or may not be able to figure
--- Comment #5 from sebor at roguewave dot com 2008-07-18 21:47 ---
(In reply to comment #4)
The ODR is important from an ABI standpoint -- imagine a function template
that uses SFINAE and std::has_nothrow_default_constructorT::type. Simply
rearranging code or even compiling multiple
--- Comment #6 from paolo dot carlini at oracle dot com 2008-07-18 21:56
---
In any case I remain unconvinced that known not to throw any exceptions is
the proper way to enforce the requirement.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36870
--- Comment #7 from sebor at roguewave dot com 2008-07-18 22:11 ---
FYI: I discussed the wording briefly with Daveed (eccp returns true if and
only if the class has a trivial ctor or the ctor has a throw() spec on it,
for just this reason). We agree that the wording is unclear and
--- Comment #8 from paolo dot carlini at oracle dot com 2008-07-18 22:13
---
I think we can easily fix the issue by checking
TYPE_RAISES_EXCEPTIONS (TREE_TYPE (t))
instead of TREE_NOTHROW (t)
--
paolo dot carlini at oracle dot com changed:
What|Removed
--- Comment #9 from paolo dot carlini at oracle dot com 2008-07-18 22:17
---
Thanks Martin. In fact, I think Mark agrees with Daveed on this, I clearly
remember he was unimpressed by the current wording.
If Mark confirms that my Comment #8 is by and large correct I can implement a
--- Comment #10 from paolo dot carlini at oracle dot com 2008-07-18 22:31
---
More exactly, the idea is replacing:
TREE_NOTHROW (t)
with
TYPE_NOTHROW_P (TREE_TYPE (t))
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36870
--- Comment #11 from mmitchel at gcc dot gnu dot org 2008-07-18 22:52
---
Paolo --
I agree; that seems the right fix. I don't think this should depend on what
the compiler happens to be able to prove about the body of the function; it's
way too unstable in the face of optimization,
--- Comment #12 from paolo dot carlini at oracle dot com 2008-07-19 00:29
---
Thanks Mark, will do and submit.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36870
14 matches
Mail list logo