https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79021
--- Comment #1 from Akim Demaille <akim.demaille at gmail dot com> ---
Also observed with GCC 7.
$ g++-mp-7 -std=c++14 foo.cc -Wreturn-type
foo.cc: In lambda function:
foo.cc:21:38: warning: no return statement in function returning non-void
[-Wreturn-type]
auto g = [](auto a) -> int { f(a); };
^
$ g++-mp-7 --version
g++-mp-7 (MacPorts gcc7 7-20170101_0) 7.0.0 20170101 (experimental)
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.