1. 09 Mar, 2008 1 commit
    • c.opt (Wsynth): Deprecate. · 802e3f8c
      gcc/
      
      	* c.opt (Wsynth): Deprecate.
      	* doc/invoke.texi (Option Summary, Warning Options): Document
      	-Wno-format-contains-nul.
      
      gcc/fortran/
      
      	* invoke.texi (Error and Warning Options): Document
      	-Wline-truncation.
      
      contrib/
      
      	* check_warning_flags.sh: Instead of invoke.texi, take the path
      	to the doc directory as argument.  Check that warnings listed in
      	'gcc --help' are accepted by the compiler, and listed in the
      	manuals.
      
      From-SVN: r133059
      Ralf Wildenhues committed
  2. 26 Feb, 2008 1 commit
  3. 24 Feb, 2008 1 commit
    • http://gcc.gnu.org/ml/gcc-patches/2008-02/msg01094.html · faebccf9
      	PR 33738
      	* tree-vrp.c (vrp_evaluate_conditional): With
      	-Wtype-limits, emit a warning when comparing against a
      	constant outside the natural range of OP0's type.
      	* c.opt (Wtype-limits): Move ...
      	* common.opt (Wtype-limits): ... here.
      
      testsuite/ChangeLog
      
      	PR 33738
      	* g++.dg/warn/pr33738.C: New.
      
      From-SVN: r132591
      Diego Novillo committed
  4. 19 Feb, 2008 1 commit
    • re PR other/31349 (gcc -v --help returns no options for C, C++) · b3eaaf1a
              PR other/31349
              * opts.c (undocumented_msg): Leave blank unless checking is
              enabled.
              (handle_options): Fix indentation.
              (print_filtered_help): If no language-specific options were
              displayed tell the user how to list all the options supported by
              the language's front-end.
              (print_specific_help): Fix indentation and remove duplicate line.
              (common_handle_option): Handle the -v option.
              For --help enable the display of undocumented options if the -v
              switch has been included on the command line.
              For --help= check for overlaps in the arguments between the option
              classes and the language names and issue a warning when they
              cannot be disambiguated.
              * c.opt (v): Pass on to the common option handler.
      
      From-SVN: r132427
      Nick Clifton committed
  5. 13 Jan, 2008 1 commit
    • c-decl.c: (grokdeclarator): Use OPT_Wignored_qualifiers instead of OPT_Wreturn_type in... · 5db2e9ca
      ChangeLog:
      
      2008-01-12  Doug Kwan  <dougkwan@google.com>
      
      	* c-decl.c: (grokdeclarator): Use OPT_Wignored_qualifiers
      	instead of OPT_Wreturn_type in warning due to ignored return type
      	qualifiers.
      	* c-opt.c (c_common_post_option): Add -Wignored-qualifiers to
      	options included in -Wextra.
      	* c.opt: New option -Wignored_qualifiers.
      	* doc/invoke.texi (Warning Options, -Wextra): Add new option
      	-Wignore_qualifiers.
      	(-Wignored-qualifiers): Document.
      	(-Wreturn-type): Remove description of functionality now handled
      	by -Wignored-qualifiers.
      
      cp/ChangeLog:
      
      2008-01-12  Doug Kwan  <dougkwan@google.com>
      
      	* decl.c: (grokdeclarator): Use OPT_Wignored_qualifiers
      	instead of OPT_Wreturn_type in warning due to ignored return type
      	qualifiers.
      	* pt.c: (tsubst_function_type): Use OPT_Wignored_qualifiers
      	instead of OPT_Wreturn_type in warning due to ignored return type
      	qualifiers.
      
      testsuite/ChangeLog:
      
      2008-01-12  Doug Kwan  <dougkwan@google.com>
      
      	* gcc.dg/qual-return-1.c: Add -Wignored-qualifiers.
      	* g++.dg/warn/Wreturn-type-4.C: Replace -Wreturn-type by
      	-Wignored-qualifiers.
      
      From-SVN: r131499
      Doug Kwan committed
  6. 30 Jul, 2007 1 commit
    • directives-only.c: New file. · ccfc4c91
      	libcpp/
      	* directives-only.c: New file.
      	* internal.h (struct _cpp_dir_only_callbacks): New.
      	(_cpp_preprocess_dir_only): New function.
      	* directives.c (_cpp_handle_directive): Check directives_only before
      	disabling execution of indented directives.
      	* files.c (_cpp_stack_file): Add directives_only check.
      	* include/cpplib.h (struct cpp_options): Add directives_only.
      	(cpp_init_special_builtins): New function.
      	* init.c (cpp_init_special_builtins): New function.
      	(cpp_init_builtins): Move builtin_array initialization to
      	cpp_init_special_builtins.
      	(post_options): Check directives_only before setting
      	pfile->state.prevent_expansion = 1.
      	* macro.c (_cpp_builtin_macro_text): Print an error if __COUNTER__
      	is expanded inside a directive while -fdirectives-only is enabled.
      	* Makefile.in (libcpp_a_OBJS): Add directives-only.o.
      	(libcpp_a_SOURCES): Add directives-only.c.
      
      	gcc/
      	* c-ppoutput.c (print_lines_directives_only): New function.
      	(scan_translation_unit_directives_only): New function.
      	(preprocess_file): Add call to scan_translation_unit_directives_only.
      	* c-opts.c (c_common_handle_option): Add OPT_fdirectives_only.
      	(sanitize_cpp_opts): Add default flag_dump_macros setting for
      	-fdirectives-only.  Add errors for -fdirectives-only conflict with
      	-Wunused-macros and -traditional.
      	(finish_options): Add builtin macro initialization for
      	-fdirectives-only + -fpreprocessed.
      	* c.opt (fdirectives-only): New.
      	* doc/cppopts.texi (fdirectives-only): New.
      
      	gcc/testsuite/
      	* gcc.dg/cpp/counter-2.c: New test.
      	* gcc.dg/cpp/counter-3.c: New test.
      	* gcc.dg/cpp/dir-only-1.c: New test.
      	* gcc.dg/cpp/dir-only-1.h: New file.
      	* gcc.dg/cpp/dir-only-2.c: New test.
      	* gcc.dg/cpp/dir-only-3.c: New test.
      	* gcc.dg/cpp/dir-only-3a.h: New file.
      	* gcc.dg/cpp/dir-only-3b.h: New file.
      	* gcc.dg/cpp/dir-only-4.c: New test.
      	* gcc.dg/cpp/dir-only-5.c: New test.
      	* gcc.dg/cpp/dir-only-6.c: New test.
      
      From-SVN: r127066
      Ollie Wild committed
  7. 26 Jul, 2007 1 commit
  8. 28 Jun, 2007 1 commit
    • Index: gcc/ChangeLog · ddbfd28d
      2007-06-21  Geoffrey Keating  <geoffk@apple.com>
      
      	* doc/invoke.texi (C++ Dialect Options): Document
      	fvisibility-ms-compat.
      	* c.opt (fvisibility-ms-compat): New.
      
      Index: gcc/cp/ChangeLog
      2007-06-21  Geoffrey Keating  <geoffk@apple.com>
      
      	* decl2.c (determine_visibility): Implement
      	flag_visibility_ms_compat effect on type info.
      	* decl.c (cxx_init_decl_processing): Implement
      	global effect of flag_visibility_ms_compat.
      
      Index: gcc/testsuite/ChangeLog
      2007-06-26  Geoffrey Keating  <geoffk@apple.com>
      
      	* g++.dg/ext/visibility/ms-compat-1.C: New.
      
      From-SVN: r126088
      Geoffrey Keating committed
  9. 20 May, 2007 1 commit
    • re PR middle-end/7651 (Define -Wextra strictly in terms of other warning flags) · f6aa72dd
      2007-05-20  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
      	
      	PR middle-end/7651
      	PR c++/11856
      	PR c/12963
      	PR c/23587
      	PR other/29694
      	* c.opt (Wtype-limits): New.
      	* doc/invoke.texi (Wtype-limits): Document it.
      	(Wextra): Enabled by -Wextra.
      	* c-opts.c (c_common_post_options): Enabled by -Wextra.
      	* c-common.c (shorten_compare): Warn with Wtype-limits.
      
      testsuite/
      	* gcc.dg/compare6.c: Replace Wall with Wtype-limits.
      	* gcc.dg/Wtype-limits.c: New.
      	* gcc.dg/Wtype-limits-Wextra.c: New.
      	* gcc.dg/Wtype-limits-no.c: New.
      	* g++.dg/warn/Wtype-limits.C: New.
      	* g++.dg/warn/Wtype-limits-Wextra.C: New.
      	* g++.dg/warn/Wtype-limits-no.C: New.
      
      From-SVN: r124875
      Manuel López-Ibáñez committed
  10. 19 May, 2007 1 commit
    • invoke.texi (Warning Options): Add -Wconversion-sign. · 7060db96
      2007-05-19  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
      
      	* doc/invoke.texi (Warning Options): Add -Wconversion-sign.
      	(Wconversion): Update description.
      	(Wconversion-sign): New.
      	* c.opt (Wconversion-sign): New.
      	* c-opts.c (c_common_post_options): Uninitialized Wconversion-sign
      	means disabled for C++. Otherwise, take the status of Wconversion.
      	* c-common.c (conversion_warning): Warn with either Wconversion or
      	Wconversion-sign.
      	(warnings_for_convert_and_check): Conditions are already checked by
      	conversion_warning.
      	(convert_and_check): Don't check warnings if the conversion failed.
      
      cp/
      	* cvt.c (cp_convert_and_check): Don't check warnings if the
      	conversion failed.
      
      testsuite/
      	* gcc.dg/Wconversion-integer.c: Group testcases and add more.
      	* gcc.dg/Wconversion-sign.c: New.
      	* gcc.dg/Wconversion-integer-no-sign.c: New.
      	* g++.dg/warn/Wconversion-integer.C: Move some warnings to
      	Wconversion-sign.C
      	* g++.dg/warn/Wconversion-sign.C: New.
      	* g++.old-deja/g++.other/warn4.C: Update.
      	* g++.dg/warn/Wconversion1.C: Likewise.
      
      From-SVN: r124856
      Manuel López-Ibáñez committed
  11. 04 May, 2007 1 commit
  12. 23 Apr, 2007 1 commit
  13. 17 Apr, 2007 1 commit
    • invoke.texi (Debugging Options): Add documentation for the -femit-struct-debug options... · 39ef6592
      ./:	* doc/invoke.texi (Debugging Options): Add documentation for the
      	-femit-struct-debug options -femit-struct-debug-baseonly,
      	-femit-struct-debug-reduced, and
      	-femit-struct-debug-detailed[=...].
      
      	* c-opts.c (c_common_handle_option): Add
      	OPT_femit_struct_debug_baseonly, OPT_femit_struct_debug_reduced,
      	and OPT_femit_struct_debug_detailed_.
      	* c.opt: Add specifications for
      	-femit-struct-debug-baseonly, -femit-struct-debug-reduced,
      	and -femit-struct-debug-detailed[=...].
      	* opts.c (set_struct_debug_option): Parse the
      	-femit-struct-debug-... options.
      	* opts.c (matches_main_base, main_input_basename,
      	main_input_baselength, base_of_path, matches_main_base): Add
      	variables and functions to compare header base name to compilation
      	unit base name.
      	* opts.c (should_emit_struct_debug): Add to determine to emit a
      	structure based on the option.
      	(dump_struct_debug) Also disabled function to debug this
      	function.
      	* opts.c (handle_options): Save the base name of the
      	compilation unit.
      
      	* langhooks-def.h (LANG_HOOKS_GENERIC_TYPE_P): Define.
              (LANG_HOOKS_FOR_TYPES_INITIALIZER): Add.
      	This hook indicates if a type is generic.  Set it by default
      	to "never generic".
      	* langhooks.h (struct lang_hooks_for_types): Add a new hook
      	to determine if a struct type is generic or not.
      	* cp/cp-tree.h (class_tmpl_impl_spec_p): Declare a C++ hook.
      	* cp/tree.c (class_tmpl_impl_spec_p): Implement the C++ hook.
      	* cp/cp-lang.c (LANG_HOOKS_GENERIC_TYPE_P): Override null C hook
      	with live C++ hook.
      
      	* flags.h (enum debug_info_usage): Add an enumeration to describe
      	a program's use of a structure type.
      	* dwarf2out.c (gen_struct_or_union_type_die): Add a new parameter
      	to indicate the program's usage of the type.  Filter structs based
      	on the -femit-struct-debug-... specification.
      	(gen_type_die): Split into two routines, gen_type_die and
      	gen_type_die_with_usage.  gen_type_die is now a wrapper
      	that assumes direct usage.
      	(gen_type_die_with_usage): Replace calls to gen_type_die
      	with gen_type_die_with_usage adding the program usage of
      	the referenced type.
      	(dwarf2out_imported_module_or_decl): Suppress struct debug
      	information using should_emit_struct_debug when appropriate.
      testsuite/:
      	* g++.dg/other/fesd-any.C: Test -femit-struct-debug-detailed=any.
      	* g++.dg/other/fesd-any.h: Test -femit-struct-debug-detailed=any.
      	* g++.dg/other/fesd-baseonly.C: Test -femit-struct-debug-baseonly.
      	* g++.dg/other/fesd-baseonly.h: Test -femit-struct-debug-baseonly.
      	* g++.dg/other/fesd-none.C: Test -femit-struct-debug-detailed=none.
      	* g++.dg/other/fesd-none.h: Test -femit-struct-debug-detailed=none.
      	* g++.dg/other/fesd-reduced.C: Test -femit-struct-debug-reduced.
      	* g++.dg/other/fesd-reduced.h: Test -femit-struct-debug-reduced.
      	* g++.dg/other/fesd-sys.C: Test -femit-struct-debug-detailed=sys.
      	* g++.dg/other/fesd-sys.h: Test -femit-struct-debug-detailed=sys.
      	* g++.dg/other/fesd.h: Common to -femit-struct-debug-... tests.
      
      	* gcc.dg/fesd-any.c: Test -femit-struct-debug-detailed=any.
      	* gcc.dg/fesd-any.h: Test -femit-struct-debug-detailed=any.
      	* gcc.dg/fesd-baseonly.c: Test -femit-struct-debug-baseonly.
      	* gcc.dg/fesd-baseonly.h: Test -femit-struct-debug-baseonly.
      	* gcc.dg/fesd-none.c: Test -femit-struct-debug-detailed=none.
      	* gcc.dg/fesd-none.h: Test -femit-struct-debug-detailed=none.
      	* gcc.dg/fesd-reduced.c: Test -femit-struct-debug-reduced.
      	* gcc.dg/fesd-reduced.h: Test -femit-struct-debug-reduced.
      	* gcc.dg/fesd-sys.c: Test -femit-struct-debug-detailed=sys.
      	* gcc.dg/fesd-sys.h: Test -femit-struct-debug-detailed=sys.
      	* gcc.dg/fesd.h: Common to -femit-struct-debug-... tests.
      
      From-SVN: r123909
      Lawrence Crowl committed
  14. 07 Apr, 2007 1 commit
  15. 21 Mar, 2007 1 commit
  16. 12 Mar, 2007 1 commit
    • invoke.texi (Wvla): New warning. · 50d50fc7
      ChangeLog:
      
      2007-03-12  Seongbae Park <seongbae.park@gmail.com>
      
      	* gcc/doc/invoke.texi (Wvla): New warning.
      
      gcc/ChangeLog:
      
      2007-03-12  Seongbae Park <seongbae.park@gmail.com>
      
      	* c-decl.c (warn_variable_length_array): New function.
      	Refactored from grokdeclarator to handle warn_vla
      	and handle unnamed array case.
      	(grokdeclarator): Refactored VLA warning case.
      	* c.opt (Wvla): New flag.
      
      gcc/cp/ChangeLog:
      
      2007-03-12  Seongbae Park <seongbae.park@gmail.com>
      
      	* decl.c (compute_array_index_type): New warning flag warn_vla.
      
      gcc/testsuite/ChangeLog:
      
      2007-03-12  Seongbae Park <seongbae.park@gmail.com>
      
       	* gcc.dg/wvla-1.c: New test
       	* gcc.dg/wvla-2.c: New test
       	* gcc.dg/wvla-3.c: New test
       	* gcc.dg/wvla-4.c: New test
       	* gcc.dg/wvla-5.c: New test
       	* gcc.dg/wvla-6.c: New test
       	* gcc.dg/wvla-7.c: New test
      	* g++.dg/warn/Wvla-1.C: New test
      	* g++.dg/warn/Wvla-2.C: New test
      	* g++.dg/warn/Wvla-3.C: New test
      
      From-SVN: r122851
      Seongbae Park committed
  17. 05 Mar, 2007 1 commit
    • c.opt (fgnu89-inline): New option. · da1c7394
      	* c.opt (fgnu89-inline): New option.
      	* c-opts.c (c_common_post_options): Set default value for
      	flag_gnu89_inline.
      	* c-decl.c (WANT_C99_INLINE_SEMANTICS): Remove.
      	(pop_scope): Check flag_gnu89_inline rather than flag_isoc99 for
      	inline functions.
      	(diagnose_mismatched_decls, merge_decls, start_decl): Likewise.
      	(grokdeclarator, start_function): Likewise.
      	* c-cppbuiltin.c (c_cpp_builtins): Define either
      	__GNUC_GNU_INLINE__ or __GNUC_STDC_INLINE__.
      	* doc/invoke.texi (Option Summary): Mention -fgnu89-inline.
      	(C Dialect Options): Document -fgnu89-inline.
      	* doc/extend.texi (Function Attributes): Explain what the
      	gnu_inline attribute does.
      	* doc/cpp.texi (Common Predefined Macros): Document
      	__GNUC_GNU_INLINE__ and __GNUC_STDC_INLINE__.
      
      From-SVN: r122565
      Ian Lance Taylor committed
  18. 21 Feb, 2007 1 commit
    • common.opt (Warray-bounds): Add Warning attribute. · 21af5cdf
      * common.opt (Warray-bounds): Add Warning attribute.
        (Wstrict-overflow, Wstrict-overflow=, Wcoverage-mismatch): Likewise.
        (fsized-zeroes): Add Optimization attribute.
        (fsplit-wide-types, ftree-scev-cprop): Likewise.
      * c.opt (Wc++0x-compat): Add Warning attribute.
      
      From-SVN: r122200
      Nick Clifton committed
  19. 19 Feb, 2007 1 commit
    • c.opt (Waddress): New. · c116cd05
      2007-02-19  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
      
      	* c.opt (Waddress): New.
      	* common.opt (Walways-true): Delete.
      	(Wstring-literal-comparison): Delete.
      	* doc/invoke.texi (Warning Options): Delete -Walways-true and
      	-Wstring-literal-comparison. Add -Waddress.
      	(Waddress): New.
      	(Walways-true): Delete.
      	(Wstring-literal-comparison): Delete.
      	* doc/extend.texi (#pragma GCC diagnostic): Use -Wformat
      	consistently instead of -Walways-true in example.
      	* c-opts.c (c_common_handle_option): -Waddress is enabled by -Wall.
      	* c-typeck.c (parser_build_binary_op): Replace
      	-Wstring-literal-comparison and -Walways-true with -Waddress.
      	* c-common.c (c_common_truthvalue_conversion): Replace -Walways-true
      	with -Waddress.
      
      cp/
      	* typeck.c (build_binary_op): Replace -Wstring-literal-comparison
      	and -Walways-true with -Waddress.
      	* cvt.c (convert_to_void): Replace unconditional warning with
      	-Waddress.
      
      testsuite/
      	* gcc.dg/20031012-1.c: Replace -Walways-true with -Waddress.
      	* gcc.dg/Walways-true-1.c: Likewise.
      	* gcc.dg/weak/weak-3.c: Likewise.
      	* gcc.dg/Werror-1.c: Likewise.
      	* gcc.dg/Werror-3.c: Likewise.
      	* gcc.dg/Werror-4.c: Likewise.
      	* gcc.dg/Werror-5.c: Likewise.
      	* gcc.dg/Werror-6.c: Likewise.
      	* gcc.dg/Werror-7.c: Likewise.
      	* gcc.dg/Werror-8.c: Likewise.
      	* gcc.dg/Werror-10.c: Likewise.
      	* gcc.dg/Werror-11.c: Likewise.
      	* gcc.dg/Werror-12.c: Likewise.
      	* g++.old-deja/g++.mike/warn8.C: Likewise.
      	* g++.dg/warn/Walways-true-1.C: Likewise.
      	* g++.dg/warn/Walways-true-2.C: Likewise.
      	* g++.dg/warn/noeffect8.C: Warn only with -Waddress.
      	* g++.dg/warn/Wstring-literal-comparison-1.C: Replace
      	-Wstring-literal-comparison with -Waddress.
      	* gcc.dg/Wstring-literal-comparison-4.c: Replace
      	-Wno-string-literal-comparison with -Wno-address.
      
      From-SVN: r122136
      Manuel López-Ibáñez committed
  20. 15 Feb, 2007 1 commit
    • re PR c/26494 (-pedantic-errors can be overridden by -W*) · dc90f45b
      2007-02-15  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
      
      	PR c/26494
      	* doc/invoke.texi (Warning Options): Remove
      	-Werror-implicit-function-declaration.
      	(Wimplicit-function-declaration): Update description.
      	* opts.c (common_handle_option): Move handling of -Werror=* to...
      	(enable_warning_as_error): ...here.
      	* opts.h (enable_warning_as_error): Declare.
      	* c-decl.c (implicit_decl_warning): Unless
      	-Wno-implicit-function-declaration is given, emit a pedwarn if
      	-std=c99 or emit a warning if -Wimplicit-function-declaration.
      	* c.opt (Wimplicit-function-declaration): Replace
      	mesg_implicit_function_declaration with
      	warn_implicit_function_declaration.
      	* c-opts.c (c_common_handle_option):
      	-Werror-implicit-function-declaration is exactly equal as
      	-Werror=implicit-function-declaration.
      	(set_Wimplicit): Replace mesg_implicit_function_declaration with
      	warn_implicit_function_declaration.
      	(c_common_post_options): -Wimplict-function-declaration is enabled
      	by default by -std=c99, otherwise is disabled by default.
      	* c-objc-common.c (c_objc_common_init): Remove flawed logic.
      testsuite/
      	* gcc.dg/Wimplicit-function-declaration-c89.c: New.
      	* gcc.dg/Wimplicit-function-declaration-c89-default.c: New.
      	* gcc.dg/Wimplicit-function-declaration-c89-pedantic.c: New.
      	* gcc.dg/Wimplicit-function-declaration-c99.c: New.
      	* gcc.dg/Wimplicit-function-declaration-c99-pedantic.c: New.
      	* gcc.dg/Werror-implicit-function-declaration.c: New.
      
      From-SVN: r122017
      Manuel López-Ibáñez committed
  21. 12 Feb, 2007 1 commit
    • invoke.texi (Overall Options): Document --help=. · c662432e
      * doc/invoke.texi (Overall Options): Document --help=.                                                        
      * gcc.c (target_help_flag): Rename to print_subprocess_flag.                                                  
        (cc1_options): Pass --help= on to cc1.                                                                      
        (display_help): Add description of --help=.                                                                 
        (process_command): Add code to handle --help=.  Allow translated                                            
        --help and --target-help switches to be passed on to compiler sub-process.                                                                                               
        (main): Remove unused if statement.                                                                         
      * opts.c (columns): Remove.                                                                                   
        (LEFT_COLUMN): Define.                                                                                      
        (wrap_help): Add columns argument.                                                                          
        (print_filtered_help): Change parameters to be an include bitmask,                                          
        an exclude bitmask, an any bitmask and the column width.  Move the                                          
        code to display the params list here.  Add code to display the                                              
        status of options rather than their descriptions if the quiet flag                                          
        is not active.                                                                                              
        (print_specific_help): Change parameters to be an include bitmask,                                          
        an exclude bitmask and an any bitmask.  Move code to look up the                                            
        column width here.  Decide upon the title for an options listing.                                           
        (common_handle_options): Add code to handle --help=.  Adapt code                                            
        for --help and --target-help to use the revised form of the                                                 
        print_specific_help function.                                                                               
        (print_help): Delete.                                                                                       
        (print_param_help): Delete.                                                                                 
        (print_switch): Delete.                                                                                     
      * opts.h (cl_lang_count): Add prototype.                                                                      
       (CL_PARAMS, CL_WARNING, CL_OPTIMIZATION, CL_MIN_OPTION_CLASS, CL_MAX_OPTION_CLASS): New defines.            
      * optc-gen.awk: Add construction of cl_lang_count.                                                            
      * c.opt: Add Warning attribute to warning options and Optimization attribute to optimization options.         
      * common.opt: Likewise.                                                                                       
        Add --help=.                                                                                                
        Add -fhelp and -ftarget-help as aliases for the transformed --help and --target-help options.               
      * opt-functions.awk: Add code to handle Warning and Optimization attributes.
      
      From-SVN: r121849
      Nick Clifton committed
  22. 25 Jan, 2007 1 commit
    • c-common.h (RID_FIRST_CXX0X): New. · e1f1ee86
      2007-01-24  Douglas Gregor  <dgregor@osl.iu.edu>
      
      	* c-common.h (RID_FIRST_CXX0X): New.
      	(RID_LAST_CXX0X): New.
      	* c-opts.c (c_common_handle_option): -Wc++0x-compat is triggered
      	by -Wall.
      	* c.opt (Wc++0x-compat): New.
      	* doc/invoke.texi (-Wc++0x-compat): Document.
      
      From-SVN: r121162
      Douglas Gregor committed
  23. 08 Jan, 2007 1 commit
    • c.opt: Add -flax-vector-conversions. · 00c8e9f6
      	gcc/
      	* c.opt: Add -flax-vector-conversions.
      	* c-typeck.c (convert_for_assignment): Pass flag to
      	vector_types_convertible_p to allow emission of note.
      	(digest_init): Likewise.
      	(comptypes_internal): Use vector_types_convertible_p.
      	* c-opts.c: Handle -flax-vector-conversions.
      	* c-common.c (flag_lax_vector_conversions): New.
      	(vector_types_convertible_p): Unless -flax-vector conversions
      	has been passed, disallow conversions between vectors with
      	differing numbers of subparts and/or element types.  If such
      	a conversion is disallowed, possibly emit a note on the first
      	occasion only to inform the user of -flax-vector-conversions.
      	The new last argument specifies this.
      	* c-common.h (flag_lax_vector_conversions): New.
      	(vector_types_convertible_p): Add extra argument.
      	* config/i386/i386.c (ix86_init_mmx_sse_builtins): Use
      	char_type_node for V*QI type vectors.
      	* config/rs6000/rs6000-c.c (altivec_overloaded_builtins):
      	Update to satisfy new typechecking rules.
      	* config/rs6000/altivec.h (vec_cmple): Use vec_cmpge.
      	* doc/invoke.texi (C Dialect Options): Document
      	-flax-vector-conversions.
      
      	gcc/cp/
      	* call.c (standard_conversion): Pass flag to
      	vector_types_convertible_p to disallow emission of note.
      	* typeck.c (convert_for_assignment): Pass flag to
      	vector_types_convertible_p to allow emission of note.
      	(ptr_reasonably_similar): Pass flag to vector_types_convertible_p
      	to disallow emission of note.
      
      	gcc/testsuite/
      	* gcc.target/i386/20020531-1.c: Use "char" not "unsigned char"
      	in __v8qi typedef.
      	* gcc.target/powerpc/altivec-vec-merge.c (foo): Add casts.
      	* gcc.dg/simd-1.c: Update dg-error directives to reflect new
      	compiler behaviour.
      	* gcc.dg/simd-5.c: Likewise.
      	* gcc.dg/simd-6.c: Likewise.
      	* g++.dg/conversion/simd1.C: Likewise.
      	* g++.dg/conversion/simd3.C: Likewise.
      	* g++.dg/ext/attribute-test-2.C (data): Add "vs" member.
      	(main): Use it.
      
      From-SVN: r120572
      Mark Shinwell committed
  24. 02 Jan, 2007 1 commit
    • re PR middle-end/7651 (Define -Wextra strictly in terms of other warning flags) · b1ed4cb4
      2007-01-02  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
      
      	PR middle-end/7651
      	* c.opt (Wold-style-declaration): New.
      	* doc/invoke.texi (C-only Warning Options): New.
      	(Wold-style-declaration): Document it.
      	(Wextra): Enabled by -Wextra.
      	* c-opts.c (c_common_post_options): Enabled by -Wextra.
      	* c-decl.c (declspecs_add_scspec): Replace -Wextra with
      	-Wold-style-declaration.
      
      testsuite/
      	* gcc.dg/declspec-3.c: Replace -W with -Wold-style-declaration.
      	* gcc.dg/declspec-3-Wextra.c: New.
      	* gcc.dg/declspec-3-no.c: New
      
      From-SVN: r120347
      Manuel López-Ibáñez committed
  25. 23 Dec, 2006 1 commit
    • re PR middle-end/7651 (Define -Wextra strictly in terms of other warning flags) · cb4af25a
      2006-12-23  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
      
      	PR middle-end/7651
      	* c.opt (Wmissing-parameter-type): New.
      	* doc/invoke.texi (Wmissing-parameter-type): Document it.
      	(Wextra): Enabled by -Wextra.
      	* c-opts.c (c_common_post_options): Enabled by -Wextra.
      	* c-decl.c (store_parm_decls_oldstyle): Replace Wextra with
      	Wmissing-parameter-type.
      	
      testsuite/
      
      	* gcc.dg/Wmissing-parameter-type.c: New.
      	* gcc.dg/Wmissing-parameter-type-Wextra.c: New.
      	* gcc.dg/Wmissing-parameter-type-no.c: New.
      
      From-SVN: r120173
      Manuel López-Ibáñez committed
  26. 22 Dec, 2006 1 commit
    • re PR middle-end/7651 (Define -Wextra strictly in terms of other warning flags) · 2b001724
      2006-12-22  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
      
      	PR middle-end/7651
      	* c.opt (Wclobbered): New.
      	* doc/invoke.texi (Wclobbered): Document it.
      	(Wextra): Enabled by -Wextra.
      	* c-opts.c (c_common_post_options): Enabled by -Wextra.
      	* flow.c (rest_of_handle_life): Replace Wextra with Wclobbered.
      	* function.c (setjmp_vars_warning): Only warn for Wclobbered.
      	(setjmp_args_warning): Likewise.
      
      testsuite/
      
      	* gcc.dg/attr-returns_twice-1.c: Replace Wextra with Wclobbered.
      	* gcc.dg/setjmp-1.c: Add explicit Wclobbered.
      
      From-SVN: r120151
      Manuel López-Ibáñez committed
  27. 18 Dec, 2006 1 commit
    • c.opt (Wmissing-declarations): Add C++ and ObjC++. · dfdec7a7
      ./:	* c.opt (Wmissing-declarations): Add C++ and ObjC++.
      	* doc/invoke.texi (Warning Options): -Wmissing-declarations now
      	works for C++.
      cp/:
      	* decl.c (start_preparsed_function): Add support for
      	-Wmissing-declarations.
      testsuite:
      	* g++.dg/warn/Wmissing-declarations-1.C: New test.
      
      From-SVN: r120012
      Ian Lance Taylor committed
  28. 16 Dec, 2006 1 commit
    • re PR middle-end/7651 (Define -Wextra strictly in terms of other warning flags) · b3b433c5
      2006-12-16  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
      
      	PR middle-end/7651
      	* c.opt (Wempty-body): New.
      	* doc/invoke.texi (Wempty-body): Document it.
      	(Wextra): Enabled by -Wextra.
      	* c-opts.c (c_common_post_options): Enabled by -Wextra.
      	* c-common.c (empty_body_warning): Replace Wextra with Wempty-body.
      	* c-parser.c (c_parser_c99_block_statement): Likewise.
      testsuite/
      	* gcc.dg/20001116-1.c: Replace -Wextra with -Wempty-body.
      	* gcc.dg/if-empty-1.c: Likewise.
      	* gcc.dg/pr23165.c: Likewise.
      	* g++.dg/warn/empty-body.C: Likewise.
      
      From-SVN: r119963
      Manuel López-Ibáñez committed
  29. 25 Nov, 2006 1 commit
  30. 23 Nov, 2006 1 commit
    • re PR c/9072 (-Wconversion should be split into two distinct flags) · 05170031
      2006-11-23  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
      
      	PR c/9072 
      	* c.opt (Wtraditional-conversion): New.
      	(Wconversion): Update description.
      	* c-typeck.c (convert_arguments): Warnings for prototypes causing
      	type conversions different from what would happen in the absence
      	of prototype are now handled by Wtraditional-conversion.
      	* doc/invoke.texi (Wtraditional-conversion): New.
      	(Wconversion): Update description.
      	* doc/trouble.texi (Wconversion): Replace Wconversion by
      	Wtraditional-conversion.
      
      testsuite/
      
      	PR c/9072 
      	* gcc.dg/builtin-protos-1.c: Replace Wconversion by
      	Wtraditional-conversion.
      	* gcc.dg/overflow-warn-2.c: Likewise.
      	* gcc.dg/Wconversion.c: Likewise. Renamed as
      	Wtraditional-conversion.c .
      	* gcc.dg/Wconversion-2.c: Likewise. Renamed as
      	Wtraditional-conversion-2.c .
      	* gcc.dg/dfp/Wconversion-2.c: Likewise. Renamed as
      	Wtraditional-conversion-2.c 
      	* gcc.dg/Wconversion-negative-constants.c: New.
      
      From-SVN: r119129
      Manuel López-Ibáñez committed
  31. 01 Nov, 2006 1 commit
    • c-common.c (flag_cpp0x): New. · 966541e3
      2006-11-01	Douglas Gregor <doug.gregor@gmail.com>
      
      	* c-common.c (flag_cpp0x): New.
      	* c-common.h (flag_cpp0x): New.
      	* c-cppbuiltin.c (c_cpp_builtins): If C++0x extensions are
      	supported, define __GXX_EXPERIMENTAL_CPP0X__.
      	* c-opts.c (set_std_cxx0x): New.
      	(c_common_handle_option): Handle -std=c++0x, -std=gnu++0x.
      	* c.opt (std=c++0x): Document.
      	(std=gnu++0x): Ditto.
      	* doc/cpp.texi: Document __GXX_EXPERIMENTAL_CPP0X__.
      	* doc/invoke.texi: Document -std=c++0x, -std=gnu++0x.
      
      From-SVN: r118386
      Doug Gregor committed
  32. 30 Sep, 2006 1 commit
    • re PR c/24010 (Duplicate C99 dot initializer warning missing) · 7ed322d7
      	PR c/24010
      	* c.opt (Woverride-init): New.
      	* c-opts.c (c_common_post_options): Default warn_override_init to
      	extra_warnings.
      	* c-typeck.c (add_pending_init, output_init_element): Warn for
      	overriding initializers without side effects.
      	* doc/invoke.texi (-Woverride-init): Document.
      	(-Wextra): Update.
      
      testsuite:
      	* gcc.dg/Woverride-init-1.c, gcc.dg/Woverride-init-2.c,
      	gcc.dg/Woverride-init-3.c: New tests.
      
      From-SVN: r117334
      Joseph Myers committed
  33. 18 May, 2006 1 commit
  34. 24 Feb, 2006 1 commit
    • Index: gcc/ChangeLog · c7b5e395
      2006-02-24  Geoffrey Keating  <geoffk@apple.com>
      
      	* doc/tm.texi (Run-time Target): Document C_COMMON_OVERRIDE_OPTIONS.
      	* doc/invoke.texi (C++ Dialect Options): Document 
      	-fno-use-cxa-get-exception-ptr.
      	* configure.ac: Define DEFAULT_USE_CXA_ATEXIT to 2 not 1.
      	* configure: Regenerate.
      	* c.opt (fuse-cxa-get-exception-ptr): New.
      	* c-opts.c (c_common_handle_option): Handle
      	OPT_fuse_cxa_get_exception_ptr.
      	* c-common.c (flag_use_cxa_atexit): Update documentation.
      	(flag_use_cxa_get_exception_ptr): New.
      	* c-common.h (flag_use_cxa_get_exception_ptr): New.
      	* config/rs6000/darwin.h (SUBTARGET_OVERRIDE_OPTIONS): Improve
      	documentation.
      	(C_COMMON_OVERRIDE_OPTIONS): New.
      
      Index: gcc/testsuite/ChangeLog
      2006-02-24  Geoffrey Keating  <geoffk@apple.com>
      
      	* g++.dg/eh/uncaught1.C: Add dg-options for ppc-darwin.
      	* g++.dg/eh/uncaught2.C: New.
      	* g++.dg/eh/uncaught3.C: New.
      
      Index: gcc/cp/ChangeLog
      2006-02-24  Geoffrey Keating  <geoffk@apple.com>
      
      	* except.c (expand_start_catch_block): Handle
      	flag_use_cxa_get_exception_ptr.
      
      From-SVN: r111427
      Geoffrey Keating committed
  35. 13 Feb, 2006 1 commit
    • invoke.texi (-Write-strings): Document that it is enabled by default. · d539b114
      2006-02-12  Gabriel Dos Reis  <gdr@integrable-solutions.net>
      
              * doc/invoke.texi (-Write-strings): Document that it is
      	enabled by
              default. 
              * c.opt (-Wwrite-strings): Declare variable
      	warn_write_strings.
              Clarify documentation.
              * c-common.h (warn_write_strings): Remove.
              * c-common.c (warn_write_strings): Likewise.
              * c-opts.c (c_common_init_options): Enable -Wwrite-strings by
              default for C++.
      
      testsuite/
      2006-02-12  Gabriel Dos Reis  <gdr@integrable-solutions.net>
      
              * g++.dg/warn/no-write-strings.C: New test.
              * g++.dg/warn/write-strings.C: Likewise.
              * g++.dg/warn/write-strings-default.C: Likewise.
      
      From-SVN: r110907
      Gabriel Dos Reis committed
  36. 09 Feb, 2006 1 commit
    • c-common.h (flag_const_strings): Don't declare. · cfb10bd3
      2006-02-09  Gabriel Dos Reis  <gdr@integrable-solutions.net>
      
              * c-common.h (flag_const_strings): Don't declare.
              * c-common.c (flag_const_strings): Remove.
              * c.opt (fconst_strings): Remove.
              * c-opts.c (c_common_handle_option): Remove
              * <OPT_fconst_strings>.
              <OPT_Wwrite_strings>: Don't set flag_const_strings.
              (c_common_init_options): Don't set flag_const_strings.
              * doc/invoke.texi (-fno-const-strings): Remove documentation.
      
      cp/
      2006-02-09  Gabriel Dos Reis  <gdr@integrable-solutions.net>
      
              * typeck.c (string_conv_p): Don't test for flag_const_strings.
      
      testsuite/ 
      2006-02-09  Gabriel Dos Reis  <gdr@integrable-solutions.net>
      
              * g++.old-deja/g++.benjamin/15351-2.C: Likewise.
              * g++.old-deja/g++.benjamin/15351-1.C: Remove.
      
      From-SVN: r110804
      Gabriel Dos Reis committed
  37. 07 Feb, 2006 1 commit
    • c.opt: C++ frontend supports -Wdiv-by-zero. · 1104b28b
      2006-02-07  Dirk Mueller <dmueller@suse.com>
      
              * c.opt: C++ frontend supports -Wdiv-by-zero.
              * c-opts.c (c_common_handle_option): Remove dead case.
      
              * typeck.c (build_binary_op): Annotate div-by-zero
              warnings to make -Wno-div-by-zero have an effect.
      
              g++.dg/warn/Wdiv-by-zero.C: New test.
              g++.dg/warn/Wno-div-by-zero.C: New.
      
      From-SVN: r110712
      Dirk Mueller committed
  38. 29 Jan, 2006 1 commit
    • c.opt: Add -W(no-)overlength-strings. · 89a42ac8
      gcc:
      	* c.opt: Add -W(no-)overlength-strings.
      	* doc/invoke.texi: Document it.
      	* c-opts.c (c_common_handle_option): -pedantic implies
      	-Woverlength-strings, if not explicitly disabled already.
      	(c_common_post_options): -Woverlength-strings defaults to off, and
      	is always off for C++.
      	* c-common.c (fix_string_type): Issue warning about strings longer
      	than is portable only if warn_overlength_strings.  Rearrange code
      	a little for clarity.
      	* configure.in: Check for -Wno-overlength-strings as well before
      	enabling -pedantic in stage 1.
      	* Makefile.in (STRICT2_WARN): Add -Wno-overlength-strings.
      	(gcc.o-warn, insn-automata.o-warn, build/gencondmd.o-warn): Delete.
      
      	* genconditions.c (write_header, write_one_condition)
      	(write_conditions, write_writer): Consolidate very long strings
      	that were broken up to fit in C89 portable limit.  Don't use
      	printf when fputs will do.
      
      gcc/testsuite:
      	* gcc.dg/Woverlength-strings.c
      	* gcc.dg/Woverlength-strings-pedantic-c89.c
      	* gcc.dg/Woverlength-strings-pedantic-c89-no.c
      	* gcc.dg/Woverlength-strings-pedantic-c99.c
      	* gcc.dg/Woverlength-strings-pedantic-c99-no.c: New tests.
      
      ==================================================================
      
      From-SVN: r110360
      Zack Weinberg committed
  39. 26 Jan, 2006 1 commit
    • re PR c/25892 (-Wpointer-sign creates problems for Emacs) · f4e9414e
      gcc/ChangeLog:
      PR c/25892
      * c.opt (Wpointer-sign): Init to -1.
      * c-opts.c (c_common_handle_option): Set to 1 on OPT_Wall and
      OPT_pedantic, to 0 otherwise.
      * doc/invoke.texi: Update.
      gcc/testsuite/ChangeLog:
      PR c/25892
      * gcc.dg/Wpointer-sign.c: New.
      * gcc.dg/Wpointer-sign-Wall.c: New.
      * gcc.dg/Wpointer-sign-Wall-no.c: New.
      * gcc.dg/Wpointer-sign-pedantic.c: New.
      * gcc.dg/Wpointer-sign-pedantic-no.c: New.
      * gcc.dg/conv-2.c: Use -Wpointer-sign.
      
      From-SVN: r110265
      Alexandre Oliva committed
  40. 20 Jan, 2006 1 commit
    • re PR libstdc++/25524 (libstdc++ headers should go in multilib directories) · 2b6dd222
      	PR libstdc++/25524
      	* cppdefault.h (struct default_include): Add multilib flag.
      	* cppdefault.c (cpp_include_defaults): Set it.
      	* c.opt (-imultilib): New option.
      	* c-opts.c (imultilib): New.
      	(c_common_handle_option): Handle -imultilib.
      	(c_common_post_options): Likewise.
      	* c-incpath.c (add_standard_paths, register_include_chains):
      	Likewise.
      	* c-incpath.h (register_include_chains): Add extra parameter.
      	* gcc.c (do_spec_1): Generate -imultilib option.
      	(The Specs Language): Update %I description.
      	(process_command): Update copyright notice.
      	* doc/cppopts.texi (-imultilib): Document.
      	* doc/invoke.texi (-imultilib): Include in option summary.
      	(%I): Update specs documentation.
      
      libstdc++-v3:
      	* include/Makefile.am: Install host-specific headers in multilib
      	subdirectory.
      	* include/Makefile.in: Regenerate.
      
      From-SVN: r110037
      Joseph Myers committed