/cp
2012-05-26 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/53491
* tree.c (stabilize_expr): Handle exp of void type.
/testsuite
2012-05-26 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/53491
* g++.dg/parse/crash60.C: New.
From-SVN: r187917
+2012-05-26 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/53491
+ * tree.c (stabilize_expr): Handle exp of void type.
+
2012-05-26 Jason Merrill <jason@redhat.com>
PR c++/53220
if (!TREE_SIDE_EFFECTS (exp))
init_expr = NULL_TREE;
+ else if (VOID_TYPE_P (TREE_TYPE (exp)))
+ {
+ *initp = exp;
+ return void_zero_node;
+ }
/* There are no expressions with REFERENCE_TYPE, but there can be call
arguments with such a type; just treat it as a pointer. */
else if (TREE_CODE (TREE_TYPE (exp)) == REFERENCE_TYPE
-2012-05-22 Jason Merrill <jason@redhat.com>
+2012-05-26 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/53491
+ * g++.dg/parse/crash60.C: New.
+
+2012-05-26 Jason Merrill <jason@redhat.com>
PR c++/53220
* c-c++-common/array-lit.c: New.
--- /dev/null
+// PR c++/53491
+
+struct M
+{
+ void pop();
+};
+
+void foo()
+{
+ int result = 0;
+ M m;
+
+ result += m.pop(); // { dg-error "invalid operands|in evaluation" }
+}