2010-10-07 Nicola Pero <nicola@nicola.brainstorm.co.uk>
Merge from apple/trunk branch on FSF servers.
2006-04-26 Fariborz Jahanian <fjahanian@apple.com>
Radar 4508851
* parser.c (cp_parser_objc_interstitial_code): Recognize
and parse RID_NAMESPACE keyword.
In gcc/testsuite/:
2010-10-07 Nicola Pero <nicola.pero@meta-innovation.com>
Merge from 'apple/trunk' branch on FSF servers.
2006-04-26 Fariborz Jahanian <fjahanian@apple.com>
Radar 4508851
* obj-c++.dg/method-namespace-1.mm: New.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@165125
138bc75d-0d04-0410-961f-
82ee72b054a4
+2010-10-07 Nicola Pero <nicola@nicola.brainstorm.co.uk>
+
+ Merge from apple/trunk branch on FSF servers.
+
+ 2006-04-26 Fariborz Jahanian <fjahanian@apple.com>
+
+ Radar 4508851
+ * parser.c (cp_parser_objc_interstitial_code): Recognize
+ and parse RID_NAMESPACE keyword.
+
2010-10-07 Iain Sandoe <iains@gcc.gnu.org>
- parser.c (cp_parser_objc_method_tail_params_opt): Peek new token after
+ * parser.c (cp_parser_objc_method_tail_params_opt): Peek new token after
finding ellipsis, before checking for attributes.
2010-10-06 Nicola Pero <nicola.pero@meta-innovation.com>
cp_lexer_consume_token (parser->lexer);
objc_set_method_opt (false);
}
+ else if (token->keyword == RID_NAMESPACE)
+ cp_parser_namespace_definition (parser);
/* Other stray characters must generate errors. */
else if (token->type == CPP_OPEN_BRACE || token->type == CPP_CLOSE_BRACE)
{
+2010-10-07 Nicola Pero <nicola.pero@meta-innovation.com>
+
+ Merge from 'apple/trunk' branch on FSF servers.
+
+ 2006-04-26 Fariborz Jahanian <fjahanian@apple.com>
+
+ Radar 4508851
+ * obj-c++.dg/method-namespace-1.mm: New.
+
2010-10-07 Martin Jambor <mjambor@suse.cz>
* gcc.dg/tree-ssa/sra-11.c: New test.
--- /dev/null
+/* Test for usage of namespace inside @implementation. */
+/* { dg-do compile } */
+@interface MyDocument
+@end
+
+@implementation MyDocument
+
+// This deprecated usage works
+static void foo1() { }
+
+// This preferred usage does _not_ work
+namespace
+ {
+ void foo2() { }
+ }
+
+namespace STD
+ {
+ void foo3 () {}
+ }
+
+using namespace STD;
+
+- (void) GARF {
+ foo2();
+ foo3();
+}
+
+@end