expr-comma-c99.c revision 0289b666b5f866bd39a6e1d96e56ba348c7fecf2
1// RUN: %clang_cc1 %s -fsyntax-only -verify -std=c99 2// rdar://6095180 3 4struct s { char c[17]; }; 5extern struct s foo(void); 6 7struct s a, b, c; 8 9int A[sizeof((foo().c)) == 17 ? 1 : -1]; 10int B[sizeof((a.c)) == 17 ? 1 : -1]; 11 12 13// comma does array/function promotion in c99. 14int X[sizeof(0, (foo().c)) == sizeof(char*) ? 1 : -1]; 15int Y[sizeof(0, (a,b).c) == sizeof(char*) ? 1 : -1]; 16int Z[sizeof(0, (a=b).c) == sizeof(char*) ? 1 : -1]; 17 18