blob: 0efab6f903676a2bf3bb95f2bb868d8e8a5b1ae6 [file] [log] [blame]
Daniel Dunbar40ca8142008-08-05 06:30:41 +00001// RUN: clang -verify -emit-llvm -o %t %s
Eli Friedman05d125c2008-02-21 18:07:36 +00002
3#include <stdint.h>
4
5// Brace-enclosed string array initializers
6char a[] = { "asdf" };
7
8// Double-implicit-conversions of array/functions (not legal C, but
9// clang accepts it for gcc compat).
Daniel Dunbar40ca8142008-08-05 06:30:41 +000010intptr_t b = a; // expected-warning {{incompatible pointer to integer conversion}}
Eli Friedman05d125c2008-02-21 18:07:36 +000011int c();
12void *d = c;
Daniel Dunbar40ca8142008-08-05 06:30:41 +000013intptr_t e = c; // expected-warning {{incompatible pointer to integer conversion}}
Eli Friedmana36799c2008-05-29 11:22:45 +000014
15int f, *g = __extension__ &f, *h = (1 != 1) ? &f : &f;