From 73551e058a850297bc72924a69b39affcfa49dfa Mon Sep 17 00:00:00 2001 From: Xavier Leroy Date: Wed, 23 Dec 2020 17:22:33 +0100 Subject: C parser: handle other built-in types than __builtin_va_list All the built-in types declared in $ARCH/CBuiltins.ml are now recognized as type names initially. --- cparser/Lexer.mll | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'cparser') diff --git a/cparser/Lexer.mll b/cparser/Lexer.mll index 881d411a..bce0e504 100644 --- a/cparser/Lexer.mll +++ b/cparser/Lexer.mll @@ -95,7 +95,8 @@ let () = (* We can ignore the __extension__ GCC keyword. *) ignored_keywords := SSet.add "__extension__" !ignored_keywords -let init_ctx = SSet.singleton "__builtin_va_list" +let init_ctx = SSet.of_list (List.map fst CBuiltins.builtins.C.builtin_typedefs) + let types_context : SSet.t ref = ref init_ctx let _ = -- cgit