1 /* Test that enumerated types are only considered compatible when they
2 are the same type. PR c/6024. */
3 /* Origin: Joseph Myers <jsm@polyomino.org.uk>, based on
4 PR c/6024 from Richard Earnshaw <rearnsha@arm.com> */
5 /* { dg-do compile } */
6 /* { dg-options "" } */
8 /* Original test from PR c/6024. */
12 void f(enum e1
); /* { dg-error "prototype" "error at decl" } */
16 { /* { dg-error "doesn't match prototype" "error at defn" } */
20 /* Other compatibility tests. */
25 enum e4
*p
= &v3
; /* { dg-warning "incompatible" "incompatible pointer" } */
28 void g(enum e3
); /* { dg-error "declaration" "error at first decl" } */
29 void g(enum e4
); /* { dg-error "conflicting types" "error at second decl" } */