diff options
Diffstat (limited to 'test/CXX/drs/dr4xx.cpp')
-rw-r--r-- | test/CXX/drs/dr4xx.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/test/CXX/drs/dr4xx.cpp b/test/CXX/drs/dr4xx.cpp index 1a5976eadaffc..d27adc428d512 100644 --- a/test/CXX/drs/dr4xx.cpp +++ b/test/CXX/drs/dr4xx.cpp @@ -22,6 +22,9 @@ namespace dr401 { // dr401: yes class B { protected: typedef int type; // expected-note {{protected}} +#if __cplusplus == 199711L + // expected-note@-2 {{protected}} +#endif }; class C { @@ -593,10 +596,10 @@ namespace dr447 { // dr447: yes U<__builtin_offsetof(A, n)>::type a; U<__builtin_offsetof(T, n)>::type b; // expected-error +{{}} expected-warning 0+{{}} // as an extension, we allow the member-designator to include array indices - g(__builtin_offsetof(A, a[0])).h<int>(); // expected-error {{extension}} - g(__builtin_offsetof(A, a[N])).h<int>(); // expected-error {{extension}} - U<__builtin_offsetof(A, a[0])>::type c; // expected-error {{extension}} - U<__builtin_offsetof(A, a[N])>::type d; // expected-error {{extension}} expected-error +{{}} expected-warning 0+{{}} + g(__builtin_offsetof(A, a[0])).h<int>(); + g(__builtin_offsetof(A, a[N])).h<int>(); + U<__builtin_offsetof(A, a[0])>::type c; + U<__builtin_offsetof(A, a[N])>::type d; // expected-error +{{}} expected-warning 0+{{}} } } |