blob: f532c1f4145a4677b9c0ecb614d383926ec97859 [file] [log] [blame]
2023-07-07 Release Manager
* GCC 10.5.0 released.
2023-05-03 Jakub Jelinek <jakub@redhat.com>
Backported from master:
2023-03-17 Jakub Jelinek <jakub@redhat.com>
PR c/109151
* c-ubsan.c (ubsan_instrument_division): Handle all scalar integral
types rather than just INTEGER_TYPE.
2023-05-03 Jakub Jelinek <jakub@redhat.com>
Backported from master:
2023-03-04 Jakub Jelinek <jakub@redhat.com>
PR c/107465
* c-warn.c (warn_for_sign_compare): Don't warn for unset bits
above innermost zero extension of BIT_NOT_EXPR result.
2023-05-03 Jakub Jelinek <jakub@redhat.com>
Backported from master:
2023-03-04 Jakub Jelinek <jakub@redhat.com>
PR c/107465
* c-warn.c (warn_for_sign_compare): If c_common_get_narrower
doesn't return a narrower result, use TYPE_UNSIGNED to set unsignedp0
and unsignedp1. For the one BIT_NOT_EXPR case vs. one without,
only check for constant in the non-BIT_NOT_EXPR operand, use std::swap
to simplify the code, only warn if BIT_NOT_EXPR operand is extended
from narrower unsigned, fix up computation of mask for the constant
cases and for unsigned other operand case handle differently
BIT_NOT_EXPR result being sign vs. zero extended.
2023-04-21 Jason Merrill <jason@redhat.com>
PR c++/107163
* c-common.c (verify_tree): Don't use sequenced handling
for COMPONENT_REF.
2022-06-28 Release Manager
* GCC 10.4.0 released.
2022-05-31 Iain Sandoe <iain@sandoe.co.uk>
* c-opts.c (c_common_post_options): Default to
flag_objc_sjlj_exceptions = 1 only when flag_objc_abi < 2.
2022-05-31 Iain Sandoe <iain@sandoe.co.uk>
Backported from master:
2020-11-16 Iain Sandoe <iain@sandoe.co.uk>
PR objc/97854
* stub-objc.c: Include c-common.h to declare enum rid.
2022-05-10 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-10 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-10 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-10 Jakub Jelinek <jakub@redhat.com>
Backported from master:
2022-01-11 Jakub Jelinek <jakub@redhat.com>
PR c/101537
PR c/103881
* c-warn.c (conversion_warning): Handle BIT_AND_EXPR, BIT_IOR_EXPR
and BIT_XOR_EXPR.
2022-05-10 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-10 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.
2022-05-09 Patrick Palka <ppalka@redhat.com>
Backported from master:
2022-04-26 Patrick Palka <ppalka@redhat.com>
PR c++/105304
* c-common.c (verify_tree) [restart]: Move up to before the
NULL test.
2021-04-08 Release Manager
* GCC 10.3.0 released.
2021-04-01 Jakub Jelinek <jakub@redhat.com>
PR c++/98481
* c-opts.c (c_common_post_options): Bump latest_abi_version.
2021-03-29 Marek Polacek <polacek@redhat.com>
Backported from master:
2021-02-16 Marek Polacek <polacek@redhat.com>
PR c++/99062
* c-attribs.c (handle_assume_aligned_attribute): Check that the
alignment argument is non-negative. Tweak a warning message.
2021-03-24 Iain Sandoe <iain@sandoe.co.uk>
* c-common.c (c_common_reswords): Add 'atomic' property
attribute.
* c-common.h (enum rid): Add RID_PROPATOMIC for atomic
property attributes.
2021-03-24 Iain Sandoe <iain@sandoe.co.uk>
* c-objc.h (enum objc_property_attribute_group): New
(enum objc_property_attribute_kind): New.
(OBJC_PROPATTR_GROUP_MASK): New.
(struct property_attribute_info): Small class encapsulating
parser output from property attributes.
(objc_prop_attr_kind_for_rid): New
(objc_add_property_declaration): Simplify interface.
* stub-objc.c (enum rid): Dummy type.
(objc_add_property_declaration): Simplify interface.
(objc_prop_attr_kind_for_rid): New.
2021-03-24 Iain Sandoe <iain@sandoe.co.uk>
* c-lex.c (c_lex_with_flags): When combining '@' with a
keyword for Objective-C, combine the location ranges too.
2021-03-19 Jakub Jelinek <jakub@redhat.com>
Backported from master:
2021-03-03 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-01-14 Iain Sandoe <iain@sandoe.co.uk>
Backported from master:
2020-11-04 Iain Sandoe <iain@sandoe.co.uk>
* c-objc.h (objc_non_constant_expr_p): New.
* stub-objc.c (objc_non_constant_expr_p): New.
2021-01-06 Jakub Jelinek <jakub@redhat.com>
Backported from master:
2020-12-08 Jakub Jelinek <jakub@redhat.com>
PR c++/98187
* c-pragma.c (omp_pragmas): Remove "master".
(omp_pragmas_simd): Add "master".
2020-11-12 Jakub Jelinek <jakub@redhat.com>
Backported from master:
2020-11-10 Jakub Jelinek <jakub@redhat.com>
PR c/97748
* c-common.h (warn_if_unused_value): Add quiet argument defaulted
to false.
* c-warn.c (warn_if_unused_value): Likewise. Pass it down
recursively and just return true instead of warning if it is true.
Handle COMPLEX_EXPR.
2020-11-12 Jakub Jelinek <jakub@redhat.com>
Backported from master:
2020-11-06 Jakub Jelinek <jakub@redhat.com>
* c-common.c (verify_sequence_points): Remove DEBUG_FUNCTION.
2020-10-16 Jakub Jelinek <jakub@redhat.com>
Backported from master:
2020-10-05 Richard Biener <rguenther@suse.de>
Jakub Jelinek <jakub@redhat.com>
PR c++/97197
* c-pretty-print.c: Include langhooks.h.
(c_pretty_printer::postfix_expression): Handle TARGET_MEM_REF as
expression.
(c_pretty_printer::expression): Handle TARGET_MEM_REF as
unary_expression.
(c_pretty_printer::unary_expression): Handle TARGET_MEM_REF.
2020-08-25 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-07-23 Release Manager
* GCC 10.2.0 released.
2020-06-29 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-06-14 Jakub Jelinek <jakub@redhat.com>
PR c/95580
* c-pretty-print.c (c_pretty_printer::unary_expression): Handle the
case when MEM_REF's first argument has type pointer to incomplete type.
202-05-07 Jakub Jelinek <jakub@redhat.com>
PR c/94968
* c-common.c (speculation_safe_value_resolve_params): Return false if
error_operand_p (val2).
(resolve_overloaded_builtin) <case BUILT_IN_SPECULATION_SAFE_VALUE_N>:
Remove extraneous semicolon.
2020-05-07 Release Manager
* GCC 10.1.0 released.
2020-04-29 Jakub Jelinek <jakub@redhat.com>
* c-format.c (PP_FORMAT_CHAR_TABLE): Add %{ and %}.
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-04-23 Marek Polacek <polacek@redhat.com>
PR c++/94733
* c-attribs.c (find_tm_attribute): Use get_attribute_name instead of
TREE_PURPOSE.
2020-04-14 Patrick Palka <ppalka@redhat.com>
PR c++/85278
* c-pretty-print.c (pp_c_pointer) <case REFERENCE_TYPE>: Print a double
ampersand if it's an rvalue reference type.
2020-04-13 Martin Sebor <msebor@redhat.com>
PR c/92326
* c-pretty-print.c (c_pretty_printer::direct_abstract_declarator): Avoid
printing array bound for flexible array members.
2020-04-13 Iain Sandoe <iain@sandoe.co.uk>
* c-cppbuiltin.c (c_cpp_builtins): Update coroutines builtin
define, per n4861.
2020-04-02 Richard Biener <rguenther@suse.de>
PR c/94392
* c-opts.c (c_common_post_options): Enable -ffinite-loops
for -O2 and C++11 or newer.
2020-03-28 Patrick Palka <ppalka@redhat.com>
* c.opt: Add -fconcepts-diagnostics-depth.
2020-03-27 Martin Sebor <msebor@redhat.com>
PR c++/94346
* c-attribs.c (handle_copy_attribute): Avoid passing expressions
to decl_attributes. Make handling of different kinds of entities
more robust.
2020-03-27 Martin Sebor <msebor@redhat.com>
PR c++/94098
* c-attribs.c (handle_access_attribute): Avoid setting TYPE_ATTRIBUTES
here.
2020-03-23 Jakub Jelinek <jakub@redhat.com>
PR c++/91993
* c-warn.c (warnings_for_convert_and_check): For expr and/or
result being COMPOUND_EXPRs, skip to ultimate rhs.
2020-03-20 Richard Sandiford <richard.sandiford@arm.com>
PR middle-end/94072
* c-common.c (c_common_type_for_mode): Before using a registered
built-in type, check that the vectorness of the type matches
the vectorness of the mode.
2020-03-17 Jakub Jelinek <jakub@redhat.com>
* c-common.c (resolve_overloaded_builtin): Fix up duplicated word
issue in a diagnostic message.
2020-03-15 Lewis Hyatt <lhyatt@gmail.com>
* c.opt: Avoid redundancy in the help text.
2020-03-02 Marek Polacek <polacek@redhat.com>
PR c++/93958 - add missing -std=gnu++20.
* c.opt: Add -std=gnu++20.
2020-03-01 Martin Sebor <msebor@redhat.com>
PR c++/92721
* c-attribs.c (append_access_attrs): Correctly handle attribute.
(handle_access_attribute): Same.
2020-02-25 Jakub Jelinek <jakub@redhat.com>
PR c/93858
* c-pragma.c (handle_pragma_diagnostic): Add missing ? after
"did you mean" hint in diagnostics.
2020-02-15 Jason Merrill <jason@redhat.com>
* c.opt: Add -std=c++20.
2020-02-14 Eric Botcazou <ebotcazou@adacore.com>
* c-ada-spec.c: Include bitmap.h.
(dump_ada_double_name): Rename into...
(dump_anonymous_type_name): ...this. Always use the TYPE_UID.
(dump_ada_array_type): Adjust to above renaming. Robustify.
(dump_nested_types_1): New function copied from... Add dumped_types
parameter and pass it down to dump_nested_type.
(dump_nested_types): ...this. Remove parent parameter. Just call
dump_nested_types_1 on an automatic bitmap.
(dump_nested_type): Add dumped_types parameter.
<ARRAY_TYPE>: Do not dump it if already present in dumped_types.
Adjust recursive calls and adjust to above renaming.
(dump_ada_declaration): Adjust call to dump_nested_types.
Tidy up and adjust to above renaming.
(dump_ada_specs): Initialize and release bitmap obstack.
2020-02-10 Martin Sebor <msebor@redhat.com>
PR c/93640
* c-attribs.c (handle_access_attribute): Correct off-by-one mistakes.
2020-02-10 Jakub Jelinek <jakub@redhat.com>
PR other/93641
* c-format.c (check_plain): Fix up last argument of strncasecmp.
Remove useless extra test.
2020-02-03 Julian Brown <julian@codesourcery.com>
Tobias Burnus <tobias@codesourcery.com>
* c-cppbuiltin.c (c_cpp_builtins): Update _OPENACC define to 201711.
2020-01-29 Jason Merrill <jason@redhat.com>
PR c++/89357
* c-attribs.c (check_cxx_fundamental_alignment_constraints): Remove.
2020-01-23 Jason Merrill <jason@redhat.com>
* c-warn.c (conversion_warning): Change -Wsign-conversion handling.
2020-01-23 Martin Sebor <msebor@redhat.com>
PR c/84919
* c-common.c (check_function_arguments): Avoid overlap checking
of sprintf functions.
2020-01-22 Jason Merrill <jason@redhat.com>
PR testsuite/93391 - PR 40752 test fails with unsigned plain char.
PR c++/40752
* c-warn.c (conversion_warning): Check operands only after checking
the whole expression. Don't check second operand of + for sign.
2020-01-21 Jason Merrill <jason@redhat.com>
Manuel López-Ibáñez <manu@gcc.gnu.org>
PR c++/40752 - useless -Wconversion with short +=.
* c.opt (-Warith-conversion): New.
* c-warn.c (conversion_warning): Recurse for operands of
operators. Only warn about the whole expression with
-Warith-conversion.
2020-01-21 Jason Merrill <jason@redhat.com>
* c-common.c (unsafe_conversion_p): Don't warn, return UNSAFE_SIGN.
* c-warn.c (conversion_warning): Warn about UNSAFE_SIGN.
2020-01-20 Nathan Sidwell <nathan@acm.org>
PR preprocessor/80005
* c-cppbuiltins.c (c_cpp_builtins): Don't define __has_include{,_next}.
2020-01-18 Iain Sandoe <iain@sandoe.co.uk>
* c-common.c (co_await, co_yield, co_return): New.
* c-common.h (RID_CO_AWAIT, RID_CO_YIELD,
RID_CO_RETURN): New enumeration values.
(D_CXX_COROUTINES): Bit to identify coroutines are active.
(D_CXX_COROUTINES_FLAGS): Guard for coroutine keywords.
* c-cppbuiltin.c (__cpp_coroutines): New cpp define.
* c.opt (fcoroutines): New command-line switch.
2020-01-10 David Malcolm <dmalcolm@redhat.com>
* c-format.c (local_event_ptr_node): New.
(PP_FORMAT_CHAR_TABLE): Add entry for "%@".
(init_dynamic_diag_info): Initialize local_event_ptr_node.
* c-format.h (T_EVENT_PTR): New define.
2020-01-10 Martin Sebor <msebor@redhat.com>
PR c/93132
* c-attribs.c (append_access_attrs): Validate against the translated
access string rather than the human-readable representation.
2020-01-01 Jakub Jelinek <jakub@redhat.com>
Update copyright years.
2019-12-20 Eric Botcazou <ebotcazou@adacore.com>
* c-ada-spec.h (decl_sloc): Delete.
* c-ada-spec.c (decl_sloc): Make static.
2019-12-19 Julian Brown <julian@codesourcery.com>
* c-common.h (c_omp_map_clause_name): Add prototype.
* c-omp.c (c_omp_map_clause_name): New function.
* c-pragma.h (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ATTACH and
PRAGMA_OACC_CLAUSE_DETACH.
2019-12-19 Julian Brown <julian@codesourcery.com>
Maciej W. Rozycki <macro@codesourcery.com>
Tobias Burnus <tobias@codesourcery.com>
Thomas Schwinge <thomas@codesourcery.com>
* c-pragma.h (pragma_omp_clause): Add
PRAGMA_OACC_CLAUSE_NO_CREATE.
2019-12-17 Martin Sebor <msebor@redhat.com>
PR c++/61339
* c.opt (-Wmismatched-tags, -Wredundant-tags): New options.
2019-12-11 David Malcolm <dmalcolm@redhat.com>
* c-pretty-print.c (c_pretty_printer::clone): New vfunc
implementation.
* c-pretty-print.h (c_pretty_printer::clone): New vfunc decl.
2019-12-09 David Malcolm <dmalcolm@redhat.com>
* c-format.c (range_label_for_format_type_mismatch::get_text):
Replace label_text ctor called with true with label_text::take.
2019-12-09 David Malcolm <dmalcolm@redhat.com>
* c-format.c (selftest::test_type_mismatch_range_labels): Remove
initial newline from expected outputs.
* c-opts.c (c_diagnostic_finalizer): Add pp_newline call before
call to diagnostic_show_locus.
2019-12-06 Jakub Jelinek <jakub@redhat.com>
* c-cppbuiltin.c (c_cpp_builtins): Don't define __cpp_consteval for
now.
2019-12-05 Marek Polacek <polacek@redhat.com>
Jakub Jelinek <jakub@redhat.com>
PR c++/91353 - P1331R2: Allow trivial default init in constexpr contexts.
* c-cppbuiltin.c (c_cpp_builtins): Adjust the value of __cpp_constexpr.
2019-12-05 Marek Polacek <polacek@redhat.com>
PR c++/92271 - make __is_same alias for __is_same_as.
* c-common.c: Add __is_same, an alias for __is_same_as.
2019-12-03 Marek Polacek <polacek@redhat.com>
PR c++/91363 - P0960R3: Parenthesized initialization of aggregates.
* c-cppbuiltin.c (c_cpp_builtins): Predefine
__cpp_aggregate_paren_init=201902 for -std=c++2a.
2019-11-30 Jan Hubicka <hubicka@ucw.cz>
* c-attribs.c (handle_symver_attribute): New function
(c_common_attributes): Add symver.
2019-11-30 Richard Sandiford <richard.sandiford@arm.com>
* c-common.c (pointer_int_sum): Use verify_type_context to check
whether the target allows pointer arithmetic for the types involved.
(c_sizeof_or_alignof_type, c_alignof_expr): Use verify_type_context
to check whether the target allows sizeof and alignof operations
for the types involved.
2019-11-27 Jason Merrill <jason@redhat.com>
* c-cppbuiltin.c (c_cpp_builtins): Update __cpp_deduction_guides.
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-25 Joseph Myers <joseph@codesourcery.com>
PR c/91985
* c-common.c (c_common_type_for_mode): Handle decimal
floating-point types being NULL_TREE.
* c-format.c (get_format_for_type_1): Handle specified types being
NULL_TREE.
* c-lex.c (interpret_float): Give an error for decimal
floating-point constants when decimal floating-point not
supported.
2019-11-23 Jakub Jelinek <jakub@redhat.com>
PR middle-end/83859
* c-attribs.c (append_access_attrs): Avoid buffer overflow. Avoid
memory leak. Use XNEWVEC macro. Use auto_diagnostic_group to
group warning with inform together.
(handle_access_attribute): Formatting fix.
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.
Implement P1902R1, Missing feature-test macros 2017-2019.
* c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_init_captures
and __cpp_generic_lambdas for -std=c++2a. Define
__cpp_designated_initializers, __cpp_constexpr_in_decltype and
__cpp_consteval for -std=c++2a. Remove a FIXME comment about
__cpp_concepts for -std=c++2a.
2019-11-22 Martin Sebor <msebor@redhat.com>
PR middle-end/83859
* c-attribs.c (handle_access_attribute): New function.
(c_common_attribute_table): Add new attribute.
(get_argument_type): New function.
(append_access_attrs): New function.
(get_nonnull_operand): Rename...
(get_attribute_operand): ...to this.
* c-common.c (get_nonnull_operand): Rename...
(get_attribute_operand): ...to this.
2019-11-21 Joseph Myers <joseph@codesourcery.com>
* c-attribs.c (handle_fallthrough_attribute): Use pedwarn instead
of warning.
2019-11-19 Joseph Myers <joseph@codesourcery.com>
* c-common.c (attribute_fallthrough_p): In C, use pedwarn not
warning for standard attributes mixed with fallthrough attributes.
2019-11-15 Joseph Myers <joseph@codesourcery.com>
* c-attribs.c (handle_fallthrough_attribute): Remove static.
* c-common.h (handle_fallthrough_attribute): Declare.
2019-11-15 Joseph Myers <joseph@codesourcery.com>
* c-attribs.c (handle_deprecated_attribute): Remove static.
* c-common.h (handle_deprecated_attribute): Declare.
2019-11-14 Joseph Myers <joseph@codesourcery.com>
* c-lex.c (lex_charconst): Make CPP_UTF8CHAR constants unsigned
char for C.
2019-11-14 Jakub Jelinek <jakub@redhat.com>
* c-omp.c (c_omp_check_context_selector): Add nvidia to the list of
valid vendors.
* c-omp.c (c_omp_check_context_selector): Handle name lists
containing string literals. Don't diagnose atomic_default_mem_order
with multiple props.
2019-11-13 Joseph Myers <joseph@codesourcery.com>
* c-cppbuiltin.c (builtin_define_float_constants): Also define
NORM_MAX constants. Update call to get_max_float.
(LAZY_HEX_FP_VALUES_CNT): Update value to include NORM_MAX
constants.
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-11-12 Martin Liska <mliska@suse.cz>
* c-opts.c (c_common_post_options):
Use SET_OPTION_IF_UNSET.
2019-11-12 Maciej W. Rozycki <macro@codesourcery.com>
Frederik Harwath <frederik@codesourcery.com>
gcc/c-family/
* c-pragma.h (pragma_kind): Add PRAGMA_OACC_SERIAL enumeration
constant.
* c-pragma.c (oacc_pragmas): Add "serial" entry.
2019-11-08 Richard Sandiford <richard.sandiford@arm.com>
* c-common.h (gnu_vector_type_p): New function.
* c-common.c (c_build_vec_perm_expr): Require __builtin_shuffle
vectors to satisfy gnu_vector_type_p.
(c_build_vec_convert): Likewise __builtin_convertvector.
(convert_vector_to_array_for_subscript): Likewise when applying
implicit vector to array conversion.
(scalar_to_vector): Likewise when converting vector-scalar
operations to vector-vector operations.
2019-11-08 Joseph Myers <joseph@codesourcery.com>
* c.opt (Wold-style-definition): Initialize to -1.
* c-opts.c (c_common_post_options): Set warn_old_style_definition
to flag_isoc2x if not set explicitly.
2019-11-07 Joseph Myers <joseph@codesourcery.com>
* c-attribs.c (parse_tm_stmt_attr): Handle scoped attributes.
2019-11-05 Jason Merrill <jason@redhat.com>
* c-opts.c (c_common_post_options): -fconcepts-ts implies
-fconcepts.
2019-11-04 Kamlesh Kumar <kamleshbhalui@gmail.com>
* c-opts.c (c_common_post_options): Update
latest_abi_version.
2019-11-02 Jakub Jelinek <jakub@redhat.com>
* c-common.h (c_omp_get_context_selector): Remove.
* c-omp.c (c_omp_get_context_selector): Moved to omp-general.c
and renamed to omp_get_context_selector.
* c-omp.c (c_omp_mark_declare_variant): Use
omp_context_selector_set_compare.
PR c++/88335 - Implement P1073R3: Immediate functions
* c-common.h (enum rid): Add RID_CONSTEVAL.
* c-common.c (c_common_reswords): Add consteval.
2019-11-01 Martin Sebor <msebor@redhat.com>
PR middle-end/91679
PR middle-end/91647
PR middle-end/91463
PR middle-end/92312
* c-pretty-print.c (direct_abstract_declarator): Print
bound in zero-length arrays.
* c.opt (-Wzero-length-bounds): New option.
2019-10-30 Nathan Sidwell <nathan@acm.org>
* c-cppbuiltin.c (c_cpp_builtins): Add 'L' suffix to feature
macros.
2019-10-28 Martin Sebor <msebor@redhat.com>
PR c/66970
* c-common.c (c_common_nodes_and_builtins): Call c_define_builtins
even when only preprocessing.
* c-common.h (names_builtin_p): Declare new function.
* c-lex.c (init_c_lex): Set has_builtin.
(c_common_has_builtin): Define a new function.
* c-ppoutput.c (init_pp_output): Set has_builtin.
2019-10-24 Jakub Jelinek <jakub@redhat.com>
* c-common.h (c_omp_context_selector_matches): Remove.
* c-omp.c (c_omp_context_selector_matches): Remove.
* c-attribs.c (c_common_attribute_table): Add
"omp declare target {host,nohost,block}" attributes.
2019-10-17 JeanHeyd Meneide <phdofthehouse@gmail.com>
* c-lex.c (c_common_has_attribute): Update nodiscard value.
2019-10-14 Richard Sandiford <richard.sandiford@arm.com>
* c-common.h (user_facing_original_type_p): Declare.
* c-common.c: Include c-spellcheck.h.
(user_facing_original_type_p): New function.
2019-10-12 Jakub Jelinek <jakub@redhat.com>
* c-common.h (c_omp_mark_declare_variant,
c_omp_context_selector_matches): Declare.
* c-omp.c: Include attribs.h, gimplify.h, cgraph.h, symbol-summary.h
and hsa-common.h.
(c_omp_get_context_selector): Support second argument NULL.
(c_omp_mark_declare_variant, c_omp_context_selector_matches): New
functions.
* c-attribs.c (c_common_attribute_table): Remove "omp declare variant"
attribute, add "omp declare variant base" and
"omp declare variant variant" attributes.
2019-10-11 Joseph Myers <joseph@codesourcery.com>
* c.opt (Wc11-c2x-compat): Add CPP(cpp_warn_c11_c2x_compat)
CppReason(CPP_W_C11_C2X_COMPAT).
2019-10-11 Joseph Myers <joseph@codesourcery.com>
* c-common.c (c_common_reswords): Do not use D_EXT for _Decimal32,
_Decimal64 and _Decimal128.
2019-10-10 Joseph Myers <joseph@codesourcery.com>
* c-cppbuiltin.c (c_cpp_builtins): Do not define macros for DFP
types if DFP not supported.
2019-10-10 Jakub Jelinek <jakub@redhat.com>
* c-common.h (c_omp_check_context_selector,
c_omp_get_context_selector): Declare.
* c-omp.c (c_omp_declare_simd_clauses_to_numbers): Fix spelling
in diagnostic message.
(c_omp_check_context_selector, c_omp_get_context_selector): New
functions.
* c-attribs.c (c_common_attribute_table): Add "omp declare variant"
attribute.
(handle_omp_declare_variant_attribute): New function.
2019-10-09 Martin Sebor <msebor@redhat.com>
PR tree-optimization/90879
* c.opt (-Wstring-compare): New option.
2019-10-08 Andrew Sutton <asutton@lock3software.com>
Jason Merrill <jason@redhat.com>
Update the concepts implementation to conform to the C++20
specification, improve compile times, and generally clean up
the implementation.
* c-cppbuiltin.c (c_cpp_builtins): Use new feature test values for
concepts when -std=c++2a. Bump __cpp_concepts to 201907.
* c.opt: Add -Wconcepts-ts.
* c-opts.c (c_common_post_options): Warn when -fconcepts is used
with -std=c++2a. Disable warning for -fconcepts in C++20 mode.
(set_std_cxx2a): Enable concepts by default.
2019-10-08 Joseph Myers <joseph@codesourcery.com>
* c-opts.c (c_common_post_options): Set
-fno-fp-int-builtin-inexact for C2X.
2019-10-05 Jakub Jelinek <jakub@redhat.com>
PR c++/91369 - Implement P0784R7: constexpr new
* c-cppbuiltin.c (c_cpp_builtins): Predefine
__cpp_constexpr_dynamic_alloc=201907 for -std=c++2a.
2019-10-04 Joseph Myers <joseph@codesourcery.com>
PR c/82752
* c-format.c (C_STD_VER): Handle C2x.
(C_STD_NAME): Likewise.
(strftime_flag_specs): Add 'O' modifier with 'p' flag.
(time_char_table): Use separate entry for 'B' and 'b', with 'O'
modifier allowed and 'p' flag.
* c-format.h (enum format_std_version): Add STD_C2X.
(struct format_char_info): Mention 'p' in comment on flags2.
2019-10-01 David Malcolm <dmalcolm@redhat.com>
* c-opts.c (c_diagnostic_finalizer): Temporarily clear prefix when
calling diagnostic_show_locus, rather than destroying it afterwards.
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-10-01 Richard Sandiford <richard.sandiford@arm.com>
* c-pretty-print.c (pp_c_specifier_qualifier_list): If a vector type
has a type name, use it in preference to the __vector syntax.
2019-09-30 Richard Sandiford <richard.sandiford@arm.com>
* c-pretty-print.c (pp_c_parameter_type_list): Avoid printing
two spaces between a comma and "...".
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-27 Richard Sandiford <richard.sandiford@arm.com>
* c-common.h (build_function_call_vec): Take the original
function decl as an optional final parameter.
(check_builtin_function_arguments): Take the original function decl.
* c-common.c (check_builtin_function_arguments): Likewise.
Handle all built-in functions, not just BUILT_IN_NORMAL ones.
Use targetm.check_builtin_call to check BUILT_IN_MD functions.
2019-09-15 Jason Merrill <jason@redhat.com>
* c-warn.c (warn_logical_operator): Strip location wrappers. Don't
fold_for_warn in "|| mask" warning.
2019-09-10 Martin Liska <mliska@suse.cz>
* c.opt: Use newly added WarnRemoved.
2019-09-09 Martin Liska <mliska@suse.cz>
* c.opt: Update comment of removed
options that are preserved only for backward
compatibility.
2019-09-06 Martin Liska <mliska@suse.cz>
PR c++/91125
* c-common.c: Remove definition of flag_use_repository.
* c-common.h: Likewise.
* c-opts.c (c_common_handle_option):
Do not handle OPT_frepo option.
* c.opt: Mark the option with Deprecated.
2019-09-04 Marek Polacek <polacek@redhat.com>
* c.opt (fdeduce-init-list): Ignored.
2019-09-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
PR c/78736
* c.opt (Wenum-conversion): New option.
2019-09-03 Jozef Lawrynowicz <jozef.l@mittosystems.com>
* c-attribs.c (handle_section_attribute): Call the
handle_generic_attribute target hook after performing target
independent processing.
(handle_noinit_attribute): Likewise.
2019-09-03 Ian Lance Taylor <iant@golang.org>
* c-cppbuiltin.c (builtin_define_with_hex_fp_value): Always expand
when using -fgo-dump-spec.
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-28 Marek Polacek <polacek@redhat.com>
Implement P1152R4: Deprecating some uses of volatile.
PR c++/91361
* c-opts.c (c_common_post_options): Enable -Wvolatile by
default for C++2a, unless -Wno-deprecated.
* c.opt (Wvolatile): New warning.
2019-08-28 Marek Polacek <polacek@redhat.com>
PR c++/91360 - Implement C++20 P1143R2: constinit.
* c-common.c (c_common_reswords): Add constinit and __constinit.
(keyword_is_decl_specifier): Handle RID_CONSTINIT.
* c-common.h (enum rid): Add RID_CONSTINIT, RID_FIRST_CXX20, and
RID_LAST_CXX20.
(D_CXX20): Define.
* c-cppbuiltin.c (c_cpp_builtins): Define __cpp_constinit.
* c-format.c (cxx_keywords): Add "constinit".
* c.opt (Wc++2a-compat, Wc++20-compat): New options.
2019-08-27 Jakub Jelinek <jakub@redhat.com>
PR c++/91415
* c-common.c (verify_tree): For LSHIFT_EXPR, RSHIFT_EXPR,
COMPONENT_REF and ARRAY_REF in cxx_dialect >= cxx17 mode handle it
like COMPOUND_EXPR rather than normal expression.
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-23 Jakub Jelinek <jakub@redhat.com>
PR middle-end/91283
* c-common.c (c_ts18661_flt_eval_method): Use flag_excess_precision
instead of flag_excess_precision_cmdline.
* c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): Likewise.
* c-opts.c (c_common_post_options): Likewise.
2019-08-22 Martin Sebor <msebor@redhat.com>
PR middle-end/91490
* c-common.c (braced_list_to_string): Add argument and overload.
Handle flexible length arrays and unions.
2019-08-21 Eric Botcazou <ebotcazou@adacore.com>
* c-ada-spec.c (dump_ada_function_declaration): Be prepared for broken
function declarations where arguments are missing. Rename variables.
2019-08-15 Richard Biener <rguenther@suse.de>
* c-common.c (c_stddef_cpp_builtins): When the GIMPLE FE is
enabled, define __SIZETYPE__.
2019-08-14 Christophe Lyon <christophe.lyon@linaro.org>
* c-attribs.c (c_common_attribute_table): Add "noinit" entry. Add
exclusion with "section" attribute.
(attr_noinit_exclusions): New table.
(handle_noinit_attribute): New function.
2019-08-13 Richard Sandiford <richard.sandiford@arm.com>
PR middle-end/91421
* c-common.c (resolve_overloaded_builtin): Use
copy_decl_built_in_function.
2019-08-13 Martin Sebor <msebor@redhat.com>
PR c/80619
* c-format.c (printf_length_specs): Set FMT_LEN_w for "w".
(asm_fprintf_length_spec): Same.
* c-format.h (format_lengths): Add FMT_LEN_w.
2019-08-10 Jakub Jelinek <jakub@redhat.com>
* c-pragma.h (enum pragma_omp_clause): Add
PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
2019-08-07 Jakub Jelinek <jakub@redhat.com>
* c-pragma.h (enum pragma_omp_clause): Add
PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR. Set PRAGMA_OACC_CLAUSE_USE_DEVICE
equal to PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR instead of being a separate
enumeration value.
2019-08-05 Marek Polacek <polacek@redhat.com>
PR c++/91338 - Implement P1161R3: Deprecate a[b,c].
* c-opts.c (c_common_post_options): Enable -Wcomma-subscript by
default for C++2a, unless -Wno-deprecated.
* c.opt (Wcomma-subscript): New warning.
2019-07-20 Jakub Jelinek <jakub@redhat.com>
* c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_LOOP.
(enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_BIND.
* c-pragma.c (omp_pragmas_simd): Add PRAGMA_OMP_LOOP entry.
* c-common.h (enum c_omp_clause_split): Add C_OMP_CLAUSE_SPLIT_LOOP.
* c-omp.c (c_omp_split_clauses): Add support for 4 new combined
constructs with the loop construct.
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-07-12 Jakub Jelinek <jakub@redhat.com>
* c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ORDER.
* c-omp.c (c_omp_split_clauses): Handle splitting of OMP_CLAUSE_ORDER.
2019-07-09 Martin Sebor <msebor@redhat.com>
PR c++/61339
* c-opts.c (handle_deferred_opts): Change class-key of PODs to struct
and others to class.
* c-pretty-print.h: Same.
2019-07-09 Martin Sebor <msebor@redhat.com>
PR c++/61339
* c-format.c (check_argument_type): Change class-key from class to
struct and vice versa to match convention and avoid -Wclass-is-pod
and -Wstruct-no-pod.
* c-pretty-print.h: Same.
2019-07-03 Martin Liska <mliska@suse.cz>
* c-common.c (try_to_locate_new_include_insertion_point): Remove
dead assignemts.
2019-07-03 Jakub Jelinek <jakub@redhat.com>
* c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_REDUCTION_INSCAN
clauses on OMP_FOR rather than OMP_PARALLEL when OMP_FOR is combined
with OMP_PARALLEL.
2019-07-02 qing zhao <qing.zhao@oracle.com>
PR preprocessor/90581
* c-opts.c (c_common_handle_option): Handle -fmax-include-depth.
* c.opt: Add new option -fmax-include-depth.
2019-06-26 Jason Merrill <jason@redhat.com>
PR c++/55442 - memory-hog with highly recursive constexpr.
* c.opt (fconstexpr-loop-limit): New.
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-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
* c-common.c (c_common_nodes_and_builtins): Define
alternate "__intN__" name for "__intN" types.
2019-06-24 Jan Hubicka <jh@suse.cz>
* c-common.c (braced_lists_to_strings): Check that
type is array or integer prior checking string flag.
2019-06-21 Matthew Beliveau <mbelivea@redhat.com>
PR c++/90875 - added -Wswitch-outside-range option
* c.opt (Wswitch-outside-range): Added new option.
* c-warn.c (c_do_switch_warnings): Use OPT_Wswitch-outside-range.
2019-06-21 Marek Polacek <polacek@redhat.com>
PR c++/90953 - ICE with -Wmissing-format-attribute.
* c-common.c (check_function_arguments_recurse): Use
get_attribute_name.
(check_missing_format_attribute): Likewise.
2019-06-19 Marek Polacek <polacek@redhat.com>
PR c++/60364 - noreturn after first decl not diagnosed.
* c-attribs.c (handle_noreturn_attribute): No longer static.
* c-common.h (handle_noreturn_attribute, attr_noreturn_exclusions):
Declare.
* c-format.c (check_function_format): Use get_attribute_name.
2019-06-19 Martin Sebor <msebor@redhat.com>
PR translation/90156
* c-format.c (function_format_info::format_type): Adjust type.
(function_format_info::is_raw): New member.
(decode_format_type): Adjust signature. Handle "raw" diag attributes.
(decode_format_attr): Adjust call to decode_format_type.
Avoid a redundant call to convert_format_name_to_system_name.
Avoid abbreviating the word "arguments" in a diagnostic.
(format_warning_substr): New function.
(avoid_dollar_number): Quote dollar sign in a diagnostic.
(finish_dollar_format_checking): Same.
(check_format_info): Same.
(struct baltoks_t): New.
(c_opers, c_keywords, cxx_keywords, badwords, contrs): New arrays.
(maybe_diag_unbalanced_tokens, check_tokens, check_plain): New
functions.
(check_format_info_main): Call check_plain. Use baltoks_t. Call
maybe_diag_unbalanced_tokens.
(handle_format_attribute): Spell out the word "arguments" in
a diagnostic.
2019-06-11 Matthew Beliveau <mbelivea@redhat.com>
PR c++/90449 - add -Winaccessible-base option.
* c.opt (Winaccessible-base): New option.
2019-06-10 Jakub Jelinek <jakub@redhat.com>
* c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_SCAN.
* c-pragma.c (omp_pragmas_simd): Add #pragma omp scan.
* c-omp.c (c_omp_split_clauses): Diagnose inscan reductions on
combined/composite constructs where it is not allowed. Copy over
OMP_CLAUSE_REDUCTION_INSCAN.
2019-06-05 Martin Sebor <msebor@redhat.com>
* c-attribs.c (handle_mode_attribute): Adjust quoting and hyphenation.
(handle_alias_ifunc_attribute): Same.
(handle_copy_attribute): Same.
(handle_weakref_attribute): Same.
(handle_nonnull_attribute): Same.
* c-warn.c (warn_for_sign_compare): Same.
(warn_for_restrict): Same.
* c.opt: Same.
2019-06-05 Martin Sebor <msebor@redhat.com>
* c-pragma.c (handle_pragma_weak): Adjust quoting in a diagnostic.
* c.opt (-Wformat-diag): Remove a spurious period.
2019-05-29 Jakub Jelinek <jakub@redhat.com>
PR c/90628
* c-common.c (check_builtin_function_arguments)
<case BUILTIN_*_OVERFLOW>: Diagnose pointer to const qualified integer
as last argument.
2019-05-23 Eric Botcazou <ebotcazou@adacore.com>
* c-ada-spec.c (compare_node): Compare the DECL_UIDs as a last resort.
2019-05-22 Martin Liska <mliska@suse.cz>
PR lto/90500
* c-attribs.c (handle_copy_attribute): Do not copy
target_clones attribute.
2019-05-21 Eric Botcazou <ebotcazou@adacore.com>
* c-ada-spec.h (enum cpp_operation): Add IS_ASSIGNMENT_OPERATOR.
* c-ada-spec.c (print_assignment_operator): New function.
(dump_ada_declaration) <FUNCTION_DECL>: Call it do dump explicit copy
assignment operators declared as methods and filter out the others.
2019-05-17 Thomas Schwinge <thomas@codesourcery.com>
PR c/89433
* c-attribs.c (c_common_attribute_table): Set min_len to -1 for
"omp declare target".
2019-05-16 Martin Sebor <msebor@redhat.com>
* c-attribs.c (handle_no_sanitize_attribute): Quote identifiers,
keywords, operators, and types in diagnostics.
(handle_scalar_storage_order_attribute): Same.
(handle_mode_attribute): Same.
(handle_visibility_attribute): Same.
(handle_assume_aligned_attribute): Same.
(handle_no_split_stack_attribute): Same.
* c-common.c (shorten_compare): Same.
(c_common_truthvalue_conversion): Same.
(cb_get_source_date_epoch): Same.
* c-lex.c (cb_def_pragma): Quote keywords, operators, and types
in diagnostics.
(interpret_float): Same.
* c-omp.c (c_finish_omp_for): Same.
* c-opts.c (c_common_post_options): Same.
* c-pch.c (c_common_pch_pragma): Same.
* c-pragma.c (pop_alignment): Same.
(handle_pragma_pack): Same.
(apply_pragma_weak): Same.
(handle_pragma_weak): Same.
(handle_pragma_scalar_storage_order): Same.
(handle_pragma_redefine_extname): Same.
(add_to_renaming_pragma_list): Same.
(maybe_apply_renaming_pragma): Same.
(push_visibility): Same.
(handle_pragma_visibility): Same.
(handle_pragma_optimize): Same.
(handle_pragma_message): Same.
* c-warn.c (warn_for_omitted_condop): Same.
(lvalue_error): Same.
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-06 Nathan Sidwell <nathan@acm.org>
* c-opts.c (handle_defered_opts): Rename struct deps to struc mkdeps.
2019-04-30 Nathan Sidwell <nathan@acm.org>
* c-common.c (c_common_init_ts): Use MARK_TS_EXP. Mark SIZEOF_EXPR.
2019-04-30 Martin Liska <mliska@suse.cz>
* c-pragma.c (handle_pragma_diagnostic): Provide hints
for unknown options.
2019-04-26 Richard Sandiford <richard.sandiford@arm.com>
* c-warn.c (strict_aliasing_warning): Apply COMPLETE_TYPE_P to
the pointer target rather than the pointer itself.
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-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
* 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
* 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.
* c-common.c (check_function_restrict): Return bool.
* 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