r/ProgrammerHumor • • Sep 23 '19

Knowing how to code beforehand

Post image
7.6k Upvotes

264 comments sorted by

View all comments

134

u/gumol Sep 23 '19

-Wall or die

61

u/ASCIInerd73 Sep 23 '19

-Wall -Wextra -pedantic in my cs class right now. Because all warnings isn't enough, we need more.

45

u/divqii Sep 23 '19

That’s still not enough:

-Wall -Wextra -pedantic -Wcast-align -Wcast-qual -Wdisabled-optimizations -Winit-self -Wlogical-op -Wmissing-include-dirs -Wnoexcept -Wold-style-cast -Woverloaded-virtual -Wredundant-decls -Wshadow -Wsign-conversion -Wsign-promo -Wstrict-null-sentinel -Wstrict-overflow=5 -Wswitch-default -Wundef

30

u/fell_ratio Sep 23 '19

I'm about to end this man's whole career.

-Wall -Werror -Wpedantic -Wcast-align -Wcast-qual -Wdisabled-optimization -Winit-self -Wlogical-op -Wmissing-include-dirs -Wnoexcept -Woverloaded-virtual -Wredundant-decls -Wshadow -Wsign-conversion -Wsign-promo -Wstrict-null-sentinel -Wstrict-overflow=5 -Wundef -Wuninitialized -Wcomment -Wctor-dtor-privacy -Wold-style-cast -Wnull-dereference -Wformat=2 -Wduplicated-cond -Wswitch-default -Waddress -Wmemset-transposed-args -Wuseless-cast -Wzero-as-null-pointer-constant -Wmissing-declarations -Wunused-const-variable=1 -Wdispute-indulgences=95 -Weffc++ -Wsign-compare

20

u/divqii Sep 23 '19

Fair enough, though many of those are enabled by -Wall and -Wextra, and -Weffc++ has some issues.

If we’re talking about ending careers, though, then (using clang) it’s as easy as

-Weverything

8

u/BlueManedHawk Sep 23 '19

-Weverything -Werror

Perfect

4

u/Maplicant Sep 23 '19

On my phone right now, can someone post some sample warnings this monster might produce?

1

u/[deleted] Sep 24 '19

.bashrc

ALIAS Walias = ...

Thank fucking god