1// RUN: %clang_cc1 %s -fsyntax-only -verify -std=c89 -Wno-sizeof-array-decay 2// expected-no-diagnostics 3// rdar://6095180 4 5struct s { char c[17]; }; 6extern struct s foo(void); 7 8struct s a, b, c; 9 10int A[sizeof((foo().c)) == 17 ? 1 : -1]; 11int B[sizeof((a.c)) == 17 ? 1 : -1]; 12 13 14// comma does not promote array/function in c90 unless they are lvalues. 15int W[sizeof(0, a.c) == sizeof(char*) ? 1 : -1]; 16int X[sizeof(0, (foo().c)) == 17 ? 1 : -1]; 17int Y[sizeof(0, (a,b).c) == 17 ? 1 : -1]; 18int Z[sizeof(0, (a=b).c) == 17 ? 1 : -1]; 19