1 | // RUN: %clang_cc1 %s -verify -pedantic -fsyntax-only |
---|---|
2 | |
3 | int constant c[3] = {0}; |
4 | |
5 | void foo() { |
6 | c[0] = 1; //expected-error{{read-only variable is not assignable}} |
7 | } |
8 |
1 | // RUN: %clang_cc1 %s -verify -pedantic -fsyntax-only |
---|---|
2 | |
3 | int constant c[3] = {0}; |
4 | |
5 | void foo() { |
6 | c[0] = 1; //expected-error{{read-only variable is not assignable}} |
7 | } |
8 |