15 /* All following uses of enum efoo should compile
16 without warning. While forward enums aren't ISO C,
17 it's accepted by GCC also in strict mode, and only warned
18 about with -pedantic. This happens in the real world. */
19 /* Strict ISO C doesn't allow this kind of forward declaration of
20 enums, but GCC accepts it (and gives only pedantic warning), and
21 it occurs in the wild. */
24 int (*fmember
) (enum efoo x
);
27 extern enum efoo
it_real_fn(void);
33 enum efoo (*f2
) (void);
35 void should_compile(struct S2
*s
)
40 enum efoo
it_real_fn(void)
45 static unsigned int deref_uintptr(unsigned int *p
)
57 enum Epositive epos
= epos_two
;
59 printf("%d %d %d %d %d %d %d %d\n", a
, b
, c
, d
, e
, f
, g
, h
);
60 /* printf("%d\n", frod); */
66 /* Following should compile without warning. */
67 printf ("enum to int: %u\n", deref_uintptr(&epos
));
72 /* vim: set expandtab ts=4 sw=3 sts=3 tw=80 :*/