1 /* $NetBSD: msg_246.c,v 1.7 2025/04/12 15:49:50 rillig Exp $ */
2 # 3 "msg_246.c"
3
4 // Test for message: dubious conversion of enum to '%s' [246]
5 // This message is not used.
6
7 /* lint1-extra-flags: -X 351 */
8
9 enum color {
10 RED, GREEN, BLUE
11 };
12
13 double
to_double(enum color c)14 to_double(enum color c)
15 {
16 return c;
17 }
18
19 void *
to_pointer(enum color c)20 to_pointer(enum color c)
21 {
22 /* expect+1: warning: invalid combination of pointer 'pointer to void' and integer 'enum color' for 'return' [183] */
23 return c;
24 }
25