OSDN Git Service

PR c++/43875
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 27 Apr 2010 21:21:35 +0000 (21:21 +0000)
committerMasaki Muranaka <monaka@monami-software.com>
Sun, 23 May 2010 05:36:35 +0000 (14:36 +0900)
* semantics.c (lambda_return_type): Complain about
braced-init-list.

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

gcc/cp/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp0x/lambda/lambda-deduce2.C [new file with mode: 0644]

index b0b4ec2..412d818 100644 (file)
@@ -1,5 +1,9 @@
 2010-04-27  Jason Merrill  <jason@redhat.com>
 
+       PR c++/43875
+       * semantics.c (lambda_return_type): Complain about
+       braced-init-list.
+
        PR c++/43790
        * tree.c (cv_unqualified): Handle error_mark_node.
 
index fbf01f2..e991ba0 100644 (file)
@@ -1,3 +1,8 @@
+2010-04-27  Jason Merrill  <jason@redhat.com>
+
+       PR c++/43875
+       * g++.dg/cpp0x/lambda/lambda-deduce2.C: New.
+
 2010-04-27  Manuel López-Ibáñez  <manu@gcc.gnu.org>
            Jan Hubicka <hubicka@ucw.cz>
 
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-deduce2.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-deduce2.C
new file mode 100644 (file)
index 0000000..718d49c
--- /dev/null
@@ -0,0 +1,7 @@
+// PR c++/43875
+// { dg-options "-std=c++0x" }
+
+int main()
+{
+   auto x2 = []{ return { 1, 2 }; }; // { dg-message "return" }
+}