1 /* PR c/48778 */ 2 /* { dg-do compile } */ 3 /* { dg-options "-Waddress" } */ 4 5 #define NULL ((void *) 0) 6 7 #define M1(b) ((b) != NULL ? 0 : (b)) 8 #define M2(b) ((b) == NULL ? 0 : (b)) 9 #define M3(b) (NULL != (b) ? 0 : (b)) 10 #define M4(b) (NULL == (b) ? 0 : (b)) 11 12 int func(int b)13func (int b) 14 { 15 if (M1 (&b) > 0) 16 return 1; 17 if (M2 (&b) > 0) 18 return 2; 19 if (M3 (&b) > 0) 20 return 3; 21 if (M4 (&b) > 0) 22 return 4; 23 return 0; 24 } 25