Eventually, most of what GCC predefine (gcc -E -dM) should be defined here. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@xxxxxxxxx> --- lib.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib.c b/lib.c index 3996c5673..018fa145e 100644 --- a/lib.c +++ b/lib.c @@ -802,6 +802,11 @@ static char **handle_switch(char *arg, char **next) return next; } +static void predefined_macros(void) +{ + add_pre_buffer("#define __CHECKER__ 1\n"); +} + void declare_builtin_functions(void) { /* Gaah. gcc knows tons of builtin <string.h> functions */ @@ -1154,7 +1159,7 @@ struct symbol_list *sparse_initialize(int argc, char **argv, struct string_list init_ctype(); create_builtin_stream(); - add_pre_buffer("#define __CHECKER__ 1\n"); + predefined_macros(); if (!preprocess_only) declare_builtin_functions(); -- 2.11.0 -- To unsubscribe from this list: send the line "unsubscribe linux-sparse" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html