* C++ PATCH for C++0x failure on template/dtor6.C
@ 2011-06-08 22:21 Jason Merrill
0 siblings, 0 replies; only message in thread
From: Jason Merrill @ 2011-06-08 22:21 UTC (permalink / raw)
To: gcc-patches List
[-- Attachment #1: Type: text/plain, Size: 102 bytes --]
Running the testsuite in C++0x mode caught this issue.
Tested x86_64-pc-linux-gnu, applied to trunk.
[-- Attachment #2: dtor-const.patch --]
[-- Type: text/x-patch, Size: 981 bytes --]
commit b531be395b85f7872c51e79ffb5db9a30a2a4f66
Author: Jason Merrill <jason@redhat.com>
Date: Thu Jun 2 14:35:59 2011 -0400
* semantics.c (potential_constant_expression_1): Handle destructor
call.
diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c
index ebca840..53e5993 100644
--- a/gcc/cp/semantics.c
+++ b/gcc/cp/semantics.c
@@ -7763,6 +7763,12 @@ potential_constant_expression_1 (tree t, bool want_rval, tsubst_flags_t flags)
want_rval = true;
goto binary;
+ case BIT_NOT_EXPR:
+ /* A destructor. */
+ if (TYPE_P (TREE_OPERAND (t, 0)))
+ return true;
+ /* else fall through. */
+
case REALPART_EXPR:
case IMAGPART_EXPR:
case CONJ_EXPR:
@@ -7771,7 +7777,6 @@ potential_constant_expression_1 (tree t, bool want_rval, tsubst_flags_t flags)
case FLOAT_EXPR:
case NEGATE_EXPR:
case ABS_EXPR:
- case BIT_NOT_EXPR:
case TRUTH_NOT_EXPR:
case FIXED_CONVERT_EXPR:
case UNARY_PLUS_EXPR:
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2011-06-08 21:35 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-06-08 22:21 C++ PATCH for C++0x failure on template/dtor6.C Jason Merrill
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).