Since semantics and supported features can differ between standard version we may need the supported version. Allow this by moving the variable 'standard' and the corresponding enum definition to lib.h Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@xxxxxxxxx> --- lib.c | 8 +------- lib.h | 11 +++++++++++ 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/lib.c b/lib.c index 7866800bf..97d8af390 100644 --- a/lib.c +++ b/lib.c @@ -318,13 +318,7 @@ int funsigned_char = -1; int preprocess_only; -static enum { STANDARD_C89, - STANDARD_C94, - STANDARD_C99, - STANDARD_C11, - STANDARD_GNU11, - STANDARD_GNU89, - STANDARD_GNU99, } standard = STANDARD_GNU89; +enum standard standard = STANDARD_GNU89; static int arch_msize_long = 0; int arch_m64 = ARCH_M64_DEFAULT; diff --git a/lib.h b/lib.h index 684a4955d..1eb455618 100644 --- a/lib.h +++ b/lib.h @@ -224,6 +224,17 @@ enum { }; extern int arch_cmodel; +enum standard { + STANDARD_C89, + STANDARD_C94, + STANDARD_C99, + STANDARD_C11, + STANDARD_GNU11, + STANDARD_GNU89, + STANDARD_GNU99, +}; +extern enum standard standard; + extern void dump_macro_definitions(void); extern struct symbol_list *sparse_initialize(int argc, char **argv, struct string_list **files); extern struct symbol_list *__sparse(char *filename); -- 2.24.0