]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - gcc/c-family/ChangeLog
Add range_idx param to range_label::get_text
[thirdparty/gcc.git] / gcc / c-family / ChangeLog
index 40565d68fdc7860f1ebda4628d893ea39a56326f..f2ec39424162a12b2ee0ce86a5071e2736936c76 100644 (file)
@@ -1,3 +1,398 @@
+2018-09-17  David Malcolm  <dmalcolm@redhat.com>
+
+       * c-format.c (range_label_for_format_type_mismatch::get_text):
+       Update for new param.
+
+2018-09-17  David Malcolm  <dmalcolm@redhat.com>
+
+       * c-format.c (format_warning_at_char): Update for introduction of
+       format_string_diagnostic_t.
+       (format_type_warning): Likewise.
+
+2018-09-17  Martin Jambor  <mjambor@suse.cz>
+
+       PR c/63886
+       * c.opt (Wabsolute-value): New.
+
+2018-09-06  Bernd Edlinger  <bernd.edlinger@hotmail.de>
+
+       * c-common.c (complete_flexible_array_elts): New helper function.
+       * c-common.h (complete_flexible_array_elts): Declare.
+
+2018-09-02  Bernd Edlinger  <bernd.edlinger@hotmail.de>
+
+       * c-common.c (braced_list_to_string): Remove eval parameter.
+       Add some more checks.  Always create zero-terminated STRING_CST.
+       * c-common.h (braced_list_to_string): Adjust prototype.
+
+2018-08-27  David Malcolm  <dmalcolm@redhat.com>
+
+       PR 87091
+       * c-common.c (c_cpp_error): Update for conversion of show_caret_p
+       to a tri-state.
+       (maybe_suggest_missing_token_insertion): Likewise.
+       (maybe_add_include_fixit): Add param "override_location".  If set,
+       and source-printing is enabled, then override the rich_location's
+       primary location with that of the insertion point for the fix-it
+       hint, marking it with SHOW_LINES_WITHOUT_RANGE.
+       * c-common.h (extern void maybe_add_include_fixit): Add bool
+       param.
+       * c-format.c (selftest::test_type_mismatch_range_labels): Update
+       for conversion of show_caret_p to a tri-state.
+       * c-warn.c (warn_for_restrict): Likewise.
+       * known-headers.cc
+       (suggest_missing_header::~suggest_missing_header): Update call to
+       maybe_add_include_fixit to suggest overriding the location, as it
+       is for a note.
+
+2018-08-27  Martin Liska  <mliska@suse.cz>
+
+       * c-common.c (check_function_restrict): Use new function
+       fndecl_built_in_p and remove check for FUNCTION_DECL if
+       possible.
+       (check_builtin_function_arguments): Likewise.
+       (reject_gcc_builtin): Likewise.
+       * c-warn.c (sizeof_pointer_memaccess_warning): Likewise.
+
+2018-08-26  Marek Polacek  <polacek@redhat.com>
+
+       PR c++/87029, Implement -Wredundant-move.
+       * c.opt (Wredundant-move): New option.
+
+2018-08-21  Marek Polacek  <polacek@redhat.com>
+
+       PR c++/86981, Implement -Wpessimizing-move.
+       * c.opt (Wpessimizing-move): New option.
+
+2018-08-20  David Malcolm  <dmalcolm@redhat.com>
+
+       PR other/84889
+       * c-attribs.c (common_handle_aligned_attribute): Add
+       auto_diagnostic_group instance.
+       * c-indentation.c (warn_for_misleading_indentation): Likewise.
+       * c-opts.c (c_common_post_options): Likewise.
+       * c-warn.c (warn_logical_not_parentheses): Likewise.
+       (warn_duplicated_cond_add_or_warn): Likewise.
+       (warn_for_multistatement_macros): Likewise.
+
+2018-08-20  Nathan Sidwell  <nathan@acm.org>
+
+       * c-ada-spec.c (macro_length, dump_ada_macros): Adjust macro parm
+       access.
+
+2018-08-17  Nathan Sidwell  <nathan@acm.org>
+
+       * c-cppbuiltin.c (struct lazy_hex_fp_value_struct): Remove macro
+       field.
+       (laxy_hex_fp_value_count): Make unsigned.
+       (lazy_hex_fp_value): Provided with macro & lazy number.  Directly
+       manipulate the macro.
+       (builtin_defin_with_hex_fp_value): Adjust callback name, use
+       cpp_define_lazily.
+
+2018-08-17  David Malcolm  <dmalcolm@redhat.com>
+
+       * c-format.c (enum format_type): Add gcc_dump_printf_format_type.
+       (gcc_dump_printf_length_specs): New.
+       (gcc_dump_printf_flag_pairs): New.
+       (gcc_dump_printf_flag_specs): New.
+       (gcc_dump_printf_char_table): New.
+       (format_types_orig): Add entry for "gcc_dump_printf".
+       (init_dynamic_diag_info): Set up length_char_specs and
+       conversion_specs for gcc_dump_printf_format_type.
+       (handle_format_attribute): Handle gcc_dump_printf_format_type.
+
+2018-08-17  Nathan Sidwell  <nathan@acm.org>
+
+       * c-ada-spec.c (macro_length, dump_ada_macros): Constify.
+
+       * c-ada-spec.c: Don't #include "cpp-id-data.h"
+       * c-cppbuiltin.c: Likewise.
+
+2018-08-17  Martin Liska  <mliska@suse.cz>
+
+       * c.opt: Remove Warn, Init and Report for options with
+       Ignore/Deprecated flag. Warning is done automatically for
+       Deprecated flags.
+
+2018-08-16  David Malcolm  <dmalcolm@redhat.com>
+
+       PR c++/70693
+       * c-common.c (selftest::c_family_tests): Call
+       selftest::c_indentation_c_tests.
+       * c-common.h (selftest::c_indentation_c_tests): New decl.
+       * c-indentation.c: Include "selftest.h".
+       (next_tab_stop): Add "tab_width" param, rather than accessing
+       cpp_opts.
+       (get_visual_column): Likewise.  Clarify comment.  Bulletproof
+       against reading past the end of the line.
+       (get_first_nws_vis_column): Add "tab_width" param.
+       (detect_intervening_unindent): Likewise.
+       (should_warn_for_misleading_indentation): Read tab width from
+       cpp_opts and pass around.
+       (selftest::test_next_tab_stop): New test.
+       (selftest::assert_get_visual_column_succeeds): New function.
+       (ASSERT_GET_VISUAL_COLUMN_SUCCEEDS): New macro.
+       (selftest::assert_get_visual_column_fails): New function.
+       (ASSERT_GET_VISUAL_COLUMN_FAILS): New macro.
+       (selftest::test_get_visual_column): New test.
+       (selftest::c_indentation_c_tests): New function.
+
+2018-08-16  Nathan Sidwell  <nathan@acm.org>
+
+       * c-ada-spec.c (count_ada_macro): Use cpp_user_macro_p.
+       (store_ada_macro): Likewise.
+       * c-ppoutput.c (cb_used_define, dump_macro): Likewise.
+       * c-spellcheck.cc (should-suggest_as_macro_p): Likewise,
+
+2018-08-15  David Malcolm  <dmalcolm@redhat.com>
+
+       * c-format.c: Include "selftest-diagnostic.h" and
+       "gcc-rich-location.h".
+       (format_warning_at_char): Pass NULL for new label params of
+       format_warning_va.
+       (class indirection_suffix): New class.
+       (class range_label_for_format_type_mismatch): New class.
+       (format_type_warning): Move logic for generating "*" suffix to
+       class indirection_suffix.  Create "fmt_label" and "param_label"
+       to show their types, and pass them to the
+       format_warning_at_substring calls.
+       (selftest::test_type_mismatch_range_labels): New test.
+       (selftest::c_format_c_tests): Call it.
+
+2018-08-13  Martin Sebor  <msebor@redhat.com>
+
+       PR tree-optimization/71625
+       * c-common.c (braced_list_to_string): New function.
+       * c-common.h (braced_list_to_string): Declare it.
+
+2018-08-08  Nathan Sidwell  <nathan@acm.org>
+
+       * c-common.c (try_to_locate_new_include_inertion_point): Use
+       linemap_included_from_linemap.
+       * c-lex.c (fe_file_change): Use linemap_included_from.
+       * c-ppoutput.c (pp_file_change): Likewise.
+
+2018-08-01  Martin Sebor  <msebor@redhat.com>
+
+       PR tree-optimization/86650
+       * c-family/c-format.c (gcc_tdiag_char_table): Update comment for "%G".
+       (gcc_cdiag_char_table, gcc_cxxdiag_char_table): Same.
+       (init_dynamic_diag_info): Update from "gcall *" to "gimple *".
+       * c-format.h (T89_G): Update to be "gimple *" rather than
+       "gcall *".
+       (local_gcall_ptr_node): Rename...
+       (local_gimple_ptr_node): ...to this.
+
+2018-07-31  David Malcolm  <dmalcolm@redhat.com>
+
+       * c-format.c (PP_FORMAT_CHAR_TABLE): New macro, based on existing
+       table entries for gcc_diag_char_table, and the 'Z' entry from
+       gcc_tdiag_char_table, changing the "chain" entry for 'Z' from
+       &gcc_tdiag_char_table[0] to &gcc_diag_char_table[0].
+       (gcc_diag_char_table): Use PP_FORMAT_CHAR_TABLE, implicitly
+       adding missing "Z" for this table.  Remove erroneous "G" and "K"
+       entries.
+       (gcc_tdiag_char_table): Use PP_FORMAT_CHAR_TABLE.  Remove "v".
+       (gcc_cdiag_char_table): Use PP_FORMAT_CHAR_TABLE.
+       (gcc_cxxdiag_char_table): Use PP_FORMAT_CHAR_TABLE.  Remove "v".
+
+2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
+
+       * c-common.c (speculation_safe_resolve_call): New function.
+       (speculation_safe_resolve_params): New function.
+       (speculation_safe_resolve_return): New function.
+       (resolve_overloaded_builtin): Handle __builtin_speculation_safe_value.
+       * c-cppbuiltin.c (c_cpp_builtins): Add pre-define for
+       __HAVE_SPECULATION_SAFE_VALUE.
+
+2018-07-20  David Malcolm  <dmalcolm@redhat.com>
+
+       * c-common.c (c_cpp_error): Remove redundant "line_table"
+       parameter from call to rich_location::set_range.
+       (maybe_suggest_missing_token_insertion): Likewise.
+
+2018-07-20  Martin Sebor  <msebor@redhat.com>
+
+       PR middle-end/82063
+       * gcc/c-family/c.opt (-Warray-bounds): Remove redundant -Wall.
+
+2018-07-20  Martin Sebor  <msebor@redhat.com>
+
+       PR middle-end/82063
+       * c-common.h (c_common_handle_option): Change function argument
+       to HOST_WIDE_INT.
+       * c-opts.c (c_common_init_options): Same.
+       (c_common_handle_option): Same.  Remove special handling of
+       OPT_Walloca_larger_than_ and OPT_Wvla_larger_than_.
+       * c.opt (-Walloc-size-larger-than, -Walloca-larger-than): Change
+       options to take a HOST_WIDE_INT argument and accept a byte-size
+       suffix.  Initialize.
+       (-Wvla-larger-than): Same.
+       (-Wno-alloc-size-larger-than, -Wno-alloca-larger-than): New.
+       (-Wno-vla-larger-than): Same.
+
+2018-07-12  Jakub Jelinek  <jakub@redhat.com>
+
+       * c-attribs.c (c_common_attribute_table): Add
+       "omp declare target implicit" attribute.
+
+2018-07-12  Richard Biener  <rguenther@suse.de>
+
+       PR c/86453
+       * c-attribs.c (handle_packed_attribute): Do not build a variant
+       type with TYPE_PACKED, instead ignore the attribute if we may
+       not apply to the original type.
+
+2018-07-10  Jakub Jelinek  <jakub@redhat.com>
+
+       PR c++/86443
+       * c-omp.c (c_omp_check_loop_iv_r, c_omp_check_loop_iv): Allow declv
+       to contain TREE_LIST for both the original class iterator and the
+       "last" helper var.
+
+2018-07-07  Eric Botcazou  <ebotcazou@adacore.com>
+
+       * c-ada-spec.c (to_ada_name): Remove index parameter.
+       (pp_ada_tree_identifier): Likewise.
+       (dump_ada_macros): Adjust call to to_ada_name.
+       (struct overloaded_name_hash): Delete.
+       (struct overloaded_name_hasher): Likewise.
+       (overloaded_names): Likewise.
+       (compute_overloading_index): Likewise.
+       (dump_ada_decl_name): Do not call compute_overloading_index and
+       adjust calls to pp_ada_tree_identifier.
+       (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
+       (dump_ada_import): Add spc parameter and switch to aspect syntax.
+       (dump_ada_function_declaration): Adjust call to pp_ada_tree_identifier.
+       (dump_ada_enum_type): Remove type and display_convention parameters.
+       Adjust calls to pp_ada_tree_identifier.
+       (dump_ada_node): Likewise and for dump_ada_structure.
+       (dump_nested_type) <ENUMERAL_TYPE>: Adjust call to dump_ada_enum_type
+       and tidy up.
+       <RECORD_TYPE>: Adjust call to dump_ada_structure and switch to aspect
+       syntax.
+       (print_constructor): Adjust call to pp_ada_tree_identifier.
+       (print_destructor): Likewise.
+       (dump_ada_declaration): Switch to aspect syntax.
+       (dump_ada_structure): Likewise and tidy up.  Replace display_convention
+       parameter with nested parameter.
+       (dump_ads): Emit pragma Ada_2012 in lieu of pragma Ada_2005.
+       (dump_ada_specs): Do not delete overloaded_names table.
+
+2018-07-06  Peter Bergner  <bergner@linux.ibm.com>
+
+       PR target/86324
+       * c-attribs.c (handle_mode_attribute): Call translate_mode_attribute
+       target hook.
+
+2018-07-05  Nathan Sidwell  <nathan@acm.org>
+
+       * c-lex.c (fe_file_change): Check SYSTEM_IMPLICIT_EXTERN_C not
+       NO_IMPLICIT_EXTERN_C.
+
+2018-06-28  Martin Liska  <mliska@suse.cz>
+
+       * cppspec.c: Include opt-suggestions.h.
+
+2018-06-20  Chung-Lin Tang <cltang@codesourcery.com>
+           Thomas Schwinge <thomas@codesourcery.com>
+           Cesar Philippidis  <cesar@codesourcery.com>
+
+       * c-pragma.h (enum pragma_omp_clause): Add
+       PRAGMA_OACC_CLAUSE_{FINALIZE,IF_PRESENT}. Remove
+       PRAGMA_OACC_CLAUSE_PRESENT_OR_{COPY,COPYIN,COPYOUT,CREATE}.
+
+2018-06-20  Jakub Jelinek  <jakub@redhat.com>
+
+       PR c++/86210
+       * c-common.c (check_nonnull_arg): Use fold_for_warn.  Adjust obsolete
+       comment.
+
+2018-06-18  Martin Sebor  <msebor@redhat.com>
+
+       PR middle-end/85602
+       * c-warn.c (sizeof_pointer_memaccess_warning): Check for attribute
+       nonstring.
+
+2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
+
+       * c-common.c (c_common_truthvalue_conversion): Handle ABSU_EXPR.
+
+2018-06-13  Jason Merrill  <jason@redhat.com>
+
+       * c-opts.c (c_common_post_options): Warn about useless -Wabi.
+       (c_common_handle_option) [OPT_Wabi_]: Remove flag_abi_compat_version
+       handling.
+
+       PR c++/86094 - wrong code with defaulted move ctor.
+       * c-opts.c (c_common_post_options): Bump the current ABI version to
+       13.  Set warn_abi_version and flag_abi_compat_version to the current
+       version rather than 0.  Fix defaulting flag_abi_compat_version from
+       warn_abi_version.
+
+2018-06-12  Martin Sebor  <msebor@redhat.com>
+
+       PR c/85931
+       * c-warn.c (sizeof_pointer_memaccess_warning): Avoid warning when
+       sizeof source and destination yields the same value.
+
+2018-06-12  Martin Liska  <mliska@suse.cz>
+
+       * c.opt: Make MPX-related options as Deprecated.
+
+2018-06-08  David Malcolm  <dmalcolm@redhat.com>
+
+       * c-pretty-print.c (c_pretty_printer::statement): Use TDF_NONE
+       rather than 0.
+
+2018-06-08  Martin Liska  <mliska@suse.cz>
+
+       * c-attribs.c (handle_bnd_variable_size_attribute): Remove support
+       for MPX (macros, related functions, fields in cgraph_node, ...).
+       (handle_bnd_legacy): Likewise.
+       (handle_bnd_instrument): Likewise.
+       * c.opt: Likewise.
+
+2018-06-06  Jakub Jelinek  <jakub@redhat.com>
+
+       PR c++/86068
+       * c-cppbuiltin.c (c_cpp_builtins): Fix a typo, set
+       __cpp_transactional_memory to 201500 instead of 210500.
+
+2018-06-06  Jason Merrill  <jason@redhat.com>
+
+       PR c++/85710 - ICE with -Wmemset-elt-size.
+       * c-warn.c (warn_for_memset): Don't crash on incomplete element type.
+
+2018-06-01  Jason Merrill  <jason@redhat.com>
+
+       * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_deduction_guides to
+       201703.
+
+2018-06-01  Eric Botcazou  <ebotcazou@adacore.com>
+
+       * c-ada-spec.c (dump_ada_declaration) <TYPE_DECL>: Generate a forward
+       declaration for a typedef independently of whether the declaration of
+       the subtype is generated.
+
+2018-05-31  Martin Sebor  <msebor@redhat.com>
+
+       PR c/82063
+       * c.opt (-Wno-alloc-size-larger-than): New option.
+
+2018-04-22  David Pagan  <dave.pagan@oracle.com>
+
+       PR c/55976
+       * c-opts.c (c_common_post_options): Set default for warn_return_type
+       for C++/C++ with ObjC extensions only. For C, makes it possible to 
+       differentiate between default (no option), -Wreturn-type, and
+       -Wno-return-type.
+
+2018-05-29  Jason Merrill  <jason@redhat.com>
+
+       * c.opt (Winit-list-lifetime): New flag.
+
 2018-05-28  Bernd Edlinger  <bernd.edlinger@hotmail.de>
 
        * c-lex.c (get_fileinfo): Use splay_tree_compare_strings and
 
 2018-05-11  Martin Liska  <mliska@suse.cz>
 
-        PR sanitizer/85556
+       PR sanitizer/85556
        * c-attribs.c (handle_no_sanitize_attribute): Iterate all
        TREE_LIST values.
 
 
 2018-01-18  Boris Kolpackov  <boris@codesynthesis.com>
 
-        PR other/70268
-        * c.opt (-fmacro-prefix-map): New option.
-        * c-opts.c (c_common_handle_option): Handle it.
-        * c-lex.c (init_c_lex): Set remap_filename cpp callback.
-        * c-ppoutput.c (init_pp_output): Likewise.
+       PR other/70268
+       * c.opt (-fmacro-prefix-map): New option.
+       * c-opts.c (c_common_handle_option): Handle it.
+       * c-lex.c (init_c_lex): Set remap_filename cpp callback.
+       * c-ppoutput.c (init_pp_output): Likewise.
 
 2018-01-17  David Malcolm  <dmalcolm@redhat.com>
 
        Update copyright years.
 
 2017-12-22  Mike Stump  <mikestump@comcast.net>
-            Eric Botcazou  <ebotcazou@adacore.com>
+           Eric Botcazou  <ebotcazou@adacore.com>
 
        * c-pragma.c (init_pragma): Register pragma GCC unroll.
        * c-pragma.h (enum pragma_kind): Add PRAGMA_UNROLL.
        * c-common.h (c_switch_covers_all_cases_p): Declare.
 
 2017-11-28  Julia Koval  <julia.koval@intel.com>
-            Sebastian Peryt  <sebastian.peryt@intel.com>
+           Sebastian Peryt  <sebastian.peryt@intel.com>
 
        * array-notation-common.c: Delete.
        * c-cilkplus.c: Ditto.
        * c-cppbuiltin.c (c_cpp_builtins): Use opt_scalar_float_mode.
 
 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
-            Alan Hayward  <alan.hayward@arm.com>
-            David Sherwood  <david.sherwood@arm.com>
+           Alan Hayward  <alan.hayward@arm.com>
+           David Sherwood  <david.sherwood@arm.com>
 
        * c-common.c (c_common_fixed_point_type_for_size): Use new mode
        iterators.
 
 2017-05-01  Xi Ruoyao  <ryxi@stu.xidian.edu.cn>
 
-        PR c++/80038
+       PR c++/80038
        * c-common.h (cilk_gimplify_call_params_in_spawned_fn): Remove
        prototype.
        (cilk_install_body_pedigree_operations): Likewise.
 2016-12-08  Martin Sebor  <msebor@redhat.com>
 
        PR c/78165
-        * c-pretty-print (pp_c_integer_constant): Avoid formatting type
-        suffix.
+       * c-pretty-print (pp_c_integer_constant): Avoid formatting type
+       suffix.
 
 2016-12-07  Martin Sebor  <msebor@redhat.com>