prog.c:4: warning: "LIST" redefined
#define LIST LIST, double: foo2 // Add double to the list
prog.c:3: note: this is the location of the previous definition
#define LIST int: foo1
prog.c:5: warning: "LIST" redefined
#define LIST LIST, default: bar // Add default
prog.c:4: note: this is the location of the previous definition
#define LIST LIST, double: foo2 // Add double to the list
prog.c: In function ‘main’:
prog.c:5:14: error: unknown type name ‘LIST’
#define LIST LIST, default: bar // Add default
^~~~
prog.c:7:30: note: in expansion of macro ‘LIST’
#define foo(X) _Generic((X), LIST)(X)
^~~~
prog.c:27:5: note: in expansion of macro ‘foo’
foo(1);
^~~
prog.c:5:14: error: unknown type name ‘LIST’
#define LIST LIST, default: bar // Add default
^~~~
prog.c:7:30: note: in expansion of macro ‘LIST’
#define foo(X) _Generic((X), LIST)(X)
^~~~
prog.c:28:5: note: in expansion of macro ‘foo’
foo(1.1);
^~~