From 618c73eee71f5790af8d5748f707f2be21099a00 Mon Sep 17 00:00:00 2001 From: dzwdz Date: Tue, 10 Aug 2021 14:32:05 +0000 Subject: statically assert that the pointer size == 4 bytes --- src/kernel/arch/i386/multiboot.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/kernel/arch/i386') diff --git a/src/kernel/arch/i386/multiboot.h b/src/kernel/arch/i386/multiboot.h index f030247..b780f91 100644 --- a/src/kernel/arch/i386/multiboot.h +++ b/src/kernel/arch/i386/multiboot.h @@ -1,7 +1,8 @@ #pragma once #include -// TODO assert that pointers have 4 bytes. +_Static_assert(sizeof(void*) == 4, + "this code assumes that pointers have 4 bytes"); struct multiboot_mod { void *start; -- cgit v1.2.3