opnsense-src/test/Parser/implicit-casts.c

22 lines
437 B
C
Raw Normal View History

2010-01-01 05:34:51 -05:00
// RUN: %clang_cc1 -fsyntax-only -verify -pedantic %s
2009-06-02 13:58:47 -04:00
_Complex double X;
void test1(int c) {
X = 5;
}
void test2() {
int i;
double d = i;
double _Complex a = 5;
test1(a);
a = 5;
d = i;
}
int test3() {
int a[2];
a[0] = test3; // expected-warning{{incompatible pointer to integer conversion assigning 'int ()', expected 'int'}}
2009-10-14 14:03:49 -04:00
return 0;
2009-06-02 13:58:47 -04:00
}
short x; void test4(char c) { x += c; }
int y; void test5(char c) { y += c; }