This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: c.opt doesn't use Var() ?


> Either way, patches to (make it possible to) use Var() more are
> welcome.

Am I allowed to abbreviate the ChangeLog for this one?  ;-)

What do we have for tests for this one?  I built c, c++, and java, and
manually testing the first couple of warnings I converted (the rest
were the exact same change over and over and over, I hope you'll
excuse me if I didn't manually test them all ;-) I did skip anything
that didn't follow the common pattern, though.

I also copied source comments to the documentation fields of c.opt
wherever the doc fields were missing.

Note: I had to put a test in c-opt.c to check for options with
C/C++/ObjC/ObjC++ in the flags and automatically accept those,
hopefully that's the right thing to do, else we'll need a HUGE list of
"yup, these are OK" cases.

	* 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.

Index: c-common.c
===================================================================
RCS file: /greed/dj/gnu/gcc/repository/gcc/gcc/c-common.c,v
retrieving revision 1.520
diff -p -C2 -r1.520 c-common.c
*** c-common.c	24 Jun 2004 05:25:59 -0000	1.520
--- c-common.c	25 Jun 2004 01:24:13 -0000
*************** int flag_signed_bitfields = 1;
*** 269,309 ****
  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 *'.  */
--- 269,272 ----
*************** int warn_long_long = 1;
*** 311,331 ****
  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.  */
  
--- 274,277 ----
*************** int warn_unknown_pragmas; /* Tri state v
*** 337,360 ****
  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
--- 283,286 ----
*************** int flag_replace_objc_classes = 0;
*** 382,390 ****
  
  
- /* 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'.  */
--- 308,311 ----
*************** int flag_isoc99;
*** 404,468 ****
  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.  */
--- 325,332 ----
*************** int print_struct_values;
*** 492,514 ****
  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.  */
--- 356,359 ----
*************** int flag_permissive;
*** 613,679 ****
  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
--- 458,464 ----
Index: c-common.h
===================================================================
RCS file: /greed/dj/gnu/gcc/repository/gcc/gcc/c-common.h,v
retrieving revision 1.245
diff -p -C2 -r1.245 c-common.h
*** c-common.h	24 Jun 2004 05:26:01 -0000	1.245
--- c-common.h	25 Jun 2004 01:24:12 -0000
*************** extern int flag_signed_bitfields;
*** 404,443 ****
  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 *'.  */
--- 404,407 ----
*************** extern int warn_long_long;
*** 445,465 ****
  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.  */      
  
--- 409,412 ----
*************** extern int warn_unknown_pragmas; /* Tri 
*** 471,503 ****
  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'.  */
--- 418,425 ----
*************** extern int flag_isoc99;
*** 517,582 ****
  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.  */
--- 439,446 ----
*************** extern int print_struct_values;
*** 602,624 ****
  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.  */
--- 466,469 ----
*************** extern int flag_permissive;
*** 723,789 ****
  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
--- 568,574 ----
Index: c-opts.c
===================================================================
RCS file: /greed/dj/gnu/gcc/repository/gcc/gcc/c-opts.c,v
retrieving revision 1.117
diff -p -C2 -r1.117 c-opts.c
*** c-opts.c	22 Jun 2004 06:51:50 -0000	1.117
--- c-opts.c	25 Jun 2004 01:24:14 -0000
*************** c_common_handle_option (size_t scode, co
*** 261,264 ****
--- 261,266 ----
      {
      default:
+       if (cl_options[code].flags & (CL_C | CL_CXX | CL_ObjC | CL_ObjCXX))
+ 	break;
        result = permit_fortran_options;
        break;
*************** c_common_handle_option (size_t scode, co
*** 360,367 ****
        break;
  
-     case OPT_Wabi:
-       warn_abi = value;
-       break;
- 
      case OPT_Wall:
        set_Wunused (value);
--- 362,365 ----
*************** c_common_handle_option (size_t scode, co
*** 406,421 ****
        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:
--- 404,407 ----
*************** c_common_handle_option (size_t scode, co
*** 423,440 ****
        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;
--- 409,413 ----
*************** c_common_handle_option (size_t scode, co
*** 444,451 ****
        break;
  
-     case OPT_Weffc__:
-       warn_ecpp = value;
-       break;
- 
      case OPT_Wendif_labels:
        cpp_opts->warn_endif_labels = value;
--- 417,420 ----
*************** c_common_handle_option (size_t scode, co
*** 460,467 ****
        break;
  
-     case OPT_Wfloat_equal:
-       warn_float_equal = value;
-       break;
- 
      case OPT_Wformat:
        set_Wformat (value);
--- 429,432 ----
*************** c_common_handle_option (size_t scode, co
*** 472,527 ****
        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)
--- 437,452 ----
*************** c_common_handle_option (size_t scode, co
*** 531,638 ****
        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;
--- 456,471 ----
*************** c_common_handle_option (size_t scode, co
*** 640,644 ****
  
      case OPT_Wtraditional:
-       warn_traditional = value;
        cpp_opts->warn_traditional = value;
        break;
--- 473,476 ----
*************** c_common_handle_option (size_t scode, co
*** 646,653 ****
      case OPT_Wtrigraphs:
        cpp_opts->warn_trigraphs = value;
-       break;
- 
-     case OPT_Wundeclared_selector:
-       warn_undeclared_selector = value;
        break;
  
--- 478,481 ----
Index: c.opt
===================================================================
RCS file: /greed/dj/gnu/gcc/repository/gcc/gcc/c.opt,v
retrieving revision 1.28
diff -p -C2 -r1.28 c.opt
*** c.opt	22 Jun 2004 06:51:51 -0000	1.28
--- c.opt	25 Jun 2004 01:24:11 -0000
*************** C ObjC C++ ObjC++ Joined Separate
*** 158,162 ****
  
  Wabi
! C++ ObjC++
  
  Wall
--- 158,163 ----
  
  Wabi
! C++ ObjC++ Var(warn_abi)
! Warn about things that will change when compiling with an ABI-compliant compiler
  
  Wall
*************** Enable most warning messages
*** 165,177 ****
  
  Wbad-function-cast
! C ObjC
  Warn about casting functions to incompatible types
  
  Wcast-qual
! C ObjC C++ ObjC++
  Warn about casts which discard qualifiers
  
  Wchar-subscripts
! C ObjC C++ ObjC++
  Warn about subscripts whose type is \"char\"
  
--- 166,178 ----
  
  Wbad-function-cast
! C ObjC Var(warn_bad_function_cast)
  Warn about casting functions to incompatible types
  
  Wcast-qual
! C ObjC C++ ObjC++ Var(warn_cast_qual)
  Warn about casts which discard qualifiers
  
  Wchar-subscripts
! C ObjC C++ ObjC++ Var(warn_char_subscripts)
  Warn about subscripts whose type is \"char\"
  
*************** Synonym for -Wcomment
*** 185,209 ****
  
  Wconversion
! C ObjC C++ ObjC++
  Warn about possibly confusing type conversions
  
  Wctor-dtor-privacy
! C++ ObjC++
  Warn when all constructors and destructors are private
  
  Wdeclaration-after-statement
! C ObjC
  Warn when a declaration is found after a statement
  
  Wdeprecated
! C++ ObjC++
  Warn about deprecated compiler features
  
  Wdiv-by-zero
! C ObjC
  Warn about compile-time integer division by zero
  
  Weffc++
! C++ ObjC++
  Warn about violations of Effective C++ style rules
  
--- 186,210 ----
  
  Wconversion
! C ObjC C++ ObjC++ Var(warn_conversion)
  Warn about possibly confusing type conversions
  
  Wctor-dtor-privacy
! C++ ObjC++ Var(warn_ctor_dtor_privacy)
  Warn when all constructors and destructors are private
  
  Wdeclaration-after-statement
! C ObjC Var(warn_declaration_after_statement)
  Warn when a declaration is found after a statement
  
  Wdeprecated
! C++ ObjC++ Var(warn_deprecated) Init(1)
  Warn about deprecated compiler features
  
  Wdiv-by-zero
! C ObjC Var(warn_div_by_zero) Init(1)
  Warn about compile-time integer division by zero
  
  Weffc++
! C++ ObjC++ Var(warn_ecpp)
  Warn about violations of Effective C++ style rules
  
*************** Make implicit function declarations an e
*** 221,225 ****
  
  Wfloat-equal
! C ObjC C++ ObjC++
  Warn if testing floating point numbers for equality
  
--- 222,226 ----
  
  Wfloat-equal
! C ObjC C++ ObjC++ Var(warn_float_equal)
  Warn if testing floating point numbers for equality
  
*************** Warn about printf/scanf/strftime/strfmon
*** 229,249 ****
  
  Wformat-extra-args
! C ObjC C++ ObjC++
  Warn if passing too many arguments to a function for its format string
  
  Wformat-nonliteral
! C ObjC C++ ObjC++
  Warn about format strings that are not literals
  
  Wformat-security
! C ObjC C++ ObjC++
  Warn about possible security problems with format functions
  
  Wformat-y2k
! C ObjC C++ ObjC++
  Warn about strftime formats yielding 2-digit years
  
  Wformat-zero-length
! C ObjC
  
  Wformat=
--- 230,251 ----
  
  Wformat-extra-args
! 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++ Var(warn_format_nonliteral)
  Warn about format strings that are not literals
  
  Wformat-security
! C ObjC C++ ObjC++ Var(warn_format_security)
  Warn about possible security problems with format functions
  
  Wformat-y2k
! C ObjC C++ ObjC++ Var(warn_format_y2k)
  Warn about strftime formats yielding 2-digit years
  
  Wformat-zero-length
! C ObjC Var(warn_format_zero_length)
! Warn about zero-length formats
  
  Wformat=
*************** C ObjC C++ ObjC++ Joined
*** 251,255 ****
  
  Winit-self
! C ObjC C++ ObjC++
  Warn about variables which are initialized to themselves.
  
--- 253,257 ----
  
  Winit-self
! C ObjC C++ ObjC++ Var(warn_init_self)
  Warn about variables which are initialized to themselves.
  
*************** C ObjC C++ ObjC++
*** 258,266 ****
  
  Wimplicit-function-declaration
! C ObjC
  Warn about implicit function declarations
  
  Wimplicit-int
! C ObjC
  Warn when a declaration does not specify a type
  
--- 260,268 ----
  
  Wimplicit-function-declaration
! C ObjC Var(mesg_implicit_function_declaration) Init(-1)
  Warn about implicit function declarations
  
  Wimplicit-int
! C ObjC Var(warn_implicit_int)
  Warn when a declaration does not specify a type
  
*************** Deprecated.  This switch has no effect.
*** 270,274 ****
  
  Winvalid-offsetof
! C++ ObjC++
  Warn about invalid uses of the \"offsetof\" macro
  
--- 272,276 ----
  
  Winvalid-offsetof
! C++ ObjC++ Var(warn_invalid_offsetof) Init(1)
  Warn about invalid uses of the \"offsetof\" macro
  
*************** Warn about PCH files that are found but 
*** 278,282 ****
  
  Wlong-long
! C ObjC C++ ObjC++
  Do not warn about using \"long long\" when -pedantic
  
--- 280,284 ----
  
  Wlong-long
! C ObjC C++ ObjC++ Var(warn_long_long) Init(1)
  Do not warn about using \"long long\" when -pedantic
  
*************** Warn about suspicious declarations of \"
*** 286,298 ****
  
  Wmissing-braces
! C ObjC C++ ObjC++
  Warn about possibly missing braces around initializers
  
  Wmissing-declarations
! C ObjC
  Warn about global functions without previous declarations
  
  Wmissing-format-attribute
! C ObjC C++ ObjC++
  Warn about functions which might be candidates for format attributes
  
--- 288,300 ----
  
  Wmissing-braces
! C ObjC C++ ObjC++ Var(warn_missing_braces)
  Warn about possibly missing braces around initializers
  
  Wmissing-declarations
! C ObjC Var(warn_missing_declarations)
  Warn about global functions without previous declarations
  
  Wmissing-format-attribute
! C ObjC C++ ObjC++ Var(warn_missing_format_attribute)
  Warn about functions which might be candidates for format attributes
  
*************** Warn about user-specified include direct
*** 302,306 ****
  
  Wmissing-prototypes
! C ObjC
  Warn about global functions without prototypes
  
--- 304,308 ----
  
  Wmissing-prototypes
! C ObjC Var(warn_missing_prototypes)
  Warn about global functions without prototypes
  
*************** Warn about use of multi-character charac
*** 310,361 ****
  
  Wnested-externs
! C ObjC
  Warn about \"extern\" declarations not at file scope
  
  Wnon-template-friend
! C++ ObjC++
  Warn when non-templatized friend functions are declared within a template
  
  Wnon-virtual-dtor
! C++ ObjC++
  Warn about non-virtual destructors
  
  Wnonnull
! C ObjC
  
  Wold-style-cast
! C++ ObjC++
  Warn if a C-style cast is used in a program
  
  Wold-style-definition
! C ObjC
  Warn if an old-style parameter definition is used
  
  Woverloaded-virtual
! C++ ObjC++
  Warn about overloaded virtual function names
  
  Wparentheses
! C ObjC C++ ObjC++
  Warn about possibly missing parentheses
  
  Wpmf-conversions
! C++ ObjC++
  Warn when converting the type of pointers to member functions
  
  Wpointer-arith
! C ObjC C++ ObjC++
  Warn about function pointer arithmetic
  
  Wprotocol
! ObjC ObjC++
  Warn if inherited methods are unimplemented
  
  Wredundant-decls
! C ObjC C++ ObjC++
  Warn about multiple declarations of the same object
  
  Wreorder
! C++ ObjC++
  Warn when the compiler reorders code
  
--- 312,364 ----
  
  Wnested-externs
! C ObjC Var(warn_nested_externs)
  Warn about \"extern\" declarations not at file scope
  
  Wnon-template-friend
! C++ ObjC++ Var(warn_nontemplate_friend) Init(1)
  Warn when non-templatized friend functions are declared within a template
  
  Wnon-virtual-dtor
! C++ ObjC++ Var(warn_nonvdtor)
  Warn about non-virtual destructors
  
  Wnonnull
! C ObjC Var(warn_nonnull)
! Warn about NULL being passed to argument slots marked as requiring non-NULL
  
  Wold-style-cast
! C++ ObjC++ Var(warn_old_style_cast)
  Warn if a C-style cast is used in a program
  
  Wold-style-definition
! C ObjC Var(warn_old_style_definition)
  Warn if an old-style parameter definition is used
  
  Woverloaded-virtual
! C++ ObjC++ Var(warn_overloaded_virtual)
  Warn about overloaded virtual function names
  
  Wparentheses
! C ObjC C++ ObjC++ Var(warn_parentheses)
  Warn about possibly missing parentheses
  
  Wpmf-conversions
! C++ ObjC++ Var(warn_pmf2ptr) Init(1)
  Warn when converting the type of pointers to member functions
  
  Wpointer-arith
! C ObjC C++ ObjC++ Var(warn_pointer_arith)
  Warn about function pointer arithmetic
  
  Wprotocol
! ObjC ObjC++ Var(warn_protocol) Init(1)
  Warn if inherited methods are unimplemented
  
  Wredundant-decls
! C ObjC C++ ObjC++ Var(warn_redundant_decls)
  Warn about multiple declarations of the same object
  
  Wreorder
! C++ ObjC++ Var(warn_reorder)
  Warn when the compiler reorders code
  
*************** Warn whenever a function's return type d
*** 365,389 ****
  
  Wselector
! ObjC ObjC++
  Warn if a selector has multiple methods
  
  Wsequence-point
! C ObjC
  Warn about possible violations of sequence point rules
  
  Wsign-compare
! C ObjC C++ ObjC++
  Warn about signed-unsigned comparisons
  
  Wsign-promo
! C++ ObjC++
  Warn when overload promotes from unsigned to signed
  
  Wstrict-prototypes
! C ObjC
  Warn about unprototyped function declarations
  
  Wsynth
! C++ ObjC++
  Warn when synthesis behavior differs from Cfront
  
--- 368,392 ----
  
  Wselector
! ObjC ObjC++ Var(warn_selector)
  Warn if a selector has multiple methods
  
  Wsequence-point
! C ObjC Var(warn_sequence_point)
  Warn about possible violations of sequence point rules
  
  Wsign-compare
! C ObjC C++ ObjC++ Var(warn_sign_compare) Init(-1)
  Warn about signed-unsigned comparisons
  
  Wsign-promo
! C++ ObjC++ Var(warn_sign_promo)
  Warn when overload promotes from unsigned to signed
  
  Wstrict-prototypes
! C ObjC Var(warn_strict_prototypes)
  Warn about unprototyped function declarations
  
  Wsynth
! C++ ObjC++ Var(warn_synth)
  Warn when synthesis behavior differs from Cfront
  
*************** Do not suppress warnings from system hea
*** 393,397 ****
  
  Wtraditional
! C ObjC
  Warn about features not present in traditional C
  
--- 396,400 ----
  
  Wtraditional
! C ObjC Var(warn_traditional)
  Warn about features not present in traditional C
  
*************** Warn if trigraphs are encountered that m
*** 401,405 ****
  
  Wundeclared-selector
! ObjC ObjC++
  
  Wundef
--- 404,409 ----
  
  Wundeclared-selector
! ObjC ObjC++ Var(warn_undeclared_selector)
! Warn about @selector()s without previously declared methods
  
  Wundef


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]