On 03/30/2012 09:34 PM, Paolo Carlini wrote:
Thus I'm adding a
!TYPE_BEING_DEFINED (DECL_CONTEXT (decl)) check
Sounds good.
we reject, with a different exception specifier error, both:
templatetypename T
struct A
{
~A() noexcept;
};
templatetypename T
AT::~A() { }
and:
templatetypename
Hi,
we reject, with a different exception specifier error, both:
templatetypename T
struct A
{
~A() noexcept;
};
templatetypename T
AT::~A() { }
and:
templatetypename T
struct A
{
~A();
};
templatetypename T
AT::~A() noexcept { }
Over the last days I wasted a lot of time trying
Hi again,
On 03/30/2012 12:26 AM, Paolo Carlini wrote:
On 03/29/2012 09:27 PM, Jason Merrill wrote:
On 03/29/2012 03:06 PM, Paolo Carlini wrote:
The exception specification on old_decl doesn't matter; we can drop
that test.
I seem to remember something going wrong with templates otherwise,
... attached the testsuite changes I have so far (seem all rather
straightforward to me).
Thanks,
Paolo.
Index: testsuite/g++.old-deja/g++.eh/cleanup1.C
===
--- testsuite/g++.old-deja/g++.eh/cleanup1.C
On 03/28/2012 06:40 PM, Paolo Carlini wrote:
+ /* 12.4/3 */
+ if (cxx_dialect= cxx0x
+ DECL_DESTRUCTOR_P (decl)
+ TYPE_RAISES_EXCEPTIONS (TREE_TYPE (old_decl)))
+ deduce_noexcept_on_destructor (decl);
The exception specification on old_decl
Hi,
On 03/28/2012 06:40 PM, Paolo Carlini wrote:
+ /* 12.4/3 */
+ if (cxx_dialect= cxx0x
+ DECL_DESTRUCTOR_P (decl)
+ TYPE_RAISES_EXCEPTIONS (TREE_TYPE (old_decl)))
+deduce_noexcept_on_destructor (decl);
The exception specification on old_decl doesn't matter; we can drop
Hi,
On 03/28/2012 06:40 PM, Paolo Carlini wrote:
+ /* 12.4/3 */
+ if (cxx_dialect= cxx0x
+ DECL_DESTRUCTOR_P (decl)
+ TYPE_RAISES_EXCEPTIONS (TREE_TYPE (old_decl)))
+deduce_noexcept_on_destructor (decl);
The exception specification on old_decl doesn't matter; we can drop
On 03/29/2012 03:06 PM, Paolo Carlini wrote:
The exception specification on old_decl doesn't matter; we can drop
that test.
I seem to remember something going wrong with templates otherwise,
because implicitly_declare_fn has gcc_assert (!dependent_type_p (type));
We shouldn't be doing this
On 03/29/2012 09:27 PM, Jason Merrill wrote:
On 03/29/2012 03:06 PM, Paolo Carlini wrote:
The exception specification on old_decl doesn't matter; we can drop
that test.
I seem to remember something going wrong with templates otherwise,
because implicitly_declare_fn has gcc_assert
On 03/29/2012 09:27 PM, Jason Merrill wrote:
On 03/29/2012 03:06 PM, Paolo Carlini wrote:
The exception specification on old_decl doesn't matter; we can drop
that test.
I seem to remember something going wrong with templates otherwise,
because implicitly_declare_fn has gcc_assert
Hi again,
On 03/26/2012 09:31 PM, Jason Merrill wrote:
On 03/26/2012 07:22 AM, Paolo Carlini wrote:
My basic idea so far is very simple:
--- class.c (revision 185792)
+++ class.c (working copy)
@@ -1001,6 +1001,10 @@ add_method (tree type, tree method, tree
using_dec
destructor,
type);
}
+
On 03/28/2012 11:02 AM, Paolo Carlini wrote:
+ !comp_except_specs (new_exceptions, old_exceptions, ce_normal)
+ /* Special case in C++11: noexcept has been deduced as true for
+the declaration and there is no exception-specification on the
+definition. */
+
Hi,
On 03/28/2012 11:02 AM, Paolo Carlini wrote:
+ !comp_except_specs (new_exceptions, old_exceptions, ce_normal)
+ /* Special case in C++11: noexcept has been deduced as true for
+ the declaration and there is no exception-specification on the
+ definition. */
+
Oops...
1- Turns out the check_bases_and_members change has to happen earlier,
because we want to fixup the exceptions before check_bases, otherwise
we reject things like (in the C++ library and elsewhere):
struct True2 { virtual ~True2() noexcept; };
template typename Base
struct C : Base
{
On 03/26/2012 07:22 AM, Paolo Carlini wrote:
My basic idea so far is very simple:
--- class.c (revision 185792)
+++ class.c (working copy)
@@ -1001,6 +1001,10 @@ add_method (tree type, tree method, tree using_dec
destructor,
type);
}
+ else if (cxx_dialect = cxx0x
+ !TYPE_RAISES_EXCEPTIONS
On 03/26/2012 09:31 PM, Jason Merrill wrote:
On 03/26/2012 07:22 AM, Paolo Carlini wrote:
My basic idea so far is very simple:
--- class.c (revision 185792)
+++ class.c (working copy)
@@ -1001,6 +1001,10 @@ add_method (tree type, tree method, tree
using_dec
destructor,
type);
}
+ else if
16 matches
Mail list logo