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