[PATCH 6/7] builtin: switch calling order of predefined_macros() & friends

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The builtin functions were first declared, then the builtin stream
created and only then the builtin macros were predefined.
But this is essentially the wrong (logical) order.

Change the calling order so:
- first predefine the builtin s macros
- create the builtin stream
- declare the builtin functions (if needed)

Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@xxxxxxxxx>
---
 lib.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/lib.c b/lib.c
index 3cf602b37..f9d7e094d 100644
--- a/lib.c
+++ b/lib.c
@@ -1383,11 +1383,12 @@ struct symbol_list *sparse_initialize(int argc, char **argv, struct string_list
 		// Initialize type system
 		init_ctype();
 
-		declare_builtins();
-		create_builtin_stream();
 		predefined_macros();
-		if (!preprocess_only)
+		create_builtin_stream();
+		if (!preprocess_only) {
+			declare_builtins();
 			declare_builtin_functions();
+		}
 
 		list = sparse_initial();
 
-- 
2.17.1

--
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



[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux