Wextra
Wextra is a compiler warning option available in GCC and Clang designed to enable a broader set of diagnostic messages than the basic -Wall warnings. It aims to help developers identify potential issues that might not be covered by -Wall.
Historically, -Wextra has been part of GCC's and Clang's warning controls to provide additional checks beyond
Typical usage is to compile with -Wall -Wextra, and often -Werror to treat warnings as errors. It
Wextra can surface warnings about unused parameters, suspicious type conversions, or inconsistent signedness in comparisons, as
Wextra is supported by both GCC and Clang and behaves predictably across them, though warning semantics vary
Related options include -Wall, -Wpedantic, -Wconversion, and -Werror.