The following options control compiler warning messages: --all-warnings This switch lacks documentation --extra-warnings This switch lacks documentation -W This switch is deprecated; use -Wextra instead -Wabi Warn about things that will change when compiling with an ABI-compliant compiler -Wabi-tag Warn if a subobject has an abi_tag attribute that the complete object type does not have -Wabi= Warn about things that change between the current -fabi-version and the specified version -Waddress Warn about suspicious uses of memory addresses -Waggregate-return Warn about returning structures, unions or arrays -Waggressive-loop-optimizations Warn if a loop with constant number of iterations triggers undefined behavior -Waliasing Warn about possible aliasing of dummy arguments -Walign-commons Warn about alignment of COMMON blocks -Wall Enable most warning messages -Wampersand Warn about missing ampersand in continued character constants -Warray-bounds Warn if an array is accessed out of bounds -Warray-bounds= Warn if an array is accessed out of bounds -Warray-temporaries Warn about creation of array temporaries -Wassign-intercept Warn whenever an Objective-C assignment is being intercepted by the garbage collector -Wattributes Warn about inappropriate attribute usage -Wbad-function-cast Warn about casting functions to incompatible types -Wbool-compare Warn about boolean expression compared with an integer value different from true/false -Wbuiltin-macro-redefined Warn when a built-in preprocessor macro is undefined or redefined -Wc++-compat Warn about C constructs that are not in the common subset of C and C++ -Wc++0x-compat Deprecated in favor of -Wc++11-compat -Wc++11-compat Warn about C++ constructs whose meaning differs between ISO C++ 1998 and ISO C++ 2011 -Wc++14-compat Warn about C++ constructs whose meaning differs between ISO C++ 2011 and ISO C++ 2014 -Wc-binding-type Warn if the type of a variable might be not interoperable with C -Wc90-c99-compat Warn about features not present in ISO C90, but present in ISO C99 -Wc99-c11-compat Warn about features not present in ISO C99, but present in ISO C11 -Wcast-align Warn about pointer casts which increase alignment -Wcast-qual Warn about casts which discard qualifiers -Wchar-subscripts Warn about subscripts whose type is "char" -Wcharacter-truncation Warn about truncated character expressions -Wchkp Warn about memory access errors found by Pointer Bounds Checker -Wclobbered Warn about variables that might be changed by "longjmp" or "vfork" -Wcomment Warn about possibly nested block comments, and C++ comments spanning more than one physical line -Wcomments Synonym for -Wcomment -Wcompare-reals Warn about equality comparisons involving REAL or COMPLEX expressions -Wconditionally-supported Warn for conditionally-supported constructs -Wconversion Warn for implicit type conversions that may change a value -Wconversion-extra Warn about most implicit conversions -Wconversion-null Warn for converting NULL from/to a non-pointer type -Wcoverage-mismatch Warn in case profiles in -fprofile-use do not match -Wcpp Warn when a #warning directive is encountered -Wctor-dtor-privacy Warn when all constructors and destructors are private -Wdate-time Warn about __TIME__, __DATE__ and __TIMESTAMP__ usage -Wdeclaration-after-statement Warn when a declaration is found after a statement -Wdelete-incomplete Warn when deleting a pointer to incomplete type -Wdelete-non-virtual-dtor Warn about deleting polymorphic objects with non- virtual destructors -Wdeprecated Warn if a deprecated compiler feature, class, method, or field is used -Wdeprecated-declarations Warn about uses of __attribute__((deprecated)) declarations -Wdesignated-init Warn about positional initialization of structs requiring designated initializers -Wdisabled-optimization Warn when an optimization pass is disabled -Wdiscarded-array-qualifiers Warn if qualifiers on arrays which are pointer targets are discarded -Wdiscarded-qualifiers Warn if type qualifiers on pointers are discarded -Wdiv-by-zero Warn about compile-time integer division by zero -Wdouble-promotion Warn about implicit conversions from "float" to "double" -Weffc++ Warn about violations of Effective C++ style rules -Wempty-body Warn about an empty body in an if or else statement -Wendif-labels Warn about stray tokens after #elif and #endif -Wenum-compare Warn about comparison of different enum types -Werror-implicit-function-declaration This switch is deprecated; use -Werror=implicit-function-declaration instead -Wextra Print extra (possibly unwanted) warnings -Wfloat-equal Warn if testing floating point numbers for equality -Wformat Warn about printf/scanf/strftime/strfmon format string anomalies -Wformat-contains-nul Warn about format strings that contain NUL bytes -Wformat-extra-args Warn if passing too many arguments to a function for its format string -Wformat-nonliteral Warn about format strings that are not literals -Wformat-security Warn about possible security problems with format functions -Wformat-signedness Warn about sign differences with format functions -Wformat-y2k Warn about strftime formats yielding 2-digit years -Wformat-zero-length Warn about zero-length formats -Wformat= Warn about printf/scanf/strftime/strfmon format string anomalies -Wfree-nonheap-object Warn when attempting to free a non-heap object -Wfunction-elimination Warn about function call elimination -Wignored-qualifiers Warn whenever type qualifiers are ignored. -Wimplicit Warn about implicit declarations -Wimplicit-function-declaration Warn about implicit function declarations -Wimplicit-int Warn when a declaration does not specify a type -Wimplicit-interface Warn about calls with implicit interface -Wimplicit-procedure Warn about called procedures not explicitly declared -Wincompatible-pointer-types Warn when there is a conversion between pointers that have incompatible types -Winherited-variadic-ctor Warn about C++11 inheriting constructors when the base has a variadic constructor -Winit-self Warn about variables which are initialized to themselves -Winline Warn when an inlined function cannot be inlined -Wint-conversion Warn about incompatible integer to pointer and pointer to integer conversions -Wint-to-pointer-cast Warn when there is a cast to a pointer from an integer of a different size -Wintrinsic-shadow Warn if a user-procedure has the same name as an intrinsic -Wintrinsics-std Warn on intrinsics not part of the selected standard -Winvalid-memory-model Warn when an atomic memory model parameter is known to be outside the valid range. -Winvalid-offsetof Warn about invalid uses of the "offsetof" macro -Winvalid-pch Warn about PCH files that are found but not used -Wjump-misses-init Warn when a jump misses a variable initialization -Wlarger-than- This switch lacks documentation -Wlarger-than= Warn if an object is larger than bytes -Wline-truncation Warn about truncated source lines -Wliteral-suffix Warn when a string or character literal is followed by a ud-suffix which does not begin with an underscore. -Wlogical-not-parentheses Warn when logical not is used on the left hand side operand of a comparison -Wlogical-op Warn when a logical operator is suspiciously always evaluating to true or false -Wlong-long Do not warn about using "long long" when -pedantic -Wmain Warn about suspicious declarations of "main" -Wmaybe-uninitialized Warn about maybe uninitialized automatic variables -Wmemset-transposed-args Warn about suspicious calls to memset where the third argument is constant literal zero and the second is not -Wmissing-braces Warn about possibly missing braces around initializers -Wmissing-declarations Warn about global functions without previous declarations -Wmissing-field-initializers Warn about missing fields in struct initializers -Wmissing-include-dirs Warn about user-specified include directories that do not exist -Wmissing-parameter-type Warn about function parameters declared without a type specifier in K&R-style functions -Wmissing-prototypes Warn about global functions without prototypes -Wmultichar Warn about use of multi-character character constants -Wnarrowing Warn about narrowing conversions within { } that are ill-formed in C++11 -Wnested-externs Warn about "extern" declarations not at file scope -Wnoexcept Warn when a noexcept expression evaluates to false even though the expression can't actually throw -Wnon-template-friend Warn when non-templatized friend functions are declared within a template -Wnon-virtual-dtor Warn about non-virtual destructors -Wnonnull Warn about NULL being passed to argument slots marked as requiring non-NULL -Wnormalized= Warn about non-normalised Unicode strings -Wodr Warn about some C++ One Definition Rule violations during link time optimization -Wold-style-cast Warn if a C-style cast is used in a program -Wold-style-declaration Warn for obsolescent usage in a declaration -Wold-style-definition Warn if an old-style parameter definition is used -Wopenmp-simd Warn if a simd directive is overridden by the vectorizer cost model -Woverflow Warn about overflow in arithmetic expressions -Woverlength-strings Warn if a string is longer than the maximum portable length specified by the standard -Woverloaded-virtual Warn about overloaded virtual function names -Woverride-init Warn about overriding initializers without side effects -Wpacked Warn when the packed attribute has no effect on struct layout -Wpacked-bitfield-compat Warn about packed bit-fields whose offset changed in GCC 4.4 -Wpadded Warn when padding is required to align structure members -Wparentheses Warn about possibly missing parentheses -Wpedantic Issue warnings needed for strict compliance to the standard -Wpmf-conversions Warn when converting the type of pointers to member functions -Wpointer-arith Warn about function pointer arithmetic -Wpointer-sign Warn when a pointer differs in signedness in an assignment -Wpointer-to-int-cast Warn when a pointer is cast to an integer of a different size -Wpragmas Warn about misuses of pragmas -Wproperty-assign-default Warn if a property for an Objective-C object has no assign semantics specified -Wprotocol Warn if inherited methods are unimplemented -Wreal-q-constant Warn about real-literal-constants with 'q' exponent-letter -Wrealloc-lhs Warn when a left-hand-side array variable is reallocated -Wrealloc-lhs-all Warn when a left-hand-side variable is reallocated -Wredundant-decls Warn about multiple declarations of the same object -Wreorder Warn when the compiler reorders code -Wreturn-local-addr Warn about returning a pointer/reference to a local or temporary variable. -Wreturn-type Warn whenever a function's return type defaults to "int" (C), or about inconsistent return types (C++) -Wselector Warn if a selector has multiple methods -Wsequence-point Warn about possible violations of sequence point rules -Wshadow Warn when one local variable shadows another -Wshadow-ivar Warn if a local declaration hides an instance variable -Wshift-count-negative Warn if shift count is negative -Wshift-count-overflow Warn if shift count >= width of type -Wsign-compare Warn about signed-unsigned comparisons -Wsign-promo Warn when overload promotes from unsigned to signed -Wsized-deallocation Warn about missing sized deallocation functions -Wsizeof-array-argument Warn when sizeof is applied on a parameter declared as an array -Wsizeof-pointer-memaccess Warn about suspicious length parameters to certain string functions if the argument uses sizeof -Wstack-protector Warn when not issuing stack smashing protection for some reason -Wstack-usage= Warn if stack usage might be larger than specified amount -Wstrict-aliasing Warn about code which might break strict aliasing rules -Wstrict-aliasing= Warn about code which might break strict aliasing rules -Wstrict-null-sentinel Warn about uncasted NULL used as sentinel -Wstrict-overflow Warn about optimizations that assume that signed overflow is undefined -Wstrict-overflow= Warn about optimizations that assume that signed overflow is undefined -Wstrict-prototypes Warn about unprototyped function declarations -Wstrict-selector-match Warn if type signatures of candidate methods do not match exactly -Wsuggest-attribute=const Warn about functions which might be candidates for __attribute__((const)) -Wsuggest-attribute=format Warn about functions which might be candidates for format attributes -Wsuggest-attribute=noreturn Warn about functions which might be candidates for __attribute__((noreturn)) -Wsuggest-attribute=pure Warn about functions which might be candidates for __attribute__((pure)) -Wsuggest-final-methods Warn about C++ virtual methods where adding final keyword would improve code quality -Wsuggest-final-types Warn about C++ polymorphic types where adding final keyword would improve code quality -Wsuggest-override Suggest that the override keyword be used when the declaration of a virtual function overrides another. -Wsurprising Warn about "suspicious" constructs -Wswitch Warn about enumerated switches, with no default, missing a case -Wswitch-bool Warn about switches with boolean controlling expression -Wswitch-default Warn about enumerated switches missing a "default:" statement -Wswitch-enum Warn about all enumerated switches missing a specific case -Wsync-nand Warn when __sync_fetch_and_nand and __sync_nand_and_fetch built-in functions are used -Wsynth Deprecated. This switch has no effect -Wsystem-headers Do not suppress warnings from system headers -Wtabs Permit nonconforming uses of the tab character -Wtarget-lifetime Warn if the pointer in a pointer assignment might outlive its target -Wtraditional Warn about features not present in traditional C -Wtraditional-conversion Warn of prototypes causing type conversions different from what would happen in the absence of prototype -Wtrampolines Warn whenever a trampoline is generated -Wtrigraphs Warn if trigraphs are encountered that might affect the meaning of the program -Wtype-limits Warn if a comparison is always true or always false due to the limited range of the data type -Wundeclared-selector Warn about @selector()s without previously declared methods -Wundef Warn if an undefined macro is used in an #if directive -Wunderflow Warn about underflow of numerical constant expressions -Wuninitialized Warn about uninitialized automatic variables -Wunknown-pragmas Warn about unrecognized pragmas -Wunsafe-loop-optimizations Warn if the loop cannot be optimized due to nontrivial assumptions. -Wunsuffixed-float-constants Warn about unsuffixed float constants -Wunused Enable all -Wunused- warnings -Wunused-but-set-parameter Warn when a function parameter is only set, otherwise unused -Wunused-but-set-variable Warn when a variable is only set, otherwise unused -Wunused-dummy-argument Warn about unused dummy arguments. -Wunused-function Warn when a function is unused -Wunused-label Warn when a label is unused -Wunused-local-typedefs Warn when typedefs locally defined in a function are not used -Wunused-macros Warn about macros defined in the main file that are not used -Wunused-parameter Warn when a function parameter is unused -Wunused-result Warn if a caller of a function, marked with attribute warn_unused_result, does not use its return value -Wunused-value Warn when an expression value is unused -Wunused-variable Warn when a variable is unused -Wuse-without-only Warn about USE statements that have no ONLY qualifier -Wuseless-cast Warn about useless casts -Wvarargs Warn about questionable usage of the macros used to retrieve variable arguments -Wvariadic-macros Warn about using variadic macros -Wvector-operation-performance Warn when a vector operation is compiled outside the SIMD -Wvirtual-move-assign Warn if a virtual base has a non-trivial move assignment operator -Wvla Warn if a variable length array is used -Wvolatile-register-var Warn when a register variable is declared volatile -Wwrite-strings In C++, nonzero means warn about deprecated conversion from string literals to 'char *'. In C, similar warning, except that the conversion is of course not deprecated by the ISO C standard. -Wzero-as-null-pointer-constant Warn when a literal '0' is used as null pointer -Wzerotrip Warn about zero-trip DO loops -frequire-return-statement Functions which return values must end with return statements