mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-03-25 05:40:26 +08:00
re PR c++/53821 ([c++11] multiple definitions of lambda)
PR c++/53821 * semantics.c (maybe_add_lambda_conv_op): Don't set DECL_INTERFACE_KNOWN. From-SVN: r189175
This commit is contained in:
parent
8d0d1915d9
commit
73a1569582
@ -1,5 +1,9 @@
|
||||
2012-07-02 Jason Merrill <jason@redhat.com>
|
||||
|
||||
PR c++/53821
|
||||
* semantics.c (maybe_add_lambda_conv_op): Don't set
|
||||
DECL_INTERFACE_KNOWN.
|
||||
|
||||
PR c++/53524
|
||||
* call.c (build_conditional_expr_1): Don't warn about comparison of
|
||||
two enumerators before their enumeration is complete.
|
||||
|
@ -9336,8 +9336,6 @@ maybe_add_lambda_conv_op (tree type)
|
||||
DECL_NOT_REALLY_EXTERN (fn) = 1;
|
||||
DECL_DECLARED_INLINE_P (fn) = 1;
|
||||
DECL_ARGUMENTS (fn) = build_this_parm (fntype, TYPE_QUAL_CONST);
|
||||
if (nested)
|
||||
DECL_INTERFACE_KNOWN (fn) = 1;
|
||||
|
||||
add_method (type, fn, NULL_TREE);
|
||||
|
||||
@ -9368,8 +9366,6 @@ maybe_add_lambda_conv_op (tree type)
|
||||
DECL_ARGUMENTS (fn) = copy_list (DECL_CHAIN (DECL_ARGUMENTS (callop)));
|
||||
for (arg = DECL_ARGUMENTS (fn); arg; arg = DECL_CHAIN (arg))
|
||||
DECL_CONTEXT (arg) = fn;
|
||||
if (nested)
|
||||
DECL_INTERFACE_KNOWN (fn) = 1;
|
||||
|
||||
add_method (type, fn, NULL_TREE);
|
||||
|
||||
|
@ -1,5 +1,8 @@
|
||||
2012-07-02 Jason Merrill <jason@redhat.com>
|
||||
|
||||
PR c++/53821
|
||||
* g++.dg/cpp0x/lambda/lambda-template6.C: New.
|
||||
|
||||
PR c++/53524
|
||||
* g++.dg/template/enum7.C: New.
|
||||
* g++.dg/other/ptrmem10.C: Adjust.
|
||||
|
14
gcc/testsuite/g++.dg/cpp0x/lambda/lambda-template6.C
Normal file
14
gcc/testsuite/g++.dg/cpp0x/lambda/lambda-template6.C
Normal file
@ -0,0 +1,14 @@
|
||||
// PR c++/53821
|
||||
// { dg-final { scan-assembler-not "_ZZ1fIvEvvENKUlvE_cvPFvvEEv" } }
|
||||
// { dg-do compile { target c++11 } }
|
||||
|
||||
template <class T> void f()
|
||||
{
|
||||
auto g = []{};
|
||||
g();
|
||||
}
|
||||
|
||||
int main()
|
||||
{
|
||||
f<void>();
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user