aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-opts.c
AgeCommit message (Collapse)AuthorFilesLines
2007-07-11re PR middle-end/30482 (<complex> division by 0)Paolo Carlini1-5/+3
2007-07-11 Paolo Carlini <pcarlini@suse.de> PR middle-end/30482 * c-opts.c (c_common_post_options): Do not change flag_complex_method conditional to flag_isoc99. (c_common_init_options): Do it here, unconditionally. From-SVN: r126546
2007-07-08revert: c-opts.c (c_common_handle_option): Make DOLLARS_IN_IDENTIFIERS apply ↵Sandra Loosemore1-0/+1
to assembly language, too. 2007-07-08 Sandra Loosemore <sandra@codesourcery.com> Revert this patch: 2007-07-06 Sandra Loosemore <sandra@codesourcery.com> * c-opts.c (c_common_handle_option): Make DOLLARS_IN_IDENTIFIERS apply to assembly language, too. * doc/tm.texi (DOLLARS_IN_IDENTIFIERS): Update. From-SVN: r126458
2007-07-06c-opts.c (c_common_handle_option): Make DOLLARS_IN_IDENTIFIERS apply to ↵Sandra Loosemore1-1/+0
assembly language, too. 2007-07-06 Sandra Loosemore <sandra@codesourcery.com> gcc/ * c-opts.c (c_common_handle_option): Make DOLLARS_IN_IDENTIFIERS apply to assembly language, too. * doc/tm.texi (DOLLARS_IN_IDENTIFIERS): Update. From-SVN: r126427
2007-06-07re PR c++/30759 (initializer-list accepted for object of non-POD type)Simon Martin1-2/+3
gcc/ 2007-06-07 Simon Martin <simartin@users.sourceforge.net> PR c++/30759 * c-common.h (flag_cpp0x): Replaced by... (cxx_dialect): ... this new variable specifying the C++ dialect that is used. * c-common.c (flag_cpp0x): Removed. (cxx_dialect): Defined. * c-cppbuiltin.c (c_cpp_builtins): flag_cpp0x rewritten in terms of cxx_dialect. * c-opts.c (c_common_post_options): Likewise. (set_std_cxx98): Set cxx_dialect to cxx98. (set_std_cxx0x): Set cxx_dialect to cxx0x. gcc/cp/ 2007-06-07 Simon Martin <simartin@users.sourceforge.net> PR c++/30759 * decl.c (check_initializer): Report an error when a brace enclosed initializer is used for a non-aggregate type in C++98. (redeclaration_error_message): Rewrote flag_cpp0x in terms of cxx_dialect. (grokdeclarator): Likewise. (move_fn_p): Likewise. * typeck.c (check_return_expr): Likewise. * call.c (reference_binding): Likewise. * error.c (cp_cpp_error): Likewise. * pt.c (check_default_tmpl_args): Likewise. (tsubst): Likewise. * lex.c (init_reswords): Likewise. * parser.c (p_parser_primary_expression): Likewise. (TOKEN_PRECEDENCE): Likewise. (cp_parser_init_declarator): Likewise. (cp_parser_ptr_operator): Likewise. (cp_parser_parameter_declaration): Likewise. (cp_parser_enclosed_template_argument_list): Likewise. (cp_parser_skip_to_end_of_template_parameter_list): Likewise. (cp_parser_next_token_ends_template_argument_p): Likewise. gcc/testsuite/ 2007-06-07 Simon Martin <simartin@users.sourceforge.net> PR c++/30759 * g++.dg/init/brace6.C: New test. From-SVN: r125539
2007-05-20re PR middle-end/7651 (Define -Wextra strictly in terms of other warning flags)Manuel López-Ibáñez1-1/+4
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
2007-05-19invoke.texi (Warning Options): Add -Wconversion-sign.Manuel López-Ibáñez1-1/+8
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
2007-05-11Makefile.in (OBJS-common): Add tree-ssa-alias-warnings.o.Silvius Rus1-1/+1
gcc/ * Makefile.in (OBJS-common): Add tree-ssa-alias-warnings.o. * c-common.c (strict_aliasing_warning): Modify -Wstrict-aliasing logic. * c-common.h (strict_aliasing_warning): Change return type. * c-opts.c (c_common_handle_option): Add call to set_Wstrict_aliasing. * c-typeck.c (build_indirect_ref): Add call to strict_aliasing_warning. (build_c_cast): Condition call to strict_aliasing_warning. * doc/invoke.texi: Update description of -Wstrict-aliasing[=n]. * flags.h (set_Wstrict_aliasing): Declare. * opts.c (set_Wstrict_alising): Define, add call to. * tree-flow.h (strict_aliasing_warning_backend): Declare. * tree-ssa-alias-warnings.c: New file. * tree-ssa-alias.c (compute_may_aliases): Add call to strict_aliasing_warning_backend. gcc/cp * cp/typeck.c (build_indirect_ref): Add call to strict_aliasing_warning. (build_reinterpret_cast_1): Condition call to strict_aliasing_warning. gcc/testsuite * gcc.dg/Wstrict-aliasing-bogus-const-ptr-nonconst-ptr.c: New test. * gcc.dg/Wstrict-aliasing-bogus-never-dereferenced.c: New test. * gcc.dg/Wstrict-aliasing-bogus-struct-included.c: New test. * gcc.dg/Wstrict-aliasing-converted-assigned.c: New test. * gcc.dg/Wstrict-aliasing-float-ptr-int-obj.c: New test. * gcc.dg/alias-1.c: Update option: -Wstrict-aliasing=2. * gcc.dg/alias-9.c: Update option: -Wstrict-aliasing=2. * g++.dg/warn/Wstrict-aliasing-7.C: Update option: -Wstrict-aliasing=2. * g++.dg/warn/Wstrict-aliasing-bogus-base-derived.C: New test. * g++.dg/warn/Wstrict-aliasing-bogus-char-1.C: New test. * g++.dg/warn/Wstrict-aliasing-bogus-const.C: New test. * g++.dg/warn/Wstrict-aliasing-bogus-nested-arrays.C: New test. * g++.dg/warn/Wstrict-aliasing-bogus-signed-unsigned.C: New test. * g++.dg/warn/Wstrict-aliasing-bogus-struct-included.C: New test. * g++.dg/warn/Wstrict-aliasing-bogus-union.C: New test. * g++.dg/warn/Wstrict-aliasing-float-ref-int-obj.C: New test. From-SVN: r124622
2007-05-07re PR driver/31694 (__GFORTRAN__ preprocessor macro)Francois-Xavier Coudert1-1/+1
PR driver/31694 * c-opts.c (lang_fortran): Make it non static. * c-common.h (lang_fortran): New prototype. * c-cppbuiltin.c (c_cpp_builtins): Create a __GFORTRAN__ if the -lang-fortran option was passed by the driver. From-SVN: r124495
2007-04-17invoke.texi (Debugging Options): Add documentation for the ↵Lawrence Crowl1-0/+12
-femit-struct-debug options... ./: * 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
2007-04-07Separate NUL byte detection from rest of -Wformat warningsBruce Korb1-0/+2
From-SVN: r123640
2007-03-15re PR c++/24924 (front end and preprocessor pedantic_errors settings should ↵Manuel López-Ibáñez1-0/+17
agree) 2007-03-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org> PR c++/24924 * c-opts.c (c_common_post_options): Handle C++ post-processing here. Set also -pedantic-errors by default for the preprocessor unless -fpermissive is given. cp/ * decl.c (cxx_init_decl_processing): Move command-line options processing to c-opts.c. testsuite/ * g++.dg/cpp/pedantic-errors.C: New. * g++.dg/cpp/permissive.C: New. From-SVN: r122961
2007-03-06c-common.c (targetcm): Add.Mike Stump1-1/+7
* c-common.c (targetcm): Add. * c-opts.c (c_common_handle_option): Handle language specific target options. * opts.c (handle_option): Verify language for target options, if any are given. * opth-gen.awk: Add CL_LANG_ALL. * target-def.h (TARGET_HANDLE_C_OPTION): Add. (TARGETCM_INITIALIZER): Add. * target.h (struct gcc_targetcm): Add. (targetcm): Add. * targhooks.c (default_handle_c_option): Add. * targhooks.h (default_handle_c_option): Add. * doc/tm.texi (TARGET_HANDLE_C_OPTION): Add. * config/darwin.opt (iframework): Add. * config/darwin.h (TARGET_HAS_TARGETCM): Add. * config/darwin-c.c (handle_c_option): Add. (TARGET_HANDLE_C_OPTION): Add. (targetcm): Add. * doc/invoke.texi (Darwin Options): Add -iframework. From-SVN: r122590
2007-03-05c.opt (fgnu89-inline): New option.Ian Lance Taylor1-0/+7
* 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
2007-02-19c.opt (Waddress): New.Manuel López-Ibáñez1-2/+1
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
2007-02-15re PR c/26494 (-pedantic-errors can be overridden by -W*)Manuel López-Ibáñez1-9/+9
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
2007-02-13common.opt: Add Wstrict-overflow and Wstrict-overflow=.Ian Lance Taylor1-1/+3
./: * common.opt: Add Wstrict-overflow and Wstrict-overflow=. * flags.h (warn_strict_overflow): Declare. (enum warn_strict_overflow_code): Define. (issue_strict_overflow_warning): New static inline function. * opts.c (warn_strict_overflow): New variable. (common_handle_option): Handle OPT_Wstrict_overflow and OPT_Wstrict_overflow_. * c-opts.c (c_common_handle_option): Set warn_strict_overflow for OPT_Wall. * fold-const.c: Include intl.h. (fold_deferring_overflow_warnings): New static variable. (fold_deferred_overflow_warning): New static variable. (fold_deferred_overflow_code): New static variable. (fold_defer_overflow_warnings): New function. (fold_undefer_overflow_warnings): New function. (fold_undefer_and_ignore_overflow_warnings): New function. (fold_deferring_overflow_warnings_p): New function. (fold_overflow_warning): New static function. (make_range): Add strict_overflow_p parameter. Change all callers. (extract_muldiv, extract_muldiv_1): Likewise. (fold_unary) [ABS_EXPR]: Check ABS_EXPR before calling tree_expr_nonnegative_p. (fold_negate_expr): Call fold_overflow_warning. (fold_range_test): Likewise. (fold_comparison): Likewise. (fold_binary): Likewise. Call tree_expr_nonnegative_warnv_p instead of tree_expr_nonnegative_p. (tree_expr_nonnegative_warnv_p): Rename from tree_expr_nonnegative_p, add strict_overflow_p parameter. (tree_expr_nonnegative_p): New function. (tree_expr_nonzero_warnv_p): Rename from tree_expr_nonzero_p, add strict_overflow_p parameter. (tree_expr_nonzero_p): New function. * passes.c (verify_interpass_invariants): New static function. (execute_one_pass): Call it. * tree-ssa-loop-niter.c (expand_simple_operations): Ignore fold warnings. (number_of_iterations_exit, loop_niter_by_eval): Likewise. (estimate_numbers_of_iterations): Likewise. (scev_probably_wraps_p): Likewise. * tree-ssa-ccp.c: Include "toplev.h". (evaluate_stmt): Defer fold overflow warnings until we know we are going to optimize. (struct fold_stmt_r_data): Add stmt field. (fold_stmt_r): Defer fold overflow warnings until we know we optimized. (fold_stmt): Initialize stmt field of fold_stmt_r_data. (fold_stmt_inplace): Likewise. * tree-cfgcleanup.c: Include "toplev.h" rather than "errors.h". (cleanup_control_expr_graph): Defer fold overflow warnings until we know we are going to optimize. * tree-cfg.c (fold_cond_expr_cond): Likewise. * tree-ssa-threadedge.c (simplify_control_stmt_condition): Likewise. * tree-vrp.c (vrp_expr_computes_nonnegative): Call tree_expr_nonnegative_warnv_p instead of tree_expr_nonnegative_p. * tree-ssa-loop-manip.c (create_iv): Likewise. * c-typeck.c (build_conditional_expr): Likewise. (build_binary_op): Likewise. * tree-vrp.c (vrp_expr_computes_nonzero): Call tree_expr_nonzero_warnv_p instead of tree_expr_nonzero_p. (extract_range_from_unary_expr): Likewise. * simplify-rtx.c (simplify_const_relational_operation): Warn when assuming that signed overflow does not occur. * c-common.c (pointer_int_sum): Ignore fold overflow warnings. * tree.h (tree_expr_nonnegative_warnv_p): Declare. (fold_defer_overflow_warnings): Declare. (fold_undefer_overflow_warnings): Declare. (fold_undefer_and_ignore_overflow_warnings): Declare. (fold_deferring_overflow_warnings_p): Declare. (tree_expr_nonzero_warnv_p): Declare. * doc/invoke.texi (Option Summary): Add -Wstrict-overflow to list of warning options. (Warning Options): Document -Wstrict-overflow. * Makefile.in (tree-ssa-threadedge.o): Depend on toplev.h. (tree-ssa-ccp.o): Likewise. (tree-cfgcleanup.o): Change errors.h dependency to toplev.h. (fold-const.o): Depend on intl.h. testsuite/: * gcc.dg/Wstrict-overflow-1.c: New test. * gcc.dg/Wstrict-overflow-2.c: New test. * gcc.dg/Wstrict-overflow-3.c: New test. * gcc.dg/Wstrict-overflow-4.c: New test. * gcc.dg/Wstrict-overflow-5.c: New test. * gcc.dg/Wstrict-overflow-6.c: New test. * gcc.dg/Wstrict-overflow-7.c: New test. * gcc.dg/Wstrict-overflow-8.c: New test. * gcc.dg/Wstrict-overflow-9.c: New test. * gcc.dg/Wstrict-overflow-10.c: New test. From-SVN: r121895
2007-02-04c-opts.c (c_common_post_options): If C++0x mode is enabled, don't warn about ↵Douglas Gregor1-0/+5
C++0x compatibility. 2007-02-03 Douglas Gregor <doug.gregor@gmail.com> * c-opts.c (c_common_post_options): If C++0x mode is enabled, don't warn about C++0x compatibility. From-SVN: r121564
2007-01-25c-common.h (RID_FIRST_CXX0X): New.Douglas Gregor1-0/+1
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
2007-01-18· Richard Guenther <rguenther@suse.de>Dirk Mueller1-0/+1
2007-01-18 Dirk Mueller <dmueller@suse.de> · Richard Guenther <rguenther@suse.de> · PR diagnostic/8268 · * doc/invoke.texi (Warray-bounds): Document -Warray-bounds. · * common.opt (Warray-bounds): Add new warning option. · * c-opts.c (c_common_handle_option): Define -Warray-bounds · if -Wall is given. * Makefile.in: make tree-vrp.o depend on toplev.h · * tree-vrp.c (vrp_finalize): Call check_array_refs if -Warray-bounds · is enabled. · (check_array_refs, check_array_bounds, check_array_ref): New. · * gcc.dg/Warray-bounds.c: New testcase. * gcc.dg/Warray-bounds-2.c: New testcase. * g++.dg/warn/Warray-bounds.C: New testcase. * g++.dg/warn/Warray-bounds-2.C: New testcase. From-SVN: r120898
2007-01-08c.opt: Add -flax-vector-conversions.Mark Shinwell1-0/+4
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
2007-01-02re PR middle-end/7651 (Define -Wextra strictly in terms of other warning flags)Manuel López-Ibáñez1-1/+4
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
2006-12-23re PR middle-end/7651 (Define -Wextra strictly in terms of other warning flags)Manuel López-Ibáñez1-1/+3
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
2006-12-22re PR middle-end/7651 (Define -Wextra strictly in terms of other warning flags)Manuel López-Ibáñez1-1/+3
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
2006-12-16re PR middle-end/7651 (Define -Wextra strictly in terms of other warning flags)Manuel López-Ibáñez1-2/+5
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
2006-12-10c-opts.c (c_common_parse_file): Unconditionally give a warning, suitable for ↵Zack Weinberg1-7/+19
the language, if set_yydebug is true. * c-opts.c (c_common_parse_file): Unconditionally give a warning, suitable for the language, if set_yydebug is true. * c-pragma.h: Define enum pragma_omp_clause here. Don't define YYDEBUG or declare yydebug. * c-parser.c (yydebug, enum pragma_omp_clause): Delete. * cp/parser.c: Likewise. From-SVN: r119704
2006-11-20re PR c++/8586 (-Wwrite-strings should be included in -Wall)Gabriel Dos Reis1-0/+2
2006-11-19 Gabriel Dos Reis <gdr@integrable-solutions.net> PR c++/8586 * c-opts.c (c_common_handle_option): Enable -Wwrite-strings if -Wall. testsuite/ 2006-11-19 Gabriel Dos Reis <gdr@integrable-solutions.net> PR c++/8586 * g++.dg/warn/Wall-write-strings.C: New. From-SVN: r119009
2006-11-01c-common.c (flag_cpp0x): New.Doug Gregor1-1/+19
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
2006-09-30re PR c/24010 (Duplicate C99 dot initializer warning missing)Joseph Myers1-2/+4
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
2006-09-17re PR c/25993 (-std= produces incorrect preprocessor output for .S)Steven Bosscher1-5/+14
gcc/ PR c/25993 * c-opts.c (c_common_handle_option): Ignore the -std options if the input language is assembly. testsuite/ PR c/25993 * gcc.dg/pr25993.c: New test. From-SVN: r117005
2006-06-01Suppress extra '#1 <built-in> or '#1 <command line>' on -dD output.Per Bothner1-1/+4
* c-opts.c (finish_options): Use internal line 0 for <command-line>. * c-ppoutput.c (cb_define): Don't increment line 0. From-SVN: r114311
2006-05-18Whitespace fixupsMike Stump1-3/+3
From-SVN: r113893
2006-02-24Index: gcc/ChangeLogGeoffrey Keating1-0/+10
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
2006-02-13invoke.texi (-Write-strings): Document that it is enabled by default.Gabriel Dos Reis1-0/+1
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
2006-02-09c-common.h (flag_const_strings): Don't declare.Gabriel Dos Reis1-9/+1
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
2006-02-07c.opt: C++ frontend supports -Wdiv-by-zero.Dirk Mueller1-4/+0
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
2006-01-29c.opt: Add -W(no-)overlength-strings.Zack Weinberg1-0/+8
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
2006-01-26re PR c/25892 (-Wpointer-sign creates problems for Emacs)Alexandre Oliva1-0/+10
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
2006-01-22re PR c++/16190 (-Wnon-virtual-dtor, in -Wall, silenced only by pessimizing ↵Gabriel Dos Reis1-1/+6
code) PR c++/16190 * c-opts.c (c_common_handle_option): Don't include -Wnon-virtual-dtor in -Wall; enable if -Weffc++. * doc/invoke.texi (C++ Dialect Options): Document that -Wnon-virtual-dtor is no longer included in -Wall. From-SVN: r110085
2006-01-20re PR libstdc++/25524 (libstdc++ headers should go in multilib directories)Joseph Myers1-2/+9
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
2005-12-14c-common.c (c_common_truthvalue_conversion): Generalise warning for ↵Ben Elliston1-0/+1
addresses converted to booleans; not just function addresses. * c-common.c (c_common_truthvalue_conversion): Generalise warning for addresses converted to booleans; not just function addresses. * c-typeck.c (build_binary_op): Warn for address comparisons which can never be NULL (eg. func == NULL or &var == NULL). * common.opt (Walways-true): New option. * c-opts.c (c_common_handle_option): Set it with -Wall. * doc/invoke.texi: Document it. testsuite/ * gcc.dg/warn-addr-cmp.c: New test. From-SVN: r108489
2005-12-04re PR c/7776 (const char* p = "foo"; if (p == "foo") ... is compiled without ↵Roger Sayle1-0/+1
warning!) PR c/7776 * common.opt (Wstring-literal-comparison): New command line option. * c-opts.c (c_common_handle_option): Set it with -Wall. * c-typeck.c (parser_build_binary_op): Issue warning if either operand of a comparison operator is a string literal, except for testing equality or inequality against NULL. * doc/invoke.texi: Document new -Wstring-literal-comparison option. * gcc.dg/Wstring-literal-comparison-1.c: New test case. * gcc.dg/Wstring-literal-comparison-2.c: Likewise. * gcc.dg/Wstring-literal-comparison-3.c: Likewise. * gcc.dg/Wstring-literal-comparison-4.c: Likewise. From-SVN: r108018
2005-11-04re PR fortran/18452 (Fortran options induces warning for fortran that needs ↵Francois-Xavier Coudert1-7/+20
preprocessing) PR fortran/18452 * gcc/fortran/lang-specs.h: Pass -lang-fortran to the preprocessor. * gcc/c.opt: Add a -lang-fortran option. * gcc/c-opts.c: Add a lang_fortran flag. (c_common_init_options): Handling the -lang-fortran option. (c_common_handle_option): Add a case for Fortran options in preprocessing. Remove cases for -ffixed-form and -ffixed-line-length. Add a case for -lang-fortran. From-SVN: r106483
2005-09-20c.opt (fextended-identifiers): New.Joseph Myers1-0/+4
gcc: * c.opt (fextended-identifiers): New. * c-opts.c (c_common_handle_option): Handle -fextended-identifiers. * doc/cpp.texi: Update documentation of extended identifiers. * doc/cppopts.texi (-fextended-identifiers): Document. gcc/testsuite: * g++.dg/cpp/ucnid-1.C, g++.dg/cpp/normalize-1.C, g++.dg/other/ucnid-1.C, gcc.dg/cpp/normalize-1.c, gcc.dg/cpp/normalize-2.c, gcc.dg/cpp/normalize-3.c, gcc.dg/cpp/normalize-4.c, gcc.dg/cpp/ucnid-1.c, gcc.dg/cpp/ucnid-2.c, gcc.dg/cpp/ucnid-3.c, gcc.dg/cpp/ucnid-4.c, gcc.dg/cpp/ucnid-5.c, gcc.dg/cpp/ucnid-7.c,gcc.dg/ucnid-1.c, gcc.dg/ucnid-2.c, gcc.dg/ucnid-3.c, gcc.dg/ucnid-4.c, gcc.dg/ucnid-5.c, gcc.dg/ucnid-6.c: Add -fextended-identifiers. * gcc.dg/cpp/ucnid-8.c: New test. libcpp: * include/cpplib.h (struct cpp_options): Add extended_identifiers. * init.c (struct lang_flags, lang_defaults): Add extended_identifiers. (cpp_set_lang): Use it. * lex.c (forms_identifier_p): Check extended_identifiers. From-SVN: r104462
2005-07-19re PR c++/22476 (-Wmissing-format-attribute should pick out function pointer ↵Kaveh R. Ghazi1-2/+0
candidates also) PR c/22476 * c-common.c (check_function_arguments): Call 'check_function_format' if either -Wformat or -Wmissing-format-attribute are specified. * c-format.c (check_function_format): Check -Wformat before calling 'check_format_info'. * c-opts.c (c_common_post_options): Don't warn for -Wmissing-format-attribute without -Wformat. * c-typeck.c (convert_for_assignment): Detect additional cases for -Wmissing-format-attribute. * doc/invoke.texi (-Wmissing-format-attribute): Document new behavior. testsuite: * gcc.dg/format/miss-1.c, gcc.dg/format/miss-2.c: Don't specify -Wformat for these tests. * gcc.dg/format/miss-3.c, gcc.dg/format/miss-4.c, gcc.dg/format/miss-5.c, gcc.dg/format/miss-6.c: New. * gcc.dg/format/opt-6.c: Delete. From-SVN: r102155
2005-06-25Update FSF address.Kelley Cook1-2/+2
From-SVN: r101317
2005-05-24c-common.c (unsigned_conversion_warning): Move warning control from if() to ↵DJ Delorie1-12/+15
warning(OPT_*). * c-common.c (unsigned_conversion_warning): Move warning control from if() to warning(OPT_*). (c_common_truthvalue_conversion): Likewise. (c_do_switch_warnings): Likewise. * c-decl.c (diagnose_mismatched_decls): Likewise. (diagnose_mismatched_decls): Likewise. (define_label): Likewise. (grokdeclarator): Likewise. * c-format.c (check_format_info): Likewise. * c-lex.c (interpret_integer): Likwise. (lex_string): Likewise. * c-opts.c (c_common_post_options): Likewise. * c-parser.c (c_parser_unary_expression): Likewise. * c-pragma.c (handle_pragma_redefine_extname): Likewise. (handle_pragma_extern_prefix): Likewise. * c-typeck.c (build_binary_op): Likewise. * gcse.c (is_too_expensive): Likewise. * opts.c (decode_options): Likewise. * stor-layout.c (place_field): Likewise. * tree-cfg.c (remove_bb): Likewise. * c.opt (-Wreturn-type): Add Var(warn_return_type). * flags.h (warn_return_type): Remove. * toplev.c (warn_return_type): Likewise. From-SVN: r100135
2005-05-18dummy-checksum.c: New.Geoffrey Keating1-0/+8
2005-05-18 Geoffrey Keating <geoffk@apple.com> * dummy-checksum.c: New. * genchecksum.c: New. * c.opt (print_pch_checksum): New flag. * c-pch.c (struct c_pch_validity): Make much shorter. (no_checksum): New. (host_machine): Remove. (target_machine): Remove. (get_ident): Change PCH version number. (pch_init): When -fverbose-asm, print out the compiler fingerprint. Don't put triplets or version string in PCH validity data. Do put the compiler checksum in the validity data. (c_common_valid_pch): Don't check triplets or version string. Do check checksum. (c_common_print_pch_checksum): New. * c-opts.c (c_common_handle_option): Add OPT_print_pch_checksum. Print fingerprint with -v. * c-common.h (c_common_print_pch_checksum): New. (executable_checksum): New. * Makefile.in (STAGEMOVESTUFF): Add cc1*-dummy, *-checksum.c. (cc1-dummy): New rule. (cc1-checksum.c): New rule. (cc1-checksum.o): New rule. (cc1): Add checksum support. (build/genchecksum): New. (build/genchecksum.o): New. (dummy-checksum.o): New. (genobjnames): Add genchecksum.o. (mostlyclean): Remove *-checksum.c. (gnucompare): Add libgcc to list of directories checked. Make comparison problems in libgcc/ and with checksum files only be warnings. * doc/invoke.texi (Precompiled Headers): Remove caution. Document that it must be the exact same binary. Add a few known-safe flags to the list. In cp/: 2005-05-18 Geoffrey Keating <geoffk@apple.com> * Make-lang.in (cc1plus-dummy): New. (cc1plus-checksum.c): New. (cc1plus-checksum.o): New. (cc1plus): Add cc1plus-checksum.o. In objc/: 2005-05-18 Geoffrey Keating <geoffk@apple.com> * Make-lang.in (cc1obj-dummy): New. (cc1obj-checksum.c): New. (cc1obj-checksum.o): New. (cc1obj): Add cc1obj-checksum.o. In objcp/: 2005-05-18 Geoffrey Keating <geoffk@apple.com> * Make-lang.in (cc1objplus-dummy): New. (cc1objplus-checksum.c): New. (cc1objplus-checksum.o): New. (cc1objplus): Add cc1objplus-checksum.o. From-SVN: r99928
2005-05-17Yet more Objective-C++...Ziemowit Laski1-8/+0
* c-common.h (objc_finish_try_stmt): Add. (objc_build_synchronized): Add. (objc_generate_write_barrier): Add. * stub-objc.c (objc_build_synchronized): Add return value. (objc_finish_try_stmt): Likewise. (objc_generate_write_barrier): Add. * c-common.h (objc_rewrite_function_call): Add. * c-typeck.c (build_function_call): Allow objc to rewrite FUNCTION_DECLs. (build_modify_expr): Allow objc to generate write barriers. * c.opt (Wassign-intercept): Add. (Wstrict-selector-match): Add. (fobjc-call-cxx-cdtors): Add. (fobjc-direct-dispatch): Add. (fobjc-gc): Add. * dbxout.c (get_lang_number): Add Objective-C++ support. * doc/invoke.texi (-fobjc-call-cxx-cdtors): Likewise. (-Wstrict-selector-match): Likewise. (-fobjc-direct-dispatch): Likewise. (-Wassign-intercept): Likewise. (Overall Options): Likewise. * gengtype.c (get_output_file_with_visibility): Likewise. * stub-objc.c (objc_rewrite_function_call): Add. * config/darwin.h (ASM_OUTPUT_LABELREF): Improved quoting support. * c-common.c (flag_objc_exceptions): Remove. (flag_objc_sjlj_exceptions): Remove. * c-decl.c (objc_mark_locals_volatile): Don't change decls that are already ok. * c-opts.c (c_common_handle_option, case OPT_fobjc_exceptions): Remove. (case OPT_fobjc_sjlj_exceptions): Remove * c.opt (fobjc-call-cxx-cdtors): Have opt create the flag. (fobjc-exceptions): Likewise. (fobjc-sjlj-exceptions): Likewise. * config/rs6000/darwin.h (OFFS_MSGSEND_FAST): Add. (OFFS_ASSIGNIVAR_FAST): Add. From-SVN: r99858
2005-05-02re PR c++/19542 (attribute(sentinel) has problems with C++ __null)Michael Matz1-0/+4
PR c++/19542 * c-common.c (c_common_nodes_and_builtins): Create global null_node. (warn_strict_null_sentinel): Define. (check_function_sentinel): Check for null_node as valid sentinel too. * c-common.h (c_tree_index): Added CTI_NULL. (null_node) Define global_tree[CTI_NULL]. (warn_strict_null_sentinel): Declare. * c-opts.c: (c_common_handle_option): Handle -Wstrict-null-sentinel. * c.opt: (Wstrict-null-sentinel): New C++ option. * doc/invoke.texi (C++ Options): Document -Wstrict-null-sentinel. * cp-tree.h (cp_tree_index): Remove CPTI_NULL, to be defined in C common frontend. (null_node): Remove. * lex.c (cxx_init): Move null_node initialisation to C common frontend. * g++.dg/warn/sentinel.C: New testcase for __null sentinels added. From-SVN: r99091
2005-04-24c-opts.c (finish_options): Make the line-number of the <built-in> location 0...Per Bothner1-1/+4
* c-opts.c (finish_options): Make the line-number of the <built-in> location 0, as assumed elsewhere, rather than 1. From-SVN: r98685