aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/obj-c++.dg/method-namespace-1.mm
blob: 86006a73b8d5ceda7e058ff6d4e6dac65e427ec1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/* Test for usage of namespace inside @implementation. */
/* { dg-do compile } */
// { dg-additional-options "-Wno-objc-root-class" }
@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