Super User's BSD Cross Reference: /NetBSD/tests/usr.bin/xlint/lint1/msg_210.c

1 /* $NetBSD: msg_210.c,v 1.7 2023年03月28日 14:44:35 rillig Exp $ */
2# 3 "msg_210.c"
3
4 // Test for message: enum type mismatch between '%s' and '%s' in initialization [210]
5
6 /* lint1-extra-flags: -X 351 */
7
8 enum A {
9 A1
10};
11
12 enum B {
13 B1
14};
15
16 typedef enum {
17 C1
18} C;
19
20 typedef enum {
21 D1
22} D;
23
24 enum A a1 = A1;
25 /* expect+1: warning: enum type mismatch between 'enum A' and 'enum B' in initialization [210] */
26 enum A a2 = B1;
27C c1 = C1;
28 /* expect+1: warning: enum type mismatch between 'enum typedef C' and 'enum typedef D' in initialization [210] */
29C c2 = D1;
30 

AltStyle によって変換されたページ (->オリジナル) /