mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-31 21:29:06 +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:
parent
98a9a1d7f9
commit
e8e628de57
Notes:
sideshowbarker
2024-07-18 10:05:52 +09:00
Author: https://github.com/BertalanD
Commit: e8e628de57
Pull-request: https://github.com/SerenityOS/serenity/pull/8470
Reviewed-by: https://github.com/Dexesttp
Reviewed-by: https://github.com/Hendiadyoin1
Reviewed-by: https://github.com/alimpfard
Reviewed-by: https://github.com/gunnarbeutner ✅
2 changed files with 14 additions and 1 deletions
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue