1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 04:57:44 +00:00

Everywhere: Add Clang pragmas

We use these to prevent UB from being optimized away in `/bin/crash` and
to make the compiler not warn about the many implicit floating point
type promotions in LibM.
This commit is contained in:
Daniel Bertalan 2021-07-06 06:27:27 +02:00 committed by Gunnar Beutner
parent 98a9a1d7f9
commit e8e628de57
2 changed files with 14 additions and 1 deletions

View file

@ -21,7 +21,11 @@
using Test::Crash;
#pragma GCC optimize("O0")
#ifdef __clang__
# pragma clang optimize off
#else
# pragma GCC optimize("O0")
#endif
int main(int argc, char** argv)
{