Commit 7619c085 by DJ Delorie Committed by DJ Delorie

c-common.h (warn_cast_qual, [...]): Remove explicit declarations.

* c-common.h (warn_cast_qual, warn_missing_format_attribute,
warn_pointer_arith, warn_missing_prototypes, warn_parentheses,
warn_missing_braces, warn_sign_compare, warn_long_long,
warn_redundant_decls, warn_float_equal, warn_char_subscripts,
warn_conversion, warn_format_y2k, warn_format_extra_args,
warn_format_zero_length, warn_format_nonliteral,
warn_format_security, mesg_implicit_function_declaration,
warn_bad_function_cast, warn_traditional,
warn_declaration_after_statement, warn_strict_prototypes,
warn_missing_declarations, warn_nested_externs,
warn_sequence_point, warn_init_self, warn_div_by_zero,
warn_implicit_int, warn_nonnull, warn_old_style_definition,
warn_selector, warn_undeclared_selector, warn_protocol,
warn_abi, warn_invalid_offsetof, warn_ctor_dtor_privacy,
warn_overloaded_virtual, warn_nonvdtor, warn_reorder,
warn_synth, warn_pmf2ptr, warn_ecpp, warn_sign_promo,
warn_old_style_cast, warn_nontemplate_friend,
warn_deprecated): Remove explicit declarations.
* c-common.c: Likewise, remove explicit definitions.
* c-opts.c: Likewise, remove explicit assignments.
* c.opts: Likewise, add implicit declare/define/assign.

From-SVN: r83680
parent af72267c
2004-06-25 DJ Delorie <dj@redhat.com>
* c-common.h (warn_cast_qual, warn_missing_format_attribute,
warn_pointer_arith, warn_missing_prototypes, warn_parentheses,
warn_missing_braces, warn_sign_compare, warn_long_long,
warn_redundant_decls, warn_float_equal, warn_char_subscripts,
warn_conversion, warn_format_y2k, warn_format_extra_args,
warn_format_zero_length, warn_format_nonliteral,
warn_format_security, mesg_implicit_function_declaration,
warn_bad_function_cast, warn_traditional,
warn_declaration_after_statement, warn_strict_prototypes,
warn_missing_declarations, warn_nested_externs,
warn_sequence_point, warn_init_self, warn_div_by_zero,
warn_implicit_int, warn_nonnull, warn_old_style_definition,
warn_selector, warn_undeclared_selector, warn_protocol,
warn_abi, warn_invalid_offsetof, warn_ctor_dtor_privacy,
warn_overloaded_virtual, warn_nonvdtor, warn_reorder,
warn_synth, warn_pmf2ptr, warn_ecpp, warn_sign_promo,
warn_old_style_cast, warn_nontemplate_friend,
warn_deprecated): Remove explicit declarations.
* c-common.c: Likewise, remove explicit definitions.
* c-opts.c: Likewise, remove explicit assignments.
* c.opts: Likewise, add implicit declare/define/assign.
2004-06-25 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* gimplify.c (lookup_tmp_var): Set TREE_READONLY in is_formal case.
......
......@@ -268,65 +268,11 @@ int flag_const_strings;
int flag_signed_bitfields = 1;
int explicit_flag_signed_bitfields;
/* Nonzero means warn about pointer casts that can drop a type qualifier
from the pointer target type. */
int warn_cast_qual;
/* Warn about functions which might be candidates for format attributes. */
int warn_missing_format_attribute;
/* Nonzero means warn about sizeof(function) or addition/subtraction
of function pointers. */
int warn_pointer_arith;
/* Nonzero means warn for any global function def
without separate previous prototype decl. */
int warn_missing_prototypes;
/* Warn if adding () is suggested. */
int warn_parentheses;
/* Warn if initializer is not completely bracketed. */
int warn_missing_braces;
/* Warn about comparison of signed and unsigned values.
If -1, neither -Wsign-compare nor -Wno-sign-compare has been specified
(in which case -Wextra gets to decide). */
int warn_sign_compare = -1;
/* Nonzero means warn about usage of long long when `-pedantic'. */
int warn_long_long = 1;
/* Nonzero means warn about deprecated conversion from string constant to
`char *'. */
int warn_write_strings;
/* Nonzero means warn about multiple (redundant) decls for the same single
variable or function. */
int warn_redundant_decls;
/* Warn about testing equality of floating point numbers. */
int warn_float_equal;
/* Warn about a subscript that has type char. */
int warn_char_subscripts;
/* Warn if a type conversion is done that might have confusing results. */
int warn_conversion;
/* Warn about #pragma directives that are not recognized. */
int warn_unknown_pragmas; /* Tri state variable. */
......@@ -336,26 +282,6 @@ int warn_unknown_pragmas; /* Tri state variable. */
int warn_format;
/* Warn about Y2K problems with strftime formats. */
int warn_format_y2k;
/* Warn about excess arguments to formats. */
int warn_format_extra_args;
/* Warn about zero-length formats. */
int warn_format_zero_length;
/* Warn about non-literal format arguments. */
int warn_format_nonliteral;
/* Warn about possible security problems with calls to format functions. */
int warn_format_security;
/* Zero means that faster, ...NonNil variants of objc_msgSend...
calls will be used in ObjC; passing nil receivers to such calls
will most likely result in crashes. */
......@@ -381,11 +307,6 @@ int flag_replace_objc_classes = 0;
/* C/ObjC language option variables. */
/* Nonzero means message about use of implicit function declarations;
1 means warning; 2 means error. */
int mesg_implicit_function_declaration = -1;
/* Nonzero means allow type mismatches in conditional expressions;
just make their values `void'. */
......@@ -403,67 +324,10 @@ int flag_isoc99;
int flag_hosted = 1;
/* Nonzero means warn when casting a function call to a type that does
not match the return type (e.g. (float)sqrt() or (anything*)malloc()
when there is no previous declaration of sqrt or malloc. */
int warn_bad_function_cast;
/* Warn about traditional constructs whose meanings changed in ANSI C. */
int warn_traditional;
/* Nonzero means warn for a declaration found after a statement. */
int warn_declaration_after_statement;
/* Nonzero means warn for non-prototype function decls
or non-prototyped defs without previous prototype. */
int warn_strict_prototypes;
/* Nonzero means warn for any global function def
without separate previous decl. */
int warn_missing_declarations;
/* Nonzero means warn about declarations of objects not at
file-scope level and about *all* declarations of functions (whether
or static) not at file-scope level. Note that we exclude
implicit function declarations. To get warnings about those, use
-Wimplicit. */
int warn_nested_externs;
/* Warn if main is suspicious. */
int warn_main;
/* Nonzero means warn about possible violations of sequence point rules. */
int warn_sequence_point;
/* Nonzero means warn about uninitialized variable when it is initialized with itself.
For example: int i = i;, GCC will not warn about this when warn_init_self is nonzero. */
int warn_init_self;
/* Nonzero means to warn about compile-time division by zero. */
int warn_div_by_zero = 1;
/* Nonzero means warn about use of implicit int. */
int warn_implicit_int;
/* Warn about NULL being passed to argument slots marked as requiring
non-NULL. */
int warn_nonnull;
/* Warn about old-style parameter declaration. */
int warn_old_style_definition;
/* ObjC language option variables. */
......@@ -491,25 +355,6 @@ int print_struct_values;
const char *constant_string_class_name;
/* Warn if multiple methods are seen for the same selector, but with
different argument types. Performs the check on the whole selector
table at the end of compilation. */
int warn_selector;
/* Warn if a @selector() is found, and no method with that selector
has been previously declared. The check is done on each
@selector() as soon as it is found - so it warns about forward
declarations. */
int warn_undeclared_selector;
/* Warn if methods required by a protocol are not implemented in the
class adopting it. When turned off, methods inherited to that
class are also considered implemented. */
int warn_protocol = 1;
/* C++ language option variables. */
......@@ -612,70 +457,10 @@ int flag_permissive;
int flag_enforce_eh_specs = 1;
/* Nonzero means warn about things that will change when compiling
with an ABI-compliant compiler. */
int warn_abi = 0;
/* Nonzero means warn about invalid uses of offsetof. */
int warn_invalid_offsetof = 1;
/* Nonzero means warn about implicit declarations. */
int warn_implicit = 1;
/* Nonzero means warn when all ctors or dtors are private, and the class
has no friends. */
int warn_ctor_dtor_privacy = 0;
/* Nonzero means warn in function declared in derived class has the
same name as a virtual in the base class, but fails to match the
type signature of any virtual function in the base class. */
int warn_overloaded_virtual;
/* Nonzero means warn when declaring a class that has a non virtual
destructor, when it really ought to have a virtual one. */
int warn_nonvdtor;
/* Nonzero means warn when the compiler will reorder code. */
int warn_reorder;
/* Nonzero means warn when synthesis behavior differs from Cfront's. */
int warn_synth;
/* Nonzero means warn when we convert a pointer to member function
into a pointer to (void or function). */
int warn_pmf2ptr = 1;
/* Nonzero means warn about violation of some Effective C++ style rules. */
int warn_ecpp;
/* Nonzero means warn where overload resolution chooses a promotion from
unsigned to signed over a conversion to an unsigned of the same size. */
int warn_sign_promo;
/* Nonzero means warn when an old-style cast is used. */
int warn_old_style_cast;
/* Nonzero means warn when non-templatized friend functions are
declared within a template */
int warn_nontemplate_friend = 1;
/* Nonzero means complain about deprecated features. */
int warn_deprecated = 1;
/* Maximum template instantiation depth. This limit is rather
arbitrary, but it exists to limit the time it takes to notice
infinite template instantiations. */
......
......@@ -403,64 +403,11 @@ extern int flag_const_strings;
extern int flag_signed_bitfields;
extern int explicit_flag_signed_bitfields;
/* Nonzero means warn about pointer casts that can drop a type qualifier
from the pointer target type. */
extern int warn_cast_qual;
/* Warn about functions which might be candidates for format attributes. */
extern int warn_missing_format_attribute;
/* Nonzero means warn about sizeof(function) or addition/subtraction
of function pointers. */
extern int warn_pointer_arith;
/* Nonzero means warn for any global function def
without separate previous prototype decl. */
extern int warn_missing_prototypes;
/* Warn if adding () is suggested. */
extern int warn_parentheses;
/* Warn if initializer is not completely bracketed. */
extern int warn_missing_braces;
/* Warn about comparison of signed and unsigned values.
If -1, neither -Wsign-compare nor -Wno-sign-compare has been specified. */
extern int warn_sign_compare;
/* Nonzero means warn about usage of long long when `-pedantic'. */
extern int warn_long_long;
/* Nonzero means warn about deprecated conversion from string constant to
`char *'. */
extern int warn_write_strings;
/* Nonzero means warn about multiple (redundant) decls for the same single
variable or function. */
extern int warn_redundant_decls;
/* Warn about testing equality of floating point numbers. */
extern int warn_float_equal;
/* Warn about a subscript that has type char. */
extern int warn_char_subscripts;
/* Warn if a type conversion is done that might have confusing results. */
extern int warn_conversion;
/* Warn about #pragma directives that are not recognized. */
extern int warn_unknown_pragmas; /* Tri state variable. */
......@@ -470,35 +417,10 @@ extern int warn_unknown_pragmas; /* Tri state variable. */
extern int warn_format;
/* Warn about Y2K problems with strftime formats. */
extern int warn_format_y2k;
/* Warn about excess arguments to formats. */
extern int warn_format_extra_args;
/* Warn about zero-length formats. */
extern int warn_format_zero_length;
/* Warn about non-literal format arguments. */
extern int warn_format_nonliteral;
/* Warn about possible security problems with calls to format functions. */
extern int warn_format_security;
/* C/ObjC language option variables. */
/* Nonzero means message about use of implicit function declarations;
1 means warning; 2 means error. */
extern int mesg_implicit_function_declaration;
/* Nonzero means allow type mismatches in conditional expressions;
just make their values `void'. */
......@@ -516,68 +438,10 @@ extern int flag_isoc99;
extern int flag_hosted;
/* Nonzero means warn when casting a function call to a type that does
not match the return type (e.g. (float)sqrt() or (anything*)malloc()
when there is no previous declaration of sqrt or malloc. */
extern int warn_bad_function_cast;
/* Warn about traditional constructs whose meanings changed in ANSI C. */
extern int warn_traditional;
/* Nonzero means warn for a declaration found after a statement. */
extern int warn_declaration_after_statement;
/* Nonzero means warn for non-prototype function decls
or non-prototyped defs without previous prototype. */
extern int warn_strict_prototypes;
/* Nonzero means warn for any global function def
without separate previous decl. */
extern int warn_missing_declarations;
/* Nonzero means warn about extern declarations of objects not at
file-scope level and about *all* declarations of functions (whether
extern or static) not at file-scope level. Note that we exclude
implicit function declarations. To get warnings about those, use
-Wimplicit. */
extern int warn_nested_externs;
/* Warn if main is suspicious. */
extern int warn_main;
/* Nonzero means warn about possible violations of sequence point rules. */
extern int warn_sequence_point;
/* Nonzero means warn about uninitialized variable when it is initialized with itself.
For example: int i = i;, GCC will not warn about this when warn_init_self is nonzero. */
extern int warn_init_self;
/* Nonzero means to warn about compile-time division by zero. */
extern int warn_div_by_zero;
/* Nonzero means warn about use of implicit int. */
extern int warn_implicit_int;
/* Warn about NULL being passed to argument slots marked as requiring
non-NULL. */
extern int warn_nonnull;
/* Warn about old-style parameter declaration. */
extern int warn_old_style_definition;
/* ObjC language option variables. */
......@@ -601,25 +465,6 @@ extern int print_struct_values;
extern const char *constant_string_class_name;
/* Warn if multiple methods are seen for the same selector, but with
different argument types. Performs the check on the whole selector
table at the end of compilation. */
extern int warn_selector;
/* Warn if a @selector() is found, and no method with that selector
has been previously declared. The check is done on each
@selector() as soon as it is found - so it warns about forward
declarations. */
extern int warn_undeclared_selector;
/* Warn if methods required by a protocol are not implemented in the
class adopting it. When turned off, methods inherited to that
class are also considered implemented. */
extern int warn_protocol;
/* C++ language option variables. */
......@@ -722,70 +567,10 @@ extern int flag_permissive;
extern int flag_enforce_eh_specs;
/* Nonzero means warn about things that will change when compiling
with an ABI-compliant compiler. */
extern int warn_abi;
/* Nonzero means warn about invalid uses of offsetof. */
extern int warn_invalid_offsetof;
/* Nonzero means warn about implicit declarations. */
extern int warn_implicit;
/* Nonzero means warn when all ctors or dtors are private, and the class
has no friends. */
extern int warn_ctor_dtor_privacy;
/* Nonzero means warn in function declared in derived class has the
same name as a virtual in the base class, but fails to match the
type signature of any virtual function in the base class. */
extern int warn_overloaded_virtual;
/* Nonzero means warn when declaring a class that has a non virtual
destructor, when it really ought to have a virtual one. */
extern int warn_nonvdtor;
/* Nonzero means warn when the compiler will reorder code. */
extern int warn_reorder;
/* Nonzero means warn when synthesis behavior differs from Cfront's. */
extern int warn_synth;
/* Nonzero means warn when we convert a pointer to member function
into a pointer to (void or function). */
extern int warn_pmf2ptr;
/* Nonzero means warn about violation of some Effective C++ style rules. */
extern int warn_ecpp;
/* Nonzero means warn where overload resolution chooses a promotion from
unsigned to signed over a conversion to an unsigned of the same size. */
extern int warn_sign_promo;
/* Nonzero means warn when an old-style cast is used. */
extern int warn_old_style_cast;
/* Nonzero means warn when non-templatized friend functions are
declared within a template */
extern int warn_nontemplate_friend;
/* Nonzero means complain about deprecated features. */
extern int warn_deprecated;
/* Maximum template instantiation depth. This limit is rather
arbitrary, but it exists to limit the time it takes to notice
infinite template instantiations. */
......
......@@ -260,6 +260,8 @@ c_common_handle_option (size_t scode, const char *arg, int value)
switch (code)
{
default:
if (cl_options[code].flags & (CL_C | CL_CXX | CL_ObjC | CL_ObjCXX))
break;
result = permit_fortran_options;
break;
......@@ -359,10 +361,6 @@ c_common_handle_option (size_t scode, const char *arg, int value)
defer_opt (code, arg);
break;
case OPT_Wabi:
warn_abi = value;
break;
case OPT_Wall:
set_Wunused (value);
set_Wformat (value);
......@@ -405,37 +403,12 @@ c_common_handle_option (size_t scode, const char *arg, int value)
cpp_opts->warn_multichar = value; /* Was C++ only. */
break;
case OPT_Wbad_function_cast:
warn_bad_function_cast = value;
break;
case OPT_Wcast_qual:
warn_cast_qual = value;
break;
case OPT_Wchar_subscripts:
warn_char_subscripts = value;
break;
case OPT_Wcomment:
case OPT_Wcomments:
cpp_opts->warn_comments = value;
break;
case OPT_Wconversion:
warn_conversion = value;
break;
case OPT_Wctor_dtor_privacy:
warn_ctor_dtor_privacy = value;
break;
case OPT_Wdeclaration_after_statement:
warn_declaration_after_statement = value;
break;
case OPT_Wdeprecated:
warn_deprecated = value;
cpp_opts->warn_deprecated = value;
break;
......@@ -443,10 +416,6 @@ c_common_handle_option (size_t scode, const char *arg, int value)
warn_div_by_zero = value;
break;
case OPT_Weffc__:
warn_ecpp = value;
break;
case OPT_Wendif_labels:
cpp_opts->warn_endif_labels = value;
break;
......@@ -459,10 +428,6 @@ c_common_handle_option (size_t scode, const char *arg, int value)
mesg_implicit_function_declaration = 2;
break;
case OPT_Wfloat_equal:
warn_float_equal = value;
break;
case OPT_Wformat:
set_Wformat (value);
break;
......@@ -471,58 +436,18 @@ c_common_handle_option (size_t scode, const char *arg, int value)
set_Wformat (atoi (arg));
break;
case OPT_Wformat_extra_args:
warn_format_extra_args = value;
break;
case OPT_Wformat_nonliteral:
warn_format_nonliteral = value;
break;
case OPT_Wformat_security:
warn_format_security = value;
break;
case OPT_Wformat_y2k:
warn_format_y2k = value;
break;
case OPT_Wformat_zero_length:
warn_format_zero_length = value;
break;
case OPT_Winit_self:
warn_init_self = value;
break;
case OPT_Wimplicit:
set_Wimplicit (value);
break;
case OPT_Wimplicit_function_declaration:
mesg_implicit_function_declaration = value;
break;
case OPT_Wimplicit_int:
warn_implicit_int = value;
break;
case OPT_Wimport:
/* Silently ignore for now. */
break;
case OPT_Winvalid_offsetof:
warn_invalid_offsetof = value;
break;
case OPT_Winvalid_pch:
cpp_opts->warn_invalid_pch = value;
break;
case OPT_Wlong_long:
warn_long_long = value;
break;
case OPT_Wmain:
if (value)
warn_main = 1;
......@@ -530,116 +455,23 @@ c_common_handle_option (size_t scode, const char *arg, int value)
warn_main = -1;
break;
case OPT_Wmissing_braces:
warn_missing_braces = value;
break;
case OPT_Wmissing_declarations:
warn_missing_declarations = value;
break;
case OPT_Wmissing_format_attribute:
warn_missing_format_attribute = value;
break;
case OPT_Wmissing_include_dirs:
cpp_opts->warn_missing_include_dirs = value;
break;
case OPT_Wmissing_prototypes:
warn_missing_prototypes = value;
break;
case OPT_Wmultichar:
cpp_opts->warn_multichar = value;
break;
case OPT_Wnested_externs:
warn_nested_externs = value;
break;
case OPT_Wnon_template_friend:
warn_nontemplate_friend = value;
break;
case OPT_Wnon_virtual_dtor:
warn_nonvdtor = value;
break;
case OPT_Wnonnull:
warn_nonnull = value;
break;
case OPT_Wold_style_definition:
warn_old_style_definition = value;
break;
case OPT_Wold_style_cast:
warn_old_style_cast = value;
break;
case OPT_Woverloaded_virtual:
warn_overloaded_virtual = value;
break;
case OPT_Wparentheses:
warn_parentheses = value;
break;
case OPT_Wpmf_conversions:
warn_pmf2ptr = value;
break;
case OPT_Wpointer_arith:
warn_pointer_arith = value;
break;
case OPT_Wprotocol:
warn_protocol = value;
break;
case OPT_Wselector:
warn_selector = value;
break;
case OPT_Wredundant_decls:
warn_redundant_decls = value;
break;
case OPT_Wreorder:
warn_reorder = value;
break;
case OPT_Wreturn_type:
warn_return_type = value;
break;
case OPT_Wsequence_point:
warn_sequence_point = value;
break;
case OPT_Wsign_compare:
warn_sign_compare = value;
break;
case OPT_Wsign_promo:
warn_sign_promo = value;
break;
case OPT_Wstrict_prototypes:
warn_strict_prototypes = value;
break;
case OPT_Wsynth:
warn_synth = value;
break;
case OPT_Wsystem_headers:
cpp_opts->warn_system_headers = value;
break;
case OPT_Wtraditional:
warn_traditional = value;
cpp_opts->warn_traditional = value;
break;
......@@ -647,10 +479,6 @@ c_common_handle_option (size_t scode, const char *arg, int value)
cpp_opts->warn_trigraphs = value;
break;
case OPT_Wundeclared_selector:
warn_undeclared_selector = value;
break;
case OPT_Wundef:
cpp_opts->warn_undef = value;
break;
......
......@@ -157,22 +157,23 @@ C ObjC C++ ObjC++ Joined Separate
-U<macro> Undefine <macro>
Wabi
C++ ObjC++
C++ ObjC++ Var(warn_abi)
Warn about things that will change when compiling with an ABI-compliant compiler
Wall
C ObjC C++ ObjC++
Enable most warning messages
Wbad-function-cast
C ObjC
C ObjC Var(warn_bad_function_cast)
Warn about casting functions to incompatible types
Wcast-qual
C ObjC C++ ObjC++
C ObjC C++ ObjC++ Var(warn_cast_qual)
Warn about casts which discard qualifiers
Wchar-subscripts
C ObjC C++ ObjC++
C ObjC C++ ObjC++ Var(warn_char_subscripts)
Warn about subscripts whose type is \"char\"
Wcomment
......@@ -184,27 +185,27 @@ C ObjC C++ ObjC++
Synonym for -Wcomment
Wconversion
C ObjC C++ ObjC++
C ObjC C++ ObjC++ Var(warn_conversion)
Warn about possibly confusing type conversions
Wctor-dtor-privacy
C++ ObjC++
C++ ObjC++ Var(warn_ctor_dtor_privacy)
Warn when all constructors and destructors are private
Wdeclaration-after-statement
C ObjC
C ObjC Var(warn_declaration_after_statement)
Warn when a declaration is found after a statement
Wdeprecated
C++ ObjC++
C++ ObjC++ Var(warn_deprecated) Init(1)
Warn about deprecated compiler features
Wdiv-by-zero
C ObjC
C ObjC Var(warn_div_by_zero) Init(1)
Warn about compile-time integer division by zero
Weffc++
C++ ObjC++
C++ ObjC++ Var(warn_ecpp)
Warn about violations of Effective C++ style rules
Wendif-labels
......@@ -220,7 +221,7 @@ C ObjC RejectNegative
Make implicit function declarations an error
Wfloat-equal
C ObjC C++ ObjC++
C ObjC C++ ObjC++ Var(warn_float_equal)
Warn if testing floating point numbers for equality
Wformat
......@@ -228,40 +229,41 @@ C ObjC C++ ObjC++
Warn about printf/scanf/strftime/strfmon format string anomalies
Wformat-extra-args
C ObjC C++ ObjC++
C ObjC C++ ObjC++ Var(warn_format_extra_args)
Warn if passing too many arguments to a function for its format string
Wformat-nonliteral
C ObjC C++ ObjC++
C ObjC C++ ObjC++ Var(warn_format_nonliteral)
Warn about format strings that are not literals
Wformat-security
C ObjC C++ ObjC++
C ObjC C++ ObjC++ Var(warn_format_security)
Warn about possible security problems with format functions
Wformat-y2k
C ObjC C++ ObjC++
C ObjC C++ ObjC++ Var(warn_format_y2k)
Warn about strftime formats yielding 2-digit years
Wformat-zero-length
C ObjC
C ObjC Var(warn_format_zero_length)
Warn about zero-length formats
Wformat=
C ObjC C++ ObjC++ Joined
Winit-self
C ObjC C++ ObjC++
C ObjC C++ ObjC++ Var(warn_init_self)
Warn about variables which are initialized to themselves.
Wimplicit
C ObjC C++ ObjC++
Wimplicit-function-declaration
C ObjC
C ObjC Var(mesg_implicit_function_declaration) Init(-1)
Warn about implicit function declarations
Wimplicit-int
C ObjC
C ObjC Var(warn_implicit_int)
Warn when a declaration does not specify a type
Wimport
......@@ -269,7 +271,7 @@ C ObjC C++ ObjC++
Deprecated. This switch has no effect.
Winvalid-offsetof
C++ ObjC++
C++ ObjC++ Var(warn_invalid_offsetof) Init(1)
Warn about invalid uses of the \"offsetof\" macro
Winvalid-pch
......@@ -277,7 +279,7 @@ C ObjC C++ ObjC++
Warn about PCH files that are found but not used
Wlong-long
C ObjC C++ ObjC++
C ObjC C++ ObjC++ Var(warn_long_long) Init(1)
Do not warn about using \"long long\" when -pedantic
Wmain
......@@ -285,15 +287,15 @@ C ObjC
Warn about suspicious declarations of \"main\"
Wmissing-braces
C ObjC C++ ObjC++
C ObjC C++ ObjC++ Var(warn_missing_braces)
Warn about possibly missing braces around initializers
Wmissing-declarations
C ObjC
C ObjC Var(warn_missing_declarations)
Warn about global functions without previous declarations
Wmissing-format-attribute
C ObjC C++ ObjC++
C ObjC C++ ObjC++ Var(warn_missing_format_attribute)
Warn about functions which might be candidates for format attributes
Wmissing-include-dirs
......@@ -301,7 +303,7 @@ C ObjC C++ ObjC++
Warn about user-specified include directories that do not exist
Wmissing-prototypes
C ObjC
C ObjC Var(warn_missing_prototypes)
Warn about global functions without prototypes
Wmultichar
......@@ -309,54 +311,55 @@ C ObjC C++ ObjC++
Warn about use of multi-character character constants
Wnested-externs
C ObjC
C ObjC Var(warn_nested_externs)
Warn about \"extern\" declarations not at file scope
Wnon-template-friend
C++ ObjC++
C++ ObjC++ Var(warn_nontemplate_friend) Init(1)
Warn when non-templatized friend functions are declared within a template
Wnon-virtual-dtor
C++ ObjC++
C++ ObjC++ Var(warn_nonvdtor)
Warn about non-virtual destructors
Wnonnull
C ObjC
C ObjC Var(warn_nonnull)
Warn about NULL being passed to argument slots marked as requiring non-NULL
Wold-style-cast
C++ ObjC++
C++ ObjC++ Var(warn_old_style_cast)
Warn if a C-style cast is used in a program
Wold-style-definition
C ObjC
C ObjC Var(warn_old_style_definition)
Warn if an old-style parameter definition is used
Woverloaded-virtual
C++ ObjC++
C++ ObjC++ Var(warn_overloaded_virtual)
Warn about overloaded virtual function names
Wparentheses
C ObjC C++ ObjC++
C ObjC C++ ObjC++ Var(warn_parentheses)
Warn about possibly missing parentheses
Wpmf-conversions
C++ ObjC++
C++ ObjC++ Var(warn_pmf2ptr) Init(1)
Warn when converting the type of pointers to member functions
Wpointer-arith
C ObjC C++ ObjC++
C ObjC C++ ObjC++ Var(warn_pointer_arith)
Warn about function pointer arithmetic
Wprotocol
ObjC ObjC++
ObjC ObjC++ Var(warn_protocol) Init(1)
Warn if inherited methods are unimplemented
Wredundant-decls
C ObjC C++ ObjC++
C ObjC C++ ObjC++ Var(warn_redundant_decls)
Warn about multiple declarations of the same object
Wreorder
C++ ObjC++
C++ ObjC++ Var(warn_reorder)
Warn when the compiler reorders code
Wreturn-type
......@@ -364,27 +367,27 @@ C ObjC C++ ObjC++
Warn whenever a function's return type defaults to \"int\" (C), or about inconsistent return types (C++)
Wselector
ObjC ObjC++
ObjC ObjC++ Var(warn_selector)
Warn if a selector has multiple methods
Wsequence-point
C ObjC
C ObjC Var(warn_sequence_point)
Warn about possible violations of sequence point rules
Wsign-compare
C ObjC C++ ObjC++
C ObjC C++ ObjC++ Var(warn_sign_compare) Init(-1)
Warn about signed-unsigned comparisons
Wsign-promo
C++ ObjC++
C++ ObjC++ Var(warn_sign_promo)
Warn when overload promotes from unsigned to signed
Wstrict-prototypes
C ObjC
C ObjC Var(warn_strict_prototypes)
Warn about unprototyped function declarations
Wsynth
C++ ObjC++
C++ ObjC++ Var(warn_synth)
Warn when synthesis behavior differs from Cfront
Wsystem-headers
......@@ -392,7 +395,7 @@ C ObjC C++ ObjC++
Do not suppress warnings from system headers
Wtraditional
C ObjC
C ObjC Var(warn_traditional)
Warn about features not present in traditional C
Wtrigraphs
......@@ -400,7 +403,8 @@ C ObjC C++ ObjC++
Warn if trigraphs are encountered that might affect the meaning of the program
Wundeclared-selector
ObjC ObjC++
ObjC ObjC++ Var(warn_undeclared_selector)
Warn about @selector()s without previously declared methods
Wundef
C ObjC C++ ObjC++
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment