From 8509bfdba20ac848e5c51b4a9591859ef7dc633c Mon Sep 17 00:00:00 2001 From: John Ericson Date: Thu, 24 Feb 2022 17:44:22 -0500 Subject: [PATCH] Make the PIC macro confuse the type checker less --- include/os.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/os.h b/include/os.h index 9f32b04f..b42ded68 100644 --- a/include/os.h +++ b/include/os.h @@ -210,7 +210,7 @@ int setjmp(jmp_buf __jmpb); // depending on the execution address. Can be used even if code is executing at // the same place where it had been linked. #ifndef PIC -#define PIC(x) pic((unsigned int)x) +#define PIC(x) ((typeof(x)) pic((unsigned int)x)) unsigned int pic(unsigned int linked_address); #endif