const-init.c revision da8bf14c016231d68bc89344f7d95e575fc4145a
1// RUN: clang -verify -emit-llvm -o %t %s 2 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). 10intptr_t b = a; // expected-warning {{incompatible pointer to integer conversion}} 11int c(); 12void *d = c; 13intptr_t e = c; // expected-warning {{incompatible pointer to integer conversion}} 14 15int f, *g = __extension__ &f, *h = (1 != 1) ? &f : &f; 16