[Bug c++/52288] Trouble with operator?: and lambdas

jason at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri May 9 18:29:00 GMT 2014


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

Jason Merrill <jason at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jason at gcc dot gnu.org

--- Comment #6 from Jason Merrill <jason at gcc dot gnu.org> ---
G++ will now say

wa.C:3:17: error: operands to ?: have different types ‘main(int,
char**)::<lambda(int)>’ and ‘main(int, char**)::<lambda(int)>’

I think that addresses the ?: part of this issue.  I'll leave it open for now
in case we want to keep it as a question about how to name lambdas in error
messages.  It seems to me that we might want to omit the function scope if
we're currently in the same function.  Do we want to give them numbers to
distinguish them?


More information about the Gcc-bugs mailing list