aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc')
-rw-r--r--gcc/cp/ChangeLog3
-rw-r--r--gcc/cp/parser.c2
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/regress/error-recovery1.C2
-rw-r--r--gcc/testsuite/g++.dg/parse/template7.C1
5 files changed, 10 insertions, 3 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index c2ce6e0..4cff258 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,5 +1,8 @@
2011-06-09 Jason Merrill <jason@redhat.com>
+ * parser.c (cp_parser_constant_expression): Just return the
+ non-constant expression.
+
* semantics.c (finish_compound_literal): Set TREE_HAS_CONSTRUCTOR.
2011-06-09 Paolo Carlini <paolo.carlini@oracle.com>
diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c
index 1d182a3..35f8957 100644
--- a/gcc/cp/parser.c
+++ b/gcc/cp/parser.c
@@ -7050,8 +7050,6 @@ cp_parser_constant_expression (cp_parser* parser,
}
if (allow_non_constant_p)
*non_constant_p = parser->non_integral_constant_expression_p;
- else if (parser->non_integral_constant_expression_p)
- expression = error_mark_node;
parser->non_integral_constant_expression_p
= saved_non_integral_constant_expression_p;
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index fa1fec8..54b17c2 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2011-06-09 Jason Merrill <jason@redhat.com>
+
+ * g++.dg/cpp0x/regress/error-recovery1.C: Adjust.
+ * g++.dg/parse/template7.C: Adjust.
+
2011-06-09 Kaz Kojima <kkojima@gcc.gnu.org>
PR target/49307
diff --git a/gcc/testsuite/g++.dg/cpp0x/regress/error-recovery1.C b/gcc/testsuite/g++.dg/cpp0x/regress/error-recovery1.C
index 2094d3e..9942c58 100644
--- a/gcc/testsuite/g++.dg/cpp0x/regress/error-recovery1.C
+++ b/gcc/testsuite/g++.dg/cpp0x/regress/error-recovery1.C
@@ -7,3 +7,5 @@ foo ()
const bool b =; // { dg-error "" }
foo < b > (); // { dg-error "constant expression" }
};
+
+// { dg-error "no match" "" { target *-*-* } 8 }
diff --git a/gcc/testsuite/g++.dg/parse/template7.C b/gcc/testsuite/g++.dg/parse/template7.C
index 0d3f3fa..d7dfef7 100644
--- a/gcc/testsuite/g++.dg/parse/template7.C
+++ b/gcc/testsuite/g++.dg/parse/template7.C
@@ -2,4 +2,3 @@ template <int I>
void f(); // { dg-message "note" }
void g() { f<(3, 2)>(); } // { dg-error "" }
-// { dg-message "candidate" "candidate note" { target *-*-* } 4 }