mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-04-01 20:21:12 +08:00
re PR c++/43016 ([C++0x] Inappropriate multiple definition error for lambda function when inside inline functions)
PR c++/43016 * semantics.c (maybe_add_lambda_conv_op): Set DECL_INTERFACE_KNOWN. From-SVN: r156671
This commit is contained in:
parent
56592e03b4
commit
7a79ff3be3
@ -1,3 +1,8 @@
|
||||
2010-02-10 Jason Merrill <jason@redhat.com>
|
||||
|
||||
PR c++/43016
|
||||
* semantics.c (maybe_add_lambda_conv_op): Set DECL_INTERFACE_KNOWN.
|
||||
|
||||
2010-02-10 Shujing Zhao <pearly.zhao@oracle.com>
|
||||
|
||||
* Make-lang.in (cp/cvt.o, cp/parser.o, cp/search.o): Depend on intl.h.
|
||||
|
@ -5871,6 +5871,8 @@ maybe_add_lambda_conv_op (tree type)
|
||||
DECL_NOT_REALLY_EXTERN (fn) = 1;
|
||||
DECL_DECLARED_INLINE_P (fn) = 1;
|
||||
DECL_STATIC_FUNCTION_P (fn) = 1;
|
||||
if (nested)
|
||||
DECL_INTERFACE_KNOWN (fn) = 1;
|
||||
|
||||
add_method (type, fn, NULL_TREE);
|
||||
|
||||
|
@ -1,3 +1,8 @@
|
||||
2010-02-10 Jason Merrill <jason@redhat.com>
|
||||
|
||||
PR c++/43016
|
||||
* g++.dg/cpp0x/lambda/lambda-conv.C: Test for weakness.
|
||||
|
||||
2010-02-10 Richard Guenther <rguenther@suse.de>
|
||||
|
||||
PR tree-optimization/43017
|
||||
|
@ -1,6 +1,16 @@
|
||||
// { dg-options -std=c++0x }
|
||||
// Test for conversion from stateless lambda to function pointer, which is
|
||||
// not yet part of the draft but hopefully will be after the March 2010
|
||||
// meeting.
|
||||
|
||||
int main()
|
||||
// { dg-options -std=c++0x }
|
||||
// { dg-final { scan-assembler "weak\[^\n\r\]*_?_ZZ1fvENUlvE_cvPFvvEEv" { target { ! { *-*-darwin* *-*-mingw* *-*-cygwin } } } } }
|
||||
|
||||
inline void f()
|
||||
{
|
||||
void (*pfn)() = []{};
|
||||
}
|
||||
|
||||
int main()
|
||||
{
|
||||
f();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user