r/ProgrammerHumor • • Sep 23 '19

Knowing how to code beforehand

Post image
7.6k Upvotes

264 comments sorted by

View all comments

Show parent comments

81

u/OneTurnMore Sep 23 '19
-Wall -Werror 

Good luck

33

u/mozgotrah Sep 23 '19

Only true way

1

u/alexanderpas Sep 28 '19

-Weverything -Werror

Good luck.

8

u/ItsYaBoyChipsAhoy Sep 23 '19

What does Werror mean

17

u/nelusbelus Sep 23 '19

What does the W in -Wall stand for 🤔

12

u/ItsYaBoyChipsAhoy Sep 23 '19

It literally came to me 10 seconds after I posted the comment

12

u/LeCrushinator Sep 23 '19

-Wall enables all compiler warning flags (warn about all)

-Werror treats all warnings as errors. (warnings as errors)

1

u/nelusbelus Sep 24 '19

It wasn't really a question, it was an answer as a question

2

u/Cobayo Sep 23 '19

Warnings (all)

1

u/nelusbelus Sep 24 '19

Thanks sherlock 😋

11

u/Jannis234 Sep 23 '19

Tells the compiler to treat warnings like errors

1

u/Lyorek Sep 24 '19

This is how we have to compile code for my APT class this semester

-13

u/marcosdumay Sep 23 '19

Plaese, avoid using Werror. I don't want to dig into your code just because the compiler imprived. And the compiler developers don't need people complaining when they improve their software.

4

u/PyroLagus Sep 23 '19

You won't have to unless you're using a boatload of non-standard compiler extensions. I'm assuming we're talking about C and C++ here, and they're really slowly evolving languages. Something like Rust may be a bit more annoying with Werror, but it's still not that bad.

1

u/marcosdumay Sep 23 '19

Yeah, ok. All the times I had to change legacy stuff so it compiles I didn't have to. Thanks to inform me.

1

u/PyroLagus Sep 23 '19

Well, it's legacy stuff for a reason. That's less of a problem with Werror, and more with a problem with the code and who you got it from. If it's an actively maintained project with Werror enforced, there shouldn't be any legacy stuff causing problems in the first place.