1 #define __safe __attribute__((safe))
3 static void test_safe(void)
8 int __safe
*ptr2
= ptr
;
9 typeof(ptr
) ptr3
= ptr
;
10 typeof(*ptr
) var2
= obj
;
11 int __safe var3
= obj
;
13 int *ptr5
= ptr
; // KO
16 typeof(&sobj
) ptr6
= &obj
;
17 typeof(&sobj
) ptr7
= ptr
; // KO
22 ptr
= (int __safe
*) &obj
;
26 * check-name: typeof-safe
29 typeof-safe.c:13:21: warning: incorrect type in initializer (different modifiers)
30 typeof-safe.c:13:21: expected int *ptr5
31 typeof-safe.c:13:21: got int [safe] *ptr
32 typeof-safe.c:17:30: warning: incorrect type in initializer (different modifiers)
33 typeof-safe.c:17:30: expected int *ptr7
34 typeof-safe.c:17:30: got int [safe] *ptr