Retro68/gcc/gcc/c-family/c.opt

2172 lines
66 KiB
Plaintext
Raw Normal View History

2012-03-27 23:13:14 +00:00
; Options for the C, ObjC, C++ and ObjC++ front ends.
2019-06-02 15:48:37 +00:00
; Copyright (C) 2003-2019 Free Software Foundation, Inc.
2012-03-27 23:13:14 +00:00
;
; This file is part of GCC.
;
; GCC is free software; you can redistribute it and/or modify it under
; the terms of the GNU General Public License as published by the Free
; Software Foundation; either version 3, or (at your option) any later
; version.
;
; GCC is distributed in the hope that it will be useful, but WITHOUT ANY
; WARRANTY; without even the implied warranty of MERCHANTABILITY or
; FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
; for more details.
;
; You should have received a copy of the GNU General Public License
; along with GCC; see the file COPYING3. If not see
; <http://www.gnu.org/licenses/>.
; See the GCC internals manual for a description of this file's format.
; Please try to keep this file in ASCII collating order.
Language
C
Language
ObjC
Language
C++
Language
ObjC++
-all-warnings
C ObjC C++ ObjC++ Warning Alias(Wall)
-ansi
C ObjC C++ ObjC++ Alias(ansi)
-assert
C ObjC C++ ObjC++ Separate Alias(A) MissingArgError(assertion missing after %qs)
-assert=
C ObjC C++ ObjC++ Joined Alias(A) MissingArgError(assertion missing after %qs)
-comments
C ObjC C++ ObjC++ Alias(C)
-comments-in-macros
C ObjC C++ ObjC++ Alias(CC)
-define-macro
C ObjC C++ ObjC++ Separate Alias(D) MissingArgError(macro name missing after %qs)
-define-macro=
C ObjC C++ ObjC++ Joined Alias(D) MissingArgError(macro name missing after %qs)
-dependencies
C ObjC C++ ObjC++ Alias(M)
-dump
C ObjC C++ ObjC++ Separate Alias(d)
-dump=
C ObjC C++ ObjC++ Joined Alias(d)
-imacros
C ObjC C++ ObjC++ Separate Alias(imacros) MissingArgError(missing filename after %qs)
-imacros=
C ObjC C++ ObjC++ Joined Alias(imacros) MissingArgError(missing filename after %qs)
-include
C ObjC C++ ObjC++ Separate Alias(include) MissingArgError(missing filename after %qs)
-include=
C ObjC C++ ObjC++ Joined Alias(include) MissingArgError(missing filename after %qs)
-include-barrier
C ObjC C++ ObjC++ Alias(I, -)
-include-directory
C ObjC C++ ObjC++ Separate Alias(I) MissingArgError(missing path after %qs)
-include-directory=
C ObjC C++ ObjC++ Joined Alias(I) MissingArgError(missing path after %qs)
-include-directory-after
C ObjC C++ ObjC++ Separate Alias(idirafter) MissingArgError(missing path after %qs)
-include-directory-after=
C ObjC C++ ObjC++ Joined Alias(idirafter) MissingArgError(missing path after %qs)
-include-prefix
C ObjC C++ ObjC++ Separate Alias(iprefix)
-include-prefix=
C ObjC C++ ObjC++ JoinedOrMissing Alias(iprefix)
-include-with-prefix
C ObjC C++ ObjC++ Separate Alias(iwithprefix)
-include-with-prefix=
C ObjC C++ ObjC++ JoinedOrMissing Alias(iwithprefix)
-include-with-prefix-after
C ObjC C++ ObjC++ Separate Alias(iwithprefix)
-include-with-prefix-after=
C ObjC C++ ObjC++ JoinedOrMissing Alias(iwithprefix)
-include-with-prefix-before
C ObjC C++ ObjC++ Separate Alias(iwithprefixbefore)
-include-with-prefix-before=
C ObjC C++ ObjC++ JoinedOrMissing Alias(iwithprefixbefore)
-no-integrated-cpp
Driver Alias(no-integrated-cpp)
-no-line-commands
C ObjC C++ ObjC++ Alias(P)
-no-standard-includes
C ObjC C++ ObjC++ Alias(nostdinc)
-no-warnings
C ObjC C++ ObjC++ Alias(w)
-output
C ObjC C++ ObjC++ Separate Alias(o)
-output=
C ObjC C++ ObjC++ Joined Alias(o)
-output-pch=
C ObjC C++ ObjC++ Joined Separate
-pedantic
C ObjC C++ ObjC++ Alias(pedantic)
-preprocess
C ObjC C++ ObjC++ Undocumented Alias(E)
-print-missing-file-dependencies
C ObjC C++ ObjC++ Alias(MG)
-trace-includes
C ObjC C++ ObjC++ Alias(H)
-traditional
Driver Alias(traditional)
-traditional-cpp
C ObjC C++ ObjC++ Alias(traditional-cpp)
-trigraphs
C ObjC C++ ObjC++ Alias(trigraphs)
-undefine-macro
C ObjC C++ ObjC++ Separate Alias(U) MissingArgError(macro name missing after %qs)
-undefine-macro=
C ObjC C++ ObjC++ Joined Alias(U) MissingArgError(macro name missing after %qs)
-user-dependencies
C ObjC C++ ObjC++ Alias(MM)
-verbose
Common C ObjC C++ ObjC++ Alias(v)
-write-dependencies
C ObjC C++ ObjC++ NoDriverArg Separate Alias(MD) MissingArgError(missing filename after %qs)
-write-user-dependencies
C ObjC C++ ObjC++ NoDriverArg Separate Alias(MMD) MissingArgError(missing filename after %qs)
A
C ObjC C++ ObjC++ Joined Separate MissingArgError(assertion missing after %qs)
2017-04-10 11:32:00 +00:00
-A<question>=<answer> Assert the <answer> to <question>. Putting '-' before <question> disables the <answer> to <question>.
2012-03-27 23:13:14 +00:00
C
C ObjC C++ ObjC++
2017-04-10 11:32:00 +00:00
Do not discard comments.
2012-03-27 23:13:14 +00:00
CC
C ObjC C++ ObjC++
2017-04-10 11:32:00 +00:00
Do not discard comments in macro expansions.
2012-03-27 23:13:14 +00:00
D
C ObjC C++ ObjC++ Joined Separate MissingArgError(macro name missing after %qs)
2017-04-10 11:32:00 +00:00
-D<macro>[=<val>] Define a <macro> with <val> as its value. If just <macro> is given, <val> is taken to be 1.
2012-03-27 23:13:14 +00:00
E
C ObjC C++ ObjC++ Undocumented Var(flag_preprocess_only)
F
Driver C ObjC C++ ObjC++ Joined Separate MissingArgError(missing path after %qs)
2017-04-10 11:32:00 +00:00
-F <dir> Add <dir> to the end of the main framework include path.
2012-03-27 23:13:14 +00:00
fgimple
C Var(flag_gimple) Init(0)
Enable parsing GIMPLE.
2012-03-27 23:13:14 +00:00
H
C ObjC C++ ObjC++
2017-04-10 11:32:00 +00:00
Print the name of header files as they are used.
2012-03-27 23:13:14 +00:00
I
C ObjC C++ ObjC++ Joined Separate MissingArgError(missing path after %qs)
2017-04-10 11:32:00 +00:00
-I <dir> Add <dir> to the end of the main include path.
2012-03-27 23:13:14 +00:00
M
C ObjC C++ ObjC++
2017-04-10 11:32:00 +00:00
Generate make dependencies.
2012-03-27 23:13:14 +00:00
MD
C ObjC C++ ObjC++ NoDriverArg Separate MissingArgError(missing filename after %qs)
2017-04-10 11:32:00 +00:00
Generate make dependencies and compile.
2012-03-27 23:13:14 +00:00
MF
C ObjC C++ ObjC++ Joined Separate MissingArgError(missing filename after %qs)
2017-04-10 11:32:00 +00:00
-MF <file> Write dependency output to the given file.
2012-03-27 23:13:14 +00:00
MG
C ObjC C++ ObjC++
2017-04-10 11:32:00 +00:00
Treat missing header files as generated files.
2012-03-27 23:13:14 +00:00
MM
C ObjC C++ ObjC++
2017-04-10 11:32:00 +00:00
Like -M but ignore system header files.
2012-03-27 23:13:14 +00:00
MMD
C ObjC C++ ObjC++ NoDriverArg Separate MissingArgError(missing filename after %qs)
2017-04-10 11:32:00 +00:00
Like -MD but ignore system header files.
2012-03-27 23:13:14 +00:00
MP
C ObjC C++ ObjC++
2017-04-10 11:32:00 +00:00
Generate phony targets for all headers.
2012-03-27 23:13:14 +00:00
MQ
C ObjC C++ ObjC++ Joined Separate MissingArgError(missing makefile target after %qs)
2017-04-10 11:32:00 +00:00
-MQ <target> Add a MAKE-quoted target.
2012-03-27 23:13:14 +00:00
MT
C ObjC C++ ObjC++ Joined Separate MissingArgError(missing makefile target after %qs)
2017-04-10 11:32:00 +00:00
-MT <target> Add an unquoted target.
2012-03-27 23:13:14 +00:00
P
C ObjC C++ ObjC++
2017-04-10 11:32:00 +00:00
Do not generate #line directives.
2012-03-27 23:13:14 +00:00
U
C ObjC C++ ObjC++ Joined Separate MissingArgError(macro name missing after %qs)
2017-04-10 11:32:00 +00:00
-U<macro> Undefine <macro>.
2012-03-27 23:13:14 +00:00
Wabi
C ObjC C++ ObjC++ LTO Var(warn_abi) Warning
2017-04-10 11:32:00 +00:00
Warn about things that will change when compiling with an ABI-compliant compiler.
2012-03-27 23:13:14 +00:00
2015-08-28 15:33:40 +00:00
Wabi=
C ObjC C++ ObjC++ LTO Joined RejectNegative UInteger Warning
2017-04-10 11:32:00 +00:00
Warn about things that change between the current -fabi-version and the specified version.
2015-08-28 15:33:40 +00:00
2014-09-21 17:33:12 +00:00
Wabi-tag
C++ ObjC++ Var(warn_abi_tag) Warning
2017-04-10 11:32:00 +00:00
Warn if a subobject has an abi_tag attribute that the complete object type does not have.
2014-09-21 17:33:12 +00:00
2012-03-27 23:13:14 +00:00
Wpsabi
2017-04-10 11:32:00 +00:00
C ObjC C++ ObjC++ LTO Var(warn_psabi) Init(1) Warning Undocumented LangEnabledBy(C ObjC C++ ObjC++,Wabi)
2012-03-27 23:13:14 +00:00
2019-06-02 15:48:37 +00:00
Wabsolute-value
C ObjC Var(warn_absolute_value) Warning EnabledBy(Wextra)
Warn on suspicious calls of standard functions computing absolute values.
2012-03-27 23:13:14 +00:00
Waddress
2014-09-21 17:33:12 +00:00
C ObjC C++ ObjC++ Var(warn_address) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall)
2017-04-10 11:32:00 +00:00
Warn about suspicious uses of memory addresses.
2012-03-27 23:13:14 +00:00
Enum
Name(warn_aligned_new_level) Type(int) UnknownError(argument %qs to %<-Waligned-new%> not recognized)
EnumValue
Enum(warn_aligned_new_level) String(none) Value(0)
EnumValue
Enum(warn_aligned_new_level) String(global) Value(1)
EnumValue
Enum(warn_aligned_new_level) String(all) Value(2)
Waligned-new
C++ ObjC++ Alias(Waligned-new=,global,none)
Warn about 'new' of type with extended alignment without -faligned-new.
Waligned-new=
C++ ObjC++ Var(warn_aligned_new) Enum(warn_aligned_new_level) Joined RejectNegative Warning LangEnabledBy(C++ ObjC++,Wall,1,0)
-Waligned-new=[none|global|all] Warn even if 'new' uses a class member allocation function.
2012-03-27 23:13:14 +00:00
Wall
C ObjC C++ ObjC++ Warning
2017-04-10 11:32:00 +00:00
Enable most warning messages.
2012-03-27 23:13:14 +00:00
Walloca
C ObjC C++ ObjC++ Var(warn_alloca) Warning
Warn on any use of alloca.
Walloc-size-larger-than=
2019-06-02 15:48:37 +00:00
C ObjC C++ LTO ObjC++ Var(warn_alloc_size_limit) Joined Host_Wide_Int ByteSize Warning Init(HOST_WIDE_INT_MAX)
-Walloc-size-larger-than=<bytes> Warn for calls to allocation functions that
attempt to allocate objects larger than the specified number of bytes.
2019-06-02 15:48:37 +00:00
Wno-alloc-size-larger-than
C ObjC C++ LTO ObjC++ Alias(Walloc-size-larger-than=,18446744073709551615EiB,none) Warning
-Wno-alloc-size-larger-than Disable Walloc-size-larger-than= warning. Equivalent to Walloc-size-larger-than=<SIZE_MAX> or larger.
Walloc-zero
C ObjC C++ ObjC++ Var(warn_alloc_zero) Warning
-Walloc-zero Warn for calls to allocation functions that specify zero bytes.
Walloca-larger-than=
2019-06-02 15:48:37 +00:00
C ObjC C++ LTO ObjC++ Var(warn_alloca_limit) Warning Joined Host_Wide_Int ByteSize Init(HOST_WIDE_INT_MAX)
-Walloca-larger-than=<number> Warn on unbounded uses of
alloca, and on bounded uses of alloca whose bound can be larger than
<number> bytes.
2019-06-02 15:48:37 +00:00
Wno-alloca-larger-than
C ObjC C++ LTO ObjC++ Alias(Walloca-larger-than=,18446744073709551615EiB,none) Warning
-Wno-alloca-larger-than Disable Walloca-larger-than= warning. Equivalent to Walloca-larger-than=<SIZE_MAX> or larger.
2014-09-21 17:33:12 +00:00
Warray-bounds
2019-06-02 15:48:37 +00:00
LangEnabledBy(C ObjC C++ LTO ObjC++)
2014-09-21 17:33:12 +00:00
; in common.opt
2015-08-28 15:33:40 +00:00
Warray-bounds=
2018-12-28 15:30:48 +00:00
LangEnabledBy(C ObjC C++ LTO ObjC++,Wall,1,0)
2015-08-28 15:33:40 +00:00
; in common.opt
2012-03-27 23:13:14 +00:00
Wassign-intercept
ObjC ObjC++ Var(warn_assign_intercept) Warning
2017-04-10 11:32:00 +00:00
Warn whenever an Objective-C assignment is being intercepted by the garbage collector.
2012-03-27 23:13:14 +00:00
Wbad-function-cast
C ObjC Var(warn_bad_function_cast) Warning
2017-04-10 11:32:00 +00:00
Warn about casting functions to incompatible types.
2012-03-27 23:13:14 +00:00
2015-08-28 15:33:40 +00:00
Wbool-compare
C ObjC C++ ObjC++ Var(warn_bool_compare) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall)
2017-04-10 11:32:00 +00:00
Warn about boolean expression compared with an integer value different from true/false.
Wbool-operation
C ObjC C++ ObjC++ Var(warn_bool_op) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall)
Warn about certain operations on boolean expressions.
2017-04-10 11:32:00 +00:00
Wframe-address
C ObjC C++ ObjC++ Var(warn_frame_address) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall)
Warn when __builtin_frame_address or __builtin_return_address is used unsafely.
2015-08-28 15:33:40 +00:00
Wbuiltin-declaration-mismatch
C ObjC C++ ObjC++ Var(warn_builtin_declaraion_mismatch) Init(1) Warning
Warn when a built-in function is declared with the wrong signature.
2012-03-27 23:13:14 +00:00
Wbuiltin-macro-redefined
2015-08-28 15:33:40 +00:00
C ObjC C++ ObjC++ CPP(warn_builtin_macro_redefined) CppReason(CPP_W_BUILTIN_MACRO_REDEFINED) Var(cpp_warn_builtin_macro_redefined) Init(1) Warning
2017-04-10 11:32:00 +00:00
Warn when a built-in preprocessor macro is undefined or redefined.
2012-03-27 23:13:14 +00:00
2019-06-02 15:48:37 +00:00
Wc11-c2x-compat
C ObjC Var(warn_c11_c2x_compat) Init(-1) Warning
Warn about features not present in ISO C11, but present in ISO C2X.
2015-08-28 15:33:40 +00:00
Wc90-c99-compat
C ObjC CPP(cpp_warn_c90_c99_compat) CppReason(CPP_W_C90_C99_COMPAT) Var(warn_c90_c99_compat) Init(-1) Warning
2017-04-10 11:32:00 +00:00
Warn about features not present in ISO C90, but present in ISO C99.
2015-08-28 15:33:40 +00:00
Wc99-c11-compat
C ObjC Var(warn_c99_c11_compat) Init(-1) Warning
2017-04-10 11:32:00 +00:00
Warn about features not present in ISO C99, but present in ISO C11.
2015-08-28 15:33:40 +00:00
2012-03-27 23:13:14 +00:00
Wc++-compat
2015-08-28 15:33:40 +00:00
C ObjC Var(warn_cxx_compat) CPP(warn_cxx_operator_names) CppReason(CPP_W_CXX_OPERATOR_NAMES) Init(0) Warning
2017-04-10 11:32:00 +00:00
Warn about C constructs that are not in the common subset of C and C++.
2012-03-27 23:13:14 +00:00
Wc++0x-compat
2017-04-10 11:32:00 +00:00
C++ ObjC++ Warning Alias(Wc++11-compat) Undocumented
2012-03-27 23:13:14 +00:00
Wc++11-compat
2017-04-10 11:32:00 +00:00
C++ ObjC++ Var(warn_cxx11_compat) Warning LangEnabledBy(C++ ObjC++,Wall) Init(0) CPP(cpp_warn_cxx11_compat) CppReason(CPP_W_CXX11_COMPAT)
Warn about C++ constructs whose meaning differs between ISO C++ 1998 and ISO C++ 2011.
2012-03-27 23:13:14 +00:00
2015-08-28 15:33:40 +00:00
Wc++14-compat
C++ ObjC++ Var(warn_cxx14_compat) Warning LangEnabledBy(C++ ObjC++,Wall)
2017-04-10 11:32:00 +00:00
Warn about C++ constructs whose meaning differs between ISO C++ 2011 and ISO C++ 2014.
2015-08-28 15:33:40 +00:00
Wc++1z-compat
2018-12-28 15:30:48 +00:00
C++ ObjC++ Warning Alias(Wc++17-compat) Undocumented
Wc++17-compat
2018-12-28 15:30:48 +00:00
C++ ObjC++ Var(warn_cxx17_compat) Warning LangEnabledBy(C++ ObjC++,Wall)
Warn about C++ constructs whose meaning differs between ISO C++ 2014 and ISO C++ 2017.
Wcast-function-type
C ObjC C++ ObjC++ Var(warn_cast_function_type) Warning EnabledBy(Wextra)
Warn about casts between incompatible function types.
2012-03-27 23:13:14 +00:00
Wcast-qual
C ObjC C++ ObjC++ Var(warn_cast_qual) Warning
2017-04-10 11:32:00 +00:00
Warn about casts which discard qualifiers.
2012-03-27 23:13:14 +00:00
2018-12-28 15:30:48 +00:00
Wcatch-value
C++ ObjC++ Warning Alias(Wcatch-value=, 1, 0)
Warn about catch handlers of non-reference type.
Wcatch-value=
C++ ObjC++ Var(warn_catch_value) Warning Joined RejectNegative UInteger LangEnabledBy(C++ ObjC++,Wall, 1, 0) IntegerRange(0, 3)
Warn about catch handlers of non-reference type.
2012-03-27 23:13:14 +00:00
Wchar-subscripts
2014-09-21 17:33:12 +00:00
C ObjC C++ ObjC++ Var(warn_char_subscripts) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall)
2017-04-10 11:32:00 +00:00
Warn about subscripts whose type is \"char\".
2012-03-27 23:13:14 +00:00
2015-08-28 15:33:40 +00:00
Wchkp
2019-06-02 15:48:37 +00:00
C ObjC C++ ObjC++ Warning Deprecated
Deprecated in GCC 9. This switch has no effect.
2015-08-28 15:33:40 +00:00
2012-03-27 23:13:14 +00:00
Wclobbered
2014-09-21 17:33:12 +00:00
C ObjC C++ ObjC++ Var(warn_clobbered) Warning EnabledBy(Wextra)
2017-04-10 11:32:00 +00:00
Warn about variables that might be changed by \"longjmp\" or \"vfork\".
2012-03-27 23:13:14 +00:00
Wcomment
2015-08-28 15:33:40 +00:00
C ObjC C++ ObjC++ CPP(warn_comments) CppReason(CPP_W_COMMENTS) Var(cpp_warn_comment) Init(0) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall)
2017-04-10 11:32:00 +00:00
Warn about possibly nested block comments, and C++ comments spanning more than one physical line.
2012-03-27 23:13:14 +00:00
Wcomments
C ObjC C++ ObjC++ Warning Alias(Wcomment)
2017-04-10 11:32:00 +00:00
Synonym for -Wcomment.
2012-03-27 23:13:14 +00:00
2014-09-21 17:33:12 +00:00
Wconditionally-supported
C++ ObjC++ Var(warn_conditionally_supported) Warning
2017-04-10 11:32:00 +00:00
Warn for conditionally-supported constructs.
2014-09-21 17:33:12 +00:00
2012-03-27 23:13:14 +00:00
Wconversion
C ObjC C++ ObjC++ Var(warn_conversion) Warning
2017-04-10 11:32:00 +00:00
Warn for implicit type conversions that may change a value.
2012-03-27 23:13:14 +00:00
Wconversion-null
C++ ObjC++ Var(warn_conversion_null) Init(1) Warning
2017-04-10 11:32:00 +00:00
Warn for converting NULL from/to a non-pointer type.
2012-03-27 23:13:14 +00:00
2015-08-28 15:33:40 +00:00
Wcpp
C ObjC C++ ObjC++ CppReason(CPP_W_WARNING_DIRECTIVE)
; Documented in common.opt
2012-03-27 23:13:14 +00:00
Wctor-dtor-privacy
C++ ObjC++ Var(warn_ctor_dtor_privacy) Warning
2017-04-10 11:32:00 +00:00
Warn when all constructors and destructors are private.
2012-03-27 23:13:14 +00:00
Wdangling-else
C ObjC C++ ObjC++ Var(warn_dangling_else) Warning LangEnabledBy(C ObjC C++ ObjC++,Wparentheses)
Warn about dangling else.
2015-08-28 15:33:40 +00:00
Wdate-time
C ObjC C++ ObjC++ CPP(warn_date_time) CppReason(CPP_W_DATE_TIME) Var(cpp_warn_date_time) Init(0) Warning
2017-04-10 11:32:00 +00:00
Warn about __TIME__, __DATE__ and __TIMESTAMP__ usage.
2015-08-28 15:33:40 +00:00
2012-03-27 23:13:14 +00:00
Wdeclaration-after-statement
2015-08-28 15:33:40 +00:00
C ObjC Var(warn_declaration_after_statement) Init(-1) Warning
2017-04-10 11:32:00 +00:00
Warn when a declaration is found after a statement.
2012-03-27 23:13:14 +00:00
2014-09-21 17:33:12 +00:00
Wdelete-incomplete
C++ ObjC++ Var(warn_delete_incomplete) Init(1) Warning
2017-04-10 11:32:00 +00:00
Warn when deleting a pointer to incomplete type.
2014-09-21 17:33:12 +00:00
2012-03-27 23:13:14 +00:00
Wdelete-non-virtual-dtor
2015-08-28 15:33:40 +00:00
C++ ObjC++ Var(warn_delnonvdtor) Warning LangEnabledBy(C++ ObjC++,Wall || Weffc++)
2017-04-10 11:32:00 +00:00
Warn about deleting polymorphic objects with non-virtual destructors.
2012-03-27 23:13:14 +00:00
Wdeprecated
2019-06-02 15:48:37 +00:00
C C++ ObjC ObjC++ CPP(cpp_warn_deprecated) CppReason(CPP_W_DEPRECATED)
; Documented in common.opt
Wdeprecated-copy
C++ ObjC++ Var(warn_deprecated_copy) Warning LangEnabledBy(C++ ObjC++, Wextra)
Mark implicitly-declared copy operations as deprecated if the class has a
user-provided copy operation.
Wdeprecated-copy-dtor
C++ ObjC++ Var(warn_deprecated_copy, 2) Warning
Mark implicitly-declared copy operations as deprecated if the class has a
user-provided copy operation or destructor.
2012-03-27 23:13:14 +00:00
2015-08-28 15:33:40 +00:00
Wdesignated-init
C ObjC Var(warn_designated_init) Init(1) Warning
2017-04-10 11:32:00 +00:00
Warn about positional initialization of structs requiring designated initializers.
2015-08-28 15:33:40 +00:00
Wdiscarded-array-qualifiers
C ObjC Var(warn_discarded_array_qualifiers) Init(1) Warning
2017-04-10 11:32:00 +00:00
Warn if qualifiers on arrays which are pointer targets are discarded.
2015-08-28 15:33:40 +00:00
Wdiscarded-qualifiers
C ObjC Var(warn_discarded_qualifiers) Init(1) Warning
2017-04-10 11:32:00 +00:00
Warn if type qualifiers on pointers are discarded.
2015-08-28 15:33:40 +00:00
2012-03-27 23:13:14 +00:00
Wdiv-by-zero
C ObjC C++ ObjC++ Var(warn_div_by_zero) Init(1) Warning
2017-04-10 11:32:00 +00:00
Warn about compile-time integer division by zero.
Wduplicated-branches
C ObjC C++ ObjC++ Var(warn_duplicated_branches) Init(0) Warning
Warn about duplicated branches in if-else statements.
2017-04-10 11:32:00 +00:00
Wduplicated-cond
C ObjC C++ ObjC++ Var(warn_duplicated_cond) Init(0) Warning
Warn about duplicated conditions in an if-else-if chain.
2012-03-27 23:13:14 +00:00
Weffc++
C++ ObjC++ Var(warn_ecpp) Warning
2017-04-10 11:32:00 +00:00
Warn about violations of Effective C++ style rules.
2012-03-27 23:13:14 +00:00
Wempty-body
2014-09-21 17:33:12 +00:00
C ObjC C++ ObjC++ Var(warn_empty_body) Warning EnabledBy(Wextra)
2017-04-10 11:32:00 +00:00
Warn about an empty body in an if or else statement.
2012-03-27 23:13:14 +00:00
Wendif-labels
2015-08-28 15:33:40 +00:00
C ObjC C++ ObjC++ CPP(warn_endif_labels) CppReason(CPP_W_ENDIF_LABELS) Var(cpp_warn_endif_labels) Init(1) Warning LangEnabledBy(C ObjC C++ ObjC++,Wpedantic)
Warn about stray tokens after #else and #endif.
2012-03-27 23:13:14 +00:00
Wenum-compare
2015-08-28 15:33:40 +00:00
C ObjC C++ ObjC++ Var(warn_enum_compare) Init(-1) Warning LangEnabledBy(C ObjC,Wall || Wc++-compat)
2017-04-10 11:32:00 +00:00
Warn about comparison of different enum types.
2012-03-27 23:13:14 +00:00
Werror
C ObjC C++ ObjC++
; Documented in common.opt
Werror-implicit-function-declaration
C ObjC RejectNegative Warning Alias(Werror=, implicit-function-declaration)
2017-04-10 11:32:00 +00:00
This switch is deprecated; use -Werror=implicit-function-declaration instead.
2012-03-27 23:13:14 +00:00
Wextra
C ObjC C++ ObjC++ Warning
; in common.opt
2018-12-28 15:30:48 +00:00
Wextra-semi
C++ ObjC++ Var(warn_extra_semi) Warning
Warn about semicolon after in-class function definition.
2014-09-21 17:33:12 +00:00
Wfloat-conversion
2017-04-10 11:32:00 +00:00
C ObjC C++ ObjC++ Var(warn_float_conversion) Warning LangEnabledBy(C ObjC C++ ObjC++,Wconversion)
Warn for implicit type conversions that cause loss of floating point precision.
2014-09-21 17:33:12 +00:00
2012-03-27 23:13:14 +00:00
Wfloat-equal
C ObjC C++ ObjC++ Var(warn_float_equal) Warning
2017-04-10 11:32:00 +00:00
Warn if testing floating point numbers for equality.
2012-03-27 23:13:14 +00:00
Wformat
2014-09-21 17:33:12 +00:00
C ObjC C++ ObjC++ Warning Alias(Wformat=, 1, 0)
2017-04-10 11:32:00 +00:00
Warn about printf/scanf/strftime/strfmon format string anomalies.
2012-03-27 23:13:14 +00:00
2014-09-21 17:33:12 +00:00
Wformat-contains-nul
C ObjC C++ ObjC++ Var(warn_format_contains_nul) Warning LangEnabledBy(C ObjC C++ ObjC++,Wformat=, warn_format >= 1, 0)
2017-04-10 11:32:00 +00:00
Warn about format strings that contain NUL bytes.
2014-09-21 17:33:12 +00:00
2012-03-27 23:13:14 +00:00
Wformat-extra-args
2014-09-21 17:33:12 +00:00
C ObjC C++ ObjC++ Var(warn_format_extra_args) Warning LangEnabledBy(C ObjC C++ ObjC++,Wformat=, warn_format >= 1, 0)
2017-04-10 11:32:00 +00:00
Warn if passing too many arguments to a function for its format string.
2012-03-27 23:13:14 +00:00
Wformat-nonliteral
2014-09-21 17:33:12 +00:00
C ObjC C++ ObjC++ Var(warn_format_nonliteral) Warning LangEnabledBy(C ObjC C++ ObjC++,Wformat=, warn_format >= 2, 0)
2017-04-10 11:32:00 +00:00
Warn about format strings that are not literals.
2012-03-27 23:13:14 +00:00
Wformat-overflow
2018-12-28 15:30:48 +00:00
C ObjC C++ LTO ObjC++ Warning Alias(Wformat-overflow=, 1, 0) IntegerRange(0, 2)
Warn about function calls with format strings that write past the end
of the destination region. Same as -Wformat-overflow=1.
2012-03-27 23:13:14 +00:00
Wformat-security
2014-09-21 17:33:12 +00:00
C ObjC C++ ObjC++ Var(warn_format_security) Warning LangEnabledBy(C ObjC C++ ObjC++,Wformat=, warn_format >= 2, 0)
2017-04-10 11:32:00 +00:00
Warn about possible security problems with format functions.
2012-03-27 23:13:14 +00:00
2015-08-28 15:33:40 +00:00
Wformat-signedness
C ObjC C++ ObjC++ Var(warn_format_signedness) Warning
2017-04-10 11:32:00 +00:00
Warn about sign differences with format functions.
2015-08-28 15:33:40 +00:00
Wformat-truncation
C ObjC C++ LTO ObjC++ Warning Alias(Wformat-truncation=, 1, 0)
Warn about calls to snprintf and similar functions that truncate output.
Same as -Wformat-truncation=1.
2012-03-27 23:13:14 +00:00
Wformat-y2k
2014-09-21 17:33:12 +00:00
C ObjC C++ ObjC++ Var(warn_format_y2k) Warning LangEnabledBy(C ObjC C++ ObjC++,Wformat=,warn_format >= 2, 0)
2017-04-10 11:32:00 +00:00
Warn about strftime formats yielding 2-digit years.
2012-03-27 23:13:14 +00:00
Wformat-zero-length
2014-09-21 17:33:12 +00:00
C ObjC C++ ObjC++ Var(warn_format_zero_length) Warning LangEnabledBy(C ObjC C++ ObjC++,Wformat=,warn_format >= 1, 0)
2017-04-10 11:32:00 +00:00
Warn about zero-length formats.
2012-03-27 23:13:14 +00:00
Wformat=
2018-12-28 15:30:48 +00:00
C ObjC C++ ObjC++ Joined RejectNegative UInteger Var(warn_format) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall, 1, 0) IntegerRange(0, 2)
2017-04-10 11:32:00 +00:00
Warn about printf/scanf/strftime/strfmon format string anomalies.
2012-03-27 23:13:14 +00:00
Wformat-overflow=
2018-12-28 15:30:48 +00:00
C ObjC C++ LTO ObjC++ Joined RejectNegative UInteger Var(warn_format_overflow) Warning LangEnabledBy(C ObjC C++ LTO ObjC++,Wformat=, warn_format >= 1, 0) IntegerRange(0, 2)
Warn about function calls with format strings that write past the end
of the destination region.
Wformat-truncation=
2018-12-28 15:30:48 +00:00
C ObjC C++ LTO ObjC++ Joined RejectNegative UInteger Var(warn_format_trunc) Warning LangEnabledBy(C ObjC C++ LTO ObjC++,Wformat=, warn_format >= 1, 0) IntegerRange(0, 2)
Warn about calls to snprintf and similar functions that truncate output.
2018-12-28 15:30:48 +00:00
Wif-not-aligned
C ObjC C++ ObjC++ Var(warn_if_not_aligned) Init(1) Warning
Warn when the field in a struct is not aligned.
2012-03-27 23:13:14 +00:00
Wignored-qualifiers
2014-09-21 17:33:12 +00:00
C C++ Var(warn_ignored_qualifiers) Warning EnabledBy(Wextra)
2012-03-27 23:13:14 +00:00
Warn whenever type qualifiers are ignored.
2017-04-10 11:32:00 +00:00
Wignored-attributes
C C++ Var(warn_ignored_attributes) Init(1) Warning
Warn whenever attributes are ignored.
2015-08-28 15:33:40 +00:00
Wincompatible-pointer-types
C ObjC Var(warn_incompatible_pointer_types) Init(1) Warning
2017-04-10 11:32:00 +00:00
Warn when there is a conversion between pointers that have incompatible types.
2015-08-28 15:33:40 +00:00
2019-06-02 15:48:37 +00:00
Waddress-of-packed-member
C ObjC C++ ObjC++ Var(warn_address_of_packed_member) Init(1) Warning
Warn when the address of packed member of struct or union is taken.
2012-03-27 23:13:14 +00:00
Winit-self
2014-09-21 17:33:12 +00:00
C ObjC C++ ObjC++ Var(warn_init_self) Warning LangEnabledBy(C++ ObjC++,Wall)
2017-04-10 11:32:00 +00:00
Warn about variables which are initialized to themselves.
2012-03-27 23:13:14 +00:00
2019-06-02 15:48:37 +00:00
Winit-list-lifetime
C++ ObjC++ Var(warn_init_list) Warning Init(1)
Warn about uses of std::initializer_list that can result in dangling pointers.
2012-03-27 23:13:14 +00:00
Wimplicit
2014-09-21 17:33:12 +00:00
C ObjC Var(warn_implicit) Warning LangEnabledBy(C ObjC,Wall)
2017-04-10 11:32:00 +00:00
Warn about implicit declarations.
2012-03-27 23:13:14 +00:00
Wimplicit-fallthrough=
LangEnabledBy(C ObjC C++ ObjC++,Wextra,3,0)
; in common.opt
2012-03-27 23:13:14 +00:00
Wdouble-promotion
C ObjC C++ ObjC++ Var(warn_double_promotion) Warning
2017-04-10 11:32:00 +00:00
Warn about implicit conversions from \"float\" to \"double\".
2012-03-27 23:13:14 +00:00
Wexpansion-to-defined
C ObjC C++ ObjC++ CPP(warn_expansion_to_defined) CppReason(CPP_W_EXPANSION_TO_DEFINED) Var(cpp_warn_expansion_to_defined) Init(0) Warning EnabledBy(Wextra || Wpedantic)
Warn if \"defined\" is used outside #if.
2012-03-27 23:13:14 +00:00
Wimplicit-function-declaration
2014-09-21 17:33:12 +00:00
C ObjC Var(warn_implicit_function_declaration) Init(-1) Warning LangEnabledBy(C ObjC,Wimplicit)
2017-04-10 11:32:00 +00:00
Warn about implicit function declarations.
2012-03-27 23:13:14 +00:00
Wimplicit-int
2015-08-28 15:33:40 +00:00
C ObjC Var(warn_implicit_int) Init(-1) Warning LangEnabledBy(C ObjC,Wimplicit)
2017-04-10 11:32:00 +00:00
Warn when a declaration does not specify a type.
2012-03-27 23:13:14 +00:00
Wimport
C ObjC C++ ObjC++ Undocumented Ignore
2014-09-21 17:33:12 +00:00
Winherited-variadic-ctor
C++ ObjC++ Var(warn_inh_var_ctor) Init(1) Warning
2017-04-10 11:32:00 +00:00
Warn about C++11 inheriting constructors when the base has a variadic constructor.
2014-09-21 17:33:12 +00:00
2015-08-28 15:33:40 +00:00
Wint-conversion
C ObjC Var(warn_int_conversion) Init(1) Warning
2017-04-10 11:32:00 +00:00
Warn about incompatible integer to pointer and pointer to integer conversions.
2015-08-28 15:33:40 +00:00
Wint-in-bool-context
C ObjC C++ ObjC++ Var(warn_int_in_bool_context) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall)
Warn for suspicious integer expressions in boolean context.
2012-03-27 23:13:14 +00:00
Wint-to-pointer-cast
C ObjC C++ ObjC++ Var(warn_int_to_pointer_cast) Init(1) Warning
2017-04-10 11:32:00 +00:00
Warn when there is a cast to a pointer from an integer of a different size.
2012-03-27 23:13:14 +00:00
Winvalid-offsetof
C++ ObjC++ Var(warn_invalid_offsetof) Init(1) Warning
2017-04-10 11:32:00 +00:00
Warn about invalid uses of the \"offsetof\" macro.
2012-03-27 23:13:14 +00:00
Winvalid-pch
2015-08-28 15:33:40 +00:00
C ObjC C++ ObjC++ CPP(warn_invalid_pch) CppReason(CPP_W_INVALID_PCH) Var(cpp_warn_invalid_pch) Init(0) Warning
2017-04-10 11:32:00 +00:00
Warn about PCH files that are found but not used.
2012-03-27 23:13:14 +00:00
Wjump-misses-init
2014-09-21 17:33:12 +00:00
C ObjC Var(warn_jump_misses_init) Warning LangEnabledby(C ObjC,Wc++-compat)
2017-04-10 11:32:00 +00:00
Warn when a jump misses a variable initialization.
2012-03-27 23:13:14 +00:00
2014-09-21 17:33:12 +00:00
Wliteral-suffix
2015-08-28 15:33:40 +00:00
C++ ObjC++ CPP(warn_literal_suffix) CppReason(CPP_W_LITERAL_SUFFIX) Var(cpp_warn_literal_suffix) Init(1) Warning
2014-09-21 17:33:12 +00:00
Warn when a string or character literal is followed by a ud-suffix which does not begin with an underscore.
2012-03-27 23:13:14 +00:00
Wlogical-op
2017-04-10 11:32:00 +00:00
C ObjC C++ ObjC++ Var(warn_logical_op) Init(0) Warning
Warn when a logical operator is suspiciously always evaluating to true or false.
2012-03-27 23:13:14 +00:00
2015-08-28 15:33:40 +00:00
Wlogical-not-parentheses
C ObjC C++ ObjC++ Var(warn_logical_not_paren) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall)
2017-04-10 11:32:00 +00:00
Warn when logical not is used on the left hand side operand of a comparison.
2015-08-28 15:33:40 +00:00
2012-03-27 23:13:14 +00:00
Wlong-long
2015-08-28 15:33:40 +00:00
C ObjC C++ ObjC++ CPP(cpp_warn_long_long) CppReason(CPP_W_LONG_LONG) Var(warn_long_long) Init(-1) Warning LangEnabledBy(C ObjC,Wc90-c99-compat)
2017-04-10 11:32:00 +00:00
Do not warn about using \"long long\" when -pedantic.
2012-03-27 23:13:14 +00:00
Wmain
2014-09-21 17:33:12 +00:00
C ObjC C++ ObjC++ Var(warn_main) Init(-1) Warning LangEnabledBy(C ObjC,Wall, 2, 0)
2017-04-10 11:32:00 +00:00
Warn about suspicious declarations of \"main\".
2012-03-27 23:13:14 +00:00
2014-09-21 17:33:12 +00:00
Wmain
LangEnabledBy(C ObjC C++ ObjC++,Wpedantic, 2, 0)
;
2015-08-28 15:33:40 +00:00
Wmemset-transposed-args
C ObjC C++ ObjC++ Var(warn_memset_transposed_args) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall)
2017-04-10 11:32:00 +00:00
Warn about suspicious calls to memset where the third argument is constant literal zero and the second is not.
Wmemset-elt-size
C ObjC C++ ObjC++ Var(warn_memset_elt_size) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall)
Warn about suspicious calls to memset where the third argument contains the number of elements not multiplied by the element size.
2017-04-10 11:32:00 +00:00
Wmisleading-indentation
C C++ Common Var(warn_misleading_indentation) Warning LangEnabledBy(C C++,Wall)
Warn when the indentation of the code does not reflect the block structure.
2015-08-28 15:33:40 +00:00
2012-03-27 23:13:14 +00:00
Wmissing-braces
2014-09-21 17:33:12 +00:00
C ObjC C++ ObjC++ Var(warn_missing_braces) Warning LangEnabledBy(C ObjC,Wall)
2017-04-10 11:32:00 +00:00
Warn about possibly missing braces around initializers.
2012-03-27 23:13:14 +00:00
Wmissing-declarations
C ObjC C++ ObjC++ Var(warn_missing_declarations) Warning
2017-04-10 11:32:00 +00:00
Warn about global functions without previous declarations.
2012-03-27 23:13:14 +00:00
Wmissing-field-initializers
2014-09-21 17:33:12 +00:00
C ObjC C++ ObjC++ Var(warn_missing_field_initializers) Warning EnabledBy(Wextra)
2017-04-10 11:32:00 +00:00
Warn about missing fields in struct initializers.
2018-12-28 15:30:48 +00:00
Wmultistatement-macros
C ObjC C++ ObjC++ Var(warn_multistatement_macros) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall)
Warn about unsafe macros expanding to multiple statements used as a body of a clause such as if, else, while, switch, or for.
2017-04-10 11:32:00 +00:00
Wmultiple-inheritance
C++ ObjC++ Var(warn_multiple_inheritance) Warning
Warn on direct multiple inheritance.
Wnamespaces
C++ ObjC++ Var(warn_namespaces) Warning
Warn on namespace definition.
2012-03-27 23:13:14 +00:00
2018-12-28 15:30:48 +00:00
Wpacked-not-aligned
C ObjC C++ ObjC++ Var(warn_packed_not_aligned) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall)
Warn when fields in a struct with the packed attribute are misaligned.
2015-08-28 15:33:40 +00:00
Wsized-deallocation
C++ ObjC++ Var(warn_sized_deallocation) Warning EnabledBy(Wextra)
2017-04-10 11:32:00 +00:00
Warn about missing sized deallocation functions.
2015-08-28 15:33:40 +00:00
2018-12-28 15:30:48 +00:00
Wsizeof-pointer-div
C ObjC C++ ObjC++ Var(warn_sizeof_pointer_div) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall)
Warn about suspicious divisions of two sizeof expressions that don't work correctly with pointers.
2014-09-21 17:33:12 +00:00
Wsizeof-pointer-memaccess
C ObjC C++ ObjC++ Var(warn_sizeof_pointer_memaccess) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall)
2017-04-10 11:32:00 +00:00
Warn about suspicious length parameters to certain string functions if the argument uses sizeof.
2015-08-28 15:33:40 +00:00
Wsizeof-array-argument
C ObjC C++ ObjC++ Var(warn_sizeof_array_argument) Warning Init(1)
2017-04-10 11:32:00 +00:00
Warn when sizeof is applied on a parameter declared as an array.
2014-09-21 17:33:12 +00:00
Wstringop-overflow
2018-12-28 15:30:48 +00:00
C ObjC C++ LTO ObjC++ Warning Alias(Wstringop-overflow=, 2, 0)
Warn about buffer overflow in string manipulation functions like memcpy
and strcpy.
Wstringop-overflow=
2018-12-28 15:30:48 +00:00
C ObjC C++ LTO ObjC++ Joined RejectNegative UInteger Var(warn_stringop_overflow) Init(2) Warning LangEnabledBy(C ObjC C++ LTO ObjC++, Wall, 2, 0) IntegerRange(0, 4)
Under the control of Object Size type, warn about buffer overflow in string
manipulation functions like memcpy and strcpy.
2018-12-28 15:30:48 +00:00
Wstringop-truncation
C ObjC C++ LTO ObjC++ Var(warn_stringop_truncation) Warning Init (1) LangEnabledBy(C ObjC C++ LTO ObjC++, Wall)
Warn about truncation in string manipulation functions like strncat and strncpy.
2014-09-21 17:33:12 +00:00
Wsuggest-attribute=format
C ObjC C++ ObjC++ Var(warn_suggest_attribute_format) Warning
2017-04-10 11:32:00 +00:00
Warn about functions which might be candidates for format attributes.
2012-03-27 23:13:14 +00:00
2015-08-28 15:33:40 +00:00
Wsuggest-override
C++ ObjC++ Var(warn_override) Warning
Suggest that the override keyword be used when the declaration of a virtual
function overrides another.
2014-09-21 17:33:12 +00:00
Wswitch
C ObjC C++ ObjC++ Var(warn_switch) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall)
2017-04-10 11:32:00 +00:00
Warn about enumerated switches, with no default, missing a case.
2014-09-21 17:33:12 +00:00
Wswitch-default
C ObjC C++ ObjC++ Var(warn_switch_default) Warning
2017-04-10 11:32:00 +00:00
Warn about enumerated switches missing a \"default:\" statement.
2014-09-21 17:33:12 +00:00
Wswitch-enum
C ObjC C++ ObjC++ Var(warn_switch_enum) Warning
2017-04-10 11:32:00 +00:00
Warn about all enumerated switches missing a specific case.
2014-09-21 17:33:12 +00:00
2015-08-28 15:33:40 +00:00
Wswitch-bool
C ObjC C++ ObjC++ Var(warn_switch_bool) Warning Init(1)
2017-04-10 11:32:00 +00:00
Warn about switches with boolean controlling expression.
Wtemplates
C++ ObjC++ Var(warn_templates) Warning
Warn on primary template declaration.
2015-08-28 15:33:40 +00:00
2018-12-28 15:30:48 +00:00
Wmissing-attributes
C ObjC C++ ObjC++ Var(warn_missing_attributes) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall)
Warn about declarations of entities that may be missing attributes
2019-06-02 15:48:37 +00:00
that related entities have been declared with.
2018-12-28 15:30:48 +00:00
2014-09-21 17:33:12 +00:00
Wmissing-format-attribute
2017-04-10 11:32:00 +00:00
C ObjC C++ ObjC++ Warning Alias(Wsuggest-attribute=format)
2014-09-21 17:33:12 +00:00
;
2012-03-27 23:13:14 +00:00
Wmissing-include-dirs
2015-08-28 15:33:40 +00:00
C ObjC C++ ObjC++ CPP(warn_missing_include_dirs) CppReason(CPP_W_MISSING_INCLUDE_DIRS) Var(cpp_warn_missing_include_dirs) Init(0) Warning
2017-04-10 11:32:00 +00:00
Warn about user-specified include directories that do not exist.
2012-03-27 23:13:14 +00:00
Wmissing-parameter-type
2014-09-21 17:33:12 +00:00
C ObjC Var(warn_missing_parameter_type) Warning EnabledBy(Wextra)
2017-04-10 11:32:00 +00:00
Warn about function parameters declared without a type specifier in K&R-style functions.
2012-03-27 23:13:14 +00:00
Wmissing-prototypes
C ObjC Var(warn_missing_prototypes) Warning
2017-04-10 11:32:00 +00:00
Warn about global functions without prototypes.
2012-03-27 23:13:14 +00:00
Wmudflap
2019-06-02 15:48:37 +00:00
C ObjC C++ ObjC++ Deprecated
2012-03-27 23:13:14 +00:00
Wmultichar
2015-08-28 15:33:40 +00:00
C ObjC C++ ObjC++ CPP(warn_multichar) CppReason(CPP_W_MULTICHAR) Var(cpp_warn_multichar) Init(0) Warning
2017-04-10 11:32:00 +00:00
Warn about use of multi-character character constants.
2012-03-27 23:13:14 +00:00
Wnarrowing
2017-04-10 11:32:00 +00:00
C ObjC C++ ObjC++ Warning Var(warn_narrowing) Init(-1) LangEnabledBy(C++ ObjC++,Wall || Wc++11-compat)
Warn about narrowing conversions within { } that are ill-formed in C++11.
2012-03-27 23:13:14 +00:00
Wnested-externs
C ObjC Var(warn_nested_externs) Warning
2017-04-10 11:32:00 +00:00
Warn about \"extern\" declarations not at file scope.
2012-03-27 23:13:14 +00:00
Wnoexcept
C++ ObjC++ Var(warn_noexcept) Warning
2017-04-10 11:32:00 +00:00
Warn when a noexcept expression evaluates to false even though the expression can't actually throw.
2012-03-27 23:13:14 +00:00
Wnoexcept-type
2018-12-28 15:30:48 +00:00
C++ ObjC++ Warning Var(warn_noexcept_type) LangEnabledBy(C++ ObjC++,Wabi || Wc++17-compat)
Warn if C++17 noexcept function type will change the mangled name of a symbol.
2012-03-27 23:13:14 +00:00
Wnon-template-friend
C++ ObjC++ Var(warn_nontemplate_friend) Init(1) Warning
2017-04-10 11:32:00 +00:00
Warn when non-templatized friend functions are declared within a template.
2012-03-27 23:13:14 +00:00
2019-06-02 15:48:37 +00:00
Wclass-conversion
C++ ObjC++ Var(warn_class_conversion) Init(1) Warning
Warn when a conversion function will never be called due to the type it converts to.
2018-12-28 15:30:48 +00:00
Wclass-memaccess
C++ ObjC++ Var(warn_class_memaccess) Warning LangEnabledBy(C++ ObjC++, Wall)
Warn for unsafe raw memory writes to objects of class types.
2012-03-27 23:13:14 +00:00
Wnon-virtual-dtor
2014-09-21 17:33:12 +00:00
C++ ObjC++ Var(warn_nonvdtor) Warning LangEnabledBy(C++ ObjC++,Weffc++)
2017-04-10 11:32:00 +00:00
Warn about non-virtual destructors.
2012-03-27 23:13:14 +00:00
Wnonnull
2018-12-28 15:30:48 +00:00
C ObjC C++ LTO ObjC++ Var(warn_nonnull) Warning LangEnabledBy(C ObjC C++ LTO ObjC++,Wformat=,warn_format >= 1,0)
2017-04-10 11:32:00 +00:00
Warn about NULL being passed to argument slots marked as requiring non-NULL.
2012-03-27 23:13:14 +00:00
2014-09-21 17:33:12 +00:00
Wnonnull
2018-12-28 15:30:48 +00:00
C ObjC C++ LTO ObjC++ LangEnabledBy(C ObjC C++ LTO ObjC++,Wall)
2014-09-21 17:33:12 +00:00
;
2017-04-10 11:32:00 +00:00
Wnonnull-compare
C ObjC C++ ObjC++ LangEnabledBy(C ObjC C++ ObjC++,Wall)
;
2015-08-28 15:33:40 +00:00
Wnormalized
2017-04-10 11:32:00 +00:00
C ObjC C++ ObjC++ Warning Alias(Wnormalized=,nfc,none)
2015-08-28 15:33:40 +00:00
;
2012-03-27 23:13:14 +00:00
Wnormalized=
2015-08-28 15:33:40 +00:00
C ObjC C++ ObjC++ RejectNegative Joined Warning CPP(warn_normalize) CppReason(CPP_W_NORMALIZE) Init(normalized_C) Var(cpp_warn_normalize) Enum(cpp_normalize_level)
-Wnormalized=[none|id|nfc|nfkc] Warn about non-normalized Unicode strings.
2015-08-28 15:33:40 +00:00
; Required for these enum values.
SourceInclude
cpplib.h
Enum
Name(cpp_normalize_level) Type(int) UnknownError(argument %qs to %<-Wnormalized%> not recognized)
EnumValue
Enum(cpp_normalize_level) String(none) Value(normalized_none)
EnumValue
Enum(cpp_normalize_level) String(nfkc) Value(normalized_KC)
EnumValue
Enum(cpp_normalize_level) String(id) Value(normalized_identifier_C)
EnumValue
Enum(cpp_normalize_level) String(nfc) Value(normalized_C)
2012-03-27 23:13:14 +00:00
Wold-style-cast
C++ ObjC++ Var(warn_old_style_cast) Warning
2017-04-10 11:32:00 +00:00
Warn if a C-style cast is used in a program.
2012-03-27 23:13:14 +00:00
Wold-style-declaration
2014-09-21 17:33:12 +00:00
C ObjC Var(warn_old_style_declaration) Warning EnabledBy(Wextra)
2017-04-10 11:32:00 +00:00
Warn for obsolescent usage in a declaration.
2012-03-27 23:13:14 +00:00
Wold-style-definition
C ObjC Var(warn_old_style_definition) Warning
2017-04-10 11:32:00 +00:00
Warn if an old-style parameter definition is used.
2012-03-27 23:13:14 +00:00
2014-09-21 17:33:12 +00:00
Wopenmp-simd
C C++ Var(warn_openmp_simd) Warning LangEnabledBy(C C++,Wall)
2017-04-10 11:32:00 +00:00
Warn if a simd directive is overridden by the vectorizer cost model.
2014-09-21 17:33:12 +00:00
2012-03-27 23:13:14 +00:00
Woverlength-strings
2014-09-21 17:33:12 +00:00
C ObjC C++ ObjC++ Var(warn_overlength_strings) Warning LangEnabledBy(C ObjC C++ ObjC++,Wpedantic)
2017-04-10 11:32:00 +00:00
Warn if a string is longer than the maximum portable length specified by the standard.
2012-03-27 23:13:14 +00:00
Woverloaded-virtual
C++ ObjC++ Var(warn_overloaded_virtual) Warning
2017-04-10 11:32:00 +00:00
Warn about overloaded virtual function names.
2012-03-27 23:13:14 +00:00
Woverride-init
2014-09-21 17:33:12 +00:00
C ObjC Var(warn_override_init) Warning EnabledBy(Wextra)
2017-04-10 11:32:00 +00:00
Warn about overriding initializers without side effects.
Woverride-init-side-effects
C ObjC Var(warn_override_init_side_effects) Init(1) Warning
Warn about overriding initializers with side effects.
2012-03-27 23:13:14 +00:00
Wpacked-bitfield-compat
C ObjC C++ ObjC++ Var(warn_packed_bitfield_compat) Init(-1) Warning
2017-04-10 11:32:00 +00:00
Warn about packed bit-fields whose offset changed in GCC 4.4.
2012-03-27 23:13:14 +00:00
Wparentheses
2014-09-21 17:33:12 +00:00
C ObjC C++ ObjC++ Var(warn_parentheses) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall)
2017-04-10 11:32:00 +00:00
Warn about possibly missing parentheses.
2012-03-27 23:13:14 +00:00
2014-09-21 17:33:12 +00:00
Wpedantic
2015-08-28 15:33:40 +00:00
C ObjC C++ ObjC++ CPP(cpp_pedantic) CppReason(CPP_W_PEDANTIC) Warning
2014-09-21 17:33:12 +00:00
; Documented in common.opt
2019-06-02 15:48:37 +00:00
Wpessimizing-move
C++ ObjC++ Var(warn_pessimizing_move) Warning LangEnabledBy(C++ ObjC++, Wall)
Warn about calling std::move on a local object in a return statement preventing copy elision.
2012-03-27 23:13:14 +00:00
Wpmf-conversions
C++ ObjC++ Var(warn_pmf2ptr) Init(1) Warning
2017-04-10 11:32:00 +00:00
Warn when converting the type of pointers to member functions.
2012-03-27 23:13:14 +00:00
Wpointer-arith
2014-09-21 17:33:12 +00:00
C ObjC C++ ObjC++ Var(warn_pointer_arith) Warning LangEnabledBy(C ObjC C++ ObjC++,Wpedantic)
2017-04-10 11:32:00 +00:00
Warn about function pointer arithmetic.
2012-03-27 23:13:14 +00:00
2014-09-21 17:33:12 +00:00
Wpointer-sign
2015-08-28 15:33:40 +00:00
C ObjC Var(warn_pointer_sign) Warning LangEnabledBy(C ObjC,Wall || Wpedantic)
2017-04-10 11:32:00 +00:00
Warn when a pointer differs in signedness in an assignment.
2014-09-21 17:33:12 +00:00
Wpointer-compare
C ObjC C++ ObjC++ Var(warn_pointer_compare) Init(1) Warning
Warn when a pointer is compared with a zero character constant.
2012-03-27 23:13:14 +00:00
Wpointer-to-int-cast
C ObjC Var(warn_pointer_to_int_cast) Init(1) Warning
2017-04-10 11:32:00 +00:00
Warn when a pointer is cast to an integer of a different size.
2012-03-27 23:13:14 +00:00
Wpragmas
C ObjC C++ ObjC++ Var(warn_pragmas) Init(1) Warning
2017-04-10 11:32:00 +00:00
Warn about misuses of pragmas.
2012-03-27 23:13:14 +00:00
2019-06-02 15:48:37 +00:00
Wprio-ctor-dtor
C ObjC C++ ObjC++ Var(warn_prio_ctor_dtor) Init(1) Warning
Warn if constructor or destructors with priorities from 0 to 100 are used.
2012-03-27 23:13:14 +00:00
Wproperty-assign-default
ObjC ObjC++ Var(warn_property_assign_default) Init(1) Warning
2017-04-10 11:32:00 +00:00
Warn if a property for an Objective-C object has no assign semantics specified.
2012-03-27 23:13:14 +00:00
Wprotocol
ObjC ObjC++ Var(warn_protocol) Init(1) Warning
2017-04-10 11:32:00 +00:00
Warn if inherited methods are unimplemented.
Wplacement-new
C++ Warning Alias(Wplacement-new=, 1, 0)
Warn for placement new expressions with undefined behavior.
Wplacement-new=
2018-12-28 15:30:48 +00:00
C++ Joined RejectNegative UInteger Var(warn_placement_new) Init(-1) Warning IntegerRange(0, 2)
2017-04-10 11:32:00 +00:00
Warn for placement new expressions with undefined behavior.
2012-03-27 23:13:14 +00:00
Wredundant-decls
C ObjC C++ ObjC++ Var(warn_redundant_decls) Warning
2017-04-10 11:32:00 +00:00
Warn about multiple declarations of the same object.
2012-03-27 23:13:14 +00:00
2019-06-02 15:48:37 +00:00
Wredundant-move
C++ ObjC++ Var(warn_redundant_move) Warning LangEnabledBy(C++ ObjC++,Wextra)
Warn about redundant calls to std::move.
Wregister
C++ ObjC++ Var(warn_register) Warning
Warn about uses of register storage specifier.
2012-03-27 23:13:14 +00:00
Wreorder
2014-09-21 17:33:12 +00:00
C++ ObjC++ Var(warn_reorder) Warning LangEnabledBy(C++ ObjC++,Wall)
2017-04-10 11:32:00 +00:00
Warn when the compiler reorders code.
2012-03-27 23:13:14 +00:00
Wreturn-type
2018-12-28 15:30:48 +00:00
C ObjC C++ ObjC++ Var(warn_return_type) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall) Init(-1)
2017-04-10 11:32:00 +00:00
Warn whenever a function's return type defaults to \"int\" (C), or about inconsistent return types (C++).
Wscalar-storage-order
C ObjC C++ ObjC++ Init(1) Warning
Warn on suspicious constructs involving reverse scalar storage order.
2012-03-27 23:13:14 +00:00
Wselector
ObjC ObjC++ Var(warn_selector) Warning
2017-04-10 11:32:00 +00:00
Warn if a selector has multiple methods.
2012-03-27 23:13:14 +00:00
Wsequence-point
2014-09-21 17:33:12 +00:00
C ObjC C++ ObjC++ Var(warn_sequence_point) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall)
2017-04-10 11:32:00 +00:00
Warn about possible violations of sequence point rules.
2012-03-27 23:13:14 +00:00
2015-08-28 15:33:40 +00:00
Wshadow-ivar
ObjC ObjC++ Var(warn_shadow_ivar) EnabledBy(Wshadow) Init(1) Warning
2017-04-10 11:32:00 +00:00
Warn if a local declaration hides an instance variable.
Wshift-overflow
C ObjC C++ ObjC++ Warning Alias(Wshift-overflow=, 1, 0)
Warn if left shift of a signed value overflows.
Wshift-overflow=
2018-12-28 15:30:48 +00:00
C ObjC C++ ObjC++ Joined RejectNegative UInteger Var(warn_shift_overflow) Init(-1) Warning IntegerRange(0, 2)
2017-04-10 11:32:00 +00:00
Warn if left shift of a signed value overflows.
2015-08-28 15:33:40 +00:00
Wshift-count-negative
C ObjC C++ ObjC++ Var(warn_shift_count_negative) Init(1) Warning
2017-04-10 11:32:00 +00:00
Warn if shift count is negative.
2015-08-28 15:33:40 +00:00
Wshift-count-overflow
C ObjC C++ ObjC++ Var(warn_shift_count_overflow) Init(1) Warning
2017-04-10 11:32:00 +00:00
Warn if shift count >= width of type.
Wshift-negative-value
C ObjC C++ ObjC++ Var(warn_shift_negative_value) Init(-1) Warning
Warn if left shifting a negative value.
2015-08-28 15:33:40 +00:00
2012-03-27 23:13:14 +00:00
Wsign-compare
2014-09-21 17:33:12 +00:00
C ObjC C++ ObjC++ Var(warn_sign_compare) Warning LangEnabledBy(C++ ObjC++,Wall)
2017-04-10 11:32:00 +00:00
Warn about signed-unsigned comparisons.
2012-03-27 23:13:14 +00:00
2014-09-21 17:33:12 +00:00
Wsign-compare
C ObjC C++ ObjC++ EnabledBy(Wextra)
;
Wsign-conversion
2017-04-10 11:32:00 +00:00
C ObjC C++ ObjC++ Var(warn_sign_conversion) Warning LangEnabledBy(C ObjC,Wconversion)
Warn for implicit type conversions between signed and unsigned integers.
2014-09-21 17:33:12 +00:00
2012-03-27 23:13:14 +00:00
Wsign-promo
C++ ObjC++ Var(warn_sign_promo) Warning
2017-04-10 11:32:00 +00:00
Warn when overload promotes from unsigned to signed.
2012-03-27 23:13:14 +00:00
Wstrict-null-sentinel
C++ ObjC++ Warning Var(warn_strict_null_sentinel)
2017-04-10 11:32:00 +00:00
Warn about uncasted NULL used as sentinel.
2012-03-27 23:13:14 +00:00
Wstrict-prototypes
C ObjC Var(warn_strict_prototypes) Warning
2017-04-10 11:32:00 +00:00
Warn about unprototyped function declarations.
2012-03-27 23:13:14 +00:00
2014-09-21 17:33:12 +00:00
Wstrict-aliasing=
2018-12-28 15:30:48 +00:00
C ObjC C++ ObjC++ LangEnabledBy(C ObjC C++ ObjC++,Wall, 3, 0) IntegerRange(0, 3)
2014-09-21 17:33:12 +00:00
;
Wstrict-overflow=
2018-12-28 15:30:48 +00:00
C ObjC C++ ObjC++ LangEnabledBy(C ObjC C++ ObjC++,Wall, 1, 0) IntegerRange(0, 5)
2014-09-21 17:33:12 +00:00
;
2012-03-27 23:13:14 +00:00
Wstrict-selector-match
ObjC ObjC++ Var(warn_strict_selector_match) Warning
2017-04-10 11:32:00 +00:00
Warn if type signatures of candidate methods do not match exactly.
2012-03-27 23:13:14 +00:00
Wsync-nand
C C++ Var(warn_sync_nand) Init(1) Warning
2017-04-10 11:32:00 +00:00
Warn when __sync_fetch_and_nand and __sync_nand_and_fetch built-in functions are used.
2012-03-27 23:13:14 +00:00
Wsynth
C++ ObjC++ Var(warn_synth) Warning
2017-04-10 11:32:00 +00:00
Deprecated. This switch has no effect.
2012-03-27 23:13:14 +00:00
Wsystem-headers
C ObjC C++ ObjC++ Warning
; Documented in common.opt
2017-04-10 11:32:00 +00:00
Wtautological-compare
C ObjC C++ ObjC++ Var(warn_tautological_compare) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall)
Warn if a comparison always evaluates to true or false.
Wterminate
C++ ObjC++ Warning Var(warn_terminate) Init(1)
Warn if a throw expression will always result in a call to terminate().
2012-03-27 23:13:14 +00:00
Wtraditional
2015-08-28 15:33:40 +00:00
C ObjC CPP(cpp_warn_traditional) CppReason(CPP_W_TRADITIONAL) Var(warn_traditional) Init(0) Warning
2017-04-10 11:32:00 +00:00
Warn about features not present in traditional C.
2012-03-27 23:13:14 +00:00
Wtraditional-conversion
C ObjC Var(warn_traditional_conversion) Warning
2017-04-10 11:32:00 +00:00
Warn of prototypes causing type conversions different from what would happen in the absence of prototype.
2012-03-27 23:13:14 +00:00
Wtrigraphs
2015-08-28 15:33:40 +00:00
C ObjC C++ ObjC++ CPP(warn_trigraphs) CppReason(CPP_W_TRIGRAPHS) Var(cpp_warn_trigraphs) Init(2) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall)
2017-04-10 11:32:00 +00:00
Warn if trigraphs are encountered that might affect the meaning of the program.
2012-03-27 23:13:14 +00:00
Wundeclared-selector
ObjC ObjC++ Var(warn_undeclared_selector) Warning
2017-04-10 11:32:00 +00:00
Warn about @selector()s without previously declared methods.
2012-03-27 23:13:14 +00:00
Wundef
2015-08-28 15:33:40 +00:00
C ObjC C++ ObjC++ CPP(warn_undef) CppReason(CPP_W_UNDEF) Var(cpp_warn_undef) Init(0) Warning
2017-04-10 11:32:00 +00:00
Warn if an undefined macro is used in an #if directive.
2012-03-27 23:13:14 +00:00
2014-09-21 17:33:12 +00:00
Wuninitialized
2018-12-28 15:30:48 +00:00
C ObjC C++ ObjC++ LTO LangEnabledBy(C ObjC C++ ObjC++ LTO,Wall)
2014-09-21 17:33:12 +00:00
;
Wmaybe-uninitialized
2018-12-28 15:30:48 +00:00
C ObjC C++ ObjC++ LTO LangEnabledBy(C ObjC C++ ObjC++ LTO,Wall)
2014-09-21 17:33:12 +00:00
;
2012-03-27 23:13:14 +00:00
Wunknown-pragmas
2014-09-21 17:33:12 +00:00
C ObjC C++ ObjC++ Warning Var(warn_unknown_pragmas) LangEnabledBy(C ObjC C++ ObjC++,Wall, 1, 0)
2017-04-10 11:32:00 +00:00
Warn about unrecognized pragmas.
2012-03-27 23:13:14 +00:00
Wunsuffixed-float-constants
C ObjC Var(warn_unsuffixed_float_constants) Warning
2017-04-10 11:32:00 +00:00
Warn about unsuffixed float constants.
2012-03-27 23:13:14 +00:00
2014-09-21 17:33:12 +00:00
Wunused
C ObjC C++ ObjC++ LangEnabledBy(C ObjC C++ ObjC++,Wall)
; documented in common.opt
2012-03-27 23:13:14 +00:00
Wunused-local-typedefs
2014-09-21 17:33:12 +00:00
C ObjC C++ ObjC++ Var(warn_unused_local_typedefs) Warning EnabledBy(Wunused)
2017-04-10 11:32:00 +00:00
Warn when typedefs locally defined in a function are not used.
2012-03-27 23:13:14 +00:00
Wunused-macros
2015-08-28 15:33:40 +00:00
C ObjC C++ ObjC++ CppReason(CPP_W_UNUSED_MACROS) Var(cpp_warn_unused_macros) Warning
2017-04-10 11:32:00 +00:00
Warn about macros defined in the main file that are not used.
2012-03-27 23:13:14 +00:00
Wunused-result
C ObjC C++ ObjC++ Var(warn_unused_result) Init(1) Warning
2017-04-10 11:32:00 +00:00
Warn if a caller of a function, marked with attribute warn_unused_result, does not use its return value.
Wunused-variable
C ObjC C++ ObjC++ LangEnabledBy(C ObjC C++ ObjC++,Wunused)
; documented in common.opt
Wunused-const-variable
C ObjC C++ ObjC++ Warning Alias(Wunused-const-variable=, 2, 0)
Warn when a const variable is unused.
Wunused-const-variable=
2018-12-28 15:30:48 +00:00
C ObjC C++ ObjC++ Joined RejectNegative UInteger Var(warn_unused_const_variable) Warning LangEnabledBy(C ObjC,Wunused-variable, 1, 0) IntegerRange(0, 2)
2017-04-10 11:32:00 +00:00
Warn when a const variable is unused.
2012-03-27 23:13:14 +00:00
Wvariadic-macros
2015-08-28 15:33:40 +00:00
C ObjC C++ ObjC++ CPP(warn_variadic_macros) CppReason(CPP_W_VARIADIC_MACROS) Var(cpp_warn_variadic_macros) Init(0) Warning LangEnabledBy(C ObjC C++ ObjC++,Wpedantic || Wtraditional)
2017-04-10 11:32:00 +00:00
Warn about using variadic macros.
2014-09-21 17:33:12 +00:00
Wvarargs
C ObjC C++ ObjC++ Warning Var(warn_varargs) Init(1)
2017-04-10 11:32:00 +00:00
Warn about questionable usage of the macros used to retrieve variable arguments.
2012-03-27 23:13:14 +00:00
Wvla
C ObjC C++ ObjC++ Var(warn_vla) Init(-1) Warning
2017-04-10 11:32:00 +00:00
Warn if a variable length array is used.
2012-03-27 23:13:14 +00:00
Wvla-larger-than=
2019-06-02 15:48:37 +00:00
C ObjC C++ LTO ObjC++ Var(warn_vla_limit) Warning Joined Host_Wide_Int ByteSize Init(HOST_WIDE_INT_MAX)
-Wvla-larger-than=<number> Warn on unbounded uses of variable-length
arrays, and on bounded uses of variable-length arrays whose bound can be
larger than <number> bytes.
2019-06-02 15:48:37 +00:00
<number> bytes.
Wno-vla-larger-than
C ObjC C++ LTO ObjC++ Alias(Wvla-larger-than=,18446744073709551615EiB,none) Warning
-Wno-vla-larger-than Disable Wvla-larger-than= warning. Equivalent to Wvla-larger-than=<SIZE_MAX> or larger.
2012-03-27 23:13:14 +00:00
Wvolatile-register-var
2014-09-21 17:33:12 +00:00
C ObjC C++ ObjC++ Var(warn_volatile_register_var) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall)
2017-04-10 11:32:00 +00:00
Warn when a register variable is declared volatile.
Wvirtual-inheritance
C++ ObjC++ Var(warn_virtual_inheritance) Warning
Warn on direct virtual inheritance.
2012-03-27 23:13:14 +00:00
2014-09-21 17:33:12 +00:00
Wvirtual-move-assign
C++ ObjC++ Var(warn_virtual_move_assign) Warning Init(1)
2017-04-10 11:32:00 +00:00
Warn if a virtual base has a non-trivial move assignment operator.
2014-09-21 17:33:12 +00:00
2012-03-27 23:13:14 +00:00
Wwrite-strings
C ObjC C++ ObjC++ Var(warn_write_strings) Warning
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
C++ ObjC++ Var(warn_zero_as_null_pointer_constant) Warning
2017-04-10 11:32:00 +00:00
Warn when a literal '0' is used as null pointer.
2012-03-27 23:13:14 +00:00
2014-09-21 17:33:12 +00:00
Wuseless-cast
C++ ObjC++ Var(warn_useless_cast) Warning
2017-04-10 11:32:00 +00:00
Warn about useless casts.
Wsubobject-linkage
C++ ObjC++ Var(warn_subobject_linkage) Warning Init(1)
Warn if a class type has a base or a field whose type uses the anonymous namespace or depends on a type with no linkage.
2014-09-21 17:33:12 +00:00
Wduplicate-decl-specifier
C ObjC Var(warn_duplicate_decl_specifier) Warning LangEnabledBy(C ObjC,Wall)
Warn when a declaration has duplicate const, volatile, restrict or _Atomic specifier.
Wrestrict
2018-12-28 15:30:48 +00:00
C ObjC C++ ObjC++ Var(warn_restrict) Warning LangEnabledBy(C ObjC C++ ObjC++, Wall)
Warn when an argument passed to a restrict-qualified parameter aliases with
another argument.
2012-03-27 23:13:14 +00:00
ansi
C ObjC C++ ObjC++
2017-04-10 11:32:00 +00:00
A synonym for -std=c89 (for C) or -std=c++98 (for C++).
2012-03-27 23:13:14 +00:00
d
C ObjC C++ ObjC++ Joined
; Documented in common.opt. FIXME - what about -dI, -dD, -dN and -dD?
2015-08-28 15:33:40 +00:00
fabi-compat-version=
C++ ObjC++ Joined RejectNegative UInteger Var(flag_abi_compat_version) Init(-1)
2017-04-10 11:32:00 +00:00
The version of the C++ ABI used for -Wabi warnings and link compatibility aliases.
2015-08-28 15:33:40 +00:00
fmetrowerks-abi
C++ ObjC++ Var(flag_metrowerks_abi)
2012-03-27 23:13:14 +00:00
faccess-control
C++ ObjC++ Var(flag_access_control) Init(1)
2017-04-10 11:32:00 +00:00
Enforce class member access control semantics.
2012-03-27 23:13:14 +00:00
2014-09-21 17:33:12 +00:00
fada-spec-parent=
C ObjC C++ ObjC++ RejectNegative Joined Var(ada_specs_parent)
2017-04-10 11:32:00 +00:00
-fada-spec-parent=unit Dump Ada specs as child units of given parent.
2014-09-21 17:33:12 +00:00
faligned-new
C++ ObjC++ Alias(faligned-new=,1,0)
Support C++17 allocation of over-aligned types.
faligned-new=
C++ ObjC++ Joined RejectNegative Var(aligned_new_threshold) UInteger Init(-1)
-faligned-new=<N> Use C++17 over-aligned type allocation for alignments greater than N.
2012-03-27 23:13:14 +00:00
fall-virtual
2019-06-02 15:48:37 +00:00
C++ ObjC++ Deprecated
2012-03-27 23:13:14 +00:00
fallow-parameterless-variadic-functions
C ObjC Var(flag_allow_parameterless_variadic_functions)
2017-04-10 11:32:00 +00:00
Allow variadic functions without named parameter.
2012-03-27 23:13:14 +00:00
falt-external-templates
2019-06-02 15:48:37 +00:00
C++ ObjC++ Deprecated
2017-04-10 11:32:00 +00:00
No longer supported.
2012-03-27 23:13:14 +00:00
fasm
C ObjC C++ ObjC++ Var(flag_no_asm, 0)
2017-04-10 11:32:00 +00:00
Recognize the \"asm\" keyword.
2012-03-27 23:13:14 +00:00
; Define extra predefined macros for use in libgcc.
fbuilding-libgcc
C ObjC C++ ObjC++ Undocumented Var(flag_building_libgcc)
fbuiltin
C ObjC C++ ObjC++ Var(flag_no_builtin, 0)
2017-04-10 11:32:00 +00:00
Recognize built-in functions.
2012-03-27 23:13:14 +00:00
fbuiltin-
C ObjC C++ ObjC++ Joined
2014-09-21 17:33:12 +00:00
fcanonical-system-headers
C ObjC C++ ObjC++
Where shorter, use canonicalized paths to systems headers.
2019-06-02 15:48:37 +00:00
fchar8_t
C++ ObjC++ Var(flag_char8_t) Init(-1)
Enable the char8_t fundamental type and use it as the type for UTF-8 string
and character literals.
2015-08-28 15:33:40 +00:00
fcheck-pointer-bounds
2019-06-02 15:48:37 +00:00
C ObjC C++ ObjC++ LTO Deprecated
Deprecated in GCC 9. This switch has no effect.
2015-08-28 15:33:40 +00:00
fchkp-check-incomplete-type
2019-06-02 15:48:37 +00:00
C ObjC C++ ObjC++ LTO Deprecated
Deprecated in GCC 9. This switch has no effect.
2015-08-28 15:33:40 +00:00
fchkp-zero-input-bounds-for-main
2019-06-02 15:48:37 +00:00
C ObjC C++ ObjC++ LTO Deprecated
Deprecated in GCC 9. This switch has no effect.
2015-08-28 15:33:40 +00:00
fchkp-first-field-has-own-bounds
2019-06-02 15:48:37 +00:00
C ObjC C++ ObjC++ LTO Deprecated RejectNegative
Deprecated in GCC 9. This switch has no effect.
2015-08-28 15:33:40 +00:00
fchkp-narrow-bounds
2019-06-02 15:48:37 +00:00
C ObjC C++ ObjC++ LTO Deprecated
Deprecated in GCC 9. This switch has no effect.
2015-08-28 15:33:40 +00:00
fchkp-narrow-to-innermost-array
2019-06-02 15:48:37 +00:00
C ObjC C++ ObjC++ LTO Deprecated RejectNegative
Deprecated in GCC 9. This switch has no effect.
fchkp-flexible-struct-trailing-arrays
2019-06-02 15:48:37 +00:00
C ObjC C++ ObjC++ LTO Deprecated
Deprecated in GCC 9. This switch has no effect.
2015-08-28 15:33:40 +00:00
fchkp-optimize
2019-06-02 15:48:37 +00:00
C ObjC C++ ObjC++ LTO Deprecated
2015-08-28 15:33:40 +00:00
fchkp-use-fast-string-functions
2019-06-02 15:48:37 +00:00
C ObjC C++ ObjC++ LTO Deprecated
Deprecated in GCC 9. This switch has no effect.
2015-08-28 15:33:40 +00:00
fchkp-use-nochk-string-functions
2019-06-02 15:48:37 +00:00
C ObjC C++ ObjC++ LTO Deprecated
Deprecated in GCC 9. This switch has no effect.
2015-08-28 15:33:40 +00:00
fchkp-use-static-bounds
2019-06-02 15:48:37 +00:00
C ObjC C++ ObjC++ LTO Deprecated
Deprecated in GCC 9. This switch has no effect.
2015-08-28 15:33:40 +00:00
fchkp-use-static-const-bounds
2019-06-02 15:48:37 +00:00
C ObjC C++ ObjC++ LTO Deprecated
Deprecated in GCC 9. This switch has no effect.
2015-08-28 15:33:40 +00:00
fchkp-treat-zero-dynamic-size-as-infinite
2019-06-02 15:48:37 +00:00
C ObjC C++ ObjC++ LTO Deprecated
Deprecated in GCC 9. This switch has no effect.
2015-08-28 15:33:40 +00:00
fchkp-check-read
2019-06-02 15:48:37 +00:00
C ObjC C++ ObjC++ LTO Deprecated
Deprecated in GCC 9. This switch has no effect.
2015-08-28 15:33:40 +00:00
fchkp-check-write
2019-06-02 15:48:37 +00:00
C ObjC C++ ObjC++ LTO Deprecated
Deprecated in GCC 9. This switch has no effect.
2015-08-28 15:33:40 +00:00
fchkp-store-bounds
2019-06-02 15:48:37 +00:00
C ObjC C++ ObjC++ LTO Deprecated
Deprecated in GCC 9. This switch has no effect.
2015-08-28 15:33:40 +00:00
fchkp-instrument-calls
2019-06-02 15:48:37 +00:00
C ObjC C++ ObjC++ LTO Deprecated
Deprecated in GCC 9. This switch has no effect.
2015-08-28 15:33:40 +00:00
fchkp-instrument-marked-only
2019-06-02 15:48:37 +00:00
C ObjC C++ ObjC++ LTO Deprecated
Deprecated in GCC 9. This switch has no effect.
2015-08-28 15:33:40 +00:00
fchkp-use-wrappers
2019-06-02 15:48:37 +00:00
C ObjC C++ ObjC++ LTO Deprecated
Deprecated in GCC 9. This switch has no effect.
2015-08-28 15:33:40 +00:00
static-libmpx
2019-06-02 15:48:37 +00:00
Driver Deprecated
Deprecated in GCC 9. This switch has no effect.
2015-08-28 15:33:40 +00:00
static-libmpxwrappers
2019-06-02 15:48:37 +00:00
Driver Deprecated
Deprecated in GCC 9. This switch has no effect.
2015-08-28 15:33:40 +00:00
2019-06-02 15:48:37 +00:00
fcilkplus
C ObjC C++ ObjC++ LTO Undocumented Ignore
2018-12-28 15:30:48 +00:00
Deprecated in GCC 8. This switch has no effect.
2017-04-10 11:32:00 +00:00
fconcepts
C++ ObjC++ Var(flag_concepts)
Enable support for C++ concepts.
2012-03-27 23:13:14 +00:00
fcond-mismatch
C ObjC C++ ObjC++
2017-04-10 11:32:00 +00:00
Allow the arguments of the '?' operator to have different types.
2012-03-27 23:13:14 +00:00
fconserve-space
2019-06-02 15:48:37 +00:00
C++ ObjC++ Ignore
2014-09-21 17:33:12 +00:00
Does nothing. Preserved for backward compatibility.
2012-03-27 23:13:14 +00:00
fconstant-string-class=
ObjC ObjC++ Joined MissingArgError(no class name specified with %qs)
2017-04-10 11:32:00 +00:00
-fconst-string-class=<name> Use class <name> for constant strings.
2012-03-27 23:13:14 +00:00
fconstexpr-depth=
C++ ObjC++ Joined RejectNegative UInteger Var(max_constexpr_depth) Init(512)
2017-04-10 11:32:00 +00:00
-fconstexpr-depth=<number> Specify maximum constexpr recursion depth.
2012-03-27 23:13:14 +00:00
fconstexpr-loop-limit=
C++ ObjC++ Joined RejectNegative UInteger Var(constexpr_loop_limit) Init(262144)
-fconstexpr-loop-limit=<number> Specify maximum constexpr loop iteration count.
2019-06-02 15:48:37 +00:00
fconstexpr-ops-limit=
C++ ObjC++ Joined RejectNegative Host_Wide_Int Var(constexpr_ops_limit) Init(33554432)
-fconstexpr-ops-limit=<number> Specify maximum number of constexpr operations during a single constexpr evaluation.
2012-03-27 23:13:14 +00:00
fdebug-cpp
C ObjC C++ ObjC++
2017-04-10 11:32:00 +00:00
Emit debug annotations during preprocessing.
2012-03-27 23:13:14 +00:00
fdeduce-init-list
C++ ObjC++ Var(flag_deduce_init_list) Init(0)
2017-04-10 11:32:00 +00:00
-fdeduce-init-list enable deduction of std::initializer_list for a template type parameter from a brace-enclosed initializer-list.
2012-03-27 23:13:14 +00:00
2014-09-21 17:33:12 +00:00
fdeclone-ctor-dtor
C++ ObjC++ Var(flag_declone_ctor_dtor) Init(-1)
2017-04-10 11:32:00 +00:00
Factor complex constructors and destructors to favor space over speed.
2014-09-21 17:33:12 +00:00
2012-03-27 23:13:14 +00:00
fdefault-inline
C++ ObjC++ Ignore
Does nothing. Preserved for backward compatibility.
2018-12-28 15:30:48 +00:00
fdiagnostics-show-template-tree
C++ ObjC++ Var(flag_diagnostics_show_template_tree) Init(0)
Print hierarchical comparisons when template types are mismatched.
2012-03-27 23:13:14 +00:00
fdirectives-only
C ObjC C++ ObjC++
Preprocess directives only.
fdollars-in-identifiers
C ObjC C++ ObjC++
2017-04-10 11:32:00 +00:00
Permit '$' as an identifier character.
2012-03-27 23:13:14 +00:00
2018-12-28 15:30:48 +00:00
fmacro-prefix-map=
C ObjC C++ ObjC++ Joined RejectNegative
-fmacro-prefix-map=<old>=<new> Map one directory name to another in __FILE__, __BASE_FILE__, and __builtin_FILE().
2014-09-21 17:33:12 +00:00
fdump-ada-spec
C ObjC C++ ObjC++ RejectNegative Var(flag_dump_ada_spec)
2017-04-10 11:32:00 +00:00
Write all declarations as Ada code transitively.
2014-09-21 17:33:12 +00:00
fdump-ada-spec-slim
C ObjC C++ ObjC++ RejectNegative Var(flag_dump_ada_spec_slim)
2017-04-10 11:32:00 +00:00
Write all declarations as Ada code for the given file only.
2014-09-21 17:33:12 +00:00
2012-03-27 23:13:14 +00:00
felide-constructors
C++ ObjC++ Var(flag_elide_constructors) Init(1)
2018-12-28 15:30:48 +00:00
felide-type
C++ ObjC++ Var(flag_elide_type) Init(1)
-fno-elide-type Do not elide common elements in template comparisons.
2012-03-27 23:13:14 +00:00
fenforce-eh-specs
C++ ObjC++ Var(flag_enforce_eh_specs) Init(1)
2017-04-10 11:32:00 +00:00
Generate code to check exception specifications.
2012-03-27 23:13:14 +00:00
fenum-int-equiv
2019-06-02 15:48:37 +00:00
C++ ObjC++ Deprecated
2012-03-27 23:13:14 +00:00
fexec-charset=
C ObjC C++ ObjC++ Joined RejectNegative
2017-04-10 11:32:00 +00:00
-fexec-charset=<cset> Convert all strings and character constants to character set <cset>.
2012-03-27 23:13:14 +00:00
fextended-identifiers
C ObjC C++ ObjC++
2017-04-10 11:32:00 +00:00
Permit universal character names (\\u and \\U) in identifiers.
2012-03-27 23:13:14 +00:00
finput-charset=
C ObjC C++ ObjC++ Joined RejectNegative
2017-04-10 11:32:00 +00:00
-finput-charset=<cset> Specify the default character set for source files.
2012-03-27 23:13:14 +00:00
2014-09-21 17:33:12 +00:00
fextern-tls-init
C++ ObjC++ Var(flag_extern_tls_init) Init(-1)
2017-04-10 11:32:00 +00:00
Support dynamic initialization of thread-local variables in a different translation unit.
2012-03-27 23:13:14 +00:00
fexternal-templates
2019-06-02 15:48:37 +00:00
C++ ObjC++ Deprecated
2012-03-27 23:13:14 +00:00
ffor-scope
2019-06-02 15:48:37 +00:00
C++ ObjC++ Deprecated
2012-03-27 23:13:14 +00:00
ffreestanding
C ObjC C++ ObjC++
2017-04-10 11:32:00 +00:00
Do not assume that standard C libraries and \"main\" exist.
2012-03-27 23:13:14 +00:00
fgnu-keywords
C++ ObjC++ Var(flag_no_gnu_keywords, 0)
2017-04-10 11:32:00 +00:00
Recognize GNU-defined keywords.
2012-03-27 23:13:14 +00:00
fgnu-runtime
2014-09-21 17:33:12 +00:00
ObjC ObjC++ LTO Report RejectNegative Var(flag_next_runtime,0) Init(NEXT_OBJC_RUNTIME)
2017-04-10 11:32:00 +00:00
Generate code for GNU runtime environment.
2012-03-27 23:13:14 +00:00
fgnu89-inline
C ObjC Var(flag_gnu89_inline) Init(-1)
2017-04-10 11:32:00 +00:00
Use traditional GNU semantics for inline functions.
2012-03-27 23:13:14 +00:00
fguiding-decls
2019-06-02 15:48:37 +00:00
C++ ObjC++ Deprecated
2012-03-27 23:13:14 +00:00
fhandle-exceptions
2019-06-02 15:48:37 +00:00
C++ ObjC++ Optimization Alias(fexceptions) Warn({%<-fhandle-exceptions%> has been renamed %<-fexceptions%> (and is now on by default)})
2012-03-27 23:13:14 +00:00
fhonor-std
2019-06-02 15:48:37 +00:00
C++ ObjC++ Deprecated
2012-03-27 23:13:14 +00:00
fhosted
C ObjC
2017-04-10 11:32:00 +00:00
Assume normal C execution environment.
2012-03-27 23:13:14 +00:00
fhuge-objects
2019-06-02 15:48:37 +00:00
C++ ObjC++ Deprecated
2017-04-10 11:32:00 +00:00
No longer supported.
2012-03-27 23:13:14 +00:00
fimplement-inlines
C++ ObjC++ Var(flag_implement_inlines) Init(1)
2017-04-10 11:32:00 +00:00
Export functions even if they can be inlined.
2012-03-27 23:13:14 +00:00
fimplicit-inline-templates
C++ ObjC++ Var(flag_implicit_inline_templates) Init(1)
2017-04-10 11:32:00 +00:00
Emit implicit instantiations of inline templates.
2012-03-27 23:13:14 +00:00
fimplicit-templates
C++ ObjC++ Var(flag_implicit_templates) Init(1)
2017-04-10 11:32:00 +00:00
Emit implicit instantiations of templates.
2012-03-27 23:13:14 +00:00
fnew-inheriting-ctors
C++ ObjC++ Var(flag_new_inheriting_ctors) Init(1)
Implement C++17 inheriting constructor semantics.
2012-03-27 23:13:14 +00:00
ffriend-injection
2019-06-02 15:48:37 +00:00
C++ ObjC++ Deprecated
2012-03-27 23:13:14 +00:00
fkeep-inline-dllexport
C C++ ObjC ObjC++ Var(flag_keep_inline_dllexport) Init(1) Report Condition(TARGET_DLLIMPORT_DECL_ATTRIBUTES)
2017-04-10 11:32:00 +00:00
Don't emit dllexported inline functions unless needed.
2012-03-27 23:13:14 +00:00
flabels-ok
2019-06-02 15:48:37 +00:00
C++ ObjC++ Deprecated
2012-03-27 23:13:14 +00:00
flax-vector-conversions
C ObjC C++ ObjC++ Var(flag_lax_vector_conversions)
Allow implicit conversions between vectors with differing numbers of subparts and/or differing element types.
fms-extensions
C ObjC C++ ObjC++ Var(flag_ms_extensions)
2017-04-10 11:32:00 +00:00
Don't warn about uses of Microsoft extensions.
2012-03-27 23:13:14 +00:00
fmudflap
2019-06-02 15:48:37 +00:00
C ObjC C++ ObjC++ Deprecated
2012-03-27 23:13:14 +00:00
fmudflapth
2019-06-02 15:48:37 +00:00
C ObjC C++ ObjC++ Deprecated
2012-03-27 23:13:14 +00:00
fmudflapir
2019-06-02 15:48:37 +00:00
C ObjC C++ ObjC++ Deprecated
2012-03-27 23:13:14 +00:00
fname-mangling-version-
2019-06-02 15:48:37 +00:00
C++ ObjC++ Joined Deprecated
2012-03-27 23:13:14 +00:00
fnew-abi
2019-06-02 15:48:37 +00:00
C++ ObjC++ Deprecated
2012-03-27 23:13:14 +00:00
fnew-ttp-matching
C++ ObjC++ Var(flag_new_ttp)
Implement resolution of DR 150 for matching of template template arguments.
2012-03-27 23:13:14 +00:00
fnext-runtime
2014-09-21 17:33:12 +00:00
ObjC ObjC++ LTO Report RejectNegative Var(flag_next_runtime)
2017-04-10 11:32:00 +00:00
Generate code for NeXT (Apple Mac OS X) runtime environment.
2012-03-27 23:13:14 +00:00
fnil-receivers
ObjC ObjC++ Var(flag_nil_receivers) Init(1)
2017-04-10 11:32:00 +00:00
Assume that receivers of Objective-C messages may be nil.
2012-03-27 23:13:14 +00:00
2015-08-28 15:33:40 +00:00
flocal-ivars
ObjC ObjC++ Var(flag_local_ivars) Init(1)
Allow access to instance variables as if they were local declarations within instance method implementations.
fivar-visibility=
ObjC ObjC++ Joined RejectNegative Enum(ivar_visibility) Var(default_ivar_visibility) Init(IVAR_VISIBILITY_PROTECTED)
2017-04-10 11:32:00 +00:00
-fvisibility=[private|protected|public|package] Set the default symbol visibility.
2015-08-28 15:33:40 +00:00
Enum
Name(ivar_visibility) Type(enum ivar_visibility) UnknownError(unrecognized ivar visibility value %qs)
EnumValue
Enum(ivar_visibility) String(private) Value(IVAR_VISIBILITY_PRIVATE)
EnumValue
Enum(ivar_visibility) String(protected) Value(IVAR_VISIBILITY_PROTECTED)
EnumValue
Enum(ivar_visibility) String(public) Value(IVAR_VISIBILITY_PUBLIC)
EnumValue
Enum(ivar_visibility) String(package) Value(IVAR_VISIBILITY_PACKAGE)
2012-03-27 23:13:14 +00:00
fnonansi-builtins
C++ ObjC++ Var(flag_no_nonansi_builtin, 0)
fnonnull-objects
2019-06-02 15:48:37 +00:00
C++ ObjC++ Deprecated
2012-03-27 23:13:14 +00:00
fnothrow-opt
C++ ObjC++ Optimization Var(flag_nothrow_opt)
2017-04-10 11:32:00 +00:00
Treat a throw() exception specification as noexcept to improve code size.
2012-03-27 23:13:14 +00:00
fobjc-abi-version=
2014-09-21 17:33:12 +00:00
ObjC ObjC++ LTO Joined Report RejectNegative UInteger Var(flag_objc_abi)
2012-03-27 23:13:14 +00:00
Specify which ABI to use for Objective-C family code and meta-data generation.
; Generate special '- .cxx_construct' and '- .cxx_destruct' methods
; to initialize any non-POD ivars in Objective-C++ classes.
fobjc-call-cxx-cdtors
ObjC++ Var(flag_objc_call_cxx_cdtors)
2017-04-10 11:32:00 +00:00
Generate special Objective-C methods to initialize/destroy non-POD C++ ivars, if needed.
2012-03-27 23:13:14 +00:00
fobjc-direct-dispatch
ObjC ObjC++ Var(flag_objc_direct_dispatch)
2017-04-10 11:32:00 +00:00
Allow fast jumps to the message dispatcher.
2012-03-27 23:13:14 +00:00
; Nonzero means that we will allow new ObjC exception syntax (@throw,
; @try, etc.) in source code.
fobjc-exceptions
ObjC ObjC++ Var(flag_objc_exceptions)
2017-04-10 11:32:00 +00:00
Enable Objective-C exception and synchronization syntax.
2012-03-27 23:13:14 +00:00
fobjc-gc
2014-09-21 17:33:12 +00:00
ObjC ObjC++ LTO Var(flag_objc_gc)
2017-04-10 11:32:00 +00:00
Enable garbage collection (GC) in Objective-C/Objective-C++ programs.
2012-03-27 23:13:14 +00:00
fobjc-nilcheck
ObjC ObjC++ Var(flag_objc_nilcheck,1)
Enable inline checks for nil receivers with the NeXT runtime and ABI version 2.
; Nonzero means that we generate NeXT setjmp based exceptions.
fobjc-sjlj-exceptions
ObjC ObjC++ Var(flag_objc_sjlj_exceptions) Init(-1)
2017-04-10 11:32:00 +00:00
Enable Objective-C setjmp exception handling runtime.
2012-03-27 23:13:14 +00:00
fobjc-std=objc1
ObjC ObjC++ Var(flag_objc1_only)
2017-04-10 11:32:00 +00:00
Conform to the Objective-C 1.0 language as implemented in GCC 4.0.
2012-03-27 23:13:14 +00:00
2015-08-28 15:33:40 +00:00
fopenacc
C ObjC C++ ObjC++ LTO Var(flag_openacc)
2017-04-10 11:32:00 +00:00
Enable OpenACC.
fopenacc-dim=
C ObjC C++ ObjC++ LTO Joined Var(flag_openacc_dims)
Specify default OpenACC compute dimensions.
2015-08-28 15:33:40 +00:00
2012-03-27 23:13:14 +00:00
fopenmp
2015-08-28 15:33:40 +00:00
C ObjC C++ ObjC++ LTO Var(flag_openmp)
2017-04-10 11:32:00 +00:00
Enable OpenMP (implies -frecursive in Fortran).
2012-03-27 23:13:14 +00:00
2014-09-21 17:33:12 +00:00
fopenmp-simd
C ObjC C++ ObjC++ Var(flag_openmp_simd)
2017-04-10 11:32:00 +00:00
Enable OpenMP's SIMD directives.
2014-09-21 17:33:12 +00:00
2012-03-27 23:13:14 +00:00
foperator-names
C++ ObjC++
2017-04-10 11:32:00 +00:00
Recognize C++ keywords like \"compl\" and \"xor\".
2012-03-27 23:13:14 +00:00
foptional-diags
C++ ObjC++ Ignore
Does nothing. Preserved for backward compatibility.
fpch-deps
C ObjC C++ ObjC++
fpch-preprocess
C ObjC C++ ObjC++
2017-04-10 11:32:00 +00:00
Look for and use PCH files even when preprocessing.
2012-03-27 23:13:14 +00:00
fpermissive
2014-09-21 17:33:12 +00:00
C++ ObjC++ Var(flag_permissive)
2017-04-10 11:32:00 +00:00
Downgrade conformance errors to warnings.
2012-03-27 23:13:14 +00:00
fplan9-extensions
C ObjC Var(flag_plan9_extensions)
2017-04-10 11:32:00 +00:00
Enable Plan 9 language extensions.
2012-03-27 23:13:14 +00:00
fpreprocessed
C ObjC C++ ObjC++
2017-04-10 11:32:00 +00:00
Treat the input file as already preprocessed.
2012-03-27 23:13:14 +00:00
ftrack-macro-expansion
C ObjC C++ ObjC++ JoinedOrMissing RejectNegative UInteger
; converted into ftrack-macro-expansion=
ftrack-macro-expansion=
C ObjC C++ ObjC++ JoinedOrMissing RejectNegative UInteger
2017-04-10 11:32:00 +00:00
-ftrack-macro-expansion=<0|1|2> Track locations of tokens coming from macro expansion and display them in error messages.
2012-03-27 23:13:14 +00:00
fpretty-templates
C++ ObjC++ Var(flag_pretty_templates) Init(1)
2017-04-10 11:32:00 +00:00
-fno-pretty-templates Do not pretty-print template specializations as the template signature followed by the arguments.
2012-03-27 23:13:14 +00:00
fprintf-return-value
C ObjC C++ ObjC++ LTO Optimization Var(flag_printf_return_value) Init(1)
Treat known sprintf return values as constants.
2012-03-27 23:13:14 +00:00
freplace-objc-classes
2014-09-21 17:33:12 +00:00
ObjC ObjC++ LTO Var(flag_replace_objc_classes)
2017-04-10 11:32:00 +00:00
Used in Fix-and-Continue mode to indicate that object files may be swapped in at runtime.
2012-03-27 23:13:14 +00:00
frepo
C++ ObjC++
2017-04-10 11:32:00 +00:00
Enable automatic template instantiation.
2012-03-27 23:13:14 +00:00
frtti
C++ ObjC++ Optimization Var(flag_rtti) Init(1)
2017-04-10 11:32:00 +00:00
Generate run time type descriptor information.
2012-03-27 23:13:14 +00:00
fshort-enums
2015-08-28 15:33:40 +00:00
C ObjC C++ ObjC++ LTO Optimization Var(flag_short_enums)
2017-04-10 11:32:00 +00:00
Use the narrowest integer type possible for enumeration types.
2012-03-27 23:13:14 +00:00
fshort-wchar
2015-08-28 15:33:40 +00:00
C ObjC C++ ObjC++ LTO Optimization Var(flag_short_wchar)
2017-04-10 11:32:00 +00:00
Force the underlying type for \"wchar_t\" to be \"unsigned short\".
2012-03-27 23:13:14 +00:00
fsigned-bitfields
C ObjC C++ ObjC++ Var(flag_signed_bitfields) Init(1)
2017-04-10 11:32:00 +00:00
When \"signed\" or \"unsigned\" is not given make the bitfield signed.
2012-03-27 23:13:14 +00:00
fsigned-char
C ObjC C++ ObjC++ LTO Var(flag_signed_char)
2017-04-10 11:32:00 +00:00
Make \"char\" signed by default.
2012-03-27 23:13:14 +00:00
2015-08-28 15:33:40 +00:00
fsized-deallocation
C++ ObjC++ Var(flag_sized_deallocation) Init(-1)
2017-04-10 11:32:00 +00:00
Enable C++14 sized deallocation support.
2015-08-28 15:33:40 +00:00
2012-03-27 23:13:14 +00:00
fsquangle
2019-06-02 15:48:37 +00:00
C++ ObjC++ Deprecated
2012-03-27 23:13:14 +00:00
2017-04-10 11:32:00 +00:00
fsso-struct=
C ObjC Joined RejectNegative Enum(sso_struct) Var(default_sso) Init(SSO_NATIVE)
-fsso-struct=[big-endian|little-endian|native] Set the default scalar storage order.
2017-04-10 11:32:00 +00:00
Enum
Name(sso_struct) Type(enum scalar_storage_order_kind) UnknownError(unrecognized scalar storage order value %qs)
EnumValue
Enum(sso_struct) String(big-endian) Value(SSO_BIG_ENDIAN)
EnumValue
Enum(sso_struct) String(little-endian) Value(SSO_LITTLE_ENDIAN)
EnumValue
Enum(sso_struct) String(native) Value(SSO_NATIVE)
2012-03-27 23:13:14 +00:00
fstats
C++ ObjC++ Var(flag_detailed_statistics)
2017-04-10 11:32:00 +00:00
Display statistics accumulated during compilation.
2012-03-27 23:13:14 +00:00
fstrict-enums
C++ ObjC++ Optimization Var(flag_strict_enums)
2017-04-10 11:32:00 +00:00
Assume that values of enumeration type are always within the minimum range of that type.
2012-03-27 23:13:14 +00:00
fstrict-prototype
2019-06-02 15:48:37 +00:00
C++ ObjC++ Deprecated
2012-03-27 23:13:14 +00:00
fstrong-eval-order
C++ ObjC++ Common Alias(fstrong-eval-order=, all, none)
Follow the C++17 evaluation order requirements for assignment expressions,
shift, member function calls, etc.
fstrong-eval-order=
C++ ObjC++ Common Var(flag_strong_eval_order) Joined Enum(strong_eval_order) RejectNegative Init(-1)
Follow the C++17 evaluation order requirements for assignment expressions,
shift, member function calls, etc.
Enum
Name(strong_eval_order) Type(int)
EnumValue
Enum(strong_eval_order) String(none) Value(0)
EnumValue
Enum(strong_eval_order) String(some) Value(1)
EnumValue
Enum(strong_eval_order) String(all) Value(2)
2012-03-27 23:13:14 +00:00
ftabstop=
C ObjC C++ ObjC++ Joined RejectNegative UInteger
2017-04-10 11:32:00 +00:00
-ftabstop=<number> Distance between tab stops for column reporting.
2012-03-27 23:13:14 +00:00
2014-09-21 17:33:12 +00:00
ftemplate-backtrace-limit=
C++ ObjC++ Joined RejectNegative UInteger Var(template_backtrace_limit) Init(10)
2017-04-10 11:32:00 +00:00
Set the maximum number of template instantiation notes for a single warning or error.
2014-09-21 17:33:12 +00:00
2012-03-27 23:13:14 +00:00
ftemplate-depth-
C++ ObjC++ Joined RejectNegative Undocumented Alias(ftemplate-depth=)
ftemplate-depth=
C++ ObjC++ Joined RejectNegative UInteger
2017-04-10 11:32:00 +00:00
-ftemplate-depth=<number> Specify maximum template instantiation depth.
2012-03-27 23:13:14 +00:00
fthis-is-variable
2019-06-02 15:48:37 +00:00
C++ ObjC++ Deprecated
2012-03-27 23:13:14 +00:00
fthreadsafe-statics
C++ ObjC++ Optimization Var(flag_threadsafe_statics) Init(1)
2017-04-10 11:32:00 +00:00
-fno-threadsafe-statics Do not generate thread-safe code for initializing local statics.
2012-03-27 23:13:14 +00:00
funsigned-bitfields
C ObjC C++ ObjC++ Var(flag_signed_bitfields, 0)
2017-04-10 11:32:00 +00:00
When \"signed\" or \"unsigned\" is not given make the bitfield unsigned.
2012-03-27 23:13:14 +00:00
funsigned-char
C ObjC C++ ObjC++ LTO Var(flag_signed_char, 0)
2017-04-10 11:32:00 +00:00
Make \"char\" unsigned by default.
2012-03-27 23:13:14 +00:00
fuse-cxa-atexit
C++ ObjC++ Var(flag_use_cxa_atexit) Init(DEFAULT_USE_CXA_ATEXIT)
2017-04-10 11:32:00 +00:00
Use __cxa_atexit to register destructors.
2012-03-27 23:13:14 +00:00
fuse-cxa-get-exception-ptr
C++ ObjC++ Var(flag_use_cxa_get_exception_ptr) Init(2)
2017-04-10 11:32:00 +00:00
Use __cxa_get_exception_ptr in exception handling.
2012-03-27 23:13:14 +00:00
fvisibility-inlines-hidden
C++ ObjC++
2017-04-10 11:32:00 +00:00
Marks all inlined functions and methods as having hidden visibility.
2012-03-27 23:13:14 +00:00
fvisibility-ms-compat
C++ ObjC++ Var(flag_visibility_ms_compat)
2017-04-10 11:32:00 +00:00
Changes visibility to match Microsoft Visual Studio by default.
2012-03-27 23:13:14 +00:00
fvtable-gc
2019-06-02 15:48:37 +00:00
C++ ObjC++ Deprecated
2017-04-10 11:32:00 +00:00
No longer supported.
2012-03-27 23:13:14 +00:00
fvtable-thunks
2019-06-02 15:48:37 +00:00
C++ ObjC++ Deprecated
2017-04-10 11:32:00 +00:00
No longer supported.
2012-03-27 23:13:14 +00:00
fweak
C++ ObjC++ Var(flag_weak) Init(1)
2017-04-10 11:32:00 +00:00
Emit common-like symbols as weak symbols.
2012-03-27 23:13:14 +00:00
fwide-exec-charset=
C ObjC C++ ObjC++ Joined RejectNegative
2017-04-10 11:32:00 +00:00
-fwide-exec-charset=<cset> Convert all wide strings and character constants to character set <cset>.
2012-03-27 23:13:14 +00:00
fworking-directory
C ObjC C++ ObjC++ Var(flag_working_directory) Init(-1)
2017-04-10 11:32:00 +00:00
Generate a #line directive pointing at the current working directory.
2012-03-27 23:13:14 +00:00
fxref
2019-06-02 15:48:37 +00:00
C++ ObjC++ Deprecated
2017-04-10 11:32:00 +00:00
No longer supported.
2012-03-27 23:13:14 +00:00
fzero-link
ObjC ObjC++ Var(flag_zero_link)
2017-04-10 11:32:00 +00:00
Generate lazy class lookup (via objc_getClass()) for use in Zero-Link mode.
2012-03-27 23:13:14 +00:00
gen-decls
2018-12-28 15:30:48 +00:00
ObjC ObjC++ Driver Var(flag_gen_declaration) RejectNegative
2017-04-10 11:32:00 +00:00
Dump declarations to a .decl file.
2012-03-27 23:13:14 +00:00
femit-struct-debug-baseonly
C ObjC C++ ObjC++
2017-04-10 11:32:00 +00:00
-femit-struct-debug-baseonly Aggressive reduced debug info for structs.
2012-03-27 23:13:14 +00:00
femit-struct-debug-reduced
C ObjC C++ ObjC++
2017-04-10 11:32:00 +00:00
-femit-struct-debug-reduced Conservative reduced debug info for structs.
2012-03-27 23:13:14 +00:00
femit-struct-debug-detailed=
C ObjC C++ ObjC++ Joined
2017-04-10 11:32:00 +00:00
-femit-struct-debug-detailed=<spec-list> Detailed reduced debug info for structs.
2012-03-27 23:13:14 +00:00
2014-09-21 17:33:12 +00:00
fext-numeric-literals
C++ ObjC++ Var(flag_ext_numeric_literals) Init(1)
2014-09-21 17:33:12 +00:00
Interpret imaginary, fixed-point, or other gnu number suffix as the corresponding
number literal rather than a user-defined number literal.
2012-03-27 23:13:14 +00:00
idirafter
C ObjC C++ ObjC++ Joined Separate MissingArgError(missing path after %qs)
2017-04-10 11:32:00 +00:00
-idirafter <dir> Add <dir> to the end of the system include path.
2012-03-27 23:13:14 +00:00
imacros
C ObjC C++ ObjC++ Joined Separate MissingArgError(missing filename after %qs)
2017-04-10 11:32:00 +00:00
-imacros <file> Accept definition of macros in <file>.
2012-03-27 23:13:14 +00:00
imultilib
C ObjC C++ ObjC++ Joined Separate
2017-04-10 11:32:00 +00:00
-imultilib <dir> Set <dir> to be the multilib include subdirectory.
2012-03-27 23:13:14 +00:00
include
C ObjC C++ ObjC++ Joined Separate MissingArgError(missing filename after %qs)
2017-04-10 11:32:00 +00:00
-include <file> Include the contents of <file> before other files.
2012-03-27 23:13:14 +00:00
iprefix
C ObjC C++ ObjC++ Joined Separate
2017-04-10 11:32:00 +00:00
-iprefix <path> Specify <path> as a prefix for next two options.
2012-03-27 23:13:14 +00:00
isysroot
C ObjC C++ ObjC++ Joined Separate MissingArgError(missing path after %qs)
2017-04-10 11:32:00 +00:00
-isysroot <dir> Set <dir> to be the system root directory.
2012-03-27 23:13:14 +00:00
isystem
C ObjC C++ ObjC++ Joined Separate MissingArgError(missing path after %qs)
2017-04-10 11:32:00 +00:00
-isystem <dir> Add <dir> to the start of the system include path.
2012-03-27 23:13:14 +00:00
iquote
C ObjC C++ ObjC++ Joined Separate MissingArgError(missing path after %qs)
2017-04-10 11:32:00 +00:00
-iquote <dir> Add <dir> to the end of the quote include path.
2012-03-27 23:13:14 +00:00
iwithprefix
C ObjC C++ ObjC++ Joined Separate
2017-04-10 11:32:00 +00:00
-iwithprefix <dir> Add <dir> to the end of the system include path.
2012-03-27 23:13:14 +00:00
iwithprefixbefore
C ObjC C++ ObjC++ Joined Separate
2017-04-10 11:32:00 +00:00
-iwithprefixbefore <dir> Add <dir> to the end of the main include path.
2012-03-27 23:13:14 +00:00
lang-asm
C Undocumented RejectDriver
no-integrated-cpp
Driver
nostdinc
C ObjC C++ ObjC++
2017-04-10 11:32:00 +00:00
Do not search standard system include directories (those specified with -isystem will still be used).
2012-03-27 23:13:14 +00:00
nostdinc++
C++ ObjC++
2017-04-10 11:32:00 +00:00
Do not search standard system include directories for C++.
2012-03-27 23:13:14 +00:00
o
C ObjC C++ ObjC++ Joined Separate
; Documented in common.opt
pedantic
2014-09-21 17:33:12 +00:00
C ObjC C++ ObjC++ Alias(Wpedantic)
2012-03-27 23:13:14 +00:00
; Documented in common.opt
print-objc-runtime-info
ObjC ObjC++
2017-04-10 11:32:00 +00:00
Generate C header of platform-specific features.
2012-03-27 23:13:14 +00:00
remap
C ObjC C++ ObjC++
2017-04-10 11:32:00 +00:00
Remap file names when including files.
2012-03-27 23:13:14 +00:00
std=c++98
C++ ObjC++
2017-04-10 11:32:00 +00:00
Conform to the ISO 1998 C++ standard revised by the 2003 technical corrigendum.
2012-03-27 23:13:14 +00:00
std=c++03
C++ ObjC++ Alias(std=c++98)
2017-04-10 11:32:00 +00:00
Conform to the ISO 1998 C++ standard revised by the 2003 technical corrigendum.
2012-03-27 23:13:14 +00:00
std=c++11
C++ ObjC++
2017-04-10 11:32:00 +00:00
Conform to the ISO 2011 C++ standard.
2012-03-27 23:13:14 +00:00
std=c++0x
2014-09-21 17:33:12 +00:00
C++ ObjC++ Alias(std=c++11) Undocumented
2017-04-10 11:32:00 +00:00
Deprecated in favor of -std=c++11.
2012-03-27 23:13:14 +00:00
2014-09-21 17:33:12 +00:00
std=c++1y
2015-08-28 15:33:40 +00:00
C++ ObjC++ Alias(std=c++14) Undocumented
2017-04-10 11:32:00 +00:00
Deprecated in favor of -std=c++14.
2014-09-21 17:33:12 +00:00
std=c++14
2017-04-10 11:32:00 +00:00
C++ ObjC++
Conform to the ISO 2014 C++ standard.
2015-08-28 15:33:40 +00:00
std=c++1z
2018-12-28 15:30:48 +00:00
C++ ObjC++ Alias(std=c++17) Undocumented
Deprecated in favor of -std=c++17.
2015-08-28 15:33:40 +00:00
std=c++17
2018-12-28 15:30:48 +00:00
C++ ObjC++
Conform to the ISO 2017 C++ standard.
std=c++2a
C++ ObjC++
Conform to the ISO 2020(?) C++ draft standard (experimental and incomplete support).
2014-09-21 17:33:12 +00:00
2012-03-27 23:13:14 +00:00
std=c11
C ObjC
2017-04-10 11:32:00 +00:00
Conform to the ISO 2011 C standard.
2012-03-27 23:13:14 +00:00
std=c1x
C ObjC Alias(std=c11)
2017-04-10 11:32:00 +00:00
Deprecated in favor of -std=c11.
2012-03-27 23:13:14 +00:00
2018-12-28 15:30:48 +00:00
std=c17
C ObjC
2019-06-02 15:48:37 +00:00
Conform to the ISO 2017 C standard (published in 2018).
2018-12-28 15:30:48 +00:00
std=c18
C ObjC Alias(std=c17)
2019-06-02 15:48:37 +00:00
Conform to the ISO 2017 C standard (published in 2018).
std=c2x
C ObjC
Conform to the ISO 202X C standard draft (experimental and incomplete support).
2018-12-28 15:30:48 +00:00
2012-03-27 23:13:14 +00:00
std=c89
C ObjC Alias(std=c90)
2017-04-10 11:32:00 +00:00
Conform to the ISO 1990 C standard.
2012-03-27 23:13:14 +00:00
std=c90
C ObjC
2017-04-10 11:32:00 +00:00
Conform to the ISO 1990 C standard.
2012-03-27 23:13:14 +00:00
std=c99
C ObjC
2017-04-10 11:32:00 +00:00
Conform to the ISO 1999 C standard.
2012-03-27 23:13:14 +00:00
std=c9x
C ObjC Alias(std=c99)
2017-04-10 11:32:00 +00:00
Deprecated in favor of -std=c99.
2012-03-27 23:13:14 +00:00
std=gnu++98
C++ ObjC++
Conform to the ISO 1998 C++ standard revised by the 2003 technical
2017-04-10 11:32:00 +00:00
corrigendum with GNU extensions.
2012-03-27 23:13:14 +00:00
std=gnu++03
C++ ObjC++ Alias(std=gnu++98)
Conform to the ISO 1998 C++ standard revised by the 2003 technical
2017-04-10 11:32:00 +00:00
corrigendum with GNU extensions.
2012-03-27 23:13:14 +00:00
std=gnu++11
C++ ObjC++
2017-04-10 11:32:00 +00:00
Conform to the ISO 2011 C++ standard with GNU extensions.
2012-03-27 23:13:14 +00:00
std=gnu++0x
2017-04-10 11:32:00 +00:00
C++ ObjC++ Alias(std=gnu++11) Undocumented
Deprecated in favor of -std=gnu++11.
2012-03-27 23:13:14 +00:00
2014-09-21 17:33:12 +00:00
std=gnu++1y
2015-08-28 15:33:40 +00:00
C++ ObjC++ Alias(std=gnu++14) Undocumented
2017-04-10 11:32:00 +00:00
Deprecated in favor of -std=gnu++14.
2014-09-21 17:33:12 +00:00
std=gnu++14
2015-08-28 15:33:40 +00:00
C++ ObjC++
2017-04-10 11:32:00 +00:00
Conform to the ISO 2014 C++ standard with GNU extensions.
2015-08-28 15:33:40 +00:00
std=gnu++1z
2018-12-28 15:30:48 +00:00
C++ ObjC++ Alias(std=gnu++17) Undocumented
Deprecated in favor of -std=gnu++17.
2015-08-28 15:33:40 +00:00
std=gnu++17
2018-12-28 15:30:48 +00:00
C++ ObjC++
Conform to the ISO 2017 C++ standard with GNU extensions.
std=gnu++2a
C++ ObjC++
Conform to the ISO 2020(?) C++ draft standard with GNU extensions (experimental and incomplete support).
2014-09-21 17:33:12 +00:00
2012-03-27 23:13:14 +00:00
std=gnu11
C ObjC
2017-04-10 11:32:00 +00:00
Conform to the ISO 2011 C standard with GNU extensions.
2012-03-27 23:13:14 +00:00
std=gnu1x
C ObjC Alias(std=gnu11)
2017-04-10 11:32:00 +00:00
Deprecated in favor of -std=gnu11.
2012-03-27 23:13:14 +00:00
2018-12-28 15:30:48 +00:00
std=gnu17
C ObjC
2019-06-02 15:48:37 +00:00
Conform to the ISO 2017 C standard (published in 2018) with GNU extensions.
2018-12-28 15:30:48 +00:00
std=gnu18
C ObjC Alias(std=gnu17)
2019-06-02 15:48:37 +00:00
Conform to the ISO 2017 C standard (published in 2018) with GNU extensions.
std=gnu2x
C ObjC
Conform to the ISO 202X C standard draft with GNU extensions (experimental and incomplete support).
2018-12-28 15:30:48 +00:00
2012-03-27 23:13:14 +00:00
std=gnu89
C ObjC Alias(std=gnu90)
2017-04-10 11:32:00 +00:00
Conform to the ISO 1990 C standard with GNU extensions.
2012-03-27 23:13:14 +00:00
std=gnu90
C ObjC
2017-04-10 11:32:00 +00:00
Conform to the ISO 1990 C standard with GNU extensions.
2012-03-27 23:13:14 +00:00
std=gnu99
C ObjC
2017-04-10 11:32:00 +00:00
Conform to the ISO 1999 C standard with GNU extensions.
2012-03-27 23:13:14 +00:00
std=gnu9x
C ObjC Alias(std=gnu99)
2017-04-10 11:32:00 +00:00
Deprecated in favor of -std=gnu99.
2012-03-27 23:13:14 +00:00
std=iso9899:1990
C ObjC Alias(std=c90)
2017-04-10 11:32:00 +00:00
Conform to the ISO 1990 C standard.
2012-03-27 23:13:14 +00:00
std=iso9899:199409
C ObjC
2017-04-10 11:32:00 +00:00
Conform to the ISO 1990 C standard as amended in 1994.
2012-03-27 23:13:14 +00:00
std=iso9899:1999
C ObjC Alias(std=c99)
2017-04-10 11:32:00 +00:00
Conform to the ISO 1999 C standard.
2012-03-27 23:13:14 +00:00
std=iso9899:199x
C ObjC Alias(std=c99)
2017-04-10 11:32:00 +00:00
Deprecated in favor of -std=iso9899:1999.
2012-03-27 23:13:14 +00:00
std=iso9899:2011
C ObjC Alias(std=c11)
2017-04-10 11:32:00 +00:00
Conform to the ISO 2011 C standard.
2012-03-27 23:13:14 +00:00
2018-12-28 15:30:48 +00:00
std=iso9899:2017
C ObjC Alias(std=c17)
2019-06-02 15:48:37 +00:00
Conform to the ISO 2017 C standard (published in 2018).
2018-12-28 15:30:48 +00:00
std=iso9899:2018
C ObjC Alias(std=c17)
2019-06-02 15:48:37 +00:00
Conform to the ISO 2017 C standard (published in 2018).
2018-12-28 15:30:48 +00:00
2012-03-27 23:13:14 +00:00
traditional
Driver
traditional-cpp
C ObjC C++ ObjC++
2017-04-10 11:32:00 +00:00
Enable traditional preprocessing.
2012-03-27 23:13:14 +00:00
trigraphs
C ObjC C++ ObjC++
2017-04-10 11:32:00 +00:00
-trigraphs Support ISO C trigraphs.
2012-03-27 23:13:14 +00:00
undef
C ObjC C++ ObjC++ Var(flag_undef)
2017-04-10 11:32:00 +00:00
Do not predefine system-specific and GCC-specific macros.
2012-03-27 23:13:14 +00:00
v
C ObjC C++ ObjC++
; Documented in common.opt
w
C ObjC C++ ObjC++
; Documented in common.opt
; This comment is to ensure we retain the blank line above.