1 /* Test handling of lvalues of incomplete types. Bugs 36941, 88647
3 /* { dg-do compile } */
4 /* { dg-options "-std=c11 -pedantic-errors" } */
15 var
; /* { dg-error "has an incomplete type" } */
16 var
, (void) 0; /* { dg-error "has an incomplete type" } */
18 ? var
/* { dg-error "has an incomplete type" } */
19 : var
); /* { dg-error "has an incomplete type" } */
25 (void) var
; /* { dg-error "has an incomplete type" } */
26 (void) (var
, (void) 0); /* { dg-error "has an incomplete type" } */
28 ? var
/* { dg-error "has an incomplete type" } */
29 : var
); /* { dg-error "has an incomplete type" } */
35 (const void) var
; /* { dg-error "has an incomplete type" } */
36 (const void) (var
, (void) 0); /* { dg-error "has an incomplete type" } */
38 ? var
/* { dg-error "has an incomplete type" } */
39 : var
); /* { dg-error "has an incomplete type" } */
45 *vp
; /* { dg-error "invalid use of undefined type" } */
46 *vp
, (void) 0; /* { dg-error "invalid use of undefined type" } */
48 ? *vp
/* { dg-error "invalid use of undefined type" } */
49 : *vp
); /* { dg-error "invalid use of undefined type" } */
55 (void) *vp
; /* { dg-error "invalid use of undefined type" } */
56 (void) (*vp
, (void) 0); /* { dg-error "invalid use of undefined type" } */
58 ? *vp
/* { dg-error "invalid use of undefined type" } */
59 : *vp
); /* { dg-error "invalid use of undefined type" } */
65 (const void) *vp
; /* { dg-error "invalid use of undefined type" } */
66 (const void) (*vp
, (void) 0); /* { dg-error "invalid use of undefined type" } */
68 ? *vp
/* { dg-error "invalid use of undefined type" } */
69 : *vp
); /* { dg-error "invalid use of undefined type" } */
75 /* This is invalid because of the constraints on []. */
76 &vp
[0]; /* { dg-error "invalid use of undefined type" } */