1/* RUN: %clang_cc1 -fsyntax-only -verify -std=c90 -pedantic %s 2 */ 3void 4foo (void) 5{ 6 struct b; 7 struct b* x = 0; 8 struct b* y = &*x; 9} 10 11void foo2 (void) 12{ 13 typedef int (*arrayptr)[]; 14 arrayptr x = 0; 15 arrayptr y = &*x; 16} 17 18void foo3 (void) 19{ 20 void* x = 0; 21 void* y = &*x; /* expected-warning{{address of an expression of type 'void'}} */ 22} 23 24extern const void cv1; 25 26const void *foo4 (void) 27{ 28 return &cv1; 29} 30 31extern void cv2; 32void *foo5 (void) 33{ 34 return &cv2; /* expected-warning{{address of an expression of type 'void'}} */ 35} 36 37typedef const void CVT; 38extern CVT cv3; 39 40const void *foo6 (void) 41{ 42 return &cv3; 43} 44 45