blob: 582bf1766841a15a3b56006d98bd885cad3bc649 [file] [log] [blame]
2022-05-11 Jakub Jelinek <jakub@redhat.com>
Backported from master:
2022-04-11 Jakub Jelinek <jakub@redhat.com>
PR c++/105186
* c-common.c (c_common_nodes_and_builtins): After registering __int%d
and __int%d__ builtin types, initialize corresponding ridpointers
entry.
2022-05-11 Jakub Jelinek <jakub@redhat.com>
Backported from master:
2022-03-09 Jakub Jelinek <jakub@redhat.com>
PR c/104711
* c-opts.c (c_common_post_options): Don't enable
-Wshift-negative-value from -Wextra for C++20 or later.
* c-ubsan.c (ubsan_instrument_shift): Adjust comments.
* c-warn.c (maybe_warn_shift_overflow): Use TYPE_OVERFLOW_WRAPS
instead of TYPE_UNSIGNED.
2022-05-11 Jakub Jelinek <jakub@redhat.com>
Backported from master:
2022-02-16 Jakub Jelinek <jakub@redhat.com>
PR c/104510
* c-common.c (shorten_compare): Convert original arguments to
the original *restype_ptr when mixing binary and decimal float.
2022-05-11 Jakub Jelinek <jakub@redhat.com>
Backported from master:
2021-10-21 Jakub Jelinek <jakub@redhat.com>
PR middle-end/64888
* c-omp.c (c_omp_predefined_variable): Return true also for
ubsan_create_data created artificial variables.
2022-05-11 Jakub Jelinek <jakub@redhat.com>
Backported from master:
2021-10-01 Jakub Jelinek <jakub@redhat.com>
Richard Biener <rguenther@suse.de>
PR sanitizer/102515
* c-ubsan.c (ubsan_instrument_division): Check the right
flag_sanitize_recover bit, depending on which sanitization
is done.
2021-06-01 Release Manager
* GCC 9.4.0 released.
2021-04-20 Jakub Jelinek <jakub@redhat.com>
Backported from master:
2021-03-19 Jakub Jelinek <jakub@redhat.com>
PR c/99324
* c-common.c (build_va_arg): Call c_common_mark_addressable_vec
instead of mark_addressable. Fix a comment typo -
neutrallly -> neutrally.
2021-04-20 Jakub Jelinek <jakub@redhat.com>
Backported from master:
2021-01-06 Jakub Jelinek <jakub@redhat.com>
PR c++/98187
* c-pragma.c (omp_pragmas): Remove "master".
(omp_pragmas_simd): Add "master".
2020-09-16 Jakub Jelinek <jakub@redhat.com>
Backported from master:
2020-08-11 Jakub Jelinek <jakub@redhat.com>
PR c/96545
* c-common.c (get_atomic_generic_size): Require that first argument's
type points to a complete type and use tree_fits_uhwi_p instead of
just INTEGER_CST TREE_CODE check for the TYPE_SIZE_UNIT.
2020-09-16 Jakub Jelinek <jakub@redhat.com>
Backported from master:
2020-06-27 Jakub Jelinek <jakub@redhat.com>
PR middle-end/95903
* c-common.c (pointer_int_sum): Use TYPE_OVERFLOW_UNDEFINED instead of
!TYPE_UNSIGNED check to see if we can apply distributive law and handle
smaller precision intop operands separately.
2020-09-16 Jakub Jelinek <jakub@redhat.com>
Backported from master:
2020-04-27 Jakub Jelinek <jakub@redhat.com>
PR c/94755
* c-common.c (resolve_overloaded_builtin): Return error_mark_node for
fncode == BUILT_IN_NONE before initialization of first_param.
2020-03-12 Release Manager
* GCC 9.3.0 released.
2020-01-29 Jason Merrill <jason@redhat.com>
PR c++/89357
* c-attribs.c (check_cxx_fundamental_alignment_constraints): Remove.
2019-12-20 Jakub Jelinek <jakub@redhat.com>
Backported from mainline
2019-11-26 Jakub Jelinek <jakub@redhat.com>
PR c++/61414
* c-attribs.c (handle_mode_attribute): Add mode attribute to
ENUMERAL_TYPEs.
2019-11-22 Jakub Jelinek <jakub@redhat.com>
PR c/90677
* c-common.h (identifier_global_tag): Declare.
* c-format.c (get_pointer_to_named_type): Renamed to ...
(get_named_type): ... this. Use identifier_global_tag instead of
identifier_global_value, handle the return value being a TYPE_P.
(init_dynamic_diag_info): Adjust get_pointer_to_named_type callers
to call get_named_type instead. Formatting fixes.
2019-11-13 Eric Botcazou <ebotcazou@adacore.com>
* c-ada-spec.c (get_underlying_decl): Do not look through typedefs.
(dump_forward_type): Do not generate a declaration for function types.
(dump_nested_type) <ARRAY_TYPE>: Do not generate a nested declaration
of the component type if it is declared in another file.
2019-10-21 Jakub Jelinek <jakub@redhat.com>
Backported from mainline
2019-10-01 Jakub Jelinek <jakub@redhat.com>
PR c++/91925
* c-warn.c (check_alignment_of_packed_member): Ignore FIELD_DECLs
with NULL DECL_FIELD_OFFSET.
2019-09-27 Jakub Jelinek <jakub@redhat.com>
PR c++/88203
* c-common.h (c_omp_predefined_variable): Declare.
* c-omp.c (c_omp_predefined_variable): New function.
(c_omp_predetermined_sharing): Return OMP_CLAUSE_DEFAULT_SHARED
for predefined variables.
2019-09-02 Martin Liska <mliska@suse.cz>
Backport from mainline
2019-09-02 Martin Liska <mliska@suse.cz>
PR c++/91155
* c-common.c (fname_as_string): Use cxx_printable_name for
__PRETTY_FUNCTION__ same as was used before r265711.
2019-08-31 Iain Sandoe <iain@sandoe.co.uk>
Backport from mainline
2019-08-23 Iain Sandoe <iain@sandoe.co.uk>
PR pch/61250
* c-lex.c (c_lex_with_flags): Don't call
c_common_no_more_pch () from here.
2019-08-12 Release Manager
* GCC 9.2.0 released.
2019-07-15 Martin Liska <mliska@suse.cz>
PR c++/91125
* c-opts.c (c_common_handle_option): Warn the -frepo
will be removed in the future.
2019-07-14 Jakub Jelinek <jakub@redhat.com>
Backported from mainline
2019-07-13 Jakub Jelinek <jakub@redhat.com>
PR c/91149
* c-omp.c (c_omp_split_clauses): Fix a pasto in
OMP_CLAUSE_REDUCTION_TASK handling.
2019-06-29 Jakub Jelinek <jakub@redhat.com>
Backported from mainline
2019-06-25 Jakub Jelinek <jakub@redhat.com>
PR sanitizer/90954
* c-omp.c (c_finish_omp_atomic): Allow tree_invariant_p in addition
to SAVE_EXPR in first operand of a COMPOUND_EXPR.
2019-06-06 Richard Biener <rguenther@suse.de>
Backport from mainline
2019-05-15 Richard Biener <rguenther@suse.de>
PR c/90474
* c-common.c (c_common_mark_addressable_vec): Also mark
a COMPOUND_LITERAL_EXPR_DECL addressable similar to
c_mark_addressable.
2019-05-23 Eric Botcazou <ebotcazou@adacore.com>
* c-ada-spec.c (compare_node): Compare the DECL_UIDs as a last resort.
2019-05-03 Release Manager
* GCC 9.1.0 released.
2019-04-19 Jakub Jelinek <jakub@redhat.com>
PR c/89888
* c-common.h (c_add_case_label): Remove orig_type and outside_range_p
arguments.
(c_do_switch_warnings): Remove outside_range_p argument.
* c-common.c (check_case_bounds): Removed.
(c_add_case_label): Remove orig_type and outside_range_p arguments.
Don't call check_case_bounds. Fold low_value as well as high_value.
* c-warn.c (c_do_switch_warnings): Remove outside_range_p argument.
Check for case labels outside of range of original type here and
adjust them.
2019-04-12 Jakub Jelinek <jakub@redhat.com>
PR translation/90041
* c.opt (-fhandle-exceptions): Use %< and %> around option names
in the Warn diagnostics.
PR c/89946
* c-attribs.c (handle_patchable_function_entry_attribute): Add
function comment. Warn if arguments of the attribute are not positive
integer constants.
2019-04-09 Eric Botcazou <ebotcazou@adacore.com>
* c-ada-spec.c (print_destructor): Deal with deleting destructors.
(dump_ada_declaration) <FUNCTION_DECL>: Likewise.
2019-04-07 Eric Botcazou <ebotcazou@adacore.com>
* c-ada-spec.c (is_float128): New predicate extracted from...
(dump_ada_node) <COMPLEX_TYPE>: Use it to recognize __cfloat128.
<REAL_TYPE>: ...here. Call it.
2019-04-05 David Malcolm <dmalcolm@redhat.com>
PR c/89985
* c-warn.c (check_address_or_pointer_of_packed_member): Add
auto_diagnostic_group. Guard inform calls by result of
warning_at call.
2019-04-05 Marek Polacek <polacek@redhat.com>
PR c++/89973 - -Waddress-of-packed-member ICE with invalid conversion.
* c-warn.c (check_address_or_pointer_of_packed_member): Check the type
of RHS.
2019-04-03 Jason Merrill <jason@redhat.com>
PR c++/86586 - -fcompare-debug=-Wsign-compare.
* c-warn.c (warn_for_sign_compare): Call fold_for_warn.
2019-04-01 Martin Sebor <msebor@redhat.com>
PR c/89685
* c-attribs.c (handle_copy_attribute): Handle references and
non-constant expressions.
2019-03-22 Jakub Jelinek <jakub@redhat.com>
PR c++/87481
* c.opt (-fconstexpr-ops-limit=): New option.
2019-03-21 Jakub Jelinek <jakub@redhat.com>
* c-common.c (per_file_includes_t): Use false as Lazy in hash_set
template param.
2019-03-19 Martin Sebor <msebor@redhat.com>
PR tree-optimization/89688
* c-common.c (braced_list_to_string): Make static.
(braced_lists_to_strings): Define new function.
* c-common.h (braced_list_to_string): Remove.
(braced_lists_to_strings): Declare.
2019-03-12 Martin Liska <mliska@suse.cz>
* c-opts.c (c_common_handle_option): Wrap option with %< and %>.
2019-03-11 Martin Liska <mliska@suse.cz>
* c-opts.c (c_common_post_options): Wrap apostrophes
in gcc internal format with %'.
2019-03-11 Martin Liska <mliska@suse.cz>
* c-attribs.c (handle_nocf_check_attribute): Wrap an option name
in a string format message and fix GNU coding style.
* c-common.c (vector_types_convertible_p): Likewise.
(c_build_vec_perm_expr): Likewise.
* c-indentation.c (get_visual_column): Likewise.
* c-opts.c (c_common_handle_option): Likewise.
(c_common_post_options): Likewise.
(sanitize_cpp_opts): Likewise.
* c-pch.c (c_common_pch_pragma): Likewise.
* c-pragma.c (handle_pragma_pack): Likewise.
2019-03-08 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/89550
* c-common.c (c_common_truthvalue_conversion): Only set
TREE_NO_WARNING if warning_at returned true.
* c-warn.c (overflow_warning, warn_logical_operator): Likewise.
2019-02-25 Sandra Loosemore <sandra@codesourcery.com>
Martin Sebor <msebor@gmail.com>
* c.opt (Wmissing-attributes): Clean up doc string.
2019-02-25 Jakub Jelinek <jakub@redhat.com>
PR c/89495
* c-format.c (maybe_read_dollar_number): Compute nargnum in
HOST_WIDE_INT type to avoid overflows and change overflow_flag
checking.
2019-02-22 Richard Biener <rguenther@suse.de>
* c-pch.c (no_checksum): Remove.
(pch_init): Remove assertion that executable_checksum is not
all zero.
(c_common_valid_pch): Likewise.
2019-02-18 Martin Sebor <msebor@redhat.com>
PR middle-end/89294
* c-common.c (invalid_array_size_error): Handle cst_size_not_constant.
2019-02-16 David Malcolm <dmalcolm@redhat.com>
PR c++/88680
* c-common.c (shorten_compare): Call fold_for_warn on op0 when
implementing -Wtype-limits.
2019-02-11 Martin Sebor <msebor@redhat.com>
PR c++/87996
* c-common.c (invalid_array_size_error): New function.
(valid_array_size_p): Call it. Handle size as well as type.
* c-common.h (valid_constant_size_p): New function.
(enum cst_size_error): New type.
2019-01-31 David Malcolm <dmalcolm@redhat.com>
PR c/89122
* known-headers.cc (get_stdlib_header_for_name): Add
{FLT|DBL|LDBL}_{MAX|MIN} to "hints" array.
2019-01-31 Jakub Jelinek <jakub@redhat.com>
PR libstdc++/88170
* c-pretty-print.c (pp_c_enumeration_constant): Print always as
a C cast in pp_c_flag_gnu_v3 mode.
2019-01-29 Jakub Jelinek <jakub@redhat.com>
PR c/86125
* c-common.c (c_common_nodes_and_builtins): Build type variants for
builtin_structptr_types types even for C.
2019-01-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
* c-warn.c (check_address_or_pointer_of_packed_member): Handle the case
when rhs is of array type correctly. Fix handling of nested structures.
Fix handling of indirect_ref together with nop_expr and/or addr_expr.
(check_and_warn_address_or_pointer_of_packed_member): Fix handling of
type casts within nested compound expressions.
2019-01-22 Jakub Jelinek <jakub@redhat.com>
PR middle-end/88968
* c-omp.c (c_finish_omp_atomic): For bitfield atomics, update type
variable after using BIT_FIELD_REF.
2019-01-18 H.J. Lu <hongjiu.lu@intel.com>
PR c/51628
PR c/88664
* c-common.h (warn_for_address_or_pointer_of_packed_member):
Remove the boolean argument.
* c-warn.c (check_address_of_packed_member): Renamed to ...
(check_address_or_pointer_of_packed_member): This. Also
warn pointer conversion.
(check_and_warn_address_of_packed_member): Renamed to ...
(check_and_warn_address_or_pointer_of_packed_member): This.
Also warn pointer conversion.
(warn_for_address_or_pointer_of_packed_member): Remove the
boolean argument. Don't check pointer conversion here.
2019-01-15 Richard Sandiford <richard.sandiford@arm.com>
PR inline-asm/52813
* c.opt (Wdeprecated): Move documentation and variable to common.opt.
2019-01-14 Jakub Jelinek <jakub@redhat.com>
* c-cppbuiltin.c (c_cpp_builtin): Define __cpp_guaranteed_copy_elision
and __cpp_nontype_template_parameter_auto. Add a comment that
__cpp_template_auto is deprecated.
2019-01-14 Tom Honermann <tom@honermann.net>
Implement P0482R5, char8_t: A type for UTF-8 characters and strings
* c-common.c (c_common_reswords): Add char8_t.
(fix_string_type): Use char8_t for the type of u8 string literals.
(c_common_get_alias_set): char8_t doesn't alias.
(c_common_nodes_and_builtins): Define char8_t as a builtin type in
C++.
(c_stddef_cpp_builtins): Add __CHAR8_TYPE__.
(keyword_begins_type_specifier): Add RID_CHAR8.
* c-common.h (rid): Add RID_CHAR8.
(c_tree_index): Add CTI_CHAR8_TYPE and CTI_CHAR8_ARRAY_TYPE.
Define D_CXX_CHAR8_T and D_CXX_CHAR8_T_FLAGS.
Define char8_type_node and char8_array_type_node.
* c-cppbuiltin.c (cpp_atomic_builtins): Predefine
__GCC_ATOMIC_CHAR8_T_LOCK_FREE.
(c_cpp_builtins): Predefine __cpp_char8_t.
* c-lex.c (lex_string): Use char8_array_type_node as the type of
CPP_UTF8STRING.
(lex_charconst): Use char8_type_node as the type of CPP_UTF8CHAR.
* c-opts.c: If not otherwise specified, enable -fchar8_t when
targeting C++2a.
* c.opt: Add the -fchar8_t command line option.
2019-01-14 Martin Sebor <msebor@redhat.com>
PR target/88638
* c-attribs.c (positional_argument): Call valid_format_string_type_p
and issue errors if it fails.
* c-common.h (valid_format_string_type_p): Declare.
* c-format.c (valid_stringptr_type_p): Rename...
(valid_format_string_type_p): ...to this and make extern.
(handle_format_arg_attribute): Adjust to new name.
(check_format_string): Same.
2019-01-13 H.J. Lu <hongjiu.lu@intel.com>
* c-warn.c (warn_for_address_or_pointer_of_packed_member):
Replace "may may" with "may" in warning message.
2019-01-07 Jakub Jelinek <jakub@redhat.com>
PR c++/85052
* c-common.h (enum rid): Add RID_BUILTIN_CONVERTVECTOR.
(c_build_vec_convert): Declare.
* c-common.c (c_build_vec_convert): New function.
2019-01-04 Martin Sebor <msebor@redhat.com>
PR c/88546
* c-attribs.c (handle_copy_attribute): Avoid copying attribute leaf.
Handle C++ empty throw specification and C11 _Noreturn.
(has_attribute): Also handle C11 _Noreturn.
2019-01-04 Martin Sebor <msebor@redhat.com>
PR c/88363
* c-attribs.c (positional_argument): Also accept enumerated types.
2019-01-01 Jakub Jelinek <jakub@redhat.com>
Update copyright years.
2018-12-20 H.J. Lu <hongjiu.lu@intel.com>
PR c/51628
* c-common.h (warn_for_address_or_pointer_of_packed_member): New.
* c-warn.c (check_alignment_of_packed_member): New function.
(check_address_of_packed_member): Likewise.
(check_and_warn_address_of_packed_member): Likewise.
(warn_for_address_or_pointer_of_packed_member): Likewise.
* c.opt: Add -Wno-address-of-packed-member.
2018-12-20 David Malcolm <dmalcolm@redhat.com>
PR c++/87504
* c-warn.c (get_outermost_macro_expansion): New function.
(spelled_the_same_p): Use it to unwind the macro expansions, and
compare the outermost macro in each nested expansion, rather than
the innermost.
2018-12-19 David Malcolm <dmalcolm@redhat.com>
PR c++/87504
* c-common.h (warn_tautological_cmp): Convert 1st param from
location_t to const op_location_t &.
* c-warn.c (find_array_ref_with_const_idx_r): Call fold_for_warn
when testing for INTEGER_CST.
(warn_tautological_bitwise_comparison): Convert 1st param from
location_t to const op_location_t &; use it to build a
binary_op_rich_location, and use this.
(spelled_the_same_p): New function.
(warn_tautological_cmp): Convert 1st param from location_t to
const op_location_t &. Warn for macro expansions if
spelled_the_same_p. Use binary_op_rich_location.
2018-12-19 David Malcolm <dmalcolm@redhat.com>
PR c++/43064
PR c++/43486
* c-common.c (unsafe_conversion_p): Fold any location wrapper.
(verify_tree): Handle location wrappers.
(c_common_truthvalue_conversion): Strip any location wrapper.
Handle CONST_DECL.
(fold_offsetof): Strip any location wrapper.
(complete_array_type): Likewise for initial_value.
(convert_vector_to_array_for_subscript): Call fold_for_warn on the
index before checking for INTEGER_CST.
* c-pretty-print.c (c_pretty_printer::primary_expression): Don't
print parentheses around location wrappers.
* c-warn.c (warn_logical_operator): Call fold_for_warn on op_right
before checking for INTEGER_CST.
(warn_tautological_bitwise_comparison): Call
tree_strip_any_location_wrapper on lhs, rhs, and bitop's operand
before checking for INTEGER_CST.
(readonly_error): Strip any location wrapper.
(warn_array_subscript_with_type_char): Strip location wrappers
before checking for INTEGER_CST. Use the location of the index if
available.
2018-12-06 Jason Merrill <jason@redhat.com>
PR c++/88136 - -Wdeprecated-copy false positives
* c.opt (Wdeprecated-copy-dtor): New.
(Wdeprecated-copy): Move to -Wextra.
2018-11-29 Martin Sebor <msebor@redhat.com>
PR c/88172
PR testsuite/88208
* c-attribs.c (common_handle_aligned_attribute): Silently avoid setting
alignments to values less than the target requires.
(has_attribute): For attribute aligned consider both the attribute
and the alignment bits.
* c-common.c (c_init_attributes): Optionally issue a warning for
zero alignment.
2018-11-28 Martin Sebor <msebor@redhat.com>
PR c/88065
PR c/87297
* c-warn.c (sizeof_pointer_memaccess_warning): Bail if source
or destination is an error.
2018-11-28 Jakub Jelinek <jakub@redhat.com>
PR c++/88215
* c-ubsan.c: Include langhooks.h.
(ubsan_instrument_division): Change gcc_assert that main variants
of op0 and op1 types are equal to gcc_checking_assert that the
main variants are compatible types.
2018-11-27 Eric Botcazou <ebotcazou@adacore.com>
* c-ada-spec.c: Include stringpool.h.
(has_static_fields): Return false for incomplete types.
(is_tagged_type): Likewise.
(has_nontrivial_methods): Likewise.
(dump_ada_node) <INTEGER_TYPE>: Deal specifically with __int128.
(struct overloaded_name_hash): New structure.
(struct overloaded_name_hasher): Likewise.
(overloaded_names): New global variable.
(init_overloaded_names): New static function.
(overloaded_name_p): New predicate.
(dump_ada_declaration) <TYPE_DECL>: Tidy up and set TREE_VISITED
on the TYPE_STUB_DECL of the original type of a typedef, if any.
<FUNCTION_DECL>: Bail out for an unsupported overloaded name.
Remove always-true condition and dump forward types.
(dump_ada_specs): Delete overloaded_names.
2018-11-20 Martin Sebor <msebor@redhat.com>
* c-attribs.c (type_for_vector_size): New function.
(type_valid_for_vector_size): Same.
(handle_vector_size_attribute): Move code to the functions above
and call them.
(validate_attribute, has_attribute): New functions.
* c-common.h (has_attribute): Declare.
(rid): Add RID_HAS_ATTRIBUTE_EXPRESSION.
* c-common.c (c_common_resword): Same.
2018-11-16 Jason Merrill <jason@redhat.com>
* c-lex.c (c_common_has_attribute): Handle likely/unlikely.
* c-attribs.c (attr_cold_hot_exclusions): Make public.
2018-11-16 Jakub Jelinek <jakub@redhat.com>
PR middle-end/87854
* c-common.c (fix_string_type): Reject string literals larger than
TYPE_MAX_VALUE (ssizetype) bytes.
2018-11-15 Martin Sebor <msebor@redhat.com>
PR c++/87541
PR c++/87542
* c-attribs.c (positional_argument): New function.
(handle_alloc_size_attribute): Use it and simplify.
(handle_alloc_align_attribute): Same.
(handle_assume_aligned_attribute): Same.
(handle_nonnull_attribute): Same.
* c-common.c (check_function_arguments): Pass fntype to
check_function_format.
* c-common.h (check_function_format): Add an argument.
(PosArgFlags, positional_argument): Declare new type and function.
* c-format.c (decode_format_attr): Add arguments.
(check_format_string, get_constant): Same.
(convert_format_name_to_system_name): Adjust.
2018-11-15 David Malcolm <dmalcolm@redhat.com>
PR other/19165
* c-opts.c (c_diagnostic_finalizer): Add diagnostic_t param.
2018-11-14 Jakub Jelinek <jakub@redhat.com>
P1236R1 - Signed integers are two's complement
* c-warn.c (maybe_warn_shift_overflow): Don't warn for c++2a.
* c-ubsan.c (ubsan_instrument_shift): Make signed shifts
with in-range second operand well defined for -std=c++2a.
PR other/88007
* c-common.c (parse_optimize_options): Allocate option string from
opts_obstack rather than as GC memory. Move the allocation after
warning for invalid option.
2018-11-13 David Malcolm <dmalcolm@redhat.com>
* c-common.c (c_get_substring_location): Update for renaming of
get_source_location_for_substring to get_location_within_string.
* c-lex.c: Replace "source_location" with "location_t".
* c-opts.c: Likewise.
* c-ppoutput.c: Likewise.
2018-11-13 Martin Sebor <msebor@redhat.com>
PR middle-end/81824
* c-attribs.c (handle_copy_attribute): Exclude inlining attributes.
(handle_tls_model_attribute): Improve diagnostics.
2018-11-12 Jason Merrill <jason@redhat.com>
* c-cppbuiltin.c (c_cpp_builtins): Define
__cpp_impl_destroying_delete.
* c-cppbuiltin.c (c_cpp_builtins): Change __cpp_explicit_bool to
__cpp_conditional_explicit.
2018-11-09 Martin Sebor <msebor@redhat.com>
PR middle-end/81824
* c-attribs.c (handle_copy_attribute): New function.
2018-11-09 Martin Sebor <msebor@redhat.com>
PR c/87795
* c-common.c (check_user_alignment): Use MAX_OFILE_ALIGNMENT.
2018-11-08 Jakub Jelinek <jakub@redhat.com>
* c-common.h (c_finish_omp_taskgroup): Add CLAUSES argument.
(c_finish_omp_atomic): Replace bool SEQ_CST argument with
enum omp_memory_order MEMORY_ORDER.
(c_finish_omp_flush): Add MO argument.
(c_omp_depend_t_p, c_finish_omp_depobj): Declare.
(c_finish_omp_for): Add FINAL_P argument.
* c-omp.c: Include memmodel.h.
(c_finish_omp_taskgroup): Add CLAUSES argument. Set
OMP_TASKGROUP_CLAUSES to it.
(c_finish_omp_atomic): Replace bool SEQ_CST argument with
enum omp_memory_order MEMORY_ORDER. Set OMP_ATOMIC_MEMORY_ORDER
instead of OMP_ATOMIC_SEQ_CST.
(c_omp_depend_t_p, c_finish_omp_depobj): New functions.
(c_finish_omp_flush): Add MO argument, if not MEMMODEL_LAST, emit
__atomic_thread_fence call with the given value.
(check_omp_for_incr_expr): Formatting fixes.
(c_finish_omp_for): Add FINAL_P argument. Allow NE_EXPR
even in OpenMP loops, diagnose if NE_EXPR and incr expression
is not constant expression 1 or -1. Transform NE_EXPR loops
with iterators pointers to VLA into LT_EXPR or GT_EXPR loops.
(c_omp_check_loop_iv_r): Look for orig decl of C++ range for
loops too.
(c_omp_split_clauses): Add support for combined
#pragma omp parallel master and
#pragma omp {,parallel }master taskloop{, simd} constructs.
Handle OMP_CLAUSE_IN_REDUCTION. Handle OMP_CLAUSE_REDUCTION_TASK.
Handle OMP_CLAUSE_NONTEMPORAL. Handle splitting OMP_CLAUSE_IF
also to OMP_SIMD. Copy OMP_CLAUSE_LASTPRIVATE_CONDITIONAL.
(c_omp_predetermined_sharing): Don't return
OMP_CLAUSE_DEFAULT_SHARED for const qualified decls.
* c-pragma.c (omp_pragmas): Add PRAGMA_OMP_DEPOBJ and
PRAGMA_OMP_REQUIRES.
* c-pragma.h (enum pragma_kind): Likewise.
(enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_NONTEMPORAL
and PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
2018-11-08 David Malcolm <dmalcolm@redhat.com>
* c-format.c (gcc_dump_printf_char_table): Add entry for %f.
2018-11-08 David Malcolm <dmalcolm@redhat.com>
* c-format.c (local_cgraph_node_ptr_node): New variable.
(gcc_dump_printf_char_table): Add entry for %C.
(get_pointer_to_named_type): New function, taken from the handling
code for "gimple *" from...
(init_dynamic_diag_info): ...here. Add handling for
"cgraph_node *".
* c-format.h (T_CGRAPH_NODE): New.
2018-10-19 Jason Merrill <jason@redhat.com>
* c-cppbuiltin.c (c_cpp_builtins): Add
__cpp_nontype_template_parameter_class.
2018-10-31 Nathan Sidwell <nathan@acm.org>
* c-opts.c (c_finish_options): Force command line macro
location. Refactor to avoid repeating main debug hook.
(push_command_line_include): Clarify comment.
* c-opts.c (c_finish_options): Adjust cpp_force_token_locations call.
2018-10-30 Martin Sebor <msebor@redhat.com>
PR middle-end/87041
* c-format.c (check_format_types): Avoid diagnosing null pointer
arguments to printf-family of functions.
2018-10-30 Marek Polacek <polacek@redhat.com>
Implement P0892R2, explicit(bool).
* c-cppbuiltin.c (c_cpp_builtins): Define __cpp_explicit_bool.
2018-10-29 David Malcolm <dmalcolm@redhat.com>
* name-hint.h (name_hint::take_deferred): New member function.
2018-10-29 David Malcolm <dmalcolm@redhat.com>
PR c++/56856
* c-common.c (check_function_sentinel): Call fold_for_warn on the
argument.
(check_function_restrict): Rename param "argarray" to
"unfolded_argarray", and make a copy named "argarray", calling
fold_for_warn on each argument.
(check_function_arguments): Add note about responsibility for
folding the arguments.
2018-10-17 Joseph Myers <joseph@codesourcery.com>
* c-common.c (flag_isoc2x): New variable.
* c-common.h (clk_c): Update comment to reference C2X.
(flag_isoc99, flag_isoc11): Update comments to reference future
standard versions in general.
(flag_isoc2x): Declare.
* c-opts.c (set_std_c2x): New function.
(c_common_handle_option): Handle -std=c2x and -std=gnu2x.
(set_std_c89, set_std_c99, set_std_c11, set_std_c17): Set
flag_isoc2x to 0.
* c.opt (Wc11-c2x-compat, std=c2x, std=gnu2x): New options.
2018-10-17 Joseph Myers <joseph@codesourcery.com>
* c.opt (std=c17, std=c18, std=gnu17, std=gnu18, std=iso9899:2017)
(std=iso9899:2018): Document C17 as published in 2018.
2018-10-12 Christophe Lyon <christophe.lyon@linaro.org>
PR c++/87364
* c-pretty-print.c (c_pretty_printer::constant): Fix typo.
2018-10-11 Will Wray <wjwray@gmail.com>
PR c++/87364
* c-pretty-print.h (pp_c_type_cast): Prototype.
(pp_c_integer_constant): Likewise.
* c-pretty-print.c (pp_c_type_cast): No longer static.
(pp_c_integer_constant): Likewise.
(pp_c_enumeration_constant): Fix loop termination when finding
name of constant. No longer returns a value. Call
pp_c_integer_constant.
(c_pretty_printer::constant): Update for changes to
pp_c_enumeration_constant.
2018-10-11 Jakub Jelinek <jakub@redhat.com>
* c-lex.c (c_common_has_attribute): Return 201803 instead of 20180312
for no_unique_address.
2018-10-09 David Malcolm <dmalcolm@redhat.com>
* c-common.c (c_option_controlling_cpp_error): Rename to...
(c_option_controlling_cpp_diagnostic): ...this, and convert
"reason" from int to enum.
(c_cpp_error): Rename to...
(c_cpp_diagnostic): ...this, converting level and reason to enums.
* c-common.h (c_cpp_error): Rename to...
(c_cpp_diagnostic): ...this, converting level and reason to enums.
* c-opts.c (c_common_init_options): Update for renaming.
2018-10-08 Richard Sandiford <richard.sandiford@arm.com>
PR c/87286
* c-common.c (vector_types_compatible_elements_p): Use
INTEGRAL_TYPE_P instead of checking only for INTEGER_TYPE.
2018-10-04 Vinay Kumar <vinay.kumar@blackfigtech.com>
* c-attribs.c (get_priority): Add a warning flag warn_prio_ctor_dtor
to generate constructor destructor priority warning.
* c.opt (-Wprio-ctor-dtor): New option.
2018-10-01 Jason Merrill <jason@redhat.com>
* c-lex.c (c_common_has_attribute): Add no_unique_address.
2018-10-01 Eric Botcazou <ebotcazou@adacore.com>
* c-ada-spec.c (get_underlying_decl): Get to the main type variant.
(dump_ada_node): Add const keyword.
2018-09-25 Martin Liska <mliska@suse.cz>
* c-common.c (c_common_truthvalue_conversion):
Remove Pascal from documentation.
2018-09-21 Eric Botcazou <ebotcazou@adacore.com>
* c-ada-spec.c: Include diagnostic.h.
(dump_ada_declaration) <RECORD_TYPE>: Issue a warning on packed layout.
2018-09-19 Marek Polacek <polacek@redhat.com>
* c.opt (Wclass-conversion): New.
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
splay_tree_delete_pointers.
2018-05-26 Jakub Jelinek <jakub@redhat.com>
PR bootstrap/85921
* c-warn.c (diagnose_mismatched_attributes): Remove unnecessary
noinline variable to workaround broken kernel headers.
2018-05-18 Jason Merrill <jason@redhat.com>
* c.opt (Wdeprecated-copy): New flag.
2018-05-17 Martin Liska <mliska@suse.cz>
* c-warn.c (overflow_warning): Do not use
space in between 'G_' and '('.
2018-05-09 Jason Merrill <jason@redhat.com>
* c-common.c (valid_array_size_p): Add complain parameter.
* c-common.h: ...which defaults to true.
2018-05-11 Jakub Jelinek <jakub@redhat.com>
PR c/85696
* c-omp.c (c_omp_predetermined_sharing): Return
OMP_CLAUSE_DEFAULT_SHARED for artificial vars with integral type.
2018-05-11 Martin Liska <mliska@suse.cz>
PR sanitizer/85556
* c-attribs.c (handle_no_sanitize_attribute): Iterate all
TREE_LIST values.
2018-05-10 Jakub Jelinek <jakub@redhat.com>
PR c++/85662
* c-common.h (fold_offsetof_1): Removed.
(fold_offsetof): Add TYPE argument defaulted to size_type_node and
CTX argument defaulted to ERROR_MARK.
* c-common.c (fold_offsetof_1): Renamed to ...
(fold_offsetof): ... this. Remove wrapper function. Add TYPE
argument, convert the pointer constant to TYPE and use size_binop
with PLUS_EXPR instead of fold_build_pointer_plus if type is not
a pointer type. Adjust recursive calls.
2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
PR c++/85400
* c-attribs.c (handle_visibility_attribute): Do not set no_add_attrs.
2018-05-07 Nathan Sidwell <nathan@acm.org>
* c.opt (ffor-scope): Remove functionality, issue warning.
2018-05-03 Nathan Sidwell <nathan@acm.org>
* c.opt (ffriend-injection): Remove functionality, issue warning.
2018-05-01 David Malcolm <dmalcolm@redhat.com>
PR c/84258
* c-format.c (struct format_check_results): Add field
"number_non_char".
(check_format_info): Initialize it, and warn if encountered.
(check_format_arg): Distinguish between wide char and
everything else when detecting arrays of non-char.
2018-04-30 David Malcolm <dmalcolm@redhat.com>
* c-format.c (get_corrected_substring): Update for
location_get_source_line returning a char_span. Use a char_span
when handling the prefix of the correction.
* c-indentation.c (get_visual_column): Update for
location_get_source_line returning a char_span.
(get_first_nws_vis_column): Likewise.
2018-03-29 David Malcolm <dmalcolm@redhat.com>
PR c++/84269
* known-headers.cc (get_stdlib_header_for_name): Add various names
from <assert.h>, <string.h>, and <memory.h>; add more names from
<stdio.h>.
2018-03-27 Jakub Jelinek <jakub@redhat.com>
PR c++/85061
* c-common.c (fold_offsetof_1) <case COMPOUND_EXPR>: Assert that
get_base_address of the second operand is a VAR_P, rather than the
operand itself, and use gcc_checking_assert instead of gcc_assert.
2018-03-23 Marek Polacek <polacek@redhat.com>
PR c++/85045
* c-pretty-print.c (c_pretty_printer::multiplicative_expression)
<case RDIV_EXPR>: Tweak condition.
2018-03-20 Eric Botcazou <ebotcazou@adacore.com>
* c-ada-spec.c (pp_ada_tree_identifier): Deal specifically with _Bool.
2018-03-16 Jakub Jelinek <jakub@redhat.com>
PR c/84909
* c-warn.c (conversion_warning): Replace "to to" with "to" in
diagnostics.
PR c/84910
* c-warn.c (diagnose_mismatched_attributes): Remove trailing space from
diagnostics.
2018-03-16 Richard Biener <rguenther@suse.de>
PR c/84873
* c-gimplify.c (c_gimplify_expr): Revert previous change. Instead
unshare the possibly folded expression.
2018-03-15 Richard Biener <rguenther@suse.de>
PR c/84873
* c-gimplify.c (c_gimplify_expr): Do not fold expressions.
2018-03-13 Martin Sebor <msebor@redhat.com>
PR tree-optimization/84725
* c-attribs.c (handle_nonstring_attribute): Allow attribute nonstring
with all three narrow character types, including their qualified forms.
2018-03-12 Martin Sebor <msebor@redhat.com>
PR tree-optimization/83456
* gcc/c-family/c-common.c (check_function_restrict): Return bool.
Restore checking of bounded built-in functions.
(check_function_arguments): Also return the result
of warn_for_restrict.
* gcc/c-family/c-common.c (check_function_restrict): Return bool.
* gcc/c-family/c-warn.c (warn_for_restrict): Return bool.
2018-03-02 Marek Polacek <polacek@redhat.com>
PR c++/84171
* c-warn.c (warn_for_sign_compare): Bail out if any of the operands
is erroneous.
2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
* c-attribs.c (c_common_attribute_table): Remove "cilk simd
function".
2018-03-01 Marek Polacek <polacek@redhat.com>
PR c++/84639
* c-attribs.c (common_handle_aligned_attribute): Don't use invalid
alignment in computation.
2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
* c-ada-spec.c (dump_ada_node) <NULLPTR_TYPE>: New case.
<REAL_TYPE>: Deal specifically with _Float128/__float128.
2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
* c-ada-spec.c (dump_ada_double_name) <ENUMERAL_TYPE>: New case.
(is_char_array): Take a type instead of a declaration.
(dump_ada_array_type): Likewise.
(is_simple_enum): Minor tweak.
(dump_ada_enum_type): New function extracted from...
(dump_ada_node) <ENUMERAL_TYPE>: ...here. Invoke it.
<INTEGER_TYPE>: Remove unreachable code.
<RECORD_TYPE>: Likewise. Minor tweaks.
(dump_nested_type) <ARRAY_TYPE>: Adjust to above changes.
<ENUMERAL_TYPE>: New case.
<RECORD_TYPE>: Factor out common code.
(dump_ada_declaration) <ARRAY_TYPE>: Adjust to above changes.
Minor tweaks. Deal with enumeral types.
(dump_ada_structure): Minor tweaks.
2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
* c-ada-spec.c (dump_ada_node) <POINTER_TYPE>: Do not use generic
address for incomplete structures.
(dump_forward_type): Do not bail out for incomplete structures.
(dump_ada_declaration): Do not special-case incomplete structures
for subtypes. Dump them as null records for types.
2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
* c-ada-spec.c (dump_ada_import): Use boolean and fix formatting.
(is_char_array): Fix formatting.
(dump_template_types): Likewise.
(dump_generic_ada_node): Rename into...
(dump_ada_node): ...this.
<POINTER_TYPE>: Remove superfluous space. Use generic address for
incomplete structures and not for empty structures. Do not use it
when forward declarations are needed.
(dump_forward_type): New function.
(dump_nested_types): Remove FORWARD parameter. Do not consider
TREE_VISITED and do not generate a forward declaration. Only dump
original nested types for nested declaration.
(dump_nested_type) <POINTER_TYPE>: Call dump_forward_type.
<ARRAY_TYPE>: Likewise if the component type is an anonymous pointer.
<RECORD_TYPE>: Do not consider TREE_VISITED.
(dump_ada_declaration): Use booleans and fix formatting throughout.
<TYPE_DECL>: Skip incomplete structures and not empty structures.
Call dump_forward_type instead of dump_nested_types for a typedef.
Remove superfluous check and adjust call to dump_nested_types.
<POINTER_TYPE>: Call dump_forward_type and fall through.
(dump_ada_struct_decl): Rename into...
(dump_ada_structure): ...this. Do not special-case empty structures.
2018-02-27 Martin Sebor <msebor@redhat.com>
PR c++/83871
* c.opt (-Wmissing-attributes): New option.
2018-02-21 Martin Liska <mliska@suse.cz>
* c.opt (Wcatch-value=): Add IntegerRange.
2018-02-15 Jason Merrill <jason@redhat.com>
* c-cppbuiltin.c (c_cpp_builtins): Update __cpp_deduction_guides.
2018-02-09 Nathan Sidwell <nathan@acm.org>
PR c/84293
* c-common.h (strict_aliasing_warning): Drop OTYPE arg, insert LOC
arg.
* c-warn.c (strict_aliasing_warning): Drop OTYPE arg, require LOC
arg. Adjust.
2018-02-09 Martin Sebor <msebor@redhat.com>
PR lto/84212
* c.opt (-Wstringop-overflow, -Warray-bounds): Add LTO.
(-Walloc-size-larger-than, -Wformat-truncation=): Same.
(-Wmaybe-uninitialized, -Wnonnull, -Wrestrict): Same.
(-Wstrict-overflow, -Wsuggest-attribute): Same.
(-Wuninitialized): Same.
2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
* c-ada-spec.c (dump_ada_declaration): Do not generate the 'constant'
keyword for components.
2018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
* c-common.h (DECL_UNNAMED_BIT_FIELD): New.
2018-02-02 Julia Koval <julia.koval@intel.com>
* c-common.h (omp_clause_mask): Move to wide_int_bitmask.h.
2018-01-29 Marek Polacek <polacek@redhat.com>
PR c/83966
* c-format.c (check_function_format): Check current_function_decl.
2018-01-27 Jakub Jelinek <jakub@redhat.com>
* c-cppbuiltin.c (c_cpp_builtins): Use ggc_strdup for the fp_suffix
argument.
(LAZY_HEX_FP_VALUES_CNT): Define.
(lazy_hex_fp_values): Allow up to LAZY_HEX_FP_VALUES_CNT lazy hex fp
values rather than just 12.
(builtin_define_with_hex_fp_value): Likewise.
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.
2018-01-17 David Malcolm <dmalcolm@redhat.com>
PR c++/83814
* c-common.c (fold_for_warn): Move to c/c-fold.c and cp/expr.c.
2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
* c-ada-spec.c (dump_number): Add FLOAT_P parameter.
Skip 'f' and 'F' characters if it is true.
(store_ada_macro): Minor tweak.
(dump_ada_macros) <CPP_COMMENT>: Likewise.
<CPP_WSTRING>: Likewise.
<CPP_STRING>: Output '&' in the buffer if not the first string.
<CPP_NUMBER>: Adjust calls to dump_number.
2018-01-10 David Malcolm <dmalcolm@redhat.com>
PR c++/43486
* c-common.c: Include "selftest.h".
(get_atomic_generic_size): Perform the test for integral type
before the range test for any integer constant, fixing indentation
of braces. Call fold_for_warn before testing for an INTEGER_CST.
(reject_gcc_builtin): Strip any location wrapper from EXPR.
(selftest::test_fold_for_warn): New function.
(selftest::c_common_c_tests): New function.
(selftest::c_family_tests): Call it, and
selftest::c_pretty_print_c_tests.
* c-common.h (selftest::c_pretty_print_c_tests): New decl.
* c-format.c (check_format_arg): Convert VAR_P check to a
fold_for_warn.
* c-pretty-print.c: Include "selftest.h".
(pp_c_cast_expression): Don't print casts for location wrappers.
(selftest::assert_c_pretty_printer_output): New function.
(ASSERT_C_PRETTY_PRINTER_OUTPUT): New macro.
(selftest::test_location_wrappers): New function.
(selftest::c_pretty_print_c_tests): New function.
* c-warn.c (warn_for_memset): Call fold_for_warn on the arguments.
2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
Alan Hayward <alan.hayward@arm.com>
David Sherwood <david.sherwood@arm.com>
* c-common.c (c_common_type_for_mode): Handle MODE_VECTOR_BOOL.
2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
Alan Hayward <alan.hayward@arm.com>
David Sherwood <david.sherwood@arm.com>
* c-ubsan.c (ubsan_instrument_shift): Treat GET_MODE_BITSIZE
as polynomial.
2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
Alan Hayward <alan.hayward@arm.com>
David Sherwood <david.sherwood@arm.com>
* c-common.c (vector_types_convertible_p, c_build_vec_perm_expr)
(convert_vector_to_array_for_subscript): Handle polynomial
TYPE_VECTOR_SUBPARTS.
(c_common_type_for_mode): Check valid_vector_subparts_p.
* c-pretty-print.c (pp_c_initializer_list): Handle polynomial
VECTOR_CST_NELTS.
2018-01-03 Jakub Jelinek <jakub@redhat.com>
Update copyright years.
2017-12-22 Mike Stump <mikestump@comcast.net>
Eric Botcazou <ebotcazou@adacore.com>
* c-pragma.c (init_pragma): Register pragma GCC unroll.
* c-pragma.h (enum pragma_kind): Add PRAGMA_UNROLL.
2017-12-22 Alexandre Oliva <aoliva@redhat.com>
PR debug/83527
PR debug/83419
* c-semantics.c (only_debug_stmts_after_p): New.
(pop_stmt_list): Clear side effects in debug-only stmt list.
Check for single nondebug stmt followed by debug stmts only.
2017-12-21 Alexandre Oliva <aoliva@redhat.com>
PR debug/83419
* c-semantics.c (pop_stmt_list): Propagate side effects from
single nondebug stmt to container list.
2017-12-19 Jakub Jelinek <jakub@redhat.com>
* known-headers.cc (get_stdlib_header_for_name): Replace Yoda
conditions with typical order conditions.
2017-12-18 Marek Polacek <polacek@redhat.com>
* c-warn.c (warn_logical_operator): Return early if -Wlogical-op is
not in effect.
2017-12-17 Martin Sebor <msebor@redhat.com>
* c-attribs.c (common_handle_aligned_attribute): Avoid issuing
an error for attribute warn_if_not_aligned.
2017-12-16 Martin Sebor <msebor@redhat.com>
PR tree-optimization/78918
* c-common.c (check_function_restrict): Avoid checking built-ins.
* c.opt (-Wrestrict): Include in -Wall.
2017-12-15 Jakub Jelinek <jakub@redhat.com>
* c-attribs.c (c_common_attribute_table,
c_common_format_attribute_table): Swap affects_type_identity
and handler fields, adjust comments.
2017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
* c.opt (Wcast-function-type): New warning option.
* c-lex.c (get_fileinfo): Avoid warning.
* c-ppoutput.c (scan_translation_unit_directives_only): Remove cast.
2017-12-14 Qing Zhao <qing.zhao@oracle.com>
PR middle_end/79538
* c-cppbuiltin.c (builtin_define_with_hex_fp_value):
Adjust the size of buf1 and buf2, add a new buf to avoid
format-overflow warning.
2017-12-12 Alexandre Oliva <aoliva@redhat.com>
* c-semantics.c (pop_stmt_list): Move begin stmt marker into
subsequent statement list.
2017-12-07 Martin Sebor <msebor@redhat.com>
PR c/81544
PR c/81566
* c-attribs.c (attr_aligned_exclusions): New array.
(attr_alloc_exclusions, attr_cold_hot_exclusions): Same.
(attr_common_exclusions, attr_const_pure_exclusions): Same.
(attr_gnu_inline_exclusions, attr_inline_exclusions): Same.
(attr_noreturn_exclusions, attr_returns_twice_exclusions): Same.
(attr_warn_unused_result_exclusions): Same.
(handle_hot_attribute, handle_cold_attribute): Simplify.
(handle_const_attribute): Warn on function returning void.
(handle_pure_attribute): Same.
(handle_aligned_attribute): Diagnose conflicting attribute
specifications.
* c-warn.c (diagnose_mismatched_attributes): Simplify.
2017-12-06 David Malcolm <dmalcolm@redhat.com>
PR c/83236
* c-common.c (selftest::c_family_tests): Call
selftest::c_spellcheck_cc_tests.
* c-common.h (selftest::c_spellcheck_cc_tests): New decl.
* c-spellcheck.cc: Include "selftest.h".
(name_reserved_for_implementation_p): New function.
(should_suggest_as_macro_p): New function.
(find_closest_macro_cpp_cb): Move the check for NT_MACRO to
should_suggest_as_macro_p and call it.
(selftest::test_name_reserved_for_implementation_p): New function.
(selftest::c_spellcheck_cc_tests): New function.
* c-spellcheck.h (name_reserved_for_implementation_p): New decl.
2017-12-06 David Malcolm <dmalcolm@redhat.com>
* c-spellcheck.cc: New file, taken from macro-handling code in
spellcheck-tree.c.
* c-spellcheck.h: New file, taken from macro-handling code in
spellcheck-tree.h.
2017-12-01 Jakub Jelinek <jakub@redhat.com>
* c-attribs.c (c_common_attribute_table): Remove "cilk simd function"
attribute.
(handle_simd_attribute): Don't check for "cilk simd function"
attribute. Reindent, formatting changes.
2017-11-30 Julia Koval <julia.koval@intel.com>
* c-common.h (inv_list): Remove.
2017-11-28 Jakub Jelinek <jakub@redhat.com>
PR sanitizer/81275
* c-common.c (c_switch_covers_all_cases_p_1,
c_switch_covers_all_cases_p): New functions.
* 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>
* array-notation-common.c: Delete.
* c-cilkplus.c: Ditto.
* c-common.c (_Cilk_spawn, _Cilk_sync, _Cilk_for): Remove.
* c-common.def (ARRAY_NOTATION_REF): Remove.
* c-common.h (RID_CILK_SPAWN, build_array_notation_expr,
build_array_notation_ref, C_ORT_CILK, c_check_cilk_loop,
c_validate_cilk_plus_loop, cilkplus_an_parts,
cilk_ignorable_spawn_rhs_op,
cilk_recognize_spawn): Remove.
* c-gimplify.c (CILK_SPAWN_STMT): Remove.
* c-omp.c: Remove CILK_SIMD check.
* c-pragma.c: Ditto.
* c-pragma.h: Remove CILK related pragmas.
* c-pretty-print.c (c_pretty_printer::postfix_expression): Remove
ARRAY_NOTATION_REF condition.
(c_pretty_printer::expression): Ditto.
* c.opt (fcilkplus): Remove.
* cilk.c: Delete.
2017-11-21 Marc Glisse <marc.glisse@inria.fr>
* c-pretty-print.c (pp_c_additive_expression,
c_pretty_printer::expression): Handle POINTER_DIFF_EXPR.
2017-11-21 Jakub Jelinek <jakub@redhat.com>
* c-common.c (get_nonnull_operand): Use tree_to_uhwi.
PR c++/83059
* c-common.c (get_atomic_generic_size): Use TREE_INT_CST_LOW
instead of tree_to_uhwi, formatting fix.
2017-11-20 David Malcolm <dmalcolm@redhat.com>
PR c/81404
* known-headers.cc: New file, based on material from c/c-decl.c.
(suggest_missing_header): Copied as-is.
(get_stdlib_header_for_name): New, based on get_c_name_hint but
heavily edited to add C++ support. Add some knowledge about
<limits.h>, <stdint.h>, and <wchar.h>.
* known-headers.h: Likewise.
2017-11-20 David Malcolm <dmalcolm@redhat.com>
* c-common.h (enum lookup_name_fuzzy_kind): Move to name-hint.h.
(lookup_name_fuzzy): Likewise. Convert return type from
const char * to name_hint. Add location_t param.
* name-hint.h: New header.
2017-11-19 Jakub Jelinek <jakub@redhat.com>
PR c/66618
PR c/69960
* c-common.h (c_fully_fold): Add LVAL argument defaulted to false.
2017-11-16 Joseph Myers <joseph@codesourcery.com>
* c.opt (-std=c17, std=gnu17, -std=iso9899:2017): Refer to 2018
expected publication date of C17.
(-std=c18, -std=gnu18, -std=iso9899:2018): New option aliases.
2017-11-15 Joseph Myers <joseph@codesourcery.com>
PR c/81156
* c-common.c (c_common_reswords): Add __builtin_tgmath.
* c-common.h (enum rid): Add RID_BUILTIN_TGMATH.
2017-11-10 Martin Sebor <msebor@redhat.com>
PR c/81117
* c-common.c (catenate_strings): Use memcpy instead of strncpy.
* c-warn.c (sizeof_pointer_memaccess_warning): Handle arrays.
* c.opt (-Wstringop-truncation): New option.
2017-11-06 Martin Liska <mliska@suse.cz>
PR middle-end/82404
* c-opts.c (c_common_post_options): Set -Wreturn-type for C++
FE.
* c.opt: Set default value of warn_return_type.
2017-10-31 David Malcolm <dmalcolm@redhat.com>
* c-common.c (binary_op_error): Update for renaming of
error_at_rich_loc.
(c_parse_error): Likewise.
* c-warn.c (warn_logical_not_parentheses): Likewise for
renaming of inform_at_rich_loc.
(warn_for_restrict): Likewise for renaming of
warning_at_rich_loc_n.
2017-10-30 Joseph Myers <joseph@codesourcery.com>
* c.opt (std=c17, std=gnu17, std=iso9899:2017): New options.
* c-opts.c (set_std_c17): New function.
(c_common_init_options): Use gnu17 as default C version.
(c_common_handle_option): Handle -std=c17 and -std=gnu17.
2017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
* c-cppbuiltin.c (mode_has_fma): Add support for PowerPC KFmode.
(c_cpp_builtins): If a machine has a fast fma _Float<N> and
_Float<N>X variant, define __FP_FAST_FMA<N> and/or
__FP_FAST_FMA<N>X.
2017-10-23 Marek Polacek <polacek@redhat.com>
PR c/82681
* c-warn.c (warnings_for_convert_and_check): Fix typos.
2017-10-19 Eric Botcazou <ebotcazou@adacore.com>
* c-common.c (check_builtin_function_arguments): Also check arguments
of __builtin_alloca_with_align_and_max.
2017-10-17 David Malcolm <dmalcolm@redhat.com>
* c-format.c (format_warning_at_char): Pass UNKNOWN_LOCATION
rather than NULL to format_warning_va.
(check_format_types): Likewise when calling format_type_warning.
Remove code to extract source_ranges and source_range * in favor
of just a location_t.
(format_type_warning): Convert source_range * param to a
location_t.
2017-10-13 Jakub Jelinek <jakub@redhat.com>
* c-gimplify.c (c_gimplify_expr): Handle [LR]ROTATE_EXPR like
[LR]SHIFT_EXPR.
2017-10-12 David Malcolm <dmalcolm@redhat.com>
* c-common.c (enum missing_token_insertion_kind): New enum.
(get_missing_token_insertion_kind): New function.
(maybe_suggest_missing_token_insertion): New function.
* c-common.h (maybe_suggest_missing_token_insertion): New decl.
2017-10-11 Nathan Sidwell <nathan@acm.org>
* c-opts.c (add_prefixed_path): Change chain to incpath_kind.
(c_common_handle_option): Update incpath_kind names.
2017-10-11 Martin Liska <mliska@suse.cz>
PR sanitizer/82490
* c-attribs.c (handle_no_sanitize_attribute): Report directly
Wattributes warning.
2017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
* c-ada-spec.c (dump_generic_ada_node): Use wi::to_wide when
operating on trees as wide_ints.
* c-common.c (pointer_int_sum): Likewise.
* c-pretty-print.c (pp_c_integer_constant): Likewise.
* c-warn.c (match_case_to_enum_1): Likewise.
(c_do_switch_warnings): Likewise.
(maybe_warn_shift_overflow): Likewise.
2017-10-10 Jakub Jelinek <jakub@redhat.com>
PR c/82437
* c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_wide
instead of wide_int::from.
2017-10-06 Jakub Jelinek <jakub@redhat.com>
PR c/82437
* c-warn.c (warn_tautological_bitwise_comparison): Instead of
using to_widest use wide_int with the larger of the two precisions.
2017-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
* c-pretty-print.c (pp_c_parameter_type_list): Print ... for variadic
functions.
2017-10-02 Richard Sandiford <richard.sandiford@linaro.org>
* c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_widest
when combining the original unconverted comparison operands.
2017-09-29 Jakub Jelinek <jakub@redhat.com>
* c-attribs.c (handle_noipa_attribute): Don't add "stack_protect"
attribute.
2017-09-29 Eric Botcazou <ebotcazou@adacore.com>
* c-ada-spec.c (to_ada_name): Add index parameter.
(pp_ada_tree_identifier): Likewise.
(dump_ada_macros): Adjust call to to_ada_name.
(struct overloaded_name_hash): New type.
(struct overloaded_name_hasher): Likewise.
(overloaded_names): New hash table.
(compute_overloading_index): New function.
(dump_ada_decl_name): Call it and pass the result to
pp_ada_tree_identifier.
(dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
(dump_ada_function_declaration): Likewise.
(dump_generic_ada_node): Likewise.
(print_constructor): Likewise.
(print_destructor): Likewise.
(dump_ada_specs): Delete overloaded_names table.
2017-09-29 Eric Botcazou <ebotcazou@adacore.com>
* c-ada-spec.c (max_ada_macros): Move around.
(store_ada_macro_index): Likewise.
(source_file): Rename into...
(macro_source_file): ...this.
(count_ada_macro): Move around.
(store_ada_macro): Likewise.
(compare_macro): Likewise.
(print_ada_macros): Merge in...
(dump_ada_macros): ...this.
(source_file_base): Rename into...
(current_source_file): ...this.
(print_comment): Move around.
(dump_ada_nodes): Call dump_ada_declaration directly.
(struct with): Change type of limited field to bool.
(append_withs): Change type of limited_access parameter to bool.
(pp_ada_tree_identifie): Likewise.
(dump_ada_decl_nam): Likewise.
(dump_generic_ada_node): Likewise. Do not print the return type.
(to_ada_name): Change type of space_found parameter to bool.
(dump_ada_function_declaration): Return void and change type of
parameters to bool. Also print the return type for a function.
(print_ada_methods): Rename into...
(dump_ada_methods): ...this.
(print_ada_declaration): Rename into ...
(dump_ada_declaration): ...this. Do not print the return type.
(print_ada_struct_decl): Rename into...
(dump_ada_struct_decl): ...this.
2017-09-29 Jakub Jelinek <jakub@redhat.com>
* c-attribs.c (handle_packed_attribute): Test DECL_C_BIT_FIELD
rather than DECL_INITIAL.
(common_handle_aligned_attribute): Likewise.
2017-09-20 Alexandre Oliva <aoliva@redhat.com>
* c.opt (gen-decls): Add RejectNegative.
2017-09-15 Andrew Sutton <andrew.n.sutton@gmail.com>
Jakub Jelinek <jakub@redhat.com>
Add support for -std=c++2a.
* c-common.h (cxx_dialect): Add cxx2a as a dialect.
* opt.c: Add options for -std=c++2a and -std=gnu++2a.
* c-opts.c (set_std_cxx2a): New.
(c_common_handle_option): Set options when -std=c++2a is enabled.
(c_common_post_options): Adjust comments.
(set_std_cxx14, set_std_cxx17): Likewise.
2017-09-15 Eric Botcazou <ebotcazou@adacore.com>
* c-pragma.c (handle_pragma_scalar_storage_order): Expand on error
message for non-uniform endianness and issue a warning in C++.
2017-09-15 Jakub Jelinek <jakub@redhat.com>
* c.opt (Wc++1z-compat): Change from option to undocumented alias.
(Wc++17-compat): Change from undocumented alias to option.
(Wnoexcept-type): Enable by Wc++17-compat instead of Wc++1z-compat,
change C++1z to C++17 in description.
(std=c++1z, std=gnu++1z): Change from option to undocumented
deprecated alias.
(std=c++17, std=gnu++17): Change from undocumented alias to option.
Adjust description.
* c-common.h (enum cxx_dialect): Rename cxx1z to cxx17.
* c-opts.c (set_std_cxx1z): Rename to ...
(set_std_cxx17): ... this.
(c_common_handle_option): Rename OPT_std_c__1z to OPT_std_c__17
and OPT_std_gnu__1z to OPT_std_gnu__17. Adjust set_std_cxx1z
caller.
(c_common_post_options): Use cxx17 instead of cxx1z. Adjust
comments.
2017-09-12 H.J. Lu <hongjiu.lu@intel.com>
* c-attribs.c (common_handle_aligned_attribute): Don't warn
function alignment if warn_if_not_aligned_p is true.
2017-09-12 Nathan Sidwell <nathan@acm.org>
* c-common.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
resort_sorted_fields): Move to c/c-decl.c.
* c-common.h (field_decl_cmp, resort_sorted_fields): Delete.
(struct sorted_fields_type): Move to c/c-lang.h.
2017-09-09 Jonathan Wakely <jwakely@redhat.com>
PR c++/81852
* c-cppbuiltin.c (c_cpp_builtins): Define __cpp_threadsafe_static_init.
2017-09-04 Marek Polacek <polacek@redhat.com>
PR c/81783
* c-warn.c (warn_tautological_bitwise_comparison): New function.
(warn_tautological_cmp): Call it.
2017-09-01 Boris Kolpackov <boris@codesynthesis.com>
* c-opts.c (c_common_finish): Write dependency information even if
there are errors.
2017-09-01 Jakub Jelinek <jakub@redhat.com>
PR c/81887
* c-pragma.c (omp_pragmas): Move "ordered" entry from here to ...
(omp_pragmas_simd): ... here.
* c-omp.c (c_finish_omp_ordered): If clauses isn't simd clause alone,
create new clauses list containing just simd clause.
2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
Alan Hayward <alan.hayward@arm.com>
David Sherwood <david.sherwood@arm.com>
* c-attribs.c (vector_mode_valid_p) Fold GET_MODE_INNER call
into scalar_mode_supported_p call.
(handle_mode_attribute): Update call to scalar_mode_supported_p.
2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
Alan Hayward <alan.hayward@arm.com>
David Sherwood <david.sherwood@arm.com>
* c-common.c (c_common_fixed_point_type_for_size): Use opt_scalar_mode
for the mode iterator.
2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
Alan Hayward <alan.hayward@arm.com>
David Sherwood <david.sherwood@arm.com>
* c-lex.c (interpret_fixed): Use SCALAR_TYPE_MODE.
* c-common.c (c_build_vec_perm_expr): Likewise.
2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
Alan Hayward <alan.hayward@arm.com>
David Sherwood <david.sherwood@arm.com>
* c-common.c (c_common_type_for_mode): Use as_a <scalar_int_mode>.
2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
Alan Hayward <alan.hayward@arm.com>
David Sherwood <david.sherwood@arm.com>
* c-attribs.c (handle_mode_attribute): Check for a scalar_int_mode
before calling targetm.addr_space.valid_pointer_mode.
2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
Alan Hayward <alan.hayward@arm.com>
David Sherwood <david.sherwood@arm.com>
* 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>
* c-common.c (c_common_fixed_point_type_for_size): Use new mode
iterators.
* c-cppbuiltin.c (c_cpp_builtins): Likewise.
2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
Alan Hayward <alan.hayward@arm.com>
David Sherwood <david.sherwood@arm.com>
* c-cppbuiltin.c (mode_has_fma): Prefix mode names with E_ in
case statements.
2017-08-29 Martin Liska <mliska@suse.cz>
PR other/39851
* c-common.c (parse_optimize_options): Add argument to function
call.
* c-pragma.c (handle_pragma_diagnostic): Likewise.
2017-08-24 David Malcolm <dmalcolm@redhat.com>
* c-lex.c (interpret_float): Use token location
when building an EXCESS_PRECISION_EXPR.
2017-08-21 David Malcolm <dmalcolm@redhat.com>
* c-common.c (check_function_arguments): Add "arglogs" param; pass
it to check_function_format.
* c-common.h (check_function_arguments): Add vec<location_t> *
param.
(check_function_format): Likewise.
* c-format.c (struct format_check_context): Add field "arglocs".
(check_function_format): Add param "arglocs"; pass it to
check_format_info.
(check_format_info): Add param "arglocs"; use it to initialize
new field of format_ctx.
(check_format_arg): Pass format_ctx->arglocs to new param of
check_format_info_main.
(class argument_parser): New field "arglocs".
(argument_parser::argument_parser): Add "arglocs_" param and use
it to initialize new field.
(argument_parser::check_argument_type): Pass new arglocs field to
check_format_types.
(check_format_info_main): Add param "arglocs", and use it when
constructing arg_parser.
(check_format_types): Add param "arglocs"; use it if non-NULL when
!EXPR_HAS_LOCATION (cur_param) to get at location information.
2017-08-18 H.J. Lu <hongjiu.lu@intel.com>
PR c/53037
* c-attribs.c (handle_warn_if_not_aligned_attribute): New.
(c_common_attribute_table): Add warn_if_not_aligned.
(handle_aligned_attribute): Renamed to ...
(common_handle_aligned_attribute): Remove argument, name, and add
argument, warn_if_not_aligned. Handle warn_if_not_aligned.
(handle_aligned_attribute): New.
* c.opt: Add -Wif-not-aligned and -Wpacked-not-aligned.
2017-08-14 Martin Sebor <msebor@redhat.com>
PR c/81117
* c-attribs.c (c_common_attribute_table): Add nonstring entry.
(handle_nonstring_attribute): New function.
2017-08-14 Martin Sebor <msebor@redhat.com>
PR c/81117
* c-format.h (T89_G): New macro.
* c-format.c (local_gcall_ptr_node): New variable.
(init_dynamic_diag_info): Initialize it.
2017-08-11 Martin Liska <mliska@suse.cz>
* c-opts.c (c_common_post_options): Replace ASM_OUTPUT_DEF with
TARGET_SUPPORTS_ALIASES.
2017-08-10 David Malcolm <dmalcolm@redhat.com>
* c-common.c (c_parse_error): Add rich_location * param, using it
rather implicitly using input_location.
* c-common.h (c_parse_error): Add rich_location * param.
2017-08-09 Marek Polacek <polacek@redhat.com>
* c-common.c (pointer_int_sum): Use true/false instead of 1/0.
(c_common_truthvalue_conversion): Likewise.
* c-omp.c (c_finish_omp_atomic): Likewise.
* c-common.h (build_binary_op): Update declaration.
2017-08-08 Martin Liska <mliska@suse.cz>
* c-ada-spec.c: Include header files.
* c-ubsan.c: Likewise.
* c-warn.c: Likewise.
2017-08-07 Jakub Jelinek <jakub@redhat.com>
PR c/69389
* c-omp.c (c_finish_omp_atomic): Handle atomics on bitfields.
2017-08-07 Eric Botcazou <ebotcazou@adacore.com>
* c-ada-spec.c (has_nontrivial_methods): Test for FUNCTION_DECL.
(print_ada_methods): Likewise.
(print_ada_declaration): Likewise.
2017-08-07 Martin Liska <mliska@suse.cz>
* array-notation-common.c: Add new includes.
* c-format.c( handle_format_attribute): Canonicalize a format
function name.
* c-lex.c (c_common_has_attribute): Canonicalize name of an
attribute.
* c-pretty-print.c: Add new include.
2017-08-05 Eric Botcazou <ebotcazou@adacore.com>
* c-ada-spec.c (has_static_fields): Look only into variables.
(print_constructor): Add TYPE parameter and use it for the name.
(print_destructor): Likewise.
(print_ada_declaration): Adjust to new constructor/destructor names.
Adjust calls to print_constructor and print_destructor.
(print_ada_struct_decl): Do not test TREE_STATIC on FIELD_DECL.
Look only into variables in the final loop.
2017-08-01 Eric Botcazou <ebotcazou@adacore.com>
* c-ada-spec.c (has_static_fields): Look only into fields.
(dump_generic_ada_node): Small tweak.
(dump_nested_types): Look only into fields.
(print_ada_declaration): Look only into methods. Small tweak.
(print_ada_struct_decl): Look only into fields. Use DECL_VIRTUAL_P.
2017-08-01 Eric Botcazou <ebotcazou@adacore.com>
* c-ada-spec.c (print_generic_ada_decl): Pass correctly-typed constant.
(dump_ada_function_declaration): Likewise.
(dump_generic_ada_node): Likewise.
(print_ada_declaration): Add support for const-qualified variables.
2017-07-31 Martin Liska <mliska@suse.cz>
PR sanitize/81530
* c-ubsan.c (ubsan_maybe_instrument_array_ref):
Guard condition with flag_sanitize_p also with current_function_decl
non-null equality.
(ubsan_maybe_instrument_reference_or_call): Likewise.
2017-07-30 Uros Bizjak <ubizjak@gmail.com>
* c-format.c (asm_fprintf_char_table): Add 'z' to format_chars.
2017-07-29 Eric Botcazou <ebotcazou@adacore.com>
* c-ada-spec.c (dump_generic_ada_node): Take into account signedness
for enumeral types.
(print_ada_declaration): Add missing guard for record types.
2017-07-27 Jakub Jelinek <jakub@redhat.com>
PR c/45784
* c-omp.c (c_finish_omp_for): If the condition is wrapped in
rhs of COMPOUND_EXPR(s), skip them and readd their lhs into
new COMPOUND_EXPRs around the rhs of the comparison.
2017-07-27 Marek Polacek <polacek@redhat.com>
PR c/81417
* c-warn.c (warn_for_sign_compare): Tweak the warning message. Print
the types.
2017-07-27 Jakub Jelinek <jakub@redhat.com>
* c-attribs.c (c_common_attribute_table): Add noipa attribute.
(handle_noipa_attribute): New function.
2017-07-07 Torsten Duwe <duwe@suse.de>
* c-attribs.c (c_common_attribute_table): Add entry for
"patchable_function_entry".
2017-07-20 Nathan Sidwell <nathan@acm.org>
Remove TYPE_METHODS.
* c-ada-spec.c (is_tagged_type, has_nontrivial_methods,
dump_ada_template, print_ada_methods,
print_ada_declaration): Member fns are on TYPE_FIELDS.
2017-07-18 Nathan Sidwell <nathan@acm.org>
* c-warn.c (warn_for_memset): Use TYPE_{MIN,MAX}_VALUE.
2017-07-14 David Malcolm <dmalcolm@redhat.com>
* c-common.c (try_to_locate_new_include_insertion_point): New
function.
(per_file_includes_t): New typedef.
(added_includes_t): New typedef.
(added_includes): New variable.
(maybe_add_include_fixit): New function.
* c-common.h (maybe_add_include_fixit): New decl.
2017-07-10 Martin Sebor <msebor@redhat.com>
PR other/81345
* c.opt (-Wstringop-overflow): Set defaults in LangEnabledBy.
2017-07-06 David Malcolm <dmalcolm@redhat.com>
* c-common.c (selftest::c_family_tests): New.
* c-common.h (selftest::run_c_tests): Move decl to c/c-lang.h.
(selftest::c_family_tests): New decl.
2017-07-04 Marek Polacek <polacek@redhat.com>
PR c/81231
* c-common.c (sync_resolve_size): Give error for pointers to incomplete
types.
2017-07-04 Marek Polacek <polacek@redhat.com>
* c-warn.c (warn_if_unused_value): Remove WITH_CLEANUP_EXPR handling.
2017-06-28 Martin Liska <mliska@suse.cz>
PR ipa/81128
* c-attribs.c (handle_alias_ifunc_attribute): Append ifunc alias
to a function declaration.
2017-06-28 Martin Liska <mliska@suse.cz>
PR driver/79659
* c.opt: Add IntegerRange to various options.
2017-06-26 Marek Polacek <polacek@redhat.com>
PR c/80116
* c-common.h (warn_for_multistatement_macros): Declare.
* c-warn.c: Include "c-family/c-indentation.h".
(warn_for_multistatement_macros): New function.
* c.opt (Wmultistatement-macros): New option.
* c-indentation.c (guard_tinfo_to_string): No longer static.
Change the parameter type to "enum rid". Handle RID_SWITCH.
* c-indentation.h (guard_tinfo_to_string): Declare.
2017-06-23 Marc Glisse <marc.glisse@inria.fr>
* c-common.c (c_common_nodes_and_builtins): Use builtin_structptr_types.
2017-06-15 Martin Sebor <msebor@redhat.com>
PR c++/80560
* c.opt (-Wclass-memaccess): New option.
2017-06-14 Boris Kolpackov <boris@codesynthesis.com>
* c-opts.c (c_common_finish): Handle '-' special value to -MF.
2017-06-13 Marek Polacek <polacek@redhat.com>
PR objc/80949
* c-warn.c (do_warn_duplicated_branches): Return if any of the
branches is null.
2017-06-13 Martin Liska <mliska@suse.cz>
PR sanitize/78204
* c-attribs.c (add_no_sanitize_value): New function.
(handle_no_sanitize_attribute): Likewise.
(handle_no_sanitize_address_attribute): Use the function.
(handle_no_sanitize_thread_attribute): New function.
(handle_no_address_safety_analysis_attribute): Use
add_no_sanitize_value.
(handle_no_sanitize_undefined_attribute): Likewise.
* c-common.h: Declare new functions.
* c-ubsan.c (ubsan_instrument_division): Use sanitize_flags_p.
(ubsan_instrument_shift): Likewise.
(ubsan_instrument_bounds): Likewise.
(ubsan_maybe_instrument_array_ref): Likewise.
(ubsan_maybe_instrument_reference_or_call): Likewise.
2017-06-11 Jason Merrill <jason@redhat.com>
* c-ada-spec.c, c-pragma.c: Use id_equal.
2017-06-04 Marek Polacek <polacek@redhat.com>
PR c/80919
* c-format.c (matching_type_p): Return false if any of the types
requires structural equality.
2017-06-02 Martin Sebor <msebor@redhat.com>
PR c/80892
* c-warn.c (conversion_warning): Use -Wconversion for integer
conversion and -Wfloat-conversion for floating one.
2017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
* c.opt (Wsizeof-pointer-div): New warning option.
2017-06-01 Volker Reichelt <v.reichelt@netcologne.de>
* c.opt (Wcatch-value): New shortcut for Wcatch-value=1.
(Wcatch-value=1): Enable by -Wall.
2017-05-30 David Malcolm <dmalcolm@redhat.com>
* c-format.c (gcc_cxxdiag_char_table): Add 'H' and 'I' to
format_chars.
* c.opt (fdiagnostics-show-template-tree): New option.
(felide-type): New option.
2017-05-25 Volker Reichelt <v.reichelt@netcologne.de>
* c.opt (Wcatch-value=): New C++ warning flag.
2017-05-24 Nathan Sidwell <nathan@acm.org>
* c=common.c (field_decl_cmp, resort_field_decl_cmp): Adjust T
const casts to avoid warning.
2017-05-24 Martin Sebor <msebor@redhat.com>
PR c/80731
* c-common.h (unsafe_conversion_p): Add a function argument.
* c-common.c (unsafe_conversion_p): Same.
Add type names and values to diagnostics.
(scalar_to_vector): Adjust.
* c-warn.c (constant_expression_error): Add a function argument.
Add type names and values to diagnostics.
(conversion_warning): Add a function argument.
Add type names and values to diagnostics.
(warnings_for_convert_and_check): Same.
2017-05-19 Jason Merrill <jason@redhat.com>
* c-warn.c (match_case_to_enum_1): Don't warn about enums with no
enumerators.
2017-05-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
* c-format.c (locus): Move out of function scope,
add GTY attribute.
2017-05-19 Nathan Sidwell <nathan@acm.org>
* c-opts.c (class_dump_file, class_dump_flags): Delete.
(c_common_parse_file): Remove class dump handling.
(get_dump_info): Likewise.
2017-05-19 Richard Biener <rguenther@suse.de>
PR c++/80593
* c-warn.c (strict_aliasing_warning): Do not warn for accesses
to alias-set zero memory.
2017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
* c-format.c (local_tree_type_node): Add GTY attribute.
2017-05-18 Marek Polacek <polacek@redhat.com>
* c-common.c (c_common_type_for_size): Use NULL_TREE instead of 0.
(c_common_fixed_point_type_for_size): Likewise.
(c_common_type_for_mode): Likewise.
(shorten_compare): Likewise.
(c_promoting_integer_type_p): Use false/true instead of 0/1.
* c-pragma.c (maybe_apply_renaming_pragma): Use NULL_TREE instead of 0.
2017-05-18 Marek Polacek <polacek@redhat.com>
* c-common.c (self_promoting_args_p): Change the return type to bool.
Use false/true instead of 0/1.
* c-common.h (self_promoting_args_p): Update.
2017-05-17 Marek Polacek <polacek@redhat.com>
* c-common.c: Use NULL_TREE instead of 0 where appropriate.
* c-warn.c: Likewise.
2017-05-17 Ville Voutilainen <ville.voutilainen@gmail.com>
Implement new C++ intrinsics __is_assignable and __is_constructible.
* c-common.c (__is_assignable, __is_constructible): New.
* c-common.h (RID_IS_ASSIGNABLE, RID_IS_CONSTRUCTIBLE): Likewise.
2017-05-17 Martin Liska <mliska@suse.cz>
* c-common.h: Introduce dump_flags_t type and
use it instead of int type.
* c-gimplify.c (c_genericize): Likewise.
* c-opts.c: Likewise.
2017-05-17 Marek Polacek <polacek@redhat.com>
* c-common.c (c_save_expr): Remove.
(c_common_truthvalue_conversion): Remove a call to c_save_expr.
* c-common.h (c_save_expr): Remove declaration.
2017-05-09 Volker Reichelt <v.reichelt@netcologne.de>
PR c/35441
* c-pretty-print.c (c_pretty_printer::expression): Handle MAX_EXPR,
MIN_EXPR, EXACT_DIV_EXPR, RDIV_EXPR, LROTATE_EXPR, RROTATE_EXPR.
(c_pretty_printer::postfix_expression): Handle MAX_EXPR, MIN_EXPR.
(c_pretty_printer::multiplicative_expression): Handle EXACT_DIV_EXPR,
RDIV_EXPR.
(pp_c_shift_expression): Handle LROTATE_EXPR, RROTATE_EXPR.
2017-05-09 Marek Polacek <polacek@redhat.com>
PR c/80525
* c-warn.c (unwrap_c_maybe_const): New.
(warn_logical_operator): Call it.
2017-05-09 Nathan Sidwell <nathan@acm.org>
* c-common.c (c_register_builtin_type): Use pushdecl lang_hook.
* c-common.h (pushdecl_top_level, pushdecl): Don't declare here.
2017-05-08 Martin Sebor <msebor@redhat.com>
PR translation/80280
* c-format.h (struct format_flag_spec): Add new member.
(T89_T): New macro.
* c-format.c (local_tree_type_node): New global.
(printf_flag_specs, asm_fprintf_flag_spec): Initialize new data.
(gcc_diag_flag_specs, scanf_flag_specs, strftime_flag_specs): Ditto.
(strfmon_flag_specs): Likewise.
(gcc_diag_char_table, gcc_cdiag_char_table): Split up specifiers
with distinct quoting properties.
(gcc_tdiag_char_table, gcc_cxxdiag_char_table): Same.
(flag_chars_t::validate): Add argument and handle bad quoting.
(check_format_info_main): Handle quoting problems.
(init_dynamic_diag_info): Simplify.
2017-05-08 Jason Merrill <jason@redhat.com>
* c-opts.c (c_common_post_options): Update defaults for
flag_abi_version and flag_abi_compat_version.
2017-05-05 David Malcolm <dmalcolm@redhat.com>
* c-common.c (c_cpp_error): Replace report_diagnostic
with diagnostic_report_diagnostic.
2017-05-04 Martin Sebor <msebor@redhat.com>
PR translation/80280
* c-attribs.c (handle_alias_ifunc_attribute): Quote a %D directive.
(handle_weakref_attribute): Same.
2017-05-03 Nathan Sidwell <nathan@acm.org>
Canonicalize canonical type hashing
* c-common.c (complete_array_type): Use type_hash_canon.
2017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
PR c++/80038
* c-common.h (cilk_gimplify_call_params_in_spawned_fn): Remove
prototype.
(cilk_install_body_pedigree_operations): Likewise.
* cilk.c (cilk_set_spawn_marker): Mark functions that should be
detatched.
(cilk_gimplify_call_params_in_spawned_fn): Remove.
(cilk_install_body_pedigree_operations): Likewise.
(gimplify_cilk_spawn): Add EXPR_STMT and CLEANUP_POINT_EXPR
unwrapping.
2017-04-27 Jakub Jelinek <jakub@redhat.com>
PR c++/80534
* c-common.c (complete_array_type): Only hash TYPE_TYPELESS_STORAGE
flag on non-aggregate element types.
2017-04-25 Bernd Edlinger <bernd.edlinger@hotmail.de>
* c-common.c (c_type_hasher, type_hash_table): Remove.
(c_common_get_alias_set): Remove unreachable code.
* c-opts.c (c_common_post_options): Make sure cc1 takes only one file.
2017-04-20 Volker Reichelt <v.reichelt@netcologne.de>
* c.opt (Wextra-semi): New C++ warning flag.
2017-04-20 Jakub Jelinek <jakub@redhat.com>
PR middle-end/80423
* c-common.c (complete_array_type): Preserve TYPE_TYPELESS_STORAGE.
2017-04-18 Jakub Jelinek <jakub@redhat.com>
PR middle-end/79788
PR middle-end/80375
* c-common.c (c_common_type_for_mode): Don't handle
widest_*_literal_type_node here.
c_common_signed_or_unsigned_type): Likewise.
(c_common_nodes_and_builtins): Set widest_*_literal_type_node
to *intTI_type_node or *intDI_type_node depending on whether
TImode is supported by the target or not.
2017-04-10 Martin Liska <mliska@suse.cz>
PR sanitizer/80350
* c-ubsan.c (ubsan_instrument_shift): Evaluate RHS before
doing an UBSAN check.
2017-04-03 Jonathan Wakely <jwakely@redhat.com>
* c-warn.c (do_warn_double_promotion): Fix typo in comment.
2017-03-31 Jakub Jelinek <jakub@redhat.com>
PR c++/79572
* c-ubsan.h (ubsan_maybe_instrument_reference): Change argument to
tree *.
* c-ubsan.c (ubsan_maybe_instrument_reference): Likewise. Handle
not just NOP_EXPR to REFERENCE_TYPE, but also INTEGER_CST with
REFERENCE_TYPE.
2017-03-31 David Malcolm <dmalcolm@redhat.com>
PR documentation/78732
* c.opt (Wendif-labels): Fix description to refer to
#else rather than #elif.
2017-03-31 Jakub Jelinek <jakub@redhat.com>
PR libstdc++/80251
* c-common.h (enum rid): Add RID_IS_AGGREGATE.
* c-common.c (c_common_reswords): Add __is_aggregate trait.
2017-03-27 Jakub Jelinek <jakub@redhat.com>
PR middle-end/80162
* c-common.c (c_common_mark_addressable_vec): Don't set
TREE_ADDRESSABLE on DECL_HARD_REGISTER.
2017-03-21 Martin Sebor <msebor@redhat.com>
PR c++/79548
* c-common.c (set_underlying_type): Mark type used only when
original del is declared unused.
2017-03-10 David Malcolm <dmalcolm@redhat.com>
PR translation/79848
* c-format.c (check_format_string): Simplify uses of "%<%s%>" to
"%qs".
2017-03-10 David Malcolm <dmalcolm@redhat.com>
PR c/79921
* c-indentation.c (warn_for_misleading_indentation): Remove parens
from inform's message, so that xgettext can locate it.
2017-03-09 Marek Polacek <polacek@redhat.com>
PR c++/79962
PR c++/79984
* c-attribs.c (handle_nonnull_attribute): Save the result of default
conversion to the attribute list.
2017-03-09 Martin Liska <mliska@suse.cz>
* c-ada-spec.c (macro_length): Increment value instead of a pointer.
2017-03-03 Jason Merrill <jason@redhat.com>
* c.opt (Wnoexcept-type): New.
2017-03-02 Richard Biener <rguenther@suse.de>
PR c/79756
* c-common.c (c_common_mark_addressable_vec): Look through
C_MAYBE_CONST_EXPR.
2017-02-28 Martin Liska <mliska@suse.cz>
* c.opt: Replace space with tabular for options of <number>
type.
2017-02-28 Martin Liska <mliska@suse.cz>
* c.opt: Fix --help=option -Q for options which are of
an enum type.
2017-02-24 Jakub Jelinek <jakub@redhat.com>
PR c++/79588
* c-common.c (check_function_restrict): New function.
(check_function_arguments): Add FNDECL argument. Call
check_function_restrict if -Wrestrict.
* c-warn.c (warn_for_restrict): Remove ARGS argument, add ARGARRAY
and NARGS. Use auto_vec for ARG_POSITIONS, simplify.
* c-common.h (check_function_arguments): Add FNDECL argument.
(warn_for_restrict): Remove ARGS argument, add ARGARRAY and NARGS.
2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
* c-ada-spec.c (dump_ada_function_declaration): Add comment about the
treatment of parameters with pointer-to-tagged type and tidy up.
(print_ada_methods): Remove the special treatment of C++ static member
functions.
2017-02-22 Martin Liska <mliska@suse.cz>
* c.opt: Replace inequality signs with square brackets
for -Wnornalized.
2017-02-21 Jakub Jelinek <jakub@redhat.com>
PR c++/79641
* c-attribs.c (handle_mode_attribute): Use build_qualified_type to
preserve quals.
2017-02-17 Joseph Myers <joseph@codesourcery.com>
* c-cppbuiltin.c (builtin_define_float_constants): Define
__DECIMAL_DIG__ to the value for long double.
2017-02-15 Marek Polacek <polacek@redhat.com>
PR c/79515
* c-warn.c (do_warn_double_promotion): Don't warn if an invalid
conversion has occured.
2017-01-24 David Malcolm <dmalcolm@redhat.com>
* c-common.c (c_common_reswords): Add "__RTL".
* c-common.h (enum rid): Add RID_RTL.
2017-01-20 Marek Polacek <polacek@redhat.com>
PR c/64279
* c-common.h (do_warn_duplicated_branches_r): Declare.
* c-gimplify.c (c_genericize): Walk the function tree calling
do_warn_duplicated_branches_r.
* c-warn.c (expr_from_macro_expansion_r): New.
(do_warn_duplicated_branches): New.
(do_warn_duplicated_branches_r): New.
* c.opt (Wduplicated-branches): New option.
2017-01-17 David Malcolm <dmalcolm@redhat.com>
PR c++/71497
* c-indentation.c (warn_for_misleading_indentation): Use the past
subjunctive in the note.
2017-01-17 Aldy Hernandez <aldyh@redhat.com>
PR c/79116
* array-notation-common.c (cilkplus_extract_an_triplets): Convert
start type to integer_type.
2017-01-16 Jakub Jelinek <jakub@redhat.com>
PR driver/49726
* c.opt (gen-decls): Add Driver flag.
2017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
Revert:
2017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/71737
* c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
2017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/71737
* c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
2017-01-12 Martin Sebor <msebor@redhat.com>
(-Wformat-overflow): ...to this.
2017-01-11 Martin Sebor <msebor@redhat.com>
PR c/78768
* c.opt (-Walloca-larger-than, -Wformat-length, -Wformat-truncation):
Also enable for LTO.
2017-01-10 Jason Merrill <jason@redhat.com>
Implement P0195R2, C++17 variadic using.
* c-cppbuiltin.c (c_cpp_builtins): Define __cpp_variadic_using.
2017-01-09 Jakub Jelinek <jakub@redhat.com>
PR translation/79019
PR translation/79020
* c.opt (Wnormalized=): Fix typo in description.
2017-01-08 Martin Sebor <msebor@redhat.com>
PR middle-end/77708
* c.opt (-Wformat-truncation): New option.
2017-01-06 Alexandre Oliva <aoliva@redhat.com>
* c-pretty-print.c (pp_c_tree_decl_identifier): Convert 16-bit
value to unsigned short to fit in 4 hex digits without
warnings.
2017-01-05 Eric Botcazou <ebotcazou@adacore.com>
* c.opt (fsso-struct): Add 'native' value.
2017-01-05 Martin Liska <mliska@suse.cz>
PR pch/78970
* c-opts.c (c_common_post_options): Reject '-' filename for a precompiled
header.
2017-01-04 Marek Polacek <polacek@redhat.com>
PR c++/64767
* c.opt (Wpointer-compare): New option.
2017-01-04 Jakub Jelinek <jakub@redhat.com>
PR driver/78957
* c.opt (fsso-struct=): Add RejectNegative.
2017-01-01 Jakub Jelinek <jakub@redhat.com>
Update copyright years.
2016-12-29 Martin Liska <mliska@suse.cz>
PR c/78933
* c.opt (strong-eval-order): Add RejectNegative keyword.
2016-12-22 Jason Merrill <jason@redhat.com>
Implement P0522R0, matching of template template arguments.
* c-cppbuiltin.c (c_cpp_builtins): Define
__cpp_template_template_args.
2016-12-21 Jakub Jelinek <jakub@redhat.com>
PR bootstrap/78817
* c-common.c (struct nonnull_arg_ctx): New type.
(check_function_nonnull): Return bool instead of void. Use
nonnull_arg_ctx as context rather than just location_t.
(check_nonnull_arg): Adjust for the new context type, set
warned_p to true if a warning has been diagnosed.
(check_function_arguments): Return bool instead of void.
* c-common.h (check_function_arguments): Adjust prototype.
2016-12-21 Jason Merrill <jason@redhat.com>
* c.opt (-fnew-ttp-matching): New flag.
* c-opts.c (c_common_post_options): Default on if -std=c++1z.
2016-12-14 Martin Jambor <mjambor@suse.cz>
* c-omp.c: Include omp-general.h instead of omp-low.h.
(c_finish_oacc_wait): Adjusted call to find_omp_clause to use its new
name.
2016-12-14 Martin Sebor <msebor@redhat.com>
PR c/17308
* c-common.c (check_nonnull_arg): Disable when optimization
is enabled.
2016-12-12 Marek Polacek <polacek@redhat.com>
PR c++/78647
* c-common.c (attribute_fallthrough_p): Return false for
error_mark_node.
2016-12-08 Martin Sebor <msebor@redhat.com>
PR c/78284
* c.opt (-Walloc-zero, -Walloc-size-larger-than): New options.
2016-12-08 Martin Sebor <msebor@redhat.com>
PR c/78165
* c-pretty-print (pp_c_integer_constant): Avoid formatting type
suffix.
2016-12-07 Martin Sebor <msebor@redhat.com>
PR c/53562
PR middle-end/77784
PR middle-end/78149
PR middle-end/78138
* c.opt (-Wstringop-overflow): New option.
2016-12-02 Maxim Ostapenko <m.ostapenko@samsung.com>
* c-attribs.c (asan odr indicator): New attribute.
(handle_asan_odr_indicator_attribute): New function.
2016-11-26 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
* c-common.c (c_common_nodes_and_builtins): Remove initialization of
ptrdiff_type_node;
2016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
* c-common.c (excess_precision_mode_join): New.
(c_ts18661_flt_eval_method): New.
(c_c11_flt_eval_method): Likewise.
(c_flt_eval_method): Likewise.
* c-common.h (excess_precision_mode_join): New.
(c_flt_eval_method): Likewise.
* c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): New.
(cpp_iec_559_value): Call it.
(c_cpp_builtins): Modify logic for __LIBGCC_*_EXCESS_PRECISION__,
call c_flt_eval_method to set __FLT_EVAL_METHOD__ and
__FLT_EVAL_METHOD_TS_18661_3__.
2016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
* c-opts.c (c_common_post_options): Add logic to handle the default
case for -fpermitted-flt-eval-methods.
2016-11-23 Paolo Bonzini <bonzini@gnu.org>
* c.opt (Wexpansion-to-defined): New.
2016-11-23 Jakub Jelinek <jakub@redhat.com>
PR target/78451
* c-pragma.c (handle_pragma_target): Don't replace
current_target_pragma, but chainon the new args to the current one.
2016-11-22 Nathan Sidwell <nathan@acm.org>
* array-notation-common.c (cilkplus_extract_an_trplets): Fix
indentation and formatting.
2016-11-21 Martin Sebor <msebor@redhat.com>
* c.opt (-fprintf-return-value): Enable by default.
2016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
PR c++/71973
* c.opt (-Wbuiltin-declaration-mismatch): New warning.
* c-common.c (c_common_nodes_and_builtins): Initialize
const_tm_ptr_type_node.
2016-11-16 Marek Polacek <polacek@redhat.com>
PR c/78285
* c-common.c (c_add_case_label): Turn error_at calls into inform.
2016-11-14 Jakub Jelinek <jakub@redhat.com>
* c-cppbuiltin.c (c_cpp_builtins): Define __cpp_structured_bindings.
2016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
Richard Biener <rguenther@suse.de>
* c-common.h (c_common_resword): Add RID_GIMPLE, RID_PHI types.
* c-common.h (enum rid): Add RID_GIMPLE, RID_PHI.
* c.opt (fgimple): New option.
2016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
PR c/35503
* c-common.h (warn_for_restrict): Declare.
* c-warn.c: Include gcc-rich-location.h.
(warn_for_restrict): New function.
* c-format.c (gcc_tdiag_char_table): Add entry for "Z" specifier.
(gcc_cdiag_char_table): Likewise.
(gcc_cxxdiag_char_table): Likewise.
* c.opt (Wrestrict): New option.
2016-11-13 Eric Botcazou <ebotcazou@adacore.com>
* c-ada-spec.c (print_ada_declaration): For typedef declarations, look
for nested types only if the type is a record or union and dump SLOC.
2016-11-09 Jason Merrill <jason@redhat.com>
* c-cppbuiltin.c (c_cpp_builtins): Define __cpp_template_auto.
2016-11-09 Jakub Jelinek <jakub@redhat.com>
* c-ubsan.c (ubsan_instrument_shift): Handle split
-fsanitize=shift-base and -fsanitize=shift-exponent.
2016-11-07 Jason Merrill <jason@redhat.com>
* c.opt (Wc++1z-compat): New.
* c-cppbuiltin.c (c_cpp_builtins): Add __cpp_noexcept_function_type.
2016-11-07 Martin Liska <mliska@suse.cz>
* c-warn.c (warn_for_unused_label): Save all labels used
in goto or in &label.
2016-11-03 Jason Merrill <jason@redhat.com>
* c-cppbuiltin.c (c_cpp_builtins): Correct
__cpp_inheriting_constructors.
2016-11-01 Jason Merrill <jason@redhat.com>
* c-cppbuiltin.c (c_cpp_builtins): Update
__cpp_inheriting_constructors.
* c.opt (-fnew-inheriting-ctors): New.
* c-opts.c: Default to on for ABI 11+.
2016-10-31 Jakub Jelinek <jakub@redhat.com>
PR c++/77948
* c.opt (fext-numeric-literals): Add Var and Init.
* c-opts.c (c_common_handle_option): Don't clear
cpp_opts->ext_numeric_literals for -std=c++{11,14,1z}.
(c_common_post_options): Clear it here if not set
explicitly.
2016-10-28 Aldy Hernandez <aldyh@redhat.com>
PR debug/77773
* c-pretty-print.c (simple_type_specifier): Do not dereference `t'
if NULL.
2016-10-25 Jakub Jelinek <jakub@redhat.com>
* c-common.h (enum rid): Add RID_BUILTIN_LAUNDER.
* c-common.c (c_common_reswords): Add __builtin_launder.
2016-10-24 Bernd Edlinger <bernd.edlinger@hotmail.de>
* c-common.c (c_common_truthvalue_conversion): Warn for
multiplications in boolean context. Fix the quoting of '<<' and '<'
in the shift warning.
2016-10-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
* c-common.c (c_common_truthvalue_conversion): Fix the comment.
2016-10-20 Jason Merrill <jason@redhat.com>
* c-cppbuiltin.c (c_cpp_builtins): Update __cpp_concepts value.
2016-10-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
* c-common.c (c_common_truthvalue_conversion): Warn only for signed
integer shift ops in boolean context.
2016-10-18 Aldy Hernandez <aldyh@redhat.com>
* c.opt (Walloca): New.
(Walloca-larger-than=): New.
(Wvla-larger-than=): New.
2016-10-17 Marek Polacek <polacek@redhat.com>
* c-warn.c (find_array_ref_with_const_idx_r): Remove parameter names.
Return immediately when finding a match.
(warn_tautological_cmp): Remove a boolean variable that is no longer
needed.
2016-10-17 Marek Polacek <polacek@redhat.com>
* c-attribs.c: New file.
* c-common.c: Move attributes handling to c-attribs.c.
(get_nonnull_operand): No longer static.
* c-common.h: Move the declarations from c-attribs.c to its own section.
2016-10-14 Jason Merrill <jason@redhat.com>
* c-cppbuiltin.c (c_cpp_builtins): Define __cpp_aggregate_bases
and __cpp_deduction_guides.
2016-10-13 Jason Merrill <jason@redhat.com>
* c-cppbuiltin.c (c_cpp_builtins): Add __cpp_inline_variables.
2016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
* c-cppbuiltin.c: Include memmodel.h.
* c-opts.c: Likewise.
* c-pragma.c: Likewise.
* c-warn.c: Likewise.
2016-10-12 Jakub Jelinek <jakub@redhat.com>
* c.opt (Wextra): Add as C/C++/ObjC/ObjC++ option.
(Wimplicit-fallthrough=): Enable for these languages by -Wextra.
* c-opts.c (sanitize_cpp_opts): Initialize
cpp_opts->cpp_warn_implicit_fallthrough.
2016-10-11 Marek Polacek <polacek@redhat.com>
* c-common.c (warning_candidate_p): Change the return type to bool
and return true/false instead of 1/0.
(vector_mode_valid_p): Likewise.
2016-10-11 Marek Polacek <polacek@redhat.com>
* c-common.c (fold_for_warn): No longer static.
(bool_promoted_to_int_p): Likewise.
(c_common_get_narrower): Likewise.
(constant_expression_warning): Move to c-warn.c.
(constant_expression_error): Likewise.
(overflow_warning): Likewise.
(warn_logical_operator): Likewise.
(find_array_ref_with_const_idx_r): Likewise.
(warn_tautological_cmp): Likewise.
(expr_has_boolean_operands_p): Likewise.
(warn_logical_not_parentheses): Likewise.
(warn_if_unused_value): Likewise.
(strict_aliasing_warning): Likewise.
(sizeof_pointer_memaccess_warning): Likewise.
(check_main_parameter_types): Likewise.
(conversion_warning): Likewise.
(warnings_for_convert_and_check): Likewise.
(match_case_to_enum_1): Likewise.
(match_case_to_enum): Likewise.
(c_do_switch_warnings): Likewise.
(warn_for_omitted_condop): Likewise.
(readonly_error): Likewise.
(lvalue_error): Likewise.
(invalid_indirection_error): Likewise.
(warn_array_subscript_with_type_char): Likewise.
(warn_about_parentheses): Likewise.
(warn_for_unused_label): Likewise.
(warn_for_div_by_zero): Likewise.
(warn_for_memset): Likewise.
(warn_for_sign_compare): Likewise.
(do_warn_double_promotion): Likewise.
(do_warn_unused_parameter): Likewise.
(record_locally_defined_typedef): Likewise.
(maybe_record_typedef_use): Likewise.
(maybe_warn_unused_local_typedefs): Likewise.
(maybe_warn_bool_compare): Likewise.
(maybe_warn_shift_overflow): Likewise.
(warn_duplicated_cond_add_or_warn): Likewise.
(diagnose_mismatched_attributes): Likewise.
* c-common.h: Move the declarations from c-warn.c to its own section.
* c-warn.c: New file.
2016-10-08 Jason Merrill <jason@redhat.com>
* c-common.c (c_common_truthvalue_conversion): Don't distribute
into COND_EXPR in C++.
2016-10-08 Jakub Jelinek <jakub@redhat.com>
* c-lex.c (c_lex_with_flags) <case CPP_COMMENT>: For CPP_COMMENT
token with PREV_FALLTHROUGH, skip all following CPP_PADDING and
CPP_COMMENT tokens and set add_flags to PREV_FALLTHROUGH afterwards.
2016-10-07 Jakub Jelinek <jakub@redhat.com>
Implement LWG2296 helper intrinsic
* c-common.h (enum rid): Add RID_ADDRESSOF.
* c-common.c (c_common_reswords): Add __builtin_addressof.
2016-10-07 Bernd Edlinger <bernd.edlinger@hotmail.de>
PR c++/77700
* c-common.c (c_common_truthvalue_conversion): Warn also for
suspicious enum values in boolean context.
2016-10-06 Jakub Jelinek <jakub@redhat.com>
Implement P0258R2 - helper for C++17
std::has_unique_object_representations trait
* c-common.h (enum rid): Add RID_HAS_UNIQUE_OBJ_REPRESENTATIONS.
* c-common.c (c_common_reswords): Add
__has_unique_object_representations.
2016-10-05 Jakub Jelinek <jakub@redhat.com>
PR sanitizer/66343
* c-ubsan.c (ubsan_instrument_return): Don't call
initialize_sanitizer_builtins here.
2016-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
* c-common.c (c_common_truthvalue_conversion): Warn also for suspicious
conditional expression in boolean context when only one arm is
non-boolean.
2016-10-05 Jakub Jelinek <jakub@redhat.com>
PR sanitizer/77823
* c-ubsan.c (ubsan_instrument_shift): Return NULL_TREE if type0
is not integral.
* c-common.c (c_common_reswords): Update comment for C++11.
2016-10-04 Jason Merrill <jason@redhat.com>
* c-common.c (make_tree_vector_from_ctor): New.
* c-common.h: Declare it.
2016-10-04 Jakub Jelinek <jakub@redhat.com>
* c-cppbuiltin.c (c_cpp_builtins): Don't define
__LIBGCC_JCR_SECTION_NAME__.
2016-10-03 Bernd Edlinger <bernd.edlinger@hotmail.de>
* c-common.c (c_common_truthvalue_conversion): Warn for suspicious
left shift in boolean context.
2016-09-29 Jakub Jelinek <jakub@redhat.com>
Implement P0001R1 - C++17 removal of register storage class specifier
* c.opt (Wregister): New warning.
* c-opts.c (c_common_post_options): Enable -Wregister by
default for C++17.
2016-09-29 James Greenhalgh <james.greenhalgh@arm.com>
* c-opts.c (c_common_post_options): Remove special case for
TARGET_FLT_EVAL_METHOD_NON_DEFAULT with -fexcess-precision=standard
in C++.
2016-09-27 Jakub Jelinek <jakub@redhat.com>
* c-cppbuiltin.c (c_cpp_builtins): Define __cpp_capture_star_this for
-std=c++1z.
* c-ada-spec.c (print_ada_declaration): Remove break after return.
2016-09-26 Thomas Preud'homme <thomas.preudhomme@arm.com>
* c-common.c: Include memmodel.h.
2016-09-26 Marek Polacek <polacek@redhat.com>
* c-lex.c (c_common_has_attribute): Handle attribute fallthrough.
2016-09-26 Marek Polacek <polacek@redhat.com>
PR c/7652
* c-common.c (c_common_attribute_table): Add fallthrough attribute.
(handle_fallthrough_attribute): New function.
(attribute_fallthrough_p): New function.
* c-common.h (attribute_fallthrough_p): Declare.
2016-09-24 Marek Polacek <polacek@redhat.com>
PR c/77490
* c.opt (Wbool-operation): New.
2016-09-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
* c-common.c (c_common_truthvalue_conversion): Inhibit
Wint-in-bool-context warning with from_macro_definition_at.
Mention the expression will always evaluate to true.
2016-09-21 Martin Sebor <msebor@redhat.com>
PR bootstrap/77676
* c.opt (fprintf-return-value): Temporarily initialize to zero
to unblock bootstrap failures.
2016-09-21 Jakub Jelinek <jakub@redhat.com>
PR c++/77651
* c.opt (Waligned-new=): Add RejectNegative.
(faligned-new=): Likewise. Spelling fix - change
aligned_new_threshhold to aligned_new_threshold.
* c-cppbuiltin.c (c_cpp_builtins): Change aligned_new_threshhold
to aligned_new_threshold.
2016-09-20 Martin Sebor <msebor@redhat.com>
PR middle-end/49905
* c.opt: Add -Wformat-length and -fprintf-return-value.
2016-09-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
PR c++/77434
* c.opt (Wint-in-bool-context): New warning.
* c-common.c (c_common_truthvalue_conversion): Warn on integer
constants in boolean context.
2016-09-19 Joseph Myers <joseph@codesourcery.com>
* c-common.c (max_align_t_align): Also consider alignment of
float128_type_node.
2016-09-15 Jason Merrill <jason@redhat.com>
* c-common.c (check_cxx_fundamental_alignment_constraints): Check
DECL_EXTERNAL.
2016-09-14 Jason Merrill <jason@redhat.com>
* c-common.c (check_cxx_fundamental_alignment_constraints): Don't
limit FIELD_DECL, either.
2016-09-14 Marek Polacek <polacek@redhat.com>
* c-common.c (c_common_truthvalue_conversion): Use false instead of 0.
* c-common.h (build_unary_op): Change nonconvert parameter type to bool.
* c-omp.c (c_finish_omp_atomic): Use false instead of 0.
2016-09-13 David Malcolm <dmalcolm@redhat.com>
* c-common.c (warn_logical_not_parentheses): Replace
rich_location::add_fixit_insert calls with add_fixit_insert_before
and add_fixit_insert_after, eliminating the "next_loc" calculation.
2016-09-13 Jason Merrill <jason@redhat.com>
Tom de Vries <tom@codesourcery.com>
PR c++/77427
* c-common.c (set_underlying_type): Don't treat array as builtin type.
2016-09-13 Jason Merrill <jason@redhat.com>
* c-common.c (check_cxx_fundamental_alignment_constraints): Don't
limit types at all.
2016-09-12 Jason Merrill <jason@redhat.com>
* c-common.c (check_cxx_fundamental_alignment_constraints): Fix
bit/byte confusion, allow large alignment for types.
2016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
PR c++/77496
* c-common.c (warn_for_omitted_condop): Also warn for boolean data.
2016-09-12 David Malcolm <dmalcolm@redhat.com>
PR c/72858
* c-format.c (argument_parser::check_argument_type): Add params
"type_start" and "conversion_char". Use the former to generate
offset_to_type_start and pass it and conversion_char to
check_format_types.
(check_format_info_main): Capture the start of the type
information as "type_start", and pass it an format_char
to arg_parser.check_argument_type.
(check_format_types): Provide an example in the leading comment.
Add params "offset_to_type_start" and "conversion_char"; pass
them to format_type_warning calls.
(test_get_modifier_for_format_len): Likewise.
(matching_type_p): New function.
(get_format_for_type): Add param "conversion_char" and move
implementation into...
(get_format_for_type_1): ...new function, called twice.
Use new function matching_type_p rather than checking for
TYPE_CANONICAL equality.
(get_corrected_substring): New function.
(format_type_warning): Provide an example in the leading comment.
Add params "offset_to_type_start" and "conversion_char". Replace
call to get_format_for_type with call to get_corrected_substring
and move rejection of hints for widths/precisions there.
(assert_format_for_type_streq): Add param "conversion_char".
(ASSERT_FORMAT_FOR_TYPE_STREQ): Add param CONVERSION_CHAR.
(test_get_format_for_type_printf): Add conversion chars to the
tests, adding coverage for various combinations of integer
vs double conversions, and for preserving octal and hexadecimal
conversions.
(test_get_format_for_type_scanf): Add conversion chars to the
tests.
2016-09-10 Tom de Vries <tom@codesourcery.com>
PR C/71602
* c-common.c (build_va_arg): Handle more strict
targetm.canonical_va_list_type. Replace first argument type error with
assert.
2016-09-09 Martin Sebor <msebor@redhat.com>
PR c/77520
PR c/77521
* c-format.c (argument_parser::find_format_char_info): Use %qc
format directive unconditionally.
2016-09-09 Jason Merrill <jason@redhat.com>
Implement C++17 new of over-aligned types.
* c.opt: Add -faligned-new and -Waligned-new.
* c-common.c (max_align_t_align): Split out from...
(cxx_fundamental_alignment_p): ...here.
* c-common.h: Declare it.
* c-cppbuiltin.c (c_cpp_builtins): Handle aligned new.
2016-09-09 Joseph Myers <joseph@codesourcery.com>
* c-cppbuiltin.c (builtin_define_type_width): New function.
(builtin_define_stdint_macros, c_cpp_builtins): Define type width
macros.
2016-09-07 David Malcolm <dmalcolm@redhat.com>
* c-common.c (get_cpp_ttype_from_string_type): Handle being passed
a POINTER_TYPE.
(substring_loc::get_location): Move to substring-locations.c,
keeping implementation as...
(c_get_substring_location): New function, from the above, reworked
to use accessors rather than member lookup.
* c-common.h (class substring_loc): Move to substring-locations.h,
replacing with a forward decl.
(c_get_substring_location): New decl.
* c-format.c: Include "substring-locations.h".
(format_warning_va): Move to substring-locations.c.
(format_warning_at_substring): Likewise.
2016-09-06 Martin Sebor <msebor@redhat.com>
PR c/77336
* c-format.c (check_function_format): Avoid issuing warnings for
functions unless they call format functions with non-constant
format strings.
2016-09-06 Richard Biener <rguenther@suse.de>
PR c/77450
* c-common.c (c_common_mark_addressable_vec): Handle
COMPOUND_LITERAL_EXPR.
2016-09-05 Marek Polacek <polacek@redhat.com>
PR c/77423
* c-common.c (bool_promoted_to_int_p): New function.
(expr_has_boolean_operands_p): New function.
(warn_logical_not_parentheses): Return if expr_has_boolean_operands_p.
(maybe_warn_bool_compare): Use bool_promoted_to_int_p.
2016-09-04 Tom de Vries <tom@codesourcery.com>
revert:
2016-08-29 Tom de Vries <tom@codesourcery.com>
* c-common.c (build_va_arg): Replace first argument type error
with assert.
2016-09-02 Jakub Jelinek <jakub@redhat.com>
PR c/65467
* c-omp.c (c_finish_omp_atomic): Reject _Atomic qualified expressions.
(c_finish_omp_for): Reject _Atomic qualified iterators.
2016-09-01 Martin Sebor <msebor@redhat.com>
* c-ada-spec.c (dump_ada_function_declaration): Increase buffer
size to guarantee it fits the output of the formatted function
regardless of its arguments.
2016-09-01 Marek Polacek <polacek@redhat.com>
PR c/7652
* c-common.c (resolve_overloaded_builtin): Fix formatting. Add
FALLTHRU comments.
2016-08-29 Marek Polacek <polacek@redhat.com>
PR c/77292
* c-common.c (warn_logical_not_parentheses): Don't warn for
a comparison or a logical operator.
2016-08-29 Tom de Vries <tom@codesourcery.com>
* c-common.c (build_va_arg): Fix type comparison assert.
2016-08-29 Tom de Vries <tom@codesourcery.com>
* c-common.c (build_va_arg): Replace first argument type error
with assert.
2016-08-29 Tom de Vries <tom@codesourcery.com>
PR c/77398
* c-common.c (build_va_arg): Add first argument error. Build va_arg
with error_mark_node as va_list instead of with illegal va_list.
2016-08-25 Marek Polacek <polacek@redhat.com>
David Malcolm <dmalcolm@redhat.com>
* c-common.c (warn_logical_not_parentheses): Print fixit hints.
* c-common.h (warn_logical_not_parentheses): Update declaration.
2016-08-22 Marek Polacek <polacek@redhat.com>
PR c++/77321
* c-common.c (warn_for_memset): Check type for null.
2016-08-22 Joseph Myers <joseph@codesourcery.com>
* c-cppbuiltin.c (c_cpp_builtins): Check _FloatN and
_FloatNx types for suffixes for built-in functions.
2016-08-19 Joseph Myers <joseph@codesourcery.com>
PR c/32187
* c-common.h (RID_FLOAT16, RID_FLOATN_NX_FIRST, RID_FLOAT32)
(RID_FLOAT64, RID_FLOAT128, RID_FLOAT32X, RID_FLOAT64X)
(RID_FLOAT128X): New enum rid values.
(CASE_RID_FLOATN_NX): New macro.
* c-common.c (c_common_reswords): Add _FloatN and _FloatNx
keywords.
(c_common_type_for_mode): Check for _FloatN and _FloatNx and
corresponding complex types.
(c_common_nodes_and_builtins): For non-C++, register _FloatN and
_FloatNx and corresponding complex types.
(keyword_begins_type_specifier): Use CASE_RID_FLOATN_NX.
* c-cppbuiltin.c (builtin_define_float_constants): Check _FloatN
and _FloatNx types for the widest type for determining
DECIMAL_DIG. Define __LDBL_DECIMAL_DIG__ as well as
__DECIMAL_DIG__ for long double. Handle FMA_SUFFIX being NULL.
(c_cpp_builtins): Call builtin_define_float_constants for _FloatN
and _FloatNx types.
* c-lex.c (interpret_float): Handle _FloatN and _FloatNx
constants.
* c-pretty-print.c (pp_c_floating_constant): Handle _FloatN and
_FloatNx types.
2016-08-18 David Malcolm <dmalcolm@redhat.com>
* c-opts.c (c_diagnostic_finalizer): Update for change to
diagnostic_show_locus.
2016-08-18 David Malcolm <dmalcolm@redhat.com>
* c-common.c: Include "spellcheck.h".
(cb_get_suggestion): New function.
* c-common.h (cb_get_suggestion): New decl.
* c-lex.c (init_c_lex): Initialize cb->get_suggestion to
cb_get_suggestion.
2016-08-18 Marek Polacek <polacek@redhat.com>
PR c/71514
* c-common.c (get_atomic_generic_size): Disallow pointer-to-function
and pointer-to-VLA.
2016-08-16 David Malcolm <dmalcolm@redhat.com>
PR c/72857
* c-common.c (substring_loc::get_range): Rename to...
(substring_loc::get_location): ...this, converting param from a
source_range * to a location_t *. Call
get_source_location_for_substring rather than
get_source_range_for_substring, and pass in m_caret_idx.
* c-common.h (substring_loc::substring_loc): Add param "caret_idx".
(substring_loc::get_range): Replace with...
(substring_loc::get_location): ...this.
(substring_loc::set_caret_index): New method.
(substring_loc): Add field m_caret_idx.
* c-format.c (format_warning_va): Update for above changes.
Rename local "substring_loc" to "fmt_substring_loc" to avoid
clashing with type name.
(format_warning_at_char): Add caret_idx param to substring_loc ctor.
(check_argument_type): Likewise.
(format_type_warning): Rename param "fmt_loc" to "whole_fmt_loc"
Use a copy when emitting warnings, setting the caret index from TYPE.
2016-08-16 Eric Botcazou <ebotcazou@adacore.com>
Arnaud Charlet <charlet@adacore.com>
* c-ada-spec.c (dump_number): New function.
(handle_escape_character): Likewise.
(print_ada_macros): Add handling of constant integers and strings.
2016-08-12 Marek Polacek <polacek@redhat.com>
PR c/7652
* c-common.c (scalar_to_vector): Adjust fall through comment.
* c-opts.c (c_common_handle_option): Likewise.
* c-pragma.c (handle_pragma_pack): Add FALLTHRU.
* c-pretty-print.c (c_pretty_printer::postfix_expression): Adjust
fall through comment.
* cilk.c (extract_free_variables): Add FALLTHRU.
2016-08-10 Jason Merrill <jason@redhat.com>
* c-cppbuiltin.c (c_cpp_builtins): Define __cpp_if_constexpr.
2016-08-09 Jason Merrill <jason@redhat.com>
* c-common.c (c_common_attribute_table): vector_size affects type
identity.
2016-08-09 Marek Polacek <polacek@redhat.com>
PR c/7652
* c-ada-spec.c (dump_generic_ada_node): Add return.
2016-08-09 Jason Merrill <jason@redhat.com>
* c-cppbuiltin.c (c_cpp_builtins): Update __cpp_constexpr for
C++17 constexpr lambdas.
2016-08-08 David Malcolm <dmalcolm@redhat.com>
PR c/64955
* c-common.h (selftest::c_format_c_tests): New declaration.
(selftest::run_c_tests): New declaration.
* c-format.c: Include "selftest.h.
(format_warning_va): Add param "corrected_substring" and use
it to add a replacement fix-it hint.
(format_warning_at_substring): Likewise.
(format_warning_at_char): Update for new param of
format_warning_va.
(argument_parser::check_argument_type): Pass "fki" to
check_format_types.
(check_format_types): Add param "fki" and pass it to
format_type_warning.
(deref_n_times): New function.
(get_modifier_for_format_len): New function.
(selftest::test_get_modifier_for_format_len): New function.
(get_format_for_type): New function.
(format_type_warning): Add param "fki" and use it to attempt
to provide hints for argument types when calling
format_warning_at_substring.
(selftest::get_info): New function.
(selftest::assert_format_for_type_streq): New function.
(ASSERT_FORMAT_FOR_TYPE_STREQ): New macro.
(selftest::test_get_format_for_type_printf): New function.
(selftest::test_get_format_for_type_scanf): New function.
(selftest::c_format_c_tests): New function.
2016-08-08 David Malcolm <dmalcolm@redhat.com>
PR c/52952
* c-format.c: Include "diagnostic.h".
(location_column_from_byte_offset): Delete.
(location_from_offset): Delete.
(format_warning_va): New function.
(format_warning_at_substring): New function.
(format_warning_at_char): New function.
(check_format_arg): Capture location of format_tree and pass to
check_format_info_main.
(argument_parser): Add fields "start_of_this_format" and
"format_string_cst".
(flag_chars_t::validate): Add param "format_string_cst". Convert
warning_at call using location_from_offset to call to
format_warning_at_char.
(argument_parser::argument_parser): Add param "format_string_cst_"
and use use it to initialize field "format_string_cst".
Initialize new field "start_of_this_format".
(argument_parser::read_format_flags): Convert warning_at call
using location_from_offset to a call to format_warning_at_char.
(argument_parser::read_any_format_left_precision): Likewise.
(argument_parser::read_any_format_precision): Likewise.
(argument_parser::read_any_other_modifier): Likewise.
(argument_parser::find_format_char_info): Likewise, in three places.
(argument_parser::parse_any_scan_set): Likewise, in one place.
(argument_parser::handle_conversions): Likewise, in two places.
(argument_parser::check_argument_type): Add param "fmt_param_loc"
and use it to make a substring_loc. Pass the latter to
check_format_types.
(check_format_info_main): Add params "fmt_param_loc" and
"format_string_cst". Convert warning_at calls using
location_from_offset to calls to format_warning_at_char. Pass the
new params to the arg_parser ctor. Pass "format_string_cst" to
flag_chars.validate. Pass "fmt_param_loc" to
arg_parser.check_argument_type.
(check_format_types): Convert first param from a location_t
to a const substring_loc & and rename to "fmt_loc". Attempt
to extract the range of the relevant parameter and pass it
to format_type_warning.
(format_type_warning): Convert first param from a location_t
to a const substring_loc & and rename to "fmt_loc". Add
params "param_range" and "type". Replace calls to warning_at
with calls to format_warning_at_substring.
2016-08-08 David Malcolm <dmalcolm@redhat.com>
* c-format.c (class flag_chars_t): New class.
(struct length_modifier): New struct.
(class argument_parser): New class.
(flag_chars_t::flag_chars_t): New ctor.
(flag_chars_t::has_char_p): New method.
(flag_chars_t::add_char): New method.
(flag_chars_t::validate): New method.
(flag_chars_t::get_alloc_flag): New method.
(flag_chars_t::assignment_suppression_p): New method.
(argument_parser::argument_parser): New ctor.
(argument_parser::read_any_dollar): New method.
(argument_parser::read_format_flags): New method.
(argument_parser::read_any_format_width): New method.
(argument_parser::read_any_format_left_precision): New method.
(argument_parser::read_any_format_precision): New method.
(argument_parser::handle_alloc_chars): New method.
(argument_parser::read_any_length_modifier): New method.
(argument_parser::read_any_other_modifier): New method.
(argument_parser::find_format_char_info): New method.
(argument_parser::validate_flag_pairs): New method.
(argument_parser::give_y2k_warnings): New method.
(argument_parser::parse_any_scan_set): New method.
(argument_parser::handle_conversions): New method.
(argument_parser::check_argument_type): New method.
(check_format_info_main): Introduce classes argument_parser
and flag_chars_t, moving the code within the loop into methods
of these classes. Make various locals "const".
2016-08-05 David Malcolm <dmalcolm@redhat.com>
* c-common.c: Include "substring-locations.h".
(get_cpp_ttype_from_string_type): New function.
(g_string_concat_db): New global.
(substring_loc::get_range): New method.
* c-common.h (g_string_concat_db): New declaration.
(class substring_loc): New class.
* c-lex.c (lex_string): When concatenating strings, capture the
locations of all tokens using a new obstack, and record the
concatenation locations within g_string_concat_db.
* c-opts.c (c_common_init_options): Construct g_string_concat_db
on the ggc-heap.
2016-07-29 Marek Polacek <polacek@redhat.com>
PR c/71926
* c-common.c (c_common_truthvalue_conversion): Use LOCATION for the
parentheses warning.
PR c/71574
* c-common.c (handle_alloc_align_attribute): Also check FUNCTION_DECL.
2016-07-28 Martin Liska <mliska@suse.cz>
PR gcov-profile/68025
* c-common.c (handle_no_profile_instrument_function_attribute):
2016-07-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
* c-common.c (check_user_alignment): Use LOG2_BITS_PER_UNIT instead of
BITS_PER_UNIT_LOG.
2016-07-25 Jason Merrill <jason@redhat.com>
PR c++/65970
* c.opt (fconstexpr-loop-limit): New.
2016-07-22 Martin Sebor <msebor@redhat.com>
PR c++/71675
* c-common.c (resolve_overloaded_builtin): Avoid converting
__atomic_compare_exchange_n return type to that of what its
first argument points to.
2016-07-22 Uros Bizjak <ubizjak@gmail.com>
* c-common.c: Use HOST_WIDE_INT_M1U instead of
~(unsigned HOST_WIDE_INT) 0.
2016-07-22 Martin Liska <mliska@suse.cz>
PR gcov-profile/69028
PR gcov-profile/62047
* cilk.c (create_cilk_helper_decl): Set location of a new decl
to the current_function_decl.
2016-07-21 Jason Merrill <jason@redhat.com>
PR c++/65168
* c-common.c (c_common_truthvalue_conversion): Check
c_inhibit_evaluation_warnings for warning about address of
reference.
2016-07-20 David Malcolm <dmalcolm@redhat.com>
* c-common.h (lookup_name_fuzzy): Convert return type from tree to
const char *.
2016-07-15 Jason Merrill <jason@redhat.com>
* c-opts.c (c_common_post_options): Update -fabi-version default to 11.
2016-07-15 Jakub Jelinek <jakub@redhat.com>
PR c/71858
* c-common.h (enum lookup_name_fuzzy_kind): Add
FUZZY_LOOKUP_FUNCTION_NAME.
2016-07-08 Jason Merrill <jason@redhat.com>
P0145: Refining Expression Order for C++.
* c.opts (-fargs-in-order): Rename to -fstrong-eval-order.
* c-opts.c: Adjust.
2016-07-05 Markus Trippelsdorf <markus@trippelsdorf.de>
PR c++/71214
* c-cppbuiltin.c (c_cpp_builtins): Define __cpp_rvalue_references.
2016-06-29 Thomas Schwinge <thomas@codesourcery.com>
* c-pragma.h (enum pragma_kind): Rename
PRAGMA_OMP_DECLARE_REDUCTION to PRAGMA_OMP_DECLARE. Adjust all
users.
2016-06-29 Richard Biener <rguenther@suse.de>
PR middle-end/71002
* c-common.c (c_common_get_alias_set): Remove union type punning case.
2016-06-24 Jason Merrill <jason@redhat.com>
P0145R2: Refining Expression Order for C++.
* c-common.c (verify_tree) [COMPOUND_EXPR]: Fix handling on LHS of
MODIFY_EXPR.
2016-06-24 Jakub Jelinek <jakub@redhat.com>
* c-common.c (check_builtin_function_arguments): Require last
argument of BUILT_IN_*_OVERFLOW_P to have INTEGER_TYPE type.
Adjust wording of diagnostics for BUILT_IN_*_OVERLFLOW
if the last argument is pointer to enumerated or boolean type.
2016-06-22 David Malcolm <dmalcolm@redhat.com>
PR c/70339
* c-common.h (enum lookup_name_fuzzy_kind): New enum.
(lookup_name_fuzzy): New prototype.
2016-06-21 John David Anglin <danglin@gcc.gnu.org>
* c-common.c (get_source_date_epoch): Use int64_t instead of long long.
2016-06-14 Jason Merrill <jason@redhat.com>
P0145R2: Refining Expression Order for C++.
* c.opt (fargs-in-order): New.
* c-opts.c (c_common_post_options): Adjust flag_args_in_order.
2016-06-13 Jakub Jelinek <jakub@redhat.com>
PR sanitizer/71498
* c-gimplify.c (ubsan_walk_array_refs_r): Set *walk_subtrees = 0 on
all BIND_EXPRs, and on all BIND_EXPRs recurse also on BIND_EXPR_BODY.
PR preprocessor/71183
* c-ppoutput.c (init_pp_output): Set cb->get_source_date_epoch
to cb_get_source_date_epoch.
2016-06-10 Jakub Jelinek <jakub@redhat.com>
PR c/68657
* c.opt (Wpsabi): Add Warning flag.
2016-06-10 Martin Sebor <msebor@redhat.com>
PR c/71392
* c-common.c (handle_nonnull_attribute): Accept
the nonnull attribute in type-generic builtins.
2016-06-09 Martin Sebor <msebor@redhat.com>
PR c/70883
* c-common.c (builtin_function_validate_nargs): Make text of error
message consistent with others like it.
2016-06-08 Martin Sebor <msebor@redhat.com>
Jakub Jelinek <jakub@redhat.com>
PR c++/70507
PR c/68120
* c-common.c (check_builtin_function_arguments): Handle
BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
2016-06-08 Richard Biener <rguenther@suse.de>
* c-common.c (parse_optimize_options): Improve diagnostic messages.
2016-06-07 Richard Biener <rguenther@suse.de>
PR c/61564
* c-common.c (parse_optimize_options): Only apply CL_OPTIMIZATION
options and warn about others.
2016-06-01 Eduard Sanou <dhole@openmailbox.org>
* c-common.c (get_source_date_epoch): Rename to
cb_get_source_date_epoch.
* c-common.c (cb_get_source_date_epoch): Use a single generic erorr
message when the parsing fails. Use error_at instead of fatal_error.
* c-common.h (get_source_date_epoch): Rename to
cb_get_source_date_epoch.
* c-common.h (cb_get_source_date_epoch): Prototype.
* c-common.h (MAX_SOURCE_DATE_EPOCH): Define.
* c-common.h (c_omp_region_type): Remove trailing comma.
* c-lex.c (init_c_lex): Set cb->get_source_date_epoch callback.
* c-lex.c (c_lex_with_flags): Remove initialization of
pfile->source_date_epoch.
2016-05-30 Jakub Jelinek <jakub@redhat.com>
PR c++/71349
* c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_DEPEND to
C_OMP_CLAUSE_SPLIT_TARGET. Put OMP_CLAUSE_NOWAIT to
C_OMP_CLAUSE_SPLIT_TARGET if combined with target construct,
instead of C_OMP_CLAUSE_SPLIT_FOR.
2016-05-24 Richard Biener <rguenther@suse.de>
PR middle-end/70434
PR c/69504
* c-common.h (convert_vector_to_pointer_for_subscript): Rename to ...
(convert_vector_to_array_for_subscript): ... this.
* c-common.c (convert_vector_to_pointer_for_subscript): Use a
VIEW_CONVERT_EXPR to an array type. Rename to ...
(convert_vector_to_array_for_subscript): ... this.
2016-05-12 Marek Polacek <polacek@redhat.com>
PR c/70756
* c-common.c (pointer_int_sum): Call size_in_bytes_loc instead of
size_in_bytes and pass LOC to it.
2016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
PR c/43651
* c.opt (Wduplicate-decl-specifier): New option.
2016-05-11 Marek Polacek <polacek@redhat.com>
PR c++/71024
* c-common.c (diagnose_mismatched_attributes): New function.
* c-common.h (diagnose_mismatched_attributes): Declare.
2016-05-04 Marek Polacek <polacek@redhat.com>
* c.opt (Wdangling-else): New option.
2016-05-03 Marek Polacek <polacek@redhat.com>
PR c/70859
* c-common.c (builtin_function_validate_nargs): Add location
parameter. Use it.
(check_builtin_function_arguments): Add location and arguments
parameters. Use them.
* c-common.h (check_builtin_function_arguments): Update declaration.
2016-05-03 Richard Biener <rguenther@suse.de>
* cilk.c (cilk_gimplify_call_params_in_spawned_fn): Do not
allow call args to gimplify to SSA names.
2016-05-03 Marek Polacek <polacek@redhat.com>
* c-common.h (enum c_omp_region_type): Remove stray comma.
2016-05-02 Cesar Philippidis <cesar@codesourcery.com>
* c-common.h (enum c_omp_region_type): Define.
2016-05-02 Richard Sandiford <richard.sandiford@arm.com>
* c-common.c (shorten_compare): Use wi::to_wide.
2016-04-29 Cesar Philippidis <cesar@codesourcery.com>
PR middle-end/70626
* c-common.h (c_oacc_split_loop_clauses): Add boolean argument.
* c-omp.c (c_oacc_split_loop_clauses): Use it to duplicate
reduction clauses in acc parallel loops.
2016-04-29 Marek Polacek <polacek@redhat.com>
PR c/70852
* c-common.c (warn_for_memset): Check domain before accessing it.
2016-04-29 Dominik Vogt <vogt@linux.vnet.ibm.com>
PR/69089
* c-common.c (handle_aligned_attribute): Allow 0 as an argument to the
"aligned" attribute.
2016-04-28 Jason Merrill <jason@redhat.com>
* c-lex.c (c_common_has_attribute): Handle nodiscard.
2016-04-28 Eduard Sanou <dhole@openmailbox.org>
Matthias Klose <doko@debian.org>
* c-common.c (get_source_date_epoch): New function, gets the environment
variable SOURCE_DATE_EPOCH and parses it as long long with error
handling.
* c-common.h (get_source_date_epoch): Prototype.
* c-lex.c (c_lex_with_flags): set parse_in->source_date_epoch.
2015-04-27 Ryan Burn <contact@rnburn.com>
PR c++/69024
PR c++/68997
* cilk.c (cilk_ignorable_spawn_rhs_op): Change to external linkage.
(cilk_recognize_spawn): Renamed from recognize_spawn and change to
external linkage.
(cilk_detect_and_unwrap): Corresponding changes.
(extract_free_variables): Don't extract free variables from
AGGR_INIT_EXPR slot.
* c-common.h (cilk_ignorable_spawn_rhs_op): Prototype.
(cilk_recognize_spawn): Likewise.
2016-04-27 Bernd Schmidt <bschmidt@redhat.com>
* c.opt (Wmemset-elt-size): New option.
* c-common.c (warn_for_memset): New function.
* c-common.h (warn_for_memset): Declare.
2016-04-25 Jason Merrill <jason@redhat.com>
* c-common.c (handle_unused_attribute): Accept CONST_DECL.
No longer static.
* c-common.h: Declare it.
* c-lex.c (c_common_has_attribute): Add maybe_unused.
2016-04-22 Jason Merrill <jason@redhat.com>
* c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_range_based_for.
2016-04-20 Ilya Verbin <ilya.verbin@intel.com>
PR c++/69363
* c-cilkplus.c (c_finish_cilk_clauses): Remove function.
* c-common.h (c_finish_cilk_clauses): Remove declaration.
2016-04-18 Michael Matz <matz@suse.de>
* c-common.c (handle_aligned_attribute): Use SET_TYPE_ALIGN
and SET_DECL_ALIGN.
2016-04-17 Eric Botcazou <ebotcazou@adacore.com>
* c-ada-spec.c (get_underlying_decl): Return the typedef, if any.
(dump_generic_ada_node) <POINTER_TYPE>: Clean up handling of access
to incomplete types.
(dump_nested_type): Remove redundant tests and tidy up.
(print_ada_declaration): Also set TREE_VISITED on the declaration of
a type which is the typedef of an original type.
2016-04-15 Marek Polacek <polacek@redhat.com>
PR c/70651
* c-common.c (build_va_arg): Change two asserts into errors and return
error_mark_node.
2016-04-13 Marek Polacek <polacek@redhat.com>
PR c++/70639
* c-indentation.c (should_warn_for_misleading_indentation): Bail out
for switch statements, too.
2016-03-28 Jason Merrill <jason@redhat.com>
* c-cppbuiltin.c (c_cpp_builtins): Update __cpp_range_based_for.
2016-03-23 Marek Polacek <polacek@redhat.com>
PR c++/69884
* c.opt (Wignored-attributes): New option.
2016-03-22 David Malcolm <dmalcolm@redhat.com>
PR c/69993
* c-indentation.c (warn_for_misleading_indentation): Rewrite the
diagnostic text, reversing the order of the warning and note so
that they appear in source order.
2016-03-17 Marek Polacek <polacek@redhat.com>
PR c/69407
* c-common.c (resolve_overloaded_builtin): Set TREE_USED for the fetch
operations.
2016-03-14 Jason Merrill <jason@redhat.com>
* c-cppbuiltin.c (c_cpp_builtins): Set __cpp_hex_float.
* c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_range_based_for.
2016-03-09 Richard Biener <rguenther@suse.de>
PR c/70143
* c-common.c (strict_aliasing_warning): Add back
alias_sets_conflict_p check.
2016-03-08 Jason Merrill <jason@redhat.com>
* c-opts.c (set_std_cxx1z): Don't enable concepts.
2016-03-04 David Malcolm <dmalcolm@redhat.com>
PR c/68187
* c-indentation.c (get_visual_column): Move code to determine next
tab stop to...
(next_tab_stop): ...this new function.
(line_contains_hash_if): Delete function.
(detect_preprocessor_logic): Delete function.
(get_first_nws_vis_column): New function.
(detect_intervening_unindent): New function.
(should_warn_for_misleading_indentation): Replace call to
detect_preprocessor_logic with a call to
detect_intervening_unindent.
2016-03-04 David Malcolm <dmalcolm@redhat.com>
PR c/68187
* c-indentation.c (should_warn_for_misleading_indentation): When
suppressing warnings about cases where the guard and body are on
the same column, only use the first non-whitespace column in place
of the guard token column when dealing with "else" clauses.
When rejecting aligned BODY and NEXT, loosen the requirement
from equality with the first non-whitespace of guard to simply
that they not be indented relative to it.
2016-03-04 Richard Biener <rguenther@suse.de>
PR c++/70054
* c-common.c (strict_aliasing_warning): Use alias_set_subset_of
instead of alias_sets_conflict_p.
2016-03-01 Marek Polacek <polacek@redhat.com>
PR c++/69795
* c-common.c (reject_gcc_builtin): Check for FUNCTION_DECL rather than
any DECL.
2016-02-22 Martin Sebor <msebor@redhat.com>
PR middle-end/69780
* c-common.c (check_builtin_function_arguments): Validate and
reject invalid arguments to __builtin_alloca_with_align.
2016-02-20 Mark Wielaard <mjw@redhat.com>
PR c/28901
* c.opt (Wunused-const-variable): Turn into Alias for...
(Wunused-const-variable=): New option.
2016-02-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
PR c++/69865
* c-opts.c (c_common_post_options): Move call to set_std_cxx14 from
here...
(c_common_init_options): ...to here.
(set_std_cxx98): Initialize flag_isoc94 and flag_isoc99.
2016-02-19 Jakub Jelinek <jakub@redhat.com>
PR c++/69826
* c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_GRAINSIZE.
(init_pragma): Register PRAGMA_CILK_GRAINSIZE even for
flag_preprocess_only.
2016-02-16 Jakub Jelinek <jakub@redhat.com>
PR c/69835
* c.opt (Wnonnull-compare): Enable for -Wall.
2016-02-15 Jakub Jelinek <jakub@redhat.com>
PR c++/69797
* c-common.c (sync_resolve_size): Diagnose too few arguments
even when params is non-NULL empty vector.
2016-02-08 Bernd Schmidt <bschmidt@redhat.com>
PR target/60410
* c.opt (fshort-double): Remove.
2016-02-05 Martin Sebor <msebor@redhat.com>
PR c++/69662
* c.opt (Warning options): Update -Wplacement-new to take
an optional argument.
2016-02-01 Jakub Jelinek <jakub@redhat.com>
PR preprocessor/69543
PR c/69558
* c-pragma.c (handle_pragma_diagnostic): Pass input_location
instead of loc to control_warning_option.
2016-02-01 Nathan Sidwell <nathan@codesourcery.com>
* c.opt (fopenacc-dim=): New option.
2016-01-27 Ryan Burn <contact@rnburn.com>
PR cilkplus/69267
* cilk.c (cilk_gimplify_call_params_in_spawned_fn): Change to use
gimplify_arg. Removed superfluous post_p argument.
* c-family.h (cilk_gimplify_call_params_in_spawned_fn): Removed
superfluous post_p argument.
* c-gimplify.c (c_gimplify_expr): Likewise.
2016-01-26 David Malcolm <dmalcolm@redhat.com>
PR other/69006
* c-opts.c (c_diagnostic_finalizer): Replace invocation of
pp_newline_and_flush with pp_flush.
2016-01-20 Martin Sebor <msebor@redhat.com>
PR c/69405
* c-common.c (sync_resolve_size): Avoid printing diagnostic about
an incompatible argument when the argument isn't a valid tree node.
2016-01-18 Jason Merrill <jason@redhat.com>
PR c++/68767
* c-common.c (check_function_arguments_recurse): Fold the whole
COND_EXPR, not just the condition.
2016-01-18 Tom de Vries <tom@codesourcery.com>
* c-omp.c (c_oacc_split_loop_clauses): Don't copy OMP_CLAUSE_REDUCTION,
classify as loop clause.
2016-01-15 Jakub Jelinek <jakub@redhat.com>
PR bootstrap/68271
* c-pragma.c (c_register_pragma_1): Adjust comment to note that
C++ FE no longer has limit on number of pragmas.
2015-01-14 Ryan Burn <contact@rnburn.com>
PR c++/69048
* cilk.c (create_cilk_wrapper_body): Call fold_build_cleanup_point_expr
to add missing cleanup point.
2016-01-14 David Malcolm <dmalcolm@redhat.com>
PR c++/68819
* c-indentation.c (get_visual_column): Add location_t param.
Handle the column number being zero by effectively disabling the
warning, with an "inform".
(should_warn_for_misleading_indentation): Add location_t argument
for all uses of get_visual_column.
2016-01-10 Patrick Palka <ppalka@gcc.gnu.org>
PR c++/69029
* c-indentation.c (should_warn_for_misleading_indentation):
Don't warn about do-while statements.
2016-01-07 Martin Sebor <msebor@redhat.com>
PR c/68966
* c-common.c (sync_resolve_size): Reject first argument when it's
a pointer to _Bool.
2016-01-05 David Malcolm <dmalcolm@redhat.com>
PR c/69122
* c-indentation.c (get_visual_column): Remove default argument.
(should_warn_for_misleading_indentation): For the multiline case,
update call to get_visual_column for next_stmt_exploc so that it
captures the location of the first non-whitespace character in the
relevant line. Don't issue warnings if there is non-whitespace
before the next statement.
2016-01-04 Jakub Jelinek <jakub@redhat.com>
Update copyright years.
2015-12-21 David Malcolm <dmalcolm@redhat.com>
* c-common.c (binary_op_error): Convert first param from
location_t to rich_location * and use it when emitting an error.
* c-common.h (binary_op_error): Convert first param from
location_t to rich_location *.
2015-12-16 David Malcolm <dmalcolm@redhat.com>
* c-common.h (conflict_marker_get_final_tok_kind): New prototype.
* c-lex.c (conflict_marker_get_final_tok_kind): New function.
2015-12-15 Ilya Verbin <ilya.verbin@intel.com>
* c-common.c (c_common_attribute_table): Handle "omp declare target
link" attribute.
2015-12-14 Jakub Jelinek <jakub@redhat.com>
PR c/68833
* c.opt (Wmissing-format-attribute, Wnormalized): Add Warning option.
2014-12-12 Tobias Burnus <burnus@net-b.de>
PR fortran/68815
* c-format.c (gcc_gfc_char_table): Add 'q' flag to remaining
specifiers (%d, %i,%u and %c).
2015-12-10 David Malcolm <dmalcolm@redhat.com>
* c.opt (Wmisleading-indentation): Add to -Wall for C and C++.
2015-12-08 Jakub Jelinek <jakub@redhat.com>
PR c/48088
PR c/68657
* c.opt (Wfloat-conversion, Wsign-conversion): Add Warning.
* c-pragma.c (handle_pragma_diagnostic): Adjust
control_warning_option caller.
2015-12-07 David Malcolm <dmalcolm@redhat.com>
* c-common.c (c_cpp_error): Update for change to
rich_location::set_range.
2015-12-04 Paolo Bonzini <bonzini@gnu.org>
* c-common.c (maybe_warn_shift_overflow): Warn on all overflows if
shifting 1 out of the sign bit.
2015-12-04 Kirill Yukhin <kirill.yukhin@intel.com>
* c-common.c (c_common_attribute_table[]): Update max arguments
count for "simd" attribute.
(handle_simd_attribute): Parse "notinbranch" and "inbranch" arguments.
2015-12-03 Jakub Jelinek <jakub@redhat.com>
PR preprocessor/57580
* c-ppoutput.c (print): Change printed field to bool.
Move src_file last for smaller padding.
(init_pp_output): Set print.printed to false instead of 0.
(scan_translation_unit): Fix up formatting. Set print.printed
to true after printing something other than newline.
(scan_translation_unit_trad): Set print.printed to true instead of 1.
(maybe_print_line_1): Set print.printed to false instead of 0.
(print_line_1): Likewise.
(do_line_change): Set print.printed to true instead of 1.
(cb_define, dump_queued_macros, cb_include, cb_def_pragma,
dump_macro): Set print.printed to false after printing newline.
2015-12-02 Jason Merrill <jason@redhat.com>
* c-common.c (fold_for_warn): New.
(warn_logical_operator, warn_tautological_cmp)
(check_function_arguments_recurse, maybe_warn_bool_compare): Use it.
* c-common.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
(c_fully_fold_internal, decl_constant_value_for_optimization):
Move to c/c-fold.c.
* c-common.h: Don't declare decl_constant_value_for_optimization.
2015-12-02 Joseph Myers <joseph@codesourcery.com>
PR c/68162
* c-common.h (c_build_qualified_type): Add extra default
arguments.
2015-12-01 Julian Brown <julian@codesourcery.com>
Cesar Philippidis <cesar@codesourcery.com>
James Norris <James_Norris@mentor.com>
* c-pragma.c (oacc_pragmas): Add PRAGMA_OACC_HOST_DATA.
* c-pragma.h (pragma_kind): Add PRAGMA_OACC_HOST_DATA.
(pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_USE_DEVICE.
2015-11-30 Eric Botcazou <ebotcazou@adacore.com>
* c-ada-spec.c (print_ada_macros): Remove redundant blank line.
(decl_sloc_common): Delete and move bulk of processing to...
(decl_sloc): ...here.
(pp_ada_tree_identifier): Remove reference to QUAL_UNION_TYPE.
(dump_ada_double_name): Remove S parameter and compute the suffix.
(dump_ada_array_type): Add PARENT parameter. Simplify computation of
element type and deal with an anonymous one.
(dump_ada_template): Use RECORD_OR_UNION_TYPE_P macro.
(dump_generic_ada_node): Tweak. Adjust call to dump_ada_array_type
and remove reference to QUAL_UNION_TYPE.
(dump_nested_types): Make 2 passes on the fields and move bulk to...
(dump_nested_type): ...here. New function extracted from above.
Generate a full declaration for anonymous element type of arrays.
(print_ada_declaration): Really skip anonymous declarations. Remove
references to QUAL_UNION_TYPE. Adjust call to dump_ada_array_type.
Clean up processing of declarations of array types and objects.
(print_ada_struct_decl): Remove reference to QUAL_UNION_TYPE.
Remove obsolete code and tidy up.
<