1extern const int *p; 2extern volatile void *q; 3extern volatile int *r; 4static void f(void) 5{ 6 q = 1 ? p : q; // warn: const volatile void * -> const int * 7 r = 1 ? r : q; // OK: volatile void * -> volatile int * 8 r = 1 ? r : p; // warn: const volatile int * -> volatile int * 9} 10/* 11 * check-name: type of conditional expression 12 * check-description: Used to miss qualifier mixing and mishandle void * 13 * 14 * check-error-start 15cond_expr2.c:6:11: warning: incorrect type in assignment (different modifiers) 16cond_expr2.c:6:11: expected void volatile *extern [addressable] [toplevel] q 17cond_expr2.c:6:11: got void const volatile * 18cond_expr2.c:8:11: warning: incorrect type in assignment (different modifiers) 19cond_expr2.c:8:11: expected int volatile *extern [addressable] [assigned] [toplevel] r 20cond_expr2.c:8:11: got int const volatile * 21 * check-error-end 22 */ 23