[Bug c++/42370] [C++0x][lambda] in a void function: "Warning: control reaches end of non-void function"

2010-02-09 Thread jason at gcc dot gnu dot org


--- Comment #7 from jason at gcc dot gnu dot org  2010-02-09 21:39 ---
*** Bug 42877 has been marked as a duplicate of this bug. ***


-- 

jason at gcc dot gnu dot org changed:

   What|Removed |Added

 CC||piotr dot wyderski at gmail
   ||dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42370



[Bug c++/42370] [C++0x][lambda] in a void function: "Warning: control reaches end of non-void function"

2010-02-09 Thread jason at gcc dot gnu dot org


--- Comment #6 from jason at gcc dot gnu dot org  2010-02-09 21:39 ---
*** Bug 42737 has been marked as a duplicate of this bug. ***


-- 

jason at gcc dot gnu dot org changed:

   What|Removed |Added

 CC||vimal78 at gmail dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42370



[Bug c++/42370] [C++0x][lambda] in a void function: "Warning: control reaches end of non-void function"

2010-02-09 Thread jason at gcc dot gnu dot org


--- Comment #5 from jason at gcc dot gnu dot org  2010-02-09 20:22 ---
Fixed.


-- 

jason at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42370



[Bug c++/42370] [C++0x][lambda] in a void function: "Warning: control reaches end of non-void function"

2010-02-09 Thread jason at gcc dot gnu dot org


--- Comment #4 from jason at gcc dot gnu dot org  2010-02-09 20:06 ---
Subject: Bug 42370

Author: jason
Date: Tue Feb  9 20:05:51 2010
New Revision: 156634

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=156634
Log:
PR c++/42370
* decl2.c (change_return_type): New fn.
* semantics.c (apply_lambda_return_type): Use it.
* cp-tree.h: Declare it.

Added:
trunk/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-warn2.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/cp-tree.h
trunk/gcc/cp/decl2.c
trunk/gcc/cp/semantics.c
trunk/gcc/testsuite/ChangeLog


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42370



[Bug c++/42370] [C++0x][lambda] in a void function: "Warning: control reaches end of non-void function"

2010-02-09 Thread jason at gcc dot gnu dot org


-- 

jason at gcc dot gnu dot org changed:

   What|Removed |Added

 AssignedTo|unassigned at gcc dot gnu   |jason at gcc dot gnu dot org
   |dot org |
 Status|UNCONFIRMED |ASSIGNED
 Ever Confirmed|0   |1
   Last reconfirmed|-00-00 00:00:00 |2010-02-09 19:55:04
   date||


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42370



[Bug c++/42370] [C++0x][lambda] in a void function: "Warning: control reaches end of non-void function"

2009-12-16 Thread rodrigorivascosta at gmail dot com


--- Comment #3 from rodrigorivascosta at gmail dot com  2009-12-16 17:05 
---
If the lambda line is changed from:
[] { return 0; };

into any of the following:
[=] { return 0; };
[&] { return 0; };

int foo = 0;
[foo] { return 0; };

The warnings disappear.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42370