diff options
Diffstat (limited to 'test/Sema/assign.c')
-rw-r--r-- | test/Sema/assign.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/test/Sema/assign.c b/test/Sema/assign.c index 2d57029..1fff778 100644 --- a/test/Sema/assign.c +++ b/test/Sema/assign.c @@ -3,7 +3,10 @@ void *test1(void) { return 0; } void test2 (const struct {int a;} *x) { - x->a = 10; // expected-error {{read-only variable is not assignable}} + // expected-note@-1 {{variable 'x' declared const here}} + + x->a = 10; + // expected-error-re@-1 {{cannot assign to variable 'x' with const-qualified type 'const struct (anonymous struct at {{.*}}assign.c:5:19) *'}} } typedef int arr[10]; |