Reputation: 381
What are these and what do they do?
I am using the terminal in Ubuntu to compile programs with this command:
g++ -Wall -W -Werror main.cpp -o exec
What is the explanation?
Upvotes: 25
Views: 36268
Reputation: 23422
-Wall
: enable a set of warning, but actually not all.-W
: enable extra warnings. It's advised to use -Wextra
instead which has the same meaning-Werror
: every warning is treated as an error.See GCC documentation: 3.8 Options to Request or Suppress Warnings
Upvotes: 49