OSDN Git Service

* call.c (type_decays_to): Check MAYBE_CLASS_TYPE_P instead of
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 13 Apr 2010 17:24:52 +0000 (17:24 +0000)
committerMasaki Muranaka <monaka@monami-software.com>
Sun, 23 May 2010 05:32:12 +0000 (14:32 +0900)
CLASS_TYPE_P.
* parser.c (cp_parser_lambda_expression): Complain about lambda in
unevaluated context.
* pt.c (iterative_hash_template_arg): Don't crash on lambda.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@158277 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/cp/ChangeLog
gcc/cp/call.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp0x/lambda/lambda-deduce2.C [deleted file]

index bd139b1..e4d899f 100644 (file)
@@ -1,3 +1,11 @@
+2010-04-13  Jason Merrill  <jason@redhat.com>
+
+       * call.c (type_decays_to): Check MAYBE_CLASS_TYPE_P instead of
+       CLASS_TYPE_P.
+       * parser.c (cp_parser_lambda_expression): Complain about lambda in
+       unevaluated context.
+       * pt.c (iterative_hash_template_arg): Don't crash on lambda.
+
 2010-04-12  Jason Merrill  <jason@redhat.com>
 
        PR c++/43641
index 632dd31..2dc73f5 100644 (file)
@@ -2249,7 +2249,7 @@ type_decays_to (tree type)
     return build_pointer_type (TREE_TYPE (type));
   if (TREE_CODE (type) == FUNCTION_TYPE)
     return build_pointer_type (type);
-  if (!CLASS_TYPE_P (type))
+  if (!MAYBE_CLASS_TYPE_P (type))
     type = cv_unqualified (type);
   return type;
 }
index 7954b3f..a33b7c4 100644 (file)
@@ -1,3 +1,8 @@
+2010-04-13  Jason Merrill  <jason@redhat.com>
+
+       * g++.dg/cpp0x/lambda/lambda-deduce2.C: Remove.
+       * g++.dg/cpp0x/lambda/lambda-uneval.C: New.
+
 2010-04-13  Manuel López-Ibáñez  <manu@gcc.gnu.org>
 
        * gcc.dg/cpp/cpp.exp: Test also c-c++-common/cpp.
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-deduce2.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-deduce2.C
deleted file mode 100644 (file)
index e92f6f2..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-// Test that cv-quals are dropped from non-class return type
-// { dg-options "-std=c++0x" }
-
-template <class T, class U>
-struct assert_same_type;
-template <class T>
-struct assert_same_type<T,T> { };
-
-struct A
-{
-  int i;
-};
-
-extern const int i;
-assert_same_type <decltype ([]{ return i; }()), int> x;