add a static assertion to ensure that the platform compiles right-shifts to sar.

This commit is contained in:
2026-01-22 14:08:21 +01:00
parent 401d7acc69
commit d81502588f

View File

@@ -26,6 +26,10 @@ static void quit(void)
glfwTerminate(); 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. */ /* Entry-point of the application. */
int main(int argc, char **argv) int main(int argc, char **argv)