Useful C++ flags (gcc and clang)

preview_player
Показать описание
Some flags that you might find useful for gcc and clang

💭 All views are my own 💭

Music
========================================================

License ID: 4vNW6m5XnVK
Рекомендации по теме
Комментарии
Автор

For all that is holy please do NOT use `-ffast-math`.

It should really be called `-fwrong-math`, because it usually doesn't make anything faster and almost always causes wrong numerical results.

I personally know people who spent hours debugging their software only to realize the use of that flag enabled an "optimization" that just gave wrong results for some real world inputs.

(It is extra bad because adding a printf can cause the bug to disappear)

KyleMoffettKNUQ
Автор

-Os for optimizing for size. Useful in niche applicatione

MechMK
Автор

Keep grinding mate. Want to see you succeed. You're really great creator

flightman
Автор

Today I learned compiler flags are a thing.

SameAsAnyOtherStranger
Автор

-O3 can make code run slower and make biger binary as gentoo user i prefer -O2 with full lto clang

I-use-Archbtw
Автор

Why bro sound like a medieval merchant tryna sell me some useful Compiler flags 🚩😭

Lovely video keep it up!

halladba
Автор

-Wextra with -Wall and -Werror for error galore

LeaoMartelo
Автор

Get, please create a tutorial on assembly language ❤

viddeshk
Автор

i had to remove werror from my makefile it was making me go crazy 💀

thereborne