diff options
author | David Krauss <david_work@me.com> | 2015-04-14 15:29:27 +0000 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2015-04-14 11:29:27 -0400 |
commit | 688e531e4b84d9250646715658179a5f72753609 (patch) | |
tree | a32a497ef0a398c352a42a0e75a8905ce2ec5f3b /gcc/cp/decl.c | |
parent | 2fd16d0f9007f2e9a991b80c6ae2e4c5f85272b6 (diff) | |
download | gcc-688e531e4b84d9250646715658179a5f72753609.zip gcc-688e531e4b84d9250646715658179a5f72753609.tar.gz gcc-688e531e4b84d9250646715658179a5f72753609.tar.bz2 |
re PR c++/59766 (c++1y: declaring friend function with 'auto' return type deduction is rejected with bogus reason)
PR c++/59766
* decl.c (grokdeclarator): Do not flag friends with deduced return.
From-SVN: r222095
Diffstat (limited to 'gcc/cp/decl.c')
-rw-r--r-- | gcc/cp/decl.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index c4731ae2..c8323b0 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -10628,7 +10628,7 @@ grokdeclarator (const cp_declarator *declarator, } else if (decl_context == FIELD) { - if (!staticp && TREE_CODE (type) != METHOD_TYPE + if (!staticp && !friendp && TREE_CODE (type) != METHOD_TYPE && type_uses_auto (type)) { error ("non-static data member declared %<auto%>"); |