From d81502588fb932f737f9703a10c64b021b0276d4 Mon Sep 17 00:00:00 2001 From: Quinn Date: Thu, 22 Jan 2026 14:08:21 +0100 Subject: [PATCH] add a static assertion to ensure that the platform compiles right-shifts to sar. --- src/main.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main.c b/src/main.c index a4db99c..868dff8 100644 --- a/src/main.c +++ b/src/main.c @@ -26,6 +26,10 @@ static void quit(void) glfwTerminate(); } +#if __has_extension(c_static_assert) +__extension__ _Static_assert(-3 >> 5 == -1, + "The platform does not compile right-shifting signed integers to an arithmetic shift!"); +#endif /* Entry-point of the application. */ int main(int argc, char **argv)