1 #include "check_debug.h"
3 #define add(x, y) x + y
4 #define sub(x, y) x - y
13 x
= 4 * add(2, 3) * 8;
20 * check-name: Smatch macro precedence bugs
21 * check-command: smatch -I.. sm_macros.c
24 sm_macros.c +11 func(5) warn: the 'add' macro might need parens
25 sm_macros.c +13 func(7) warn: the 'add' macro might need parens
26 sm_macros.c +13 func(7) warn: the 'add' macro might need parens
27 sm_macros.c +14 func(8) warn: the 'add' macro might need parens
28 sm_macros.c +16 func(10) warn: the 'sub' macro might need parens
29 sm_macros.c +17 func(11) warn: the 'sub' macro might need parens