aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/ChangeLog6
-rw-r--r--gcc/cp/pt.c5
2 files changed, 11 insertions, 0 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 63d8f2f..978df51 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,9 @@
+2012-01-12 Jason Merrill <jason@redhat.com>
+
+ PR c++/51714
+ * pt.c (value_dependent_expression_p): Treat STMT_EXPR as
+ value-dependent.
+
2012-01-13 Dodji Seketeli <dodji@redhat.com>
PR c++/51633
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index 97a9294..f2b4c8e 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -19526,6 +19526,11 @@ value_dependent_expression_p (tree expression)
return false;
}
+ case STMT_EXPR:
+ /* Treat a GNU statement expression as dependent to avoid crashing
+ under fold_non_dependent_expr; it can't be constant. */
+ return true;
+
default:
/* A constant expression is value-dependent if any subexpression is
value-dependent. */