diff options
author | Jason Merrill <jason@redhat.com> | 2006-03-21 11:15:25 -0500 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2006-03-21 11:15:25 -0500 |
commit | aa09f986bc1d3934932225d64ebca03a7eed65b3 (patch) | |
tree | 08f269db67792c0582b8e185657a88039333e7ca /gcc/cp/parser.c | |
parent | c4963a0a324c37a487535f25590f2c539ceb39fc (diff) | |
download | gcc-aa09f986bc1d3934932225d64ebca03a7eed65b3.zip gcc-aa09f986bc1d3934932225d64ebca03a7eed65b3.tar.gz gcc-aa09f986bc1d3934932225d64ebca03a7eed65b3.tar.bz2 |
re PR c++/21581 ((optimisation) Functions in anonymous namespaces should default to "hidden" visibility)
PR c++/21581
* parser.c (cp_parser_declaration): Support attributes on
anonymous namespaces.
* name-lookup.c (push_namespace_with_attribs): Anonymous
namespaces default to hidden visibility.
From-SVN: r112250
Diffstat (limited to 'gcc/cp/parser.c')
-rw-r--r-- | gcc/cp/parser.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c index e04a8e7..c5e6b17 100644 --- a/gcc/cp/parser.c +++ b/gcc/cp/parser.c @@ -7066,7 +7066,8 @@ cp_parser_declaration (cp_parser* parser) && (cp_lexer_peek_nth_token (parser->lexer, 3)->type != CPP_EQ)) /* An unnamed namespace definition. */ - || token2.type == CPP_OPEN_BRACE)) + || token2.type == CPP_OPEN_BRACE + || token2.keyword == RID_ATTRIBUTE)) cp_parser_namespace_definition (parser); /* Objective-C++ declaration/definition. */ else if (c_dialect_objc () && OBJC_IS_AT_KEYWORD (token1.keyword)) |