aboutsummaryrefslogtreecommitdiff
path: root/clang/test/Sema/predef.c
blob: bd5e1a98b24bd9cd2b9fa8a716698cfa58e43b00 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
// RUN: clang -fsyntax-only -verify %s

void abcdefghi12(void) {
 const char (*ss)[12] = &__func__;
 static int arr[sizeof(__func__)==12 ? 1 : -1];
}

char *X = __func__; // expected-error {{predefined identifier is only valid}}

void a() {
  __func__[0] = 'a';  // expected-error {{variable is not assignable}}
}