[cxx-abi-dev] Itanium ABI fails to specify how to mangle lambdas

Richard Smith richardsmith at google.com
Thu Jan 17 20:16:57 UTC 2013


This is a defect in the standard; the intent was that lambdas would not
ever need to be mangled. See the top of page 2 here:

http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2009/n2859.pdf


On Thu, Jan 17, 2013 at 11:46 AM, Michael Wong <michaelw at ca.ibm.com> wrote:

> Lambdas can appear in contexts where the ABI requires that the expression
> be mangled.
> Note that the lambdas below participate in SFINAE as far as I know.
>
> template <typename T>
> void foo(const int *, char (*)[sizeof(T) > 1 || [] { goto lab; for (;;)
> lab: return T(); }] = 0) { }
>
> template <typename T>
> void foo(int *ptr, char (*)[sizeof(T) > 1 || [] { goto lab; decltype(ptr)
> ptr; lab: return T(ptr); }] = 0) { }
>
> int main() {
>    foo<float>(static_cast<int *>(0));
> }
>
>
>
> Regards, Michael
>
> OpenMP CEO:
> http://openmp.org/wp/about-openmp/
> My Blogs:
> http://ibm.co/pCvPHR
> C++11 status:
> http://tinyurl.com/43y8xgf
> Boost test results
> http://www.ibm.com/support/docview.wss?rs=2239&context=SSJT9L&uid=swg27006911
> C/C++ Compilers Support/Feature Request Page
> http://www.ibm.com/software/awdtools/ccompilers/support/
> http://www.ibm.com/support/docview.wss?uid=swg27005811
> STM:
> https://sites.google.com/site/tmforcplusplus/
>
> Director & Vice President ISOCPP.org
> Canada and IBM C++Standard HoD
> Chair of WG21 SG5 Transactional Memory
>
> XL C++ Compiler kernel Development
> IBM Canada Ltd., C2/KD2/8200/MKM
> 8200 Warden Avenue
> Markham, Ontario  L6G 1C7
> W:905-413-3283 F:905-413-4839
>
> _______________________________________________
> cxx-abi-dev mailing list
> cxx-abi-dev at codesourcery.com
> http://sourcerytools.com/cgi-bin/mailman/listinfo/cxx-abi-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://sourcerytools.com/pipermail/cxx-abi-dev/attachments/20130117/ccdaec5a/attachment.html>


More information about the cxx-abi-dev mailing list