1/* Test constraints on unary '&': PR 22367. */ 2 3/* { dg-do compile } */ 4/* { dg-options "-std=iso9899:1990 -pedantic-errors" } */ 5 6extern void v; 7void f1 (void) { &v; } /* { dg-error "taking address of expression of type 'void'" } */ 8 9extern void *pv; 10void f2 (void) { &*pv; } /* { dg-warning "dereferencing" } */ 11/* { dg-error "taking address of expression of type 'void'" "C90 only error" { target *-*-* } 10 } */ 12 13extern const void cv; 14void f3 (void) { &cv; } 15 16extern const void *pcv; 17void f4 (void) { &*pcv; } /* { dg-warning "dereferencing" } */ 18