diff options
author | paolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-06-12 01:29:42 +0000 |
---|---|---|
committer | paolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-06-12 01:29:42 +0000 |
commit | 7c862e3891ee1a34e2c33424cbc753055c523423 (patch) | |
tree | c53368f954ad7ed77eff7d185269bf0ffa326688 /gcc/cp | |
parent | 930885cc328bb21c480ddd13d27d9652125b55e4 (diff) | |
download | gcc-7c862e3891ee1a34e2c33424cbc753055c523423.tar.gz |
/cp
2014-06-11 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/19200
* parser.c (cp_parser_init_declarator): Actually pass friend_p
to cp_parser_declarator.
/testsuite
2014-06-11 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/19200
* g++.dg/parse/friend11.C: New.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@211488 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp')
-rw-r--r-- | gcc/cp/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/cp/parser.c | 7 |
2 files changed, 8 insertions, 5 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 8bd4a7389d2..70156ebe16a 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,11 @@ 2014-06-11 Paolo Carlini <paolo.carlini@oracle.com> + PR c++/19200 + * parser.c (cp_parser_init_declarator): Actually pass friend_p + to cp_parser_declarator. + +2014-06-11 Paolo Carlini <paolo.carlini@oracle.com> + PR c++/60265 * parser.c (cp_parser_using_declaration): Handle unscoped enums. * name-lookup.c (validate_nonmember_using_decl): Adjust error diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c index 4dff139ff5d..1079832cec2 100644 --- a/gcc/cp/parser.c +++ b/gcc/cp/parser.c @@ -16545,7 +16545,7 @@ cp_parser_init_declarator (cp_parser* parser, bool is_direct_init = false; bool is_non_constant_init; int ctor_dtor_or_conv_p; - bool friend_p; + bool friend_p = cp_parser_friend_p (decl_specifiers); tree pushed_scope = NULL_TREE; bool range_for_decl_p = false; bool saved_default_arg_ok_p = parser->default_arg_ok_p; @@ -16574,7 +16574,7 @@ cp_parser_init_declarator (cp_parser* parser, = cp_parser_declarator (parser, CP_PARSER_DECLARATOR_NAMED, &ctor_dtor_or_conv_p, /*parenthesized_p=*/NULL, - member_p, /*friend_p=*/false); + member_p, friend_p); /* Gather up the deferred checks. */ stop_deferring_access_checks (); @@ -16746,9 +16746,6 @@ cp_parser_init_declarator (cp_parser* parser, decl_specifiers->type = integer_type_node; } - /* Check to see whether or not this declaration is a friend. */ - friend_p = cp_parser_friend_p (decl_specifiers); - /* Enter the newly declared entry in the symbol table. If we're processing a declaration in a class-specifier, we wait until after processing the initializer. */ |