diff options
Diffstat (limited to 'test/Sema/anonymous-struct-union.c')
| -rw-r--r-- | test/Sema/anonymous-struct-union.c | 7 | 
1 files changed, 4 insertions, 3 deletions
| diff --git a/test/Sema/anonymous-struct-union.c b/test/Sema/anonymous-struct-union.c index 652383eabb72..c33bc52971e7 100644 --- a/test/Sema/anonymous-struct-union.c +++ b/test/Sema/anonymous-struct-union.c @@ -22,6 +22,7 @@ struct X {  };  void test_unqual_references(struct X x, const struct X xc) { +  // expected-note@-1 3{{variable 'xc' declared const here}}    x.i = 0;    x.f = 0.0;    x.f2 = x.f; @@ -29,9 +30,9 @@ void test_unqual_references(struct X x, const struct X xc) {    x.f3 = 0; // expected-error{{no member named 'f3'}}    x.a = 0; -  xc.d = 0.0; // expected-error{{read-only variable is not assignable}} -  xc.f = 0; // expected-error{{read-only variable is not assignable}} -  xc.a = 0; // expected-error{{read-only variable is not assignable}} +  xc.d = 0.0; // expected-error{{cannot assign to variable 'xc' with const-qualified type 'const struct X'}} +  xc.f = 0; // expected-error{{cannot assign to variable 'xc' with const-qualified type 'const struct X'}} +  xc.a = 0; // expected-error{{cannot assign to variable 'xc' with const-qualified type 'const struct X'}}  } | 
