1 2023-09-01 Jakub Jelinek <jakub@redhat.com>
4 * c-opts.cc (c_common_post_options): Change latest_abi_version to 19.
6 2023-08-31 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
8 * c.opt: Change spelling to macOS.
10 2023-08-31 Richard Biener <rguenther@suse.de>
13 * c-pretty-print.cc (c_pretty_printer::primary_expression):
14 Only dump gimple_assign_single_p SSA def RHS.
16 2023-08-25 Sandra Loosemore <sandra@codesourcery.com>
18 * c-common.h (c_omp_check_loop_binding_exprs): Declare.
19 * c-omp.cc: Include tree-iterator.h.
20 (find_binding_in_body): New.
21 (check_loop_binding_expr_r): New.
23 (check_looop_binding_expr): New.
24 (c_omp_check_loop_binding_exprs): New.
26 2023-08-25 Uros Bizjak <ubizjak@gmail.com>
28 * c-format.cc (read_any_format_width):
29 Rename TRUE/FALSE to true/false.
31 2023-08-20 Martin Uecker <uecker@tugraz.at>
33 * c-format.cc: Fix identation.
35 2023-08-20 Tomas Kalibera <tomas.kalibera@gmail.com>
38 * c-format.cc: skip default format for printf symbol if
39 explicitly declared by prototype.
41 2023-08-17 Jose E. Marchesi <jose.marchesi@oracle.com>
44 * c.opt (Wcompare-distinct-pointer-types): New option.
46 2023-08-14 Jason Merrill <jason@redhat.com>
48 * c-cppbuiltin.cc (c_cpp_builtins): Adjust __cpp_concepts.
50 2023-08-11 Jakub Jelinek <jakub@redhat.com>
52 * c-common.cc (c_common_reswords): Add __typeof_unqual
53 and __typeof_unqual__ spellings of typeof_unqual.
55 2023-08-11 Martin Uecker <uecker@tugraz.at>
58 * c.opt: Enable warning for C and ObjC.
60 2023-08-05 Martin Uecker <uecker@tugraz.at>
63 * c-warn.cc (warn_parm_array_mismatch): Do not warn if more
66 2023-08-04 Tamar Christina <tamar.christina@arm.com>
68 * c-pragma.h (enum pragma_kind): Add PRAGMA_NOVECTOR.
69 * c-pragma.cc (init_pragma): Use it.
71 2023-08-01 Lewis Hyatt <lhyatt@gmail.com>
73 * c-common.h (c_init_preprocess): Declare new function.
74 * c-opts.cc (c_common_init): Call it.
75 * c-lex.cc (cb_def_pragma): Add a comment.
76 (get_token): New function wrapping cpp_get_token.
77 (c_lex_with_flags): Use the new wrapper function to support
78 obtaining tokens in preprocess_only mode.
79 (lex_string): Likewise.
80 * c-pragma.cc (pragma_diagnostic_lex_normal): Rename to...
81 (pragma_diagnostic_lex): ...this.
82 (pragma_diagnostic_lex_pp): Remove.
83 (handle_pragma_diagnostic_impl): Call pragma_diagnostic_lex () in
85 (c_pp_invoke_early_pragma_handler): Adapt to support pragma_lex ()
87 * c-pragma.h (pragma_lex_discard_to_eol): Declare.
89 2023-07-31 Hamza Mahfooz <someguy@effective-light.com>
92 * c.opt (-Wmissing-variable-declarations): New option.
94 2023-07-20 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
97 * c-common.cc (check_builtin_function_arguments):
98 Handle BUILT_IN_ISEQSIG.
100 2023-07-05 Robin Dapp <rdapp@ventanamicro.com>
101 Juzhe-Zhong <juzhe.zhong@rivai.ai>
103 * c-common.cc (c_common_type_for_mode): Use GET_MODE_PRECISION.
105 2023-06-29 Qing Zhao <qing.zhao@oracle.com>
108 * c.opt: New option -Wflex-array-member-not-at-end.
110 2023-06-28 Jason Merrill <jason@redhat.com>
113 * c-cppbuiltin.cc (c_cpp_builtins): Update __cpp_constexpr.
115 2023-06-26 Richard Biener <rguenther@suse.de>
117 * c-common.cc (shorten_binary_op): Exit early for VECTOR_TYPE
120 2023-06-23 Marek Polacek <polacek@redhat.com>
122 * c-common.h (cxx_dialect): Add cxx26 as a dialect.
123 * c-opts.cc (set_std_cxx26): New.
124 (c_common_handle_option): Set options when -std={c,gnu}++2{c,6} is
126 (c_common_post_options): Adjust comments.
127 * c.opt: Add options for -std=c++26, std=c++2c, -std=gnu++26,
129 (std=c++2b): Mark as Undocumented.
130 (std=c++23): No longer Undocumented.
132 2023-06-21 Alexander Monakov <amonakov@ispras.ru>
134 * c-gimplify.cc (fma_supported_p): New helper.
135 (c_gimplify_expr) [PLUS_EXPR, MINUS_EXPR]: Implement FMA
138 2023-06-16 Alex Coplan <alex.coplan@arm.com>
140 * c.opt (Welaborated-enum-base): New.
142 2023-06-13 David Malcolm <dmalcolm@redhat.com>
146 (suggest_missing_header::~suggest_missing_header): Reword note to
147 avoid negative tone of "forgetting".
149 2023-06-07 Jason Merrill <jason@redhat.com>
154 2023-05-26 Martin Uecker <uecker@tugraz.at>
156 * c-attribs.cc (build_attr_access_from_parms): Split loop to first
157 record all parameters.
159 2023-05-18 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
161 * c-ada-spec.cc (has_static_fields): Use _P() defines from tree.h.
162 (dump_ada_declaration): Ditto.
163 (dump_ada_structure): Ditto.
164 * c-common.cc (unsafe_conversion_p): Ditto.
165 (shorten_compare): Ditto.
166 (pointer_int_sum): Ditto.
167 (c_common_truthvalue_conversion): Ditto.
168 (scalar_to_vector): Ditto.
169 * c-common.h (gnu_vector_type_p): Ditto.
170 * c-omp.cc (c_omp_depend_t_p): Ditto.
171 (c_omp_split_clauses): Ditto.
172 * c-ubsan.cc (ubsan_instrument_division): Ditto.
173 * c-warn.cc (conversion_warning): Ditto.
174 (warnings_for_convert_and_check): Ditto.
176 2023-05-18 Joseph Myers <joseph@codesourcery.com>
178 * c-format.cc (print_char_table): Handle %B like %b.
180 2023-05-15 Joseph Myers <joseph@codesourcery.com>
182 * c-lex.cc (c_common_has_attribute): Use 202311 as
183 __has_c_attribute return for all C2x attributes.
185 2023-05-15 Patrick Palka <ppalka@redhat.com>
187 * c-cppbuiltin.cc (c_cpp_builtins): Predefine __cpp_auto_cast
190 2023-05-01 Marek Polacek <polacek@redhat.com>
192 * c-ubsan.cc (ubsan_maybe_instrument_array_ref): Don't copy_node.
194 2023-03-28 David Malcolm <dmalcolm@redhat.com>
197 * c-common.h (check_for_xor_used_as_pow): Add "rhs_loc" param.
198 * c-warn.cc (check_for_xor_used_as_pow): Add "rhs_loc" param.
199 Reject cases where involving macro expansions.
201 2023-03-28 Jason Merrill <jason@redhat.com>
204 * c-common.cc (verify_tree): Don't use sequenced handling
207 2023-03-17 Jakub Jelinek <jakub@redhat.com>
210 * c-ubsan.cc (ubsan_instrument_division): Handle all scalar integral
211 types rather than just INTEGER_TYPE.
213 2023-03-10 Marek Polacek <polacek@redhat.com>
217 * c-gimplify.cc (ubsan_walk_array_refs_r): For a MODIFY_EXPR, instrument
218 the RHS before the LHS.
220 2023-03-04 Jakub Jelinek <jakub@redhat.com>
223 * c-warn.cc (warn_for_sign_compare): Don't warn for unset bits
224 above innermost zero extension of BIT_NOT_EXPR result.
226 2023-03-04 Jakub Jelinek <jakub@redhat.com>
229 * c-warn.cc (warn_for_sign_compare): If c_common_get_narrower
230 doesn't return a narrower result, use TYPE_UNSIGNED to set unsignedp0
231 and unsignedp1. For the one BIT_NOT_EXPR case vs. one without,
232 only check for constant in the non-BIT_NOT_EXPR operand, use std::swap
233 to simplify the code, only warn if BIT_NOT_EXPR operand is extended
234 from narrower unsigned, fix up computation of mask for the constant
235 cases and for unsigned other operand case handle differently
236 BIT_NOT_EXPR result being sign vs. zero extended.
238 2023-03-04 Jakub Jelinek <jakub@redhat.com>
241 * c-warn.cc: Include langhooks.h.
242 (maybe_warn_shift_overflow): Set type0 to what TREE_TYPE (op0)
243 promotes to rather than TREE_TYPE (op0) itself, if TREE_TYPE (op0)
244 is narrower than type0 and unsigned, use wi::min_precision with
245 UNSIGNED and fold_convert op0 to type0 before emitting the warning.
247 2023-03-03 Alexandre Oliva <oliva@adacore.com>
249 * c-common.cc (c_common_nodes_and_builtins): Take
250 wchar_type_node for wint_type_node when aliased.
251 (c_stddef_cpp_builtins): Define __WINT_TYPE__, when aliased to
252 wchar_t, to the underlying type rather than wchar_t in
254 * c-cppbuiltin.cc (type_suffix): Handle wchar_type_node.
256 2023-02-28 Marek Polacek <polacek@redhat.com>
259 * c-warn.cc (check_address_or_pointer_of_packed_member): Check
262 2023-02-28 Jakub Jelinek <jakub@redhat.com>
265 * c-common.h (c_strict_flex_array_level_of): Declare.
266 * c-common.cc (c_strict_flex_array_level_of): New function,
267 moved and renamed from c-decl.cc's strict_flex_array_level_of.
268 * c-ubsan.cc (ubsan_instrument_bounds): Fix comment typo. For
269 C check c_strict_flex_array_level_of whether a trailing array
270 should be treated as flexible member like. Handle C [0] arrays.
271 Add 1 + index_off_by_one rather than index_off_by_one to bounds
272 and use tree_int_cst_lt rather than tree_int_cst_le for idx vs.
275 2023-02-23 Jakub Jelinek <jakub@redhat.com>
277 PR translation/108890
278 * c.opt (fcontracts): Fix description.
280 2023-02-22 Marek Polacek <polacek@redhat.com>
283 * c-gimplify.cc (c_genericize_control_stmt) <case STATEMENT_LIST>: Pass
285 (c_genericize): Call walk_tree with an explicit pset.
287 2023-02-18 Martin Uecker <uecker@tugraz.at>
290 * c-attribs.cc (append_access_attr): Use order of arguments when
292 (append_access_attr_idxs): Rename and make static.
293 * c-warn.cc (warn_parm_array_mismatch): Add assertion.
295 2023-02-16 Patrick Palka <ppalka@redhat.com>
297 * c-common.h: Mechanically drop static from static inline
298 functions via s/^static inline/inline/g.
300 2023-02-01 Jason Merrill <jason@redhat.com>
302 * c.opt: Add -Wno-changes-meaning.
304 2023-01-31 Marek Polacek <polacek@redhat.com>
308 * c-common.h (instantiation_dependent_expression_p): Declare.
309 * c-warn.cc (warn_duplicated_cond_add_or_warn): If the condition
310 is dependent, invalidate the chain.
312 2023-01-26 Marek Polacek <polacek@redhat.com>
315 * c-pragma.cc (handle_pragma_message): Warn for CPP_STRING_USERDEF.
317 2023-01-18 Marek Polacek <polacek@redhat.com>
320 * c-common.cc (check_case_value): Check INTEGRAL_TYPE_P.
322 2023-01-14 Jakub Jelinek <jakub@redhat.com>
325 * c-common.h (may_shorten_divmod): New static inline function.
327 2023-01-13 Eric Botcazou <ebotcazou@adacore.com>
329 * c-ada-spec.cc (is_float32): New function.
330 (is_float64): Likewise.
331 (is_float128): Tweak.
332 (dump_ada_node) <REAL_TYPE>: Call them to recognize more types.
334 2023-01-12 Lewis Hyatt <lhyatt@gmail.com>
336 PR preprocessor/108244
337 * c-pragma.cc (c_register_pragma_1): Don't attempt to register any
338 deferred pragmas if -fdirectives-only.
339 (init_pragma): Likewise.
341 2023-01-09 Martin Liska <mliska@suse.cz>
344 * c-attribs.cc (handle_target_clones_attribute): Check for
345 string constant for all target_clone attribute values.
347 2023-01-03 Florian Weimer <fweimer@redhat.com>
349 * c-cppbuiltin.cc (c_cpp_builtins): Define
350 __LIBGCC_DWARF_CIE_DATA_ALIGNMENT__.
352 2023-01-03 Florian Weimer <fweimer@redhat.com>
355 2023-01-03 Florian Weimer <fweimer@redhat.com>
357 * c-cppbuiltin.cc (__LIBGCC_DWARF_REG_SIZES_CONSTANT__):
358 Define if constant is known.
360 2023-01-03 Florian Weimer <fweimer@redhat.com>
363 2023-01-02 Florian Weimer <fweimer@redhat.com>
365 * c-cppbuiltin.cc (c_cpp_builtins): Define
366 __LIBGCC_DWARF_CIE_DATA_ALIGNMENT__.
368 2023-01-02 Florian Weimer <fweimer@redhat.com>
370 * c-cppbuiltin.cc (c_cpp_builtins): Define
371 __LIBGCC_DWARF_CIE_DATA_ALIGNMENT__.
373 2023-01-02 Florian Weimer <fweimer@redhat.com>
375 * c-cppbuiltin.cc (__LIBGCC_DWARF_REG_SIZES_CONSTANT__):
376 Define if constant is known.
378 2022-12-19 Marek Polacek <polacek@redhat.com>
381 * c-format.cc (check_function_format): Use get_attribute_name.
383 2022-12-16 Qing Zhao <qing.zhao@oracle.com>
385 * c.opt (Wstrict-flex-arrays): New option.
387 2022-12-02 Andrew MacLeod <amacleod@redhat.com>
389 * c-attribs.cc (handle_deprecated_attribute): Use type when
392 2022-12-02 Jakub Jelinek <jakub@redhat.com>
395 * c-omp.cc (c_omp_is_loop_iterator): For range for with structured
396 binding return TREE_VEC_LENGTH (d->declv) even if decl is equal
397 to any of the structured binding decls.
399 2022-11-30 Iskander Shakirzyanov <iskander@ispras.ru>
400 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
403 * c-common.cc (fold_offsetof,
404 convert_vector_to_array_for_subscript): Use OPT_Warray_bounds_
405 instead of OPT_Warray_bounds.
407 2022-11-24 Jakub Jelinek <jakub@redhat.com>
409 * c.opt (fcontract-role=, fcontract-semantic=): Terminate descriptions
412 2022-11-23 Andrew Pinski <apinski@marvell.com>
413 Jakub Jelinek <jakub@redhat.com>
416 * c-gimplify.cc (c_genericize): Use walk_tree_without_duplicates
417 instead of walk_tree for c_genericize_control_r.
419 2022-11-23 Jakub Jelinek <jakub@redhat.com>
421 * c.opt (fcontract-assumption-mode=, fcontract-continuation-mode=,
422 fcontract-role=, fcontract-semantic=): Add RejectNegative.
423 (fcontract-build-level=): Terminate description with dot.
425 2022-11-19 Jakub Jelinek <jakub@redhat.com>
427 * c-cppbuiltin.cc (c_cpp_builtins): Bump __cpp_constexpr
428 value from 202207L to 202211L.
430 2022-11-19 Jeff Chapman II <jchapman@lock3software.com>
431 Andrew Sutton <asutton@lock3software.com>
432 Andrew Marmaduke <amarmaduke@lock3software.com>
433 Michael Lopez <mlopez@lock3software.com>
434 Jason Merrill <jason@redhat.com>
436 * c.opt: Add contracts flags.
437 * c-cppbuiltin.cc (c_cpp_builtins): Add contracts feature-test
440 2022-11-16 Marek Polacek <polacek@redhat.com>
443 * c-cppbuiltin.cc (c_cpp_builtins): Update value of __cpp_constexpr for
445 * c-opts.cc (c_common_post_options): Set warn_invalid_constexpr
446 depending on cxx_dialect.
447 * c.opt (Winvalid-constexpr): New option.
449 2022-11-16 Jakub Jelinek <jakub@redhat.com>
451 * c-common.def (CONCEPT_DECL): New tree, moved here from
453 * c-common.cc (c_common_init_ts): Handle CONCEPT_DECL.
454 * c-attribs.cc (handle_deprecated_attribute): Allow deprecated
455 attribute on CONCEPT_DECL.
457 2022-11-15 Lewis Hyatt <lhyatt@gmail.com>
459 * c-opts.cc (c_finish_options): Use special_fname_builtin () rather
460 than a hard-coded string.
462 2022-11-15 Jakub Jelinek <jakub@redhat.com>
464 * c-cppbuiltin.cc (c_cpp_builtins): Bump C++23
465 __cpp_multidimensional_subscript macro value to 202211L.
467 2022-11-15 Patrick Palka <ppalka@redhat.com>
470 * c-lex.cc (c_common_has_attribute): Return 1 for init_priority
471 iff SUPPORTS_INIT_PRIORITY.
473 2022-11-14 Martin Liska <mliska@suse.cz>
476 2022-11-09 Martin Liska <mliska@suse.cz>
478 * c-target.def: Port to RST.
480 2022-11-12 Joseph Myers <joseph@codesourcery.com>
482 * c-common.cc (c_common_reswords): Use D_C2X instead of D_CXXONLY.
484 2022-11-11 Jonathan Wakely <jwakely@redhat.com>
487 * c-pragma.cc (handle_pragma_ignore): New function.
488 (init_pragma): Register region and endregion pragmas.
490 2022-11-09 Martin Liska <mliska@suse.cz>
492 * c-target.def: Port to RST.
494 2022-11-05 Lewis Hyatt <lhyatt@gmail.com>
496 PR preprocessor/55971
497 * c-ppoutput.cc (adjust_for_newlines): Update comment.
499 2022-11-03 Jason Merrill <jason@redhat.com>
501 * c-opts.cc (c_common_post_options): -fconcepts no longer implies
502 -fconcepts-ts before C++20.
504 2022-10-28 Joseph Myers <joseph@codesourcery.com>
506 * c-common.cc (def_fn_type): Call build_function_type for
507 zero-argument variable-argument function.
508 (c_common_nodes_and_builtins): Build default_function_type with
510 * c.opt (fallow-parameterless-variadic-functions): Mark as ignored
513 2022-10-28 Joseph Myers <joseph@codesourcery.com>
516 * c-common.h (ENUM_UNDERLYING_TYPE, ENUM_FIXED_UNDERLYING_TYPE_P):
517 New. Moved from cp/cp-tree.h.
518 * c-warn.cc (warnings_for_convert_and_check): Do not consider
519 conversions to enum with underlying type bool to overflow.
521 2022-10-26 Marek Polacek <polacek@redhat.com>
524 * c.opt (Wdangling-reference): New.
526 2022-10-19 Joseph Myers <joseph@codesourcery.com>
528 * c-format.h (enum format_lengths): Add FMT_LEN_w8, FMT_LEN_w16,
529 FMT_LEN_w32, FMT_LEN_w64, FMT_LEN_wf8, FMT_LEN_wf16, FMT_LEN_wf32
531 (NOARGUMENTS, NOLENGTHS): Update definitions.
532 (T_I8, T2X_I8, T_I16, T2X_I16, T_I32, T2X_I32, T_I64, T2X_I64)
533 (T_U8, T2X_U8, T_U16, T2X_U16, T_U32, T2X_U32, T_U64, T2X_U64)
534 (T_IF8, T2X_IF8, T_IF16, T2X_IF16, T_IF32, T2X_IF32, T_IF64)
535 (T2X_IF64, T_UF8, T2X_UF8, T_UF16, T2X_UF16, T_UF32, T2X_UF32)
536 (T_UF64, T2X_UF64): New macros.
537 * c-format.cc (printf_length_specs, scanf_length_specs): Add wN
538 and wfN length modifiers.
539 (print_char_table, scan_char_table): Add entries using wN and wfN
542 2022-10-18 Joseph Myers <joseph@codesourcery.com>
545 * c-common.cc (c_common_type_for_size): Add fallback to
546 widest_unsigned_literal_type_node or
547 widest_integer_literal_type_node for precision that may not
548 exactly match the precision of those types.
550 2022-10-14 Jakub Jelinek <jakub@redhat.com>
552 * c-cppbuiltin.cc (c_cpp_builtins): If bfloat16_type_node,
553 predefine __BFLT16_*__ macros and for C++23 also
554 __STDCPP_BFLOAT16_T__. Predefine bfloat16_type_node related
555 macros for -fbuilding-libgcc.
556 * c-lex.cc (interpret_float): Handle CPP_N_BFLOAT16.
558 2022-10-14 Jakub Jelinek <jakub@redhat.com>
562 * c-common.def (EXCESS_PRECISION_EXPR): Remove comment part about
563 the tree being specific to C/ObjC.
564 * c-opts.cc (c_common_post_options): Handle flag_excess_precision
565 in C++ the same as in C.
566 * c-lex.cc (interpret_float): Set const_type to excess_precision ()
569 2022-10-13 Joseph Myers <joseph@codesourcery.com>
571 * c-cppbuiltin.cc (builtin_define_float_constants): Do not use
572 value 2 for *_IS_IEC_60559.
574 2022-10-12 Lewis Hyatt <lhyatt@gmail.com>
576 PR preprocessor/60014
577 PR preprocessor/60723
578 * c-ppoutput.cc (class token_streamer): Remove member
579 line_marker_emitted to...
580 (token_streamer::stream): ...a local variable here. Set
581 print.prev_was_system_token on all code paths.
583 2022-10-10 Nathan Sidwell <nathan@acm.org>
585 * c-opts.cc (c_common_post_options): Bump abi to 18.
587 2022-10-10 Marek Polacek <polacek@redhat.com>
590 * c-pretty-print.cc (pp_c_specifier_qualifier_list): Print only GNU
592 (c_pretty_printer::direct_abstract_declarator): Print the standard [[]]
594 (pp_c_attributes): Remove.
595 (pp_c_attributes_display): Print the [[]] form if appropriate. Use
596 get_attribute_name. Don't print a trailing space when printing the
598 * c-pretty-print.h (pp_c_attributes): Remove.
600 2022-10-07 Qing Zhao <qing.zhao@oracle.com>
602 * c-attribs.cc (handle_strict_flex_array_attribute): New function.
603 (c_common_attribute_table): New item for strict_flex_array.
604 * c.opt: (fstrict-flex-arrays): New option.
605 (fstrict-flex-arrays=): New option.
607 2022-10-07 Martin Liska <mliska@suse.cz>
609 * name-hint.h: Use std::move.
611 2022-10-07 Jakub Jelinek <jakub@redhat.com>
613 * c-common.cc (attribute_fallthrough_p): Lookup fallthrough attribute
614 only in gnu namespace or as standard attribute, treat fallthrough
615 attributes in other namespaces like any other unknown attribute.
617 2022-10-06 Joseph Myers <joseph@codesourcery.com>
619 * c-common.cc (c_common_reswords): Mark typeof as D_EXT11. Add
621 * c-common.h (enum rid): Add RID_TYPEOF_UNQUAL.
622 (D_EXT11): New macro. Values of subsequent macros updated.
624 2022-10-06 Jakub Jelinek <jakub@redhat.com>
627 * c-attribs.cc (handle_assume_attribute): New function.
628 (c_common_attribute_table): Add entry for assume attribute.
629 * c-lex.cc (c_common_has_attribute): Handle
630 __have_cpp_attribute (assume).
632 2022-10-04 Jakub Jelinek <jakub@redhat.com>
634 * c-omp.cc (c_omp_directives): Uncomment begin declare target
637 2022-10-03 Patrick Palka <ppalka@redhat.com>
639 * c-common.cc (c_common_reswords): Use RID_IS_SAME instead of
642 2022-10-03 Joseph Myers <joseph@codesourcery.com>
644 * c-cppbuiltin.cc (builtin_define_float_constants): Do not
645 special-case __*_EPSILON__ setting for IBM long double for C2x.
647 2022-09-30 Patrick Palka <ppalka@redhat.com>
649 * c-common.cc (c_common_reswords): Use cp/cp-trait.def to handle
651 * c-common.h (enum rid): Likewise.
653 2022-09-29 Joseph Myers <joseph@codesourcery.com>
655 * c-lex.cc (c_common_has_attribute): Handle noreturn attribute for
658 2022-09-29 Patrick Palka <ppalka@redhat.com>
660 * c-common.cc (c_common_reswords): Add __remove_cv,
661 __remove_reference and __remove_cvref.
662 * c-common.h (enum rid): Add RID_REMOVE_CV, RID_REMOVE_REFERENCE
663 and RID_REMOVE_CVREF.
665 2022-09-27 Marek Polacek <polacek@redhat.com>
669 * c-cppbuiltin.cc (c_cpp_builtins): Define __cpp_implicit_move.
671 2022-09-27 Marek Polacek <polacek@redhat.com>
673 * c-format.cc (c_keywords): Drop nothrow.
675 2022-09-27 Jakub Jelinek <jakub@redhat.com>
678 * c-cppbuiltin.cc (c_cpp_builtins): Predefine
679 __cpp_static_call_operator=202207L for C++23.
681 2022-09-27 Jakub Jelinek <jakub@redhat.com>
683 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_ASSUME,
684 PRAGMA_OMP_ASSUMES and PRAGMA_OMP_BEGIN. Rename
685 PRAGMA_OMP_END_DECLARE_TARGET to PRAGMA_OMP_END.
686 * c-pragma.cc (omp_pragmas): Add assumes and begin.
687 For end rename PRAGMA_OMP_END_DECLARE_TARGET to PRAGMA_OMP_END.
688 (omp_pragmas_simd): Add assume.
689 * c-common.h (c_omp_directives): Declare.
690 * c-omp.cc (omp_directives): Rename to ...
691 (c_omp_directives): ... this. No longer static. Uncomment
692 assume, assumes, begin assumes and end assumes entries.
693 In end declare target entry rename PRAGMA_OMP_END_DECLARE_TARGET
695 (c_omp_categorize_directive): Adjust for omp_directives to
696 c_omp_directives renaming.
698 2022-09-27 Jakub Jelinek <jakub@redhat.com>
702 * c-common.cc (c_common_reswords): Change _Float{16,32,64,128} and
703 _Float{32,64,128}x flags from D_CONLY to 0.
704 (shorten_binary_op): Punt if common_type returns error_mark_node.
705 (shorten_compare): Likewise.
706 (c_common_nodes_and_builtins): For C++ record _Float{16,32,64,128}
707 and _Float{32,64,128}x builtin types if available. For C++
708 clear float128t_type_node.
709 * c-cppbuiltin.cc (c_cpp_builtins): Predefine
710 __STDCPP_FLOAT{16,32,64,128}_T__ for C++23 if supported.
711 * c-lex.cc (interpret_float): For q/Q suffixes prefer
712 float128t_type_node over float128_type_node. Allow
713 {f,F}{16,32,64,128} suffixes for C++ if supported with pedwarn
714 for C++20 and older. Allow {f,F}{32,64,128}x suffixes for C++
715 with pedwarn. Don't call excess_precision_type for C++.
717 2022-09-26 Marek Polacek <polacek@redhat.com>
720 * c-cppbuiltin.cc (c_cpp_builtins): Update value of __cpp_char8_t
723 2022-09-23 Marek Polacek <polacek@redhat.com>
726 * c-common.cc (c_common_reswords): Add __is_convertible and
727 __is_nothrow_convertible.
728 * c-common.h (enum rid): Add RID_IS_CONVERTIBLE and
729 RID_IS_NOTHROW_CONVERTIBLE.
731 2022-09-22 David Malcolm <dmalcolm@redhat.com>
734 * c-warn.cc (check_for_xor_used_as_pow): Don't try checking
735 values that don't fit in uhwi.
737 2022-09-15 Richard Biener <rguenther@suse.de>
739 * c-common.h (build_void_list_node): Remove.
740 * c-common.cc (c_common_nodes_and_builtins): Do not initialize
743 2022-09-09 Jan-Benedict Glaw <jbglaw@lug-owl.de>
745 * c-format.cc (convert_format_name_to_system_name): Fix warning.
747 2022-09-07 Joseph Myers <joseph@codesourcery.com>
749 * c-common.cc (c_common_reswords): Use D_C2X instead of D_CXXONLY
750 for alignas, alignof, bool, false, static_assert, thread_local and
753 2022-09-07 Jakub Jelinek <jakub@redhat.com>
755 * c.opt (Winvalid-utf8): Use ObjC instead of objC. Remove
756 " in comments" from description.
757 (Wunicode): New option.
759 2022-09-06 Jakub Jelinek <jakub@redhat.com>
762 * c-omp.cc (c_omp_split_clauses): Handle OMP_CLAUSE_DOACROSS.
764 2022-09-03 Jakub Jelinek <jakub@redhat.com>
766 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_DOACROSS.
767 * c-omp.cc (c_finish_omp_depobj): Check also for OMP_CLAUSE_DOACROSS
768 clause and diagnose it. Don't handle OMP_CLAUSE_DEPEND_SOURCE and
769 OMP_CLAUSE_DEPEND_SINK. Assert kind is not OMP_CLAUSE_DEPEND_INVALID.
771 2022-09-02 David Malcolm <dmalcolm@redhat.com>
774 * c-common.h (check_for_xor_used_as_pow): New decl.
775 * c-lex.cc (c_lex_with_flags): Add DECIMAL_INT to flags as appropriate.
776 * c-warn.cc (check_for_xor_used_as_pow): New.
777 * c.opt (Wxor-used-as-pow): New.
779 2022-09-01 Jason Merrill <jason@redhat.com>
781 * c-common.cc (c_common_nodes_and_builtins): Set TREE_STRING_FLAG on
783 (braced_list_to_string): Check for char-sized elements.
785 2022-09-01 Jakub Jelinek <jakub@redhat.com>
788 * c.opt (-Winvalid-utf8): New warning.
789 * c-opts.cc (c_common_handle_option) <case OPT_finput_charset_>:
790 Set cpp_opts->cpp_input_charset_explicit.
791 (c_common_post_options): If -finput-charset=UTF-8 is explicit
792 in C++23, enable -Winvalid-utf8 by default and if -pedantic
793 or -pedantic-errors, make it a pedwarn.
795 2022-08-31 Joseph Myers <joseph@codesourcery.com>
797 * c-attribs.cc (handle_deprecated_attribute): Check and pedwarn
799 * c-common.cc (c_add_case_label): Add argument ATTRS. Call
801 * c-common.h (do_case, c_add_case_label): Update declarations.
802 * c-lex.cc (c_common_has_attribute): For C, produce a result of
803 201910 for fallthrough and 202106 for maybe_unused.
805 2022-08-26 Marek Polacek <polacek@redhat.com>
808 * c.opt (Wself-move): New option.
810 2022-08-26 Jakub Jelinek <jakub@redhat.com>
812 * c-common.cc (check_builtin_function_arguments): Handle
813 BUILT_IN_ISSIGNALING.
815 2022-08-26 Jakub Jelinek <jakub@redhat.com>
818 * c-cppbuiltin.cc (c_cpp_builtins): Predefine
819 __cpp_named_character_escapes to 202207L.
821 2022-08-25 Marek Polacek <polacek@redhat.com>
823 * c-common.cc (c_common_reswords): Enable nullptr in C2X.
824 (c_common_nodes_and_builtins): Create the built-in node for nullptr.
825 * c-common.h (enum c_tree_index): Add CTI_NULLPTR, CTI_NULLPTR_TYPE.
826 (struct c_common_resword): Resize the disable member.
828 (nullptr_node): Define.
829 (nullptr_type_node): Define.
830 (NULLPTR_TYPE_P): Define.
831 * c-pretty-print.cc (c_pretty_printer::simple_type_specifier): Handle
833 (c_pretty_printer::direct_abstract_declarator): Likewise.
834 (c_pretty_printer::constant): Likewise.
836 2022-08-16 Tom Honermann <tom@honermann.net>
839 * c-opts.cc (c_common_post_options): Disable -Wc++20-compat
840 diagnostics in C++20 and later.
841 * c.opt (Wc++20-compat): Enable hooks for the preprocessor.
843 2022-08-11 Marek Polacek <polacek@redhat.com>
846 * c-gimplify.cc (c_gimplify_expr) <case DECL_EXPR>: Don't call
847 suppress_warning here.
849 2022-08-08 Tom Honermann <tom@honermann.net>
851 PR preprocessor/106426
852 * c-opts.cc (c_common_post_options): Assign cpp_opts->unsigned_utf8char
853 subject to -fchar8_t, -fsigned-char, and/or -funsigned-char.
855 2022-08-08 Tom Honermann <tom@honermann.net>
857 * c-lex.cc (lex_string, lex_charconst): Use char8_t as the type
858 of CPP_UTF8CHAR and CPP_UTF8STRING when char8_t support is
860 * c-opts.cc (c_common_post_options): Set flag_char8_t if
863 2022-07-31 Lewis Hyatt <lhyatt@gmail.com>
866 * c-common.h: Rename global done_lexing to
867 override_libcpp_locations.
868 * c-common.cc (c_cpp_diagnostic): Likewise.
869 * c-opts.cc (c_common_finish): Set override_libcpp_locations
870 (formerly done_lexing) immediately prior to calling cpp_finish ().
872 2022-07-27 Lewis Hyatt <lhyatt@gmail.com>
874 * c-ppoutput.cc (token_streamer::stream): Update input_location
875 prior to streaming each token.
877 2022-07-23 Immad Mir <mirimmad@outlook.com>
879 * c-attribs.cc: (c_common_attribute_table): add three new attributes
880 namely: fd_arg, fd_arg_read and fd_arg_write.
881 (handle_fd_arg_attribute): New.
883 2022-07-15 Marek Polacek <polacek@redhat.com>
886 * c-common.cc (c_common_reswords): Add
887 __reference_constructs_from_temporary and
888 __reference_converts_from_temporary.
889 * c-common.h (enum rid): Add RID_REF_CONSTRUCTS_FROM_TEMPORARY and
890 RID_REF_CONVERTS_FROM_TEMPORARY.
892 2022-07-15 Jonathan Wakely <jwakely@redhat.com>
894 * c-format.cc (class range_label_for_format_type_mismatch):
895 Adjust to new label_text API.
897 2022-07-11 Lewis Hyatt <lhyatt@gmail.com>
899 PR preprocessor/106252
900 * c-pragma.cc (handle_pragma_diagnostic_impl): Don't look up the
901 option argument prior to verifying the option was found.
903 2022-07-07 David Malcolm <dmalcolm@redhat.com>
905 * c-format.cc (range_label_for_format_type_mismatch::get_text):
906 Update for removal of label_text::maybe_free in favor of automatic
909 2022-07-06 Lewis Hyatt <lhyatt@gmail.com>
911 PR preprocessor/53920
913 * c-common.cc (c_option_is_from_cpp_diagnostics): New function.
914 * c-common.h (c_option_is_from_cpp_diagnostics): Declare.
915 (c_pp_stream_token): Declare.
916 * c-ppoutput.cc (init_pp_output): Refactor logic about skipping
918 (should_output_pragmas): ...here. New function.
919 (token_streamer::stream): Support handling early pragmas.
920 (do_line_change): Likewise.
921 (c_pp_stream_token): New function.
922 * c-pragma.cc (struct pragma_diagnostic_data): New helper class.
923 (pragma_diagnostic_lex_normal): New function. Moved logic for
924 interpreting GCC diagnostic pragmas here.
925 (pragma_diagnostic_lex_pp): New function for parsing diagnostic pragmas
926 directly from libcpp.
927 (handle_pragma_diagnostic): Refactor into helper function...
928 (handle_pragma_diagnostic_impl): ...here. New function.
929 (handle_pragma_diagnostic_early): New function.
930 (handle_pragma_diagnostic_early_pp): New function.
931 (struct pragma_ns_name): Renamed to...
932 (struct pragma_pp_data): ...this. Add new "early_handler" member.
933 (c_register_pragma_1): Support early pragmas in the preprocessor.
934 (c_register_pragma_with_early_handler): New function.
935 (c_register_pragma): Support the new early handlers in struct
936 internal_pragma_handler.
937 (c_register_pragma_with_data): Likewise.
938 (c_register_pragma_with_expansion): Likewise.
939 (c_register_pragma_with_expansion_and_data): Likewise.
940 (c_invoke_early_pragma_handler): New function.
941 (c_pp_invoke_early_pragma_handler): New function.
942 (init_pragma): Add early pragma support for diagnostic pragmas.
943 * c-pragma.h (struct internal_pragma_handler): Add new early handler
945 (c_register_pragma_with_early_handler): Declare.
946 (c_invoke_early_pragma_handler): Declare.
947 (c_pp_invoke_early_pragma_handler): Declare.
949 2022-07-05 Marek Polacek <polacek@redhat.com>
952 * c-format.cc (check_format_arg): Don't emit -Wformat warnings with
955 2022-07-01 Marek Polacek <polacek@redhat.com>
958 * c-common.h (enum rid): Update RID_LAST_CXX20.
960 2022-06-30 Jonathan Wakely <jwakely@redhat.com>
962 * known-headers.cc (get_stdlib_header_for_name): Add <time.h>
965 2022-06-24 Jason Merrill <jason@redhat.com>
969 * c.opt (Woverloaded-virtual): Add levels, include in -Wall.
971 2022-06-18 Jakub Jelinek <jakub@redhat.com>
973 * c-ubsan.cc (ubsan_instrument_division, ubsan_instrument_shift):
974 Use flag_sanitize_trap & SANITIZE_??? instead of
975 flag_sanitize_undefined_trap_on_error. If 2 sanitizers are involved
976 and flag_sanitize_trap differs for them, emit __builtin_trap only
977 for the comparison where trap is requested.
978 (ubsan_instrument_vla, ubsan_instrument_return): Use
979 lag_sanitize_trap & SANITIZE_??? instead of
980 flag_sanitize_undefined_trap_on_error.
982 2022-06-13 Jason Merrill <jason@redhat.com>
984 * c-ubsan.cc (ubsan_instrument_return): Use BUILTINS_LOCATION.
986 2022-05-27 Marek Polacek <polacek@redhat.com>
989 * c-attribs.cc (get_priority): Check FUNCTION_DECL.
991 2022-05-27 Jakub Jelinek <jakub@redhat.com>
993 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ENTER.
995 2022-05-20 David Malcolm <dmalcolm@redhat.com>
997 * c-format.cc: Replace uses of "FINAL" and "OVERRIDE" with "final"
999 * c-pretty-print.h: Likewise.
1001 2022-05-18 Marek Polacek <polacek@redhat.com>
1004 * c.opt (Wenum-int-mismatch): New.
1006 2022-05-18 Marek Polacek <polacek@redhat.com>
1009 * c-warn.cc (c_do_switch_warnings): Don't warn about unhandled
1010 enumerator when it was marked with attribute unused.
1012 2022-05-18 Eric Botcazou <ebotcazou@adacore.com>
1014 * c-ada-spec.cc (dump_ada_node) <COMPLEX_TYPE>: Deal with usual
1015 floating-point complex types.
1016 <POINTER_TYPE>: Do not use limited_with clause if the designated
1017 type is a scalar type.
1019 2022-05-17 Jakub Jelinek <jakub@redhat.com>
1021 * c-omp.cc (c_finish_omp_depobj): Handle
1022 OMP_CLAUSE_DEPEND_INOUTSET.
1024 2022-05-16 Jason Merrill <jason@redhat.com>
1027 * c-attribs.cc (handle_mode_attribute): Don't fix broken typedefs
1030 2022-05-16 Martin Liska <mliska@suse.cz>
1032 * c-common.cc (ARRAY_SIZE): Use ARRAY_SIZE.
1033 (c_common_nodes_and_builtins): Likewise.
1034 * c-format.cc (check_tokens): Likewise.
1035 (check_plain): Likewise.
1036 * c-pragma.cc (c_pp_lookup_pragma): Likewise.
1037 (init_pragma): Likewise.
1038 * known-headers.cc (get_string_macro_hint): Likewise.
1039 (get_stdlib_header_for_name): Likewise.
1040 * c-attribs.cc: Likewise.
1042 2022-05-13 Richard Biener <rguenther@suse.de>
1044 * c-omp.cc: Remove gimple-fold.h include.
1046 2022-05-12 Jakub Jelinek <jakub@redhat.com>
1048 * c-common.h (enum rid): Add RID_OMP_ALL_MEMORY.
1049 * c-omp.cc (c_finish_omp_depobj): Don't build_fold_addr_expr
1050 if null_pointer_node.
1052 2022-05-11 Martin Liska <mliska@suse.cz>
1055 * c-opts.cc (c_common_handle_option): Change option name.
1056 * c.opt: Remove Joined and use Separate option.
1058 2022-05-09 Alex Coplan <alex.coplan@arm.com>
1060 * c-common.h (get_dump_info): Delete.
1061 * c-gimplify.cc (c_genericize): Get TDI_original dump file info
1062 from the global dump_manager instead of the (now obsolete)
1064 * c-opts.cc (original_dump_file): Delete.
1065 (original_dump_flags): Delete.
1066 (c_common_parse_file): Switch to using global dump_manager to
1067 manage the original dump file; fix leak of dump file.
1068 (get_dump_info): Delete.
1070 2022-05-07 Marek Polacek <polacek@redhat.com>
1074 * c-attribs.cc (positional_argument): Pass POS by reference. Deal
1075 with FN being either a function declaration or function type. Use
1076 maybe_adjust_arg_pos_for_attribute.
1077 * c-common.cc (check_function_arguments): Maybe pass FNDECL down to
1078 check_function_format.
1079 * c-common.h (maybe_adjust_arg_pos_for_attribute): Declare.
1080 (positional_argument): Adjust.
1081 * c-format.cc (get_constant): Rename to ...
1082 (validate_constant): ... this. Take EXPR by reference. Return bool
1084 (handle_format_arg_attribute): Don't overwrite FORMAT_NUM_EXPR by the
1085 return value of validate_constant.
1086 (decode_format_attr): Don't overwrite FORMAT_NUM_EXPR and
1087 FIRST_ARG_NUM_EXPR by the return value of validate_constant.
1088 (check_function_format): Adjust a parameter name.
1089 (handle_format_attribute): Maybe pass FNDECL down to decode_format_attr.
1091 2022-05-04 Marek Polacek <polacek@redhat.com>
1093 * c-warn.cc (warnings_for_convert_and_check): Convert constants of type
1096 2022-04-30 Jason Merrill <jason@redhat.com>
1099 * c-attribs.cc (handle_mode_attribute): Copy attributes, aligned,
1101 * c-common.cc (set_underlying_type): Add assert.
1103 2022-04-26 Patrick Palka <ppalka@redhat.com>
1106 * c-common.cc (verify_tree) [restart]: Move up to before the
1109 2022-04-11 Jakub Jelinek <jakub@redhat.com>
1112 * c-common.cc (c_common_nodes_and_builtins): After registering __int%d
1113 and __int%d__ builtin types, initialize corresponding ridpointers
1116 2022-03-30 Marek Polacek <polacek@redhat.com>
1119 * c-warn.cc (conversion_warning) <case COND_EXPR>: Don't call
1120 conversion_warning when OP1 is null.
1122 2022-03-30 Thomas Schwinge <thomas@codesourcery.com>
1124 * c.opt (Wc++11-extensions, Wc++14-extensions, Wc++17-extensions)
1125 (Wc++20-extensions, Wc++23-extensions): Remove 'LangEnabledBy'
1128 2022-03-30 Thomas Schwinge <thomas@codesourcery.com>
1130 * c.opt (Wuse-after-free): Remove.
1132 2022-03-30 Thomas Schwinge <thomas@codesourcery.com>
1134 * c.opt (Warray-bounds): Remove.
1136 2022-03-26 Thomas Schwinge <thomas@codesourcery.com>
1138 * c.opt: Properly quote comment.
1140 2022-03-25 Eric Botcazou <ebotcazou@adacore.com>
1142 * c-ada-spec.cc (dump_ada_import): Deal with the "section" attribute
1143 (dump_ada_node) <POINTER_TYPE>: Do not modify and pass the name, but
1144 the referenced type instead. Deal with the anonymous original type
1145 of a typedef'ed type. In the actual access case, follow the chain
1146 of external subtypes.
1147 <TYPE_DECL>: Tidy up control flow.
1149 2022-03-21 Qian Jianhua <qianjh@cn.fujitsu.com>
1151 * c-ada-spec.cc: Change array length
1153 2022-03-19 Arthur Cohen <arthur.cohen@embecosm.com>
1155 * c-common.cc (c_family_tests): Call the new tests.
1156 * c-common.h (c_diagnostic_tests): Declare.
1157 (c_opt_problem_cc_tests): Likewise.
1159 2022-03-19 Jakub Jelinek <jakub@redhat.com>
1162 * c-pretty-print.cc (c_fold_indirect_ref_for_warn): For C++ don't
1163 return COMPONENT_REFs with FIELD_DECLs whose containing scope can't
1166 2022-03-16 Christophe Lyon <christophe.lyon@arm.com>
1167 Roger Sayle <roger@nextmovesoftware.com>
1170 * c-attribs.cc (decl_or_type_attrs): Add error_mark_node check.
1172 2022-03-16 Patrick Palka <ppalka@redhat.com>
1175 * c.opt: Add -ffold-simple-inlines.
1177 2022-03-13 Tobias Burnus <tobias@codesourcery.com>
1179 * c-target.def (check_string_object_format_arg): Fix description typo.
1181 2022-03-12 Thomas Schwinge <thomas@codesourcery.com>
1184 * c-common.h (c_omp_map_clause_name): Remove.
1185 * c-omp.cc (c_omp_map_clause_name): Remove.
1187 2022-03-09 Jakub Jelinek <jakub@redhat.com>
1190 * c-opts.cc (c_common_post_options): Don't enable
1191 -Wshift-negative-value from -Wextra for C++20 or later.
1192 * c-ubsan.cc (ubsan_instrument_shift): Adjust comments.
1193 * c-warn.cc (maybe_warn_shift_overflow): Use TYPE_OVERFLOW_WRAPS
1194 instead of TYPE_UNSIGNED.
1196 2022-03-07 Jakub Jelinek <jakub@redhat.com>
1198 * c-attribs.cc: Fix up duplicated word issue in a comment.
1200 2022-03-01 Martin Liska <mliska@suse.cz>
1203 * c-attribs.cc (handle_target_clones_attribute): Use
1204 get_target_clone_attr_len and report warning soon.
1206 2022-02-17 Jonathan Wakely <jwakely@redhat.com>
1208 * c-pragma.cc (handle_pragma_pack): Remove parameter name.
1209 (handle_pragma_weak): Likewise.
1210 (handle_pragma_scalar_storage_order): Likewise.
1211 (handle_pragma_redefine_extname): Likewise.
1212 (handle_pragma_visibility): Likewise.
1213 (handle_pragma_diagnostic): Likewise.
1214 (handle_pragma_target): Likewise.
1215 (handle_pragma_optimize): Likewise.
1216 (handle_pragma_push_options): Likewise.
1217 (handle_pragma_pop_options): Likewise.
1218 (handle_pragma_reset_options): Likewise.
1219 (handle_pragma_message): Likewise.
1220 (handle_pragma_float_const_decimal64): Likewise.
1222 2022-02-16 Jakub Jelinek <jakub@redhat.com>
1225 * c-omp.cc (c_finish_omp_atomic): For MIN_EXPR/MAX_EXPR, try first
1226 build_binary_op with LT_EXPR and only if that doesn't return
1227 error_mark_node call build_modify_expr.
1229 2022-02-16 Jakub Jelinek <jakub@redhat.com>
1232 * c-common.cc (shorten_compare): Convert original arguments to
1233 the original *restype_ptr when mixing binary and decimal float.
1235 2022-02-14 Richard Biener <rguenther@suse.de>
1238 * c-pretty-print.cc (c_pretty_printer::postfix_expression): Handle
1239 internal function calls.
1241 2022-02-11 Richard Biener <rguenther@suse.de>
1243 * c-attribs.cc (c_common_attribute_table): Add entry for
1245 (handle_vector_mask_attribute): New.
1247 2022-02-10 Marcel Vollweiler <marcel@codesourcery.com>
1249 * c-omp.cc (c_omp_split_clauses): Added OMP_CLAUSE_HAS_DEVICE_ADDR case.
1250 * c-pragma.h (enum pragma_kind): Added 5.1 in comment.
1251 (enum pragma_omp_clause): Added PRAGMA_OMP_CLAUSE_HAS_DEVICE_ADDR.
1253 2022-02-09 Jason Merrill <jason@redhat.com>
1255 * c-cppbuiltin.cc (c_cpp_builtins): Update values
1256 of __cpp_constexpr and __cpp_concepts for C++20.
1258 2022-01-24 Marek Polacek <polacek@redhat.com>
1260 PR preprocessor/104030
1261 * c.opt (Wbidi-chars): Mark as EnumSet. Also accept =ucn.
1263 2022-01-21 Jakub Jelinek <jakub@redhat.com>
1266 * c-common.h (check_function_arguments_recurse): Add for_format
1268 * c-common.cc (check_function_nonnull): Pass false to
1269 check_function_arguments_recurse's last argument.
1270 (check_function_arguments_recurse): Add for_format argument,
1271 if true, don't stop on warning_suppressed_p.
1272 * c-format.cc (check_format_info): Pass true to
1273 check_function_arguments_recurse's last argument.
1275 2022-01-19 David Malcolm <dmalcolm@redhat.com>
1277 * c-common.cc (c_common_c_tests): Rename to...
1278 (c_common_cc_tests): ...this.
1279 (c_family_tests): Update calls for .c to .cc renaming.
1280 * c-common.h (c_format_c_tests): Rename to...
1281 (c_format_cc_tests): ...this.
1282 (c_indentation_c_tests): Rename to...
1283 (c_indentation_cc_tests): ...this.
1284 (c_pretty_print_c_tests): Rename to...
1285 (c_pretty_print_cc_tests): ...this.
1286 * c-format.cc (c_format_c_tests): Rename to...
1287 (c_format_cc_tests): ...this.
1288 * c-indentation.cc (c_indentation_c_tests): Rename to...
1289 (c_indentation_cc_tests): ...this.
1290 * c-pretty-print.cc (c_pretty_print_c_tests): Rename to...
1291 (c_pretty_print_cc_tests): ...this.
1293 2022-01-17 Martin Liska <mliska@suse.cz>
1295 * c-ada-spec.cc: Rename .c names to .cc.
1296 * c-ada-spec.h: Likewise.
1297 * c-common.cc (c_build_vec_convert): Likewise.
1298 (warning_candidate_p): Likewise.
1299 * c-common.h (enum rid): Likewise.
1300 (build_real_imag_expr): Likewise.
1301 (finish_label_address_expr): Likewise.
1302 (c_get_substring_location): Likewise.
1303 (c_build_bind_expr): Likewise.
1304 (conflict_marker_get_final_tok_kind): Likewise.
1305 (c_parse_error): Likewise.
1306 (check_missing_format_attribute): Likewise.
1307 (invalid_array_size_error): Likewise.
1308 (warn_for_multistatement_macros): Likewise.
1309 (build_attr_access_from_parms): Likewise.
1310 * c-cppbuiltin.cc (c_cpp_builtins): Likewise.
1311 * c-format.cc: Likewise.
1312 * c-gimplify.cc (c_gimplify_expr): Likewise.
1313 * c-indentation.h: Likewise.
1314 * c-objc.h (objc_prop_attr_kind_for_rid): Likewise.
1315 * c-omp.cc (c_omp_predetermined_mapping): Likewise.
1316 * c-opts.cc (c_common_post_options): Likewise.
1317 (set_std_cxx23): Likewise.
1318 * c-pragma.cc (handle_pragma_redefine_extname): Likewise.
1319 * c-pretty-print.h: Likewise.
1321 2022-01-17 Martin Liska <mliska@suse.cz>
1323 * c-ada-spec.c: Moved to...
1324 * c-ada-spec.cc: ...here.
1325 * c-attribs.c: Moved to...
1326 * c-attribs.cc: ...here.
1327 * c-common.c: Moved to...
1328 * c-common.cc: ...here.
1329 * c-cppbuiltin.c: Moved to...
1330 * c-cppbuiltin.cc: ...here.
1331 * c-dump.c: Moved to...
1332 * c-dump.cc: ...here.
1333 * c-format.c: Moved to...
1334 * c-format.cc: ...here.
1335 * c-gimplify.c: Moved to...
1336 * c-gimplify.cc: ...here.
1337 * c-indentation.c: Moved to...
1338 * c-indentation.cc: ...here.
1339 * c-lex.c: Moved to...
1340 * c-lex.cc: ...here.
1341 * c-omp.c: Moved to...
1342 * c-omp.cc: ...here.
1343 * c-opts.c: Moved to...
1344 * c-opts.cc: ...here.
1345 * c-pch.c: Moved to...
1346 * c-pch.cc: ...here.
1347 * c-ppoutput.c: Moved to...
1348 * c-ppoutput.cc: ...here.
1349 * c-pragma.c: Moved to...
1350 * c-pragma.cc: ...here.
1351 * c-pretty-print.c: Moved to...
1352 * c-pretty-print.cc: ...here.
1353 * c-semantics.c: Moved to...
1354 * c-semantics.cc: ...here.
1355 * c-ubsan.c: Moved to...
1356 * c-ubsan.cc: ...here.
1357 * c-warn.c: Moved to...
1358 * c-warn.cc: ...here.
1359 * cppspec.c: Moved to...
1360 * cppspec.cc: ...here.
1361 * stub-objc.c: Moved to...
1362 * stub-objc.cc: ...here.
1364 2022-01-15 Martin Sebor <msebor@redhat.com>
1367 * c.opt (-Wdangling-pointer): New option.
1369 2022-01-15 Martin Sebor <msebor@redhat.com>
1371 PR tree-optimization/80532
1372 * c.opt (-Wuse-after-free): New options.
1374 2022-01-14 David Malcolm <dmalcolm@redhat.com>
1376 * c-attribs.c (c_common_attribute_table): Add "tainted_args".
1377 (handle_tainted_args_attribute): New.
1379 2022-01-13 Anthony Sharp <anthonysharp15@gmail.com>
1380 Jason Merrill <jason@redhat.com>
1383 * c.opt: Added -Wmissing-template-keyword.
1385 2022-01-13 Richard Biener <rguenther@suse.de>
1388 * c-common.c (c_common_mark_addressable_vec): Handle TARGET_EXPR.
1390 2022-01-12 Martin Liska <mliska@suse.cz>
1393 * c-attribs.c (handle_optimize_attribute): Do not call
1394 cl_optimization_compare if we seen an error.
1396 2022-01-11 Jakub Jelinek <jakub@redhat.com>
1400 * c-warn.c (conversion_warning): Handle BIT_AND_EXPR, BIT_IOR_EXPR
1403 2022-01-10 Richard Biener <rguenther@suse.de>
1405 PR middle-end/101530
1406 * c-common.c (c_build_shufflevector): Wrap the BIT_FIELD_REF
1407 in a TARGET_EXPR to force a temporary.
1409 2022-01-06 Marek Polacek <polacek@redhat.com>
1412 * c-pragma.c (handle_pragma_scalar_storage_order): Use %< %> in
1413 diagnostic messages.
1414 (handle_pragma_diagnostic): Likewise.
1416 2022-01-03 Marek Polacek <polacek@redhat.com>
1419 * c-format.c (check_tokens): Accept "decl-specifier*".
1421 2022-01-03 Jakub Jelinek <jakub@redhat.com>
1424 * c-attribs.c (handle_non_overlapping_attribute): New function.
1425 (c_common_attribute_table): Add "non overlapping" attribute.
1427 2021-12-30 Jakub Jelinek <jakub@redhat.com>
1430 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Perform
1431 cpp_define_unused/cpp_undef calls with forced token locations
1434 2021-12-27 Patrick Palka <ppalka@redhat.com>
1437 * c-common.c (pointer_int_sum): When quiet, return
1438 error_mark_node for an incomplete pointed-to type and don't
1439 call size_in_bytes_loc.
1441 2021-12-17 Jason Merrill <jason@redhat.com>
1444 * c-opts.c (c_common_post_options): Update defaults.
1446 2021-12-16 Martin Liska <mliska@suse.cz>
1449 * c-pragma.c (handle_pragma_pop_options): Do not check
1450 global options modification when an error is seen in parsing
1451 of options (pragmas or attributes).
1453 2021-12-12 Jonathan Wakely <jwakely@redhat.com>
1455 * known-headers.cc: Define INCLUDE_MEMORY instead of
1457 * name-hint.h: Likewise.
1458 (class name_hint): Use std::unique_ptr instead of gnu::unique_ptr.
1460 2021-12-09 Jakub Jelinek <jakub@redhat.com>
1463 * c-pch.c (c_common_no_more_pch): Pass a temporary void * var
1464 with NULL value instead of NULL to host_hooks.gt_pch_use_address.
1466 2021-12-03 Jakub Jelinek <jakub@redhat.com>
1469 * c-pch.c (struct c_pch_validity): Remove pch_init member.
1470 (pch_init): Don't initialize v.pch_init.
1471 (c_common_valid_pch): Don't warn and punt if .text addresses change.
1473 2021-12-01 Jason Merrill <jason@redhat.com>
1476 * c.opt: Add -fconstexpr-fp-except.
1478 2021-11-29 Richard Biener <rguenther@suse.de>
1480 * c-format.c (check_format_string): Remove spurious
1483 2021-11-29 Richard Biener <rguenther@suse.de>
1485 * c-opts.c (c_common_post_options): Remove unreachable return.
1486 * c-pragma.c (handle_pragma_target): Likewise.
1487 (handle_pragma_optimize): Likewise.
1489 2021-11-25 Jakub Jelinek <jakub@redhat.com>
1492 * c-opts.c (c_common_post_options): Enable -Wcomma-subscript by
1493 default for C++23 regardless of warn_deprecated.
1494 * c-cppbuiltin.c (c_cpp_builtins): Predefine
1495 __cpp_multidimensional_subscript=202110L for C++23.
1497 2021-11-23 Martin Sebor <msebor@redhat.com>
1500 * c.opt: Add -Winfinite-recursion.
1502 2021-11-19 Martin Sebor <msebor@redhat.com>
1506 * c-common.c (decl_with_nonnull_addr_p): Call maybe_nonzero_address
1507 and improve handling tof defined symbols.
1509 2021-11-19 Martin Liska <mliska@suse.cz>
1512 2021-11-18 Martin Liska <mliska@suse.cz>
1514 * c-gimplify.c (genericize_c_loop): Use option directly.
1516 2021-11-18 Matthias Kretz <m.kretz@gsi.de>
1518 * c-common.c (c_common_reswords): Add __builtin_assoc_barrier.
1519 * c-common.h (enum rid): Add RID_BUILTIN_ASSOC_BARRIER.
1521 2021-11-18 Martin Liska <mliska@suse.cz>
1523 * c-gimplify.c (genericize_c_loop): Use option directly.
1525 2021-11-17 Martin Uecker <uecker@gcc.gnu.org>
1529 * c-common.c (pointer_int_sum): Make sure pointer expressions
1530 are evaluated first when the size expression depends on for
1531 variably-modified types.
1533 2021-11-17 Marek Polacek <polacek@redhat.com>
1535 PR preprocessor/103026
1536 * c.opt (Wbidi-chars, Wbidi-chars=): New option.
1538 2021-11-16 Jason Merrill <jason@redhat.com>
1540 * c-common.c (release_tree_vector): Only cache vecs smaller than
1543 2021-11-15 Jason Merrill <jason@redhat.com>
1545 * c.opt: Add -fimplicit-constexpr.
1546 * c-cppbuiltin.c: Define __cpp_implicit_constexpr.
1547 * c-opts.c (c_common_post_options): Disable below C++14.
1549 2021-11-15 Jakub Jelinek <jakub@redhat.com>
1551 * c-omp.c (c_omp_split_clauses) <case OMP_CLAUSE_THREAD_LIMIT>:
1552 Duplicate to both OMP_TARGET and OMP_TEAMS.
1554 2021-11-10 Marek Polacek <polacek@redhat.com>
1557 * c-pragma.c (handle_pragma_diagnostic): Handle #pragma GCC diagnostic
1560 2021-11-09 David Malcolm <dmalcolm@redhat.com>
1562 * c-pragma.c (GCC_BAD_AT): New macro.
1563 (GCC_BAD2_AT): New macro.
1564 (handle_pragma_pack): Use the location of the pertinent token when
1565 issuing diagnostics about invalid constants/actions, and trailing
1567 (handle_pragma_target): Likewise for non-string "GCC option".
1568 (handle_pragma_message): Likewise for trailing junk.
1570 2021-11-03 Joseph Myers <joseph@codesourcery.com>
1573 * c-common.c (convert_and_check): Add argument init_const. Call
1574 convert_init if init_const.
1575 * c-common.h (convert_and_check): Update prototype.
1576 (convert_init): New prototype.
1578 2021-11-01 David Malcolm <dmalcolm@redhat.com>
1580 * c-lex.c (c_lex_with_flags): When complaining about non-printable
1581 CPP_OTHER tokens, set the "escape on output" flag.
1583 2021-10-27 Jakub Jelinek <jakub@redhat.com>
1585 * c-omp.c (c_omp_check_loop_iv_r): Don't clear 3rd bit for
1587 (c_omp_check_nonrect_loop_iv): Handle POINTER_PLUS_EXPR.
1588 (c_omp_check_loop_iv): Set kind even if the iterator is non-integral.
1590 2021-10-27 Jakub Jelinek <jakub@redhat.com>
1593 * c-common.h (c_omp_check_loop_iv_exprs): Add enum tree_code argument.
1594 * c-omp.c (c_omp_check_loop_iv_r): For trees other than decls,
1595 TREE_VEC, PLUS_EXPR, MINUS_EXPR, MULT_EXPR, POINTER_PLUS_EXPR or
1596 conversions temporarily clear the 3rd bit from d->kind while walking
1598 (c_omp_check_loop_iv_exprs): Add CODE argument. Or in 4 into data.kind
1599 if possibly non-rectangular.
1601 2021-10-21 Jakub Jelinek <jakub@redhat.com>
1604 * c-omp.c (c_omp_predefined_variable): Return true also for
1605 ubsan_create_data created artificial variables.
1607 2021-10-14 Joseph Myers <joseph@codesourcery.com>
1609 * c-format.c (printf_length_specs, scanf_length_specs)
1610 (print_char_table, scan_char_table): Support DFP formats for C2X.
1611 * c-format.h (TEX_D32, TEX_D64, TEX_D128): Remove.
1612 (T2X_D32, T2X_D64, T2X_D128): New macros.
1614 2021-10-14 Kwok Cheung Yeung <kcy@codesourcery.com>
1616 * c-omp.c (c_omp_check_context_selector): Rename to
1617 omp_check_context_selector and move to omp-general.c.
1618 (c_omp_mark_declare_variant): Rename to omp_mark_declare_variant and
1619 move to omp-general.c.
1621 2021-10-12 Joseph Myers <joseph@codesourcery.com>
1623 * c-format.c (print_char_table): Add %b and %B formats.
1624 (scan_char_table): Add %b format.
1625 * c-format.h (T2X_UI, T2X_UL, T2X_ULL, T2X_US, T2X_UC, T2X_ST)
1626 (T2X_UPD, T2X_UIM): New macros.
1628 2021-10-12 Jakub Jelinek <jakub@redhat.com>
1630 * c-omp.c (c_finish_omp_atomic): Use
1631 clear_padding_type_may_have_padding_p.
1633 2021-10-08 Martin Liska <mliska@suse.cz>
1635 * c-opts.c (c_common_post_options): Use new macro
1638 2021-10-07 Martin Liska <mliska@suse.cz>
1640 * c-common.c (parse_optimize_options): Make
1641 save_opt_decoded_options a pointer type.
1643 2021-10-06 Jakub Jelinek <jakub@redhat.com>
1645 PR tree-optimization/102571
1646 * c-omp.c (c_finish_omp_atomic): Optimize the case where type has
1647 padding, but the non-padding bits are contiguous set of bytes
1648 by adjusting the memcmp call arguments instead of emitting
1649 __builtin_clear_padding and then comparing all the type's bytes.
1651 2021-10-06 Jakub Jelinek <jakub@redhat.com>
1654 * c-cppbuiltin.c (c_cpp_builtins): For -std=c++23 predefine
1655 __cpp_constexpr to 202110L rather than 201907L.
1657 2021-10-04 Marek Polacek <polacek@redhat.com>
1660 * c-common.h (do_warn_array_compare): Declare.
1661 * c-warn.c (do_warn_array_compare): New.
1662 * c.opt (Warray-compare): New option.
1664 2021-10-02 Iain Sandoe <iain@sandoe.co.uk>
1666 * c-format.c: Remove a test of TARGET_FORMAT_TYPES with
1667 NULL, this is not needed.
1669 2021-10-01 Martin Sebor <msebor@redhat.com>
1672 * c-common.c (decl_with_nonnull_addr_p): Handle members.
1673 Check and perform warning suppression.
1674 (c_common_truthvalue_conversion): Enhance warning suppression.
1676 2021-10-01 Martin Liska <mliska@suse.cz>
1679 * c-common.c (parse_optimize_options): decoded_options[0] is
1680 used for program name, so merged_decoded_options should also
1683 2021-10-01 Jakub Jelinek <jakub@redhat.com>
1684 Richard Biener <rguenther@suse.de>
1687 * c-ubsan.c (ubsan_instrument_division): Check the right
1688 flag_sanitize_recover bit, depending on which sanitization
1689 is done. Sanitize INT_MIN / -1 under SANITIZE_SI_OVERFLOW
1690 rather than SANITIZE_DIVIDE. If both SANITIZE_SI_OVERFLOW
1691 and SANITIZE_DIVIDE is enabled, neither check is known
1692 to be false and flag_sanitize_recover bits for those two
1693 aren't the same, emit both __ubsan_handle_divrem_overflow
1694 and __ubsan_handle_divrem_overflow_abort calls.
1696 2021-10-01 Martin Liska <mliska@suse.cz>
1698 * c-common.c (parse_optimize_options): Combine optimize
1699 options with what was provided on the command line.
1701 2021-10-01 Jakub Jelinek <jakub@redhat.com>
1703 * c-omp.c (c_omp_split_clauses): Also copy
1704 OMP_CLAUSE_ORDER_REPRODUCIBLE.
1706 2021-09-27 Martin Liska <mliska@suse.cz>
1708 * c-opts.c (c_common_init_options_struct): Set also
1709 x_flag_default_complex_method.
1711 2021-09-22 Jakub Jelinek <jakub@redhat.com>
1713 * c-omp.c (c_omp_split_clauses): Copy over OMP_CLAUSE_ALLOCATE_ALIGN.
1715 2021-09-20 Matthias Kretz <m.kretz@gsi.de>
1717 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Define or
1718 undefine __RECIPROCAL_MATH__, __NO_SIGNED_ZEROS__,
1719 __NO_TRAPPING_MATH__, __ASSOCIATIVE_MATH__, and
1720 __ROUNDING_MATH__ according to the new optimization flags.
1722 2021-09-18 Jakub Jelinek <jakub@redhat.com>
1724 * c-omp.c (c_omp_split_clauses): Split order clause also to
1725 distribute construct. Copy over OMP_CLAUSE_ORDER_UNCONSTRAINED.
1727 2021-09-17 Jakub Jelinek <jakub@redhat.com>
1729 * c-omp.c (c_finish_omp_atomic): Avoid creating
1730 TARGET_EXPR if test is true, use create_tmp_var_raw instead of
1731 create_tmp_var and add a zero initializer to TARGET_EXPRs that
1732 had NULL initializer. When omitting operands after v = x,
1733 use type of v rather than type of x. Fix type of vtmp
1736 2021-09-13 Jason Merrill <jason@redhat.com>
1738 * c.opt: Add -Winterference-size.
1739 * c-cppbuiltin.c (cpp_atomic_builtins): Add __GCC_DESTRUCTIVE_SIZE
1740 and __GCC_CONSTRUCTIVE_SIZE.
1742 2021-09-10 Jakub Jelinek <jakub@redhat.com>
1744 * c-common.h (c_finish_omp_atomic): Add r and weak arguments.
1745 * c-omp.c: Include gimple-fold.h.
1746 (c_finish_omp_atomic): Add r and weak arguments. Add support for
1749 2021-09-09 qing zhao <qing.zhao@oracle.com>
1751 * c-attribs.c (handle_uninitialized_attribute): New function.
1752 (c_common_attribute_table): Add "uninitialized" attribute.
1754 2021-09-08 liuhongt <hongtao.liu@intel.com>
1756 * c-common.c (excess_precision_mode_join): Update below comments.
1757 (c_ts18661_flt_eval_method): Set excess_precision_type to
1758 EXCESS_PRECISION_TYPE_FLOAT16 when -fexcess-precision=16.
1759 * c-cppbuiltin.c (cpp_atomic_builtins): Update below comments.
1760 (c_cpp_flt_eval_method_iec_559): Set excess_precision_type to
1761 EXCESS_PRECISION_TYPE_FLOAT16 when -fexcess-precision=16.
1763 2021-09-07 Marcel Vollweiler <marcel@codesourcery.com>
1765 * c-omp.c (c_finish_omp_flush): Handle MEMMODEL_SEQ_CST.
1767 2021-09-03 Eric Botcazou <ebotcazou@adacore.com>
1769 * c-ada-spec.c (dump_ads): Generate pragmas to disable style checks
1770 and -gnatwu warning for the package specification.
1772 2021-09-01 Iain Sandoe <iain@sandoe.co.uk>
1774 * c-attribs.c (handle_unavailable_attribute): New.
1776 2021-08-30 Jason Merrill <jason@redhat.com>
1778 * c.opt: Add -Wmissing-requires.
1780 2021-08-25 Lewis Hyatt <lhyatt@gmail.com>
1783 * c-opts.c (c_common_input_charset_cb): New function.
1784 (c_common_post_options): Call new function
1785 diagnostic_initialize_input_context().
1787 2021-08-20 Tobias Burnus <tobias@codesourcery.com>
1789 * c-format.c (gcc_gfc_length_specs): Add 'll' and 'w'.
1790 (gcc_gfc_char_table): Add T9L_LL and T9L_ULL to
1791 "di" and "u", respecitively; fill with BADLEN to match
1793 (get_init_dynamic_hwi): Split off from ...
1794 (init_dynamic_diag_info): ... here. Call it.
1795 (init_dynamic_gfc_info): Call it.
1797 2021-08-20 Jakub Jelinek <jakub@redhat.com>
1799 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_ERROR.
1800 * c-pragma.c (omp_pragmas): Add error directive.
1801 * c-omp.c (omp_directives): Uncomment error directive entry.
1803 2021-08-18 Jakub Jelinek <jakub@redhat.com>
1805 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_NOTHING.
1806 * c-pragma.c (omp_pragmas): Add nothing directive.
1807 * c-omp.c (omp_directives): Uncomment nothing directive entry.
1809 2021-08-17 Jakub Jelinek <jakub@redhat.com>
1812 * c-common.h (enum rid): Add RID_IS_LAYOUT_COMPATIBLE.
1813 * c-common.c (c_common_reswords): Add __is_layout_compatible.
1815 2021-08-17 Matt Jacobson <mhjacobson@me.com>
1817 * c-opts.c (c_common_post_options): Default to
1818 flag_objc_sjlj_exceptions = 1 only when flag_objc_abi < 2.
1820 2021-08-17 Jakub Jelinek <jakub@redhat.com>
1822 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_SCOPE.
1823 * c-pragma.c (omp_pragmas): Add scope construct.
1824 * c-omp.c (omp_directives): Uncomment scope directive entry.
1826 2021-08-16 Sebastian Huber <sebastian.huber@embedded-brains.de>
1828 * c-cppbuiltin.c (c_cpp_builtins): Define
1829 __LIBGCC_GCOV_TYPE_SIZE if flag_building_libgcc is true.
1831 2021-08-12 Jakub Jelinek <jakub@redhat.com>
1833 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_MASKED.
1834 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_FILTER.
1835 * c-pragma.c (omp_pragmas_simd): Add masked construct.
1836 * c-common.h (enum c_omp_clause_split): Add C_OMP_CLAUSE_SPLIT_MASKED
1838 (c_finish_omp_masked): Declare.
1839 * c-omp.c (c_finish_omp_masked): New function.
1840 (c_omp_split_clauses): Handle combined masked constructs.
1842 2021-07-30 Jakub Jelinek <jakub@redhat.com>
1845 * c-common.h (enum rid): Add RID_IS_POINTER_INTERCONVERTIBLE_BASE_OF.
1846 * c-common.c (c_common_reswords): Add
1847 __is_pointer_interconvertible_base_of.
1849 2021-07-29 Richard Biener <rguenther@suse.de>
1852 * c-common.c (c_common_mark_addressable_vec): Look through
1853 C_MAYBE_CONST_EXPR even if not at the toplevel.
1855 2021-07-27 Martin Sebor <msebor@redhat.com>
1858 * c-warn.c (warn_parm_ptrarray_mismatch): Use OEP_DECL_NAME.
1860 2021-07-23 Jakub Jelinek <jakub@redhat.com>
1862 * c-lex.c (c_common_has_attribute): Call canonicalize_attr_name also
1863 on attr_id. Return 1 for omp::directive or omp::sequence in C++11
1866 2021-07-23 Jakub Jelinek <jakub@redhat.com>
1868 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP__START_ and
1869 PRAGMA_OMP__LAST_ enumerators.
1871 2021-07-21 Thomas Schwinge <thomas@codesourcery.com>
1872 Joseph Myers <joseph@codesourcery.com>
1873 Cesar Philippidis <cesar@codesourcery.com>
1875 * c-pragma.h (pragma_omp_clause): Add 'PRAGMA_OACC_CLAUSE_NOHOST'.
1877 2021-07-20 Martin Sebor <msebor@redhat.com>
1879 * c-common.c (c_build_shufflevector): Adjust by-value argument to
1881 * c-common.h (c_build_shufflevector): Same.
1883 2021-07-16 Andrew Pinski <apinski@marvell.com>
1886 * c-common.c (parse_optimize_options): Use the correct
1889 2021-07-15 Martin Sebor <msebor@redhat.com>
1893 * c-warn.c (warn_parm_array_mismatch): Use OEP_DECL_NAME.
1895 2021-07-14 Jason Merrill <jason@redhat.com>
1897 * c-opts.c (c_common_post_options): Set -fdelete-dead-exceptions.
1899 2021-07-06 Martin Sebor <msebor@redhat.com>
1901 * c-format.c (gcc_tdiag_char_table): Remove support for %G and %K.
1902 (gcc_cdiag_char_table): Same.
1903 (gcc_cxxdiag_char_table): Same.
1905 2021-07-02 Jakub Jelinek <jakub@redhat.com>
1907 * c-common.h (enum c_omp_directive_kind): New enum.
1908 (struct c_omp_directive): New type.
1909 (c_omp_categorize_directive): Declare.
1910 * c-omp.c (omp_directives): New variable.
1911 (c_omp_categorize_directive): New function.
1913 2021-07-01 Eric Botcazou <ebotcazou@adacore.com>
1915 * c-ada-spec.c (packed_layout): New global variable.
1916 (dump_ada_declaration): Set it upon seeing a packed record type.
1917 Do not put the "aliased" keyword if it is set.
1918 (dump_ada_structure): Add Pack aspect if it is set and clear it.
1920 2021-07-01 Eric Botcazou <ebotcazou@adacore.com>
1922 * c-ada-spec.c (check_name): Rename into...
1923 (check_type_name_conflict): ...this. Minor tweak.
1924 (dump_ada_function_declaration): Adjust to above renaming.
1925 (dump_ada_array_domains): Fix oversight.
1926 (dump_ada_declaration): Call check_type_name_conflict for variables.
1928 2021-06-25 Martin Sebor <msebor@redhat.com>
1930 * c-common.c (c_wrap_maybe_const): Remove TREE_NO_WARNING.
1931 (c_common_truthvalue_conversion): Replace direct uses of
1932 TREE_NO_WARNING with warning_suppressed_p, suppress_warning, and
1934 (check_function_arguments_recurse): Same.
1935 * c-gimplify.c (c_gimplify_expr): Same.
1936 * c-warn.c (overflow_warning): Same.
1937 (warn_logical_operator): Same.
1938 (warn_if_unused_value): Same.
1939 (do_warn_unused_parameter): Same.
1941 2021-06-24 Jakub Jelinek <jakub@redhat.com>
1943 * c-common.h (enum c_omp_region_type): Add C_ORT_TARGET and
1945 * c-omp.c (c_omp_split_clauses): For OMP_CLAUSE_IN_REDUCTION on
1946 combined target constructs also add map (always, tofrom:) clause.
1948 2021-06-15 Robin Dapp <rdapp@linux.ibm.com>
1950 * c-attribs.c (common_handle_aligned_attribute): Remove short
1951 circuit and dead code.
1953 2021-06-14 Jonathan Wakely <jwakely@redhat.com>
1956 * known-headers.cc (get_stdlib_header_for_name): Add known
1957 headers for EXIT_FAILURE, EXIT_SUCCESS, abort, atexit, calloc,
1960 2021-06-12 Jason Merrill <jason@redhat.com>
1962 * c-attribs.c (handle_unused_attribute): Handle FIELD_DECL.
1964 2021-06-11 Jakub Jelinek <jakub@redhat.com>
1967 * c-cppbuiltin.c (c_cpp_builtins): Predefine __cpp_if_consteval for
1968 -std=c++2b for P1938R3 consteval if support.
1970 2021-06-09 Jason Merrill <jason@redhat.com>
1973 * c-warn.c (warn_for_sign_compare): Remove C++ enum mismatch
1976 2021-06-07 Martin Liska <mliska@suse.cz>
1978 * c-target.def: Split long lines and replace them
1981 2021-06-04 Martin Sebor <msebor@redhat.com>
1984 * c-attribs.c (positional_argument): Bail on erroneous types.
1986 2021-06-04 Martin Sebor <msebor@redhat.com>
1988 * c-warn.c (warn_parm_array_mismatch): Check TREE_PURPOSE to test
1989 for element presence.
1991 2021-06-03 Eric Botcazou <ebotcazou@adacore.com>
1993 * c-ada-spec.c (dump_ada_macros): Minor tweaks.
1994 (dump_ada_decl_name): Likewise.
1995 (dump_anonymous_type_name): Remove parent parameter and adjust.
1996 (dump_sloc): Minor tweak.
1997 (dump_ada_array_type): Remove type parameter and adjust.
1998 (dump_ada_enum_type): Remove parent parameter and adjust.
1999 (dump_ada_node): Adjust calls to above functions.
2000 (dumped_anonymous_types): New global variable.
2001 (dump_nested_types_1): Rename into...
2002 (dump_nested_types): ...this.
2003 (dump_nested_type): Remove parent and dumped_types parameters.
2004 <ARRAY_TYPE>: Replace dumped_types with dumped_anonymous_types.
2005 Adjust calls to dump_anonymous_type_name and dump_ada_array_type.
2006 (dump_ada_specs): Initialize and free dumped_anonymous_types.
2008 2021-06-03 Eric Botcazou <ebotcazou@adacore.com>
2010 * c-ada-spec.c (pp_ada_tree_identifier): Tidy up.
2011 (dump_ada_node) <POINTER_TYPE>: Deal specially with external subtypes.
2013 2021-06-03 Eric Botcazou <ebotcazou@adacore.com>
2015 * c-ada-spec.c (dump_ada_enum_type): Dump a prefix for constants.
2016 (htable_t): New typedef.
2017 (overloaded_names): Use it.
2018 (add_name): New function.
2019 (init_overloaded_names): Use add_name to populate the table and add
2020 special cases for sigaction and stat.
2021 (overloaded_name_p): Rename into...
2022 (overloading_index): ...this. Do not initialize overloaded_names table
2023 here. Return the index or zero.
2024 (dump_ada_declaration): Minor tweaks. Do not skip overloaded functions
2025 but add an overloading suffix instead.
2026 (dump_ada_specs): Initialize overloaded_names tables here.
2028 2021-06-01 Martin Liska <mliska@suse.cz>
2031 * c-attribs.c (handle_optimize_attribute): Limit sanity check
2032 to a situation where we are not in processing of an optimize
2034 * c-pragma.c (handle_pragma_pop_options): Restore target
2037 2021-05-31 Indu Bhagat <indu.bhagat@oracle.com>
2040 * c-pch.c (c_common_valid_pch): Use xstrdup for debug format set names.
2042 2021-05-31 Richard Biener <rguenther@suse.de>
2045 * c-common.c: Include tree-vector-builder.h and
2047 (c_common_reswords): Add __builtin_shufflevector.
2048 (c_build_shufflevector): New funtion.
2049 * c-common.h (enum rid): Add RID_BUILTIN_SHUFFLEVECTOR.
2050 (c_build_shufflevector): Declare.
2052 2021-05-28 Jakub Jelinek <jakub@redhat.com>
2055 * c-omp.c (c_omp_split_clauses): For reduction clause if combined with
2056 target add a map tofrom clause with OMP_CLAUSE_MAP_IMPLICIT.
2058 2021-05-28 Tobias Burnus <tobias@codesourcery.com>
2060 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_AFFINITY.
2062 2021-05-25 Martin Liska <mliska@suse.cz>
2064 PR tree-optimization/92860
2066 * c-attribs.c (handle_optimize_attribute): Save target node
2067 before calling parse_optimize_options and save it in case
2069 * c-pragma.c (handle_pragma_target): Similarly for pragma.
2070 (handle_pragma_pop_options): Likewise here.
2072 2021-05-25 Martin Liska <mliska@suse.cz>
2074 * c-attribs.c (handle_no_sanitize_coverage_attribute): New.
2076 2021-05-25 Jakub Jelinek <jakub@redhat.com>
2079 * c-omp.c (c_omp_split_clauses): Copy reduction to teams when teams is
2080 combined with simd and not with taskloop or for.
2082 2021-05-21 Jakub Jelinek <jakub@redhat.com>
2085 * c-omp.c (c_omp_split_clauses): Set OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT
2086 on firstprivate clause copy going to target construct, and for
2087 target simd set also OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT_TARGET bit.
2089 2021-05-20 Jonathan Wakely <jwakely@redhat.com>
2091 * c.opt (Wc++11-extensions, Wc++14-extensions)
2092 (Wc++17-extensions, Wc++20-extensions, Wc++23-extensions): New
2095 2021-05-20 Indu Bhagat <indu.bhagat@oracle.com>
2097 * c-lex.c (init_c_lex): Use dwarf_debuginfo_p.
2099 2021-05-20 Indu Bhagat <indu.bhagat@oracle.com>
2101 * c-opts.c (c_common_post_options): Adjust access to debug_type_names.
2102 * c-pch.c (struct c_pch_validity): Use type uint32_t.
2103 (pch_init): Renamed member.
2104 (c_common_valid_pch): Adjust access to debug_type_names.
2106 2021-05-19 Martin Sebor <msebor@redhat.com>
2109 * c-attribs.c (build_attr_access_from_parms): Handle arbitrarily many
2112 2021-05-18 Richard Biener <rguenther@suse.de>
2115 * c-attribs.c (type_valid_for_vector_size): Reject too large nunits.
2116 Reword existing nunit diagnostic.
2118 2021-05-17 Joern Rennecke <joern.rennecke@embecosm.com>
2120 * c-common.c (braced_list_to_string): Return CTOR unchanged
2121 if host and target character sizes don't match.
2123 2021-05-14 Martin Liska <mliska@suse.cz>
2125 * c.opt: Add Warning keyword for 2 options.
2127 2021-05-13 Martin Liska <mliska@suse.cz>
2129 PR middle-end/100504
2130 * c-attribs.c (handle_target_clones_attribute): Expect a string
2131 argument to target_clone argument.
2133 2021-05-11 Joseph Myers <joseph@codesourcery.com>
2135 * c-lex.c (interpret_float): Handle digit separators for C2X.
2137 2021-05-10 Martin Liska <mliska@suse.cz>
2139 * c-ada-spec.c (print_destructor): Use startswith
2140 function instead of strncmp.
2141 (dump_ada_declaration): Likewise.
2142 * c-common.c (disable_builtin_function): Likewise.
2143 (def_builtin_1): Likewise.
2144 * c-format.c (check_tokens): Likewise.
2145 (check_plain): Likewise.
2146 (convert_format_name_to_system_name): Likewise.
2148 2021-04-28 Patrick McGehearty <patrick.mcgehearty@oracle.com>
2150 * c-cppbuiltin.c (c_cpp_builtins): Add supporting macros for new
2153 2021-04-26 Thomas Schwinge <thomas@codesourcery.com>
2154 Nathan Sidwell <nathan@codesourcery.com>
2155 Tom de Vries <vries@codesourcery.com>
2156 Julian Brown <julian@codesourcery.com>
2157 Kwok Cheung Yeung <kcy@codesourcery.com>
2159 * c.opt (Wopenacc-parallelism): New.
2161 2021-04-19 Thomas Schwinge <thomas@codesourcery.com>
2163 * c.opt (fopenacc-kernels=): Remove.
2165 2021-04-08 Jakub Jelinek <jakub@redhat.com>
2167 * c-warn.c (do_warn_double_promotion): Fix comment typo,
2168 occured -> occurred.
2169 (check_alignment_of_packed_member): Fix a comment typo,
2171 (warn_parm_ptrarray_mismatch): Fix comment typos, os -> of
2172 and onless -> unless.
2173 (warn_parm_array_mismatch): Fix comment typos, declaratation
2174 -> declaration and woud -> would. Fix up comment indentation.
2176 2021-04-08 Martin Sebor <msebor@redhat.com>
2179 * c.opt (Wmismatched-new-delete): Correct spelling.
2181 2021-04-05 Eric Botcazou <ebotcazou@adacore.com>
2183 * c-ada-spec.c (is_simple_enum): Minor tweaks.
2184 (dump_ada_enum_type): Add TYPE and PARENT parameters. For non-simple
2185 enumeral types use again the type name for the enumeration constants.
2186 (dump_ada_node): Adjust call to dump_ada_enum_type.
2187 (dump_nested_type): Likewise.
2189 2021-04-01 Jason Merrill <jason@redhat.com>
2192 * c-opts.c (c_common_post_options): Bump latest_abi_version.
2194 2021-03-25 Jakub Jelinek <jakub@redhat.com>
2197 * c-warn.c (do_warn_duplicated_branches): Pass also
2198 OEP_ADDRESS_OF_SAME_FIELD to operand_equal_p.
2200 2021-03-20 Jakub Jelinek <jakub@redhat.com>
2203 * c-gimplify.c (c_genericize_control_stmt): Handle STATEMENT_LIST.
2205 2021-03-05 Eric Botcazou <ebotcazou@adacore.com>
2207 * c-ada-spec.c (dump_ada_declaration) <TYPE_DECL>: Dump nested types
2208 after entering the separate class package, if any.
2210 2021-03-04 Richard Biener <rguenther@suse.de>
2212 * c-pretty-print.c (c_pretty_printer::direct_abstract_declarator):
2215 2021-03-04 Jakub Jelinek <jakub@redhat.com>
2218 * c-ppoutput.c (print): Change src_line type from int to unsigned.
2219 (token_streamer::stream) Likewise.
2220 (maybe_print_line_1): Likewise. Don't strcmp src_file if src_loc is
2223 2021-03-03 Jakub Jelinek <jakub@redhat.com>
2226 * c-common.c (build_va_arg): Call c_common_mark_addressable_vec
2227 instead of mark_addressable. Fix a comment typo -
2228 neutrallly -> neutrally.
2230 2021-02-28 Jakub Jelinek <jakub@redhat.com>
2233 * c-attribs.c (handle_malloc_attribute): Fix a typo in inform
2234 message - refernced -> referenced. Remove superfluous space before
2235 closing paren of function calls.
2237 2021-02-25 Nathan Sidwell <nathan@acm.org>
2240 * c.opt (-flang-info-module-cmi): Renamed option.
2242 2021-02-19 Nathan Sidwell <nathan@acm.org>
2244 * c.opt (flang-info-module-read, flang-info-module-read=): New.
2246 2021-02-18 H.J. Lu <hjl.tools@gmail.com>
2249 * c-attribs.c (c_common_attribute_table): Add the "retain"
2251 (handle_retain_attribute): New function.
2253 2021-02-16 Marek Polacek <polacek@redhat.com>
2256 * c-attribs.c (handle_assume_aligned_attribute): Check that the
2257 alignment argument is non-negative. Tweak a warning message.
2259 2021-02-12 Martin Sebor <msebor@redhat.com>
2262 * c-warn.c (warn_parm_array_mismatch): Free strings returned from
2263 print_generic_expr_to_str.
2265 2021-02-10 Richard Biener <rguenther@suse.de>
2267 * c-common.c (parse_optimize_options): Free decoded_options.
2269 2021-02-04 emsr <3dw4rd@verizon.net>
2271 * c-cppbuiltin.c (c_cpp_builtins): __cpp_size_t_suffix=202011L.
2273 2021-02-03 Ed Smith-Rowland <3dw4rd@verizon.net>
2275 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_size_t_suffix.
2276 * c-lex.c (interpret_integer): Set node type for size literal.
2278 2021-01-28 Jakub Jelinek <jakub@redhat.com>
2280 * c.opt (-std=c++2a, -std=c++20, -std=gnu++2a, -std=gnu++20): Remove
2281 draft from description.
2282 (-std=c++2b): Fix a pasto, 2020 -> 2023.
2284 2021-01-26 Paul Fee <paul.f.fee@gmail.com>
2286 * c-common.h (cxx_dialect): Add cxx23 as a dialect.
2287 * c.opt: Add options for -std=c++23, std=c++2b, -std=gnu++23
2289 * c-opts.c (set_std_cxx23): New.
2290 (c_common_handle_option): Set options when -std=c++23 is enabled.
2291 (c_common_post_options): Adjust comments.
2292 (set_std_cxx20): Likewise.
2294 2021-01-25 Martin Sebor <msebor@redhat.com>
2297 * c-common.c (check_nonnull_arg): Adjust warning text.
2299 2021-01-17 Martin Sebor <msebor@redhat.com>
2301 * c-pretty-print.c (c_pretty_printer::primary_expression): Don't
2302 assume SSA_NAME_IDENTIFIER evaluates to nonzero.
2304 2021-01-16 Kwok Cheung Yeung <kcy@codesourcery.com>
2306 * c-pragma.h (pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_DETACH.
2307 Redefine PRAGMA_OACC_CLAUSE_DETACH.
2309 2021-01-15 Jakub Jelinek <jakub@redhat.com>
2311 PR tree-optimization/98597
2312 * c-pretty-print.c: Include options.h.
2313 (c_fold_indirect_ref_for_warn): New function.
2314 (print_mem_ref): Use it. If it returns something that has compatible
2315 type and is TBAA compatible with zero offset, print it and return,
2316 otherwise print it using offsetof syntax or array ref syntax. Fix up
2317 printing if MEM_REFs first operand is ADDR_EXPR, or when the first
2318 argument has pointer to array type. Print pointers using the standard
2321 2021-01-12 Martin Sebor <msebor@redhat.com>
2325 * c-pretty-print.c (print_mem_ref): Avoid assuming MEM_REF operand
2326 has pointer type. Remove redundant code. Avoid calling
2327 gimple_canonical_types_compatible_p.
2329 2021-01-07 Martin Sebor <msebor@redhat.com>
2332 * c-pretty-print.c (print_mem_ref): Strip array from access type.
2333 Avoid assuming acces type's size is constant. Correct condition
2334 guarding the printing of a parenthesis.
2336 2021-01-06 Martin Sebor <msebor@redhat.com>
2339 * c-pretty-print.c (c_pretty_printer::primary_expression): For
2340 SSA_NAMEs print VLA names and GIMPLE defining statements.
2341 (print_mem_ref): New function.
2342 (c_pretty_printer::unary_expression): Call it.
2344 2021-01-06 Richard Biener <rguenther@suse.de>
2346 PR tree-optimization/95582
2347 * c-attribs.c (c_common_attribute_table): Add entry for
2348 signed_bool_precision.
2349 (handle_signed_bool_precision_attribute): New.
2351 2020-12-24 Iain Sandoe <iain@sandoe.co.uk>
2353 * c.opt: Add -stdlib= option and enumerations for
2354 libstdc++ and libc++.
2356 2020-12-16 Martin Liska <mliska@suse.cz>
2358 * c.opt: Remove usage of Report.
2360 2020-12-14 Martin Sebor <msebor@redhat.com>
2365 * c-attribs.c (maybe_add_noinline): New function.
2366 (handle_malloc_attribute): Call it. Use ATTR_FLAG_INTERNAL.
2367 Implicitly add attribute noinline to functions not declared inline
2370 2020-12-09 Tobias Burnus <tobias@codesourcery.com>
2372 * c-pragma.c (omp_pragmas): Add 'allocate'.
2373 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_ALLOCATE.
2375 2020-12-08 Jakub Jelinek <jakub@redhat.com>
2378 * c-pragma.c (omp_pragmas): Remove "master".
2379 (omp_pragmas_simd): Add "master".
2381 2020-12-07 Marek Polacek <polacek@redhat.com>
2384 * c-common.c (verify_tree_lim_r): New function.
2385 (verify_sequence_points): Use it. Use nullptr instead of 0.
2387 2020-12-03 Martin Sebor <msebor@redhat.com>
2391 * c-attribs.c (handle_dealloc_attribute): New function.
2392 (handle_malloc_attribute): Handle argument forms of attribute.
2393 * c.opt (-Wmismatched-dealloc): New option.
2394 (-Wmismatched-new-delete): New option.
2396 2020-12-03 Jakub Jelinek <jakub@redhat.com>
2399 * c-common.h (enum rid): Add RID_BUILTIN_BIT_CAST.
2400 * c-common.c (c_common_reswords): Add __builtin_bit_cast.
2402 2020-12-01 JeanHeyd Meneide <phdofthehouse@gmail.com>
2404 * c-cppbuiltin.c (c_cpp_builtins): Add predefined
2405 {__GNUC_EXECUTION_CHARSET_NAME} and
2406 _WIDE_EXECUTION_CHARSET_NAME} macros.
2408 2020-12-01 Nathan Sidwell <nathan@acm.org>
2410 * c-common.c (module, import, export): New internal tokens (with
2412 * c-common.h (RID__MODULE, RID__IMPORT & RID__EXPORT): Enumerate
2414 (D_CXX_MODULES, D_CXX_MODULES_FLAGS): Enable them.
2415 * c-cppbuiltin.c (c_cpp_builtins): Feature macro.
2417 2020-12-01 Nathan Sidwell <nathan@acm.org>
2419 * c-opts.c (c_common_init_options): Ask for module dependencies.
2420 (c_common_handle_option): Handle -Mmodules -Mno-modules.
2421 * c-pch.c (c_common_valid_pch): ... does not play with C++
2423 * c.opt (Mmodules, Mno-modules): New preprocessor dependency
2425 (fmodules-ts, fmodule-header, fmodule-implicit-inline)
2426 (fmodule-only, fmodule-mapper, fmodule-lazy)
2427 (fmodule-version-ignore, Winvalid-imported-macros)
2428 (flang-info-include-translate, flang-info-include-translate-not):
2431 2020-11-28 Eric Botcazou <ebotcazou@adacore.com>
2433 * c-ada-spec.c (dump_nested_type) <RECORD_TYPE>: Remove obsolete code.
2434 (dump_ada_structure): Also deal with convention, unchecked union and
2435 bit-field for nested types. In the latter case, print an Alignment
2436 aspect along with the Pack aspect.
2438 2020-11-25 Martin Sebor <msebor@redhat.com>
2441 * c-attribs.c (handle_patchable_function_entry_attribute): Avoid
2444 2020-11-24 Martin Sebor <msebor@redhat.com>
2446 * c-warn.c (warn_parm_array_mismatch): Avoid invalid redeclarations.
2448 2020-11-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
2450 * c-attribs.c (handle_special_var_sec_attribute): New.
2451 (handle_noinit_attribute): Remove.
2452 (attr_noinit_exclusions): Rename to...
2453 (attr_section_exclusions): ...this, and add "persistent" attribute
2455 (c_common_attribute_table): Add "persistent" attribute.
2457 2020-11-21 Aaron Sawdey <acsawdey@linux.ibm.com>
2459 * c-pretty-print.c (c_pretty_printer::simple_type_specifier):
2460 Treat opaque types like other types.
2461 (c_pretty_printer::direct_abstract_declarator): Opaque types are
2464 2020-11-20 Martin Sebor <msebor@redhat.com>
2466 * c-warn.c (warn_parm_array_mismatch): Bail on invalid redeclarations
2467 with fewer arguments.
2469 2020-11-20 Martin Sebor <msebor@redhat.com>
2472 * c-attribs.c (handle_access_attribute): Handle ATTR_FLAG_INTERNAL.
2473 Error out on invalid modes.
2475 2020-11-20 Jakub Jelinek <jakub@redhat.com>
2478 * c-common.c (check_builtin_function_arguments): Handle
2479 BUILT_IN_CLEAR_PADDING.
2481 2020-11-18 Nathan Sidwell <nathan@acm.org>
2483 * c-lex.c (c_lex_with_flags): CPP_HEADER_NAMEs can now be seen.
2485 2020-11-17 Nathan Sidwell <nathan@acm.org>
2487 * c-common.h (enum c_tree_index): Reorder to place lazy fields
2488 after newly-added CTI_MODULE_HWM.
2490 2020-11-17 Joseph Myers <joseph@codesourcery.com>
2492 * c-cppbuiltin.c (builtin_define_float_constants): Define
2493 "*_IS_IEC_60559__" macros.
2495 2020-11-17 Nathan Sidwell <nathan@acm.org>
2497 * c-lex.c: #include "langhooks.h".
2498 (cb_undef): Maybe call preprocess_undef lang hook.
2499 * c-opts.c (c_common_post_options): Maybe call preprocess_options
2501 (push_command_line_include): Maybe call preprocess_main_file lang
2503 (cb_file_change): Likewise.
2504 * c-ppoutput.c: #include "langhooks.h.
2505 (scan_translation_unit): Maybe call preprocess_token lang hook.
2506 (class do_streamer): New, derive from token_streamer.
2507 (directives_only_cb): Data pointer is do_streamer, call
2508 preprocess_token lang hook.
2509 (scan_translation_unit_directives_only): Use do_streamer.
2510 (print_line_1): Move src_line recording to after string output.
2511 (cb_undef): Maybe call preprocess_undef lang hook.
2513 2020-11-17 Nathan Sidwell <nathan@acm.org>
2515 * c-ppoutput.c (scan_translation_unit): Use token_streamer, remove
2516 code duplicating that functionality.
2518 2020-11-17 Jakub Jelinek <jakub@redhat.com>
2521 * c-common.c (check_builtin_function_arguments)
2522 <case BUILT_IN_ADD_OVERFLOW>: Diagnose when last argument is pointer
2523 to _Atomic. For the TYPE_READONLY case, adjust message to be usable
2524 for more builtins and argument positions.
2526 2020-11-16 Iain Sandoe <iain@sandoe.co.uk>
2529 * stub-objc.c: Include c-common.h to declare enum rid.
2531 2020-11-13 Jakub Jelinek <jakub@redhat.com>
2534 * c-cppbuiltin.c: Include configargs.h.
2535 (c_cpp_builtins): For C++11 and later if THREAD_MODEL_SPEC is not
2536 defined, predefine __STDCPP_THREADS__ to 1 unless thread_model is
2539 2020-11-13 Gergö Barany <gergo@codesourcery.com>
2540 Thomas Schwinge <thomas@codesourcery.com>
2542 * c.opt (fopenacc-kernels): Add.
2544 2020-11-13 Jason Merrill <jason@redhat.com>
2546 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_using_enum.
2548 2020-11-13 Piotr H. Dabrowski <phd@phd.re>
2551 * c-cppbuiltin.c: c_cpp_builtins_optimize_pragma(): use cpp_define_unused()
2553 2020-11-13 Martin Liska <mliska@suse.cz>
2555 * c-attribs.c (build_attr_access_from_parms): Format properly.
2557 2020-11-13 Iain Sandoe <iain@sandoe.co.uk>
2560 * c-common.c (c_common_reswords): null_unspecified, nullable,
2561 nonnull, null_resettable: New keywords.
2562 * c-common.h (enum rid): RID_NULL_UNSPECIFIED, RID_NULLABLE,
2563 RID_NONNULL, RID_NULL_RESETTABLE: New.
2564 (OBJC_IS_PATTR_KEYWORD): Include nullability keywords in the
2565 ranges accepted for property attributes.
2566 * c-attribs.c (handle_objc_nullability_attribute): New.
2567 * c-objc.h (enum objc_property_attribute_group): Add
2568 OBJC_PROPATTR_GROUP_NULLABLE.
2569 (enum objc_property_attribute_kind):Add
2570 OBJC_PROPERTY_ATTR_NULL_UNSPECIFIED, OBJC_PROPERTY_ATTR_NULLABLE,
2571 OBJC_PROPERTY_ATTR_NONNULL, OBJC_PROPERTY_ATTR_NULL_RESETTABLE.
2573 2020-11-13 Iain Sandoe <iain@sandoe.co.uk>
2576 * c-attribs.c (handle_objc_root_class_attribute): New
2577 * c-objc.h (objc_start_class_interface): Add a location
2578 value for the position of the class name.
2579 * c.opt: Add Wobjc-root-class.
2580 * stub-objc.c (objc_start_class_interface): Add a location
2581 value for the position of the class name.
2583 2020-11-12 Joseph Myers <joseph@codesourcery.com>
2585 * c-lex.c (c_common_has_attribute): Take argument std_syntax.
2586 Allow scope for C. Handle standard attributes for C. Do not
2587 accept unscoped attributes if std_syntax and not handled as
2588 standard attributes.
2589 * c-common.h (c_common_has_attribute): Update prototype.
2591 2020-11-12 Nicholas Guriev <guriev-ns@ya.ru>
2594 * c-pch.c (c_common_valid_pch): Use cpp_warning with CPP_W_INVALID_PCH
2595 reason to fix -Werror=invalid-pch and -Wno-error=invalid-pch switches.
2597 2020-11-11 Patrick Palka <ppalka@redhat.com>
2600 * c-opts.c (c_common_post_options): Update latest_abi_version.
2602 2020-11-10 Jakub Jelinek <jakub@redhat.com>
2605 * c-common.h (warn_if_unused_value): Add quiet argument defaulted
2607 * c-warn.c (warn_if_unused_value): Likewise. Pass it down
2608 recursively and just return true instead of warning if it is true.
2609 Handle COMPLEX_EXPR.
2611 2020-11-10 Chung-Lin Tang <cltang@codesourcery.com>
2613 * c-common.h (c_omp_adjust_map_clauses): New declaration.
2614 * c-omp.c (struct map_clause): Helper type for c_omp_adjust_map_clauses.
2615 (c_omp_adjust_map_clauses): New function.
2617 2020-11-09 Marek Polacek <polacek@redhat.com>
2620 * c-common.c (attribute_fallthrough_p): Tweak the warning
2623 2020-11-09 Patrick Palka <ppalka@redhat.com>
2625 * c-pragma.c (handle_pragma_diagnostic): Split the
2626 unknown-option -Wpragmas diagnostic into a warning and a
2627 subsequent note containing a spelling suggestion. Avoid
2628 computing the suggestion if -Wpragmas warnings are being
2631 2020-11-09 Patrick Palka <ppalka@redhat.com>
2634 * c-indentation.c (get_visual_column): Remove location_t
2635 parameter. Move the column-tracking diagnostic code from here
2637 (should_warn_for_misleading_indentation): ... here, before the
2638 early exit for when the loci are not all distinct. Don't pass a
2639 location_t argument to get_visual_column.
2640 (assert_get_visual_column_succeeds): Don't pass a location_t
2641 argument to get_visual_column.
2642 (assert_get_visual_column_fails): Likewise.
2644 2020-11-08 Iain Sandoe <iain@sandoe.co.uk>
2646 * c-common.h (OBJC_IS_PATTR_KEYWORD): Add class to the list
2647 of keywords accepted in @property attribute contexts.
2648 * c-objc.h (enum objc_property_attribute_group): Add
2649 OBJC_PROPATTR_GROUP_CLASS.
2650 (enum objc_property_attribute_kind): Add
2651 OBJC_PROPERTY_ATTR_CLASS.
2653 2020-11-07 Iain Sandoe <iain@sandoe.co.uk>
2655 * c-common.c (c_common_reswords): Add 'atomic' property
2657 * c-common.h (enum rid): Add RID_PROPATOMIC for atomic
2658 property attributes.
2660 2020-11-07 Iain Sandoe <iain@sandoe.co.uk>
2662 * c-attribs.c (handle_nsobject_attribute): New.
2663 * c.opt: Add WNSObject-attribute.
2665 2020-11-06 Iain Sandoe <iain@sandoe.co.uk>
2667 * c-objc.h (enum objc_property_attribute_group): New
2668 (enum objc_property_attribute_kind): New.
2669 (OBJC_PROPATTR_GROUP_MASK): New.
2670 (struct property_attribute_info): Small class encapsulating
2671 parser output from property attributes.
2672 (objc_prop_attr_kind_for_rid): New
2673 (objc_add_property_declaration): Simplify interface.
2674 * stub-objc.c (enum rid): Dummy type.
2675 (objc_add_property_declaration): Simplify interface.
2676 (objc_prop_attr_kind_for_rid): New.
2678 2020-11-06 Nathan Sidwell <nathan@acm.org>
2680 * c-ada-spec.c (collect_ada_nodes): Rename
2681 DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
2682 (collect_ada_node): Likewise.
2683 (dump_forward_type): Likewise.
2684 * c-common.c (set_underlying_type): Rename
2685 DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
2686 (user_facing_original_type, c_common_finalize_early_debug): Likewise.
2688 2020-11-06 Jakub Jelinek <jakub@redhat.com>
2690 * c-common.c (verify_sequence_points): Remove DEBUG_FUNCTION.
2692 2020-11-05 Marek Polacek <polacek@redhat.com>
2695 * c.opt (Wexceptions): New option.
2697 2020-11-05 Marek Polacek <polacek@redhat.com>
2700 * c.opt (Wvexing-parse): New option.
2702 2020-11-04 Jakub Jelinek <jakub@redhat.com>
2705 * c-omp.c (c_omp_split_clauses): Look through array reductions to find
2706 underlying decl to clear in the allocate_head bitmap.
2708 2020-11-04 Iain Sandoe <iain@sandoe.co.uk>
2710 * c-objc.h (objc_non_constant_expr_p): New.
2711 * stub-objc.c (objc_non_constant_expr_p): New.
2713 2020-11-03 Nathan Sidwell <nathan@acm.org>
2715 * c.opt (MQ,MT): Reword description to be make-agnostic.
2717 2020-11-02 Nathan Sidwell <nathan@acm.org>
2719 * c-opts.c (c_common_post_options): Move var decl to its
2720 initialization point.
2722 2020-11-01 Iain Sandoe <iain@sandoe.co.uk>
2724 * c-lex.c (c_lex_with_flags): When combining '@' with a
2725 keyword for Objective-C, combine the location ranges too.
2727 2020-10-30 Qing Zhao <qing.zhao@oracle.com>
2728 H.J.Lu <hjl.tools@gmail.com>
2730 * c-attribs.c (c_common_attribute_table): Add new attribute
2731 zero_call_used_regs.
2732 (handle_zero_call_used_regs_attribute): New function.
2734 2020-10-28 Marek Polacek <polacek@redhat.com>
2737 * c-opts.c (c_common_post_options): In C++20, turn on
2738 -Wdeprecated-enum-enum-conversion and
2739 -Wdeprecated-enum-float-conversion.
2740 * c.opt (Wdeprecated-enum-enum-conversion,
2741 Wdeprecated-enum-float-conversion): New options.
2742 (Wenum-conversion): Allow for C++ too.
2744 2020-10-28 Jakub Jelinek <jakub@redhat.com>
2746 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ALLOCATE.
2747 * c-omp.c: Include bitmap.h.
2748 (c_omp_split_clauses): Handle OMP_CLAUSE_ALLOCATE.
2750 2020-10-26 Ville Voutilainen <ville.voutilainen@gmail.com>
2752 * c-common.c (__is_nothrow_assignable): New.
2753 (__is_nothrow_constructible): Likewise.
2754 * c-common.h (RID_IS_NOTHROW_ASSIGNABLE): New.
2755 (RID_IS_NOTHROW_CONSTRUCTIBLE): Likewise.
2757 2020-10-23 Jan Hubicka <hubicka@ucw.cz>
2759 * c-common.c (c_common_finalize_early_debug): Update for new thunk api.
2761 2020-10-23 Marek Polacek <polacek@redhat.com>
2764 * c-common.c (verify_tree): Handle PAREN_SIZEOF_EXPR.
2765 (c_common_init_ts): Likewise.
2766 * c-common.def (PAREN_SIZEOF_EXPR): New tree code.
2767 * c-common.h (maybe_warn_sizeof_array_div): Declare.
2768 * c-warn.c (sizeof_pointer_memaccess_warning): Unwrap NOP_EXPRs.
2769 (maybe_warn_sizeof_array_div): New function.
2770 * c.opt (Wsizeof-array-div): New option.
2772 2020-10-23 Martin Sebor <msebor@redhat.com>
2775 * c-warn.c (warn_parm_ptrarray_mismatch): Move null test earlier.
2777 2020-10-22 Martin Liska <mliska@suse.cz>
2780 * c-attribs.c (handle_no_stack_protect_function_attribute): New.
2781 (handle_stack_protect_attribute): Add error message for a
2782 no_stack_protector function.
2784 2020-10-22 Martin Liska <mliska@suse.cz>
2786 * c-cppbuiltin.c (c_cpp_builtins): Use the stack_protector enum.
2788 2020-10-22 Jan Hubicka <hubicka@ucw.cz>
2790 * c-gimplify.c: Include tree-nested.h
2791 (c_genericize): Update for new nested function info.
2793 2020-10-14 Martin Sebor <msebor@redhat.com>
2796 * c-attribs.c (build_attr_access_from_parms): Wrap chain of VLA
2797 bounds in an extra list.
2799 2020-10-05 Richard Biener <rguenther@suse.de>
2800 Jakub Jelinek <jakub@redhat.com>
2803 * c-pretty-print.c: Include langhooks.h.
2804 (c_pretty_printer::postfix_expression): Handle TARGET_MEM_REF as
2806 (c_pretty_printer::expression): Handle TARGET_MEM_REF as
2808 (c_pretty_printer::unary_expression): Handle TARGET_MEM_REF.
2810 2020-09-30 Martin Sebor <msebor@redhat.com>
2813 * c-attribs.c (append_access_attr): Use the function declaration
2814 location for a warning about an attribute access argument.
2816 2020-09-29 Marek Polacek <polacek@redhat.com>
2819 * c.opt (Wrange-loop-construct): New option.
2821 2020-09-23 Martin Sebor <msebor@redhat.com>
2824 * c-warn.c (warn_parm_ptrarray_mismatch): Handle more invalid input.
2826 2020-09-23 Marek Polacek <polacek@redhat.com>
2829 * c-gimplify.c (c_genericize): Only call do_warn_duplicated_branches_r
2830 after loops and other structured control constructs have been lowered.
2832 2020-09-22 Jakub Jelinek <jakub@redhat.com>
2834 * c.opt (Wbuiltin-declaration-mismatch): Fix typo in variable name:
2835 warn_builtin_declaraion_mismatch -> warn_builtin_declaration_mismatch.
2837 2020-09-21 Marek Polacek <polacek@redhat.com>
2839 * c.opt (Wctad-maybe-unsupported): New option.
2841 2020-09-19 Martin Sebor <msebor@redhat.com>
2844 * c-common.h (warn_parm_array_mismatch): Declare new function.
2845 (has_attribute): Move declaration of an existing function.
2846 (build_attr_access_from_parms): Declare new function.
2847 * c-warn.c (parm_array_as_string): Define new function.
2848 (plus_one): Define new function.
2849 (warn_parm_ptrarray_mismatch): Define new function.
2850 (warn_parm_array_mismatch): Define new function.
2851 (vla_bound_parm_decl): New function.
2852 * c.opt (-Warray-parameter, -Wvla-parameter): New options.
2853 * c-pretty-print.c (pp_c_type_qualifier_list): Don't print array type
2855 (c_pretty_printer::direct_abstract_declarator): ...but instead print
2856 them in brackets here. Also print [static]. Strip extraneous
2857 expressions from VLA bounds.
2859 2020-09-19 Martin Sebor <msebor@redhat.com>
2862 * c-attribs.c (c_common_attribute_table): Add "arg spec" attribute.
2863 (handle_argspec_attribute): New function.
2864 (get_argument, get_argument_type): New functions.
2865 (append_access_attrs): Add overload. Handle internal attribute
2866 representation in addition to external.
2867 (handle_access_attribute): Handle internal attribute representation
2868 in addition to external.
2869 (build_attr_access_from_parms): New function.
2871 2020-09-19 Sandra Loosemore <sandra@codesourcery.com>
2873 * c-gimplify.c (genericize_c_loop): Rewrite to match
2874 c_finish_loop in c-typeck.c.
2876 2020-09-19 Sandra Loosemore <sandra@codesourcery.com>
2878 * c-common.c (c_block_may_fallthrough): New, split from
2879 cxx_block_may_fallthrough in the cp front end.
2880 (c_common_init_ts): Move handling of loop and switch-related
2881 statements here from the cp front end.
2882 * c-common.def (FOR_STMT, WHILE_STMT, DO_STMT): Move here from
2884 (BREAK_STMT, CONTINUE_STMT, SWITCH_STMT): Likewise.
2885 * c-common.h (c_block_may_fallthru): Declare.
2886 (bc_state_t): Move here from cp front end.
2887 (save_bc_state, restore_bc_state): Declare.
2888 (c_genericize_control_stmt): Declare.
2889 (WHILE_COND, WHILE_BODY): Likewise.
2890 (DO_COND, DO_BODY): Likewise.
2891 (FOR_INIT_STMT, FOR_COND, FOR_EXPR, FOR_BODY, FOR_SCOPE): Likewise.
2892 (SWITCH_STMT_COND, SWITCH_STMT_BODY): Likewise.
2893 (SWITCH_STMT_TYPE, SWITCH_STMT_SCOPE): Likewise.
2894 (SWITCH_STMT_ALL_CASES_P, SWITCH_STMT_NO_BREAK_P): Likewise.
2895 (LABEL_DECL_BREAK, LABEL_DECL_CONTINUE): Likewise.
2896 * c-dump.c (dump_stmt): Copy from cp front end.
2897 (c_dump_tree): Move code to handle structured loop and switch
2898 tree nodes here from cp front end.
2899 * c-gimplify.c: Adjust includes.
2900 (enum bc_t, bc_label, begin_bc_block, finish_bc_block): Move from
2902 (save_bc_state, restore_bc_state): New functions using old code
2904 (get_bc_label, expr_loc_or_loc): Move from cp front end.
2905 (genericize_c_loop): Move from cp front end.
2906 (genericize_for_stmt, genericize_while_stmt): Likewise.
2907 (genericize_do_stmt, genericize_switch_stmt): Likewise.
2908 (genericize_continue_stmt, genericize_break_stmt): Likewise.
2909 (genericize_omp_for_stmt): Likewise.
2910 (c_genericize_control_stmt): New function using code split from
2912 (c_genericize_control_r): New.
2913 (c_genericize): Call walk_tree with c_genericize_control_r.
2914 * c-pretty-print.c (c_pretty_printer::statement): Move code to handle
2915 structured loop and switch tree nodes here from cp front end.
2917 2020-09-17 Patrick Palka <ppalka@redhat.com>
2920 * c-indentation.c (should_warn_for_misleading_indentation): Move
2921 declarations of local variables closer to their first use.
2922 Handle virtual token locations by resolving them to their
2923 respective macro expansion points. If all three tokens are
2924 produced from the same macro expansion, then instead use their
2925 loci within the macro definition.
2927 2020-09-16 Martin Sebor <msebor@redhat.com>
2931 * c-attribs.c (validate_attr_args): New function.
2932 (validate_attr_arg): Same.
2933 (handle_section_attribute): Call it. Introduce a local variable.
2934 (handle_alloc_size_attribute): Same.
2935 (handle_alloc_align_attribute): Same.
2937 2020-09-14 Jakub Jelinek <jakub@redhat.com>
2939 * c-attribs.c (handle_optimize_attribute): Adjust
2940 cl_optimization_save, cl_optimization_restore and
2941 build_optimization_node callers.
2942 * c-pragma.c (handle_pragma_optimize): Adjust
2943 build_optimization_node caller.
2944 (handle_pragma_push_options): Adjust
2945 build_optimization_node and build_target_option_node callers.
2946 (handle_pragma_pop_options, handle_pragma_reset_options):
2947 Adjust cl_optimization_restore callers.
2949 2020-08-28 Martin Sebor <msebor@redhat.com>
2951 * c.opt (Wstringop-overread): New option.
2953 2020-08-11 Jakub Jelinek <jakub@redhat.com>
2956 * c-common.c (get_atomic_generic_size): Require that first argument's
2957 type points to a complete type and use tree_fits_uhwi_p instead of
2958 just INTEGER_CST TREE_CODE check for the TYPE_SIZE_UNIT.
2960 2020-07-31 Martin Sebor <msebor@redhat.com>
2963 * c-common.c (check_function_arguments_recurse): Return early when
2964 no-warning bit is set.
2966 2020-07-31 Richard Biener <rguenther@suse.de>
2969 * c-common.h (c_common_finalize_early_debug): Declare.
2970 * c-common.c: Include debug.h.
2971 (c_common_finalize_early_debug): finalize_early_debug langhook
2972 implementation generating debug for extern declarations.
2974 2020-07-27 Nathan Sidwell <nathan@acm.org>
2976 * c-common.c (try_to_locate_new_include_insertion_point): Use
2977 strcmp, not pointer equality.
2979 2020-07-25 Martin Sebor <msebor@redhat.com>
2982 * c-common.c (check_nonnull_arg): Print note only when warning was
2985 2020-07-22 Tobias Burnus <tobias@codesourcery.com>
2987 * c-omp.c (c_finish_omp_critical): Check for no name but
2988 nonzero hint provided.
2990 2020-07-20 Jason Merrill <jason@redhat.com>
2992 * c-cppbuiltin.c (c_cpp_builtins): Update
2993 __cpp_nontype_template_args for C++20.
2995 2020-07-20 Martin Sebor <msebor@redhat.com>
2998 * c.opt: Remove stray text.
3000 2020-07-14 Lewis Hyatt <lhyatt@gmail.com>
3003 * c-indentation.c (should_warn_for_misleading_indentation): Get
3004 global tabstop from the new source.
3005 * c-opts.c (c_common_handle_option): Remove handling of -ftabstop, which
3006 is now a common option.
3009 2020-07-08 Eric Botcazou <ebotcazou@adacore.com>
3011 * c.opt (Wscalar-storage-order): Add explicit variable.
3013 2020-07-07 Nathan Sidwell <nathan@acm.org>
3015 * c-opts.c (c_common_post_options): Add 'injecting' arg to
3017 (c_finish_options): Add linemap_line_start calls for builtin and cmd
3018 maps. Force token position to line_table's highest line.
3019 * c-ppoutput.c (print_line_1): Refactor, print line zero.
3020 (cb_define): Always increment source line.
3022 2020-07-06 Martin Sebor <msebor@redhat.com>
3025 * c-common.c (check_function_nonnull): Avoid checking syntesized calls
3026 to stub lambda objects with null this pointer.
3027 (check_nonnull_arg): Handle C++ nullptr.
3029 2020-07-02 Jason Merrill <jason@redhat.com>
3030 Jakub Jelinek <jakub@redhat.com>
3032 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_consteval.
3034 2020-06-30 Jakub Jelinek <jakub@redhat.com>
3037 * c-common.c (check_function_arguments_recurse): Don't crash on
3038 calls to internal functions.
3040 2020-06-28 Martin Sebor <msebor@redhat.com>
3043 * c-common.c (struct nonnull_arg_ctx): Add members.
3044 (check_function_nonnull): Use nonnull_arg_ctx as argument. Handle
3045 C++ member functions specially. Consider the this pointer implicitly
3047 (check_nonnull_arg): Use location of argument when available.
3048 (check_function_arguments): Use nonnull_arg_ctx as argument.
3050 2020-06-27 Jakub Jelinek <jakub@redhat.com>
3053 * c-common.c (pointer_int_sum): Use TYPE_OVERFLOW_UNDEFINED instead of
3054 !TYPE_UNSIGNED check to see if we can apply distributive law and handle
3055 smaller precision intop operands separately.
3057 2020-06-26 Marek Polacek <polacek@redhat.com>
3059 * c-opts.c (c_common_init_options): Default to gnu++17.
3061 2020-06-17 Jonathan Wakely <jwakely@redhat.com>
3064 * c-common.c (get_atomic_generic_size): Check cv-qualifiers in
3067 2020-06-16 Jakub Jelinek <jakub@redhat.com>
3069 * c-common.h (c_omp_check_loop_iv_exprs): Add an int argument.
3070 * c-omp.c (struct c_omp_check_loop_iv_data): Add maybe_nonrect and
3072 (c_omp_is_loop_iterator): New function.
3073 (c_omp_check_loop_iv_r): Use it. Add support for silent scanning
3074 if outer loop iterator is present. Perform duplicate checking through
3075 hash_set in the function rather than expecting caller to do that.
3076 Pass NULL instead of d->ppset to walk_tree_1.
3077 (c_omp_check_nonrect_loop_iv): New function.
3078 (c_omp_check_loop_iv): Use it. Fill in new members, allow
3079 non-rectangular loop forms, diagnose multiple associated loops with
3080 the same iterator. Pass NULL instead of &pset to walk_tree_1.
3081 (c_omp_check_loop_iv_exprs): Likewise.
3083 2020-06-10 Martin Liska <mliska@suse.cz>
3085 PR tree-optimization/92860
3086 * c-attribs.c (handle_optimize_attribute):
3087 Save global options and compare it after parsing of function
3089 * c-pragma.c (opt_stack::saved_global_options): New field.
3090 (handle_pragma_push_options): Save global_options.
3091 (handle_pragma_pop_options): Compare them after pop.
3093 2020-06-09 Jakub Jelinek <jakub@redhat.com>
3096 * c-pretty-print.c (c_pretty_printer::unary_expression): Handle the
3097 case when MEM_REF's first argument has type pointer to incomplete type.
3099 2020-06-05 Jason Merrill <jason@redhat.com>
3101 * c-pretty-print.c (pp_c_additive_expression): Handle negative
3102 operand to POINTER_PLUS_EXPR.
3104 2020-06-04 Martin Sebor <msebor@redhat.com>
3108 * c-attribs.c (append_access_attrs): Handle attr_access::none.
3109 (handle_access_attribute): Same.
3111 2020-06-03 Mark Wielaard <mark@klomp.org>
3113 * known-headers.cc (get_cp_stdlib_header_for_string_macro_name):
3115 * known-headers.h (get_cp_stdlib_header_for_string_macro_name):
3116 New function declaration.
3118 2020-06-03 Mark Wielaard <mark@klomp.org>
3120 * known-headers.cc (get_string_macro_hint): New function.
3121 (get_stdlib_header_for_name): Use get_string_macro_hint.
3122 (get_c_stdlib_header_for_string_macro_name): New function.
3123 * known-headers.h (get_c_stdlib_header_for_string_macro_name):
3124 New function declaration.
3126 2020-06-03 Tobias Burnus <tobias@codesourcery.com>
3128 * c-common.h (c_omp_predetermined_mapping): Declare.
3129 * c-omp.c (c_omp_predetermined_mapping): New.
3131 2020-05-22 Mark Wielaard <mark@klomp.org>
3133 * known-headers.cc (get_stdlib_header_for_name): Add a new
3134 stdlib_hint array for stdbool and stdint.
3136 2020-05-22 Mark Wielaard <mark@klomp.org>
3138 * known-headers.cc (get_stdlib_header_for_name): Return
3139 "<stdbool.h>" for "bool", "true" or "false" when STDLIB_C and
3142 2020-05-20 Nathan Sidwell <nathan@acm.org>
3144 * c-common.c (try_to_locate_new_include_insertion_point): Revert change.
3146 * c-common.c (try_to_locate_new_include_insertion_point): Use
3147 strcmp to compare filenames.
3148 * c-lex.c (init_c_lex): Move declaration to initialization.
3149 * c-opts.c (handle_deferred_opts): Move cpp_get_deps call into
3150 deferred count loop.
3152 2020-05-15 Jason Merrill <jason@redhat.com>
3154 * c-opts.c (set_std_cxx20): Set flag_coroutines.
3156 2020-05-13 Jason Merrill <jason@redhat.com>
3158 * c.opt (std=c++20): Make c++2a the alias.
3159 (std=gnu++20): Likewise.
3160 * c-common.h (cxx_dialect): Change cxx2a to cxx20.
3162 * c-cppbuiltin.c: Adjust.
3163 * c-ubsan.c: Adjust.
3166 2020-05-12 Eric Botcazou <ebotcazou@adacore.com>
3168 * c-ada-spec.c (dump_ads): Output pragma Warnings ("U"); on entry.
3170 2020-05-08 Nathan Sidwell <nathan@acm.org>
3172 Reimplement directives only processing.
3173 * c-ppoutput.c (token_streamer): Ne.
3174 (directives_only_cb): New. Swallow ...
3175 (print_lines_directives_only): ... this.
3176 (scan_translation_unit_directives_only): Reimplment using the
3177 published interface.
3179 2020-05-07 Marek Polacek <polacek@redhat.com>
3181 * c-format.c (badwords): Add "nonstatic".
3183 202-05-07 Jakub Jelinek <jakub@redhat.com>
3186 * c-common.c (speculation_safe_value_resolve_params): Return false if
3187 error_operand_p (val2).
3188 (resolve_overloaded_builtin) <case BUILT_IN_SPECULATION_SAFE_VALUE_N>:
3189 Remove extraneous semicolon.
3191 2020-05-06 qing zhao <qing.zhao@oracle.com>
3194 * c-indentation.c (get_visual_column): Add a hint to use the new
3195 -flarge-source-files option.
3197 2020-05-05 Stefan Schulze Frielinghaus <stefansf@linux.ibm.com>
3199 * c-attribs.c (handle_vector_size_attribute): Add attribute
3200 nonnull for argument args in order to silence warning of
3201 uninitialized variable usage. Since this is local to the
3202 compilation unit and thus cannot be checked at call sides by the
3203 compiler, added an assert statement in order to verify this.
3205 2020-05-01 H.J. Lu <hongjiu.lu@intel.com>
3208 * c-attribs.c (handle_patchable_function_entry_attribute): Limit
3209 value to USHRT_MAX (65535).
3211 2020-04-29 Jakub Jelinek <jakub@redhat.com>
3213 * c-format.c (PP_FORMAT_CHAR_TABLE): Add %{ and %}.
3215 2020-04-27 Jakub Jelinek <jakub@redhat.com>
3218 * c-common.c (resolve_overloaded_builtin): Return error_mark_node for
3219 fncode == BUILT_IN_NONE before initialization of first_param.
3221 2020-04-23 Marek Polacek <polacek@redhat.com>
3224 * c-attribs.c (find_tm_attribute): Use get_attribute_name instead of
3227 2020-04-14 Patrick Palka <ppalka@redhat.com>
3230 * c-pretty-print.c (pp_c_pointer) <case REFERENCE_TYPE>: Print a double
3231 ampersand if it's an rvalue reference type.
3233 2020-04-13 Martin Sebor <msebor@redhat.com>
3236 * c-pretty-print.c (c_pretty_printer::direct_abstract_declarator): Avoid
3237 printing array bound for flexible array members.
3239 2020-04-13 Iain Sandoe <iain@sandoe.co.uk>
3241 * c-cppbuiltin.c (c_cpp_builtins): Update coroutines builtin
3244 2020-04-02 Richard Biener <rguenther@suse.de>
3247 * c-opts.c (c_common_post_options): Enable -ffinite-loops
3248 for -O2 and C++11 or newer.
3250 2020-03-28 Patrick Palka <ppalka@redhat.com>
3252 * c.opt: Add -fconcepts-diagnostics-depth.
3254 2020-03-27 Martin Sebor <msebor@redhat.com>
3257 * c-attribs.c (handle_copy_attribute): Avoid passing expressions
3258 to decl_attributes. Make handling of different kinds of entities
3261 2020-03-27 Martin Sebor <msebor@redhat.com>
3264 * c-attribs.c (handle_access_attribute): Avoid setting TYPE_ATTRIBUTES
3267 2020-03-23 Jakub Jelinek <jakub@redhat.com>
3270 * c-warn.c (warnings_for_convert_and_check): For expr and/or
3271 result being COMPOUND_EXPRs, skip to ultimate rhs.
3273 2020-03-20 Richard Sandiford <richard.sandiford@arm.com>
3276 * c-common.c (c_common_type_for_mode): Before using a registered
3277 built-in type, check that the vectorness of the type matches
3278 the vectorness of the mode.
3280 2020-03-17 Jakub Jelinek <jakub@redhat.com>
3282 * c-common.c (resolve_overloaded_builtin): Fix up duplicated word
3283 issue in a diagnostic message.
3285 2020-03-15 Lewis Hyatt <lhyatt@gmail.com>
3287 * c.opt: Avoid redundancy in the help text.
3289 2020-03-02 Marek Polacek <polacek@redhat.com>
3291 PR c++/93958 - add missing -std=gnu++20.
3292 * c.opt: Add -std=gnu++20.
3294 2020-03-01 Martin Sebor <msebor@redhat.com>
3297 * c-attribs.c (append_access_attrs): Correctly handle attribute.
3298 (handle_access_attribute): Same.
3300 2020-02-25 Jakub Jelinek <jakub@redhat.com>
3303 * c-pragma.c (handle_pragma_diagnostic): Add missing ? after
3304 "did you mean" hint in diagnostics.
3306 2020-02-15 Jason Merrill <jason@redhat.com>
3308 * c.opt: Add -std=c++20.
3310 2020-02-14 Eric Botcazou <ebotcazou@adacore.com>
3312 * c-ada-spec.c: Include bitmap.h.
3313 (dump_ada_double_name): Rename into...
3314 (dump_anonymous_type_name): ...this. Always use the TYPE_UID.
3315 (dump_ada_array_type): Adjust to above renaming. Robustify.
3316 (dump_nested_types_1): New function copied from... Add dumped_types
3317 parameter and pass it down to dump_nested_type.
3318 (dump_nested_types): ...this. Remove parent parameter. Just call
3319 dump_nested_types_1 on an automatic bitmap.
3320 (dump_nested_type): Add dumped_types parameter.
3321 <ARRAY_TYPE>: Do not dump it if already present in dumped_types.
3322 Adjust recursive calls and adjust to above renaming.
3323 (dump_ada_declaration): Adjust call to dump_nested_types.
3324 Tidy up and adjust to above renaming.
3325 (dump_ada_specs): Initialize and release bitmap obstack.
3327 2020-02-10 Martin Sebor <msebor@redhat.com>
3330 * c-attribs.c (handle_access_attribute): Correct off-by-one mistakes.
3332 2020-02-10 Jakub Jelinek <jakub@redhat.com>
3335 * c-format.c (check_plain): Fix up last argument of strncasecmp.
3336 Remove useless extra test.
3338 2020-02-03 Julian Brown <julian@codesourcery.com>
3339 Tobias Burnus <tobias@codesourcery.com>
3341 * c-cppbuiltin.c (c_cpp_builtins): Update _OPENACC define to 201711.
3343 2020-01-29 Jason Merrill <jason@redhat.com>
3346 * c-attribs.c (check_cxx_fundamental_alignment_constraints): Remove.
3348 2020-01-23 Jason Merrill <jason@redhat.com>
3350 * c-warn.c (conversion_warning): Change -Wsign-conversion handling.
3352 2020-01-23 Martin Sebor <msebor@redhat.com>
3355 * c-common.c (check_function_arguments): Avoid overlap checking
3356 of sprintf functions.
3358 2020-01-22 Jason Merrill <jason@redhat.com>
3360 PR testsuite/93391 - PR 40752 test fails with unsigned plain char.
3362 * c-warn.c (conversion_warning): Check operands only after checking
3363 the whole expression. Don't check second operand of + for sign.
3365 2020-01-21 Jason Merrill <jason@redhat.com>
3366 Manuel López-Ibáñez <manu@gcc.gnu.org>
3368 PR c++/40752 - useless -Wconversion with short +=.
3369 * c.opt (-Warith-conversion): New.
3370 * c-warn.c (conversion_warning): Recurse for operands of
3371 operators. Only warn about the whole expression with
3374 2020-01-21 Jason Merrill <jason@redhat.com>
3376 * c-common.c (unsafe_conversion_p): Don't warn, return UNSAFE_SIGN.
3377 * c-warn.c (conversion_warning): Warn about UNSAFE_SIGN.
3379 2020-01-20 Nathan Sidwell <nathan@acm.org>
3381 PR preprocessor/80005
3382 * c-cppbuiltins.c (c_cpp_builtins): Don't define __has_include{,_next}.
3384 2020-01-18 Iain Sandoe <iain@sandoe.co.uk>
3386 * c-common.c (co_await, co_yield, co_return): New.
3387 * c-common.h (RID_CO_AWAIT, RID_CO_YIELD,
3388 RID_CO_RETURN): New enumeration values.
3389 (D_CXX_COROUTINES): Bit to identify coroutines are active.
3390 (D_CXX_COROUTINES_FLAGS): Guard for coroutine keywords.
3391 * c-cppbuiltin.c (__cpp_coroutines): New cpp define.
3392 * c.opt (fcoroutines): New command-line switch.
3394 2020-01-10 David Malcolm <dmalcolm@redhat.com>
3396 * c-format.c (local_event_ptr_node): New.
3397 (PP_FORMAT_CHAR_TABLE): Add entry for "%@".
3398 (init_dynamic_diag_info): Initialize local_event_ptr_node.
3399 * c-format.h (T_EVENT_PTR): New define.
3401 2020-01-10 Martin Sebor <msebor@redhat.com>
3404 * c-attribs.c (append_access_attrs): Validate against the translated
3405 access string rather than the human-readable representation.
3407 2020-01-01 Jakub Jelinek <jakub@redhat.com>
3409 Update copyright years.
3411 2019-12-20 Eric Botcazou <ebotcazou@adacore.com>
3413 * c-ada-spec.h (decl_sloc): Delete.
3414 * c-ada-spec.c (decl_sloc): Make static.
3416 2019-12-19 Julian Brown <julian@codesourcery.com>
3418 * c-common.h (c_omp_map_clause_name): Add prototype.
3419 * c-omp.c (c_omp_map_clause_name): New function.
3420 * c-pragma.h (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ATTACH and
3421 PRAGMA_OACC_CLAUSE_DETACH.
3423 2019-12-19 Julian Brown <julian@codesourcery.com>
3424 Maciej W. Rozycki <macro@codesourcery.com>
3425 Tobias Burnus <tobias@codesourcery.com>
3426 Thomas Schwinge <thomas@codesourcery.com>
3428 * c-pragma.h (pragma_omp_clause): Add
3429 PRAGMA_OACC_CLAUSE_NO_CREATE.
3431 2019-12-17 Martin Sebor <msebor@redhat.com>
3434 * c.opt (-Wmismatched-tags, -Wredundant-tags): New options.
3436 2019-12-11 David Malcolm <dmalcolm@redhat.com>
3438 * c-pretty-print.c (c_pretty_printer::clone): New vfunc
3440 * c-pretty-print.h (c_pretty_printer::clone): New vfunc decl.
3442 2019-12-09 David Malcolm <dmalcolm@redhat.com>
3444 * c-format.c (range_label_for_format_type_mismatch::get_text):
3445 Replace label_text ctor called with true with label_text::take.
3447 2019-12-09 David Malcolm <dmalcolm@redhat.com>
3449 * c-format.c (selftest::test_type_mismatch_range_labels): Remove
3450 initial newline from expected outputs.
3451 * c-opts.c (c_diagnostic_finalizer): Add pp_newline call before
3452 call to diagnostic_show_locus.
3454 2019-12-06 Jakub Jelinek <jakub@redhat.com>
3456 * c-cppbuiltin.c (c_cpp_builtins): Don't define __cpp_consteval for
3459 2019-12-05 Marek Polacek <polacek@redhat.com>
3460 Jakub Jelinek <jakub@redhat.com>
3462 PR c++/91353 - P1331R2: Allow trivial default init in constexpr contexts.
3463 * c-cppbuiltin.c (c_cpp_builtins): Adjust the value of __cpp_constexpr.
3465 2019-12-05 Marek Polacek <polacek@redhat.com>
3467 PR c++/92271 - make __is_same alias for __is_same_as.
3468 * c-common.c: Add __is_same, an alias for __is_same_as.
3470 2019-12-03 Marek Polacek <polacek@redhat.com>
3472 PR c++/91363 - P0960R3: Parenthesized initialization of aggregates.
3473 * c-cppbuiltin.c (c_cpp_builtins): Predefine
3474 __cpp_aggregate_paren_init=201902 for -std=c++2a.
3476 2019-11-30 Jan Hubicka <hubicka@ucw.cz>
3478 * c-attribs.c (handle_symver_attribute): New function
3479 (c_common_attributes): Add symver.
3481 2019-11-30 Richard Sandiford <richard.sandiford@arm.com>
3483 * c-common.c (pointer_int_sum): Use verify_type_context to check
3484 whether the target allows pointer arithmetic for the types involved.
3485 (c_sizeof_or_alignof_type, c_alignof_expr): Use verify_type_context
3486 to check whether the target allows sizeof and alignof operations
3487 for the types involved.
3489 2019-11-27 Jason Merrill <jason@redhat.com>
3491 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_deduction_guides.
3493 2019-11-26 Jakub Jelinek <jakub@redhat.com>
3496 * c-attribs.c (handle_mode_attribute): Add mode attribute to
3499 2019-11-25 Joseph Myers <joseph@codesourcery.com>
3502 * c-common.c (c_common_type_for_mode): Handle decimal
3503 floating-point types being NULL_TREE.
3504 * c-format.c (get_format_for_type_1): Handle specified types being
3506 * c-lex.c (interpret_float): Give an error for decimal
3507 floating-point constants when decimal floating-point not
3510 2019-11-23 Jakub Jelinek <jakub@redhat.com>
3513 * c-attribs.c (append_access_attrs): Avoid buffer overflow. Avoid
3514 memory leak. Use XNEWVEC macro. Use auto_diagnostic_group to
3515 group warning with inform together.
3516 (handle_access_attribute): Formatting fix.
3518 2019-11-22 Jakub Jelinek <jakub@redhat.com>
3521 * c-common.h (identifier_global_tag): Declare.
3522 * c-format.c (get_pointer_to_named_type): Renamed to ...
3523 (get_named_type): ... this. Use identifier_global_tag instead of
3524 identifier_global_value, handle the return value being a TYPE_P.
3525 (init_dynamic_diag_info): Adjust get_pointer_to_named_type callers
3526 to call get_named_type instead. Formatting fixes.
3528 Implement P1902R1, Missing feature-test macros 2017-2019.
3529 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_init_captures
3530 and __cpp_generic_lambdas for -std=c++2a. Define
3531 __cpp_designated_initializers, __cpp_constexpr_in_decltype and
3532 __cpp_consteval for -std=c++2a. Remove a FIXME comment about
3533 __cpp_concepts for -std=c++2a.
3535 2019-11-22 Martin Sebor <msebor@redhat.com>
3538 * c-attribs.c (handle_access_attribute): New function.
3539 (c_common_attribute_table): Add new attribute.
3540 (get_argument_type): New function.
3541 (append_access_attrs): New function.
3542 (get_nonnull_operand): Rename...
3543 (get_attribute_operand): ...to this.
3544 * c-common.c (get_nonnull_operand): Rename...
3545 (get_attribute_operand): ...to this.
3547 2019-11-21 Joseph Myers <joseph@codesourcery.com>
3549 * c-attribs.c (handle_fallthrough_attribute): Use pedwarn instead
3552 2019-11-19 Joseph Myers <joseph@codesourcery.com>
3554 * c-common.c (attribute_fallthrough_p): In C, use pedwarn not
3555 warning for standard attributes mixed with fallthrough attributes.
3557 2019-11-15 Joseph Myers <joseph@codesourcery.com>
3559 * c-attribs.c (handle_fallthrough_attribute): Remove static.
3560 * c-common.h (handle_fallthrough_attribute): Declare.
3562 2019-11-15 Joseph Myers <joseph@codesourcery.com>
3564 * c-attribs.c (handle_deprecated_attribute): Remove static.
3565 * c-common.h (handle_deprecated_attribute): Declare.
3567 2019-11-14 Joseph Myers <joseph@codesourcery.com>
3569 * c-lex.c (lex_charconst): Make CPP_UTF8CHAR constants unsigned
3572 2019-11-14 Jakub Jelinek <jakub@redhat.com>
3574 * c-omp.c (c_omp_check_context_selector): Add nvidia to the list of
3577 * c-omp.c (c_omp_check_context_selector): Handle name lists
3578 containing string literals. Don't diagnose atomic_default_mem_order
3579 with multiple props.
3581 2019-11-13 Joseph Myers <joseph@codesourcery.com>
3583 * c-cppbuiltin.c (builtin_define_float_constants): Also define
3584 NORM_MAX constants. Update call to get_max_float.
3585 (LAZY_HEX_FP_VALUES_CNT): Update value to include NORM_MAX
3588 2019-11-13 Eric Botcazou <ebotcazou@adacore.com>
3590 * c-ada-spec.c (get_underlying_decl): Do not look through typedefs.
3591 (dump_forward_type): Do not generate a declaration for function types.
3592 (dump_nested_type) <ARRAY_TYPE>: Do not generate a nested declaration
3593 of the component type if it is declared in another file.
3595 2019-11-12 Martin Liska <mliska@suse.cz>
3597 * c-opts.c (c_common_post_options):
3598 Use SET_OPTION_IF_UNSET.
3600 2019-11-12 Maciej W. Rozycki <macro@codesourcery.com>
3601 Frederik Harwath <frederik@codesourcery.com>
3604 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_SERIAL enumeration
3606 * c-pragma.c (oacc_pragmas): Add "serial" entry.
3608 2019-11-08 Richard Sandiford <richard.sandiford@arm.com>
3610 * c-common.h (gnu_vector_type_p): New function.
3611 * c-common.c (c_build_vec_perm_expr): Require __builtin_shuffle
3612 vectors to satisfy gnu_vector_type_p.
3613 (c_build_vec_convert): Likewise __builtin_convertvector.
3614 (convert_vector_to_array_for_subscript): Likewise when applying
3615 implicit vector to array conversion.
3616 (scalar_to_vector): Likewise when converting vector-scalar
3617 operations to vector-vector operations.
3619 2019-11-08 Joseph Myers <joseph@codesourcery.com>
3621 * c.opt (Wold-style-definition): Initialize to -1.
3622 * c-opts.c (c_common_post_options): Set warn_old_style_definition
3623 to flag_isoc2x if not set explicitly.
3625 2019-11-07 Joseph Myers <joseph@codesourcery.com>
3627 * c-attribs.c (parse_tm_stmt_attr): Handle scoped attributes.
3629 2019-11-05 Jason Merrill <jason@redhat.com>
3631 * c-opts.c (c_common_post_options): -fconcepts-ts implies
3634 2019-11-04 Kamlesh Kumar <kamleshbhalui@gmail.com>
3636 * c-opts.c (c_common_post_options): Update
3639 2019-11-02 Jakub Jelinek <jakub@redhat.com>
3641 * c-common.h (c_omp_get_context_selector): Remove.
3642 * c-omp.c (c_omp_get_context_selector): Moved to omp-general.c
3643 and renamed to omp_get_context_selector.
3645 * c-omp.c (c_omp_mark_declare_variant): Use
3646 omp_context_selector_set_compare.
3648 PR c++/88335 - Implement P1073R3: Immediate functions
3649 * c-common.h (enum rid): Add RID_CONSTEVAL.
3650 * c-common.c (c_common_reswords): Add consteval.
3652 2019-11-01 Martin Sebor <msebor@redhat.com>
3658 * c-pretty-print.c (direct_abstract_declarator): Print
3659 bound in zero-length arrays.
3660 * c.opt (-Wzero-length-bounds): New option.
3662 2019-10-30 Nathan Sidwell <nathan@acm.org>
3664 * c-cppbuiltin.c (c_cpp_builtins): Add 'L' suffix to feature
3667 2019-10-28 Martin Sebor <msebor@redhat.com>
3670 * c-common.c (c_common_nodes_and_builtins): Call c_define_builtins
3671 even when only preprocessing.
3672 * c-common.h (names_builtin_p): Declare new function.
3673 * c-lex.c (init_c_lex): Set has_builtin.
3674 (c_common_has_builtin): Define a new function.
3675 * c-ppoutput.c (init_pp_output): Set has_builtin.
3677 2019-10-24 Jakub Jelinek <jakub@redhat.com>
3679 * c-common.h (c_omp_context_selector_matches): Remove.
3680 * c-omp.c (c_omp_context_selector_matches): Remove.
3681 * c-attribs.c (c_common_attribute_table): Add
3682 "omp declare target {host,nohost,block}" attributes.
3684 2019-10-17 JeanHeyd Meneide <phdofthehouse@gmail.com>
3686 * c-lex.c (c_common_has_attribute): Update nodiscard value.
3688 2019-10-14 Richard Sandiford <richard.sandiford@arm.com>
3690 * c-common.h (user_facing_original_type_p): Declare.
3691 * c-common.c: Include c-spellcheck.h.
3692 (user_facing_original_type_p): New function.
3694 2019-10-12 Jakub Jelinek <jakub@redhat.com>
3696 * c-common.h (c_omp_mark_declare_variant,
3697 c_omp_context_selector_matches): Declare.
3698 * c-omp.c: Include attribs.h, gimplify.h, cgraph.h, symbol-summary.h
3700 (c_omp_get_context_selector): Support second argument NULL.
3701 (c_omp_mark_declare_variant, c_omp_context_selector_matches): New
3703 * c-attribs.c (c_common_attribute_table): Remove "omp declare variant"
3704 attribute, add "omp declare variant base" and
3705 "omp declare variant variant" attributes.
3707 2019-10-11 Joseph Myers <joseph@codesourcery.com>
3709 * c.opt (Wc11-c2x-compat): Add CPP(cpp_warn_c11_c2x_compat)
3710 CppReason(CPP_W_C11_C2X_COMPAT).
3712 2019-10-11 Joseph Myers <joseph@codesourcery.com>
3714 * c-common.c (c_common_reswords): Do not use D_EXT for _Decimal32,
3715 _Decimal64 and _Decimal128.
3717 2019-10-10 Joseph Myers <joseph@codesourcery.com>
3719 * c-cppbuiltin.c (c_cpp_builtins): Do not define macros for DFP
3720 types if DFP not supported.
3722 2019-10-10 Jakub Jelinek <jakub@redhat.com>
3724 * c-common.h (c_omp_check_context_selector,
3725 c_omp_get_context_selector): Declare.
3726 * c-omp.c (c_omp_declare_simd_clauses_to_numbers): Fix spelling
3727 in diagnostic message.
3728 (c_omp_check_context_selector, c_omp_get_context_selector): New
3730 * c-attribs.c (c_common_attribute_table): Add "omp declare variant"
3732 (handle_omp_declare_variant_attribute): New function.
3734 2019-10-09 Martin Sebor <msebor@redhat.com>
3736 PR tree-optimization/90879
3737 * c.opt (-Wstring-compare): New option.
3739 2019-10-08 Andrew Sutton <asutton@lock3software.com>
3740 Jason Merrill <jason@redhat.com>
3742 Update the concepts implementation to conform to the C++20
3743 specification, improve compile times, and generally clean up
3746 * c-cppbuiltin.c (c_cpp_builtins): Use new feature test values for
3747 concepts when -std=c++2a. Bump __cpp_concepts to 201907.
3748 * c.opt: Add -Wconcepts-ts.
3749 * c-opts.c (c_common_post_options): Warn when -fconcepts is used
3750 with -std=c++2a. Disable warning for -fconcepts in C++20 mode.
3751 (set_std_cxx2a): Enable concepts by default.
3753 2019-10-08 Joseph Myers <joseph@codesourcery.com>
3755 * c-opts.c (c_common_post_options): Set
3756 -fno-fp-int-builtin-inexact for C2X.
3758 2019-10-05 Jakub Jelinek <jakub@redhat.com>
3760 PR c++/91369 - Implement P0784R7: constexpr new
3761 * c-cppbuiltin.c (c_cpp_builtins): Predefine
3762 __cpp_constexpr_dynamic_alloc=201907 for -std=c++2a.
3764 2019-10-04 Joseph Myers <joseph@codesourcery.com>
3767 * c-format.c (C_STD_VER): Handle C2x.
3768 (C_STD_NAME): Likewise.
3769 (strftime_flag_specs): Add 'O' modifier with 'p' flag.
3770 (time_char_table): Use separate entry for 'B' and 'b', with 'O'
3771 modifier allowed and 'p' flag.
3772 * c-format.h (enum format_std_version): Add STD_C2X.
3773 (struct format_char_info): Mention 'p' in comment on flags2.
3775 2019-10-01 David Malcolm <dmalcolm@redhat.com>
3777 * c-opts.c (c_diagnostic_finalizer): Temporarily clear prefix when
3778 calling diagnostic_show_locus, rather than destroying it afterwards.
3780 2019-10-01 Jakub Jelinek <jakub@redhat.com>
3783 * c-warn.c (check_alignment_of_packed_member): Ignore FIELD_DECLs
3784 with NULL DECL_FIELD_OFFSET.
3786 2019-10-01 Richard Sandiford <richard.sandiford@arm.com>
3788 * c-pretty-print.c (pp_c_specifier_qualifier_list): If a vector type
3789 has a type name, use it in preference to the __vector syntax.
3791 2019-09-30 Richard Sandiford <richard.sandiford@arm.com>
3793 * c-pretty-print.c (pp_c_parameter_type_list): Avoid printing
3794 two spaces between a comma and "...".
3796 2019-09-27 Jakub Jelinek <jakub@redhat.com>
3799 * c-common.h (c_omp_predefined_variable): Declare.
3800 * c-omp.c (c_omp_predefined_variable): New function.
3801 (c_omp_predetermined_sharing): Return OMP_CLAUSE_DEFAULT_SHARED
3802 for predefined variables.
3804 2019-09-27 Richard Sandiford <richard.sandiford@arm.com>
3806 * c-common.h (build_function_call_vec): Take the original
3807 function decl as an optional final parameter.
3808 (check_builtin_function_arguments): Take the original function decl.
3809 * c-common.c (check_builtin_function_arguments): Likewise.
3810 Handle all built-in functions, not just BUILT_IN_NORMAL ones.
3811 Use targetm.check_builtin_call to check BUILT_IN_MD functions.
3813 2019-09-15 Jason Merrill <jason@redhat.com>
3815 * c-warn.c (warn_logical_operator): Strip location wrappers. Don't
3816 fold_for_warn in "|| mask" warning.
3818 2019-09-10 Martin Liska <mliska@suse.cz>
3820 * c.opt: Use newly added WarnRemoved.
3822 2019-09-09 Martin Liska <mliska@suse.cz>
3824 * c.opt: Update comment of removed
3825 options that are preserved only for backward
3828 2019-09-06 Martin Liska <mliska@suse.cz>
3831 * c-common.c: Remove definition of flag_use_repository.
3832 * c-common.h: Likewise.
3833 * c-opts.c (c_common_handle_option):
3834 Do not handle OPT_frepo option.
3835 * c.opt: Mark the option with Deprecated.
3837 2019-09-04 Marek Polacek <polacek@redhat.com>
3839 * c.opt (fdeduce-init-list): Ignored.
3841 2019-09-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3844 * c.opt (Wenum-conversion): New option.
3846 2019-09-03 Jozef Lawrynowicz <jozef.l@mittosystems.com>
3848 * c-attribs.c (handle_section_attribute): Call the
3849 handle_generic_attribute target hook after performing target
3850 independent processing.
3851 (handle_noinit_attribute): Likewise.
3853 2019-09-03 Ian Lance Taylor <iant@golang.org>
3855 * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Always expand
3856 when using -fgo-dump-spec.
3858 2019-09-02 Martin Liska <mliska@suse.cz>
3861 * c-common.c (fname_as_string): Use cxx_printable_name for
3862 __PRETTY_FUNCTION__ same as was used before r265711.
3864 2019-08-28 Marek Polacek <polacek@redhat.com>
3866 Implement P1152R4: Deprecating some uses of volatile.
3868 * c-opts.c (c_common_post_options): Enable -Wvolatile by
3869 default for C++2a, unless -Wno-deprecated.
3870 * c.opt (Wvolatile): New warning.
3872 2019-08-28 Marek Polacek <polacek@redhat.com>
3874 PR c++/91360 - Implement C++20 P1143R2: constinit.
3875 * c-common.c (c_common_reswords): Add constinit and __constinit.
3876 (keyword_is_decl_specifier): Handle RID_CONSTINIT.
3877 * c-common.h (enum rid): Add RID_CONSTINIT, RID_FIRST_CXX20, and
3880 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_constinit.
3881 * c-format.c (cxx_keywords): Add "constinit".
3882 * c.opt (Wc++2a-compat, Wc++20-compat): New options.
3884 2019-08-27 Jakub Jelinek <jakub@redhat.com>
3887 * c-common.c (verify_tree): For LSHIFT_EXPR, RSHIFT_EXPR,
3888 COMPONENT_REF and ARRAY_REF in cxx_dialect >= cxx17 mode handle it
3889 like COMPOUND_EXPR rather than normal expression.
3891 2019-08-23 Iain Sandoe <iain@sandoe.co.uk>
3894 * c-lex.c (c_lex_with_flags): Don't call
3895 c_common_no_more_pch () from here.
3897 2019-08-23 Jakub Jelinek <jakub@redhat.com>
3900 * c-common.c (c_ts18661_flt_eval_method): Use flag_excess_precision
3901 instead of flag_excess_precision_cmdline.
3902 * c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): Likewise.
3903 * c-opts.c (c_common_post_options): Likewise.
3905 2019-08-22 Martin Sebor <msebor@redhat.com>
3908 * c-common.c (braced_list_to_string): Add argument and overload.
3909 Handle flexible length arrays and unions.
3911 2019-08-21 Eric Botcazou <ebotcazou@adacore.com>
3913 * c-ada-spec.c (dump_ada_function_declaration): Be prepared for broken
3914 function declarations where arguments are missing. Rename variables.
3916 2019-08-15 Richard Biener <rguenther@suse.de>
3918 * c-common.c (c_stddef_cpp_builtins): When the GIMPLE FE is
3919 enabled, define __SIZETYPE__.
3921 2019-08-14 Christophe Lyon <christophe.lyon@linaro.org>
3923 * c-attribs.c (c_common_attribute_table): Add "noinit" entry. Add
3924 exclusion with "section" attribute.
3925 (attr_noinit_exclusions): New table.
3926 (handle_noinit_attribute): New function.
3928 2019-08-13 Richard Sandiford <richard.sandiford@arm.com>
3931 * c-common.c (resolve_overloaded_builtin): Use
3932 copy_decl_built_in_function.
3934 2019-08-13 Martin Sebor <msebor@redhat.com>
3937 * c-format.c (printf_length_specs): Set FMT_LEN_w for "w".
3938 (asm_fprintf_length_spec): Same.
3939 * c-format.h (format_lengths): Add FMT_LEN_w.
3941 2019-08-10 Jakub Jelinek <jakub@redhat.com>
3943 * c-pragma.h (enum pragma_omp_clause): Add
3944 PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
3946 2019-08-07 Jakub Jelinek <jakub@redhat.com>
3948 * c-pragma.h (enum pragma_omp_clause): Add
3949 PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR. Set PRAGMA_OACC_CLAUSE_USE_DEVICE
3950 equal to PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR instead of being a separate
3953 2019-08-05 Marek Polacek <polacek@redhat.com>
3955 PR c++/91338 - Implement P1161R3: Deprecate a[b,c].
3956 * c-opts.c (c_common_post_options): Enable -Wcomma-subscript by
3957 default for C++2a, unless -Wno-deprecated.
3958 * c.opt (Wcomma-subscript): New warning.
3960 2019-07-20 Jakub Jelinek <jakub@redhat.com>
3962 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_LOOP.
3963 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_BIND.
3964 * c-pragma.c (omp_pragmas_simd): Add PRAGMA_OMP_LOOP entry.
3965 * c-common.h (enum c_omp_clause_split): Add C_OMP_CLAUSE_SPLIT_LOOP.
3966 * c-omp.c (c_omp_split_clauses): Add support for 4 new combined
3967 constructs with the loop construct.
3969 2019-07-13 Jakub Jelinek <jakub@redhat.com>
3972 * c-omp.c (c_omp_split_clauses): Fix a pasto in
3973 OMP_CLAUSE_REDUCTION_TASK handling.
3975 2019-07-12 Jakub Jelinek <jakub@redhat.com>
3977 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ORDER.
3978 * c-omp.c (c_omp_split_clauses): Handle splitting of OMP_CLAUSE_ORDER.
3980 2019-07-09 Martin Sebor <msebor@redhat.com>
3983 * c-opts.c (handle_deferred_opts): Change class-key of PODs to struct
3984 and others to class.
3985 * c-pretty-print.h: Same.
3987 2019-07-09 Martin Sebor <msebor@redhat.com>
3990 * c-format.c (check_argument_type): Change class-key from class to
3991 struct and vice versa to match convention and avoid -Wclass-is-pod
3992 and -Wstruct-no-pod.
3993 * c-pretty-print.h: Same.
3995 2019-07-03 Martin Liska <mliska@suse.cz>
3997 * c-common.c (try_to_locate_new_include_insertion_point): Remove
4000 2019-07-03 Jakub Jelinek <jakub@redhat.com>
4002 * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_REDUCTION_INSCAN
4003 clauses on OMP_FOR rather than OMP_PARALLEL when OMP_FOR is combined
4006 2019-07-02 qing zhao <qing.zhao@oracle.com>
4008 PR preprocessor/90581
4009 * c-opts.c (c_common_handle_option): Handle -fmax-include-depth.
4010 * c.opt: Add new option -fmax-include-depth.
4012 2019-06-26 Jason Merrill <jason@redhat.com>
4014 PR c++/55442 - memory-hog with highly recursive constexpr.
4015 * c.opt (fconstexpr-loop-limit): New.
4017 2019-06-25 Jakub Jelinek <jakub@redhat.com>
4020 * c-omp.c (c_finish_omp_atomic): Allow tree_invariant_p in addition
4021 to SAVE_EXPR in first operand of a COMPOUND_EXPR.
4023 2019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
4025 * c-common.c (c_common_nodes_and_builtins): Define
4026 alternate "__intN__" name for "__intN" types.
4028 2019-06-24 Jan Hubicka <jh@suse.cz>
4030 * c-common.c (braced_lists_to_strings): Check that
4031 type is array or integer prior checking string flag.
4033 2019-06-21 Matthew Beliveau <mbelivea@redhat.com>
4035 PR c++/90875 - added -Wswitch-outside-range option
4036 * c.opt (Wswitch-outside-range): Added new option.
4037 * c-warn.c (c_do_switch_warnings): Use OPT_Wswitch-outside-range.
4039 2019-06-21 Marek Polacek <polacek@redhat.com>
4041 PR c++/90953 - ICE with -Wmissing-format-attribute.
4042 * c-common.c (check_function_arguments_recurse): Use
4044 (check_missing_format_attribute): Likewise.
4046 2019-06-19 Marek Polacek <polacek@redhat.com>
4048 PR c++/60364 - noreturn after first decl not diagnosed.
4049 * c-attribs.c (handle_noreturn_attribute): No longer static.
4050 * c-common.h (handle_noreturn_attribute, attr_noreturn_exclusions):
4052 * c-format.c (check_function_format): Use get_attribute_name.
4054 2019-06-19 Martin Sebor <msebor@redhat.com>
4056 PR translation/90156
4057 * c-format.c (function_format_info::format_type): Adjust type.
4058 (function_format_info::is_raw): New member.
4059 (decode_format_type): Adjust signature. Handle "raw" diag attributes.
4060 (decode_format_attr): Adjust call to decode_format_type.
4061 Avoid a redundant call to convert_format_name_to_system_name.
4062 Avoid abbreviating the word "arguments" in a diagnostic.
4063 (format_warning_substr): New function.
4064 (avoid_dollar_number): Quote dollar sign in a diagnostic.
4065 (finish_dollar_format_checking): Same.
4066 (check_format_info): Same.
4067 (struct baltoks_t): New.
4068 (c_opers, c_keywords, cxx_keywords, badwords, contrs): New arrays.
4069 (maybe_diag_unbalanced_tokens, check_tokens, check_plain): New
4071 (check_format_info_main): Call check_plain. Use baltoks_t. Call
4072 maybe_diag_unbalanced_tokens.
4073 (handle_format_attribute): Spell out the word "arguments" in
4076 2019-06-11 Matthew Beliveau <mbelivea@redhat.com>
4078 PR c++/90449 - add -Winaccessible-base option.
4079 * c.opt (Winaccessible-base): New option.
4081 2019-06-10 Jakub Jelinek <jakub@redhat.com>
4083 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_SCAN.
4084 * c-pragma.c (omp_pragmas_simd): Add #pragma omp scan.
4085 * c-omp.c (c_omp_split_clauses): Diagnose inscan reductions on
4086 combined/composite constructs where it is not allowed. Copy over
4087 OMP_CLAUSE_REDUCTION_INSCAN.
4089 2019-06-05 Martin Sebor <msebor@redhat.com>
4091 * c-attribs.c (handle_mode_attribute): Adjust quoting and hyphenation.
4092 (handle_alias_ifunc_attribute): Same.
4093 (handle_copy_attribute): Same.
4094 (handle_weakref_attribute): Same.
4095 (handle_nonnull_attribute): Same.
4096 * c-warn.c (warn_for_sign_compare): Same.
4097 (warn_for_restrict): Same.
4100 2019-06-05 Martin Sebor <msebor@redhat.com>
4102 * c-pragma.c (handle_pragma_weak): Adjust quoting in a diagnostic.
4103 * c.opt (-Wformat-diag): Remove a spurious period.
4105 2019-05-29 Jakub Jelinek <jakub@redhat.com>
4108 * c-common.c (check_builtin_function_arguments)
4109 <case BUILTIN_*_OVERFLOW>: Diagnose pointer to const qualified integer
4112 2019-05-23 Eric Botcazou <ebotcazou@adacore.com>
4114 * c-ada-spec.c (compare_node): Compare the DECL_UIDs as a last resort.
4116 2019-05-22 Martin Liska <mliska@suse.cz>
4119 * c-attribs.c (handle_copy_attribute): Do not copy
4120 target_clones attribute.
4122 2019-05-21 Eric Botcazou <ebotcazou@adacore.com>
4124 * c-ada-spec.h (enum cpp_operation): Add IS_ASSIGNMENT_OPERATOR.
4125 * c-ada-spec.c (print_assignment_operator): New function.
4126 (dump_ada_declaration) <FUNCTION_DECL>: Call it do dump explicit copy
4127 assignment operators declared as methods and filter out the others.
4129 2019-05-17 Thomas Schwinge <thomas@codesourcery.com>
4132 * c-attribs.c (c_common_attribute_table): Set min_len to -1 for
4133 "omp declare target".
4135 2019-05-16 Martin Sebor <msebor@redhat.com>
4137 * c-attribs.c (handle_no_sanitize_attribute): Quote identifiers,
4138 keywords, operators, and types in diagnostics.
4139 (handle_scalar_storage_order_attribute): Same.
4140 (handle_mode_attribute): Same.
4141 (handle_visibility_attribute): Same.
4142 (handle_assume_aligned_attribute): Same.
4143 (handle_no_split_stack_attribute): Same.
4144 * c-common.c (shorten_compare): Same.
4145 (c_common_truthvalue_conversion): Same.
4146 (cb_get_source_date_epoch): Same.
4147 * c-lex.c (cb_def_pragma): Quote keywords, operators, and types
4149 (interpret_float): Same.
4150 * c-omp.c (c_finish_omp_for): Same.
4151 * c-opts.c (c_common_post_options): Same.
4152 * c-pch.c (c_common_pch_pragma): Same.
4153 * c-pragma.c (pop_alignment): Same.
4154 (handle_pragma_pack): Same.
4155 (apply_pragma_weak): Same.
4156 (handle_pragma_weak): Same.
4157 (handle_pragma_scalar_storage_order): Same.
4158 (handle_pragma_redefine_extname): Same.
4159 (add_to_renaming_pragma_list): Same.
4160 (maybe_apply_renaming_pragma): Same.
4161 (push_visibility): Same.
4162 (handle_pragma_visibility): Same.
4163 (handle_pragma_optimize): Same.
4164 (handle_pragma_message): Same.
4165 * c-warn.c (warn_for_omitted_condop): Same.
4166 (lvalue_error): Same.
4168 2019-05-15 Richard Biener <rguenther@suse.de>
4171 * c-common.c (c_common_mark_addressable_vec): Also mark
4172 a COMPOUND_LITERAL_EXPR_DECL addressable similar to
4175 2019-05-06 Nathan Sidwell <nathan@acm.org>
4177 * c-opts.c (handle_defered_opts): Rename struct deps to struc mkdeps.
4179 2019-04-30 Nathan Sidwell <nathan@acm.org>
4181 * c-common.c (c_common_init_ts): Use MARK_TS_EXP. Mark SIZEOF_EXPR.
4183 2019-04-30 Martin Liska <mliska@suse.cz>
4185 * c-pragma.c (handle_pragma_diagnostic): Provide hints
4186 for unknown options.
4188 2019-04-26 Richard Sandiford <richard.sandiford@arm.com>
4190 * c-warn.c (strict_aliasing_warning): Apply COMPLETE_TYPE_P to
4191 the pointer target rather than the pointer itself.
4193 2019-04-19 Jakub Jelinek <jakub@redhat.com>
4196 * c-common.h (c_add_case_label): Remove orig_type and outside_range_p
4198 (c_do_switch_warnings): Remove outside_range_p argument.
4199 * c-common.c (check_case_bounds): Removed.
4200 (c_add_case_label): Remove orig_type and outside_range_p arguments.
4201 Don't call check_case_bounds. Fold low_value as well as high_value.
4202 * c-warn.c (c_do_switch_warnings): Remove outside_range_p argument.
4203 Check for case labels outside of range of original type here and
4206 2019-04-12 Jakub Jelinek <jakub@redhat.com>
4208 PR translation/90041
4209 * c.opt (-fhandle-exceptions): Use %< and %> around option names
4210 in the Warn diagnostics.
4213 * c-attribs.c (handle_patchable_function_entry_attribute): Add
4214 function comment. Warn if arguments of the attribute are not positive
4217 2019-04-09 Eric Botcazou <ebotcazou@adacore.com>
4219 * c-ada-spec.c (print_destructor): Deal with deleting destructors.
4220 (dump_ada_declaration) <FUNCTION_DECL>: Likewise.
4222 2019-04-07 Eric Botcazou <ebotcazou@adacore.com>
4224 * c-ada-spec.c (is_float128): New predicate extracted from...
4225 (dump_ada_node) <COMPLEX_TYPE>: Use it to recognize __cfloat128.
4226 <REAL_TYPE>: ...here. Call it.
4228 2019-04-05 David Malcolm <dmalcolm@redhat.com>
4231 * c-warn.c (check_address_or_pointer_of_packed_member): Add
4232 auto_diagnostic_group. Guard inform calls by result of
4235 2019-04-05 Marek Polacek <polacek@redhat.com>
4237 PR c++/89973 - -Waddress-of-packed-member ICE with invalid conversion.
4238 * c-warn.c (check_address_or_pointer_of_packed_member): Check the type
4241 2019-04-03 Jason Merrill <jason@redhat.com>
4243 PR c++/86586 - -fcompare-debug=-Wsign-compare.
4244 * c-warn.c (warn_for_sign_compare): Call fold_for_warn.
4246 2019-04-01 Martin Sebor <msebor@redhat.com>
4249 * c-attribs.c (handle_copy_attribute): Handle references and
4250 non-constant expressions.
4252 2019-03-22 Jakub Jelinek <jakub@redhat.com>
4255 * c.opt (-fconstexpr-ops-limit=): New option.
4257 2019-03-21 Jakub Jelinek <jakub@redhat.com>
4259 * c-common.c (per_file_includes_t): Use false as Lazy in hash_set
4262 2019-03-19 Martin Sebor <msebor@redhat.com>
4264 PR tree-optimization/89688
4265 * c-common.c (braced_list_to_string): Make static.
4266 (braced_lists_to_strings): Define new function.
4267 * c-common.h (braced_list_to_string): Remove.
4268 (braced_lists_to_strings): Declare.
4270 2019-03-12 Martin Liska <mliska@suse.cz>
4272 * c-opts.c (c_common_handle_option): Wrap option with %< and %>.
4274 2019-03-11 Martin Liska <mliska@suse.cz>
4276 * c-opts.c (c_common_post_options): Wrap apostrophes
4277 in gcc internal format with %'.
4279 2019-03-11 Martin Liska <mliska@suse.cz>
4281 * c-attribs.c (handle_nocf_check_attribute): Wrap an option name
4282 in a string format message and fix GNU coding style.
4283 * c-common.c (vector_types_convertible_p): Likewise.
4284 (c_build_vec_perm_expr): Likewise.
4285 * c-indentation.c (get_visual_column): Likewise.
4286 * c-opts.c (c_common_handle_option): Likewise.
4287 (c_common_post_options): Likewise.
4288 (sanitize_cpp_opts): Likewise.
4289 * c-pch.c (c_common_pch_pragma): Likewise.
4290 * c-pragma.c (handle_pragma_pack): Likewise.
4292 2019-03-08 Jakub Jelinek <jakub@redhat.com>
4294 PR tree-optimization/89550
4295 * c-common.c (c_common_truthvalue_conversion): Only set
4296 TREE_NO_WARNING if warning_at returned true.
4297 * c-warn.c (overflow_warning, warn_logical_operator): Likewise.
4299 2019-02-25 Sandra Loosemore <sandra@codesourcery.com>
4300 Martin Sebor <msebor@gmail.com>
4302 * c.opt (Wmissing-attributes): Clean up doc string.
4304 2019-02-25 Jakub Jelinek <jakub@redhat.com>
4307 * c-format.c (maybe_read_dollar_number): Compute nargnum in
4308 HOST_WIDE_INT type to avoid overflows and change overflow_flag
4311 2019-02-22 Richard Biener <rguenther@suse.de>
4313 * c-pch.c (no_checksum): Remove.
4314 (pch_init): Remove assertion that executable_checksum is not
4316 (c_common_valid_pch): Likewise.
4318 2019-02-18 Martin Sebor <msebor@redhat.com>
4321 * c-common.c (invalid_array_size_error): Handle cst_size_not_constant.
4323 2019-02-16 David Malcolm <dmalcolm@redhat.com>
4326 * c-common.c (shorten_compare): Call fold_for_warn on op0 when
4327 implementing -Wtype-limits.
4329 2019-02-11 Martin Sebor <msebor@redhat.com>
4332 * c-common.c (invalid_array_size_error): New function.
4333 (valid_array_size_p): Call it. Handle size as well as type.
4334 * c-common.h (valid_constant_size_p): New function.
4335 (enum cst_size_error): New type.
4337 2019-01-31 David Malcolm <dmalcolm@redhat.com>
4340 * known-headers.cc (get_stdlib_header_for_name): Add
4341 {FLT|DBL|LDBL}_{MAX|MIN} to "hints" array.
4343 2019-01-31 Jakub Jelinek <jakub@redhat.com>
4346 * c-pretty-print.c (pp_c_enumeration_constant): Print always as
4347 a C cast in pp_c_flag_gnu_v3 mode.
4349 2019-01-29 Jakub Jelinek <jakub@redhat.com>
4352 * c-common.c (c_common_nodes_and_builtins): Build type variants for
4353 builtin_structptr_types types even for C.
4355 2019-01-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
4357 * c-warn.c (check_address_or_pointer_of_packed_member): Handle the case
4358 when rhs is of array type correctly. Fix handling of nested structures.
4359 Fix handling of indirect_ref together with nop_expr and/or addr_expr.
4360 (check_and_warn_address_or_pointer_of_packed_member): Fix handling of
4361 type casts within nested compound expressions.
4363 2019-01-22 Jakub Jelinek <jakub@redhat.com>
4366 * c-omp.c (c_finish_omp_atomic): For bitfield atomics, update type
4367 variable after using BIT_FIELD_REF.
4369 2019-01-18 H.J. Lu <hongjiu.lu@intel.com>
4373 * c-common.h (warn_for_address_or_pointer_of_packed_member):
4374 Remove the boolean argument.
4375 * c-warn.c (check_address_of_packed_member): Renamed to ...
4376 (check_address_or_pointer_of_packed_member): This. Also
4377 warn pointer conversion.
4378 (check_and_warn_address_of_packed_member): Renamed to ...
4379 (check_and_warn_address_or_pointer_of_packed_member): This.
4380 Also warn pointer conversion.
4381 (warn_for_address_or_pointer_of_packed_member): Remove the
4382 boolean argument. Don't check pointer conversion here.
4384 2019-01-15 Richard Sandiford <richard.sandiford@arm.com>
4387 * c.opt (Wdeprecated): Move documentation and variable to common.opt.
4389 2019-01-14 Jakub Jelinek <jakub@redhat.com>
4391 * c-cppbuiltin.c (c_cpp_builtin): Define __cpp_guaranteed_copy_elision
4392 and __cpp_nontype_template_parameter_auto. Add a comment that
4393 __cpp_template_auto is deprecated.
4395 2019-01-14 Tom Honermann <tom@honermann.net>
4397 Implement P0482R5, char8_t: A type for UTF-8 characters and strings
4398 * c-common.c (c_common_reswords): Add char8_t.
4399 (fix_string_type): Use char8_t for the type of u8 string literals.
4400 (c_common_get_alias_set): char8_t doesn't alias.
4401 (c_common_nodes_and_builtins): Define char8_t as a builtin type in
4403 (c_stddef_cpp_builtins): Add __CHAR8_TYPE__.
4404 (keyword_begins_type_specifier): Add RID_CHAR8.
4405 * c-common.h (rid): Add RID_CHAR8.
4406 (c_tree_index): Add CTI_CHAR8_TYPE and CTI_CHAR8_ARRAY_TYPE.
4407 Define D_CXX_CHAR8_T and D_CXX_CHAR8_T_FLAGS.
4408 Define char8_type_node and char8_array_type_node.
4409 * c-cppbuiltin.c (cpp_atomic_builtins): Predefine
4410 __GCC_ATOMIC_CHAR8_T_LOCK_FREE.
4411 (c_cpp_builtins): Predefine __cpp_char8_t.
4412 * c-lex.c (lex_string): Use char8_array_type_node as the type of
4414 (lex_charconst): Use char8_type_node as the type of CPP_UTF8CHAR.
4415 * c-opts.c: If not otherwise specified, enable -fchar8_t when
4417 * c.opt: Add the -fchar8_t command line option.
4419 2019-01-14 Martin Sebor <msebor@redhat.com>
4422 * c-attribs.c (positional_argument): Call valid_format_string_type_p
4423 and issue errors if it fails.
4424 * c-common.h (valid_format_string_type_p): Declare.
4425 * c-format.c (valid_stringptr_type_p): Rename...
4426 (valid_format_string_type_p): ...to this and make extern.
4427 (handle_format_arg_attribute): Adjust to new name.
4428 (check_format_string): Same.
4430 2019-01-13 H.J. Lu <hongjiu.lu@intel.com>
4432 * c-warn.c (warn_for_address_or_pointer_of_packed_member):
4433 Replace "may may" with "may" in warning message.
4435 2019-01-07 Jakub Jelinek <jakub@redhat.com>
4438 * c-common.h (enum rid): Add RID_BUILTIN_CONVERTVECTOR.
4439 (c_build_vec_convert): Declare.
4440 * c-common.c (c_build_vec_convert): New function.
4442 2019-01-04 Martin Sebor <msebor@redhat.com>
4445 * c-attribs.c (handle_copy_attribute): Avoid copying attribute leaf.
4446 Handle C++ empty throw specification and C11 _Noreturn.
4447 (has_attribute): Also handle C11 _Noreturn.
4449 2019-01-04 Martin Sebor <msebor@redhat.com>
4452 * c-attribs.c (positional_argument): Also accept enumerated types.
4454 2019-01-01 Jakub Jelinek <jakub@redhat.com>
4456 Update copyright years.
4458 2018-12-20 H.J. Lu <hongjiu.lu@intel.com>
4461 * c-common.h (warn_for_address_or_pointer_of_packed_member): New.
4462 * c-warn.c (check_alignment_of_packed_member): New function.
4463 (check_address_of_packed_member): Likewise.
4464 (check_and_warn_address_of_packed_member): Likewise.
4465 (warn_for_address_or_pointer_of_packed_member): Likewise.
4466 * c.opt: Add -Wno-address-of-packed-member.
4468 2018-12-20 David Malcolm <dmalcolm@redhat.com>
4471 * c-warn.c (get_outermost_macro_expansion): New function.
4472 (spelled_the_same_p): Use it to unwind the macro expansions, and
4473 compare the outermost macro in each nested expansion, rather than
4476 2018-12-19 David Malcolm <dmalcolm@redhat.com>
4479 * c-common.h (warn_tautological_cmp): Convert 1st param from
4480 location_t to const op_location_t &.
4481 * c-warn.c (find_array_ref_with_const_idx_r): Call fold_for_warn
4482 when testing for INTEGER_CST.
4483 (warn_tautological_bitwise_comparison): Convert 1st param from
4484 location_t to const op_location_t &; use it to build a
4485 binary_op_rich_location, and use this.
4486 (spelled_the_same_p): New function.
4487 (warn_tautological_cmp): Convert 1st param from location_t to
4488 const op_location_t &. Warn for macro expansions if
4489 spelled_the_same_p. Use binary_op_rich_location.
4491 2018-12-19 David Malcolm <dmalcolm@redhat.com>
4495 * c-common.c (unsafe_conversion_p): Fold any location wrapper.
4496 (verify_tree): Handle location wrappers.
4497 (c_common_truthvalue_conversion): Strip any location wrapper.
4499 (fold_offsetof): Strip any location wrapper.
4500 (complete_array_type): Likewise for initial_value.
4501 (convert_vector_to_array_for_subscript): Call fold_for_warn on the
4502 index before checking for INTEGER_CST.
4503 * c-pretty-print.c (c_pretty_printer::primary_expression): Don't
4504 print parentheses around location wrappers.
4505 * c-warn.c (warn_logical_operator): Call fold_for_warn on op_right
4506 before checking for INTEGER_CST.
4507 (warn_tautological_bitwise_comparison): Call
4508 tree_strip_any_location_wrapper on lhs, rhs, and bitop's operand
4509 before checking for INTEGER_CST.
4510 (readonly_error): Strip any location wrapper.
4511 (warn_array_subscript_with_type_char): Strip location wrappers
4512 before checking for INTEGER_CST. Use the location of the index if
4515 2018-12-06 Jason Merrill <jason@redhat.com>
4517 PR c++/88136 - -Wdeprecated-copy false positives
4518 * c.opt (Wdeprecated-copy-dtor): New.
4519 (Wdeprecated-copy): Move to -Wextra.
4521 2018-11-29 Martin Sebor <msebor@redhat.com>
4525 * c-attribs.c (common_handle_aligned_attribute): Silently avoid setting
4526 alignments to values less than the target requires.
4527 (has_attribute): For attribute aligned consider both the attribute
4528 and the alignment bits.
4529 * c-common.c (c_init_attributes): Optionally issue a warning for
4532 2018-11-28 Martin Sebor <msebor@redhat.com>
4536 * c-warn.c (sizeof_pointer_memaccess_warning): Bail if source
4537 or destination is an error.
4539 2018-11-28 Jakub Jelinek <jakub@redhat.com>
4542 * c-ubsan.c: Include langhooks.h.
4543 (ubsan_instrument_division): Change gcc_assert that main variants
4544 of op0 and op1 types are equal to gcc_checking_assert that the
4545 main variants are compatible types.
4547 2018-11-27 Eric Botcazou <ebotcazou@adacore.com>
4549 * c-ada-spec.c: Include stringpool.h.
4550 (has_static_fields): Return false for incomplete types.
4551 (is_tagged_type): Likewise.
4552 (has_nontrivial_methods): Likewise.
4553 (dump_ada_node) <INTEGER_TYPE>: Deal specifically with __int128.
4554 (struct overloaded_name_hash): New structure.
4555 (struct overloaded_name_hasher): Likewise.
4556 (overloaded_names): New global variable.
4557 (init_overloaded_names): New static function.
4558 (overloaded_name_p): New predicate.
4559 (dump_ada_declaration) <TYPE_DECL>: Tidy up and set TREE_VISITED
4560 on the TYPE_STUB_DECL of the original type of a typedef, if any.
4561 <FUNCTION_DECL>: Bail out for an unsupported overloaded name.
4562 Remove always-true condition and dump forward types.
4563 (dump_ada_specs): Delete overloaded_names.
4565 2018-11-20 Martin Sebor <msebor@redhat.com>
4567 * c-attribs.c (type_for_vector_size): New function.
4568 (type_valid_for_vector_size): Same.
4569 (handle_vector_size_attribute): Move code to the functions above
4571 (validate_attribute, has_attribute): New functions.
4572 * c-common.h (has_attribute): Declare.
4573 (rid): Add RID_HAS_ATTRIBUTE_EXPRESSION.
4574 * c-common.c (c_common_resword): Same.
4576 2018-11-16 Jason Merrill <jason@redhat.com>
4578 * c-lex.c (c_common_has_attribute): Handle likely/unlikely.
4579 * c-attribs.c (attr_cold_hot_exclusions): Make public.
4581 2018-11-16 Jakub Jelinek <jakub@redhat.com>
4584 * c-common.c (fix_string_type): Reject string literals larger than
4585 TYPE_MAX_VALUE (ssizetype) bytes.
4587 2018-11-15 Martin Sebor <msebor@redhat.com>
4591 * c-attribs.c (positional_argument): New function.
4592 (handle_alloc_size_attribute): Use it and simplify.
4593 (handle_alloc_align_attribute): Same.
4594 (handle_assume_aligned_attribute): Same.
4595 (handle_nonnull_attribute): Same.
4596 * c-common.c (check_function_arguments): Pass fntype to
4597 check_function_format.
4598 * c-common.h (check_function_format): Add an argument.
4599 (PosArgFlags, positional_argument): Declare new type and function.
4600 * c-format.c (decode_format_attr): Add arguments.
4601 (check_format_string, get_constant): Same.
4602 (convert_format_name_to_system_name): Adjust.
4604 2018-11-15 David Malcolm <dmalcolm@redhat.com>
4607 * c-opts.c (c_diagnostic_finalizer): Add diagnostic_t param.
4609 2018-11-14 Jakub Jelinek <jakub@redhat.com>
4611 P1236R1 - Signed integers are two's complement
4612 * c-warn.c (maybe_warn_shift_overflow): Don't warn for c++2a.
4613 * c-ubsan.c (ubsan_instrument_shift): Make signed shifts
4614 with in-range second operand well defined for -std=c++2a.
4617 * c-common.c (parse_optimize_options): Allocate option string from
4618 opts_obstack rather than as GC memory. Move the allocation after
4619 warning for invalid option.
4621 2018-11-13 David Malcolm <dmalcolm@redhat.com>
4623 * c-common.c (c_get_substring_location): Update for renaming of
4624 get_source_location_for_substring to get_location_within_string.
4625 * c-lex.c: Replace "source_location" with "location_t".
4626 * c-opts.c: Likewise.
4627 * c-ppoutput.c: Likewise.
4629 2018-11-13 Martin Sebor <msebor@redhat.com>
4632 * c-attribs.c (handle_copy_attribute): Exclude inlining attributes.
4633 (handle_tls_model_attribute): Improve diagnostics.
4635 2018-11-12 Jason Merrill <jason@redhat.com>
4637 * c-cppbuiltin.c (c_cpp_builtins): Define
4638 __cpp_impl_destroying_delete.
4640 * c-cppbuiltin.c (c_cpp_builtins): Change __cpp_explicit_bool to
4641 __cpp_conditional_explicit.
4643 2018-11-09 Martin Sebor <msebor@redhat.com>
4646 * c-attribs.c (handle_copy_attribute): New function.
4648 2018-11-09 Martin Sebor <msebor@redhat.com>
4651 * c-common.c (check_user_alignment): Use MAX_OFILE_ALIGNMENT.
4653 2018-11-08 Jakub Jelinek <jakub@redhat.com>
4655 * c-common.h (c_finish_omp_taskgroup): Add CLAUSES argument.
4656 (c_finish_omp_atomic): Replace bool SEQ_CST argument with
4657 enum omp_memory_order MEMORY_ORDER.
4658 (c_finish_omp_flush): Add MO argument.
4659 (c_omp_depend_t_p, c_finish_omp_depobj): Declare.
4660 (c_finish_omp_for): Add FINAL_P argument.
4661 * c-omp.c: Include memmodel.h.
4662 (c_finish_omp_taskgroup): Add CLAUSES argument. Set
4663 OMP_TASKGROUP_CLAUSES to it.
4664 (c_finish_omp_atomic): Replace bool SEQ_CST argument with
4665 enum omp_memory_order MEMORY_ORDER. Set OMP_ATOMIC_MEMORY_ORDER
4666 instead of OMP_ATOMIC_SEQ_CST.
4667 (c_omp_depend_t_p, c_finish_omp_depobj): New functions.
4668 (c_finish_omp_flush): Add MO argument, if not MEMMODEL_LAST, emit
4669 __atomic_thread_fence call with the given value.
4670 (check_omp_for_incr_expr): Formatting fixes.
4671 (c_finish_omp_for): Add FINAL_P argument. Allow NE_EXPR
4672 even in OpenMP loops, diagnose if NE_EXPR and incr expression
4673 is not constant expression 1 or -1. Transform NE_EXPR loops
4674 with iterators pointers to VLA into LT_EXPR or GT_EXPR loops.
4675 (c_omp_check_loop_iv_r): Look for orig decl of C++ range for
4677 (c_omp_split_clauses): Add support for combined
4678 #pragma omp parallel master and
4679 #pragma omp {,parallel }master taskloop{, simd} constructs.
4680 Handle OMP_CLAUSE_IN_REDUCTION. Handle OMP_CLAUSE_REDUCTION_TASK.
4681 Handle OMP_CLAUSE_NONTEMPORAL. Handle splitting OMP_CLAUSE_IF
4682 also to OMP_SIMD. Copy OMP_CLAUSE_LASTPRIVATE_CONDITIONAL.
4683 (c_omp_predetermined_sharing): Don't return
4684 OMP_CLAUSE_DEFAULT_SHARED for const qualified decls.
4685 * c-pragma.c (omp_pragmas): Add PRAGMA_OMP_DEPOBJ and
4686 PRAGMA_OMP_REQUIRES.
4687 * c-pragma.h (enum pragma_kind): Likewise.
4688 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_NONTEMPORAL
4689 and PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
4691 2018-11-08 David Malcolm <dmalcolm@redhat.com>
4693 * c-format.c (gcc_dump_printf_char_table): Add entry for %f.
4695 2018-11-08 David Malcolm <dmalcolm@redhat.com>
4697 * c-format.c (local_cgraph_node_ptr_node): New variable.
4698 (gcc_dump_printf_char_table): Add entry for %C.
4699 (get_pointer_to_named_type): New function, taken from the handling
4700 code for "gimple *" from...
4701 (init_dynamic_diag_info): ...here. Add handling for
4703 * c-format.h (T_CGRAPH_NODE): New.
4705 2018-10-19 Jason Merrill <jason@redhat.com>
4707 * c-cppbuiltin.c (c_cpp_builtins): Add
4708 __cpp_nontype_template_parameter_class.
4710 2018-10-31 Nathan Sidwell <nathan@acm.org>
4712 * c-opts.c (c_finish_options): Force command line macro
4713 location. Refactor to avoid repeating main debug hook.
4714 (push_command_line_include): Clarify comment.
4716 * c-opts.c (c_finish_options): Adjust cpp_force_token_locations call.
4718 2018-10-30 Martin Sebor <msebor@redhat.com>
4721 * c-format.c (check_format_types): Avoid diagnosing null pointer
4722 arguments to printf-family of functions.
4724 2018-10-30 Marek Polacek <polacek@redhat.com>
4726 Implement P0892R2, explicit(bool).
4727 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_explicit_bool.
4729 2018-10-29 David Malcolm <dmalcolm@redhat.com>
4731 * name-hint.h (name_hint::take_deferred): New member function.
4733 2018-10-29 David Malcolm <dmalcolm@redhat.com>
4736 * c-common.c (check_function_sentinel): Call fold_for_warn on the
4738 (check_function_restrict): Rename param "argarray" to
4739 "unfolded_argarray", and make a copy named "argarray", calling
4740 fold_for_warn on each argument.
4741 (check_function_arguments): Add note about responsibility for
4742 folding the arguments.
4744 2018-10-17 Joseph Myers <joseph@codesourcery.com>
4746 * c-common.c (flag_isoc2x): New variable.
4747 * c-common.h (clk_c): Update comment to reference C2X.
4748 (flag_isoc99, flag_isoc11): Update comments to reference future
4749 standard versions in general.
4750 (flag_isoc2x): Declare.
4751 * c-opts.c (set_std_c2x): New function.
4752 (c_common_handle_option): Handle -std=c2x and -std=gnu2x.
4753 (set_std_c89, set_std_c99, set_std_c11, set_std_c17): Set
4755 * c.opt (Wc11-c2x-compat, std=c2x, std=gnu2x): New options.
4757 2018-10-17 Joseph Myers <joseph@codesourcery.com>
4759 * c.opt (std=c17, std=c18, std=gnu17, std=gnu18, std=iso9899:2017)
4760 (std=iso9899:2018): Document C17 as published in 2018.
4762 2018-10-12 Christophe Lyon <christophe.lyon@linaro.org>
4765 * c-pretty-print.c (c_pretty_printer::constant): Fix typo.
4767 2018-10-11 Will Wray <wjwray@gmail.com>
4770 * c-pretty-print.h (pp_c_type_cast): Prototype.
4771 (pp_c_integer_constant): Likewise.
4772 * c-pretty-print.c (pp_c_type_cast): No longer static.
4773 (pp_c_integer_constant): Likewise.
4774 (pp_c_enumeration_constant): Fix loop termination when finding
4775 name of constant. No longer returns a value. Call
4776 pp_c_integer_constant.
4777 (c_pretty_printer::constant): Update for changes to
4778 pp_c_enumeration_constant.
4780 2018-10-11 Jakub Jelinek <jakub@redhat.com>
4782 * c-lex.c (c_common_has_attribute): Return 201803 instead of 20180312
4783 for no_unique_address.
4785 2018-10-09 David Malcolm <dmalcolm@redhat.com>
4787 * c-common.c (c_option_controlling_cpp_error): Rename to...
4788 (c_option_controlling_cpp_diagnostic): ...this, and convert
4789 "reason" from int to enum.
4790 (c_cpp_error): Rename to...
4791 (c_cpp_diagnostic): ...this, converting level and reason to enums.
4792 * c-common.h (c_cpp_error): Rename to...
4793 (c_cpp_diagnostic): ...this, converting level and reason to enums.
4794 * c-opts.c (c_common_init_options): Update for renaming.
4796 2018-10-08 Richard Sandiford <richard.sandiford@arm.com>
4799 * c-common.c (vector_types_compatible_elements_p): Use
4800 INTEGRAL_TYPE_P instead of checking only for INTEGER_TYPE.
4802 2018-10-04 Vinay Kumar <vinay.kumar@blackfigtech.com>
4804 * c-attribs.c (get_priority): Add a warning flag warn_prio_ctor_dtor
4805 to generate constructor destructor priority warning.
4806 * c.opt (-Wprio-ctor-dtor): New option.
4808 2018-10-01 Jason Merrill <jason@redhat.com>
4810 * c-lex.c (c_common_has_attribute): Add no_unique_address.
4812 2018-10-01 Eric Botcazou <ebotcazou@adacore.com>
4814 * c-ada-spec.c (get_underlying_decl): Get to the main type variant.
4815 (dump_ada_node): Add const keyword.
4817 2018-09-25 Martin Liska <mliska@suse.cz>
4819 * c-common.c (c_common_truthvalue_conversion):
4820 Remove Pascal from documentation.
4822 2018-09-21 Eric Botcazou <ebotcazou@adacore.com>
4824 * c-ada-spec.c: Include diagnostic.h.
4825 (dump_ada_declaration) <RECORD_TYPE>: Issue a warning on packed layout.
4827 2018-09-19 Marek Polacek <polacek@redhat.com>
4829 * c.opt (Wclass-conversion): New.
4831 2018-09-17 David Malcolm <dmalcolm@redhat.com>
4833 * c-format.c (range_label_for_format_type_mismatch::get_text):
4834 Update for new param.
4836 2018-09-17 David Malcolm <dmalcolm@redhat.com>
4838 * c-format.c (format_warning_at_char): Update for introduction of
4839 format_string_diagnostic_t.
4840 (format_type_warning): Likewise.
4842 2018-09-17 Martin Jambor <mjambor@suse.cz>
4845 * c.opt (Wabsolute-value): New.
4847 2018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
4849 * c-common.c (complete_flexible_array_elts): New helper function.
4850 * c-common.h (complete_flexible_array_elts): Declare.
4852 2018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
4854 * c-common.c (braced_list_to_string): Remove eval parameter.
4855 Add some more checks. Always create zero-terminated STRING_CST.
4856 * c-common.h (braced_list_to_string): Adjust prototype.
4858 2018-08-27 David Malcolm <dmalcolm@redhat.com>
4861 * c-common.c (c_cpp_error): Update for conversion of show_caret_p
4863 (maybe_suggest_missing_token_insertion): Likewise.
4864 (maybe_add_include_fixit): Add param "override_location". If set,
4865 and source-printing is enabled, then override the rich_location's
4866 primary location with that of the insertion point for the fix-it
4867 hint, marking it with SHOW_LINES_WITHOUT_RANGE.
4868 * c-common.h (extern void maybe_add_include_fixit): Add bool
4870 * c-format.c (selftest::test_type_mismatch_range_labels): Update
4871 for conversion of show_caret_p to a tri-state.
4872 * c-warn.c (warn_for_restrict): Likewise.
4874 (suggest_missing_header::~suggest_missing_header): Update call to
4875 maybe_add_include_fixit to suggest overriding the location, as it
4878 2018-08-27 Martin Liska <mliska@suse.cz>
4880 * c-common.c (check_function_restrict): Use new function
4881 fndecl_built_in_p and remove check for FUNCTION_DECL if
4883 (check_builtin_function_arguments): Likewise.
4884 (reject_gcc_builtin): Likewise.
4885 * c-warn.c (sizeof_pointer_memaccess_warning): Likewise.
4887 2018-08-26 Marek Polacek <polacek@redhat.com>
4889 PR c++/87029, Implement -Wredundant-move.
4890 * c.opt (Wredundant-move): New option.
4892 2018-08-21 Marek Polacek <polacek@redhat.com>
4894 PR c++/86981, Implement -Wpessimizing-move.
4895 * c.opt (Wpessimizing-move): New option.
4897 2018-08-20 David Malcolm <dmalcolm@redhat.com>
4900 * c-attribs.c (common_handle_aligned_attribute): Add
4901 auto_diagnostic_group instance.
4902 * c-indentation.c (warn_for_misleading_indentation): Likewise.
4903 * c-opts.c (c_common_post_options): Likewise.
4904 * c-warn.c (warn_logical_not_parentheses): Likewise.
4905 (warn_duplicated_cond_add_or_warn): Likewise.
4906 (warn_for_multistatement_macros): Likewise.
4908 2018-08-20 Nathan Sidwell <nathan@acm.org>
4910 * c-ada-spec.c (macro_length, dump_ada_macros): Adjust macro parm
4913 2018-08-17 Nathan Sidwell <nathan@acm.org>
4915 * c-cppbuiltin.c (struct lazy_hex_fp_value_struct): Remove macro
4917 (laxy_hex_fp_value_count): Make unsigned.
4918 (lazy_hex_fp_value): Provided with macro & lazy number. Directly
4919 manipulate the macro.
4920 (builtin_defin_with_hex_fp_value): Adjust callback name, use
4923 2018-08-17 David Malcolm <dmalcolm@redhat.com>
4925 * c-format.c (enum format_type): Add gcc_dump_printf_format_type.
4926 (gcc_dump_printf_length_specs): New.
4927 (gcc_dump_printf_flag_pairs): New.
4928 (gcc_dump_printf_flag_specs): New.
4929 (gcc_dump_printf_char_table): New.
4930 (format_types_orig): Add entry for "gcc_dump_printf".
4931 (init_dynamic_diag_info): Set up length_char_specs and
4932 conversion_specs for gcc_dump_printf_format_type.
4933 (handle_format_attribute): Handle gcc_dump_printf_format_type.
4935 2018-08-17 Nathan Sidwell <nathan@acm.org>
4937 * c-ada-spec.c (macro_length, dump_ada_macros): Constify.
4939 * c-ada-spec.c: Don't #include "cpp-id-data.h"
4940 * c-cppbuiltin.c: Likewise.
4942 2018-08-17 Martin Liska <mliska@suse.cz>
4944 * c.opt: Remove Warn, Init and Report for options with
4945 Ignore/Deprecated flag. Warning is done automatically for
4948 2018-08-16 David Malcolm <dmalcolm@redhat.com>
4951 * c-common.c (selftest::c_family_tests): Call
4952 selftest::c_indentation_c_tests.
4953 * c-common.h (selftest::c_indentation_c_tests): New decl.
4954 * c-indentation.c: Include "selftest.h".
4955 (next_tab_stop): Add "tab_width" param, rather than accessing
4957 (get_visual_column): Likewise. Clarify comment. Bulletproof
4958 against reading past the end of the line.
4959 (get_first_nws_vis_column): Add "tab_width" param.
4960 (detect_intervening_unindent): Likewise.
4961 (should_warn_for_misleading_indentation): Read tab width from
4962 cpp_opts and pass around.
4963 (selftest::test_next_tab_stop): New test.
4964 (selftest::assert_get_visual_column_succeeds): New function.
4965 (ASSERT_GET_VISUAL_COLUMN_SUCCEEDS): New macro.
4966 (selftest::assert_get_visual_column_fails): New function.
4967 (ASSERT_GET_VISUAL_COLUMN_FAILS): New macro.
4968 (selftest::test_get_visual_column): New test.
4969 (selftest::c_indentation_c_tests): New function.
4971 2018-08-16 Nathan Sidwell <nathan@acm.org>
4973 * c-ada-spec.c (count_ada_macro): Use cpp_user_macro_p.
4974 (store_ada_macro): Likewise.
4975 * c-ppoutput.c (cb_used_define, dump_macro): Likewise.
4976 * c-spellcheck.cc (should-suggest_as_macro_p): Likewise,
4978 2018-08-15 David Malcolm <dmalcolm@redhat.com>
4980 * c-format.c: Include "selftest-diagnostic.h" and
4981 "gcc-rich-location.h".
4982 (format_warning_at_char): Pass NULL for new label params of
4984 (class indirection_suffix): New class.
4985 (class range_label_for_format_type_mismatch): New class.
4986 (format_type_warning): Move logic for generating "*" suffix to
4987 class indirection_suffix. Create "fmt_label" and "param_label"
4988 to show their types, and pass them to the
4989 format_warning_at_substring calls.
4990 (selftest::test_type_mismatch_range_labels): New test.
4991 (selftest::c_format_c_tests): Call it.
4993 2018-08-13 Martin Sebor <msebor@redhat.com>
4995 PR tree-optimization/71625
4996 * c-common.c (braced_list_to_string): New function.
4997 * c-common.h (braced_list_to_string): Declare it.
4999 2018-08-08 Nathan Sidwell <nathan@acm.org>
5001 * c-common.c (try_to_locate_new_include_inertion_point): Use
5002 linemap_included_from_linemap.
5003 * c-lex.c (fe_file_change): Use linemap_included_from.
5004 * c-ppoutput.c (pp_file_change): Likewise.
5006 2018-08-01 Martin Sebor <msebor@redhat.com>
5008 PR tree-optimization/86650
5009 * c-format.c (gcc_tdiag_char_table): Update comment for "%G".
5010 (gcc_cdiag_char_table, gcc_cxxdiag_char_table): Same.
5011 (init_dynamic_diag_info): Update from "gcall *" to "gimple *".
5012 * c-format.h (T89_G): Update to be "gimple *" rather than
5014 (local_gcall_ptr_node): Rename...
5015 (local_gimple_ptr_node): ...to this.
5017 2018-07-31 David Malcolm <dmalcolm@redhat.com>
5019 * c-format.c (PP_FORMAT_CHAR_TABLE): New macro, based on existing
5020 table entries for gcc_diag_char_table, and the 'Z' entry from
5021 gcc_tdiag_char_table, changing the "chain" entry for 'Z' from
5022 &gcc_tdiag_char_table[0] to &gcc_diag_char_table[0].
5023 (gcc_diag_char_table): Use PP_FORMAT_CHAR_TABLE, implicitly
5024 adding missing "Z" for this table. Remove erroneous "G" and "K"
5026 (gcc_tdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
5027 (gcc_cdiag_char_table): Use PP_FORMAT_CHAR_TABLE.
5028 (gcc_cxxdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
5030 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
5032 * c-common.c (speculation_safe_resolve_call): New function.
5033 (speculation_safe_resolve_params): New function.
5034 (speculation_safe_resolve_return): New function.
5035 (resolve_overloaded_builtin): Handle __builtin_speculation_safe_value.
5036 * c-cppbuiltin.c (c_cpp_builtins): Add pre-define for
5037 __HAVE_SPECULATION_SAFE_VALUE.
5039 2018-07-20 David Malcolm <dmalcolm@redhat.com>
5041 * c-common.c (c_cpp_error): Remove redundant "line_table"
5042 parameter from call to rich_location::set_range.
5043 (maybe_suggest_missing_token_insertion): Likewise.
5045 2018-07-20 Martin Sebor <msebor@redhat.com>
5048 * c.opt (-Warray-bounds): Remove redundant -Wall.
5050 2018-07-20 Martin Sebor <msebor@redhat.com>
5053 * c-common.h (c_common_handle_option): Change function argument
5055 * c-opts.c (c_common_init_options): Same.
5056 (c_common_handle_option): Same. Remove special handling of
5057 OPT_Walloca_larger_than_ and OPT_Wvla_larger_than_.
5058 * c.opt (-Walloc-size-larger-than, -Walloca-larger-than): Change
5059 options to take a HOST_WIDE_INT argument and accept a byte-size
5061 (-Wvla-larger-than): Same.
5062 (-Wno-alloc-size-larger-than, -Wno-alloca-larger-than): New.
5063 (-Wno-vla-larger-than): Same.
5065 2018-07-12 Jakub Jelinek <jakub@redhat.com>
5067 * c-attribs.c (c_common_attribute_table): Add
5068 "omp declare target implicit" attribute.
5070 2018-07-12 Richard Biener <rguenther@suse.de>
5073 * c-attribs.c (handle_packed_attribute): Do not build a variant
5074 type with TYPE_PACKED, instead ignore the attribute if we may
5075 not apply to the original type.
5077 2018-07-10 Jakub Jelinek <jakub@redhat.com>
5080 * c-omp.c (c_omp_check_loop_iv_r, c_omp_check_loop_iv): Allow declv
5081 to contain TREE_LIST for both the original class iterator and the
5084 2018-07-07 Eric Botcazou <ebotcazou@adacore.com>
5086 * c-ada-spec.c (to_ada_name): Remove index parameter.
5087 (pp_ada_tree_identifier): Likewise.
5088 (dump_ada_macros): Adjust call to to_ada_name.
5089 (struct overloaded_name_hash): Delete.
5090 (struct overloaded_name_hasher): Likewise.
5091 (overloaded_names): Likewise.
5092 (compute_overloading_index): Likewise.
5093 (dump_ada_decl_name): Do not call compute_overloading_index and
5094 adjust calls to pp_ada_tree_identifier.
5095 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
5096 (dump_ada_import): Add spc parameter and switch to aspect syntax.
5097 (dump_ada_function_declaration): Adjust call to pp_ada_tree_identifier.
5098 (dump_ada_enum_type): Remove type and display_convention parameters.
5099 Adjust calls to pp_ada_tree_identifier.
5100 (dump_ada_node): Likewise and for dump_ada_structure.
5101 (dump_nested_type) <ENUMERAL_TYPE>: Adjust call to dump_ada_enum_type
5103 <RECORD_TYPE>: Adjust call to dump_ada_structure and switch to aspect
5105 (print_constructor): Adjust call to pp_ada_tree_identifier.
5106 (print_destructor): Likewise.
5107 (dump_ada_declaration): Switch to aspect syntax.
5108 (dump_ada_structure): Likewise and tidy up. Replace display_convention
5109 parameter with nested parameter.
5110 (dump_ads): Emit pragma Ada_2012 in lieu of pragma Ada_2005.
5111 (dump_ada_specs): Do not delete overloaded_names table.
5113 2018-07-06 Peter Bergner <bergner@linux.ibm.com>
5116 * c-attribs.c (handle_mode_attribute): Call translate_mode_attribute
5119 2018-07-05 Nathan Sidwell <nathan@acm.org>
5121 * c-lex.c (fe_file_change): Check SYSTEM_IMPLICIT_EXTERN_C not
5122 NO_IMPLICIT_EXTERN_C.
5124 2018-06-28 Martin Liska <mliska@suse.cz>
5126 * cppspec.c: Include opt-suggestions.h.
5128 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
5129 Thomas Schwinge <thomas@codesourcery.com>
5130 Cesar Philippidis <cesar@codesourcery.com>
5132 * c-pragma.h (enum pragma_omp_clause): Add
5133 PRAGMA_OACC_CLAUSE_{FINALIZE,IF_PRESENT}. Remove
5134 PRAGMA_OACC_CLAUSE_PRESENT_OR_{COPY,COPYIN,COPYOUT,CREATE}.
5136 2018-06-20 Jakub Jelinek <jakub@redhat.com>
5139 * c-common.c (check_nonnull_arg): Use fold_for_warn. Adjust obsolete
5142 2018-06-18 Martin Sebor <msebor@redhat.com>
5145 * c-warn.c (sizeof_pointer_memaccess_warning): Check for attribute
5148 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
5150 * c-common.c (c_common_truthvalue_conversion): Handle ABSU_EXPR.
5152 2018-06-13 Jason Merrill <jason@redhat.com>
5154 * c-opts.c (c_common_post_options): Warn about useless -Wabi.
5155 (c_common_handle_option) [OPT_Wabi_]: Remove flag_abi_compat_version
5158 PR c++/86094 - wrong code with defaulted move ctor.
5159 * c-opts.c (c_common_post_options): Bump the current ABI version to
5160 13. Set warn_abi_version and flag_abi_compat_version to the current
5161 version rather than 0. Fix defaulting flag_abi_compat_version from
5164 2018-06-12 Martin Sebor <msebor@redhat.com>
5167 * c-warn.c (sizeof_pointer_memaccess_warning): Avoid warning when
5168 sizeof source and destination yields the same value.
5170 2018-06-12 Martin Liska <mliska@suse.cz>
5172 * c.opt: Make MPX-related options as Deprecated.
5174 2018-06-08 David Malcolm <dmalcolm@redhat.com>
5176 * c-pretty-print.c (c_pretty_printer::statement): Use TDF_NONE
5179 2018-06-08 Martin Liska <mliska@suse.cz>
5181 * c-attribs.c (handle_bnd_variable_size_attribute): Remove support
5182 for MPX (macros, related functions, fields in cgraph_node, ...).
5183 (handle_bnd_legacy): Likewise.
5184 (handle_bnd_instrument): Likewise.
5187 2018-06-06 Jakub Jelinek <jakub@redhat.com>
5190 * c-cppbuiltin.c (c_cpp_builtins): Fix a typo, set
5191 __cpp_transactional_memory to 201500 instead of 210500.
5193 2018-06-06 Jason Merrill <jason@redhat.com>
5195 PR c++/85710 - ICE with -Wmemset-elt-size.
5196 * c-warn.c (warn_for_memset): Don't crash on incomplete element type.
5198 2018-06-01 Jason Merrill <jason@redhat.com>
5200 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_deduction_guides to
5203 2018-06-01 Eric Botcazou <ebotcazou@adacore.com>
5205 * c-ada-spec.c (dump_ada_declaration) <TYPE_DECL>: Generate a forward
5206 declaration for a typedef independently of whether the declaration of
5207 the subtype is generated.
5209 2018-05-31 Martin Sebor <msebor@redhat.com>
5212 * c.opt (-Wno-alloc-size-larger-than): New option.
5214 2018-04-22 David Pagan <dave.pagan@oracle.com>
5217 * c-opts.c (c_common_post_options): Set default for warn_return_type
5218 for C++/C++ with ObjC extensions only. For C, makes it possible to
5219 differentiate between default (no option), -Wreturn-type, and
5222 2018-05-29 Jason Merrill <jason@redhat.com>
5224 * c.opt (Winit-list-lifetime): New flag.
5226 2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
5228 * c-lex.c (get_fileinfo): Use splay_tree_compare_strings and
5229 splay_tree_delete_pointers.
5231 2018-05-26 Jakub Jelinek <jakub@redhat.com>
5234 * c-warn.c (diagnose_mismatched_attributes): Remove unnecessary
5235 noinline variable to workaround broken kernel headers.
5237 2018-05-18 Jason Merrill <jason@redhat.com>
5239 * c.opt (Wdeprecated-copy): New flag.
5241 2018-05-17 Martin Liska <mliska@suse.cz>
5243 * c-warn.c (overflow_warning): Do not use
5244 space in between 'G_' and '('.
5246 2018-05-09 Jason Merrill <jason@redhat.com>
5248 * c-common.c (valid_array_size_p): Add complain parameter.
5249 * c-common.h: ...which defaults to true.
5251 2018-05-11 Jakub Jelinek <jakub@redhat.com>
5254 * c-omp.c (c_omp_predetermined_sharing): Return
5255 OMP_CLAUSE_DEFAULT_SHARED for artificial vars with integral type.
5257 2018-05-11 Martin Liska <mliska@suse.cz>
5260 * c-attribs.c (handle_no_sanitize_attribute): Iterate all
5263 2018-05-10 Jakub Jelinek <jakub@redhat.com>
5266 * c-common.h (fold_offsetof_1): Removed.
5267 (fold_offsetof): Add TYPE argument defaulted to size_type_node and
5268 CTX argument defaulted to ERROR_MARK.
5269 * c-common.c (fold_offsetof_1): Renamed to ...
5270 (fold_offsetof): ... this. Remove wrapper function. Add TYPE
5271 argument, convert the pointer constant to TYPE and use size_binop
5272 with PLUS_EXPR instead of fold_build_pointer_plus if type is not
5273 a pointer type. Adjust recursive calls.
5275 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
5278 * c-attribs.c (handle_visibility_attribute): Do not set no_add_attrs.
5280 2018-05-07 Nathan Sidwell <nathan@acm.org>
5282 * c.opt (ffor-scope): Remove functionality, issue warning.
5284 2018-05-03 Nathan Sidwell <nathan@acm.org>
5286 * c.opt (ffriend-injection): Remove functionality, issue warning.
5288 2018-05-01 David Malcolm <dmalcolm@redhat.com>
5291 * c-format.c (struct format_check_results): Add field
5293 (check_format_info): Initialize it, and warn if encountered.
5294 (check_format_arg): Distinguish between wide char and
5295 everything else when detecting arrays of non-char.
5297 2018-04-30 David Malcolm <dmalcolm@redhat.com>
5299 * c-format.c (get_corrected_substring): Update for
5300 location_get_source_line returning a char_span. Use a char_span
5301 when handling the prefix of the correction.
5302 * c-indentation.c (get_visual_column): Update for
5303 location_get_source_line returning a char_span.
5304 (get_first_nws_vis_column): Likewise.
5306 2018-03-29 David Malcolm <dmalcolm@redhat.com>
5309 * known-headers.cc (get_stdlib_header_for_name): Add various names
5310 from <assert.h>, <string.h>, and <memory.h>; add more names from
5313 2018-03-27 Jakub Jelinek <jakub@redhat.com>
5316 * c-common.c (fold_offsetof_1) <case COMPOUND_EXPR>: Assert that
5317 get_base_address of the second operand is a VAR_P, rather than the
5318 operand itself, and use gcc_checking_assert instead of gcc_assert.
5320 2018-03-23 Marek Polacek <polacek@redhat.com>
5323 * c-pretty-print.c (c_pretty_printer::multiplicative_expression)
5324 <case RDIV_EXPR>: Tweak condition.
5326 2018-03-20 Eric Botcazou <ebotcazou@adacore.com>
5328 * c-ada-spec.c (pp_ada_tree_identifier): Deal specifically with _Bool.
5330 2018-03-16 Jakub Jelinek <jakub@redhat.com>
5333 * c-warn.c (conversion_warning): Replace "to to" with "to" in
5337 * c-warn.c (diagnose_mismatched_attributes): Remove trailing space from
5340 2018-03-16 Richard Biener <rguenther@suse.de>
5343 * c-gimplify.c (c_gimplify_expr): Revert previous change. Instead
5344 unshare the possibly folded expression.
5346 2018-03-15 Richard Biener <rguenther@suse.de>
5349 * c-gimplify.c (c_gimplify_expr): Do not fold expressions.
5351 2018-03-13 Martin Sebor <msebor@redhat.com>
5353 PR tree-optimization/84725
5354 * c-attribs.c (handle_nonstring_attribute): Allow attribute nonstring
5355 with all three narrow character types, including their qualified forms.
5357 2018-03-12 Martin Sebor <msebor@redhat.com>
5359 PR tree-optimization/83456
5360 * c-common.c (check_function_restrict): Return bool.
5361 Restore checking of bounded built-in functions.
5362 (check_function_arguments): Also return the result
5363 of warn_for_restrict.
5364 * c-common.c (check_function_restrict): Return bool.
5365 * c-warn.c (warn_for_restrict): Return bool.
5367 2018-03-02 Marek Polacek <polacek@redhat.com>
5370 * c-warn.c (warn_for_sign_compare): Bail out if any of the operands
5373 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
5375 * c-attribs.c (c_common_attribute_table): Remove "cilk simd
5378 2018-03-01 Marek Polacek <polacek@redhat.com>
5381 * c-attribs.c (common_handle_aligned_attribute): Don't use invalid
5382 alignment in computation.
5384 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
5386 * c-ada-spec.c (dump_ada_node) <NULLPTR_TYPE>: New case.
5387 <REAL_TYPE>: Deal specifically with _Float128/__float128.
5389 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
5391 * c-ada-spec.c (dump_ada_double_name) <ENUMERAL_TYPE>: New case.
5392 (is_char_array): Take a type instead of a declaration.
5393 (dump_ada_array_type): Likewise.
5394 (is_simple_enum): Minor tweak.
5395 (dump_ada_enum_type): New function extracted from...
5396 (dump_ada_node) <ENUMERAL_TYPE>: ...here. Invoke it.
5397 <INTEGER_TYPE>: Remove unreachable code.
5398 <RECORD_TYPE>: Likewise. Minor tweaks.
5399 (dump_nested_type) <ARRAY_TYPE>: Adjust to above changes.
5400 <ENUMERAL_TYPE>: New case.
5401 <RECORD_TYPE>: Factor out common code.
5402 (dump_ada_declaration) <ARRAY_TYPE>: Adjust to above changes.
5403 Minor tweaks. Deal with enumeral types.
5404 (dump_ada_structure): Minor tweaks.
5406 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
5408 * c-ada-spec.c (dump_ada_node) <POINTER_TYPE>: Do not use generic
5409 address for incomplete structures.
5410 (dump_forward_type): Do not bail out for incomplete structures.
5411 (dump_ada_declaration): Do not special-case incomplete structures
5412 for subtypes. Dump them as null records for types.
5414 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
5416 * c-ada-spec.c (dump_ada_import): Use boolean and fix formatting.
5417 (is_char_array): Fix formatting.
5418 (dump_template_types): Likewise.
5419 (dump_generic_ada_node): Rename into...
5420 (dump_ada_node): ...this.
5421 <POINTER_TYPE>: Remove superfluous space. Use generic address for
5422 incomplete structures and not for empty structures. Do not use it
5423 when forward declarations are needed.
5424 (dump_forward_type): New function.
5425 (dump_nested_types): Remove FORWARD parameter. Do not consider
5426 TREE_VISITED and do not generate a forward declaration. Only dump
5427 original nested types for nested declaration.
5428 (dump_nested_type) <POINTER_TYPE>: Call dump_forward_type.
5429 <ARRAY_TYPE>: Likewise if the component type is an anonymous pointer.
5430 <RECORD_TYPE>: Do not consider TREE_VISITED.
5431 (dump_ada_declaration): Use booleans and fix formatting throughout.
5432 <TYPE_DECL>: Skip incomplete structures and not empty structures.
5433 Call dump_forward_type instead of dump_nested_types for a typedef.
5434 Remove superfluous check and adjust call to dump_nested_types.
5435 <POINTER_TYPE>: Call dump_forward_type and fall through.
5436 (dump_ada_struct_decl): Rename into...
5437 (dump_ada_structure): ...this. Do not special-case empty structures.
5439 2018-02-27 Martin Sebor <msebor@redhat.com>
5442 * c.opt (-Wmissing-attributes): New option.
5444 2018-02-21 Martin Liska <mliska@suse.cz>
5446 * c.opt (Wcatch-value=): Add IntegerRange.
5448 2018-02-15 Jason Merrill <jason@redhat.com>
5450 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_deduction_guides.
5452 2018-02-09 Nathan Sidwell <nathan@acm.org>
5455 * c-common.h (strict_aliasing_warning): Drop OTYPE arg, insert LOC
5457 * c-warn.c (strict_aliasing_warning): Drop OTYPE arg, require LOC
5460 2018-02-09 Martin Sebor <msebor@redhat.com>
5463 * c.opt (-Wstringop-overflow, -Warray-bounds): Add LTO.
5464 (-Walloc-size-larger-than, -Wformat-truncation=): Same.
5465 (-Wmaybe-uninitialized, -Wnonnull, -Wrestrict): Same.
5466 (-Wstrict-overflow, -Wsuggest-attribute): Same.
5467 (-Wuninitialized): Same.
5469 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
5471 * c-ada-spec.c (dump_ada_declaration): Do not generate the 'constant'
5472 keyword for components.
5474 2018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
5476 * c-common.h (DECL_UNNAMED_BIT_FIELD): New.
5478 2018-02-02 Julia Koval <julia.koval@intel.com>
5480 * c-common.h (omp_clause_mask): Move to wide_int_bitmask.h.
5482 2018-01-29 Marek Polacek <polacek@redhat.com>
5485 * c-format.c (check_function_format): Check current_function_decl.
5487 2018-01-27 Jakub Jelinek <jakub@redhat.com>
5489 * c-cppbuiltin.c (c_cpp_builtins): Use ggc_strdup for the fp_suffix
5491 (LAZY_HEX_FP_VALUES_CNT): Define.
5492 (lazy_hex_fp_values): Allow up to LAZY_HEX_FP_VALUES_CNT lazy hex fp
5493 values rather than just 12.
5494 (builtin_define_with_hex_fp_value): Likewise.
5496 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
5499 * c.opt (-fmacro-prefix-map): New option.
5500 * c-opts.c (c_common_handle_option): Handle it.
5501 * c-lex.c (init_c_lex): Set remap_filename cpp callback.
5502 * c-ppoutput.c (init_pp_output): Likewise.
5504 2018-01-17 David Malcolm <dmalcolm@redhat.com>
5507 * c-common.c (fold_for_warn): Move to c/c-fold.c and cp/expr.c.
5509 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
5511 * c-ada-spec.c (dump_number): Add FLOAT_P parameter.
5512 Skip 'f' and 'F' characters if it is true.
5513 (store_ada_macro): Minor tweak.
5514 (dump_ada_macros) <CPP_COMMENT>: Likewise.
5515 <CPP_WSTRING>: Likewise.
5516 <CPP_STRING>: Output '&' in the buffer if not the first string.
5517 <CPP_NUMBER>: Adjust calls to dump_number.
5519 2018-01-10 David Malcolm <dmalcolm@redhat.com>
5522 * c-common.c: Include "selftest.h".
5523 (get_atomic_generic_size): Perform the test for integral type
5524 before the range test for any integer constant, fixing indentation
5525 of braces. Call fold_for_warn before testing for an INTEGER_CST.
5526 (reject_gcc_builtin): Strip any location wrapper from EXPR.
5527 (selftest::test_fold_for_warn): New function.
5528 (selftest::c_common_c_tests): New function.
5529 (selftest::c_family_tests): Call it, and
5530 selftest::c_pretty_print_c_tests.
5531 * c-common.h (selftest::c_pretty_print_c_tests): New decl.
5532 * c-format.c (check_format_arg): Convert VAR_P check to a
5534 * c-pretty-print.c: Include "selftest.h".
5535 (pp_c_cast_expression): Don't print casts for location wrappers.
5536 (selftest::assert_c_pretty_printer_output): New function.
5537 (ASSERT_C_PRETTY_PRINTER_OUTPUT): New macro.
5538 (selftest::test_location_wrappers): New function.
5539 (selftest::c_pretty_print_c_tests): New function.
5540 * c-warn.c (warn_for_memset): Call fold_for_warn on the arguments.
5542 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
5543 Alan Hayward <alan.hayward@arm.com>
5544 David Sherwood <david.sherwood@arm.com>
5546 * c-common.c (c_common_type_for_mode): Handle MODE_VECTOR_BOOL.
5548 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
5549 Alan Hayward <alan.hayward@arm.com>
5550 David Sherwood <david.sherwood@arm.com>
5552 * c-ubsan.c (ubsan_instrument_shift): Treat GET_MODE_BITSIZE
5555 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
5556 Alan Hayward <alan.hayward@arm.com>
5557 David Sherwood <david.sherwood@arm.com>
5559 * c-common.c (vector_types_convertible_p, c_build_vec_perm_expr)
5560 (convert_vector_to_array_for_subscript): Handle polynomial
5561 TYPE_VECTOR_SUBPARTS.
5562 (c_common_type_for_mode): Check valid_vector_subparts_p.
5563 * c-pretty-print.c (pp_c_initializer_list): Handle polynomial
5566 2018-01-03 Jakub Jelinek <jakub@redhat.com>
5568 Update copyright years.
5570 2017-12-22 Mike Stump <mikestump@comcast.net>
5571 Eric Botcazou <ebotcazou@adacore.com>
5573 * c-pragma.c (init_pragma): Register pragma GCC unroll.
5574 * c-pragma.h (enum pragma_kind): Add PRAGMA_UNROLL.
5576 2017-12-22 Alexandre Oliva <aoliva@redhat.com>
5580 * c-semantics.c (only_debug_stmts_after_p): New.
5581 (pop_stmt_list): Clear side effects in debug-only stmt list.
5582 Check for single nondebug stmt followed by debug stmts only.
5584 2017-12-21 Alexandre Oliva <aoliva@redhat.com>
5587 * c-semantics.c (pop_stmt_list): Propagate side effects from
5588 single nondebug stmt to container list.
5590 2017-12-19 Jakub Jelinek <jakub@redhat.com>
5592 * known-headers.cc (get_stdlib_header_for_name): Replace Yoda
5593 conditions with typical order conditions.
5595 2017-12-18 Marek Polacek <polacek@redhat.com>
5597 * c-warn.c (warn_logical_operator): Return early if -Wlogical-op is
5600 2017-12-17 Martin Sebor <msebor@redhat.com>
5602 * c-attribs.c (common_handle_aligned_attribute): Avoid issuing
5603 an error for attribute warn_if_not_aligned.
5605 2017-12-16 Martin Sebor <msebor@redhat.com>
5607 PR tree-optimization/78918
5608 * c-common.c (check_function_restrict): Avoid checking built-ins.
5609 * c.opt (-Wrestrict): Include in -Wall.
5611 2017-12-15 Jakub Jelinek <jakub@redhat.com>
5613 * c-attribs.c (c_common_attribute_table,
5614 c_common_format_attribute_table): Swap affects_type_identity
5615 and handler fields, adjust comments.
5617 2017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
5619 * c.opt (Wcast-function-type): New warning option.
5620 * c-lex.c (get_fileinfo): Avoid warning.
5621 * c-ppoutput.c (scan_translation_unit_directives_only): Remove cast.
5623 2017-12-14 Qing Zhao <qing.zhao@oracle.com>
5626 * c-cppbuiltin.c (builtin_define_with_hex_fp_value):
5627 Adjust the size of buf1 and buf2, add a new buf to avoid
5628 format-overflow warning.
5630 2017-12-12 Alexandre Oliva <aoliva@redhat.com>
5632 * c-semantics.c (pop_stmt_list): Move begin stmt marker into
5633 subsequent statement list.
5635 2017-12-07 Martin Sebor <msebor@redhat.com>
5639 * c-attribs.c (attr_aligned_exclusions): New array.
5640 (attr_alloc_exclusions, attr_cold_hot_exclusions): Same.
5641 (attr_common_exclusions, attr_const_pure_exclusions): Same.
5642 (attr_gnu_inline_exclusions, attr_inline_exclusions): Same.
5643 (attr_noreturn_exclusions, attr_returns_twice_exclusions): Same.
5644 (attr_warn_unused_result_exclusions): Same.
5645 (handle_hot_attribute, handle_cold_attribute): Simplify.
5646 (handle_const_attribute): Warn on function returning void.
5647 (handle_pure_attribute): Same.
5648 (handle_aligned_attribute): Diagnose conflicting attribute
5650 * c-warn.c (diagnose_mismatched_attributes): Simplify.
5652 2017-12-06 David Malcolm <dmalcolm@redhat.com>
5655 * c-common.c (selftest::c_family_tests): Call
5656 selftest::c_spellcheck_cc_tests.
5657 * c-common.h (selftest::c_spellcheck_cc_tests): New decl.
5658 * c-spellcheck.cc: Include "selftest.h".
5659 (name_reserved_for_implementation_p): New function.
5660 (should_suggest_as_macro_p): New function.
5661 (find_closest_macro_cpp_cb): Move the check for NT_MACRO to
5662 should_suggest_as_macro_p and call it.
5663 (selftest::test_name_reserved_for_implementation_p): New function.
5664 (selftest::c_spellcheck_cc_tests): New function.
5665 * c-spellcheck.h (name_reserved_for_implementation_p): New decl.
5667 2017-12-06 David Malcolm <dmalcolm@redhat.com>
5669 * c-spellcheck.cc: New file, taken from macro-handling code in
5671 * c-spellcheck.h: New file, taken from macro-handling code in
5674 2017-12-01 Jakub Jelinek <jakub@redhat.com>
5676 * c-attribs.c (c_common_attribute_table): Remove "cilk simd function"
5678 (handle_simd_attribute): Don't check for "cilk simd function"
5679 attribute. Reindent, formatting changes.
5681 2017-11-30 Julia Koval <julia.koval@intel.com>
5683 * c-common.h (inv_list): Remove.
5685 2017-11-28 Jakub Jelinek <jakub@redhat.com>
5688 * c-common.c (c_switch_covers_all_cases_p_1,
5689 c_switch_covers_all_cases_p): New functions.
5690 * c-common.h (c_switch_covers_all_cases_p): Declare.
5692 2017-11-28 Julia Koval <julia.koval@intel.com>
5693 Sebastian Peryt <sebastian.peryt@intel.com>
5695 * array-notation-common.c: Delete.
5696 * c-cilkplus.c: Ditto.
5697 * c-common.c (_Cilk_spawn, _Cilk_sync, _Cilk_for): Remove.
5698 * c-common.def (ARRAY_NOTATION_REF): Remove.
5699 * c-common.h (RID_CILK_SPAWN, build_array_notation_expr,
5700 build_array_notation_ref, C_ORT_CILK, c_check_cilk_loop,
5701 c_validate_cilk_plus_loop, cilkplus_an_parts,
5702 cilk_ignorable_spawn_rhs_op,
5703 cilk_recognize_spawn): Remove.
5704 * c-gimplify.c (CILK_SPAWN_STMT): Remove.
5705 * c-omp.c: Remove CILK_SIMD check.
5706 * c-pragma.c: Ditto.
5707 * c-pragma.h: Remove CILK related pragmas.
5708 * c-pretty-print.c (c_pretty_printer::postfix_expression): Remove
5709 ARRAY_NOTATION_REF condition.
5710 (c_pretty_printer::expression): Ditto.
5711 * c.opt (fcilkplus): Remove.
5714 2017-11-21 Marc Glisse <marc.glisse@inria.fr>
5716 * c-pretty-print.c (pp_c_additive_expression,
5717 c_pretty_printer::expression): Handle POINTER_DIFF_EXPR.
5719 2017-11-21 Jakub Jelinek <jakub@redhat.com>
5721 * c-common.c (get_nonnull_operand): Use tree_to_uhwi.
5724 * c-common.c (get_atomic_generic_size): Use TREE_INT_CST_LOW
5725 instead of tree_to_uhwi, formatting fix.
5727 2017-11-20 David Malcolm <dmalcolm@redhat.com>
5730 * known-headers.cc: New file, based on material from c/c-decl.c.
5731 (suggest_missing_header): Copied as-is.
5732 (get_stdlib_header_for_name): New, based on get_c_name_hint but
5733 heavily edited to add C++ support. Add some knowledge about
5734 <limits.h>, <stdint.h>, and <wchar.h>.
5735 * known-headers.h: Likewise.
5737 2017-11-20 David Malcolm <dmalcolm@redhat.com>
5739 * c-common.h (enum lookup_name_fuzzy_kind): Move to name-hint.h.
5740 (lookup_name_fuzzy): Likewise. Convert return type from
5741 const char * to name_hint. Add location_t param.
5742 * name-hint.h: New header.
5744 2017-11-19 Jakub Jelinek <jakub@redhat.com>
5748 * c-common.h (c_fully_fold): Add LVAL argument defaulted to false.
5750 2017-11-16 Joseph Myers <joseph@codesourcery.com>
5752 * c.opt (-std=c17, std=gnu17, -std=iso9899:2017): Refer to 2018
5753 expected publication date of C17.
5754 (-std=c18, -std=gnu18, -std=iso9899:2018): New option aliases.
5756 2017-11-15 Joseph Myers <joseph@codesourcery.com>
5759 * c-common.c (c_common_reswords): Add __builtin_tgmath.
5760 * c-common.h (enum rid): Add RID_BUILTIN_TGMATH.
5762 2017-11-10 Martin Sebor <msebor@redhat.com>
5765 * c-common.c (catenate_strings): Use memcpy instead of strncpy.
5766 * c-warn.c (sizeof_pointer_memaccess_warning): Handle arrays.
5767 * c.opt (-Wstringop-truncation): New option.
5769 2017-11-06 Martin Liska <mliska@suse.cz>
5772 * c-opts.c (c_common_post_options): Set -Wreturn-type for C++
5774 * c.opt: Set default value of warn_return_type.
5776 2017-10-31 David Malcolm <dmalcolm@redhat.com>
5778 * c-common.c (binary_op_error): Update for renaming of
5780 (c_parse_error): Likewise.
5781 * c-warn.c (warn_logical_not_parentheses): Likewise for
5782 renaming of inform_at_rich_loc.
5783 (warn_for_restrict): Likewise for renaming of
5784 warning_at_rich_loc_n.
5786 2017-10-30 Joseph Myers <joseph@codesourcery.com>
5788 * c.opt (std=c17, std=gnu17, std=iso9899:2017): New options.
5789 * c-opts.c (set_std_c17): New function.
5790 (c_common_init_options): Use gnu17 as default C version.
5791 (c_common_handle_option): Handle -std=c17 and -std=gnu17.
5793 2017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
5795 * c-cppbuiltin.c (mode_has_fma): Add support for PowerPC KFmode.
5796 (c_cpp_builtins): If a machine has a fast fma _Float<N> and
5797 _Float<N>X variant, define __FP_FAST_FMA<N> and/or
5800 2017-10-23 Marek Polacek <polacek@redhat.com>
5803 * c-warn.c (warnings_for_convert_and_check): Fix typos.
5805 2017-10-19 Eric Botcazou <ebotcazou@adacore.com>
5807 * c-common.c (check_builtin_function_arguments): Also check arguments
5808 of __builtin_alloca_with_align_and_max.
5810 2017-10-17 David Malcolm <dmalcolm@redhat.com>
5812 * c-format.c (format_warning_at_char): Pass UNKNOWN_LOCATION
5813 rather than NULL to format_warning_va.
5814 (check_format_types): Likewise when calling format_type_warning.
5815 Remove code to extract source_ranges and source_range * in favor
5816 of just a location_t.
5817 (format_type_warning): Convert source_range * param to a
5820 2017-10-13 Jakub Jelinek <jakub@redhat.com>
5822 * c-gimplify.c (c_gimplify_expr): Handle [LR]ROTATE_EXPR like
5825 2017-10-12 David Malcolm <dmalcolm@redhat.com>
5827 * c-common.c (enum missing_token_insertion_kind): New enum.
5828 (get_missing_token_insertion_kind): New function.
5829 (maybe_suggest_missing_token_insertion): New function.
5830 * c-common.h (maybe_suggest_missing_token_insertion): New decl.
5832 2017-10-11 Nathan Sidwell <nathan@acm.org>
5834 * c-opts.c (add_prefixed_path): Change chain to incpath_kind.
5835 (c_common_handle_option): Update incpath_kind names.
5837 2017-10-11 Martin Liska <mliska@suse.cz>
5840 * c-attribs.c (handle_no_sanitize_attribute): Report directly
5841 Wattributes warning.
5843 2017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
5845 * c-ada-spec.c (dump_generic_ada_node): Use wi::to_wide when
5846 operating on trees as wide_ints.
5847 * c-common.c (pointer_int_sum): Likewise.
5848 * c-pretty-print.c (pp_c_integer_constant): Likewise.
5849 * c-warn.c (match_case_to_enum_1): Likewise.
5850 (c_do_switch_warnings): Likewise.
5851 (maybe_warn_shift_overflow): Likewise.
5853 2017-10-10 Jakub Jelinek <jakub@redhat.com>
5856 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_wide
5857 instead of wide_int::from.
5859 2017-10-06 Jakub Jelinek <jakub@redhat.com>
5862 * c-warn.c (warn_tautological_bitwise_comparison): Instead of
5863 using to_widest use wide_int with the larger of the two precisions.
5865 2017-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
5867 * c-pretty-print.c (pp_c_parameter_type_list): Print ... for variadic
5870 2017-10-02 Richard Sandiford <richard.sandiford@linaro.org>
5872 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_widest
5873 when combining the original unconverted comparison operands.
5875 2017-09-29 Jakub Jelinek <jakub@redhat.com>
5877 * c-attribs.c (handle_noipa_attribute): Don't add "stack_protect"
5880 2017-09-29 Eric Botcazou <ebotcazou@adacore.com>
5882 * c-ada-spec.c (to_ada_name): Add index parameter.
5883 (pp_ada_tree_identifier): Likewise.
5884 (dump_ada_macros): Adjust call to to_ada_name.
5885 (struct overloaded_name_hash): New type.
5886 (struct overloaded_name_hasher): Likewise.
5887 (overloaded_names): New hash table.
5888 (compute_overloading_index): New function.
5889 (dump_ada_decl_name): Call it and pass the result to
5890 pp_ada_tree_identifier.
5891 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
5892 (dump_ada_function_declaration): Likewise.
5893 (dump_generic_ada_node): Likewise.
5894 (print_constructor): Likewise.
5895 (print_destructor): Likewise.
5896 (dump_ada_specs): Delete overloaded_names table.
5898 2017-09-29 Eric Botcazou <ebotcazou@adacore.com>
5900 * c-ada-spec.c (max_ada_macros): Move around.
5901 (store_ada_macro_index): Likewise.
5902 (source_file): Rename into...
5903 (macro_source_file): ...this.
5904 (count_ada_macro): Move around.
5905 (store_ada_macro): Likewise.
5906 (compare_macro): Likewise.
5907 (print_ada_macros): Merge in...
5908 (dump_ada_macros): ...this.
5909 (source_file_base): Rename into...
5910 (current_source_file): ...this.
5911 (print_comment): Move around.
5912 (dump_ada_nodes): Call dump_ada_declaration directly.
5913 (struct with): Change type of limited field to bool.
5914 (append_withs): Change type of limited_access parameter to bool.
5915 (pp_ada_tree_identifie): Likewise.
5916 (dump_ada_decl_nam): Likewise.
5917 (dump_generic_ada_node): Likewise. Do not print the return type.
5918 (to_ada_name): Change type of space_found parameter to bool.
5919 (dump_ada_function_declaration): Return void and change type of
5920 parameters to bool. Also print the return type for a function.
5921 (print_ada_methods): Rename into...
5922 (dump_ada_methods): ...this.
5923 (print_ada_declaration): Rename into ...
5924 (dump_ada_declaration): ...this. Do not print the return type.
5925 (print_ada_struct_decl): Rename into...
5926 (dump_ada_struct_decl): ...this.
5928 2017-09-29 Jakub Jelinek <jakub@redhat.com>
5930 * c-attribs.c (handle_packed_attribute): Test DECL_C_BIT_FIELD
5931 rather than DECL_INITIAL.
5932 (common_handle_aligned_attribute): Likewise.
5934 2017-09-20 Alexandre Oliva <aoliva@redhat.com>
5936 * c.opt (gen-decls): Add RejectNegative.
5938 2017-09-15 Andrew Sutton <andrew.n.sutton@gmail.com>
5939 Jakub Jelinek <jakub@redhat.com>
5941 Add support for -std=c++2a.
5942 * c-common.h (cxx_dialect): Add cxx2a as a dialect.
5943 * opt.c: Add options for -std=c++2a and -std=gnu++2a.
5944 * c-opts.c (set_std_cxx2a): New.
5945 (c_common_handle_option): Set options when -std=c++2a is enabled.
5946 (c_common_post_options): Adjust comments.
5947 (set_std_cxx14, set_std_cxx17): Likewise.
5949 2017-09-15 Eric Botcazou <ebotcazou@adacore.com>
5951 * c-pragma.c (handle_pragma_scalar_storage_order): Expand on error
5952 message for non-uniform endianness and issue a warning in C++.
5954 2017-09-15 Jakub Jelinek <jakub@redhat.com>
5956 * c.opt (Wc++1z-compat): Change from option to undocumented alias.
5957 (Wc++17-compat): Change from undocumented alias to option.
5958 (Wnoexcept-type): Enable by Wc++17-compat instead of Wc++1z-compat,
5959 change C++1z to C++17 in description.
5960 (std=c++1z, std=gnu++1z): Change from option to undocumented
5962 (std=c++17, std=gnu++17): Change from undocumented alias to option.
5964 * c-common.h (enum cxx_dialect): Rename cxx1z to cxx17.
5965 * c-opts.c (set_std_cxx1z): Rename to ...
5966 (set_std_cxx17): ... this.
5967 (c_common_handle_option): Rename OPT_std_c__1z to OPT_std_c__17
5968 and OPT_std_gnu__1z to OPT_std_gnu__17. Adjust set_std_cxx1z
5970 (c_common_post_options): Use cxx17 instead of cxx1z. Adjust
5973 2017-09-12 H.J. Lu <hongjiu.lu@intel.com>
5975 * c-attribs.c (common_handle_aligned_attribute): Don't warn
5976 function alignment if warn_if_not_aligned_p is true.
5978 2017-09-12 Nathan Sidwell <nathan@acm.org>
5980 * c-common.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
5981 resort_sorted_fields): Move to c/c-decl.c.
5982 * c-common.h (field_decl_cmp, resort_sorted_fields): Delete.
5983 (struct sorted_fields_type): Move to c/c-lang.h.
5985 2017-09-09 Jonathan Wakely <jwakely@redhat.com>
5988 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_threadsafe_static_init.
5990 2017-09-04 Marek Polacek <polacek@redhat.com>
5993 * c-warn.c (warn_tautological_bitwise_comparison): New function.
5994 (warn_tautological_cmp): Call it.
5996 2017-09-01 Boris Kolpackov <boris@codesynthesis.com>
5998 * c-opts.c (c_common_finish): Write dependency information even if
6001 2017-09-01 Jakub Jelinek <jakub@redhat.com>
6004 * c-pragma.c (omp_pragmas): Move "ordered" entry from here to ...
6005 (omp_pragmas_simd): ... here.
6006 * c-omp.c (c_finish_omp_ordered): If clauses isn't simd clause alone,
6007 create new clauses list containing just simd clause.
6009 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
6010 Alan Hayward <alan.hayward@arm.com>
6011 David Sherwood <david.sherwood@arm.com>
6013 * c-attribs.c (vector_mode_valid_p) Fold GET_MODE_INNER call
6014 into scalar_mode_supported_p call.
6015 (handle_mode_attribute): Update call to scalar_mode_supported_p.
6017 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
6018 Alan Hayward <alan.hayward@arm.com>
6019 David Sherwood <david.sherwood@arm.com>
6021 * c-common.c (c_common_fixed_point_type_for_size): Use opt_scalar_mode
6022 for the mode iterator.
6024 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
6025 Alan Hayward <alan.hayward@arm.com>
6026 David Sherwood <david.sherwood@arm.com>
6028 * c-lex.c (interpret_fixed): Use SCALAR_TYPE_MODE.
6029 * c-common.c (c_build_vec_perm_expr): Likewise.
6031 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
6032 Alan Hayward <alan.hayward@arm.com>
6033 David Sherwood <david.sherwood@arm.com>
6035 * c-common.c (c_common_type_for_mode): Use as_a <scalar_int_mode>.
6037 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
6038 Alan Hayward <alan.hayward@arm.com>
6039 David Sherwood <david.sherwood@arm.com>
6041 * c-attribs.c (handle_mode_attribute): Check for a scalar_int_mode
6042 before calling targetm.addr_space.valid_pointer_mode.
6044 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
6045 Alan Hayward <alan.hayward@arm.com>
6046 David Sherwood <david.sherwood@arm.com>
6048 * c-cppbuiltin.c (c_cpp_builtins): Use opt_scalar_float_mode.
6050 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
6051 Alan Hayward <alan.hayward@arm.com>
6052 David Sherwood <david.sherwood@arm.com>
6054 * c-common.c (c_common_fixed_point_type_for_size): Use new mode
6056 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
6058 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
6059 Alan Hayward <alan.hayward@arm.com>
6060 David Sherwood <david.sherwood@arm.com>
6062 * c-cppbuiltin.c (mode_has_fma): Prefix mode names with E_ in
6065 2017-08-29 Martin Liska <mliska@suse.cz>
6068 * c-common.c (parse_optimize_options): Add argument to function
6070 * c-pragma.c (handle_pragma_diagnostic): Likewise.
6072 2017-08-24 David Malcolm <dmalcolm@redhat.com>
6074 * c-lex.c (interpret_float): Use token location
6075 when building an EXCESS_PRECISION_EXPR.
6077 2017-08-21 David Malcolm <dmalcolm@redhat.com>
6079 * c-common.c (check_function_arguments): Add "arglogs" param; pass
6080 it to check_function_format.
6081 * c-common.h (check_function_arguments): Add vec<location_t> *
6083 (check_function_format): Likewise.
6084 * c-format.c (struct format_check_context): Add field "arglocs".
6085 (check_function_format): Add param "arglocs"; pass it to
6087 (check_format_info): Add param "arglocs"; use it to initialize
6088 new field of format_ctx.
6089 (check_format_arg): Pass format_ctx->arglocs to new param of
6090 check_format_info_main.
6091 (class argument_parser): New field "arglocs".
6092 (argument_parser::argument_parser): Add "arglocs_" param and use
6093 it to initialize new field.
6094 (argument_parser::check_argument_type): Pass new arglocs field to
6096 (check_format_info_main): Add param "arglocs", and use it when
6097 constructing arg_parser.
6098 (check_format_types): Add param "arglocs"; use it if non-NULL when
6099 !EXPR_HAS_LOCATION (cur_param) to get at location information.
6101 2017-08-18 H.J. Lu <hongjiu.lu@intel.com>
6104 * c-attribs.c (handle_warn_if_not_aligned_attribute): New.
6105 (c_common_attribute_table): Add warn_if_not_aligned.
6106 (handle_aligned_attribute): Renamed to ...
6107 (common_handle_aligned_attribute): Remove argument, name, and add
6108 argument, warn_if_not_aligned. Handle warn_if_not_aligned.
6109 (handle_aligned_attribute): New.
6110 * c.opt: Add -Wif-not-aligned and -Wpacked-not-aligned.
6112 2017-08-14 Martin Sebor <msebor@redhat.com>
6115 * c-attribs.c (c_common_attribute_table): Add nonstring entry.
6116 (handle_nonstring_attribute): New function.
6118 2017-08-14 Martin Sebor <msebor@redhat.com>
6121 * c-format.h (T89_G): New macro.
6122 * c-format.c (local_gcall_ptr_node): New variable.
6123 (init_dynamic_diag_info): Initialize it.
6125 2017-08-11 Martin Liska <mliska@suse.cz>
6127 * c-opts.c (c_common_post_options): Replace ASM_OUTPUT_DEF with
6128 TARGET_SUPPORTS_ALIASES.
6130 2017-08-10 David Malcolm <dmalcolm@redhat.com>
6132 * c-common.c (c_parse_error): Add rich_location * param, using it
6133 rather implicitly using input_location.
6134 * c-common.h (c_parse_error): Add rich_location * param.
6136 2017-08-09 Marek Polacek <polacek@redhat.com>
6138 * c-common.c (pointer_int_sum): Use true/false instead of 1/0.
6139 (c_common_truthvalue_conversion): Likewise.
6140 * c-omp.c (c_finish_omp_atomic): Likewise.
6141 * c-common.h (build_binary_op): Update declaration.
6143 2017-08-08 Martin Liska <mliska@suse.cz>
6145 * c-ada-spec.c: Include header files.
6146 * c-ubsan.c: Likewise.
6147 * c-warn.c: Likewise.
6149 2017-08-07 Jakub Jelinek <jakub@redhat.com>
6152 * c-omp.c (c_finish_omp_atomic): Handle atomics on bitfields.
6154 2017-08-07 Eric Botcazou <ebotcazou@adacore.com>
6156 * c-ada-spec.c (has_nontrivial_methods): Test for FUNCTION_DECL.
6157 (print_ada_methods): Likewise.
6158 (print_ada_declaration): Likewise.
6160 2017-08-07 Martin Liska <mliska@suse.cz>
6162 * array-notation-common.c: Add new includes.
6163 * c-format.c( handle_format_attribute): Canonicalize a format
6165 * c-lex.c (c_common_has_attribute): Canonicalize name of an
6167 * c-pretty-print.c: Add new include.
6169 2017-08-05 Eric Botcazou <ebotcazou@adacore.com>
6171 * c-ada-spec.c (has_static_fields): Look only into variables.
6172 (print_constructor): Add TYPE parameter and use it for the name.
6173 (print_destructor): Likewise.
6174 (print_ada_declaration): Adjust to new constructor/destructor names.
6175 Adjust calls to print_constructor and print_destructor.
6176 (print_ada_struct_decl): Do not test TREE_STATIC on FIELD_DECL.
6177 Look only into variables in the final loop.
6179 2017-08-01 Eric Botcazou <ebotcazou@adacore.com>
6181 * c-ada-spec.c (has_static_fields): Look only into fields.
6182 (dump_generic_ada_node): Small tweak.
6183 (dump_nested_types): Look only into fields.
6184 (print_ada_declaration): Look only into methods. Small tweak.
6185 (print_ada_struct_decl): Look only into fields. Use DECL_VIRTUAL_P.
6187 2017-08-01 Eric Botcazou <ebotcazou@adacore.com>
6189 * c-ada-spec.c (print_generic_ada_decl): Pass correctly-typed constant.
6190 (dump_ada_function_declaration): Likewise.
6191 (dump_generic_ada_node): Likewise.
6192 (print_ada_declaration): Add support for const-qualified variables.
6194 2017-07-31 Martin Liska <mliska@suse.cz>
6197 * c-ubsan.c (ubsan_maybe_instrument_array_ref):
6198 Guard condition with flag_sanitize_p also with current_function_decl
6200 (ubsan_maybe_instrument_reference_or_call): Likewise.
6202 2017-07-30 Uros Bizjak <ubizjak@gmail.com>
6204 * c-format.c (asm_fprintf_char_table): Add 'z' to format_chars.
6206 2017-07-29 Eric Botcazou <ebotcazou@adacore.com>
6208 * c-ada-spec.c (dump_generic_ada_node): Take into account signedness
6210 (print_ada_declaration): Add missing guard for record types.
6212 2017-07-27 Jakub Jelinek <jakub@redhat.com>
6215 * c-omp.c (c_finish_omp_for): If the condition is wrapped in
6216 rhs of COMPOUND_EXPR(s), skip them and readd their lhs into
6217 new COMPOUND_EXPRs around the rhs of the comparison.
6219 2017-07-27 Marek Polacek <polacek@redhat.com>
6222 * c-warn.c (warn_for_sign_compare): Tweak the warning message. Print
6225 2017-07-27 Jakub Jelinek <jakub@redhat.com>
6227 * c-attribs.c (c_common_attribute_table): Add noipa attribute.
6228 (handle_noipa_attribute): New function.
6230 2017-07-07 Torsten Duwe <duwe@suse.de>
6232 * c-attribs.c (c_common_attribute_table): Add entry for
6233 "patchable_function_entry".
6235 2017-07-20 Nathan Sidwell <nathan@acm.org>
6237 Remove TYPE_METHODS.
6238 * c-ada-spec.c (is_tagged_type, has_nontrivial_methods,
6239 dump_ada_template, print_ada_methods,
6240 print_ada_declaration): Member fns are on TYPE_FIELDS.
6242 2017-07-18 Nathan Sidwell <nathan@acm.org>
6244 * c-warn.c (warn_for_memset): Use TYPE_{MIN,MAX}_VALUE.
6246 2017-07-14 David Malcolm <dmalcolm@redhat.com>
6248 * c-common.c (try_to_locate_new_include_insertion_point): New
6250 (per_file_includes_t): New typedef.
6251 (added_includes_t): New typedef.
6252 (added_includes): New variable.
6253 (maybe_add_include_fixit): New function.
6254 * c-common.h (maybe_add_include_fixit): New decl.
6256 2017-07-10 Martin Sebor <msebor@redhat.com>
6259 * c.opt (-Wstringop-overflow): Set defaults in LangEnabledBy.
6261 2017-07-06 David Malcolm <dmalcolm@redhat.com>
6263 * c-common.c (selftest::c_family_tests): New.
6264 * c-common.h (selftest::run_c_tests): Move decl to c/c-lang.h.
6265 (selftest::c_family_tests): New decl.
6267 2017-07-04 Marek Polacek <polacek@redhat.com>
6270 * c-common.c (sync_resolve_size): Give error for pointers to incomplete
6273 2017-07-04 Marek Polacek <polacek@redhat.com>
6275 * c-warn.c (warn_if_unused_value): Remove WITH_CLEANUP_EXPR handling.
6277 2017-06-28 Martin Liska <mliska@suse.cz>
6280 * c-attribs.c (handle_alias_ifunc_attribute): Append ifunc alias
6281 to a function declaration.
6283 2017-06-28 Martin Liska <mliska@suse.cz>
6286 * c.opt: Add IntegerRange to various options.
6288 2017-06-26 Marek Polacek <polacek@redhat.com>
6291 * c-common.h (warn_for_multistatement_macros): Declare.
6292 * c-warn.c: Include "c-family/c-indentation.h".
6293 (warn_for_multistatement_macros): New function.
6294 * c.opt (Wmultistatement-macros): New option.
6295 * c-indentation.c (guard_tinfo_to_string): No longer static.
6296 Change the parameter type to "enum rid". Handle RID_SWITCH.
6297 * c-indentation.h (guard_tinfo_to_string): Declare.
6299 2017-06-23 Marc Glisse <marc.glisse@inria.fr>
6301 * c-common.c (c_common_nodes_and_builtins): Use builtin_structptr_types.
6303 2017-06-15 Martin Sebor <msebor@redhat.com>
6306 * c.opt (-Wclass-memaccess): New option.
6308 2017-06-14 Boris Kolpackov <boris@codesynthesis.com>
6310 * c-opts.c (c_common_finish): Handle '-' special value to -MF.
6312 2017-06-13 Marek Polacek <polacek@redhat.com>
6315 * c-warn.c (do_warn_duplicated_branches): Return if any of the
6318 2017-06-13 Martin Liska <mliska@suse.cz>
6321 * c-attribs.c (add_no_sanitize_value): New function.
6322 (handle_no_sanitize_attribute): Likewise.
6323 (handle_no_sanitize_address_attribute): Use the function.
6324 (handle_no_sanitize_thread_attribute): New function.
6325 (handle_no_address_safety_analysis_attribute): Use
6326 add_no_sanitize_value.
6327 (handle_no_sanitize_undefined_attribute): Likewise.
6328 * c-common.h: Declare new functions.
6329 * c-ubsan.c (ubsan_instrument_division): Use sanitize_flags_p.
6330 (ubsan_instrument_shift): Likewise.
6331 (ubsan_instrument_bounds): Likewise.
6332 (ubsan_maybe_instrument_array_ref): Likewise.
6333 (ubsan_maybe_instrument_reference_or_call): Likewise.
6335 2017-06-11 Jason Merrill <jason@redhat.com>
6337 * c-ada-spec.c, c-pragma.c: Use id_equal.
6339 2017-06-04 Marek Polacek <polacek@redhat.com>
6342 * c-format.c (matching_type_p): Return false if any of the types
6343 requires structural equality.
6345 2017-06-02 Martin Sebor <msebor@redhat.com>
6348 * c-warn.c (conversion_warning): Use -Wconversion for integer
6349 conversion and -Wfloat-conversion for floating one.
6351 2017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
6353 * c.opt (Wsizeof-pointer-div): New warning option.
6355 2017-06-01 Volker Reichelt <v.reichelt@netcologne.de>
6357 * c.opt (Wcatch-value): New shortcut for Wcatch-value=1.
6358 (Wcatch-value=1): Enable by -Wall.
6360 2017-05-30 David Malcolm <dmalcolm@redhat.com>
6362 * c-format.c (gcc_cxxdiag_char_table): Add 'H' and 'I' to
6364 * c.opt (fdiagnostics-show-template-tree): New option.
6365 (felide-type): New option.
6367 2017-05-25 Volker Reichelt <v.reichelt@netcologne.de>
6369 * c.opt (Wcatch-value=): New C++ warning flag.
6371 2017-05-24 Nathan Sidwell <nathan@acm.org>
6373 * c=common.c (field_decl_cmp, resort_field_decl_cmp): Adjust T
6374 const casts to avoid warning.
6376 2017-05-24 Martin Sebor <msebor@redhat.com>
6379 * c-common.h (unsafe_conversion_p): Add a function argument.
6380 * c-common.c (unsafe_conversion_p): Same.
6381 Add type names and values to diagnostics.
6382 (scalar_to_vector): Adjust.
6383 * c-warn.c (constant_expression_error): Add a function argument.
6384 Add type names and values to diagnostics.
6385 (conversion_warning): Add a function argument.
6386 Add type names and values to diagnostics.
6387 (warnings_for_convert_and_check): Same.
6389 2017-05-19 Jason Merrill <jason@redhat.com>
6391 * c-warn.c (match_case_to_enum_1): Don't warn about enums with no
6394 2017-05-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
6396 * c-format.c (locus): Move out of function scope,
6399 2017-05-19 Nathan Sidwell <nathan@acm.org>
6401 * c-opts.c (class_dump_file, class_dump_flags): Delete.
6402 (c_common_parse_file): Remove class dump handling.
6403 (get_dump_info): Likewise.
6405 2017-05-19 Richard Biener <rguenther@suse.de>
6408 * c-warn.c (strict_aliasing_warning): Do not warn for accesses
6409 to alias-set zero memory.
6411 2017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
6413 * c-format.c (local_tree_type_node): Add GTY attribute.
6415 2017-05-18 Marek Polacek <polacek@redhat.com>
6417 * c-common.c (c_common_type_for_size): Use NULL_TREE instead of 0.
6418 (c_common_fixed_point_type_for_size): Likewise.
6419 (c_common_type_for_mode): Likewise.
6420 (shorten_compare): Likewise.
6421 (c_promoting_integer_type_p): Use false/true instead of 0/1.
6422 * c-pragma.c (maybe_apply_renaming_pragma): Use NULL_TREE instead of 0.
6424 2017-05-18 Marek Polacek <polacek@redhat.com>
6426 * c-common.c (self_promoting_args_p): Change the return type to bool.
6427 Use false/true instead of 0/1.
6428 * c-common.h (self_promoting_args_p): Update.
6430 2017-05-17 Marek Polacek <polacek@redhat.com>
6432 * c-common.c: Use NULL_TREE instead of 0 where appropriate.
6433 * c-warn.c: Likewise.
6435 2017-05-17 Ville Voutilainen <ville.voutilainen@gmail.com>
6437 Implement new C++ intrinsics __is_assignable and __is_constructible.
6438 * c-common.c (__is_assignable, __is_constructible): New.
6439 * c-common.h (RID_IS_ASSIGNABLE, RID_IS_CONSTRUCTIBLE): Likewise.
6441 2017-05-17 Martin Liska <mliska@suse.cz>
6443 * c-common.h: Introduce dump_flags_t type and
6444 use it instead of int type.
6445 * c-gimplify.c (c_genericize): Likewise.
6446 * c-opts.c: Likewise.
6448 2017-05-17 Marek Polacek <polacek@redhat.com>
6450 * c-common.c (c_save_expr): Remove.
6451 (c_common_truthvalue_conversion): Remove a call to c_save_expr.
6452 * c-common.h (c_save_expr): Remove declaration.
6454 2017-05-09 Volker Reichelt <v.reichelt@netcologne.de>
6457 * c-pretty-print.c (c_pretty_printer::expression): Handle MAX_EXPR,
6458 MIN_EXPR, EXACT_DIV_EXPR, RDIV_EXPR, LROTATE_EXPR, RROTATE_EXPR.
6459 (c_pretty_printer::postfix_expression): Handle MAX_EXPR, MIN_EXPR.
6460 (c_pretty_printer::multiplicative_expression): Handle EXACT_DIV_EXPR,
6462 (pp_c_shift_expression): Handle LROTATE_EXPR, RROTATE_EXPR.
6464 2017-05-09 Marek Polacek <polacek@redhat.com>
6467 * c-warn.c (unwrap_c_maybe_const): New.
6468 (warn_logical_operator): Call it.
6470 2017-05-09 Nathan Sidwell <nathan@acm.org>
6472 * c-common.c (c_register_builtin_type): Use pushdecl lang_hook.
6473 * c-common.h (pushdecl_top_level, pushdecl): Don't declare here.
6475 2017-05-08 Martin Sebor <msebor@redhat.com>
6477 PR translation/80280
6478 * c-format.h (struct format_flag_spec): Add new member.
6480 * c-format.c (local_tree_type_node): New global.
6481 (printf_flag_specs, asm_fprintf_flag_spec): Initialize new data.
6482 (gcc_diag_flag_specs, scanf_flag_specs, strftime_flag_specs): Ditto.
6483 (strfmon_flag_specs): Likewise.
6484 (gcc_diag_char_table, gcc_cdiag_char_table): Split up specifiers
6485 with distinct quoting properties.
6486 (gcc_tdiag_char_table, gcc_cxxdiag_char_table): Same.
6487 (flag_chars_t::validate): Add argument and handle bad quoting.
6488 (check_format_info_main): Handle quoting problems.
6489 (init_dynamic_diag_info): Simplify.
6491 2017-05-08 Jason Merrill <jason@redhat.com>
6493 * c-opts.c (c_common_post_options): Update defaults for
6494 flag_abi_version and flag_abi_compat_version.
6496 2017-05-05 David Malcolm <dmalcolm@redhat.com>
6498 * c-common.c (c_cpp_error): Replace report_diagnostic
6499 with diagnostic_report_diagnostic.
6501 2017-05-04 Martin Sebor <msebor@redhat.com>
6503 PR translation/80280
6504 * c-attribs.c (handle_alias_ifunc_attribute): Quote a %D directive.
6505 (handle_weakref_attribute): Same.
6507 2017-05-03 Nathan Sidwell <nathan@acm.org>
6509 Canonicalize canonical type hashing
6510 * c-common.c (complete_array_type): Use type_hash_canon.
6512 2017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
6515 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): Remove
6517 (cilk_install_body_pedigree_operations): Likewise.
6518 * cilk.c (cilk_set_spawn_marker): Mark functions that should be
6520 (cilk_gimplify_call_params_in_spawned_fn): Remove.
6521 (cilk_install_body_pedigree_operations): Likewise.
6522 (gimplify_cilk_spawn): Add EXPR_STMT and CLEANUP_POINT_EXPR
6525 2017-04-27 Jakub Jelinek <jakub@redhat.com>
6528 * c-common.c (complete_array_type): Only hash TYPE_TYPELESS_STORAGE
6529 flag on non-aggregate element types.
6531 2017-04-25 Bernd Edlinger <bernd.edlinger@hotmail.de>
6533 * c-common.c (c_type_hasher, type_hash_table): Remove.
6534 (c_common_get_alias_set): Remove unreachable code.
6535 * c-opts.c (c_common_post_options): Make sure cc1 takes only one file.
6537 2017-04-20 Volker Reichelt <v.reichelt@netcologne.de>
6539 * c.opt (Wextra-semi): New C++ warning flag.
6541 2017-04-20 Jakub Jelinek <jakub@redhat.com>
6544 * c-common.c (complete_array_type): Preserve TYPE_TYPELESS_STORAGE.
6546 2017-04-18 Jakub Jelinek <jakub@redhat.com>
6550 * c-common.c (c_common_type_for_mode): Don't handle
6551 widest_*_literal_type_node here.
6552 c_common_signed_or_unsigned_type): Likewise.
6553 (c_common_nodes_and_builtins): Set widest_*_literal_type_node
6554 to *intTI_type_node or *intDI_type_node depending on whether
6555 TImode is supported by the target or not.
6557 2017-04-10 Martin Liska <mliska@suse.cz>
6560 * c-ubsan.c (ubsan_instrument_shift): Evaluate RHS before
6561 doing an UBSAN check.
6563 2017-04-03 Jonathan Wakely <jwakely@redhat.com>
6565 * c-warn.c (do_warn_double_promotion): Fix typo in comment.
6567 2017-03-31 Jakub Jelinek <jakub@redhat.com>
6570 * c-ubsan.h (ubsan_maybe_instrument_reference): Change argument to
6572 * c-ubsan.c (ubsan_maybe_instrument_reference): Likewise. Handle
6573 not just NOP_EXPR to REFERENCE_TYPE, but also INTEGER_CST with
6576 2017-03-31 David Malcolm <dmalcolm@redhat.com>
6578 PR documentation/78732
6579 * c.opt (Wendif-labels): Fix description to refer to
6580 #else rather than #elif.
6582 2017-03-31 Jakub Jelinek <jakub@redhat.com>
6585 * c-common.h (enum rid): Add RID_IS_AGGREGATE.
6586 * c-common.c (c_common_reswords): Add __is_aggregate trait.
6588 2017-03-27 Jakub Jelinek <jakub@redhat.com>
6591 * c-common.c (c_common_mark_addressable_vec): Don't set
6592 TREE_ADDRESSABLE on DECL_HARD_REGISTER.
6594 2017-03-21 Martin Sebor <msebor@redhat.com>
6597 * c-common.c (set_underlying_type): Mark type used only when
6598 original del is declared unused.
6600 2017-03-10 David Malcolm <dmalcolm@redhat.com>
6602 PR translation/79848
6603 * c-format.c (check_format_string): Simplify uses of "%<%s%>" to
6606 2017-03-10 David Malcolm <dmalcolm@redhat.com>
6609 * c-indentation.c (warn_for_misleading_indentation): Remove parens
6610 from inform's message, so that xgettext can locate it.
6612 2017-03-09 Marek Polacek <polacek@redhat.com>
6616 * c-attribs.c (handle_nonnull_attribute): Save the result of default
6617 conversion to the attribute list.
6619 2017-03-09 Martin Liska <mliska@suse.cz>
6621 * c-ada-spec.c (macro_length): Increment value instead of a pointer.
6623 2017-03-03 Jason Merrill <jason@redhat.com>
6625 * c.opt (Wnoexcept-type): New.
6627 2017-03-02 Richard Biener <rguenther@suse.de>
6630 * c-common.c (c_common_mark_addressable_vec): Look through
6633 2017-02-28 Martin Liska <mliska@suse.cz>
6635 * c.opt: Replace space with tabular for options of <number>
6638 2017-02-28 Martin Liska <mliska@suse.cz>
6640 * c.opt: Fix --help=option -Q for options which are of
6643 2017-02-24 Jakub Jelinek <jakub@redhat.com>
6646 * c-common.c (check_function_restrict): New function.
6647 (check_function_arguments): Add FNDECL argument. Call
6648 check_function_restrict if -Wrestrict.
6649 * c-warn.c (warn_for_restrict): Remove ARGS argument, add ARGARRAY
6650 and NARGS. Use auto_vec for ARG_POSITIONS, simplify.
6651 * c-common.h (check_function_arguments): Add FNDECL argument.
6652 (warn_for_restrict): Remove ARGS argument, add ARGARRAY and NARGS.
6654 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
6656 * c-ada-spec.c (dump_ada_function_declaration): Add comment about the
6657 treatment of parameters with pointer-to-tagged type and tidy up.
6658 (print_ada_methods): Remove the special treatment of C++ static member
6661 2017-02-22 Martin Liska <mliska@suse.cz>
6663 * c.opt: Replace inequality signs with square brackets
6666 2017-02-21 Jakub Jelinek <jakub@redhat.com>
6669 * c-attribs.c (handle_mode_attribute): Use build_qualified_type to
6672 2017-02-17 Joseph Myers <joseph@codesourcery.com>
6674 * c-cppbuiltin.c (builtin_define_float_constants): Define
6675 __DECIMAL_DIG__ to the value for long double.
6677 2017-02-15 Marek Polacek <polacek@redhat.com>
6680 * c-warn.c (do_warn_double_promotion): Don't warn if an invalid
6681 conversion has occured.
6683 2017-01-24 David Malcolm <dmalcolm@redhat.com>
6685 * c-common.c (c_common_reswords): Add "__RTL".
6686 * c-common.h (enum rid): Add RID_RTL.
6688 2017-01-20 Marek Polacek <polacek@redhat.com>
6691 * c-common.h (do_warn_duplicated_branches_r): Declare.
6692 * c-gimplify.c (c_genericize): Walk the function tree calling
6693 do_warn_duplicated_branches_r.
6694 * c-warn.c (expr_from_macro_expansion_r): New.
6695 (do_warn_duplicated_branches): New.
6696 (do_warn_duplicated_branches_r): New.
6697 * c.opt (Wduplicated-branches): New option.
6699 2017-01-17 David Malcolm <dmalcolm@redhat.com>
6702 * c-indentation.c (warn_for_misleading_indentation): Use the past
6703 subjunctive in the note.
6705 2017-01-17 Aldy Hernandez <aldyh@redhat.com>
6708 * array-notation-common.c (cilkplus_extract_an_triplets): Convert
6709 start type to integer_type.
6711 2017-01-16 Jakub Jelinek <jakub@redhat.com>
6714 * c.opt (gen-decls): Add Driver flag.
6716 2017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
6719 2017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
6722 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
6724 2017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
6727 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
6729 2017-01-12 Martin Sebor <msebor@redhat.com>
6731 (-Wformat-overflow): ...to this.
6733 2017-01-11 Martin Sebor <msebor@redhat.com>
6736 * c.opt (-Walloca-larger-than, -Wformat-length, -Wformat-truncation):
6737 Also enable for LTO.
6739 2017-01-10 Jason Merrill <jason@redhat.com>
6741 Implement P0195R2, C++17 variadic using.
6742 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_variadic_using.
6744 2017-01-09 Jakub Jelinek <jakub@redhat.com>
6746 PR translation/79019
6747 PR translation/79020
6748 * c.opt (Wnormalized=): Fix typo in description.
6750 2017-01-08 Martin Sebor <msebor@redhat.com>
6753 * c.opt (-Wformat-truncation): New option.
6755 2017-01-06 Alexandre Oliva <aoliva@redhat.com>
6757 * c-pretty-print.c (pp_c_tree_decl_identifier): Convert 16-bit
6758 value to unsigned short to fit in 4 hex digits without
6761 2017-01-05 Eric Botcazou <ebotcazou@adacore.com>
6763 * c.opt (fsso-struct): Add 'native' value.
6765 2017-01-05 Martin Liska <mliska@suse.cz>
6768 * c-opts.c (c_common_post_options): Reject '-' filename for a precompiled
6771 2017-01-04 Marek Polacek <polacek@redhat.com>
6774 * c.opt (Wpointer-compare): New option.
6776 2017-01-04 Jakub Jelinek <jakub@redhat.com>
6779 * c.opt (fsso-struct=): Add RejectNegative.
6781 2017-01-01 Jakub Jelinek <jakub@redhat.com>
6783 Update copyright years.
6785 2016-12-29 Martin Liska <mliska@suse.cz>
6788 * c.opt (strong-eval-order): Add RejectNegative keyword.
6790 2016-12-22 Jason Merrill <jason@redhat.com>
6792 Implement P0522R0, matching of template template arguments.
6793 * c-cppbuiltin.c (c_cpp_builtins): Define
6794 __cpp_template_template_args.
6796 2016-12-21 Jakub Jelinek <jakub@redhat.com>
6799 * c-common.c (struct nonnull_arg_ctx): New type.
6800 (check_function_nonnull): Return bool instead of void. Use
6801 nonnull_arg_ctx as context rather than just location_t.
6802 (check_nonnull_arg): Adjust for the new context type, set
6803 warned_p to true if a warning has been diagnosed.
6804 (check_function_arguments): Return bool instead of void.
6805 * c-common.h (check_function_arguments): Adjust prototype.
6807 2016-12-21 Jason Merrill <jason@redhat.com>
6809 * c.opt (-fnew-ttp-matching): New flag.
6810 * c-opts.c (c_common_post_options): Default on if -std=c++1z.
6812 2016-12-14 Martin Jambor <mjambor@suse.cz>
6814 * c-omp.c: Include omp-general.h instead of omp-low.h.
6815 (c_finish_oacc_wait): Adjusted call to find_omp_clause to use its new
6818 2016-12-14 Martin Sebor <msebor@redhat.com>
6821 * c-common.c (check_nonnull_arg): Disable when optimization
6824 2016-12-12 Marek Polacek <polacek@redhat.com>
6827 * c-common.c (attribute_fallthrough_p): Return false for
6830 2016-12-08 Martin Sebor <msebor@redhat.com>
6833 * c.opt (-Walloc-zero, -Walloc-size-larger-than): New options.
6835 2016-12-08 Martin Sebor <msebor@redhat.com>
6838 * c-pretty-print (pp_c_integer_constant): Avoid formatting type
6841 2016-12-07 Martin Sebor <msebor@redhat.com>
6847 * c.opt (-Wstringop-overflow): New option.
6849 2016-12-02 Maxim Ostapenko <m.ostapenko@samsung.com>
6851 * c-attribs.c (asan odr indicator): New attribute.
6852 (handle_asan_odr_indicator_attribute): New function.
6854 2016-11-26 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
6856 * c-common.c (c_common_nodes_and_builtins): Remove initialization of
6859 2016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
6861 * c-common.c (excess_precision_mode_join): New.
6862 (c_ts18661_flt_eval_method): New.
6863 (c_c11_flt_eval_method): Likewise.
6864 (c_flt_eval_method): Likewise.
6865 * c-common.h (excess_precision_mode_join): New.
6866 (c_flt_eval_method): Likewise.
6867 * c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): New.
6868 (cpp_iec_559_value): Call it.
6869 (c_cpp_builtins): Modify logic for __LIBGCC_*_EXCESS_PRECISION__,
6870 call c_flt_eval_method to set __FLT_EVAL_METHOD__ and
6871 __FLT_EVAL_METHOD_TS_18661_3__.
6873 2016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
6875 * c-opts.c (c_common_post_options): Add logic to handle the default
6876 case for -fpermitted-flt-eval-methods.
6878 2016-11-23 Paolo Bonzini <bonzini@gnu.org>
6880 * c.opt (Wexpansion-to-defined): New.
6882 2016-11-23 Jakub Jelinek <jakub@redhat.com>
6885 * c-pragma.c (handle_pragma_target): Don't replace
6886 current_target_pragma, but chainon the new args to the current one.
6888 2016-11-22 Nathan Sidwell <nathan@acm.org>
6890 * array-notation-common.c (cilkplus_extract_an_trplets): Fix
6891 indentation and formatting.
6893 2016-11-21 Martin Sebor <msebor@redhat.com>
6895 * c.opt (-fprintf-return-value): Enable by default.
6897 2016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
6900 * c.opt (-Wbuiltin-declaration-mismatch): New warning.
6901 * c-common.c (c_common_nodes_and_builtins): Initialize
6902 const_tm_ptr_type_node.
6904 2016-11-16 Marek Polacek <polacek@redhat.com>
6907 * c-common.c (c_add_case_label): Turn error_at calls into inform.
6909 2016-11-14 Jakub Jelinek <jakub@redhat.com>
6911 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_structured_bindings.
6913 2016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
6914 Richard Biener <rguenther@suse.de>
6916 * c-common.h (c_common_resword): Add RID_GIMPLE, RID_PHI types.
6917 * c-common.h (enum rid): Add RID_GIMPLE, RID_PHI.
6918 * c.opt (fgimple): New option.
6920 2016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
6923 * c-common.h (warn_for_restrict): Declare.
6924 * c-warn.c: Include gcc-rich-location.h.
6925 (warn_for_restrict): New function.
6926 * c-format.c (gcc_tdiag_char_table): Add entry for "Z" specifier.
6927 (gcc_cdiag_char_table): Likewise.
6928 (gcc_cxxdiag_char_table): Likewise.
6929 * c.opt (Wrestrict): New option.
6931 2016-11-13 Eric Botcazou <ebotcazou@adacore.com>
6933 * c-ada-spec.c (print_ada_declaration): For typedef declarations, look
6934 for nested types only if the type is a record or union and dump SLOC.
6936 2016-11-09 Jason Merrill <jason@redhat.com>
6938 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_template_auto.
6940 2016-11-09 Jakub Jelinek <jakub@redhat.com>
6942 * c-ubsan.c (ubsan_instrument_shift): Handle split
6943 -fsanitize=shift-base and -fsanitize=shift-exponent.
6945 2016-11-07 Jason Merrill <jason@redhat.com>
6947 * c.opt (Wc++1z-compat): New.
6948 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_noexcept_function_type.
6950 2016-11-07 Martin Liska <mliska@suse.cz>
6952 * c-warn.c (warn_for_unused_label): Save all labels used
6953 in goto or in &label.
6955 2016-11-03 Jason Merrill <jason@redhat.com>
6957 * c-cppbuiltin.c (c_cpp_builtins): Correct
6958 __cpp_inheriting_constructors.
6960 2016-11-01 Jason Merrill <jason@redhat.com>
6962 * c-cppbuiltin.c (c_cpp_builtins): Update
6963 __cpp_inheriting_constructors.
6965 * c.opt (-fnew-inheriting-ctors): New.
6966 * c-opts.c: Default to on for ABI 11+.
6968 2016-10-31 Jakub Jelinek <jakub@redhat.com>
6971 * c.opt (fext-numeric-literals): Add Var and Init.
6972 * c-opts.c (c_common_handle_option): Don't clear
6973 cpp_opts->ext_numeric_literals for -std=c++{11,14,1z}.
6974 (c_common_post_options): Clear it here if not set
6977 2016-10-28 Aldy Hernandez <aldyh@redhat.com>
6980 * c-pretty-print.c (simple_type_specifier): Do not dereference `t'
6983 2016-10-25 Jakub Jelinek <jakub@redhat.com>
6985 * c-common.h (enum rid): Add RID_BUILTIN_LAUNDER.
6986 * c-common.c (c_common_reswords): Add __builtin_launder.
6988 2016-10-24 Bernd Edlinger <bernd.edlinger@hotmail.de>
6990 * c-common.c (c_common_truthvalue_conversion): Warn for
6991 multiplications in boolean context. Fix the quoting of '<<' and '<'
6992 in the shift warning.
6994 2016-10-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
6996 * c-common.c (c_common_truthvalue_conversion): Fix the comment.
6998 2016-10-20 Jason Merrill <jason@redhat.com>
7000 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_concepts value.
7002 2016-10-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
7004 * c-common.c (c_common_truthvalue_conversion): Warn only for signed
7005 integer shift ops in boolean context.
7007 2016-10-18 Aldy Hernandez <aldyh@redhat.com>
7009 * c.opt (Walloca): New.
7010 (Walloca-larger-than=): New.
7011 (Wvla-larger-than=): New.
7013 2016-10-17 Marek Polacek <polacek@redhat.com>
7015 * c-warn.c (find_array_ref_with_const_idx_r): Remove parameter names.
7016 Return immediately when finding a match.
7017 (warn_tautological_cmp): Remove a boolean variable that is no longer
7020 2016-10-17 Marek Polacek <polacek@redhat.com>
7022 * c-attribs.c: New file.
7023 * c-common.c: Move attributes handling to c-attribs.c.
7024 (get_nonnull_operand): No longer static.
7025 * c-common.h: Move the declarations from c-attribs.c to its own section.
7027 2016-10-14 Jason Merrill <jason@redhat.com>
7029 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_aggregate_bases
7030 and __cpp_deduction_guides.
7032 2016-10-13 Jason Merrill <jason@redhat.com>
7034 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_inline_variables.
7036 2016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
7038 * c-cppbuiltin.c: Include memmodel.h.
7039 * c-opts.c: Likewise.
7040 * c-pragma.c: Likewise.
7041 * c-warn.c: Likewise.
7043 2016-10-12 Jakub Jelinek <jakub@redhat.com>
7045 * c.opt (Wextra): Add as C/C++/ObjC/ObjC++ option.
7046 (Wimplicit-fallthrough=): Enable for these languages by -Wextra.
7047 * c-opts.c (sanitize_cpp_opts): Initialize
7048 cpp_opts->cpp_warn_implicit_fallthrough.
7050 2016-10-11 Marek Polacek <polacek@redhat.com>
7052 * c-common.c (warning_candidate_p): Change the return type to bool
7053 and return true/false instead of 1/0.
7054 (vector_mode_valid_p): Likewise.
7056 2016-10-11 Marek Polacek <polacek@redhat.com>
7058 * c-common.c (fold_for_warn): No longer static.
7059 (bool_promoted_to_int_p): Likewise.
7060 (c_common_get_narrower): Likewise.
7061 (constant_expression_warning): Move to c-warn.c.
7062 (constant_expression_error): Likewise.
7063 (overflow_warning): Likewise.
7064 (warn_logical_operator): Likewise.
7065 (find_array_ref_with_const_idx_r): Likewise.
7066 (warn_tautological_cmp): Likewise.
7067 (expr_has_boolean_operands_p): Likewise.
7068 (warn_logical_not_parentheses): Likewise.
7069 (warn_if_unused_value): Likewise.
7070 (strict_aliasing_warning): Likewise.
7071 (sizeof_pointer_memaccess_warning): Likewise.
7072 (check_main_parameter_types): Likewise.
7073 (conversion_warning): Likewise.
7074 (warnings_for_convert_and_check): Likewise.
7075 (match_case_to_enum_1): Likewise.
7076 (match_case_to_enum): Likewise.
7077 (c_do_switch_warnings): Likewise.
7078 (warn_for_omitted_condop): Likewise.
7079 (readonly_error): Likewise.
7080 (lvalue_error): Likewise.
7081 (invalid_indirection_error): Likewise.
7082 (warn_array_subscript_with_type_char): Likewise.
7083 (warn_about_parentheses): Likewise.
7084 (warn_for_unused_label): Likewise.
7085 (warn_for_div_by_zero): Likewise.
7086 (warn_for_memset): Likewise.
7087 (warn_for_sign_compare): Likewise.
7088 (do_warn_double_promotion): Likewise.
7089 (do_warn_unused_parameter): Likewise.
7090 (record_locally_defined_typedef): Likewise.
7091 (maybe_record_typedef_use): Likewise.
7092 (maybe_warn_unused_local_typedefs): Likewise.
7093 (maybe_warn_bool_compare): Likewise.
7094 (maybe_warn_shift_overflow): Likewise.
7095 (warn_duplicated_cond_add_or_warn): Likewise.
7096 (diagnose_mismatched_attributes): Likewise.
7097 * c-common.h: Move the declarations from c-warn.c to its own section.
7098 * c-warn.c: New file.
7100 2016-10-08 Jason Merrill <jason@redhat.com>
7102 * c-common.c (c_common_truthvalue_conversion): Don't distribute
7103 into COND_EXPR in C++.
7105 2016-10-08 Jakub Jelinek <jakub@redhat.com>
7107 * c-lex.c (c_lex_with_flags) <case CPP_COMMENT>: For CPP_COMMENT
7108 token with PREV_FALLTHROUGH, skip all following CPP_PADDING and
7109 CPP_COMMENT tokens and set add_flags to PREV_FALLTHROUGH afterwards.
7111 2016-10-07 Jakub Jelinek <jakub@redhat.com>
7113 Implement LWG2296 helper intrinsic
7114 * c-common.h (enum rid): Add RID_ADDRESSOF.
7115 * c-common.c (c_common_reswords): Add __builtin_addressof.
7117 2016-10-07 Bernd Edlinger <bernd.edlinger@hotmail.de>
7120 * c-common.c (c_common_truthvalue_conversion): Warn also for
7121 suspicious enum values in boolean context.
7123 2016-10-06 Jakub Jelinek <jakub@redhat.com>
7125 Implement P0258R2 - helper for C++17
7126 std::has_unique_object_representations trait
7127 * c-common.h (enum rid): Add RID_HAS_UNIQUE_OBJ_REPRESENTATIONS.
7128 * c-common.c (c_common_reswords): Add
7129 __has_unique_object_representations.
7131 2016-10-05 Jakub Jelinek <jakub@redhat.com>
7134 * c-ubsan.c (ubsan_instrument_return): Don't call
7135 initialize_sanitizer_builtins here.
7137 2016-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
7139 * c-common.c (c_common_truthvalue_conversion): Warn also for suspicious
7140 conditional expression in boolean context when only one arm is
7143 2016-10-05 Jakub Jelinek <jakub@redhat.com>
7146 * c-ubsan.c (ubsan_instrument_shift): Return NULL_TREE if type0
7149 * c-common.c (c_common_reswords): Update comment for C++11.
7151 2016-10-04 Jason Merrill <jason@redhat.com>
7153 * c-common.c (make_tree_vector_from_ctor): New.
7154 * c-common.h: Declare it.
7156 2016-10-04 Jakub Jelinek <jakub@redhat.com>
7158 * c-cppbuiltin.c (c_cpp_builtins): Don't define
7159 __LIBGCC_JCR_SECTION_NAME__.
7161 2016-10-03 Bernd Edlinger <bernd.edlinger@hotmail.de>
7163 * c-common.c (c_common_truthvalue_conversion): Warn for suspicious
7164 left shift in boolean context.
7166 2016-09-29 Jakub Jelinek <jakub@redhat.com>
7168 Implement P0001R1 - C++17 removal of register storage class specifier
7169 * c.opt (Wregister): New warning.
7170 * c-opts.c (c_common_post_options): Enable -Wregister by
7173 2016-09-29 James Greenhalgh <james.greenhalgh@arm.com>
7175 * c-opts.c (c_common_post_options): Remove special case for
7176 TARGET_FLT_EVAL_METHOD_NON_DEFAULT with -fexcess-precision=standard
7179 2016-09-27 Jakub Jelinek <jakub@redhat.com>
7181 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_capture_star_this for
7184 * c-ada-spec.c (print_ada_declaration): Remove break after return.
7186 2016-09-26 Thomas Preud'homme <thomas.preudhomme@arm.com>
7188 * c-common.c: Include memmodel.h.
7190 2016-09-26 Marek Polacek <polacek@redhat.com>
7192 * c-lex.c (c_common_has_attribute): Handle attribute fallthrough.
7194 2016-09-26 Marek Polacek <polacek@redhat.com>
7197 * c-common.c (c_common_attribute_table): Add fallthrough attribute.
7198 (handle_fallthrough_attribute): New function.
7199 (attribute_fallthrough_p): New function.
7200 * c-common.h (attribute_fallthrough_p): Declare.
7202 2016-09-24 Marek Polacek <polacek@redhat.com>
7205 * c.opt (Wbool-operation): New.
7207 2016-09-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
7209 * c-common.c (c_common_truthvalue_conversion): Inhibit
7210 Wint-in-bool-context warning with from_macro_definition_at.
7211 Mention the expression will always evaluate to true.
7213 2016-09-21 Martin Sebor <msebor@redhat.com>
7216 * c.opt (fprintf-return-value): Temporarily initialize to zero
7217 to unblock bootstrap failures.
7219 2016-09-21 Jakub Jelinek <jakub@redhat.com>
7222 * c.opt (Waligned-new=): Add RejectNegative.
7223 (faligned-new=): Likewise. Spelling fix - change
7224 aligned_new_threshhold to aligned_new_threshold.
7225 * c-cppbuiltin.c (c_cpp_builtins): Change aligned_new_threshhold
7226 to aligned_new_threshold.
7228 2016-09-20 Martin Sebor <msebor@redhat.com>
7231 * c.opt: Add -Wformat-length and -fprintf-return-value.
7233 2016-09-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
7236 * c.opt (Wint-in-bool-context): New warning.
7237 * c-common.c (c_common_truthvalue_conversion): Warn on integer
7238 constants in boolean context.
7240 2016-09-19 Joseph Myers <joseph@codesourcery.com>
7242 * c-common.c (max_align_t_align): Also consider alignment of
7245 2016-09-15 Jason Merrill <jason@redhat.com>
7247 * c-common.c (check_cxx_fundamental_alignment_constraints): Check
7250 2016-09-14 Jason Merrill <jason@redhat.com>
7252 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
7253 limit FIELD_DECL, either.
7255 2016-09-14 Marek Polacek <polacek@redhat.com>
7257 * c-common.c (c_common_truthvalue_conversion): Use false instead of 0.
7258 * c-common.h (build_unary_op): Change nonconvert parameter type to bool.
7259 * c-omp.c (c_finish_omp_atomic): Use false instead of 0.
7261 2016-09-13 David Malcolm <dmalcolm@redhat.com>
7263 * c-common.c (warn_logical_not_parentheses): Replace
7264 rich_location::add_fixit_insert calls with add_fixit_insert_before
7265 and add_fixit_insert_after, eliminating the "next_loc" calculation.
7267 2016-09-13 Jason Merrill <jason@redhat.com>
7268 Tom de Vries <tom@codesourcery.com>
7271 * c-common.c (set_underlying_type): Don't treat array as builtin type.
7273 2016-09-13 Jason Merrill <jason@redhat.com>
7275 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
7278 2016-09-12 Jason Merrill <jason@redhat.com>
7280 * c-common.c (check_cxx_fundamental_alignment_constraints): Fix
7281 bit/byte confusion, allow large alignment for types.
7283 2016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
7286 * c-common.c (warn_for_omitted_condop): Also warn for boolean data.
7288 2016-09-12 David Malcolm <dmalcolm@redhat.com>
7291 * c-format.c (argument_parser::check_argument_type): Add params
7292 "type_start" and "conversion_char". Use the former to generate
7293 offset_to_type_start and pass it and conversion_char to
7295 (check_format_info_main): Capture the start of the type
7296 information as "type_start", and pass it an format_char
7297 to arg_parser.check_argument_type.
7298 (check_format_types): Provide an example in the leading comment.
7299 Add params "offset_to_type_start" and "conversion_char"; pass
7300 them to format_type_warning calls.
7301 (test_get_modifier_for_format_len): Likewise.
7302 (matching_type_p): New function.
7303 (get_format_for_type): Add param "conversion_char" and move
7304 implementation into...
7305 (get_format_for_type_1): ...new function, called twice.
7306 Use new function matching_type_p rather than checking for
7307 TYPE_CANONICAL equality.
7308 (get_corrected_substring): New function.
7309 (format_type_warning): Provide an example in the leading comment.
7310 Add params "offset_to_type_start" and "conversion_char". Replace
7311 call to get_format_for_type with call to get_corrected_substring
7312 and move rejection of hints for widths/precisions there.
7313 (assert_format_for_type_streq): Add param "conversion_char".
7314 (ASSERT_FORMAT_FOR_TYPE_STREQ): Add param CONVERSION_CHAR.
7315 (test_get_format_for_type_printf): Add conversion chars to the
7316 tests, adding coverage for various combinations of integer
7317 vs double conversions, and for preserving octal and hexadecimal
7319 (test_get_format_for_type_scanf): Add conversion chars to the
7322 2016-09-10 Tom de Vries <tom@codesourcery.com>
7325 * c-common.c (build_va_arg): Handle more strict
7326 targetm.canonical_va_list_type. Replace first argument type error with
7329 2016-09-09 Martin Sebor <msebor@redhat.com>
7333 * c-format.c (argument_parser::find_format_char_info): Use %qc
7334 format directive unconditionally.
7336 2016-09-09 Jason Merrill <jason@redhat.com>
7338 Implement C++17 new of over-aligned types.
7339 * c.opt: Add -faligned-new and -Waligned-new.
7340 * c-common.c (max_align_t_align): Split out from...
7341 (cxx_fundamental_alignment_p): ...here.
7342 * c-common.h: Declare it.
7343 * c-cppbuiltin.c (c_cpp_builtins): Handle aligned new.
7345 2016-09-09 Joseph Myers <joseph@codesourcery.com>
7347 * c-cppbuiltin.c (builtin_define_type_width): New function.
7348 (builtin_define_stdint_macros, c_cpp_builtins): Define type width
7351 2016-09-07 David Malcolm <dmalcolm@redhat.com>
7353 * c-common.c (get_cpp_ttype_from_string_type): Handle being passed
7355 (substring_loc::get_location): Move to substring-locations.c,
7356 keeping implementation as...
7357 (c_get_substring_location): New function, from the above, reworked
7358 to use accessors rather than member lookup.
7359 * c-common.h (class substring_loc): Move to substring-locations.h,
7360 replacing with a forward decl.
7361 (c_get_substring_location): New decl.
7362 * c-format.c: Include "substring-locations.h".
7363 (format_warning_va): Move to substring-locations.c.
7364 (format_warning_at_substring): Likewise.
7366 2016-09-06 Martin Sebor <msebor@redhat.com>
7369 * c-format.c (check_function_format): Avoid issuing warnings for
7370 functions unless they call format functions with non-constant
7373 2016-09-06 Richard Biener <rguenther@suse.de>
7376 * c-common.c (c_common_mark_addressable_vec): Handle
7377 COMPOUND_LITERAL_EXPR.
7379 2016-09-05 Marek Polacek <polacek@redhat.com>
7382 * c-common.c (bool_promoted_to_int_p): New function.
7383 (expr_has_boolean_operands_p): New function.
7384 (warn_logical_not_parentheses): Return if expr_has_boolean_operands_p.
7385 (maybe_warn_bool_compare): Use bool_promoted_to_int_p.
7387 2016-09-04 Tom de Vries <tom@codesourcery.com>
7390 2016-08-29 Tom de Vries <tom@codesourcery.com>
7392 * c-common.c (build_va_arg): Replace first argument type error
7395 2016-09-02 Jakub Jelinek <jakub@redhat.com>
7398 * c-omp.c (c_finish_omp_atomic): Reject _Atomic qualified expressions.
7399 (c_finish_omp_for): Reject _Atomic qualified iterators.
7401 2016-09-01 Martin Sebor <msebor@redhat.com>
7403 * c-ada-spec.c (dump_ada_function_declaration): Increase buffer
7404 size to guarantee it fits the output of the formatted function
7405 regardless of its arguments.
7407 2016-09-01 Marek Polacek <polacek@redhat.com>
7410 * c-common.c (resolve_overloaded_builtin): Fix formatting. Add
7413 2016-08-29 Marek Polacek <polacek@redhat.com>
7416 * c-common.c (warn_logical_not_parentheses): Don't warn for
7417 a comparison or a logical operator.
7419 2016-08-29 Tom de Vries <tom@codesourcery.com>
7421 * c-common.c (build_va_arg): Fix type comparison assert.
7423 2016-08-29 Tom de Vries <tom@codesourcery.com>
7425 * c-common.c (build_va_arg): Replace first argument type error
7428 2016-08-29 Tom de Vries <tom@codesourcery.com>
7431 * c-common.c (build_va_arg): Add first argument error. Build va_arg
7432 with error_mark_node as va_list instead of with illegal va_list.
7434 2016-08-25 Marek Polacek <polacek@redhat.com>
7435 David Malcolm <dmalcolm@redhat.com>
7437 * c-common.c (warn_logical_not_parentheses): Print fixit hints.
7438 * c-common.h (warn_logical_not_parentheses): Update declaration.
7440 2016-08-22 Marek Polacek <polacek@redhat.com>
7443 * c-common.c (warn_for_memset): Check type for null.
7445 2016-08-22 Joseph Myers <joseph@codesourcery.com>
7447 * c-cppbuiltin.c (c_cpp_builtins): Check _FloatN and
7448 _FloatNx types for suffixes for built-in functions.
7450 2016-08-19 Joseph Myers <joseph@codesourcery.com>
7453 * c-common.h (RID_FLOAT16, RID_FLOATN_NX_FIRST, RID_FLOAT32)
7454 (RID_FLOAT64, RID_FLOAT128, RID_FLOAT32X, RID_FLOAT64X)
7455 (RID_FLOAT128X): New enum rid values.
7456 (CASE_RID_FLOATN_NX): New macro.
7457 * c-common.c (c_common_reswords): Add _FloatN and _FloatNx
7459 (c_common_type_for_mode): Check for _FloatN and _FloatNx and
7460 corresponding complex types.
7461 (c_common_nodes_and_builtins): For non-C++, register _FloatN and
7462 _FloatNx and corresponding complex types.
7463 (keyword_begins_type_specifier): Use CASE_RID_FLOATN_NX.
7464 * c-cppbuiltin.c (builtin_define_float_constants): Check _FloatN
7465 and _FloatNx types for the widest type for determining
7466 DECIMAL_DIG. Define __LDBL_DECIMAL_DIG__ as well as
7467 __DECIMAL_DIG__ for long double. Handle FMA_SUFFIX being NULL.
7468 (c_cpp_builtins): Call builtin_define_float_constants for _FloatN
7470 * c-lex.c (interpret_float): Handle _FloatN and _FloatNx
7472 * c-pretty-print.c (pp_c_floating_constant): Handle _FloatN and
7475 2016-08-18 David Malcolm <dmalcolm@redhat.com>
7477 * c-opts.c (c_diagnostic_finalizer): Update for change to
7478 diagnostic_show_locus.
7480 2016-08-18 David Malcolm <dmalcolm@redhat.com>
7482 * c-common.c: Include "spellcheck.h".
7483 (cb_get_suggestion): New function.
7484 * c-common.h (cb_get_suggestion): New decl.
7485 * c-lex.c (init_c_lex): Initialize cb->get_suggestion to
7488 2016-08-18 Marek Polacek <polacek@redhat.com>
7491 * c-common.c (get_atomic_generic_size): Disallow pointer-to-function
7494 2016-08-16 David Malcolm <dmalcolm@redhat.com>
7497 * c-common.c (substring_loc::get_range): Rename to...
7498 (substring_loc::get_location): ...this, converting param from a
7499 source_range * to a location_t *. Call
7500 get_source_location_for_substring rather than
7501 get_source_range_for_substring, and pass in m_caret_idx.
7502 * c-common.h (substring_loc::substring_loc): Add param "caret_idx".
7503 (substring_loc::get_range): Replace with...
7504 (substring_loc::get_location): ...this.
7505 (substring_loc::set_caret_index): New method.
7506 (substring_loc): Add field m_caret_idx.
7507 * c-format.c (format_warning_va): Update for above changes.
7508 Rename local "substring_loc" to "fmt_substring_loc" to avoid
7509 clashing with type name.
7510 (format_warning_at_char): Add caret_idx param to substring_loc ctor.
7511 (check_argument_type): Likewise.
7512 (format_type_warning): Rename param "fmt_loc" to "whole_fmt_loc"
7513 Use a copy when emitting warnings, setting the caret index from TYPE.
7515 2016-08-16 Eric Botcazou <ebotcazou@adacore.com>
7516 Arnaud Charlet <charlet@adacore.com>
7518 * c-ada-spec.c (dump_number): New function.
7519 (handle_escape_character): Likewise.
7520 (print_ada_macros): Add handling of constant integers and strings.
7522 2016-08-12 Marek Polacek <polacek@redhat.com>
7525 * c-common.c (scalar_to_vector): Adjust fall through comment.
7526 * c-opts.c (c_common_handle_option): Likewise.
7527 * c-pragma.c (handle_pragma_pack): Add FALLTHRU.
7528 * c-pretty-print.c (c_pretty_printer::postfix_expression): Adjust
7529 fall through comment.
7530 * cilk.c (extract_free_variables): Add FALLTHRU.
7532 2016-08-10 Jason Merrill <jason@redhat.com>
7534 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_if_constexpr.
7536 2016-08-09 Jason Merrill <jason@redhat.com>
7538 * c-common.c (c_common_attribute_table): vector_size affects type
7541 2016-08-09 Marek Polacek <polacek@redhat.com>
7544 * c-ada-spec.c (dump_generic_ada_node): Add return.
7546 2016-08-09 Jason Merrill <jason@redhat.com>
7548 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_constexpr for
7549 C++17 constexpr lambdas.
7551 2016-08-08 David Malcolm <dmalcolm@redhat.com>
7554 * c-common.h (selftest::c_format_c_tests): New declaration.
7555 (selftest::run_c_tests): New declaration.
7556 * c-format.c: Include "selftest.h.
7557 (format_warning_va): Add param "corrected_substring" and use
7558 it to add a replacement fix-it hint.
7559 (format_warning_at_substring): Likewise.
7560 (format_warning_at_char): Update for new param of
7562 (argument_parser::check_argument_type): Pass "fki" to
7564 (check_format_types): Add param "fki" and pass it to
7565 format_type_warning.
7566 (deref_n_times): New function.
7567 (get_modifier_for_format_len): New function.
7568 (selftest::test_get_modifier_for_format_len): New function.
7569 (get_format_for_type): New function.
7570 (format_type_warning): Add param "fki" and use it to attempt
7571 to provide hints for argument types when calling
7572 format_warning_at_substring.
7573 (selftest::get_info): New function.
7574 (selftest::assert_format_for_type_streq): New function.
7575 (ASSERT_FORMAT_FOR_TYPE_STREQ): New macro.
7576 (selftest::test_get_format_for_type_printf): New function.
7577 (selftest::test_get_format_for_type_scanf): New function.
7578 (selftest::c_format_c_tests): New function.
7580 2016-08-08 David Malcolm <dmalcolm@redhat.com>
7583 * c-format.c: Include "diagnostic.h".
7584 (location_column_from_byte_offset): Delete.
7585 (location_from_offset): Delete.
7586 (format_warning_va): New function.
7587 (format_warning_at_substring): New function.
7588 (format_warning_at_char): New function.
7589 (check_format_arg): Capture location of format_tree and pass to
7590 check_format_info_main.
7591 (argument_parser): Add fields "start_of_this_format" and
7592 "format_string_cst".
7593 (flag_chars_t::validate): Add param "format_string_cst". Convert
7594 warning_at call using location_from_offset to call to
7595 format_warning_at_char.
7596 (argument_parser::argument_parser): Add param "format_string_cst_"
7597 and use use it to initialize field "format_string_cst".
7598 Initialize new field "start_of_this_format".
7599 (argument_parser::read_format_flags): Convert warning_at call
7600 using location_from_offset to a call to format_warning_at_char.
7601 (argument_parser::read_any_format_left_precision): Likewise.
7602 (argument_parser::read_any_format_precision): Likewise.
7603 (argument_parser::read_any_other_modifier): Likewise.
7604 (argument_parser::find_format_char_info): Likewise, in three places.
7605 (argument_parser::parse_any_scan_set): Likewise, in one place.
7606 (argument_parser::handle_conversions): Likewise, in two places.
7607 (argument_parser::check_argument_type): Add param "fmt_param_loc"
7608 and use it to make a substring_loc. Pass the latter to
7610 (check_format_info_main): Add params "fmt_param_loc" and
7611 "format_string_cst". Convert warning_at calls using
7612 location_from_offset to calls to format_warning_at_char. Pass the
7613 new params to the arg_parser ctor. Pass "format_string_cst" to
7614 flag_chars.validate. Pass "fmt_param_loc" to
7615 arg_parser.check_argument_type.
7616 (check_format_types): Convert first param from a location_t
7617 to a const substring_loc & and rename to "fmt_loc". Attempt
7618 to extract the range of the relevant parameter and pass it
7619 to format_type_warning.
7620 (format_type_warning): Convert first param from a location_t
7621 to a const substring_loc & and rename to "fmt_loc". Add
7622 params "param_range" and "type". Replace calls to warning_at
7623 with calls to format_warning_at_substring.
7625 2016-08-08 David Malcolm <dmalcolm@redhat.com>
7627 * c-format.c (class flag_chars_t): New class.
7628 (struct length_modifier): New struct.
7629 (class argument_parser): New class.
7630 (flag_chars_t::flag_chars_t): New ctor.
7631 (flag_chars_t::has_char_p): New method.
7632 (flag_chars_t::add_char): New method.
7633 (flag_chars_t::validate): New method.
7634 (flag_chars_t::get_alloc_flag): New method.
7635 (flag_chars_t::assignment_suppression_p): New method.
7636 (argument_parser::argument_parser): New ctor.
7637 (argument_parser::read_any_dollar): New method.
7638 (argument_parser::read_format_flags): New method.
7639 (argument_parser::read_any_format_width): New method.
7640 (argument_parser::read_any_format_left_precision): New method.
7641 (argument_parser::read_any_format_precision): New method.
7642 (argument_parser::handle_alloc_chars): New method.
7643 (argument_parser::read_any_length_modifier): New method.
7644 (argument_parser::read_any_other_modifier): New method.
7645 (argument_parser::find_format_char_info): New method.
7646 (argument_parser::validate_flag_pairs): New method.
7647 (argument_parser::give_y2k_warnings): New method.
7648 (argument_parser::parse_any_scan_set): New method.
7649 (argument_parser::handle_conversions): New method.
7650 (argument_parser::check_argument_type): New method.
7651 (check_format_info_main): Introduce classes argument_parser
7652 and flag_chars_t, moving the code within the loop into methods
7653 of these classes. Make various locals "const".
7655 2016-08-05 David Malcolm <dmalcolm@redhat.com>
7657 * c-common.c: Include "substring-locations.h".
7658 (get_cpp_ttype_from_string_type): New function.
7659 (g_string_concat_db): New global.
7660 (substring_loc::get_range): New method.
7661 * c-common.h (g_string_concat_db): New declaration.
7662 (class substring_loc): New class.
7663 * c-lex.c (lex_string): When concatenating strings, capture the
7664 locations of all tokens using a new obstack, and record the
7665 concatenation locations within g_string_concat_db.
7666 * c-opts.c (c_common_init_options): Construct g_string_concat_db
7669 2016-07-29 Marek Polacek <polacek@redhat.com>
7672 * c-common.c (c_common_truthvalue_conversion): Use LOCATION for the
7673 parentheses warning.
7676 * c-common.c (handle_alloc_align_attribute): Also check FUNCTION_DECL.
7678 2016-07-28 Martin Liska <mliska@suse.cz>
7680 PR gcov-profile/68025
7681 * c-common.c (handle_no_profile_instrument_function_attribute):
7683 2016-07-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
7685 * c-common.c (check_user_alignment): Use LOG2_BITS_PER_UNIT instead of
7688 2016-07-25 Jason Merrill <jason@redhat.com>
7691 * c.opt (fconstexpr-loop-limit): New.
7693 2016-07-22 Martin Sebor <msebor@redhat.com>
7696 * c-common.c (resolve_overloaded_builtin): Avoid converting
7697 __atomic_compare_exchange_n return type to that of what its
7698 first argument points to.
7700 2016-07-22 Uros Bizjak <ubizjak@gmail.com>
7702 * c-common.c: Use HOST_WIDE_INT_M1U instead of
7703 ~(unsigned HOST_WIDE_INT) 0.
7705 2016-07-22 Martin Liska <mliska@suse.cz>
7707 PR gcov-profile/69028
7708 PR gcov-profile/62047
7709 * cilk.c (create_cilk_helper_decl): Set location of a new decl
7710 to the current_function_decl.
7712 2016-07-21 Jason Merrill <jason@redhat.com>
7715 * c-common.c (c_common_truthvalue_conversion): Check
7716 c_inhibit_evaluation_warnings for warning about address of
7719 2016-07-20 David Malcolm <dmalcolm@redhat.com>
7721 * c-common.h (lookup_name_fuzzy): Convert return type from tree to
7724 2016-07-15 Jason Merrill <jason@redhat.com>
7726 * c-opts.c (c_common_post_options): Update -fabi-version default to 11.
7728 2016-07-15 Jakub Jelinek <jakub@redhat.com>
7731 * c-common.h (enum lookup_name_fuzzy_kind): Add
7732 FUZZY_LOOKUP_FUNCTION_NAME.
7734 2016-07-08 Jason Merrill <jason@redhat.com>
7736 P0145: Refining Expression Order for C++.
7737 * c.opts (-fargs-in-order): Rename to -fstrong-eval-order.
7740 2016-07-05 Markus Trippelsdorf <markus@trippelsdorf.de>
7743 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_rvalue_references.
7745 2016-06-29 Thomas Schwinge <thomas@codesourcery.com>
7747 * c-pragma.h (enum pragma_kind): Rename
7748 PRAGMA_OMP_DECLARE_REDUCTION to PRAGMA_OMP_DECLARE. Adjust all
7751 2016-06-29 Richard Biener <rguenther@suse.de>
7754 * c-common.c (c_common_get_alias_set): Remove union type punning case.
7756 2016-06-24 Jason Merrill <jason@redhat.com>
7758 P0145R2: Refining Expression Order for C++.
7759 * c-common.c (verify_tree) [COMPOUND_EXPR]: Fix handling on LHS of
7762 2016-06-24 Jakub Jelinek <jakub@redhat.com>
7764 * c-common.c (check_builtin_function_arguments): Require last
7765 argument of BUILT_IN_*_OVERFLOW_P to have INTEGER_TYPE type.
7766 Adjust wording of diagnostics for BUILT_IN_*_OVERLFLOW
7767 if the last argument is pointer to enumerated or boolean type.
7769 2016-06-22 David Malcolm <dmalcolm@redhat.com>
7772 * c-common.h (enum lookup_name_fuzzy_kind): New enum.
7773 (lookup_name_fuzzy): New prototype.
7775 2016-06-21 John David Anglin <danglin@gcc.gnu.org>
7777 * c-common.c (get_source_date_epoch): Use int64_t instead of long long.
7779 2016-06-14 Jason Merrill <jason@redhat.com>
7781 P0145R2: Refining Expression Order for C++.
7782 * c.opt (fargs-in-order): New.
7783 * c-opts.c (c_common_post_options): Adjust flag_args_in_order.
7785 2016-06-13 Jakub Jelinek <jakub@redhat.com>
7788 * c-gimplify.c (ubsan_walk_array_refs_r): Set *walk_subtrees = 0 on
7789 all BIND_EXPRs, and on all BIND_EXPRs recurse also on BIND_EXPR_BODY.
7791 PR preprocessor/71183
7792 * c-ppoutput.c (init_pp_output): Set cb->get_source_date_epoch
7793 to cb_get_source_date_epoch.
7795 2016-06-10 Jakub Jelinek <jakub@redhat.com>
7798 * c.opt (Wpsabi): Add Warning flag.
7800 2016-06-10 Martin Sebor <msebor@redhat.com>
7803 * c-common.c (handle_nonnull_attribute): Accept
7804 the nonnull attribute in type-generic builtins.
7806 2016-06-09 Martin Sebor <msebor@redhat.com>
7809 * c-common.c (builtin_function_validate_nargs): Make text of error
7810 message consistent with others like it.
7812 2016-06-08 Martin Sebor <msebor@redhat.com>
7813 Jakub Jelinek <jakub@redhat.com>
7817 * c-common.c (check_builtin_function_arguments): Handle
7818 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
7820 2016-06-08 Richard Biener <rguenther@suse.de>
7822 * c-common.c (parse_optimize_options): Improve diagnostic messages.
7824 2016-06-07 Richard Biener <rguenther@suse.de>
7827 * c-common.c (parse_optimize_options): Only apply CL_OPTIMIZATION
7828 options and warn about others.
7830 2016-06-01 Eduard Sanou <dhole@openmailbox.org>
7832 * c-common.c (get_source_date_epoch): Rename to
7833 cb_get_source_date_epoch.
7834 * c-common.c (cb_get_source_date_epoch): Use a single generic erorr
7835 message when the parsing fails. Use error_at instead of fatal_error.
7836 * c-common.h (get_source_date_epoch): Rename to
7837 cb_get_source_date_epoch.
7838 * c-common.h (cb_get_source_date_epoch): Prototype.
7839 * c-common.h (MAX_SOURCE_DATE_EPOCH): Define.
7840 * c-common.h (c_omp_region_type): Remove trailing comma.
7841 * c-lex.c (init_c_lex): Set cb->get_source_date_epoch callback.
7842 * c-lex.c (c_lex_with_flags): Remove initialization of
7843 pfile->source_date_epoch.
7845 2016-05-30 Jakub Jelinek <jakub@redhat.com>
7848 * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_DEPEND to
7849 C_OMP_CLAUSE_SPLIT_TARGET. Put OMP_CLAUSE_NOWAIT to
7850 C_OMP_CLAUSE_SPLIT_TARGET if combined with target construct,
7851 instead of C_OMP_CLAUSE_SPLIT_FOR.
7853 2016-05-24 Richard Biener <rguenther@suse.de>
7857 * c-common.h (convert_vector_to_pointer_for_subscript): Rename to ...
7858 (convert_vector_to_array_for_subscript): ... this.
7859 * c-common.c (convert_vector_to_pointer_for_subscript): Use a
7860 VIEW_CONVERT_EXPR to an array type. Rename to ...
7861 (convert_vector_to_array_for_subscript): ... this.
7863 2016-05-12 Marek Polacek <polacek@redhat.com>
7866 * c-common.c (pointer_int_sum): Call size_in_bytes_loc instead of
7867 size_in_bytes and pass LOC to it.
7869 2016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
7872 * c.opt (Wduplicate-decl-specifier): New option.
7874 2016-05-11 Marek Polacek <polacek@redhat.com>
7877 * c-common.c (diagnose_mismatched_attributes): New function.
7878 * c-common.h (diagnose_mismatched_attributes): Declare.
7880 2016-05-04 Marek Polacek <polacek@redhat.com>
7882 * c.opt (Wdangling-else): New option.
7884 2016-05-03 Marek Polacek <polacek@redhat.com>
7887 * c-common.c (builtin_function_validate_nargs): Add location
7889 (check_builtin_function_arguments): Add location and arguments
7890 parameters. Use them.
7891 * c-common.h (check_builtin_function_arguments): Update declaration.
7893 2016-05-03 Richard Biener <rguenther@suse.de>
7895 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Do not
7896 allow call args to gimplify to SSA names.
7898 2016-05-03 Marek Polacek <polacek@redhat.com>
7900 * c-common.h (enum c_omp_region_type): Remove stray comma.
7902 2016-05-02 Cesar Philippidis <cesar@codesourcery.com>
7904 * c-common.h (enum c_omp_region_type): Define.
7906 2016-05-02 Richard Sandiford <richard.sandiford@arm.com>
7908 * c-common.c (shorten_compare): Use wi::to_wide.
7910 2016-04-29 Cesar Philippidis <cesar@codesourcery.com>
7913 * c-common.h (c_oacc_split_loop_clauses): Add boolean argument.
7914 * c-omp.c (c_oacc_split_loop_clauses): Use it to duplicate
7915 reduction clauses in acc parallel loops.
7917 2016-04-29 Marek Polacek <polacek@redhat.com>
7920 * c-common.c (warn_for_memset): Check domain before accessing it.
7922 2016-04-29 Dominik Vogt <vogt@linux.vnet.ibm.com>
7925 * c-common.c (handle_aligned_attribute): Allow 0 as an argument to the
7926 "aligned" attribute.
7928 2016-04-28 Jason Merrill <jason@redhat.com>
7930 * c-lex.c (c_common_has_attribute): Handle nodiscard.
7932 2016-04-28 Eduard Sanou <dhole@openmailbox.org>
7933 Matthias Klose <doko@debian.org>
7935 * c-common.c (get_source_date_epoch): New function, gets the environment
7936 variable SOURCE_DATE_EPOCH and parses it as long long with error
7938 * c-common.h (get_source_date_epoch): Prototype.
7939 * c-lex.c (c_lex_with_flags): set parse_in->source_date_epoch.
7941 2015-04-27 Ryan Burn <contact@rnburn.com>
7945 * cilk.c (cilk_ignorable_spawn_rhs_op): Change to external linkage.
7946 (cilk_recognize_spawn): Renamed from recognize_spawn and change to
7948 (cilk_detect_and_unwrap): Corresponding changes.
7949 (extract_free_variables): Don't extract free variables from
7950 AGGR_INIT_EXPR slot.
7951 * c-common.h (cilk_ignorable_spawn_rhs_op): Prototype.
7952 (cilk_recognize_spawn): Likewise.
7954 2016-04-27 Bernd Schmidt <bschmidt@redhat.com>
7956 * c.opt (Wmemset-elt-size): New option.
7957 * c-common.c (warn_for_memset): New function.
7958 * c-common.h (warn_for_memset): Declare.
7960 2016-04-25 Jason Merrill <jason@redhat.com>
7962 * c-common.c (handle_unused_attribute): Accept CONST_DECL.
7964 * c-common.h: Declare it.
7965 * c-lex.c (c_common_has_attribute): Add maybe_unused.
7967 2016-04-22 Jason Merrill <jason@redhat.com>
7969 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_range_based_for.
7971 2016-04-20 Ilya Verbin <ilya.verbin@intel.com>
7974 * c-cilkplus.c (c_finish_cilk_clauses): Remove function.
7975 * c-common.h (c_finish_cilk_clauses): Remove declaration.
7977 2016-04-18 Michael Matz <matz@suse.de>
7979 * c-common.c (handle_aligned_attribute): Use SET_TYPE_ALIGN
7982 2016-04-17 Eric Botcazou <ebotcazou@adacore.com>
7984 * c-ada-spec.c (get_underlying_decl): Return the typedef, if any.
7985 (dump_generic_ada_node) <POINTER_TYPE>: Clean up handling of access
7986 to incomplete types.
7987 (dump_nested_type): Remove redundant tests and tidy up.
7988 (print_ada_declaration): Also set TREE_VISITED on the declaration of
7989 a type which is the typedef of an original type.
7991 2016-04-15 Marek Polacek <polacek@redhat.com>
7994 * c-common.c (build_va_arg): Change two asserts into errors and return
7997 2016-04-13 Marek Polacek <polacek@redhat.com>
8000 * c-indentation.c (should_warn_for_misleading_indentation): Bail out
8001 for switch statements, too.
8003 2016-03-28 Jason Merrill <jason@redhat.com>
8005 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_range_based_for.
8007 2016-03-23 Marek Polacek <polacek@redhat.com>
8010 * c.opt (Wignored-attributes): New option.
8012 2016-03-22 David Malcolm <dmalcolm@redhat.com>
8015 * c-indentation.c (warn_for_misleading_indentation): Rewrite the
8016 diagnostic text, reversing the order of the warning and note so
8017 that they appear in source order.
8019 2016-03-17 Marek Polacek <polacek@redhat.com>
8022 * c-common.c (resolve_overloaded_builtin): Set TREE_USED for the fetch
8025 2016-03-14 Jason Merrill <jason@redhat.com>
8027 * c-cppbuiltin.c (c_cpp_builtins): Set __cpp_hex_float.
8029 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_range_based_for.
8031 2016-03-09 Richard Biener <rguenther@suse.de>
8034 * c-common.c (strict_aliasing_warning): Add back
8035 alias_sets_conflict_p check.
8037 2016-03-08 Jason Merrill <jason@redhat.com>
8039 * c-opts.c (set_std_cxx1z): Don't enable concepts.
8041 2016-03-04 David Malcolm <dmalcolm@redhat.com>
8044 * c-indentation.c (get_visual_column): Move code to determine next
8046 (next_tab_stop): ...this new function.
8047 (line_contains_hash_if): Delete function.
8048 (detect_preprocessor_logic): Delete function.
8049 (get_first_nws_vis_column): New function.
8050 (detect_intervening_unindent): New function.
8051 (should_warn_for_misleading_indentation): Replace call to
8052 detect_preprocessor_logic with a call to
8053 detect_intervening_unindent.
8055 2016-03-04 David Malcolm <dmalcolm@redhat.com>
8058 * c-indentation.c (should_warn_for_misleading_indentation): When
8059 suppressing warnings about cases where the guard and body are on
8060 the same column, only use the first non-whitespace column in place
8061 of the guard token column when dealing with "else" clauses.
8062 When rejecting aligned BODY and NEXT, loosen the requirement
8063 from equality with the first non-whitespace of guard to simply
8064 that they not be indented relative to it.
8066 2016-03-04 Richard Biener <rguenther@suse.de>
8069 * c-common.c (strict_aliasing_warning): Use alias_set_subset_of
8070 instead of alias_sets_conflict_p.
8072 2016-03-01 Marek Polacek <polacek@redhat.com>
8075 * c-common.c (reject_gcc_builtin): Check for FUNCTION_DECL rather than
8078 2016-02-22 Martin Sebor <msebor@redhat.com>
8081 * c-common.c (check_builtin_function_arguments): Validate and
8082 reject invalid arguments to __builtin_alloca_with_align.
8084 2016-02-20 Mark Wielaard <mjw@redhat.com>
8087 * c.opt (Wunused-const-variable): Turn into Alias for...
8088 (Wunused-const-variable=): New option.
8090 2016-02-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
8093 * c-opts.c (c_common_post_options): Move call to set_std_cxx14 from
8095 (c_common_init_options): ...to here.
8096 (set_std_cxx98): Initialize flag_isoc94 and flag_isoc99.
8098 2016-02-19 Jakub Jelinek <jakub@redhat.com>
8101 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_GRAINSIZE.
8102 (init_pragma): Register PRAGMA_CILK_GRAINSIZE even for
8103 flag_preprocess_only.
8105 2016-02-16 Jakub Jelinek <jakub@redhat.com>
8108 * c.opt (Wnonnull-compare): Enable for -Wall.
8110 2016-02-15 Jakub Jelinek <jakub@redhat.com>
8113 * c-common.c (sync_resolve_size): Diagnose too few arguments
8114 even when params is non-NULL empty vector.
8116 2016-02-08 Bernd Schmidt <bschmidt@redhat.com>
8119 * c.opt (fshort-double): Remove.
8121 2016-02-05 Martin Sebor <msebor@redhat.com>
8124 * c.opt (Warning options): Update -Wplacement-new to take
8125 an optional argument.
8127 2016-02-01 Jakub Jelinek <jakub@redhat.com>
8129 PR preprocessor/69543
8131 * c-pragma.c (handle_pragma_diagnostic): Pass input_location
8132 instead of loc to control_warning_option.
8134 2016-02-01 Nathan Sidwell <nathan@codesourcery.com>
8136 * c.opt (fopenacc-dim=): New option.
8138 2016-01-27 Ryan Burn <contact@rnburn.com>
8141 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Change to use
8142 gimplify_arg. Removed superfluous post_p argument.
8143 * c-family.h (cilk_gimplify_call_params_in_spawned_fn): Removed
8144 superfluous post_p argument.
8145 * c-gimplify.c (c_gimplify_expr): Likewise.
8147 2016-01-26 David Malcolm <dmalcolm@redhat.com>
8150 * c-opts.c (c_diagnostic_finalizer): Replace invocation of
8151 pp_newline_and_flush with pp_flush.
8153 2016-01-20 Martin Sebor <msebor@redhat.com>
8156 * c-common.c (sync_resolve_size): Avoid printing diagnostic about
8157 an incompatible argument when the argument isn't a valid tree node.
8159 2016-01-18 Jason Merrill <jason@redhat.com>
8162 * c-common.c (check_function_arguments_recurse): Fold the whole
8163 COND_EXPR, not just the condition.
8165 2016-01-18 Tom de Vries <tom@codesourcery.com>
8167 * c-omp.c (c_oacc_split_loop_clauses): Don't copy OMP_CLAUSE_REDUCTION,
8168 classify as loop clause.
8170 2016-01-15 Jakub Jelinek <jakub@redhat.com>
8173 * c-pragma.c (c_register_pragma_1): Adjust comment to note that
8174 C++ FE no longer has limit on number of pragmas.
8176 2015-01-14 Ryan Burn <contact@rnburn.com>
8179 * cilk.c (create_cilk_wrapper_body): Call fold_build_cleanup_point_expr
8180 to add missing cleanup point.
8182 2016-01-14 David Malcolm <dmalcolm@redhat.com>
8185 * c-indentation.c (get_visual_column): Add location_t param.
8186 Handle the column number being zero by effectively disabling the
8187 warning, with an "inform".
8188 (should_warn_for_misleading_indentation): Add location_t argument
8189 for all uses of get_visual_column.
8191 2016-01-10 Patrick Palka <ppalka@gcc.gnu.org>
8194 * c-indentation.c (should_warn_for_misleading_indentation):
8195 Don't warn about do-while statements.
8197 2016-01-07 Martin Sebor <msebor@redhat.com>
8200 * c-common.c (sync_resolve_size): Reject first argument when it's
8203 2016-01-05 David Malcolm <dmalcolm@redhat.com>
8206 * c-indentation.c (get_visual_column): Remove default argument.
8207 (should_warn_for_misleading_indentation): For the multiline case,
8208 update call to get_visual_column for next_stmt_exploc so that it
8209 captures the location of the first non-whitespace character in the
8210 relevant line. Don't issue warnings if there is non-whitespace
8211 before the next statement.
8213 2016-01-04 Jakub Jelinek <jakub@redhat.com>
8215 Update copyright years.
8217 2015-12-21 David Malcolm <dmalcolm@redhat.com>
8219 * c-common.c (binary_op_error): Convert first param from
8220 location_t to rich_location * and use it when emitting an error.
8221 * c-common.h (binary_op_error): Convert first param from
8222 location_t to rich_location *.
8224 2015-12-16 David Malcolm <dmalcolm@redhat.com>
8226 * c-common.h (conflict_marker_get_final_tok_kind): New prototype.
8227 * c-lex.c (conflict_marker_get_final_tok_kind): New function.
8229 2015-12-15 Ilya Verbin <ilya.verbin@intel.com>
8231 * c-common.c (c_common_attribute_table): Handle "omp declare target
8234 2015-12-14 Jakub Jelinek <jakub@redhat.com>
8237 * c.opt (Wmissing-format-attribute, Wnormalized): Add Warning option.
8239 2014-12-12 Tobias Burnus <burnus@net-b.de>
8242 * c-format.c (gcc_gfc_char_table): Add 'q' flag to remaining
8243 specifiers (%d, %i,%u and %c).
8245 2015-12-10 David Malcolm <dmalcolm@redhat.com>
8247 * c.opt (Wmisleading-indentation): Add to -Wall for C and C++.
8249 2015-12-08 Jakub Jelinek <jakub@redhat.com>
8253 * c.opt (Wfloat-conversion, Wsign-conversion): Add Warning.
8254 * c-pragma.c (handle_pragma_diagnostic): Adjust
8255 control_warning_option caller.
8257 2015-12-07 David Malcolm <dmalcolm@redhat.com>
8259 * c-common.c (c_cpp_error): Update for change to
8260 rich_location::set_range.
8262 2015-12-04 Paolo Bonzini <bonzini@gnu.org>
8264 * c-common.c (maybe_warn_shift_overflow): Warn on all overflows if
8265 shifting 1 out of the sign bit.
8267 2015-12-04 Kirill Yukhin <kirill.yukhin@intel.com>
8269 * c-common.c (c_common_attribute_table[]): Update max arguments
8270 count for "simd" attribute.
8271 (handle_simd_attribute): Parse "notinbranch" and "inbranch" arguments.
8273 2015-12-03 Jakub Jelinek <jakub@redhat.com>
8275 PR preprocessor/57580
8276 * c-ppoutput.c (print): Change printed field to bool.
8277 Move src_file last for smaller padding.
8278 (init_pp_output): Set print.printed to false instead of 0.
8279 (scan_translation_unit): Fix up formatting. Set print.printed
8280 to true after printing something other than newline.
8281 (scan_translation_unit_trad): Set print.printed to true instead of 1.
8282 (maybe_print_line_1): Set print.printed to false instead of 0.
8283 (print_line_1): Likewise.
8284 (do_line_change): Set print.printed to true instead of 1.
8285 (cb_define, dump_queued_macros, cb_include, cb_def_pragma,
8286 dump_macro): Set print.printed to false after printing newline.
8288 2015-12-02 Jason Merrill <jason@redhat.com>
8290 * c-common.c (fold_for_warn): New.
8291 (warn_logical_operator, warn_tautological_cmp)
8292 (check_function_arguments_recurse, maybe_warn_bool_compare): Use it.
8294 * c-common.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
8295 (c_fully_fold_internal, decl_constant_value_for_optimization):
8297 * c-common.h: Don't declare decl_constant_value_for_optimization.
8299 2015-12-02 Joseph Myers <joseph@codesourcery.com>
8302 * c-common.h (c_build_qualified_type): Add extra default
8305 2015-12-01 Julian Brown <julian@codesourcery.com>
8306 Cesar Philippidis <cesar@codesourcery.com>
8307 James Norris <James_Norris@mentor.com>
8309 * c-pragma.c (oacc_pragmas): Add PRAGMA_OACC_HOST_DATA.
8310 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_HOST_DATA.
8311 (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_USE_DEVICE.
8313 2015-11-30 Eric Botcazou <ebotcazou@adacore.com>
8315 * c-ada-spec.c (print_ada_macros): Remove redundant blank line.
8316 (decl_sloc_common): Delete and move bulk of processing to...
8317 (decl_sloc): ...here.
8318 (pp_ada_tree_identifier): Remove reference to QUAL_UNION_TYPE.
8319 (dump_ada_double_name): Remove S parameter and compute the suffix.
8320 (dump_ada_array_type): Add PARENT parameter. Simplify computation of
8321 element type and deal with an anonymous one.
8322 (dump_ada_template): Use RECORD_OR_UNION_TYPE_P macro.
8323 (dump_generic_ada_node): Tweak. Adjust call to dump_ada_array_type
8324 and remove reference to QUAL_UNION_TYPE.
8325 (dump_nested_types): Make 2 passes on the fields and move bulk to...
8326 (dump_nested_type): ...here. New function extracted from above.
8327 Generate a full declaration for anonymous element type of arrays.
8328 (print_ada_declaration): Really skip anonymous declarations. Remove
8329 references to QUAL_UNION_TYPE. Adjust call to dump_ada_array_type.
8330 Clean up processing of declarations of array types and objects.
8331 (print_ada_struct_decl): Remove reference to QUAL_UNION_TYPE.
8332 Remove obsolete code and tidy up.
8334 2015-11-29 Jan Hubicka <hubicka@ucw.cz>
8337 * c-common.c (handle_transparent_union_attribute): Update
8340 2015-11-27 Martin Liska <mliska@suse.cz>
8343 * array-notation-common.c (cilkplus_extract_an_triplets):
8344 Release vector of vectors.
8345 * cilk.c (gimplify_cilk_spawn): Free allocated memory.
8347 2015-11-26 Eric Botcazou <ebotcazou@adacore.com>
8350 * c-ada-spec.c (dump_nested_types): Add guard for error_mark_node.
8351 (print_ada_struct_decl): Likewise.
8353 2015-11-23 Igor Zamyatin <igor.zamyatin@intel.com>
8356 * c-gimplify.c (c_gimplify_expr): Stop the process if see an error.
8357 * cilk.c (recognize_spawn): Determine location in a more precise
8360 2015-11-19 Jason Merrill <jason@redhat.com>
8362 * c-common.c (shorten_compare): But look through macros from
8365 2015-11-18 Jason Merrill <jason@redhat.com>
8367 * c-common.c (shorten_compare): Don't -Wtype-limits if the
8368 non-constant operand comes from a macro.
8370 2015-11-17 Jason Merrill <jason@redhat.com>
8373 * c-common.c (warn_tautological_cmp): Fold before checking for
8376 2015-11-16 Marek Polacek <polacek@redhat.com>
8379 * c-common.c (check_case_bounds): Fold low and high cases.
8381 2015-11-16 Marek Polacek <polacek@redhat.com>
8383 * c-ada-spec.c (dump_ada_template): Use RECORD_OR_UNION_TYPE_P.
8384 * c-common.c (c_common_get_alias_set): Likewise.
8385 (handle_visibility_attribute): Likewise.
8387 2015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
8389 * c-common.c (handle_simd_attribute): New.
8390 (struct attribute_spec): Add entry for "simd".
8391 (handle_simd_attribute): New.
8393 2015-11-13 Kai Tietz <ktietz70@googlemail.com>
8395 * c-lex.c (interpret_float): Use fold_convert.
8397 2015-11-13 David Malcolm <dmalcolm@redhat.com>
8399 * c-common.c (c_fully_fold_internal): Capture existing souce_range,
8400 and store it on the result.
8401 * c-opts.c (c_common_init_options): Set
8402 global_dc->colorize_source_p.
8404 2015-11-12 James Norris <jnorris@codesourcery.com>
8405 Joseph Myers <joseph@codesourcery.com>
8407 * c-pragma.c (oacc_pragmas): Add entry for declare directive.
8408 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_DECLARE.
8409 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT and
8410 PRAGMA_OACC_CLAUSE_LINK.
8412 2015-11-11 Marek Polacek <polacek@redhat.com>
8416 * c-common.c (valid_array_size_p): New function.
8417 * c-common.h (valid_array_size_p): Declare.
8419 2015-11-11 Dominique d'Humieres <dominiq@lps.ens.fr>
8422 * c-pragma.c (c_register_pragma_1): Update the gcc_assert to 256.
8424 2015-11-11 Andrew MacLeod <amacleod@redhat.com>
8426 * array-notation-common.c: Remove unused header files.
8427 * c-ada-spec.c: Likewise.
8428 * c-cilkplus.c: Likewise.
8429 * c-common.c: Likewise.
8430 * c-cppbuiltin.c: Likewise.
8431 * c-dump.c: Likewise.
8432 * c-format.c: Likewise.
8433 * c-gimplify.c: Likewise.
8434 * c-indentation.c: Likewise.
8435 * c-lex.c: Likewise.
8436 * c-omp.c: Likewise.
8437 * c-opts.c: Likewise.
8438 * c-pch.c: Likewise.
8439 * c-ppoutput.c: Likewise.
8440 * c-pragma.c: Likewise.
8441 * c-pretty-print.c: Likewise.
8442 * c-semantics.c: Likewise.
8443 * c-ubsan.c: Likewise.
8445 * stub-objc.c: Likewise.
8447 2015-11-09 Thomas Schwinge <thomas@codesourcery.com>
8448 Cesar Philippidis <cesar@codesourcery.com>
8449 James Norris <jnorris@codesourcery.com>
8450 Julian Brown <julian@codesourcery.com>
8451 Nathan Sidwell <nathan@codesourcery.com>
8453 * c-pragma.c (oacc_pragmas): Add "routine".
8454 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ROUTINE.
8456 2015-11-08 Eric Botcazou <ebotcazou@adacore.com>
8458 * c-common.c (c_common_attributes): Add scalar_storage_order.
8459 (handle_scalar_storage_order_attribute): New function.
8460 * c-pragma.c (global_sso): New variable.
8461 (maybe_apply_pragma_scalar_storage_order): New function.
8462 (handle_pragma_scalar_storage_order): Likewise.
8463 (init_pragma): Register scalar_storage_order.
8464 * c-pragma.h (maybe_apply_pragma_scalar_storage_order): Declare.
8465 * c.opt (Wscalar-storage-order): New warning.
8466 (fsso-struct=): New option.
8468 2015-11-08 Martin Sebor <msebor@redhat.com>
8470 * c.opt (Wplacement-new): Add a period to the end of a sentence.
8472 2015-11-07 Richard Sandiford <richard.sandiford@arm.com>
8474 * c-common.c: Don't undef DEF_BUILTIN.
8476 2015-11-06 David Malcolm <dmalcolm@redhat.com>
8478 * c-common.c (c_cpp_error): Convert parameter from location_t to
8479 rich_location *. Eliminate the "column_override" parameter and
8480 the call to diagnostic_override_column.
8481 Update the "done_lexing" clause to set range 0
8482 on the rich_location, rather than overwriting a location_t.
8483 * c-common.h (c_cpp_error): Convert parameter from location_t to
8484 rich_location *. Eliminate the "column_override" parameter.
8486 2015-11-05 Cesar Philippidis <cesar@codesourcery.com>
8487 Thomas Schwinge <thomas@codesourcery.com>
8488 James Norris <jnorris@codesourcery.com>
8490 * c-omp.c (c_oacc_split_loop_clauses): Make TILE, GANG, WORKER, VECTOR,
8491 AUTO, SEQ, INDEPENDENT and PRIVATE loop clauses. Associate REDUCTION
8492 clauses with parallel and kernels and loops.
8493 * c-pragma.h (enum pragma_omp_clause): Add entries for
8494 PRAGMA_OACC_CLAUSE_{INDEPENDENT,TILE,DEFAULT}.
8495 * pt.c (tsubst_omp_clauses): Add support for OMP_CLAUSE_{NUM_GANGS,
8496 NUM_WORKERS,VECTOR_LENGTH,GANG,WORKER,VECTOR,ASYNC,WAIT,TILE,AUTO,
8498 (tsubst_expr): Add support for OMP_CLAUSE_{KERNELS,PARALLEL,LOOP}.
8500 2015-11-05 Martin Sebor <msebor@redhat.com>
8503 * c.opt (-Wplacement-new): New option.
8505 2015-11-05 Jakub Jelinek <jakub@redhat.com>
8507 * c-common.h (c_finish_omp_atomic): Add TEST argument.
8508 (c_omp_check_loop_iv, c_omp_check_loop_iv_exprs): New prototypes.
8509 * c-omp.c (c_finish_omp_atomic): Add TEST argument. Don't call
8510 save_expr or create_tmp_var* if TEST is true.
8511 (c_finish_omp_for): Store OMP_FOR_ORIG_DECLS always.
8512 Don't call add_stmt here.
8513 (struct c_omp_check_loop_iv_data): New type.
8514 (c_omp_check_loop_iv_r, c_omp_check_loop_iv,
8515 c_omp_check_loop_iv_exprs): New functions.
8516 (c_omp_split_clauses): Adjust for lastprivate being allowed on
8518 (c_omp_declare_simd_clauses_to_numbers): Change
8519 OMP_CLAUSE_LINEAR_VARIABLE_STRIDE OMP_CLAUSE_LINEAR_STEP into numbers.
8520 (c_omp_declare_simd_clauses_to_decls): Similarly change those
8521 from numbers to PARM_DECLs.
8523 2015-11-04 Mikhail Maltsev <maltsevm@gmail.com>
8525 * c-omp.c (c_omp_split_clauses): Remove conditional compilation. Use
8528 2015-11-03 Bernd Schmidt <bschmidt@redhat.com>
8531 * c-common.h (fold_offsetof_1): Add argument.
8532 * c-common.c (fold_offsetof_1): Diagnose more invalid
8533 offsetof expressions that reference elements past the end of
8536 2015-11-03 Thomas Schwinge <thomas@codesourcery.com>
8537 Chung-Lin Tang <cltang@codesourcery.com>
8539 * c-pragma.c (oacc_pragmas): Add "atomic".
8540 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ATOMIC.
8542 2015-10-30 Evgeny Stupachenko <evstupac@gmail.com>
8544 * c-common.c (handle_target_clones_attribute): New.
8545 (c_common_attribute_table): Add handle_target_clones_attribute.
8546 (handle_always_inline_attribute): Add check on target_clones attribute.
8547 (handle_target_attribute): Ditto.
8549 2015-10-29 Andrew MacLeod <amacleod@redhat.com>
8551 * array-notation-common.c: Reorder #include's and remove duplicates.
8552 * c-ada-spec.c: Likewise.
8553 * c-cilkplus.c: Likewise.
8554 * c-common.c: Likewise.
8555 * c-cppbuiltin.c: Likewise.
8556 * c-dump.c: Likewise.
8557 * c-format.c: Likewise.
8558 * c-gimplify.c: Likewise.
8559 * c-indentation.c: Likewise.
8560 * c-lex.c: Likewise.
8561 * c-omp.c: Likewise.
8562 * c-opts.c: Likewise.
8563 * c-pch.c: Likewise.
8564 * c-ppoutput.c: Likewise.
8565 * c-pragma.c: Likewise.
8566 * c-pretty-print.c: Likewise.
8567 * c-semantics.c: Likewise.
8568 * c-ubsan.c: Likewise.
8570 * stub-objc.c: Likewise.
8572 2015-10-28 Jason Merrill <jason@redhat.com>
8574 * c-common.c (pointer_int_sum): Fold the MULT_EXPR.
8576 2015-10-27 Thomas Schwinge <thomas@codesourcery.com>
8577 James Norris <jnorris@codesourcery.com>
8578 Cesar Philippidis <cesar@codesourcery.com>
8582 * c-common.h (c_oacc_split_loop_clauses): Declare function.
8583 * c-omp.c (c_oacc_split_loop_clauses): New function.
8585 2015-10-21 Martin Sebor <msebor@redhat.com>
8588 * c.opt: End each sentence that describes an option with a period.
8590 2015-10-20 Marek Polacek <polacek@redhat.com>
8592 * array-notation-common.c (is_cilkplus_vector_p): Define.
8593 * c-common.h (is_cilkplus_vector_p): Declare.
8595 2015-10-20 Marek Polacek <polacek@redhat.com>
8597 * c.opt (std=gnu++11): Do not describe as experimental.
8598 (std=gnu++14): Likewise.
8600 2015-10-19 Jason Merrill <jason@redhat.com>
8602 * c-cppbuiltin.c (c_cpp_builtins): Define
8603 __cpp_nontype_template_args.
8605 2015-10-19 Jason Merrill <jason@redhat.com>
8607 * c-cppbuiltin.c (c_cpp_builtins): Define
8608 __cpp_enumerator_attributes, __cpp_fold_expressions,
8609 __cpp_unicode_characters.
8611 2015-10-13 Jakub Jelinek <jakub@redhat.com>
8612 Aldy Hernandez <aldyh@redhat.com>
8614 * c-common.c (enum c_builtin_type): Define DEF_FUNCTION_TYPE_9,
8615 DEF_FUNCTION_TYPE_10 and DEF_FUNCTION_TYPE_11.
8616 (c_define_builtins): Likewise.
8617 * c-common.h (enum c_omp_clause_split): Add
8618 C_OMP_CLAUSE_SPLIT_TASKLOOP.
8619 (c_finish_omp_critical, c_finish_omp_ordered): Add CLAUSES argument.
8620 (c_finish_omp_for): Add ORIG_DECLV argument.
8621 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP as
8622 201511 instead of 201307.
8623 * c-omp.c (c_finish_omp_critical): Add CLAUSES argument, set
8624 OMP_CRITICAL_CLAUSES to it.
8625 (c_finish_omp_ordered): Add CLAUSES argument, set
8626 OMP_ORDERED_CLAUSES to it.
8627 (c_finish_omp_for): Add ORIG_DECLV argument, set OMP_FOR_ORIG_DECLS
8628 to it if OMP_FOR. Clear DECL_INITIAL on the IVs.
8629 (c_omp_split_clauses): Handle OpenMP 4.5 combined/composite
8630 constructs and new OpenMP 4.5 clauses. Clear
8631 OMP_CLAUSE_SCHEDULE_SIMD if not combined with OMP_SIMD. Add
8633 * c-pragma.c (omp_pragmas_simd): Add taskloop.
8634 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKLOOP.
8635 (enum pragma_omp_clause): Add
8636 PRAGMA_OMP_CLAUSE_{DEFAULTMAP,GRAINSIZE,HINT,{IS,USE}_DEVICE_PTR}
8637 and PRAGMA_OMP_CLAUSE_{LINK,NOGROUP,NUM_TASKS,PRIORITY,SIMD,THREADS}.
8639 2015-10-05 Richard Sandiford <richard.sandiford@arm.com>
8641 * c-lex.c (interpret_float): Use real_equal instead of
8644 2015-10-04 Jason Merrill <jason@redhat.com>
8646 Implement N4514, C++ Extensions for Transactional Memory.
8647 * c-common.c (c_common_reswords): Add C++ TM TS keywords.
8648 (c_common_attribute_table): Add transaction_safe_dynamic.
8649 transaction_safe now affects type identity.
8650 (handle_tm_attribute): Handle transaction_safe_dynamic.
8651 * c-common.h (enum rid): Add RID_ATOMIC_NOEXCEPT,
8652 RID_ATOMIC_CANCEL, RID_SYNCHRONIZED.
8653 (OBJC_IS_CXX_KEYWORD): Add RID_SYNCHRONIZED.
8655 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_transactional_memory.
8656 * c-pretty-print.c (pp_c_attributes_display): Don't print
8657 transaction_safe in C++.
8659 2015-10-02 Marek Polacek <polacek@redhat.com>
8661 * c.opt (Wduplicated-cond): Don't enable by -Wall anymore.
8663 2015-10-02 Marek Polacek <polacek@redhat.com>
8666 * c-common.c (warn_duplicated_cond_add_or_warn): New function.
8667 * c-common.h (warn_duplicated_cond_add_or_warn): Declare.
8668 * c.opt (Wduplicated-cond): New option.
8670 2015-10-01 Joseph Myers <joseph@codesourcery.com>
8672 * c.opt (std=c11): Do not describe as experimental.
8673 (std=gnu11): Likewise.
8674 (std=iso9899:2011): Likewise.
8676 2015-09-28 Nathan Sidwell <nathan@codesourcery.com>
8678 * c-common.c (DEF_FUNCTION_TYPE_VAR_6): New.
8679 (DEF_FUNCTION_TYPE_VAR_11): Delete.
8681 2015-09-25 Marek Polacek <polacek@redhat.com>
8683 * c-ubsan.c (ubsan_instrument_division): Remove unnecessary code.
8684 (ubsan_instrument_shift): Likewise.
8686 2015-09-25 Marek Polacek <polacek@redhat.com>
8689 * c-ubsan.c (ubsan_instrument_division): Also pre-evaluate OP1.
8691 2015-09-24 Patrick Palka <ppalka@gcc.gnu.org>
8693 * c-indentation.c (should_warn_for_misleading_indentation):
8694 Compare next_stmt_vis_column with guard_line_first_nws instead
8695 of with guard_line_vis_column.
8697 2015-09-23 Manuel López-Ibáñez <manu@gcc.gnu.org>
8701 * c-pragma.c (handle_pragma_diagnostic): Detect non-warning
8702 options and options not valid for the current language.
8704 2015-09-22 Patrick Palka <ppalka@gcc.gnu.org>
8706 * c-indentation.c (should_warn_for_misleading_indentation):
8707 Float out and consolidate the calls to get_visual_column that
8708 are passed guard_exploc as an argument. Compare
8709 next_stmt_vis_column with guard_line_first_nws instead of with
8710 body_line_first_nws.
8712 2015-09-22 Nathan Sidwell <nathan@codesourcery.com>
8714 * c.opt (Wmultiple-inheritance, Wvirtual-inheritance, Wtemplates,
8715 Wnamespaces): New C++ warnings.
8717 2015-09-22 Jason Merrill <jason@redhat.com>
8719 * c-common.h (abi_compat_version_crosses): New.
8720 (warn_abi_version): Declare.
8721 * c-common.c: Define it.
8722 * c-opts.c (c_common_post_options): Handle it.
8723 flag_abi_compat_version defaults to 8.
8725 2015-09-21 Ville Voutilainen <ville.voutilainen@gmail.com>
8727 Complete the implementation of N4230, Nested namespace definition.
8728 * c-cppbuiltin.c: Add __cpp_namespace_attributes and
8729 __cpp_nested_namespace_definitions.
8731 2015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
8733 * c-pragma.c (handle_pragma_diagnostic): Fix wrong return.
8735 2015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
8737 * c-pragma.c (handle_pragma_diagnostic): Use explicit location
8739 * c-pragma.h (pragma_lex): Add optional loc argument.
8741 2015-09-16 Mikhail Maltsev <maltsevm@gmail.com>
8743 * c-format.c (check_format_arg): Adjust to use common block size in all
8746 2015-09-15 David Malcolm <dmalcolm@redhat.com>
8748 * c-format.c (location_from_offset): Update for change in
8749 signature of location_get_source_line.
8750 * c-indentation.c (get_visual_column): Likewise.
8751 (line_contains_hash_if): Likewise.
8753 2015-09-14 Marek Polacek <polacek@redhat.com>
8755 * c-opts.c (c_common_post_options): Set C++ standard earlier, before
8756 setting various warnings.
8758 2015-09-14 Marek Polacek <polacek@redhat.com>
8760 * c-common.c (warn_for_sign_compare): Cast to unsigned when shifting
8763 2015-09-11 Mark Wielaard <mjw@redhat.com>
8766 * c.opt (Wunused-variable): Option from common.opt.
8767 (Wunused-const-variable): New option.
8769 2015-09-09 Paolo Carlini <paolo.carlini@oracle.com>
8772 * c.opt ([Wsubobject-linkage]): Add.
8774 2015-09-03 Martin Sebor <msebor@redhat.com>
8777 * c-common.h (c_decl_implicit, reject_gcc_builtin): Declare new
8779 * c-common.c (reject_gcc_builtin): Define.
8781 2015-09-02 Balaji V. Iyer <balaji.v.iyer@intel.com>
8784 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): New
8786 * c-gimplify.c (c_gimplify_expr): Added a call to the function
8787 cilk_gimplify_call_params_in_spawned_fn.
8788 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): New function.
8789 (gimplify_cilk_spawn): Removed EXPR_STMT and CLEANUP_POINT_EXPR
8792 2015-08-25 Marek Polacek <polacek@redhat.com>
8795 * c-common.c (handle_weak_attribute): Don't check whether the
8796 visibility can be changed here.
8798 2015-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
8800 * c-lex.c (c_lex_with_flags): Use explicit locations.
8802 2015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
8804 * c-ada-spec.h, c-common.c, c-common.h, c-format.c, c-format.h,
8805 c-objc.h, c-ppoutput.c, c-pragma.c, c-pragma.h: Remove useless
8807 2015-08-18 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
8810 * c-common.c (check_builtin_function_arguments): Add check
8811 for BUILT_IN_SIGNBIT argument.
8813 2015-08-18 Paolo Carlini <paolo.carlini@oracle.com>
8816 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_static_assert value
8819 2015-08-17 Marek Polacek <polacek@redhat.com>
8821 * c-pretty-print.c (pp_c_cv_qualifiers): Remove code dealing
8822 with whitespaces before qualifier names.
8824 2015-08-12 Marek Polacek <polacek@redhat.com>
8827 * c-common.c (maybe_warn_shift_overflow): Properly handle
8828 left-shifting 1 into the sign bit.
8830 2015-08-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
8832 * c.opt (Wchkp): Use LangEnabledBy instead of EnabledBy.
8834 2015-08-06 Andrew Sutton <andrew.n.sutton@gmail.com>
8835 Braden Obrzut <admin@maniacsvault.net>
8836 Jason Merrill <jason@redhat.com>
8838 Add C++ Concepts TS support.
8839 * c-common.c (c_common_reswords): Add __is_same_as, concept, requires.
8840 * c-common.h (enum rid): Add RID_IS_SAME_AS, RID_CONCEPT, RID_REQUIRES.
8841 (D_CXX_CONCEPTS, D_CXX_CONCEPTS_FLAGS): New.
8842 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_concepts.
8843 * c-opts.c (set_std_cxx1z): Set flag_concepts.
8844 * c.opt (fconcepts): New.
8846 2015-08-02 Martin Sebor <msebor@redhat.com>
8848 * c.opt (-Wframe-address): New warning option.
8850 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
8852 * c-indentation.c (should_warn_for_misleading_indentation):
8855 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
8857 * c-indentation.c (get_visual_column): Add parameter first_nws,
8858 use it. Update comment documenting the function.
8859 (is_first_nonwhitespace_on_line): Remove.
8860 (should_warn_for_misleading_indentation): Replace usage of
8861 of is_first_nonwhitespace_on_line with get_visual_column.
8863 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
8865 * c-indentation.h (struct token_indent_info): Define.
8866 (get_token_indent_info): Define.
8867 (warn_for_misleading_information): Declare.
8868 * c-common.h (warn_for_misleading_information): Remove.
8869 * c-identation.c (warn_for_misleading_indentation):
8870 Change declaration to take three token_indent_infos. Adjust
8872 * c-identation.c (should_warn_for_misleading_indentation):
8873 Likewise. Bail out early if the body is a compound statement.
8874 (guard_tinfo_to_string): Define.
8876 2015-07-30 Jason Merrill <jason@redhat.com>
8878 * c-pretty-print.c (unary_expression) [INDIRECT_REF]: Don't print
8879 '*' for reference decay.
8881 2015-07-30 Marek Polacek <polacek@redhat.com>
8883 * c-common.c (warn_tautological_cmp): Bail for float types.
8885 2015-07-27 Marek Polacek <polacek@redhat.com>
8888 * c-common.c (warn_tautological_cmp): Don't warn for macro expansion.
8890 2015-07-27 Marek Polacek <polacek@redhat.com>
8894 * c-common.c (find_array_ref_with_const_idx_r): New function.
8895 (warn_tautological_cmp): New function.
8896 * c-common.h (warn_tautological_cmp): Declare.
8897 * c.opt (Wtautological-compare): New option.
8899 2015-07-23 Marek Polacek <polacek@redhat.com>
8901 * c-ubsan.c (ubsan_instrument_division): Use unshare_expr throughout.
8902 (ubsan_instrument_shift): Likewise.
8904 2015-07-23 Marek Polacek <polacek@redhat.com>
8907 * c-ubsan.c: Include gimplify.h.
8908 (ubsan_instrument_division): Unshare OP0 and OP1.
8909 (ubsan_instrument_shift): Likewise.
8911 2015-07-20 Marek Polacek <polacek@redhat.com>
8912 Richard Sandiford <richard.sandiford@arm.com>
8915 * c-common.c (c_fully_fold_internal): Warn about left shift overflows.
8916 Use EXPR_LOC_OR_LOC.
8917 (maybe_warn_shift_overflow): New function.
8918 * c-common.h (maybe_warn_shift_overflow): Declare.
8919 * c-opts.c (c_common_post_options): Set warn_shift_overflow.
8920 * c.opt (Wshift-overflow): New option.
8922 2015-07-16 Martin Liska <mliska@suse.cz>
8924 * c-format.c (static void check_format_info_main): Use
8925 object_allocator instead of pool_allocator.
8926 (check_format_arg): Likewise.
8927 (check_format_info_main): Likewise.
8929 2015-07-15 Andrew MacLeod <amacleod@redhat.com>
8931 * c-opts.c: Remove multiline #include comment.
8933 2015-07-12 Aldy Hernandez <aldyh@redhat.com>
8935 * c-common.c: Fix double word typos.
8937 2015-07-10 Eric Botcazou <ebotcazou@adacore.com>
8939 * c-ada-spec.h (cpp_operation): Revert latest change.
8940 * c-ada-spec.c (print_ada_declaration): Likewise. Skip implicit
8941 constructors and destructors.
8943 2015-07-09 Andrew MacLeod <amacleod@redhat.com>
8945 * c-common.h: Adjust includes for flags.h changes.
8946 * stub-objc.c: Likewise.
8948 2015-07-08 Eric Botcazou <ebotcazou@adacore.com>
8950 * c-ada-spec.h (cpp_operation): Add IS_CONSTEXPR.
8951 * c-ada-spec.c (print_ada_declaration): Skip constexpr constructors.
8953 2015-07-08 Jakub Jelinek <jakub@redhat.com>
8955 * c-omp.c (c_omp_declare_simd_clauses_to_numbers): If all clauses
8956 are to be removed, return NULL rather than original clauses list.
8958 2015-07-07 Andrew MacLeod <amacleod@redhat.com>
8960 * array-notation-common.c: Adjust includes.
8961 * c-ada-spec.c: Likewise.
8962 * c-cilkplus.c: Likewise.
8963 * c-common.h: Likewise.
8964 * c-cppbuiltin.c: Likewise.
8965 * c-dump.c: Likewise.
8966 * c-format.c: Likewise.
8967 * c-gimplify.c: Likewise.
8968 * c-indentation.c: Likewise.
8969 * c-lex.c: Likewise.
8970 * c-omp.c: Likewise.
8971 * c-opts.c: Likewise.
8972 * c-pch.c: Likewise.
8973 * c-ppoutput.c: Likewise.
8974 * c-pragma.c: Likewise.
8975 * c-pretty-print.c: Likewise.
8976 * c-semantics.c: Likewise.
8977 * c-ubsan.c: Likewise.
8979 * stub-objc.c: Likewise.
8981 2015-07-07 Eric Botcazou <ebotcazou@adacore.com>
8983 * c-ada-spec.h (cpp_operation): Add IS_MOVE_CONSTRUCTOR.
8984 * c-ada-spec.c (print_ada_declaration): Skip move constructors.
8986 2015-07-01 Jason Merrill <jason@redhat.com>
8988 * c-common.h (D_CXX11): Rename from D_CXX0X.
8989 (RID_FIRST_CXX11, RID_LAST_CXX11): Rename from *_CXX0X.
8990 * c-common.c: Adjust.
8992 * c-opts.c (c_common_post_options): Default to C++14.
8994 * c-opts.c (c_common_post_options): Highest ABI level is now 10.
8996 2015-06-30 Edward Smith-Rowland <3dw4rd@verizon.net>
8998 Implement N4197 - Adding u8 character literals
8999 * c-ada-spec.c (print_ada_macros): Treat CPP_UTF8CHAR like
9001 * c-common.c (c_parse_error): Print CPP_UTF8CHAR and
9002 CPP_UTF8CHAR_USERDEF tokens.
9003 * c-lex.c (c_lex_with_flags): Treat CPP_UTF8CHAR_USERDEF
9004 and CPP_UTF8CHAR tokens.
9005 (lex_charconst): Treat CPP_UTF8CHAR token.
9007 2015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
9010 * c-common.c (do_warn_unused_parameter): Move here.
9011 * c-common.h (do_warn_unused_parameter): Declare.
9013 2015-06-29 Marek Polacek <polacek@redhat.com>
9016 * c-common.c (check_case_bounds): Add bool * parameter. Set
9018 (c_add_case_label): Add bool * parameter. Pass it down to
9020 (c_do_switch_warnings): Add bool parameters. Implement -Wswitch-bool
9022 * c-common.h (c_add_case_label, c_do_switch_warnings): Update
9025 2015-06-27 Marek Polacek <polacek@redhat.com>
9027 * c-common.c (check_main_parameter_types): Use VECTOR_TYPE_P
9028 or VECTOR_INTEGER_TYPE_P throughout.
9029 * c-gimplify.c: Likewise.
9031 2015-06-26 Marek Polacek <polacek@redhat.com>
9033 * array-notation-common.c (find_rank): Use INDIRECT_REF_P.
9034 * c-common.c (c_fully_fold_internal): Likewise.
9035 (c_alignof_expr): Likewise.
9036 * c-pretty-print.c (c_pretty_printer::postfix_expression): Likewise.
9037 * c-ubsan.c (ubsan_instrument_bounds): Likewise.
9038 * cilk.c (create_parm_list): Likewise.
9040 2015-06-26 Marek Polacek <polacek@redhat.com>
9042 * c-common.c (handle_unused_attribute): Use VAR_OR_FUNCTION_DECL_P.
9044 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
9046 * c-common.c: Remove ipa-ref.h and plugin-api.h from include list.
9047 * c-gimplify.c: Likewise.
9048 * c-pragma.c: Likewise.
9049 * c-ubsan.c: Likewise.
9052 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
9054 * c-common.c (c_type_hasher): Inherit from ggc_ptr_hash rather than
9057 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
9059 * cilk.c: Move calls.h after tm.h in the include chain.
9061 2015-06-25 Marek Polacek <polacek@redhat.com>
9063 * array-notation-common.c: Use VAR_P throughout.
9064 * c-ada-spec.c: Likewise.
9065 * c-common.c: Likewise.
9066 * c-format.c: Likewise.
9067 * c-gimplify.c: Likewise.
9068 * c-omp.c: Likewise.
9069 * c-pragma.c: Likewise.
9070 * c-pretty-print.c: Likewise.
9073 2015-06-25 Marek Polacek <polacek@redhat.com>
9075 * cilk.c (extract_free_variables): Use is_global_var.
9077 2015-06-23 Richard Sandiford <richard.sandiford@arm.com>
9079 * c-common.c: Don't include target-def.h.
9081 2015-06-23 Marek Polacek <polacek@redhat.com>
9083 * c-common.c (warn_logical_operator): Use tree_int_cst_equal
9084 when comparing INTEGER_CSTs.
9086 2015-06-22 Pierre-Marie de Rodat <derodat@adacore.com>
9088 * c-ada-spec.h (cpp_operation): Add HAS_DEPENDENT_TEMPLATE_ARGS.
9089 * c-ada-spec.c (collect_ada_nodes): Skip NAMESPACE_DECL
9090 (dump_ada_template): Skip partially specialized types.
9092 2015-06-22 Mikhail Maltsev <maltsevm@gmail.com>
9094 * c-common.c (scalar_to_vector): Use std::swap instead of manually
9097 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
9099 * array-notation-common.c: Do not include input.h, line-map.h or is-a.h.
9100 * c-ada-spec.c: Likewise.
9101 * c-cilkplus.c: Likewise.
9102 * c-common.c: Likewise.
9103 * c-common.h: Likewise.
9104 * c-cppbuiltin.c: Likewise.
9105 * c-dump.c: Likewise.
9106 * c-format.c: Likewise.
9107 * c-gimplify.c: Likewise.
9108 * c-indentation.c: Likewise.
9109 * c-lex.c: Likewise.
9110 * c-omp.c: Likewise.
9111 * c-opts.c: Likewise.
9112 * c-pch.c: Likewise.
9113 * c-ppoutput.c: Likewise.
9114 * c-pragma.c: Likewise.
9115 * c-pretty-print.c: Likewise.
9116 * c-semantics.c: Likewise.
9117 * c-ubsan.c: Likewise.
9119 * stub-objc.c: Likewise.
9121 2015-06-13 Patrick Palka <ppalka@gcc.gnu.org>
9124 * c-common.c (c_common_truthvalue_conversion): Warn when
9125 converting an address of a reference to a truth value.
9127 2015-06-08 Andrew MacLeod <amacleod@redhat.com>
9129 * array-notation-common.c : Adjust include files.
9130 * c-ada-spec.c : Likewise.
9131 * c-cilkplus.c : Likewise.
9132 * c-common.c : Likewise.
9133 * c-common.h : Likewise.
9134 * c-cppbuiltin.c : Likewise.
9135 * c-dump.c : Likewise.
9136 * c-format.c : Likewise.
9137 * c-gimplify.c : Likewise.
9138 * c-indentation.c : Likewise.
9139 * c-lex.c : Likewise.
9140 * c-omp.c : Likewise.
9141 * c-opts.c : Likewise.
9142 * c-pch.c : Likewise.
9143 * c-ppoutput.c : Likewise.
9144 * c-pragma.c : Likewise.
9145 * c-pretty-print.c : Likewise.
9146 * c-semantics.c : Likewise.
9147 * c-ubsan.c : Likewise.
9148 * cilk.c : Likewise.
9149 * stub-objc.c : Likewise.
9151 2015-06-08 Marek Polacek <polacek@redhat.com>
9154 * c-format.c (location_from_offset): Return LOC if LINE is null.
9156 2015-06-05 Aldy Hernandez <aldyh@redhat.com>
9158 * c-common.h (c_parse_final_cleanups): New prototype.
9159 * c-opts.c (c_common_parse_file): Call c_parse_final_cleanups.
9161 2015-06-04 Sriraman Tallam <tmsriram@google.com>
9163 * c-common.c (noplt): New attribute.
9164 (handle_noplt_attribute): New handler.
9166 2015-06-04 Andrew MacLeod <amacleod@redhat.com>
9168 * array-notation-common.c: Adjust includes for restructured coretypes.h.
9169 * c-ada-spec.c: Likewise.
9170 * c-cilkplus.c: Likewise.
9171 * c-common.c: Likewise.
9172 * c-common.h: Likewise.
9173 * c-cppbuiltin.c: Likewise.
9174 * c-dump.c: Likewise.
9175 * c-format.c: Likewise.
9176 * c-gimplify.c: Likewise.
9177 * c-indentation.c: Likewise.
9178 * c-lex.c: Likewise.
9179 * c-omp.c: Likewise.
9180 * c-opts.c: Likewise.
9181 * c-pch.c: Likewise.
9182 * c-ppoutput.c: Likewise.
9183 * c-pragma.c: Likewise.
9184 * c-pretty-print.c: Likewise.
9185 * c-semantics.c: Likewise.
9186 * c-ubsan.c: Likewise.
9188 * stub-objc.c: Likewise.
9190 2015-06-02 David Malcolm <dmalcolm@redhat.com>
9193 * c-indentation.c (should_warn_for_misleading_indentation): Use
9194 expand_location rather than expand_location_to_spelling_point.
9195 Don't warn if the guarding statement is more indented than the
9198 2015-06-02 David Malcolm <dmalcolm@redhat.com>
9200 * c-indentation.c (warn_for_misleading_indentation): Bail out
9201 immediately if -Wmisleading-indentation isn't enabled.
9203 2015-06-01 Martin Liska <mliska@suse.cz>
9205 * c-format.c (check_format_arg):Use new type-based pool allocator.
9206 (check_format_info_main) Likewise.
9208 2015-05-31 Eric Botcazou <ebotcazou@adacore.com>
9210 * c-ada-spec.c (is_tagged_type): Test for TYPE_METHODS on main variant.
9211 (has_nontrivial_methods): Likewise.
9213 2015-05-25 Marek Polacek <polacek@redhat.com>
9215 * c-ubsan.c (ubsan_instrument_shift): Use type0.
9217 2015-05-22 Marek Polacek <polacek@redhat.com>
9220 * c-common.c (handle_deprecated_attribute): Allow CONST_DECL.
9222 2015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
9224 * c-cppbuiltin.c (c_cpp_builtins): Use if instead of #if with
9225 STACK_GROWS_DOWNWARD.
9227 2015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
9229 * c-cppbuiltin.c (c_cpp_builtins): Check the value of
9230 STACK_GROWS_DOWNWARD rather than if it is defined.
9232 2015-05-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
9235 * c-format.c (location_column_from_byte_offset): New.
9236 (location_from_offset): New.
9237 (struct format_wanted_type): Add offset_loc field.
9238 (check_format_info): Move handling of location for extra arguments
9239 closer to the point of warning.
9240 (check_format_info_main): Pass the result of location_from_offset
9242 (format_type_warning): Pass the result of location_from_offset
9245 2015-05-20 Marek Polacek <polacek@redhat.com>
9247 * c-omp.c (check_omp_for_incr_expr): Use BINARY_CLASS_P.
9249 2015-05-20 Marek Polacek <polacek@redhat.com>
9251 * c-ada-spec.c (dump_sloc): Use DECL_P.
9253 2015-05-20 Marek Polacek <polacek@redhat.com>
9255 * c-pragma.c: Use VAR_OR_FUNCTION_DECL_P throughout.
9256 * c-common.c: Likewise.
9258 2015-05-19 David Malcolm <dmalcolm@redhat.com>
9260 * c-common.h (fe_file_change): Strengthen param from
9261 const line_map * to const line_map_ordinary *.
9262 (pp_file_change): Likewise.
9263 * c-lex.c (fe_file_change): Likewise.
9264 (cb_define): Use linemap_check_ordinary when invoking
9266 (cb_undef): Likewise.
9267 * c-opts.c (c_finish_options): Use linemap_check_ordinary when
9268 invoking cb_file_change.
9269 (c_finish_options): Likewise.
9270 (push_command_line_include): Likewise.
9271 (cb_file_change): Strengthen param "new_map" from
9272 const line_map * to const line_map_ordinary *.
9273 * c-ppoutput.c (cb_define): Likewise for local "map".
9274 (pp_file_change): Likewise for param "map" and local "from".
9276 2015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
9278 * c-common.c (shorten_compare): Use std::swap instead of explicit swaps.
9280 2015-05-18 Tom de Vries <tom@codesourcery.com>
9282 * c-common.c (build_va_arg_1): New function.
9283 (build_va_arg): Add address operator to va_list operand if necessary.
9285 2015-05-15 Mikhail Maltsev <maltsevm@gmail.com>
9288 * c-common.c (int_safely_convertible_to_real_p): Define.
9289 (unsafe_conversion_p): Check conversions involving complex types.
9290 (conversion_warning): Add new warning message for conversions which
9291 discard imaginary component.
9292 * c-common.h: (enum conversion_safety): Add new enumerator for such
9295 2015-05-14 Marek Polacek <polacek@redhat.com>
9299 * c-common.c (c_fully_fold): Pass false down to c_fully_fold_internal.
9300 (c_fully_fold_internal): Fold C_MAYBE_CONST_EXPRs with
9301 C_MAYBE_CONST_EXPR_INT_OPERANDS set. Add FOR_INT_CONST argument and
9302 use it. If FOR_INT_CONST, require that all evaluated operands be
9305 2015-05-12 David Malcolm <dmalcolm@redhat.com>
9307 * c-common.h (warn_for_misleading_indentation): New prototype.
9308 * c-indentation.c: New file.
9309 * c.opt (Wmisleading-indentation): New option.
9311 2015-05-12 Tom de Vries <tom@codesourcery.com>
9313 PR tree-optimization/66010
9314 * c-common.c (build_va_arg): Don't mark ap addressable unless necessary.
9316 2015-05-09 Jason Merrill <jason@redhat.com>
9318 * c-opts.c (c_common_post_options): Also clear
9319 cpp_opts->cpp_warn_cxx11_compat.
9321 * c-common.h (enum cxx_dialect): Add cxx_unset.
9322 * c-common.c (cxx_dialect): Initialize to cxx_unset.
9323 * c-opts.c (c_common_post_options): Set C++ dialect to C++98 if unset.
9325 * c.opt (std=c++14): Remove Undocumented flag and experimental warning.
9326 (std=gnu++0x): Mark as Undocumented.
9327 (std=gnu++1y): Add deprecated message.
9329 2015-05-08 Jason Merrill <jason@redhat.com>
9331 * c.opt (Wc++11-compat): Make primary. Rename var warn_cxx11_compat.
9334 * c.opt (Wc++0x-compat): Also set cpp_warn_cxx11_compat.
9336 2015-05-08 Marek Polacek <polacek@redhat.com>
9339 * c.opt (Woverride-init-side-effects): New option.
9341 2015-05-07 Marek Polacek <polacek@redhat.com>
9344 * c-common.c (c_fully_fold_internal): Warn when left shifting a
9346 * c.opt (Wshift-negative-value): New option.
9347 * c-opts.c (c_common_post_options): Set warn_shift_negative_value
9348 when -Wextra and C99/C++11 mode.
9350 2015-05-07 Marek Polacek <polacek@redhat.com>
9351 Martin Uecker <uecker@eecs.berkeley.edu>
9353 * c-ubsan.c (ubsan_instrument_bounds): Don't skip instrumenting
9354 flexible member array-like members if SANITIZE_BOUNDS_STRICT.
9356 2015-05-05 Jason Merrill <jason@redhat.com>
9358 * c.opt (Wterminate): New.
9360 2015-04-30 Marek Polacek <polacek@redhat.com>
9362 * c-common.c (maybe_warn_bool_compare): When comparing with 0/1,
9363 require that the non-constant be of a boolean type.
9365 2015-04-29 Josh Triplett <josh@joshtriplett.org>
9367 * c-common.c (handle_section_attribute): Refactor to reduce
9368 nesting and distinguish between error cases.
9370 2015-04-29 Marek Polacek <polacek@redhat.com>
9373 * c-common.c (maybe_warn_bool_compare): Warn when comparing a boolean
9376 2015-04-29 Jakub Jelinek <jakub@redhat.com>
9378 * c-common.h (omp_clause_mask): Unconditionally define as a class.
9379 Use uint64_t instead of unsigned HOST_WIDE_INT and 64 instead of
9380 HOST_BITS_PER_WIDE_INT.
9382 2015-04-28 Tom de Vries <tom@codesourcery.com>
9384 PR tree-optimization/65887
9385 * c-common.c (build_va_arg): Mark va_arg ap argument as addressable.
9387 2015-04-28 Eric Botcazou <ebotcazou@adacore.com>
9388 Pierre-Marie de Rodat <derodat@adacore.com>
9390 * c-ada-spec.c (in_function): Delete.
9391 (dump_generic_ada_node): Do not change in_function and remove the
9392 redundant code dealing with it.
9393 (print_ada_declaration): Do not change in_function. Use INDENT_INCR.
9394 (print_ada_methods): Output the static member functions in a nested
9395 package after the regular methods as well as associated renamings.
9397 2015-04-24 Marek Polacek <polacek@redhat.com>
9400 * c-common.c (c_fully_fold_internal): Use OPT_Wshift_count_negative
9401 and OPT_Wshift_count_overflow.
9404 * c-common.c (warn_logical_operator): Warn if the operands have the
9407 2015-04-24 Marek Polacek <polacek@redhat.com>
9410 * c-common.c (warn_logical_operator): Bail if either operand comes
9411 from a macro expansion.
9413 2015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
9416 * c-common.c (c_default_pointer_mode): Add definition.
9417 * c-common.h (c_default_pointer_mode): Add declaration.
9419 2015-03-11 Jakub Jelinek <jakub@redhat.com>
9421 * c-common.c (c_common_nodes_and_builtins): Don't call xstrdup
9422 on record_builtin_type argument.
9424 2015-03-10 Jakub Jelinek <jakub@redhat.com>
9427 * c-common.c (warn_logical_not_parentheses): Don't warn for
9430 2015-03-07 Marek Polacek <polacek@redhat.com>
9433 * c-ubsan.c (ubsan_instrument_bounds): Check for COMPONENT_REF
9434 before trying to figure out whether we have a flexible array member.
9436 2015-03-06 Eric Botcazou <ebotcazou@adacore.com>
9437 Jonathan Wakely <jwakely.gcc@gmail.com>
9439 * c-ada-spec.c (dump_ada_double_name): Fix pasto.
9441 2015-03-05 Eric Botcazou <ebotcazou@adacore.com>
9444 * c-ada-spec.c (print_destructor): Remove obsolete code.
9446 2015-03-01 Eric Botcazou <ebotcazou@adacore.com>
9448 * c-ada-spec.c (is_tagged_type): Add guard for DECL_VINDEX.
9449 (dump_template_types): Adjust DECL_TEMPLATE_INSTANTIATIONS and
9450 DECL_TEMPLATE_RESULT emulations.
9451 (dump_ada_template)): Add guard for TYPE_METHODS.
9453 2015-02-27 Marek Polacek <polacek@redhat.com>
9456 * c.opt (Wformat-signedness): Don't enable by -Wformat=2.
9458 2015-02-27 Kai Tietz <ktietz@redhat.com>
9461 * c-pragma.c (handle_pragma_weak): Do not try to create
9462 weak/alias of declarations not being function, or variable
9465 2015-02-24 Thomas Schwinge <thomas@codesourcery.com>
9468 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
9470 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
9472 2015-02-16 Marek Polacek <polacek@redhat.com>
9475 * c-format.c (check_format_types): Handle null param.
9477 2015-02-13 Marek Polacek <polacek@redhat.com>
9480 * c-format.c (check_format_types): Don't warn about different
9481 signedness if the original value is in the range of WANTED_TYPE.
9483 2015-02-12 Jason Merrill <jason@redhat.com>
9486 * c-opts.c (c_common_post_options): Change flag_abi_version from 0
9487 to the current highest version.
9488 * c-cppbuiltin.c (c_cpp_builtins): Assert that it isn't 0.
9490 2015-02-04 Jakub Jelinek <jakub@redhat.com>
9494 * c-omp.c (c_finish_omp_atomic): Use TRUNC_DIV_EXPR
9495 instead of RDIV_EXPR. Use build_binary_op instead of
9498 2015-01-30 Joseph Myers <joseph@codesourcery.com>
9500 * c-opts.c, c-pch.c, cppspec.c: All callers of fatal_error changed
9501 to pass input_location as first argument.
9503 2015-01-23 Tom de Vries <tom@codesourcery.com>
9506 * c.opt (fopenacc): Mark as LTO option.
9508 2015-01-23 Tom de Vries <tom@codesourcery.com>
9511 * c.opt (fopenmp): Mark as LTO option.
9513 2015-01-21 Jakub Jelinek <jakub@redhat.com>
9516 * cilk.c (fill_decls_vec): Only put decls into vector v.
9517 (compare_decls): Fix up formatting.
9519 2015-01-21 Igor Zamyatin <igor.zamyatin@intel.com>
9522 * cilk.c: Include vec.h.
9523 (struct cilk_decls): New structure.
9524 (wrapper_parm_cb): Split this function to...
9525 (fill_decls_vec): ...this...
9526 (create_parm_list): ...and this.
9527 (compare_decls): New function.
9528 (for_local_cb): Remove.
9529 (wrapper_local_cb): Ditto.
9530 (build_wrapper_type): For now first traverse and fill vector of
9531 declarations then sort it and then deal with sorted vector.
9532 (cilk_outline): Ditto.
9533 (declare_one_free_variable): Ditto.
9535 2015-01-21 Jason Merrill <jason@redhat.com>
9538 * c-format.c (check_format_arg): Call decl_constant_value.
9540 2015-01-19 Martin Liska <mliska@suse.cz>
9542 * c-common.c (handle_noicf_attribute): New function.
9544 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
9545 Bernd Schmidt <bernds@codesourcery.com>
9546 James Norris <jnorris@codesourcery.com>
9547 Cesar Philippidis <cesar@codesourcery.com>
9548 Ilmir Usmanov <i.usmanov@samsung.com>
9549 Jakub Jelinek <jakub@redhat.com>
9551 * c.opt (fopenacc): New option.
9552 * c-cppbuiltin.c (c_cpp_builtins): Conditionally define _OPENACC.
9553 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
9555 * c-common.h (c_finish_oacc_wait): New prototype.
9556 * c-omp.c: Include "omp-low.h" and "gomp-constants.h".
9557 (c_finish_oacc_wait): New function.
9558 * c-pragma.c (oacc_pragmas): New variable.
9559 (c_pp_lookup_pragma, init_pragma): Handle it.
9560 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_CACHE,
9561 PRAGMA_OACC_DATA, PRAGMA_OACC_ENTER_DATA, PRAGMA_OACC_EXIT_DATA,
9562 PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP, PRAGMA_OACC_PARALLEL,
9563 PRAGMA_OACC_UPDATE, PRAGMA_OACC_WAIT.
9564 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ASYNC,
9565 PRAGMA_OACC_CLAUSE_AUTO, PRAGMA_OACC_CLAUSE_COLLAPSE,
9566 PRAGMA_OACC_CLAUSE_COPY, PRAGMA_OACC_CLAUSE_COPYIN,
9567 PRAGMA_OACC_CLAUSE_COPYOUT, PRAGMA_OACC_CLAUSE_CREATE,
9568 PRAGMA_OACC_CLAUSE_DELETE, PRAGMA_OACC_CLAUSE_DEVICE,
9569 PRAGMA_OACC_CLAUSE_DEVICEPTR, PRAGMA_OACC_CLAUSE_FIRSTPRIVATE,
9570 PRAGMA_OACC_CLAUSE_GANG, PRAGMA_OACC_CLAUSE_HOST,
9571 PRAGMA_OACC_CLAUSE_IF, PRAGMA_OACC_CLAUSE_NUM_GANGS,
9572 PRAGMA_OACC_CLAUSE_NUM_WORKERS, PRAGMA_OACC_CLAUSE_PRESENT,
9573 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPY,
9574 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYIN,
9575 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYOUT,
9576 PRAGMA_OACC_CLAUSE_PRESENT_OR_CREATE, PRAGMA_OACC_CLAUSE_PRIVATE,
9577 PRAGMA_OACC_CLAUSE_REDUCTION, PRAGMA_OACC_CLAUSE_SELF,
9578 PRAGMA_OACC_CLAUSE_SEQ, PRAGMA_OACC_CLAUSE_VECTOR,
9579 PRAGMA_OACC_CLAUSE_VECTOR_LENGTH, PRAGMA_OACC_CLAUSE_WAIT,
9580 PRAGMA_OACC_CLAUSE_WORKER.
9582 2015-01-14 Marcos Diaz <marcos.diaz@tallertechnologies.com>
9584 * c-cppbuiltin.c (c_cpp_builtins): New cpp define __SSP_EXPLICIT__
9585 for the new option fstack-protector_explicit.
9586 * c-common.c (c_common_attribute_table): Add stack_protect attribute.
9587 (handle_stack_protect_attribute): New function.
9589 2015-01-13 Martin Uecker <uecker@eecs.berkeley.edu>
9591 * c.opt: New option -Warray-bounds=.
9593 2015-01-09 Michael Collison <michael.collison@linaro.org>
9595 * array-notation-common.c: Include hash-set.h, machmode.h,
9596 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
9597 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
9598 * c-ada-spec.c: Ditto.
9599 * c-cilkplus.c: Ditto.
9600 * c-common.c: Include input.h due to flattening of tree.h.
9601 Define macro GCC_C_COMMON_C.
9602 * c-common.h: Flatten tree.h header files into c-common.h.
9603 Remove include of tree-core.h.
9604 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
9605 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
9606 fold-const.h, wide-int.h, and inchash.h due to
9607 flattening of tree.h.
9609 * c-format.c: Flatten tree.h header files into c-common.h.
9610 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
9611 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
9612 fold-const.h, wide-int.h, and inchash.h due to
9613 flattening of tree.h.
9614 * c-dump.c: Include hash-set.h, machmode.h,
9615 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
9616 fold-const.h, wide-int.h, and inchash.h due to
9617 flattening of tree.h.
9618 * c-format.c: Include hash-set.h, machmode.h,
9619 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
9620 fold-const.h, wide-int.h, inchash.h and real.h due to
9621 flattening of tree.h.
9622 * c-gimplify.c: Include hash-set.h, machmode.h,
9623 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
9624 fold-const.h, wide-int.h, and inchash.h due to
9625 flattening of tree.h.
9631 * c-ppoutput.c: Ditto.
9632 * c-pragma.c: Ditto.
9633 * c-pretty-print.c: Ditto.
9634 * c-semantics.c: Ditto.
9636 * stub-objc.c: Ditto.
9638 2015-01-08 Jason Merrill <jason@redhat.com>
9640 * c-ubsan.c (ubsan_maybe_instrument_array_ref): Use
9641 do_ubsan_in_current_function.
9642 (ubsan_maybe_instrument_reference_or_call): Likewise.
9643 * c-ubsan.h: Declare it.
9645 2015-01-08 Mike Stump <mikestump@comcast.net>
9647 * c-common.c (c_common_attribute_table): Add no_sanitize_thread.
9649 2015-01-07 Marek Polacek <polacek@redhat.com>
9652 * c-common.c (c_fully_fold_internal): Warn for division and modulo
9653 if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST and is zero.
9655 2015-01-05 Trevor Saunders <tsaunders@mozilla.com>
9658 * c.opt (Wsuggest-override): New option.
9660 2015-01-05 Jakub Jelinek <jakub@redhat.com>
9662 Update copyright years.
9664 2015-01-05 Marek Polacek <polacek@redhat.com>
9667 * c-common.c (warn_array_subscript_with_type_char): Add location_t
9669 * c-common.h (warn_array_subscript_with_type_char): Update
9672 2014-12-20 Edward Smith-Rowland <3dw4rd@verizon.net>
9674 * c-cppbuiltin.c (__cpp_sized_deallocation): Uncomment and move macro.
9675 Control macro with flag_sized_deallocation.
9677 2014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
9679 * c.opt (Wdiscarded-array-qualifiers): New option.
9681 2014-12-19 Jakub Jelinek <jakub@redhat.com>
9683 PR preprocessor/63831
9684 * c-cppbuiltin.c (c_cpp_builtins): Don't define __has_attribute
9685 and __has_cpp_attribute here.
9686 * c-ppoutput.c (init_pp_output): Set cb->has_attribute to
9687 c_common_has_attribute.
9688 * c-common.h (c_common_has_attribute): New prototype.
9689 * c-lex.c (init_c_lex): Set cb->has_attribute to
9690 c_common_has_attribute instead of cb_has_attribute.
9691 (get_token_no_padding): New function.
9692 (cb_has_attribute): Renamed to ...
9693 (c_common_has_attribute): ... this. No longer static. Use
9694 get_token_no_padding, require ()s, don't build TREE_LIST
9695 unnecessarily, fix up formatting, adjust diagnostics, call
9698 2014-12-15 Jason Merrill <jason@redhat.com>
9700 * c.opt (-fsized-deallocation, -Wc++14-compat): New.
9701 (-Wsized-deallocation): New.
9702 * c-opts.c (c_common_post_options): -fsized-deallocation defaults
9703 to on in C++14 and up.
9705 2014-12-11 Jason Merrill <jason@redhat.com>
9707 * c-cppbuiltin.c (c_cpp_builtins): Enable C++14 __cpp_constexpr.
9709 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_runtime_arrays if
9710 we aren't complaining about VLAs.
9712 2014-12-06 Marek Polacek <polacek@redhat.com>
9714 PR tree-optimization/64183
9715 * c-gimplify.c (c_gimplify_expr): Don't convert the RHS of a
9716 shift-expression if it is integer_type_node. Use types_compatible_p.
9718 2014-11-29 Jakub Jelinek <jakub@redhat.com>
9720 * c-common.c (convert_vector_to_pointer_for_subscript): Remove NULL
9721 last argument from create_tmp_var_raw and create_tmp_var calls.
9722 * cilk.c (gimplify_cilk_spawn): Likewise.
9723 * c-omp.c (c_finish_omp_atomic): Likewise.
9725 2014-11-28 Marek Polacek <polacek@redhat.com>
9727 * c-ubsan.c (ubsan_instrument_shift): Use op1_utype for MINUS_EXPR
9728 instead of unsigned_type_node.
9730 2014-11-28 Marek Polacek <polacek@redhat.com>
9733 * c-ubsan.c (ubsan_instrument_shift): Change the type of a MINUS_EXPR
9735 * c-gimplify.c (c_gimplify_expr): Convert right operand of a shift
9736 expression to unsigned_type_node.
9738 2014-11-20 Mark Wielaard <mjw@redhat.com>
9741 * c-opts.c (set_std_c89): Set lang_hooks.name.
9742 (set_std_c99): Likewise.
9743 (set_std_c11): Likewise.
9744 (set_std_cxx98): Likewise.
9745 (set_std_cxx11): Likewise.
9746 (set_std_cxx14): Likewise.
9747 (set_std_cxx1z): Likewise.
9749 2014-11-21 Jakub Jelinek <jakub@redhat.com>
9752 * c-common.h (convert_vector_to_pointer_for_subscript): Change
9753 return type to bool.
9754 * c-common.c: Include gimple-expr.h.
9755 (convert_vector_to_pointer_for_subscript): Change return type to
9756 bool. If *vecp is not lvalue_p and has VECTOR_TYPE, return true
9757 and copy it into a TARGET_EXPR and use that instead of *vecp
9760 2014-11-19 David Malcolm <dmalcolm@redhat.com>
9762 Merger of git branch "gimple-classes-v2-option-3".
9763 * ChangeLog.gimple-classes: New.
9764 * c-gimplify.c (add_block_to_enclosing): Strengthen local "stack"
9765 from being just a vec<gimple> to a vec<gbind *>.
9767 2014-11-18 Jakub Jelinek <jakub@redhat.com>
9770 * c-ubsan.c (ubsan_maybe_instrument_reference_or_call): Change type
9771 argument to ptype, set type to TREE_TYPE (ptype). Don't call
9772 get_pointer_alignment for non-pointers. Use ptype, or if it is
9773 reference type, corresponding pointer type, as type of kind
9775 (ubsan_maybe_instrument_reference,
9776 ubsan_maybe_instrument_member_call): Adjust callers.
9778 2014-11-15 Marek Polacek <polacek@redhat.com>
9781 * array-notation-common.c (is_sec_implicit_index_fn): Return false
9783 (extract_array_notation_exprs): Return for NULL node.
9785 2014-11-12 Joseph Myers <joseph@codesourcery.com>
9787 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Define and
9788 undefine __NO_MATH_ERRNO__ based on changes to -fmath-errno state.
9790 2014-11-12 Jakub Jelinek <jakub@redhat.com>
9793 * c-common.c (check_builtin_function_arguments): Handle
9794 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW.
9796 2014-11-10 Andi Kleen <ak@linux.intel.com>
9799 * c-common.h (check_no_cilk): Declare.
9800 * cilk.c (get_error_location): New function.
9801 (check_no_cilk): Dito.
9803 2014-11-10 Andi Kleen <ak@linux.intel.com>
9805 * cilk.c (recognize_spawn): Use expression location
9808 2014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
9810 * c.opt ([Wshift-count-negative, Wshift-count-overflow]): Add.
9812 2014-11-10 Edward Smith-Rowland <3dw4rd@verizon.net>
9814 * c-cppbuiltin.c (__has_attribute, __has_cpp_attribute): New macros;
9815 (__cpp_rtti, __cpp_exceptions): New macros for C++98;
9816 (__cpp_range_based_for, __cpp_initializer_lists,
9817 __cpp_delegating_constructors, __cpp_nsdmi,
9818 __cpp_inheriting_constructors, __cpp_ref_qualifiers): New macros
9819 for C++11; (__cpp_attribute_deprecated): Remove in favor of
9820 __has_cpp_attribute.
9821 * c-lex.c (cb_has_attribute): New callback CPP function;
9822 (init_c_lex): Set has_attribute callback.
9824 2014-11-04 Richard Biener <rguenther@suse.de>
9826 * c-common.c (shorten_compare): Do not shorten mixed
9827 DFP and non-DFP compares.
9829 2014-11-01 Edward Smith-Rowland <3dw4rd@verizon.net>
9831 * g++.dg/cpp1y/feat-cxx11.C: Commentary and rearrangement of tests.
9832 * g++.dg/cpp1y/feat-cxx11-neg.C: Add aggregate NSDMI test.
9833 Commentary and rearrangement of tests.
9834 * g++.dg/cpp1y/feat-cxx14.C: Enable aggregate NSDMI test.
9835 Commentary and rearrangement of tests.
9836 * g++.dg/cpp1y/feat-cxx98-neg.C: Ditto.
9837 * g++.dg/cpp1y/feat-cxx98.C: Commentary.
9839 2014-10-29 Richard Sandiford <richard.sandiford@arm.com>
9841 * c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant
9842 enum from machine_mode.
9844 2014-10-28 Andrew MacLeod <amacleod@redhat.com>
9846 * c-common.c: Adjust include files.
9847 * c-gimplify.c: Ditto.
9849 * c-pragma.c: Ditto.
9852 2014-10-27 Andrew MacLeod <amacleod@redhat.com>
9854 * c-gimplify.c: Adjust include files.
9856 2014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
9859 * c-opts.c (c_common_diagnostics_set_defaults): Renamed from
9860 c_common_initialize_diagnostics.
9861 * c-common.h: Likewise.
9863 2014-10-24 Marek Polacek <polacek@redhat.com>
9866 * c-pretty-print.c (c_pretty_printer::simple_type_specifier): Don't
9867 print "struct"/"union"/"enum" for typedefed names.
9869 2014-10-23 Marek Polacek <polacek@redhat.com>
9871 * c-ubsan.c (ubsan_instrument_shift): Perform the MINUS_EXPR
9874 2014-10-22 Jakub Jelinek <jakub@redhat.com>
9875 Yury Gribov <y.gribov@samsung.com>
9877 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
9878 ubsan_instrument_vla): Check bits in flag_sanitize_recover bitmask
9879 instead of flag_sanitize_recover as bool flag.
9881 2014-10-21 Kirill Yukhin <kirill.yukhin@intel.com>
9883 * cilk.c: Revert previous change.
9885 2014-10-20 Igor Zamyatin <igor.zamyatin@intel.com>
9888 * cilk.c: Include vec.h.
9889 (struct cilk_decls): New structure.
9890 (wrapper_parm_cb): Split this function to...
9891 (fill_decls_vec): ...this...
9892 (create_parm_list): ...and this.
9893 (compare_decls): New function.
9894 (for_local_cb): Remove.
9895 (wrapper_local_cb): Ditto.
9896 (build_wrapper_type): For now first traverse and fill vector of
9897 declarations then sort it and then deal with sorted vector.
9898 (cilk_outline): Ditto.
9899 (declare_one_free_variable): Ditto.
9901 2014-10-17 Marek Polacek <polacek@redhat.com>
9903 * c-opts.c (c_common_post_options): Set warn_implicit_int.
9904 * c.opt (Wimplicit-int): Initialize to -1.
9906 2014-10-16 Andrew MacLeod <amacleod@redhat.com>
9908 * c-pragma.c: Adjust include files.
9909 * c-semantics.c: Likewise.
9911 2014-10-16 DJ Delorie <dj@redhat.com>
9913 * c-cppbuiltin.c (cpp_atomic_builtins): Don't assume pointers are
9916 2014-10-14 Jason Merrill <jason@redhat.com>
9919 * c-common.h (CPP_PREPARSED_EXPR): New.
9920 (N_CP_TTYPES): Adjust.
9922 2014-10-15 Marek Polacek <polacek@redhat.com>
9924 * c-opts.c (c_common_init_options): Make -std=gnu11 the default for C.
9926 2014-10-14 DJ Delorie <dj@redhat.com>
9928 * c-pretty-print.c (pp_c_integer_constant): Check for all __intN
9929 types, not just __int128.
9930 * c-cppbuiltin.c (c_cpp_builtins): Add builtins for all __intN
9931 types, not just __int128.
9932 (cpp_atomic_builtins): Round pointer sizes up.
9933 (type_suffix): Use type precision, not specific types.
9934 * c-common.c (c_common_reswords): Remove __int128 special case.
9935 (c_common_type_for_size): Check for all __intN types, not just
9937 (c_common_type_for_mode): Likewise.
9938 (c_common_signed_or_unsigned_type): Likewise.
9939 (c_build_bitfield_integer_type): Likewise.
9940 (c_common_nodes_and_builtins): Likewise.
9941 (keyword_begins_type_specifier): Likewise.
9942 * c-common.h (rid): Remove RID_INT128 and add RID_INT_N_* for all
9945 2014-10-12 Trevor Saunders <tsaunders@mozilla.com>
9947 * c-common.c: Use hash_table instead of hashtab.
9949 2014-10-06 Edward Smith-Rowland <3dw4rd@verizon.net>
9951 * c-cppbuiltin.c: Move __cpp_attribute_deprecated to the
9954 2014-10-03 Marc Glisse <marc.glisse@inria.fr>
9959 * c-common.c (warn_logical_operator): Punt for vectors.
9961 2014-10-01 Edward Smith-Rowland <3dw4rd@verizon.net>
9963 Implement SD-6: SG10 Feature Test Recommendations
9964 * c-cppbuiltin.c (c_cpp_builtins()): Define language feature
9965 macros and the __has_header macro.
9967 2014-09-30 Jason Merrill <jason@redhat.com>
9969 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_ASSIGNABLE and
9970 RID_IS_TRIVIALLY_CONSTRUCTIBLE.
9971 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
9973 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_COPYABLE.
9974 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
9976 * c-common.h (enum rid): Remove RID_IS_CONVERTIBLE_TO.
9977 * c-common.c (c_common_reswords): Remove __is_convertible_to.
9979 2014-09-24 Marek Polacek <polacek@redhat.com>
9983 * c-common.h (struct c_common_resword): Don't define CPP_KEYWORD.
9985 2014-09-23 Andi Kleen <ak@linux.intel.com>
9987 * c-common.c (handle_no_reorder_attribute): New function.
9988 (c_common_attribute_table): Add no_reorder attribute.
9990 2014-09-22 Joseph Myers <joseph@codesourcery.com>
9992 * c-cppbuiltin.c (c_cpp_builtins): Define
9993 __LIBGCC_*_EXCESS_PRECISION__ macros for supported floating-point
9996 2014-09-18 Joseph Myers <joseph@codesourcery.com>
9998 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_*_FUNC_EXT__
9999 for supported floating-point modes.
10001 2014-09-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
10003 * c.opt (Wpsabi): Use LangEnabledBy.
10004 * c-opts.c (c_common_handle_option): Do not handle here.
10006 2014-09-12 Joseph Myers <joseph@codesourcery.com>
10008 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_HAS_%s_MODE__
10009 macros for floating-point modes.
10011 2014-09-11 Marc Glisse <marc.glisse@inria.fr>
10014 * c-cppbuiltin.c (builtin_define_float_constants): Correct
10015 __*_DENORM_MIN__ without denormals.
10017 2014-09-10 Jakub Jelinek <jakub@redhat.com>
10019 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
10020 ubsan_instrument_vla, ubsan_instrument_return): Adjust
10021 ubsan_create_data callers.
10022 (ubsan_instrument_bounds): Don't emit UBSAN_BOUNDS at all if
10023 index is constant or BIT_AND_EXPR with constant mask and is
10024 small enough for the bound.
10025 * c-gimplify.c (ubsan_walk_array_refs_r): For ADDR_EXPR of
10026 ARRAY_REF, make sure the inner ARRAY_REF is not walked again.
10028 2014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
10030 * c.opt: Add CppReason to various flags.
10031 (Wdate-time): Re-sort.
10032 * c-common.c: Include c-common.h earlier.
10033 (struct reason_option_codes_t): Delete.
10034 (c_option_controlling_cpp_error): Prefix global type and struct
10037 2014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
10039 * c.opt (Wnormalized): New.
10040 (Wnormalized=): Use Enum and Reject Negative.
10041 * c-opts.c (c_common_handle_option): Do not handle Wnormalized here.
10043 2014-09-08 Joseph Myers <joseph@codesourcery.com>
10045 * c-cppbuiltin.c (c_cpp_builtins): Define macros for mantissa
10046 digits of floating-point modes if -fbuilding-libgcc.
10048 2014-09-05 Joseph Myers <joseph@codesourcery.com>
10050 * c-cppbuiltin.c (c_cpp_builtins): Also define
10051 __LIBGCC_EH_TABLES_CAN_BE_READ_ONLY__,
10052 __LIBGCC_EH_FRAME_SECTION_NAME__, __LIBGCC_JCR_SECTION_NAME__,
10053 __LIBGCC_CTORS_SECTION_ASM_OP__, __LIBGCC_DTORS_SECTION_ASM_OP__,
10054 __LIBGCC_TEXT_SECTION_ASM_OP__, __LIBGCC_INIT_SECTION_ASM_OP__,
10055 __LIBGCC_INIT_ARRAY_SECTION_ASM_OP__,
10056 __LIBGCC_STACK_GROWS_DOWNWARD__,
10057 __LIBGCC_DONT_USE_BUILTIN_SETJMP__,
10058 __LIBGCC_DWARF_ALT_FRAME_RETURN_COLUMN__,
10059 __LIBGCC_DWARF_FRAME_REGISTERS__,
10060 __LIBGCC_EH_RETURN_STACKADJ_RTX__, __LIBGCC_JMP_BUF_SIZE__,
10061 __LIBGCC_STACK_POINTER_REGNUM__ and
10062 __LIBGCC_VTABLE_USES_DESCRIPTORS__ for -fbuilding-libgcc.
10063 (builtin_define_with_value): Handle backslash-escaping in string
10066 2014-09-05 Richard Biener <rguenther@suse.de>
10068 PR middle-end/63148
10069 * c-format.c (check_format_arg): Properly handle
10070 effectively signed POINTER_PLUS_EXPR offset.
10072 2014-09-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
10074 * c.opt (Wc90-c99-compat,Wc++-compat,Wcomment,Wendif-labels,
10075 Winvalid-pch,Wlong-long,Wmissing-include-dirs,Wmultichar,Wpedantic,
10076 (Wdate-time,Wtraditional,Wundef,Wvariadic-macros): Add CPP, Var
10078 * c-opts.c (c_common_handle_option): Do not handle here.
10079 (sanitize_cpp_opts): Likewise.
10080 * c-common.c (struct reason_option_codes_t): Handle
10081 CPP_W_C90_C99_COMPAT and CPP_W_PEDANTIC.
10083 2014-09-03 Marek Polacek <polacek@redhat.com>
10085 * c.opt (Wlogical-not-parentheses): Enable by -Wall.
10087 2014-09-02 Jakub Jelinek <jakub@redhat.com>
10088 Balaji V. Iyer <balaji.v.iyer@intel.com>
10089 Igor Zamyatin <igor.zamyatin@intel.com>
10091 * c-cilkplus.c (cilk_for_number_of_iterations): New function.
10092 * c-common.c (c_common_reswords): Added _Cilk_for.
10093 * c-common.h (enum rid): Added RID_CILK_FOR.
10094 (cilk_for_number_of_iterations): Add declaration.
10095 * c-omp.c (c_finish_omp_for): Added checks for CILK_SIMD and
10097 * c-pragma.c (init_pragma): Register "grainsize" pragma.
10098 * c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_GRAINSIZE.
10100 2014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
10102 * c.opt (Wbuiltin-macro-redefined,Wdeprecated,Wendif-labels,
10103 Winvalid-pch,Wliteral-suffix,Wmissing-include-dirs,Wtrigraphs,
10104 Wundef): Use CPP, Var and Init.
10105 * c-opts.c (c_common_handle_option): Do not handle the above flags here.
10107 2014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
10109 * c.opt (Wbuiltin-macro-redefined): Use CPP, Var and Init.
10110 * c-opts.c (c_common_handle_option): Do not handle here.
10112 2014-08-25 Jason Merrill <jason@redhat.com>
10114 * c.opt: Change -std=c++1y and -std=gnu++1y to be aliases for
10115 -std=c++14 and -std=gnu++14, rather than the reverse.
10116 * c-opts.c (c_common_handle_option): Change OPT_std_c__1y and
10117 OPT_std_gnu__1y to OPT_std_c__14 and OPT_std_gnu__14.
10118 * c-common.h (cxx_dialect): Remove cxx1y.
10120 2014-08-23 Edward Smith-Rowland <3dw4rd@verizon.net>
10122 * c-common.h (enum cxx_dialect): Add cxx14.
10123 * c-opts.c (set_std_cxx1y): Rename to set_std_cxx14; Use cxx14.
10124 * c-ubsan.c (ubsan_instrument_shift): Change comment and logic from
10125 cxx_dialect == cxx11 || cxx_dialect == cxx1y to cxx_dialect >= cxx11.
10127 2014-08-22 Jason Merrill <jason@redhat.com>
10129 * c.opt (std=gnu++17): Fix alias.
10131 2014-08-22 Marek Polacek <polacek@redhat.com>
10134 * c-common.c (warn_logical_not_parentheses): Don't check LHS. Don't
10135 check for vector types. Drop LHS argument.
10136 * c-common.h (warn_logical_not_parentheses): Adjust.
10138 2014-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
10140 * c.opt (Wcomment): Use CPP, Var and LangEnabledBy.
10141 (Wmultichar): Likewise.
10142 (Wdate-time): Use C-family languages instead of Common. Use CPP
10144 * c-opts.c (c_common_handle_option): Do not handle the above
10146 (sanitize_cpp_opts): Likewise.
10148 2014-08-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
10151 * c-opts.c: Include tree-diagnostics.h.
10152 (c_diagnostic_finalizer): New.
10153 (c_common_initialize_diagnostics): Use it.
10155 2014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
10157 PR preprocessor/51303
10158 * c-common.c (struct reason_option_codes_t option_codes):
10159 Add CPP_W_MISSING_INCLUDE_DIRS. Sort alphabetically.
10161 2014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
10165 * c.opt (Wvariadic-macros): Use CPP and LangEnabledBy.
10166 * c-opts.c (c_common_handle_option): Call cpp_handle_option_auto.
10167 (c_common_post_options): Call init_global_opts_from_cpp.
10168 (sanitize_cpp_opts): Do not handle Wvariadic-macros here.
10170 2014-08-19 Marek Polacek <polacek@redhat.com>
10173 * c-common.c (maybe_warn_bool_compare): New function.
10174 * c-common.h (maybe_warn_bool_compare): Declare.
10175 * c.opt (Wbool-compare): New option.
10177 2014-08-19 Marek Polacek <polacek@redhat.com>
10179 * c.opt (Wc99-c11-compat): New option.
10181 2014-08-19 Marek Polacek <polacek@redhat.com>
10183 * c-opts.c (sanitize_cpp_opts): Make warn_long_long be set according
10184 to warn_c90_c99_compat.
10185 * c.opt (Wc90-c99-compat, Wdeclaration-after-statement): Initialize
10188 2014-08-19 Manuel López-Ibáñez <manu@gcc.gnu.org>
10189 Steven Bosscher <steven@gcc.gnu.org>
10192 * c-format.c: Add extra_arg_loc and format_string_loc to struct
10193 format_check_results.
10194 (check_function_format): Use true and add comment for boolean
10196 (finish_dollar_format_checking): Use explicit location when warning.
10197 (check_format_info): Likewise.
10198 (check_format_arg): Set extra_arg_loc and format_string_loc.
10199 (check_format_info_main): Use explicit location when warning.
10200 (check_format_types): Pass explicit location.
10201 (format_type_warning): Likewise.
10203 2014-08-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
10206 * c-format.c: Handle Fortran flags.
10208 2014-08-12 Igor Zamyatin <igor.zamyatin@intel.com>
10211 * array-notation-common.c (find_rank): Added handling for other
10212 types of references.
10214 2014-08-10 Marek Polacek <polacek@redhat.com>
10217 * c-opts.c (sanitize_cpp_opts): Pass warn_c90_c99_compat to libcpp.
10218 * c.opt (Wc90-c99-compat): Add option.
10220 2014-08-07 Trevor Saunders <tsaunders@mozilla.com>
10222 * c-gimplify.c, cilk.c: Remove includes of pointer-set.h.
10224 2014-08-03 Marek Polacek <polacek@redhat.com>
10226 * c-common.c (check_case_value): Add location_t parameter. Use it.
10227 (c_add_case_label): Pass loc to check_case_value.
10229 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
10231 * cilk.c: Use hash_map instead of pointer_map.
10233 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
10235 * c-gimplify.c: Use hash_set instead of pointer_set.
10237 2014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
10239 PR middle-end/61455
10240 * array-notation-common.c (extract_array_notation_exprs): Handling
10241 of DECL_EXPR added.
10243 2014-08-01 Jakub Jelinek <jakub@redhat.com>
10245 * c-common.h (min_align_of_type): Removed prototype.
10246 * c-common.c (min_align_of_type): Removed.
10247 * c-ubsan.h (ubsan_maybe_instrument_reference,
10248 ubsan_maybe_instrument_member_call): New prototypes.
10249 * c-ubsan.c: Include stor-layout.h and builtins.h.
10250 (ubsan_maybe_instrument_reference_or_call,
10251 ubsan_maybe_instrument_reference, ubsan_maybe_instrument_call): New
10254 2014-07-31 Marc Glisse <marc.glisse@inria.fr>
10257 * c.opt (-Wreturn-local-addr): Move to common.opt.
10259 2014-07-30 Jason Merrill <jason@redhat.com>
10264 * c.opt (-fuse-all-virtuals): New.
10266 2014-07-30 Tom Tromey <tromey@redhat.com>
10269 * c.opt (Wdesignated-init): New option.
10270 * c-common.c (c_common_attribute_table): Add "designated_init".
10271 (handle_designated_init): New function.
10273 2014-07-24 Marek Polacek <polacek@redhat.com>
10276 * c-opts.c (c_finish_options): If -imacros is in effect, return.
10278 2014-07-16 Dodji Seketeli <dodji@redhat.com>
10280 PR preprocessor/60723 - missing system-ness marks for macro tokens
10281 * c-ppoutput.c (struct print::prev_was_system_token): New data
10283 (init_pp_output): Initialize it.
10284 (maybe_print_line_1, maybe_print_line, print_line_1, print_line)
10285 (do_line_change): Return a flag saying if a line marker was
10287 (scan_translation_unit): Detect if the system-ness of the token we
10288 are about to emit is different from the one of the previously
10289 emitted token. If so, emit a line marker. Avoid emitting useless
10290 adjacent line markers. Avoid emitting line markers for tokens
10291 originating from the expansion of built-in macros.
10292 (scan_translation_unit_directives_only): Adjust.
10294 2014-07-15 Marek Polacek <polacek@redhat.com>
10296 * c-ubsan.c (ubsan_instrument_bounds): Don't instrument if
10297 TYPE_MAX_VALUE is NULL.
10299 2014-07-14 Jakub Jelinek <jakub@redhat.com>
10301 PR middle-end/61294
10302 * c.opt (Wmemset-transposed-args): New warning.
10304 2014-07-10 Jason Merrill <jason@redhat.com>
10308 * c.opt (-fuse-all-virtuals): New.
10310 2014-07-09 Richard Biener <rguenther@suse.de>
10313 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
10314 using unsigned arithmetic if overflow does not wrap instead of
10315 if overflow is undefined.
10317 2014-07-06 Marek Polacek <polacek@redhat.com>
10320 * c.opt (Wsizeof-array-argument): New option.
10322 2014-07-03 Jakub Jelinek <jakub@redhat.com>
10324 * c-ada-spec.c (dump_ada_nodes): Don't call qsort if
10325 comments->count <= 1, as comments->entries might be NULL.
10327 2014-07-01 Marek Polacek <polacek@redhat.com>
10329 * c.opt (Wint-conversion): New option.
10331 2014-07-01 Marek Polacek <polacek@redhat.com>
10334 * c.opt (Wincompatible-pointer-types): New option.
10336 2014-06-30 Paolo Carlini <paolo.carlini@oracle.com>
10339 * c-common.c (handle_noreturn_attribute, handle_const_attribute):
10340 Do not discard TYPE_QUALS of type.
10342 2014-06-26 Jason Merrill <jason@redhat.com>
10344 * c-common.h (enum cxx_dialect): Add cxx1z.
10345 * c.opt (std=c++1z, std=c++17, std=gnu++1z, std=gnu++17): New.
10346 * c-opts.c (c_common_handle_option, set_std_cxx1z): Handle it.
10348 2014-06-26 Teresa Johnson <tejohnson@google.com>
10350 * c-common.h (get_dump_info): Declare.
10351 * c-gimplify.c (c_genericize): Use saved dump files.
10352 * c-opts.c (c_common_parse_file): Begin and end dumps
10353 once around parsing invocation.
10354 (get_dump_info): New function.
10356 2014-06-23 Marek Polacek <polacek@redhat.com>
10357 Andrew MacLeod <amacleod@redhat.com>
10360 * c-common.c (get_atomic_generic_size): Don't segfault if the
10361 type doesn't have a size.
10363 2014-06-20 Marek Polacek <polacek@redhat.com>
10365 * c-gimplify.c: Include "c-ubsan.h" and "pointer-set.h".
10366 (ubsan_walk_array_refs_r): New function.
10367 (c_genericize): Instrument array bounds.
10368 * c-ubsan.c: Include "internal-fn.h".
10369 (ubsan_instrument_division): Mark instrumented arrays as having
10370 side effects. Adjust ubsan_type_descriptor call.
10371 (ubsan_instrument_shift): Likewise.
10372 (ubsan_instrument_vla): Adjust ubsan_type_descriptor call.
10373 (ubsan_instrument_bounds): New function.
10374 (ubsan_array_ref_instrumented_p): New function.
10375 (ubsan_maybe_instrument_array_ref): New function.
10376 * c-ubsan.h (ubsan_instrument_bounds): Declare.
10377 (ubsan_array_ref_instrumented_p): Declare.
10378 (ubsan_maybe_instrument_array_ref): Declare.
10380 2014-06-20 Hale Wang <hale.wang@arm.com>
10383 * c.opt (fshort-enums): Add to LTO.
10384 * c.opt (fshort-wchar): Likewise.
10386 2014-06-16 Marek Polacek <polacek@redhat.com>
10389 * c.opt (Wswitch-bool): Add Var.
10391 2014-06-12 Jakub Jelinek <jakub@redhat.com>
10393 PR middle-end/61486
10394 * c-omp.c (c_omp_split_clauses): Don't crash on firstprivate in
10395 #pragma omp target teams or
10396 #pragma omp {,target }teams distribute simd.
10398 2014-06-12 Jason Merrill <jason@redhat.com>
10400 * c.opt (Wabi=, fabi-compat-version): New.
10401 * c-opts.c (c_common_handle_option): Handle -Wabi=.
10402 (c_common_post_options): Handle flag_abi_compat_version default.
10403 Disallow -fabi-compat-version=1.
10404 * c-common.h (abi_version_crosses): New.
10406 2014-06-11 Jan Hubicka <hubicka@ucw.cz>
10408 * c-common.c (handle_section_attribute): Update handling for
10409 section names that are no longer trees.
10411 2014-06-10 Jakub Jelinek <jakub@redhat.com>
10414 * c-pragma.c (omp_pragmas_simd): Move PRAGMA_OMP_TASK...
10415 (omp_pragmas): ... back here.
10417 2014-06-05 Marek Polacek <polacek@redhat.com>
10420 * c-common.c (warn_logical_not_parentheses): New function.
10421 * c-common.h (warn_logical_not_parentheses): Declare.
10422 * c.opt (Wlogical-not-parentheses): New option.
10424 2014-06-04 Marek Polacek <polacek@redhat.com>
10427 * c-common.c (check_case_bounds): Add location parameter.
10429 (c_add_case_label): Pass loc to check_case_bounds.
10431 2014-06-03 Marek Polacek <polacek@redhat.com>
10434 * c.opt (Wswitch-bool): New option.
10436 2014-05-22 Thomas Schwinge <thomas@codesourcery.com>
10438 * c-common.h (c_omp_sharing_predetermined, c_omp_remap_decl):
10440 (record_types_used_by_current_var_decl): Move prototype to where
10443 * c-common.c (DEF_FUNCTION_TYPE_0, DEF_FUNCTION_TYPE_6)
10444 (DEF_FUNCTION_TYPE_7, DEF_FUNCTION_TYPE_8)
10445 (DEF_FUNCTION_TYPE_VAR_5): Cosmetic fixes.
10447 2014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
10449 * c-common.h (CTI_VOID_ZERO, void_zero_node): Delete.
10450 * c-common.c (c_common_nodes_and_builtins): Don't initialize
10452 * c-pretty-print.c (pp_c_void_constant): New function.
10453 (c_pretty_printer::constant, c_pretty_printer::primary_expression)
10454 (c_pretty_printer::expression): Handle VOID_CST.
10455 * cilk.c (extract_free_variables): Likewise.
10456 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift)
10457 (ubsan_instrument_vla): Use void_node instead of void_zero_node.
10459 2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
10461 * c-common.h (sorted_fields_type): Remove variable_size GTY attribute.
10462 * c-pragma.c (push_alignment): Adjust.
10463 (handle_pragma_push_options): Likewise.
10465 2014-05-09 Marek Polacek <polacek@redhat.com>
10468 * c-common.c (check_user_alignment): Return -1 if alignment is error
10470 (handle_aligned_attribute): Don't call default_conversion on
10472 (handle_vector_size_attribute): Likewise.
10473 (handle_tm_wrap_attribute): Handle case when wrap_decl is error node.
10474 (handle_sentinel_attribute): Call default_conversion and allow even
10475 integral types as an argument.
10477 2014-05-08 Marek Polacek <polacek@redhat.com>
10480 * c-common.c (min_align_of_type): New function factored out from...
10481 (c_sizeof_or_alignof_type): ...here.
10482 * c-common.h (min_align_of_type): Declare.
10484 2014-05-08 Marek Polacek <polacek@redhat.com>
10487 * c-common.c (check_main_parameter_types): Warn for _Atomic-qualified
10488 parameter type of main.
10490 2014-05-07 DJ Delorie <dj@redhat.com>
10492 * c-cppbuiltin.c (print_bits_of_hex): New.
10493 (builtin_define_type_minmax): Print values using hex so as not to
10494 require a pre-computed list of string values.
10496 2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
10497 Mike Stump <mikestump@comcast.net>
10498 Richard Sandiford <rdsandiford@googlemail.com>
10500 * c-ada-spec.c: Include wide-int.h.
10501 (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Remove.
10502 (dump_generic_ada_node): Use wide-int interfaces.
10503 * c-common.c: Include wide-int-print.h.
10504 (shorten_compare): Use wide-int interfaces and tree_int_cst_lt.
10505 (pointer_int_sum): Use wide-int interfaces.
10506 (c_common_nodes_and_builtins): Use make_int_cst.
10507 (match_case_to_enum_1): Use tree_fits_uhwi_p and tree_fits_shwi_p.
10508 (handle_alloc_size_attribute): Use wide-int interfaces.
10509 (get_nonnull_operand): Likewise.
10510 * c-format.c (get_constant): Use tree_fits_uhwi_p.
10511 * c-lex.c: Include wide-int.h.
10512 (narrowest_unsigned_type): Take a widest_int rather than two
10514 (narrowest_signed_type): Likewise.
10515 (interpret_integer): Update accordingly. Use wide-int interfaces.
10516 (lex_charconst): Use wide-int interfaces.
10517 * c-pretty-print.c: Include wide-int.h.
10518 (pp_c_integer_constant): Use wide-int interfaces.
10519 * cilk.c (declare_one_free_variable): Use tree_int_cst_lt instead of
10520 INT_CST_LT_UNSIGNED.
10522 2014-05-06 Richard Biener <rguenther@suse.de>
10524 * c-opts.c (c_common_post_options): For -freestanding,
10525 -fno-hosted and -fno-builtin disable pattern recognition
10526 if not enabled explicitely.
10528 2014-05-02 Marek Polacek <polacek@redhat.com>
10530 * c.opt (Wsizeof-pointer-memaccess): Describe option.
10532 2014-05-01 Marek Polacek <polacek@redhat.com>
10535 * c.opt (Wdiscarded-qualifiers): Add.
10537 2014-04-30 Marek Polacek <polacek@redhat.com>
10539 * c-ubsan.c (ubsan_instrument_division): Handle REAL_TYPEs. Perform
10540 INT_MIN / -1 sanitization only for integer types.
10542 2014-04-25 Marek Polacek <polacek@redhat.com>
10545 * c-common.c (handle_noinline_attribute): Warn if the attribute
10546 conflicts with always_inline attribute.
10547 (handle_always_inline_attribute): Warn if the attribute conflicts
10548 with noinline attribute.
10550 2014-04-25 Marek Polacek <polacek@redhat.com>
10553 * c-common.c (check_main_parameter_types): Warn about variadic main.
10555 2014-04-24 Mike Stump <mikestump@comcast.net>
10557 * c.opt (Wshadow-ivar): Default to on.
10559 2014-04-24 Dimitris Papavasiliou <dpapavas@gmail.com>
10561 * c.opt (Wshadow-ivar, flocal-ivars, fivar-visibility): Add.
10563 2014-04-23 Marek Polacek <polacek@redhat.com>
10565 * c-common.c (handle_tm_wrap_attribute): Tweak error message.
10567 2014-04-22 Jakub Jelinek <jakub@redhat.com>
10570 * c-ubsan.c (ubsan_instrument_return): Return __builtin_trap ()
10571 if flag_sanitize_undefined_trap_on_error.
10572 (ubsan_instrument_division, ubsan_instrument_shift,
10573 ubsan_instrument_vla): Likewise. Use __ubsan_handle_*_abort ()
10574 if !flag_sanitize_recover.
10576 2014-04-22 Marc Glisse <marc.glisse@inria.fr>
10579 * c-common.c (registered_builtin_types): Make non-static.
10580 * c-common.h (registered_builtin_types): Declare.
10582 2014-04-14 Richard Biener <rguenther@suse.de>
10583 Marc Glisse <marc.glisse@inria.fr>
10586 * c-common.c (convert_vector_to_pointer_for_subscript): Properly
10587 apply may-alias the scalar pointer type when applicable.
10589 2014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
10591 PR middle-end/60467
10592 * cilk.c (cilk_set_spawn_marker): Remove FUNCTION_DECL
10593 as possible argument for Cilk_spawn.
10595 2014-04-11 Tobias Burnus <burnus@net-b.de>
10598 * c.opt (Wformat-signedness): Add
10599 * c-format.c(check_format_types): Use it.
10601 2014-04-11 Jason Merrill <jason@redhat.com>
10604 * c-common.c (sync_resolve_size, get_atomic_generic_size): Call
10605 default_conversion for an array argument.
10607 2014-04-08 Marek Polacek <polacek@redhat.com>
10610 * c-ubsan.c: Include asan.h.
10611 (ubsan_instrument_return): Call initialize_sanitizer_builtins.
10613 2014-04-03 Nathan Sidwell <nathan@codesourcery.com>
10615 * c.opt (Wnon-virtual-dtor): Auto set when Weffc++.
10617 2014-04-02 Marek Polacek <polacek@redhat.com>
10619 * c-common.h (c_expand_expr): Remove declaration.
10621 2014-03-28 Jakub Jelinek <jakub@redhat.com>
10624 * c-common.c (add_atomic_size_parameter): When creating new
10625 params vector, push the size argument first.
10627 2014-03-26 Jakub Jelinek <jakub@redhat.com>
10629 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
10630 ubsan_instrument_vla, ubsan_instrument_return): Adjust
10631 ubsan_create_data callers.
10633 2014-03-22 Jakub Jelinek <jakub@redhat.com>
10636 * c-opts.c (c_finish_options): Restore cb_file_change call to
10639 2014-03-13 Jakub Jelinek <jakub@redhat.com>
10641 PR middle-end/36282
10642 * c-pragma.c (apply_pragma_weak): Only look at
10643 TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl)) if
10644 DECL_ASSEMBLER_NAME_SET_P (decl).
10645 (maybe_apply_pending_pragma_weaks): Exit early if
10646 vec_safe_is_empty (pending_weaks) rather than only when
10648 (maybe_apply_pragma_weak): Likewise. If !DECL_ASSEMBLER_NAME_SET_P,
10649 set assembler name back to NULL afterwards.
10651 2014-03-11 Jason Merrill <jason@redhat.com>
10653 * c.opt: Add -std=gnu++14.
10655 2014-03-11 Ian Bolton <ian.bolton@arm.com>
10657 * c-opts.c (c_common_post_options): Don't override
10658 -ffp-contract=fast if unsafe-math-optimizations is on.
10660 2014-03-08 Paulo Matos <paulo@matos-sorge.com>
10662 * c.opt: Enable LTO FE for fshort-double.
10664 2014-03-07 Jason Merrill <jason@redhat.com>
10666 * c.opt: Add -std=c++14.
10668 2014-03-06 Marek Polacek <polacek@redhat.com>
10671 * cilk.c (contains_cilk_spawn_stmt): New function.
10672 (contains_cilk_spawn_stmt_walker): Likewise.
10673 (recognize_spawn): Give error on invalid use of _Cilk_spawn.
10674 * c-common.h (contains_cilk_spawn_stmt): Add declaration.
10676 2014-03-03 Jakub Jelinek <jakub@redhat.com>
10678 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_SIMD.
10679 (init_pragma): Call cpp_register_deferred_pragma for PRAGMA_CILK_SIMD
10680 even when flag_preprocess_only.
10682 2014-02-26 Jason Merrill <jason@redhat.com>
10686 * c-common.c (shorten_compare): Don't check
10687 c_inhibit_evaluation_warnings.
10689 2014-02-19 Jakub Jelinek <jakub@redhat.com>
10692 * c-common.c (c_common_nodes_and_builtins): When initializing
10693 c_uint{16,32,64}_type_node, also set corresponding
10694 uint{16,32,64}_type_node to the same value.
10697 * c-pragma.c (init_pragma): Don't call cpp_register_deferred_pragma
10698 for PRAGMA_IVDEP if flag_preprocess_only.
10700 2014-02-12 Jakub Jelinek <jakub@redhat.com>
10703 * c-common.c (merge_tlist): If copy is true, call new_tlist,
10704 if false, add ADD itself, rather than vice versa.
10705 (verify_tree): For COND_EXPR, don't call merge_tlist with non-zero
10706 copy. For SAVE_EXPR, only call merge_tlist once.
10708 2014-02-08 Jakub Jelinek <jakub@redhat.com>
10710 PR middle-end/60092
10711 * c-common.c (handle_alloc_size_attribute): Use tree_fits_uhwi_p
10713 (handle_alloc_align_attribute, handle_assume_aligned_attribute): New
10715 (c_common_attribute_table): Add alloc_align and assume_aligned
10718 2014-02-06 Marek Polacek <polacek@redhat.com>
10721 * c-common.c (warn_for_sign_compare): Call warning_at with location
10722 instead of warning.
10724 2014-02-05 Marek Polacek <polacek@redhat.com>
10727 * c-omp.c (c_finish_omp_atomic): Remove unreachable return
10730 2014-02-04 Marek Polacek <polacek@redhat.com>
10733 * c-common.c (conversion_warning): Unwrap C_MAYBE_CONST_EXPR and/or
10736 2014-02-03 Marc Glisse <marc.glisse@inria.fr>
10740 * c-common.c (handle_aligned_attribute, handle_alloc_size_attribute,
10741 handle_vector_size_attribute, handle_nonnull_attribute): Call
10742 default_conversion on the attribute argument.
10743 (handle_nonnull_attribute): Increment the argument number.
10745 2014-01-31 Marek Polacek <polacek@redhat.com>
10748 * c-common.c (add_atomic_size_parameter): Pass vNULL to
10749 build_function_call_vec.
10750 (resolve_overloaded_builtin): Likewise.
10751 * c-common.h (build_function_call_vec): Adjust declaration.
10753 2014-01-30 Marek Polacek <polacek@redhat.com>
10756 * c-common.h (unsafe_conversion_p): Adjust declaration.
10757 (warnings_for_convert_and_check): Likewise.
10758 (convert_and_check): Likewise.
10759 * c-common.c (unsafe_conversion_p): Add location parameter. Call
10760 expansion_point_location_if_in_system_header on it.
10761 (warnings_for_convert_and_check): Add location parameter. Call
10762 expansion_point_location_if_in_system_header on it. Use it.
10763 (convert_and_check): Add location parameter. Use it.
10764 (conversion_warning): Likewise.
10765 (c_add_case_label): Adjust convert_and_check calls.
10766 (scalar_to_vector): Adjust unsafe_conversion_p calls.
10768 2014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
10770 * c-common.c (c_define_builtins): Replaced flag_enable_cilkplus with
10772 * c-pragma.c (init_pragma): Likewise.
10775 2014-01-23 Marek Polacek <polacek@redhat.com>
10778 * c-common.c (shorten_compare): Add location_t parameter.
10779 * c-common.h (shorten_binary_op): Adjust declaration.
10781 2014-01-23 Marek Polacek <polacek@redhat.com>
10784 * c-common.c (pointer_to_zero_sized_aggr_p): New function.
10785 * c-common.h: Declare it.
10787 2014-01-20 Eric Botcazou <ebotcazou@adacore.com>
10789 * c-ada-spec.h (dump_ada_specs): Revert prototype change.
10790 * c-ada-spec.c (dump_ads): Likewise.
10791 (cpp_check): Likewise.
10792 (dump_ada_specs): Likewise.
10794 2014-01-15 Laurent Alfonsi <laurent.alfonsi@st.com>
10797 * c-common.c (handle_no_instrument_function_attribute): Allow
10798 no_instrument_function attribute in class member
10799 definition/declaration.
10801 2014-01-15 Jakub Jelinek <jakub@redhat.com>
10804 * c-omp.c (c_finish_omp_atomic): Set in_late_binary_op around
10805 build_modify_expr with non-NOP_EXPR opcode. Handle return from it
10806 being COMPOUND_EXPR.
10807 (c_finish_omp_for): Handle incr being COMPOUND_EXPR with first
10808 operand a SAVE_EXPR and second MODIFY_EXPR.
10810 2014-01-09 Jakub Jelinek <jakub@redhat.com>
10813 * c-pch.c (c_common_write_pch): Call
10814 prepare_target_option_nodes_for_pch.
10816 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
10818 Update copyright years
10820 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
10822 * array-notation-common.c, c-cilkplus.c: Use the standard form for
10823 the copyright notice.
10825 2013-12-28 Eric Botcazou <ebotcazou@adacore.com>
10827 * c-ada-spec.c (print_constructor): New function.
10828 (print_destructor): Retrieve the origin of the destructor.
10829 (print_ada_declaration): Revamp handling of constructors/destructors.
10831 2013-12-23 Stuart Hastings <stuart@apple.com>
10832 Bill Maddox <maddox@google.com>
10833 Jason Merrill <jason@redhat.com>
10835 * c.opt: Add -fdeclone-ctor-dtor.
10836 * c-opts.c (c_common_post_options): Default to on iff -Os.
10838 2013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
10840 * c-common.c (c_common_attribute_table): Added "cilk simd function"
10842 * c-pragma.h (enum pragma_cilk_clause): Remove.
10843 (enum pragma_omp_clause): Added the following fields:
10844 PRAGMA_CILK_CLAUSE_NOMASK, PRAGMA_CILK_CLAUSE_MASK,
10845 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_NONE,
10846 PRAGMA_CILK_CLAUSE_LINEAR, PRAGMA_CILK_CLAUSE_PRIVATE,
10847 PRAGMA_CILK_CLAUSE_FIRSTPRIVATE, PRAGMA_CILK_CLAUSE_LASTPRIVATE,
10848 PRAGMA_CILK_CLAUSE_UNIFORM.
10851 2013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
10853 * cilk.c (cilk_outline): Made this function non-static.
10854 (gimplify_cilk_spawn): Removed pre_p and post_p arguments.
10855 (create_cilk_wrapper): Added a new parameter: a function pointer.
10856 (c_install_body_w_frame_cleanup): Remove
10857 (extract_free_variables): Added VEC_INIT_EXPR and CONSTRUCTOR case.
10858 * c-common.h (cilk_outline): New prototype.
10859 (gimplify_cilk_spawn): Removed two parameters.
10860 (cilk_install_body_with_frame_cleanup): New prototype.
10861 * c-gimplify.c (c_gimplify_expr): Added MODIFY_EXPR, CALL_EXPR and
10862 CILK_SPAWN_STMT case.
10864 2013-12-11 Bernd Schmidt <bernds@codesourcery.com>
10866 * c-common.c (c_fully_fold_internal): Handle ADDR_SPACE_CONVERT_EXPR.
10868 * c-common.h (enum c_tree_index): Remove CTI_INT_ARRAY_TYPE.
10869 (int_array_type_node): Remove.
10870 * c-common.c (c_common_nodes_and_builtins): Don't build it.
10872 2013-12-05 Marek Polacek <polacek@redhat.com>
10875 * c-common.c (c_sizeof_or_alignof_type): Move a declaration into
10876 [ADJUST_FIELD_ALIGN].
10878 2013-12-04 Joseph Myers <joseph@codesourcery.com>
10881 * c-common.c (c_sizeof_or_alignof_type): Add parameter min_alignof
10882 and check field alignment if set.
10883 * c-common.h (c_sizeof_or_alignof_type): Update prototype.
10884 (c_sizeof, c_alignof): Update calls to c_sizeof_or_alignof_type.
10886 2013-12-04 Jakub Jelinek <jakub@redhat.com>
10887 Marek Polacek <polacek@redhat.com>
10889 * c-gimplify.c (c_gimplify_expr): If doing the integer-overflow
10890 sanitization, call unsigned_type_for only when !TYPE_OVERFLOW_WRAPS.
10892 2013-11-29 H.J. Lu <hongjiu.lu@intel.com>
10895 * cilk.c (gimplify_cilk_spawn): Properly handle function without
10898 2013-11-29 Jakub Jelinek <jakub@redhat.com>
10901 * c-common.c (get_priority): If TREE_VALUE (args) is IDENTIFIER_NODE,
10902 goto invalid. If it is error_mark_node, don't issue further
10905 2013-11-28 Sergey Ostanevich <sergos.gnu@gmail.com>
10907 * c.opt (Wopenmp-simd): New.
10909 2013-11-22 Jakub Jelinek <jakub@redhat.com>
10911 * c-ubsan.h (ubsan_instrument_return): New prototype.
10912 * c-ubsan.c (ubsan_instrument_return): New function.
10914 2013-11-22 Andrew MacLeod <amacleod@redhat.com>
10916 * c-common.c: Add required include files from gimple.h.
10917 * c-gimplify.c: Likewise.
10918 * cilk.c: Likewise.
10920 2013-11-22 David Malcolm <dmalcolm@redhat.com>
10922 * c-common.c (unsafe_conversion_p): Remove use of
10923 EXPR_LOC_OR_HERE macro.
10924 (conversion_warning): Likewise.
10925 (warnings_for_convert_and_check): Likewise.
10926 (warn_for_collisions_1): Likewise.
10927 (shorten_compare): Likewise, and remove use of in_system_header
10928 macro, using the location from the former.
10929 * c-lex.c (dump_one_header): Remove use of input_filename macro.
10930 (cb_def_pragma): Remove use of in_system_header macro.
10931 (lex_string): Likewise.
10932 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
10934 2013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
10935 Mike Stump <mikestump@comcast.net>
10936 Richard Sandiford <rdsandiford@googlemail.com>
10938 * c-ada-spec.c (is_simple_enum): Use tree_to_shwi and tree_to_uhwi
10939 instead of TREE_INT_CST_LOW, in cases where there is a protecting
10940 tree_fits_shwi_p or tree_fits_uhwi_p.
10941 (dump_generic_ada_node): Likewise.
10942 * c-format.c (check_format_arg): Likewise.
10943 * c-pretty-print.c (pp_c_integer_constant): Likewise.
10945 2013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
10947 * c-common.c (check_function_arguments_recurse): Use tree_to_uhwi.
10949 2013-11-19 Joshua J Cogliati <jrincayc@yahoo.com>
10952 * c-common.c (unsafe_conversion_p): Make this function
10953 return an enumeration with more detail.
10954 (conversion_warning): Use the new return type of
10955 unsafe_conversion_p to separately warn either about conversions
10956 that lower floating point number precision or about the other
10957 kinds of conversions.
10958 * c-common.h (enum conversion_safety): New enumeration.
10959 (unsafe_conversion_p): switching return type to
10960 conversion_safety enumeration.
10961 * c.opt: Adding new warning -Wfloat-conversion and
10962 enabling it with -Wconversion.
10964 2013-11-19 Basile Starynkevitch <basile@starynkevitch.net>
10966 * c-opts.c: Include plugin.h.
10967 (cb_file_change): Invoke plugin event PLUGIN_INCLUDE_FILE.
10969 2013-11-19 Marek Polacek <polacek@redhat.com>
10971 * c-ubsan.c (ubsan_instrument_division): Adjust ubsan_create_data
10973 (ubsan_instrument_shift): Likewise.
10974 (ubsan_instrument_vla): Likewise.
10976 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
10978 * c-common.c (convert_vector_to_pointer_for_subscript): Remove
10979 cast to unsigned type.
10981 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
10983 * c-common.c (fold_offsetof_1): Use tree_to_uhwi rather than
10985 (complete_array_type): Update comment to refer to tree_to_[su]hwi
10986 rather than tree_low_cst.
10988 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
10990 * c-common.c, c-cppbuiltin.c: Replace tree_low_cst (..., 1) with
10991 tree_to_uhwi throughout.
10993 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
10995 * c-common.c, c-format.c, c-omp.c, c-pretty-print.c: Replace
10996 tree_low_cst (..., 0) with tree_to_shwi throughout.
10998 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
11000 * c-ada-spec.c, c-common.c, c-pretty-print.c: Replace
11001 host_integerp (..., 1) with tree_fits_uhwi_p throughout.
11003 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
11005 * c-ada-spec.c, c-common.c, c-format.c, c-pretty-print.c: Replace
11006 host_integerp (..., 0) with tree_fits_shwi_p throughout.
11008 2013-11-15 Aldy Hernandez <aldyh@redhat.com>
11010 * c-cilkplus.c: New file.
11011 * c-common.c (readonly_error): Add location argument.
11012 * c-common.h (readonly_error): Same.
11013 (c_finish_cilk_clauses): Protoize.
11014 (c_check_cilk_loop): Same.
11015 c-omp.c (c_finish_omp_for): Handle CILK_SIMD nodes.
11016 Do not fail on error_mark_node.
11017 Abstract increment canonicalization to here...
11018 (c_omp_for_incr_canonicalize_ptr): New.
11019 c-pragma.c (init_pragma): Register "simd" pragma.
11020 c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_SIMD.
11021 (enum pragma_cilk_clause): New.
11023 2013-11-15 Richard Sandiford <rdsandiford@googlemail.com>
11025 * c-pretty-print.c (pp_c_character_constant): Remove unnecessary
11026 wchar_type and host_integerp checks.
11028 2013-11-14 Andrew MacLeod <amacleod@redhat.com>
11030 * c-common.c: Likewise.
11031 * c-gimplify.c: Likewise.
11032 * cilk.c: Likewise.
11034 2013-11-14 Diego Novillo <dnovillo@google.com>
11036 * c-common.c: Include fold-const.h.
11037 Include stor-layout.h.
11039 Include stringpool.h.
11042 Include trans-mem.h.
11043 * c-cppbuiltin.c: Include stor-layout.h.
11044 Include stringpool.h.
11045 * c-format.c: Include stringpool.h.
11046 * c-lex.c: Include stringpool.h.
11047 Include stor-layout.h.
11048 * c-pragma.c: Include stringpool.h.
11051 Include gcc-symtab.h.
11052 * c-pretty-print.c: Include stor-layout.h.
11054 * cilk.c: Include stringpool.h.
11057 2013-11-13 Joseph Myers <joseph@codesourcery.com>
11059 * c-common.h (enum rid): Add RID_AUTO_TYPE.
11060 * c-common.c (c_common_reswords): Add __auto_type.
11061 (keyword_begins_type_specifier): Handle RID_AUTO_TYPE.
11063 2013-11-12 Andrew MacLeod <amacleod@redhat.com>
11065 * c-common.c: Include gimplify.h.
11066 * c-gimplify.c: Likewise.
11067 * cilk.c: Likewise.
11068 * c-omp.c: Include gimple-expr.h instead of gimple.h.
11069 * c-ubsan.c: Don't include gimple.h.
11071 2013-11-12 Joseph Myers <joseph@codesourcery.com>
11073 * c-common.c (c_common_reswords): Add _Thread_local.
11075 2013-11-09 Joseph Myers <joseph@codesourcery.com>
11077 * c-common.c (atomic_size_supported_p): New function.
11078 (resolve_overloaded_atomic_exchange)
11079 (resolve_overloaded_atomic_compare_exchange)
11080 (resolve_overloaded_atomic_load, resolve_overloaded_atomic_store):
11081 Use it instead of comparing size with a local list of sizes.
11083 2013-11-07 Andrew MacLeod <amacleod@redhat.com>
11084 Joseph Myers <joseph@codesourcery.com>
11086 * c-common.h (enum rid): Add RID_ATOMIC.
11087 * c-common.c (c_common_reswords): Add _Atomic.
11088 (sync_resolve_params): Use TYPE_MAIN_VARIANT on pointer argument.
11089 (keyword_is_type_qualifier): Accept RID_ATOMIC.
11090 * c-format.c (check_format_types): Check for extra _Atomic
11091 qualifiers in format argument.
11092 * c-pretty-print.c (pp_c_cv_qualifiers): Handle atomic qualifier.
11093 (pp_c_type_qualifier_list): Mention _Atomic in comment.
11095 2013-11-06 Tobias Burnus <burnus@net-b.de>
11097 * c-common.c (reason_option_codes_t): Add CPP_W_DATE_TIME.
11099 2013-11-06 Joseph Myers <joseph@codesourcery.com>
11101 * c-opts.c (c_common_post_options): Set -ffp-contract=off in C
11103 * c-cppbuiltin.c (cpp_iec_559_value): Consider -ffp-contract=fast
11104 to mean lack of IEEE 754 support.
11106 2013-11-05 Tobias Burnus <burnus@net-b.de>
11108 * c.opt (-Wdate-time): New option
11109 * c-opts.c (sanitize_cpp_opts): Pass on to libcpp.
11111 2013-11-05 Joseph Myers <joseph@codesourcery.com>
11113 * c-cppbuiltin.c (cpp_iec_559_value): Test
11114 flag_excess_precision_cmdline not flag_excess_precision.
11116 2013-11-05 Tobias Burnus <burnus@net-b.de>
11118 * c.opt (fopenmp-simd): New option.
11119 * c-pragma.c (omp_pragmas): Move pragmas which can contain simd to ...
11120 (omp_pragmas): ... this new struct.
11121 (c_pp_lookup_pragma): Also walk omp_pragmas.
11122 (init_pragma): Init pragmas for -fopenmp-simd.
11124 2013-11-04 Marek Polacek <polacek@redhat.com>
11127 * c-common.c (invalid_indirection_error): Handle RO_ARROW_STAR case.
11129 2013-11-04 Joseph Myers <joseph@codesourcery.com>
11131 * c-cppbuiltin.c (cpp_iec_559_value, cpp_iec_559_complex_value):
11133 (c_cpp_builtins): Define __GCC_IEC_559 and __GCC_IEC_559_COMPLEX.
11135 2013-11-04 Eric Botcazou <ebotcazou@adacore.com>
11137 * c-ada-spec.h (cpp_operation): Add IS_TRIVIAL.
11138 (dump_ada_specs): Adjust prototype of second callback.
11139 * c-ada-spec.c (cpp_check): New global variable.
11140 (dump_ada_nodes): Remove cpp_check parameter and do not pass it down.
11141 (print_generic_ada_decl): Likewise.
11142 (has_static_fields): Change return type to bool and add guard.
11143 (has_nontrivial_methods): New predicate.
11144 (is_tagged_type): Change return type to bool.
11145 (separate_class_package): Call has_nontrivial_methods.
11146 (pp_ada_tree_identifier): Minor tweaks.
11147 (dump_ada_function_declaration): Adjust calls to dump_generic_ada_node.
11148 (dump_ada_array_domains): Likewise.
11149 (dump_ada_array_type): Likewise.
11150 (dump_template_types): Remove cpp_check parameter and do not pass it to
11151 dump_generic_ada_node.
11152 (dump_ada_template): Likewise.
11153 (dump_generic_ada_node): Remove cpp_check parameter and do not pass it
11155 (print_ada_methods): Change return type to integer. Remove cpp_check
11156 parameter and do not pass it down.
11157 (dump_nested_types): Remove cpp_check parameter and do not pass it to
11158 dump_generic_ada_node.
11159 (print_ada_declaration): Likewise. Test RECORD_OR_UNION_TYPE_P before
11161 (print_ada_struct_decl): Remove cpp_check parameter and do not pass it
11162 down. Use has_nontrivial_methods to recognize C++ classes. Use return
11163 value of print_ada_methods.
11164 (dump_ads): Rename cpp_check parameter to check and adjust prototype.
11165 Set cpp_check to it before invoking dump_ada_nodes.
11166 (dump_ada_specs): Likewise.
11168 2013-11-03 Marek Polacek <polacek@redhat.com>
11170 * c-ubsan.c: Don't include hash-table.h.
11171 (ubsan_instrument_vla): New function.
11172 * c-ubsan.h: Declare it.
11174 2013-10-31 David Malcolm <dmalcolm@redhat.com>
11176 Automated part of renaming of symtab_node_base to symtab_node.
11178 Patch autogenerated by rename_symtab.py from
11179 https://github.com/davidmalcolm/gcc-refactoring-scripts
11180 revision 58bb219cc090b2f4516a9297d868c245495ee622
11182 * c-pragma.c (maybe_apply_pending_pragma_weaks): Rename
11183 symtab_node_base to symtab_node.
11185 2013-10-31 Edward Smith-Rowland <3dw4rd@verizon.net>
11187 Implement C++14 digit separators.
11188 * c-lex.c (interpret_float): Remove digit separators from scratch string
11189 before building real literal.
11191 2013-10-30 Jakub Jelinek <jakub@redhat.com>
11193 * cilk.c (create_cilk_helper_decl): Use HOST_WIDE_INT_PRINT_DEC.
11195 2013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
11197 * c-common.c (c_common_reswords[]): Added _Cilk_spawn and _Cilk_sync
11199 (c_define_builtins): Called cilk_init_builtins if Cilk Plus is
11201 * c-common.h (enum rid): Added RID_CILK_SPAWN and RID_CILK_SYNC.
11202 (insert_cilk_frame): New prototype.
11203 (cilk_init_builtins): Likewise.
11204 (gimplify_cilk_spawn): Likewise.
11205 (c_cilk_install_body_w_frame_cleanup): Likewise.
11206 (cilk_detect_spawn_and_unwrap): Likewise.
11207 (cilk_set_spawn_marker): Likewise.
11208 (build_cilk_sync): Likewise.
11209 (build_cilk_spawn): Likewise.
11210 * cilk.c: New file.
11212 2013-10-29 David Malcolm <dmalcolm@redhat.com>
11214 Patch autogenerated by refactor_symtab.py from
11215 https://github.com/davidmalcolm/gcc-refactoring-scripts
11216 revision 58bb219cc090b2f4516a9297d868c245495ee622
11218 * c-gimplify.c (c_genericize): Update for conversion of symtab types
11219 to a true class hierarchy.
11220 * c-pragma.c (maybe_apply_pending_pragma_weaks): Likewise.
11222 2013-10-27 Richard Sandiford <rdsandiford@googlemail.com>
11224 * c-lex.c (interpret_integer): Remove call to cpp_num_sign_extend.
11226 2013-10-26 Jeff Law <law@redhat.com>
11228 * c-common.c (c_define_builtins): Remove mudflap support.
11229 * c.opt: Ignore and warn for mudflap options.
11231 2013-10-24 Tobias Burnus <burnus@net-b.de>
11234 * c-pragma.c (init_pragma) Add #pragma ivdep handling.
11235 * c-pragma.h (pragma_kind): Add PRAGMA_IVDEP.
11237 2013-10-23 Jason Merrill <jason@redhat.com>
11239 * c-format.c (gcc_cxxdiag_char_table): Add %X.
11241 2013-10-11 Jakub Jelinek <jakub@redhat.com>
11243 * c-common.h (omp_clause_mask::operator !=): New method.
11244 * c-omp.c (c_omp_split_clauses): Use if ((mask & something) != 0)
11245 instead of if (mask & something) tests everywhere.
11247 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP to
11248 201307 instead of 201107.
11249 * c-common.c (DEF_FUNCTION_TYPE_8): Define.
11250 (c_common_attribute_table): Add "omp declare target" and
11251 "omp declare simd" attributes.
11252 (handle_omp_declare_target_attribute,
11253 handle_omp_declare_simd_attribute): New functions.
11254 * c-omp.c: Include c-pragma.h.
11255 (c_finish_omp_taskgroup): New function.
11256 (c_finish_omp_atomic): Add swapped argument, if true,
11257 build the operation first with rhs, lhs arguments and use NOP_EXPR
11259 (c_finish_omp_for): Add code argument, pass it down to make_code.
11260 (c_omp_split_clauses): New function.
11261 (c_split_parallel_clauses): Removed.
11262 (c_omp_declare_simd_clause_cmp, c_omp_declare_simd_clauses_to_numbers,
11263 c_omp_declare_simd_clauses_to_decls): New functions.
11264 * c-common.h (omp_clause_mask): New type.
11265 (OMP_CLAUSE_MASK_1): Define.
11266 (omp_clause_mask::omp_clause_mask, omp_clause_mask::operator &=,
11267 omp_clause_mask::operator |=, omp_clause_mask::operator ~,
11268 omp_clause_mask::operator |, omp_clause_mask::operator &,
11269 omp_clause_mask::operator <<, omp_clause_mask::operator >>,
11270 omp_clause_mask::operator ==): New methods.
11271 (enum c_omp_clause_split): New.
11272 (c_finish_omp_taskgroup): New prototype.
11273 (c_finish_omp_atomic): Add swapped argument.
11274 (c_finish_omp_for): Add code argument.
11275 (c_omp_split_clauses): New prototype.
11276 (c_split_parallel_clauses): Removed.
11277 (c_omp_declare_simd_clauses_to_numbers,
11278 c_omp_declare_simd_clauses_to_decls): New prototypes.
11279 * c-pragma.c (omp_pragmas): Add new OpenMP 4.0 constructs.
11280 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_CANCEL,
11281 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_DECLARE_REDUCTION,
11282 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_SIMD,
11283 PRAGMA_OMP_TARGET, PRAGMA_OMP_TASKGROUP and PRAGMA_OMP_TEAMS.
11284 Remove PRAGMA_OMP_PARALLEL_FOR and PRAGMA_OMP_PARALLEL_SECTIONS.
11285 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ALIGNED,
11286 PRAGMA_OMP_CLAUSE_DEPEND, PRAGMA_OMP_CLAUSE_DEVICE,
11287 PRAGMA_OMP_CLAUSE_DIST_SCHEDULE, PRAGMA_OMP_CLAUSE_FOR,
11288 PRAGMA_OMP_CLAUSE_FROM, PRAGMA_OMP_CLAUSE_INBRANCH,
11289 PRAGMA_OMP_CLAUSE_LINEAR, PRAGMA_OMP_CLAUSE_MAP,
11290 PRAGMA_OMP_CLAUSE_NOTINBRANCH, PRAGMA_OMP_CLAUSE_NUM_TEAMS,
11291 PRAGMA_OMP_CLAUSE_PARALLEL, PRAGMA_OMP_CLAUSE_PROC_BIND,
11292 PRAGMA_OMP_CLAUSE_SAFELEN, PRAGMA_OMP_CLAUSE_SECTIONS,
11293 PRAGMA_OMP_CLAUSE_SIMDLEN, PRAGMA_OMP_CLAUSE_TASKGROUP,
11294 PRAGMA_OMP_CLAUSE_THREAD_LIMIT, PRAGMA_OMP_CLAUSE_TO and
11295 PRAGMA_OMP_CLAUSE_UNIFORM.
11297 2013-10-09 Marc Glisse <marc.glisse@inria.fr>
11299 PR tree-optimization/20318
11300 * c-common.c (handle_returns_nonnull_attribute): New function.
11301 (c_common_attribute_table): Add returns_nonnull.
11303 2013-10-03 Marc Glisse <marc.glisse@inria.fr>
11306 * c.opt (fcheck-new): Move to common.opt.
11308 2013-09-25 Marek Polacek <polacek@redhat.com>
11309 Jakub Jelinek <jakub@redhat.com>
11312 * c-ubsan.c (ubsan_instrument_shift): Don't instrument
11313 an expression if we can prove it is correct.
11314 (ubsan_instrument_division): Likewise. Remove unnecessary
11317 2013-09-18 Marek Polacek <polacek@redhat.com>
11320 * c-common.c (handle_no_sanitize_undefined_attribute): New function.
11322 (struct attribute_spec c_common_att): Add no_sanitize_undefined.
11324 2013-09-14 Iain Sandoe <iain@codesourcery.com>
11327 * c.opt (fgnu-runtime, fnext-runtime, fobjc-abi-version,
11328 fobjc-gc, freplace-objc-classes): Accept for LTO.
11330 2013-09-13 Jacek Caban <jacek@codeweavers.com>
11332 * c-target.def: New hook
11334 2013-09-09 Paolo Carlini <paolo.carlini@oracle.com>
11337 * c.opt (Wdelete-incomplete): Add.
11339 2013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
11341 * c-common.c (same_scalar_type_ignoring_signedness): Delete.
11342 (vector_types_compatible_elements_p): New function.
11343 * c-common.h: (same_scalar_type_ignoring_signedness): Delete
11345 (vector_types_compatible_elements_p): Declare.
11347 2013-09-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
11349 * c-pretty-print.h (c_pretty_printer::simple_type_specifier): Now
11350 a virtual member function.
11351 (pp_simple_type_specifier): Remove.
11352 (pp_c_type_specifier): Likewise.
11353 * c-pretty-print.c (c_pretty_printer::simple_type_specifier):
11354 Rename from pp_c_type_specifier. Adjust.
11355 (c_pretty_printer::c_pretty_printer): Do not assign to
11356 simple_type_specifier.
11358 2013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
11360 * c-pretty-print.h (c_pretty_printer::type_id): Now a virtual
11362 (c_pretty_printer::storage_class_specifier): Likewise.
11363 (c_pretty_printer::initializer): Likewise.
11364 (pp_declaration): Remove.
11365 (pp_declaration_specifiers): Likewise.
11366 (pp_abstract_declarator): Likewise.
11367 (pp_declarator): Likewise.
11368 (pp_type_id): Likewise.
11369 (pp_statement): Likewise.
11370 (pp_constant): Likewise.
11371 (pp_id_expression): Likewise.
11372 (pp_primary_expression): Likewise.
11373 (pp_unary_expression): Likewise.
11374 (pp_multiplicative_expression): Likewise.
11375 (pp_conditional_expression): Likewise.
11376 (pp_assignment_expression): Likewise.
11377 (pp_expression): Likewise.
11378 (pp_c_type_id): Likewise.
11379 (pp_c_storage_class_specifier): Likewise.
11380 * c-pretty-print.c (pp_c_type_cast): Tidy.
11381 (pp_c_pointer): Likewise.
11382 (pp_c_type_specifier): Likewise.
11383 (pp_c_parameter_type_list): Likewise.
11384 (pp_c_function_definition): Likewise.
11385 (pp_c_init_declarator): Likewise.
11386 (pp_c_initializer_list): Likewise.
11387 (pp_c_constructor_elts): Likewise.
11388 (c_pretty_printer::direct_abstract_declarator): Likewise.
11389 (c_pretty_printer::declaration_specifiers): Likewise.
11390 (c_pretty_printer::primary_expression): Likewise.
11391 (c_pretty_printer::postfix_expression): Likewise.
11392 (c_pretty_printer::type_id): Rename from pp_c_type_id.
11393 (c_pretty_printer::storage_class_specifier): Rename from
11394 pp_c_storage_class_specifier.
11395 (c_pretty_printer::initializer): Rename from pp_c_initializer.
11396 (c_pretty_printer::c_pretty_printer): Do not assign to type_id,
11397 storage_class_specifier, initializer, offset_list, flags.
11399 2013-08-30 Marek Polacek <polacek@redhat.com>
11401 * c-ubsan.c: New file.
11402 * c-ubsan.h: New file.
11404 2013-08-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
11406 * c-pretty-print.h (c_pretty_printer::declaration): Now a virtual
11408 (c_pretty_printer::declaration_specifiers): Likewise.
11409 (c_pretty_printer::declarator): Likewise.
11410 (c_pretty_printer::abstract_declarator): Likewise.
11411 (c_pretty_printer::direct_abstract_declarator): Likewise.
11412 (c_pretty_printer::direct_declarator): Likewise.
11413 (c_pretty_printer::function_specifier): Likewise.
11414 (pp_declaration): Adjust.
11415 (pp_declaration_specifiers): Likewise.
11416 (pp_abstract_declarator): Likewise.
11417 (pp_direct_declarator): Likewise.
11418 (pp_function_specifier): Likewise.
11419 (pp_direct_abstract_declarator): Remove as unused.
11420 (pp_c_declaration): Remove.
11421 (pp_c_declaration_specifiers): Likewise.
11422 (pp_c_declarator): Likewise.
11423 (pp_c_direct_declarator): Likewise.
11424 (pp_c_function_specifier): Likewise.
11425 (pp_c_direct_abstract_declarator): Likewise.
11426 * c-pretty-print.c (c_pretty_printer::abstract_declarator): Rename
11427 from pp_c_abstract_declarator. Adjust.
11428 (c_pretty_printer::direct_abstract_declarator): Rename from
11429 pp_c_direct_abstract_declarator. Adjust.
11430 (c_pretty_printer::function_specifier): Rename from
11431 pp_c_function_specifier. Adjust.
11432 (c_pretty_printer::declaration_specifiers): Rename from
11433 pp_c_declaration_specifiers. Adjust.
11434 (c_pretty_printer::direct_declarator): Rename from
11435 pp_c_direct_declarator. Adjust.
11436 (c_pretty_printer::declarator): Rename from pp_c_declarator. Adjust.
11437 (c_pretty_printer::declaration): Rename from pp_c_declaration. Adjust.
11438 (c_pretty_printer::c_pretty_printer): Do not assign to
11439 declaration, declaration_specifiers, declarator,
11440 direct_declarator, direct_abstract_declarator, function_specifier.
11442 2013-08-26 Gabriel Dos Reis <gdre@integrable-solutions.net>
11444 * c-pretty-print.h (c_pretty_printer::unary_expression): Now a
11445 virtual member function.
11446 (c_pretty_printer::multiplicative_expression): Likewise.
11447 (c_pretty_printer::conditional_expression): Likewise.
11448 (c_pretty_printer::assignment_expression): Likewise.
11449 (c_pretty_printer::expression): Likewise.
11450 (pp_unary_expression): Adjust.
11451 (pp_multiplicative_expression): Likewise.
11452 (pp_assignment_expression): Likewise.
11453 (pp_conditional_expression): Likewise.
11454 (pp_expression): Likewise.
11455 * c-pretty-print.c (c_pretty_printer::unary_expression): Rename
11456 from pp_c_unary_expression. Adjust.
11457 (c_pretty_printer::multiplicative_expression): Rename from
11458 pp_c_multiplicative_expression. Adjust.
11459 (c_pretty_printer::conditional_expression): Rename from
11460 pp_c_conditional_expression. Adjust.
11461 (c_pretty_printer::assignment_expression): Rename from
11462 pp_c_assignment_expression. Adjust.
11463 (c_pretty_printer::expression): Rename from pp_c_expression. Adjust.
11464 (c_pretty_printer::c_pretty_printer): Do not assign to
11465 unary_expression, multiplicative_expression,
11466 conditional_expression, expression.
11468 2013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
11470 * c-pretty-print.h (c_pretty_printer::postfix_expression): Now a
11471 virtual member function.
11472 (pp_postfix_expression): Adjust.
11473 (pp_c_postfix_expression): Remove.
11474 * c-pretty-print.c (c_pretty_printer::postfix_expression): Rename
11475 from pp_c_postfix_expression. Adjust.
11476 (c_pretty_printer::c_pretty_printer): Do not assign to
11477 postfix_expression.
11479 2013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
11481 * c-pretty-print.h (c_pretty_printer::primary_expression): Now a
11482 virtua member function.
11483 (pp_primary_expression): Adjust.
11484 (pp_c_primary_expression): Remove.
11485 * c-pretty-print.c (c_pretty_printer::primary_expression): Rename
11486 from pp_c_primary_expression. Adjust.
11487 (pp_c_initializer_list): Use pp_primary_expression.
11488 (c_pretty_printer::c_pretty_printer): Do not assign to
11489 primary_expression.
11491 2013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
11493 * c-pretty-print.h (c_pretty_printer::translate_string): Declare.
11494 * c-pretty-print.c (M_): Remove.
11495 (c_pretty_printer::translate_string): Define.
11496 (pp_c_type_specifier): Use it.
11497 (pp_c_primary_expression): Likewise.
11498 (pp_c_expression): Likewise.
11500 2013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
11502 * c-pretty-print.h (c_pretty_printer::id_expression): Now a
11504 (pp_c_id_expression): Remove.
11505 (pp_id_expression): Adjust.
11506 * c-pretty-print.c (c_pretty_printer::id_expression): Rename from
11507 pp_c_id_expression. Adjust.
11508 (pp_c_postfix_expression): Use pp_id_expression.
11509 (c_pretty_printer::c_pretty_printer): Do not assign to id_expression.
11511 2013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
11513 * c-pretty-print.h (c_pretty_printer::constant): Now a virtual
11515 (pp_constant): Adjust.
11516 (pp_c_constant): Remove.
11517 * c-pretty-print.c (c_pretty_printer::constant): Rename from
11518 pp_c_constant. Adjust.
11520 (pp_c_primary_expression): Call pp_constant in lieu of pp_c_constant.
11521 (c_pretty_printer::c_pretty_printer): Remove assignment to constant.
11523 2013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
11525 * c-pretty-print.h (pp_c_pretty_printer_init): Remove.
11526 (c_pretty_printer::c_pretty_printer): Declare.
11527 * c-pretty-print.c (pretty_printer::c_pretty_printer): Rename from
11528 c_pretty_printer_init. Adjust.
11529 (print_c_tree): Do not call c_pretty_printer_init.
11530 * c-ada-spec.c (dump_ads): Remove call to pp_construct.
11532 2013-08-09 Arnaud Charlet <charlet@adacore.com>
11534 * c-ada-spec.c (print_ada_declaration): Prevent accessing null asm name
11536 2013-08-05 Paolo Carlini <paolo.carlini@oracle.com>
11539 * c-common.c (pointer_int_sum): Add bool parameter.
11540 * c-common.h (pointer_int_sum): Adjust declaration.
11542 2013-08-05 Gabriel Dos Reis <gdr@integrable-solutions.net>
11544 * c-pretty-print.c (print_c_tree): Simplify. Use non-static local
11545 c_pretty_printer variable.
11547 2013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
11549 * c-pretty-print.h (c_pretty_printer): Derive from pretty_printer.
11551 (pp_c_base): Likewise. Adjust users.
11552 * c-pretty-print.c (pp_c_maybe_whitespace): Adjust.
11553 (pp_c_whitespace): Do not call pp_base.
11554 (pp_c_left_paren): Likewise.
11555 (pp_c_right_paren): Likewise.
11556 (pp_c_left_brace): Likewise.
11557 (pp_c_right_brace): Likewise.
11558 (pp_c_left_bracket): Likewise.
11559 (pp_c_right_bracket): Likewise.
11560 (pp_c_dot): Likewise.
11561 (pp_c_ampersand): Likewise.
11562 (pp_c_star): Likewise.
11563 (pp_c_arrow): Likewise.
11564 (pp_c_semicolon): Likewise.
11565 (pp_c_complement): Likewise.
11566 (pp_c_exclamation): Likewise.
11567 (pp_c_direct_declarator): Likewise.
11568 (pp_c_ws_string): Likewise.
11569 (pp_c_identifier): Likewise.
11570 (pp_c_statement): Likewise.
11571 (print_c_tree): Likewise.
11573 2013-08-04 Ed Smith-Rowland <3dw4rd@verizon.net>
11576 * c-common.c (c_parse_error): Catch user-defined literal tokens and
11577 provide useful error strings.
11579 2013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
11581 * c-ada-spec.c (pp_ada_tree_identifier): Use specialized pretty
11582 printer functions instead of pp_string or operators and punctuators.
11583 (dump_generic_ada_node): Likewise.
11584 * c-pretty-print.c (pp_c_type_specifier): Likewise.
11585 (pp_c_relational_expression): Likewise.
11586 (pp_c_logical_or_expression): Likewise.
11588 2013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
11590 * c-ada-spec.c (print_ada_macros): Use specialized pretty printer
11591 functions instead of pp_character.
11592 (pp_ada_tree_identifier): Likewise.
11593 (dump_ada_double_name): Likewise.
11594 (dump_ada_function_declaration): Likewise.
11595 (dump_ada_array_domains): Likewise.
11596 (dump_template_types): Likewise.
11597 (dump_generic_ada_node): Likewise.
11598 (print_ada_declaration): Likewise.
11599 (print_ada_struct_decl): Likewise.
11600 * c-pretty-print.c (pp_c_integer_constant): Likewise.
11602 2013-07-23 Tom Tromey <tromey@redhat.com>
11604 * c-common.h (enum rid) <RID_GENERIC>: New constant.
11605 * c-common.c (c_common_reswords): Add _Generic.
11607 2013-07-21 OndÅ
\99ej BÃlka <neleai@seznam.cz>
11609 * c-common.c: Fix typos.
11610 * c-common.h: Likewise.
11612 2013-07-13 Lubos Lunak <l.lunak@suse.cz>
11615 * c-common.c (c_common_attribute_table): Add warn_unused.
11616 (handle_warn_unused_attribute): New.
11618 2013-07-10 Jakub Jelinek <jakub@redhat.com>
11620 * c-ppoutput.c (scan_translation_unit): Call account_for_newlines
11621 for all CPP_TOKEN_FLD_STR tokens, not just CPP_COMMENT.
11623 2013-07-10 Paolo Carlini <paolo.carlini@oracle.com>
11626 * c.opt: Add Wconditionally-supported.
11628 2013-07-08 Graham Stott <graham.stott@btinternet.com>
11630 * array-notation-common.c (length_mismatch_in_expr_p): Delete
11631 unused variables l_length and l_node.
11633 2013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
11636 * c-common.c (complete_array_type): Delay folding first index
11637 like other indices. When folding, check for index overflow.
11639 2013-06-27 Marc Glisse <marc.glisse@inria.fr>
11642 * c-common.h (c_build_vec_perm_expr): New complain argument.
11643 * c-common.c (c_build_vec_perm_expr): Likewise.
11644 Use save_expr also in C++.
11646 2013-06-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
11648 * c-common.c (c_common_nodes_and_builtins): Use cxx11 in lieu of cxx0x.
11649 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
11650 * c-opts.c (c_common_post_options): Likewise.
11652 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
11654 * array-notation-common.c (length_mismatch_in_expr): Changed the
11655 parameter type's from a dynamic array to a vec_tree. Also removed
11656 the size parameters.
11657 * c-common.h (length_mismatch_in_expr_p): Fixed prototype's as per
11660 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
11662 * c-common.h (struct cilkplus_an_parts): New structure.
11663 (struct cilkplus_an_loop_parts): Likewise.
11664 (cilkplus_extract_an_triplets): New prototype.
11665 (fix_sec_implicit_args): Likewise.
11666 * array-notation-common.c (cilkplus_extract_an_triplets): New function.
11667 (fix_sec_implicit_args): Likewise.
11669 2013-06-20 Balaji V. Iyer <balaji.v.iyer@intel.com>
11671 * array-notation-common.c (find_inv_trees): Removed an unwanted
11673 * c-common.h (struct inv_list::additional_tcodes): Changed type from
11674 enum rid to enum tree_code.
11676 2013-06-11 Jan Hubicka <jh@suse.cz>
11678 * c-common.c (handle_alias_ifunc_attribute): Do not set
11679 DECL_EXTERNAL for weakref variables.
11680 * c-pragma.c (handle_pragma_weak): Make sure aliases
11681 are not declared as external.
11683 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
11685 * array-notation-common.c (length_mismatch_in_expr_p): Moved this
11686 function from c/c-array-notation.c.
11687 (is_cilkplus_reduce_builtin): Likewise.
11688 (find_rank): Likewise.
11689 (extract_array_notation_exprs): Likewise.
11690 (replace_array_notations): Likewise.
11691 (find_inv_trees): Likewise.
11692 (replace_inv_trees): Likewise.
11693 (contains_array_notation_expr): Likewise.
11694 (find_correct_array_notation_type): Likewise.
11695 * c-common.h (struct inv_list): Moved this struct from the file
11696 c/c-array-notation.c and added a new field called additional tcodes.
11697 (length_mismatch_in_expr_p): New prototype.
11698 (is_cilkplus_reduce_builtin): Likewise.
11699 (find_rank): Likewise.
11700 (extract_array_notation_exprs): Likewise.
11701 (replace_array_notation): Likewise.
11702 (find_inv_trees): Likewise.
11703 (replace_inv_trees): Likewise.
11704 (find_correct_array_notation_type): Likewise.
11706 2013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
11708 * c-common.c (c_define_builtins): When cilkplus is enabled, the
11709 function array_notation_init_builtins is called.
11710 (c_common_init_ts): Added ARRAY_NOTATION_REF as typed.
11711 * c-common.def (ARRAY_NOTATION_REF): New tree.
11712 * c-common.h (build_array_notation_expr): New function declaration.
11713 (build_array_notation_ref): Likewise.
11714 (extract_sec_implicit_index_arg): New extern declaration.
11715 (is_sec_implicit_index_fn): Likewise.
11716 (ARRAY_NOTATION_CHECK): New define.
11717 (ARRAY_NOTATION_ARRAY): Likewise.
11718 (ARRAY_NOTATION_START): Likewise.
11719 (ARRAY_NOTATION_LENGTH): Likewise.
11720 (ARRAY_NOTATION_STRIDE): Likewise.
11721 * c-pretty-print.c (pp_c_postifix_expression): Added a new case for
11722 ARRAY_NOTATION_REF.
11723 (pp_c_expression): Likewise.
11724 * c.opt (flag_enable_cilkplus): New flag.
11725 * array-notation-common.c: New file.
11727 2013-05-14 Jakub Jelinek <jakub@redhat.com>
11730 * c-common.c (verify_tree): Don't recurse into SIZEOF_EXPR.
11732 2013-05-10 Marc Glisse <marc.glisse@inria.fr>
11734 * c-common.c (vector_types_convertible_p): No TYPE_PRECISION for
11737 2013-05-07 Han Shen <shenhan@google.com>
11739 * c-cppbuiltin.c (c_cpp_builtins): Added "__SSP_STRONG__=3".
11741 2013-04-29 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
11743 * c-common.c (check_user_alignment): Emit error for negative values.
11745 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
11747 * c-opts.c (set_std_cxx11): Use CLK_CXX1Y and CLK_GNUCXX1Y.
11749 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
11751 * c-cppbuiltin.c (c_cpp_builtins): Do not define
11752 __GXX_EXPERIMENTAL_CXX1Y__.
11754 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
11755 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
11757 * c.opt ([Wpointer-arith]): Enabled by -Wpedantic, as documented.
11758 * c-common.c (pointer_int_sum): Change -Wpointer-arith pedwarns
11759 to simply use OPT_Wpointer_arith.
11760 (c_sizeof_or_alignof_type): Likewise.
11762 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
11764 * c-cppbuiltin.c (c_cpp_builtins): Define __GXX_EXPERIMENTAL_CXX1Y__.
11766 2013-04-12 Jakub Jelinek <jakub@redhat.com>
11768 * c-format.c (gcc_diag_char_table, gcc_tdiag_char_table,
11769 gcc_cdiag_char_table, gcc_cxxdiag_char_table): Add %r and %R format
11772 2013-04-07 Steven Bosscher <steven@gcc.gnu.org>
11774 * c-pragma.c (add_to_renaming_pragma_list): Fix leading comment.
11776 2013-04-03 Paolo Carlini <paolo.carlini@oracle.com>
11778 * c-common.c (pointer_int_sum): Remove dead code.
11780 2013-03-09 Richard Sandiford <rdsandiford@googlemail.com>
11782 PR middle-end/56524
11783 * c-common.c (handle_optimize_attribute): Don't call
11784 save_optabs_if_changed.
11786 2013-03-05 Jakub Jelinek <jakub@redhat.com>
11788 PR middle-end/56461
11789 * c-pch.c (pch_init): Free target_validity at the end.
11791 2013-03-04 Jakub Jelinek <jakub@redhat.com>
11793 * c-pretty-print.c (pp_c_pretty_printer_init): Clear pp->flags.
11795 2013-02-28 Konstantin Serebryany <konstantin.s.serebryany@gmail.com>
11796 Jakub Jelinek <jakub@redhat.com>
11799 * c-common.c (handle_no_sanitize_address_attribute): New function.
11800 (c_common_attribute_table): Add no_sanitize_address attribute.
11801 (handle_no_address_safety_analysis_attribute): Add
11802 no_sanitize_address attribute, not no_address_safety_analysis
11805 2013-02-18 Aldy Hernandez <aldyh@redhat.com>
11808 * c-common.c (handle_optimize_attribute): Call
11809 save_optabs_if_changed.
11811 2013-02-18 Jakub Jelinek <jakub@redhat.com>
11812 Steven Bosscher <steven@gcc.gnu.org>
11815 * c-opts.c (c_common_post_options): If debug info is enabled
11816 and non-dwarf*, refuse to load PCH files and when writing PCH
11819 2013-02-05 Jakub Jelinek <jakub@redhat.com>
11821 PR middle-end/56167
11822 * c-common.c (handle_error_attribute): Fix condition.
11824 2013-01-30 Jakub Jelinek <jakub@redhat.com>
11827 * c-common.c (handle_target_attribute): Revert 2012-12-26 change.
11829 2013-01-18 Jason Merrill <jason@redhat.com>
11832 * c.opt (-fextern-tls-init): New.
11833 * c-opts.c (c_common_post_options): Handle it.
11835 2013-01-09 Jakub Jelinek <jakub@redhat.com>
11838 * c-common.c (c_fully_fold_internal): Warn for LSHIFT_EXPR and
11839 RSHIFT_EXPR, if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST
11840 and is either negative or bigger or equal to type precision
11841 of the first operand.
11843 2012-12-03 Marek Polacek <polacek@redhat.com>
11846 * c-common.c (check_user_alignment): Swap order of tests,
11847 check TREE_CODE first.
11849 2012-11-29 Ed Smith-Rowland <3dw4rd@verizon.net>
11852 * c-common.h (overflow_type): New enum.
11853 (build_userdef_literal): Add overflow_type argument.
11854 (tree_userdef_literal): Add overflow_type.
11855 (USERDEF_LITERAL_OVERFLOW): New access macro.
11856 * c-common.c (build_userdef_literal): Add overflow_type
11858 * c-lex.c (c_lex_with_flags): Add overflow_type to
11859 build_userdef_literal calls.
11860 (interpret_integer, interpret_float): Add overflow_type argument.
11862 2012-11-28 Richard Biener <rguenther@suse.de>
11865 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
11866 here and use a type with proper overflow behavior for types that would
11867 need to be promoted for the arithmetic.
11869 2012-11-23 Jakub Jelinek <jakub@redhat.com>
11872 * c-common.c (handle_no_address_safety_analysis_attribute): New
11874 (c_common_attribute_table): Add no_address_safety_analysis.
11876 2012-11-16 Simon Baldwin <simonb@google.com>
11878 * c.opt: Add f[no-]canonical-system-headers.
11879 * c-opts.c (c_common_handle_option): Handle
11880 OPT_fcanonical_system_headers.
11882 2012-11-09 Ed Smith-Rowland <3dw4rd@verizon.net>
11885 * c-opts.c (c_common_handle_option): Set new flags.
11886 * c.opt: Describe new flags.
11888 2012-11-09 Jason Merrill <jason@redhat.com>
11890 * c.opt (Wabi-tag): New.
11892 2012-11-09 Andi Kleen <ak@linux.intel.com>
11895 * c-common.c (get_atomic_generic_size): Mask with
11898 2012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
11901 * c.opt (Wformat): Make it Alias Wformat=1.
11902 (Wformat-contains-nul,Wformat-extra-args,Wformat-nonliteral,
11903 Wformat-security,Wformat-y2k,Wformat-zero-length): Use
11905 (Wformat=): RejectNegative. Use LangEnabledBy.
11906 (Wnonnull): Use LangEnabledBy.
11907 * c-opts.c (c_common_handle_option): Do not handle Wformat here.
11908 * c-format.c (set_Wformat): Delete.
11909 (decode_format_attr): Replace OPT_Wformat with OPT_Wformat_.
11910 (maybe_read_dollar_number): Likewise.
11911 (avoid_dollar_number): Likewise.
11912 (finish_dollar_format_checking): Likewise.
11913 (check_format_info): Likewise.
11914 (check_format_info_main): Likewise.
11915 (check_format_types): Likewise.
11916 (format_type_warning): Likewise.
11917 * c-common.c (int): Likewise.
11918 (check_function_sentinel): Likewise.
11919 * c-common.h (warn_format,set_Wformat): Do not declare here.
11921 2012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
11924 * c.opt(Warray-bounds,Wdelete-non-virtual-dtor,Wenum-compare,
11925 Wmain,Woverlength-strings, Wunknown-pragmas,Wunused-macros):
11927 (Wswitch,Wswitch-default,Wswitch-enum): Likewise. Move here from
11929 (Wvariadic-macros): Init(1).
11930 * c-opts.c (c_common_handle_option): Do not handle them
11932 (c_common_post_options): Likewise.
11933 (sanitize_cpp_opts): warn_unused_macros is now
11934 cpp_warn_unused_macros.
11935 (push_command_line_include): Likewise.
11936 * c-common.c (warn_unknown_pragmas): Do not define.
11937 * c-common.h (warn_unknown_pragmas): Do not declare.
11939 2012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
11942 * c-common.c (conversion_warning): Handle conditional expressions.
11944 2012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
11947 * c.opt (Wreturn_local_addr): Define new option.
11949 2012-10-25 Jason Merrill <jason@redhat.com>
11951 * c.opt (Wvirtual-move-assign): New.
11953 * c.opt (Winherited-variadic-ctor): New.
11955 2012-10-25 Marc Glisse <marc.glisse@inria.fr>
11958 * c-common.c (scalar_to_vector): Handle VEC_COND_EXPR.
11960 2012-10-23 Joseph Myers <joseph@codesourcery.com>
11962 * c-common.h (pch_cpp_save_state): Declare.
11963 * c-target.def (c_preinclude): New hook.
11964 * c-opts.c (done_preinclude): New.
11965 (push_command_line_include): Handle default preincluded header.
11966 (cb_file_change): Call pch_cpp_save_state when calling
11967 push_command_line_include.
11968 * c-pch.c (pch_ready_to_save_cpp_state, pch_cpp_state_saved)
11969 (pch_cpp_save_state): New.
11970 (pch_init): Call pch_cpp_save_state conditionally, instead of
11971 calling cpp_save_state.
11973 2012-10-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
11977 * c.opt (Waddress,Wchar-subscripts,Wsign-conversion,Wimplicit,
11978 Wimplicit-function-declaration,Wimplicit-int,Wsizeof-pointer-memaccess,
11979 Wnarrowing,Wparentheses,Wpointer-sign,Wreturn-type,Wsequence-point,
11980 Wsign-compare,Wuninitialized,Wmaybe-uninitialized,Wunused,
11981 Wvolatile-register-var): Add LangEnabledBy or EnabledBy.
11982 * c-opts.c (c_common_handle_option): Remove explicit handling from
11984 (c_common_post_options): Likewise.
11986 2012-10-18 Eric Botcazou <ebotcazou@adacore.com>
11988 * c-ada-spec.c (LOCATION_COL): Delete.
11989 (compare_location): New function.
11990 (compare_node): Use it.
11991 (compare_comment): Likewise.
11993 2012-10-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
11997 * c.opt (Wstrict-aliasing=,Wstrict-overflow=): Use LangEnabledBy.
11998 * c-opts.c (c_common_handle_option): Do not set them here. Add
12000 (c_common_post_options): Likewise.
12002 2012-10-16 Eric Botcazou <ebotcazou@adacore.com>
12004 * c-ada-spec.c (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Define.
12005 (dump_generic_ada_node) <INTEGER_CST>: Deal with sizetype specially.
12006 Remove POINTER_TYPE handling, add large unsigned handling and use
12007 ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX for big numbers.
12009 2012-10-12 Jakub Jelinek <jakub@redhat.com>
12012 * c-common.h (sizeof_pointer_memaccess_warning): Adjust prototype.
12013 * c-common.c (sizeof_pointer_memaccess_warning): Take array of 3
12014 locs and array of 3 trees instead of just single loc and single
12015 sizeof_arg tree. Handle __builtin___*_chk builtins too, and
12016 also stpncpy, bcopy, bcmp, bzero, snprintf and vsnprintf builtins.
12017 For *cmp* builtins that take two sources strings report warnings
12018 about first and second source, not about destination and source.
12020 2012-10-12 Marc Glisse <marc.glisse@inria.fr>
12023 * c-common.h (enum ref_operator) [RO_ARROW_STAR]: New.
12025 2012-10-11 Eric Botcazou <ebotcazou@adacore.com>
12027 * c-ada-spec.c (dump_ada_template): Bail out for template declarations
12028 declaring something coming from another file.
12030 2012-10-10 Arnaud Charlet <charlet@adacore.com>
12033 * c-ada-spec.c (print_ada_struct_decl): Increase buf size.
12035 2012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
12038 * c-common.c (warn_about_parentheses): Add location_t parameter;
12039 use EXPR_LOC_OR_LOC.
12040 * c-common.h: Update declaration.
12042 2012-10-09 Marc Glisse <marc.glisse@inria.fr>
12045 * c-common.c (scalar_to_vector): Moved from c-typeck.c. Support
12046 more operations. Make error messages optional.
12047 * c-common.h (enum stv_conv): Moved from c-typeck.c.
12048 (scalar_to_vector): Declare.
12050 2012-10-08 Jason Merrill <jason@redhat.com>
12052 * c-common.c (c_common_reswords): Add thread_local.
12054 2012-10-08 Dodji Seketeli <dodji@redhat.com>
12056 PR c++/53528 C++11 attribute support
12057 * c-common.h (bitfield_p, cxx_fundamental_alignment_p): Declare
12059 * c-common.c (check_cxx_fundamental_alignment_constraints): New
12061 (handle_aligned_attribute): In choose strictest alignment
12062 among many. Use new check_cxx_fundamental_alignment_constraints.
12063 (handle_transparent_union_attribute): In c++11 attribute syntax,
12064 don't look through typedefs.
12066 2012-10-04 Arnaud Charlet <charlet@adacore.com>
12068 * c-ada-spec.c (print_ada_declaration): Remove handling of TDF_RAW.
12069 * c.opt (-fdump-ada-spec, -fdump-ada-spec-slim): Move switch definition
12072 2012-09-25 Dehao Chen <dehao@google.com>
12074 PR middle-end/54645
12075 * c-pch.c (c_common_read_pch): Rebuild the location_adhoc_data
12076 map when read in the pch.
12078 2012-09-18 Arnaud Charlet <charlet@adacore.com>
12080 * c-ada-spec.c: Style fixes.
12082 2012-09-18 Thomas Quinot <quinot@adacore.com>
12084 * c.opt (-fada-spec-parent): Define new command line switch.
12085 * c-ada-spec.c (get_ada_package): When -fada-spec-parent
12086 is specified, generate binding spec as a child of the specified unit.
12088 2012-09-13 Paolo Carlini <paolo.carlini@oracle.com>
12089 Manuel López-Ibáñez <manu@gcc.gnu.org>
12092 * c.opt ([Winit-self]): Enabled by -Wall in C++.
12094 2012-08-23 Arnaud Charlet <charlet@adacore.com>
12096 * c-ada-spec.c (dump_generic_ada_node): Fix handling of name_only
12097 for pointers, and add missing Convention C pragma.
12098 (print_ada_struct_decl): Add missing aliased keyword.
12099 (dump_ads): Add pragma Ada_2005 and Style_Checks (Off).
12101 2012-08-17 Jakub Jelinek <jakub@redhat.com>
12103 * c-common.c (sizeof_pointer_memaccess_warning): New function.
12104 * c.opt (-Wsizeof-pointer-memaccess): Add new option.
12105 * c-opts.c (c_common_handle_option): Enable it for -Wall.
12106 * c-common.h (sizeof_pointer_memaccess_warning): Add prototype.
12107 * c-common.def (SIZEOF_EXPR): Moved here from cp-tree.def.
12109 2012-08-10 Richard Guenther <rguenther@suse.de>
12111 * c-pretty-print.c (pp_c_expression): Handle anonymous SSA names.
12113 2012-08-07 Steven Bosscher <steven@gcc.gnu.org>
12115 * c-pretty-print.c (pp_c_function_definition): Use pp_newline_and_flush
12116 instead of separate pp_newline and pp_flush.
12117 (print_c_tree): Likewise.
12119 2012-07-26 Richard Henderson <rth@redhat.com>
12121 * c-common.c (handle_hot_attribute): Allow labels.
12122 (handle_cold_attribute): Likewise.
12124 2012-07-20 Jakub Jelinek <jakub@redhat.com>
12127 * c-common.c (check_function_nonnull): Handle multiple nonnull
12128 attributes properly.
12130 2012-07-16 Steven Bosscher <steven@gcc.gnu.org>
12132 * c-gimplify.c: Include dumpfile.h instead of tree-dump.h.
12133 * c-ada-spec.c: Likewise.
12134 * c-dump.c (dump_stmt): Move to cp/dump.c, the only user.
12136 2012-07-14 Steven Bosscher <steven@gcc.gnu.org>
12138 * c-pch.c (CHECK_NO_ASM_OUT_DURING_PCH): Do not define.
12139 Remove code conditional on it.
12141 2012-07-11 Steven Bosscher <steven@gcc.gnu.org>
12143 * c-gimplify.c: Do not include basic-block.h.
12144 * c-common.c: Do not include linfuncs.h.
12146 2012-07-08 Steven Bosscher <steven@gcc.gnu.org>
12148 * c-common.h: Include tree.h.
12150 2012-07-02 Jason Merrill <jason@redhat.com>
12153 * c-common.c (get_priority): Call default_conversion.
12155 2012-07-01 Uros Bizjak <ubizjak@gmail.com>
12157 * c-pch.c (c_common_write_pch): Remove unused variables.
12159 2012-06-29 Steven Bosscher <steven@gcc.gnu.org>
12161 * cppspec.c: Moved from gcc/ to here.
12163 2012-06-27 Kai Tietz <ktietz@redhat.com>
12165 PR preprocessor/37215
12166 * c-ppoutput.c (preprocess_file): Check for nonempty buffer.
12168 2012-06-21 Steven Bosscher <steven@gcc.gnu.org>
12170 * c-common.h (c_common_print_pch_checksum): Remove.
12171 * c-pch.c: Do not include output.h.
12172 (CHECK_NO_ASM_OUT_DURING_PCH): Define and add FIXME.
12173 (asm_out_file): Define iff CHECK_NO_ASM_OUT_DURING_PCH isdefined.
12174 (asm_file_startpos): Define iff CHECK_NO_ASM_OUT_DURING_PCH is defined.
12175 (struct c_pch_header): Remove.
12176 (get_ident): Update gpch version.
12177 (pch_init): Do not print executable_checksum to asm_out_file.
12178 Do not fail if there is no asm_out_file to read back from. Set
12179 asm_file_startpos only if CHECK_NO_ASM_OUT_DURING_PCH is defined.
12180 (c_common_write_pch): Verify that nothing was written to asm_out_file
12181 since pch_init was called. Do not write a c_pch_header, and do not
12182 copy from asm_out_file to the PCH.
12183 (c_common_read_pch): Do not read a c_pch_header, and do not restore
12184 the content of asm_out_file from the PCH.
12185 (c_common_print_pch_checksum): Remove.
12186 * c-opts.c (c_common_init): Print out executable_checksum directly.
12188 2012-06-19 Steven Bosscher <steven@gcc.gnu.org>
12190 * c-target.def (objc_declare_unresolved_class_reference,
12191 objc_declare_class_definition): Add new hooks.
12193 2012-06-19 Steven Bosscher <steven@gcc.gnu.org>
12195 * c-lex.c: Do not include output.h.
12196 (cb_ident): Try to put out .ident with targetm.asm_out.output_ident.
12197 Remove uses of ASM_OUTPUT_IDENT.
12199 2012-06-15 Marc Glisse <marc.glisse@inria.fr>
12202 * c-common.h (c_build_vec_perm_expr): Move decl here.
12203 * c-common.c (c_build_vec_perm_expr): Move definition
12206 2012-06-06 Steven Bosscher <steven@gcc.gnu.org>
12208 * c.opt (fconserve-space): Turn into a no-op.
12210 2012-06-04 Sterling Augustine <saugustine@google.com>
12212 * c-pretty-print.h (pp_c_flag_gnu_v3): New enumerator.
12213 * c-pretty-print.c (pp_c_specifier_qualifier_list): Check it at
12214 both the start and end of the function.
12216 2012-06-04 Steven Bosscher <steven@gcc.gnu.org>
12218 * c-common.c: Do not include output.h.
12219 * c-pragma.c: Likewise.
12221 2012-06-04 Steven Bosscher <steven@gcc.gnu.org>
12223 * error.c (dump_decl): Check pp_c_flag_gnu_v3.
12224 (decl_as_dwarf_string, lang_decl_dwarf_name): New functions.
12225 (lang_decl_name): Handle namespace decls.
12227 2012-05-31 Steven Bosscher <steven@gcc.gnu.org>
12229 * c-ada-spec.c: Do not include output.h.
12230 * c-semantics.c: Likewise.
12232 2012-05-29 Joseph Myers <joseph@codesourcery.com>
12234 * c-common.c: Fix typo.
12236 2012-05-29 Michael Matz <matz@suse.de>
12238 * c-common.h (c_expand_decl): Remove prototype.
12240 2012-05-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
12242 * c.opt (Wmissing-braces): Use LangEnabledBy(C ObjC,Wall).
12243 * c-opts.c (c_common_handle_option): Remove code handling
12244 warn_missing_braces.
12246 2012-05-28 Paolo Carlini <paolo.carlini@oracle.com>
12249 * c-opts.c (c_common_handle_option): For C++ -Wall doesn't enable
12252 2012-05-22 Dodji Seketeli <dodji@redhat.com>
12255 * c.opt (Wunused-local-typedefs): Use EnabledBy(Wunused).
12257 2012-05-17 Manuel López-Ibáñez <manu@gcc.gnu.org>
12259 * c.opt (--pedantic-errors,-pedantic-errors): Do not handle here.
12260 * c-opts.c (c_common_handle_option): Do not handle explicitly
12261 Wreturn-type, Wwrite-strings, warn_ecpp, and -pedantic-errors.
12263 2012-05-16 Dodji Seketeli <dodji@redhat.com>
12265 PR preprocessor/7263
12266 * c-lex.c (c_lex_with_flags): Pass a virtual location to the call
12267 to cpp_classify_number. For diagnostics, use the precise location
12268 instead of the global input_location.
12270 2012-05-15 Paolo Carlini <paolo.carlini@oracle.com>
12273 * c-common.c (shorten_compare): Check c_inhibit_evaluation_warnings.
12275 2012-05-14 Bernd Schmidt <bernds@codesourcery.com>
12277 * c-common.c (DEF_ATTR_STRING): Define and undefine as necessary.
12279 2012-05-14 Manuel López-Ibáñez <manu@gcc.gnu.org>
12282 * c.opt (Wc++0X-compat,Wdelete-non-virtual-dtor,Wjump-misses-init,
12283 Wreorder): Use LangEnabledBy.
12284 * c-opts.c (c_common_handle_option): Do not enable them
12285 explicitly. Call lang-specific generated functions.
12286 (c_common_post_options): Do not set them here.
12288 2012-05-13 Manuel López-Ibáñez <manu@gcc.gnu.org>
12290 * c.opt (Wclobbered,Wempty-body,Wignored-qualifiers,
12291 Wmissing-field-initializers,Wmissing-parameter-type,
12292 Wold-style-declaration,Woverride-init): Use EnabledBy.
12293 * c-opts.c (c_common_post_options): Do not set here explicitly.
12295 2012-05-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
12298 * c-opts.c (c_common_handle_option): Use handle_generated_option
12299 to enable sub-options.
12301 2012-05-10 Paolo Carlini <paolo.carlini@oracle.com>
12304 * c-common.c (warnings_for_convert_and_check): Use warning_at.
12306 2012-05-10 Richard Guenther <rguenther@suse.de>
12308 * c-common.c (c_sizeof_or_alignof_type): Remove assert and
12309 adjust commentary about TYPE_IS_SIZETYPE types.
12311 2012-05-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
12314 * c-common.c (warn_logical_operator): Check that argument of
12315 integer_zerop is not NULL.
12317 2012-05-05 Manuel López-Ibáñez <manu@gcc.gnu.org>
12320 * c-common.c (warn_logical_operator): Do not warn if either side
12321 is already true or false.
12323 2012-05-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
12326 * c-common.c (expr_original_type): New.
12327 (shorten_compare): Do not warn for enumeration types.
12329 2012-05-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
12331 * c.opt (fpermissive): Add Var(flag_permissive).
12333 2012-04-30 Marc Glisse <marc.glisse@inria.fr>
12336 * c-common.c (convert_vector_to_pointer_for_subscript): New function.
12337 * c-common.h (convert_vector_to_pointer_for_subscript): Declare it.
12339 2012-04-30 Dodji Seketeli <dodji@redhat.com>
12341 Add -Wvarargs option
12342 * c.opt (Wvarargs): Define new option.
12344 2012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
12346 * c-common.c (check_function_arguments): Replace
12347 Wmissing-format-attribute with Wsuggest-attribute=format.
12349 2012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
12351 * c.opt (Wsuggest-attribute=format): New. Alias of
12352 Wmissing-format-attribute.
12353 * c-format.c (decode_format_type): Replace
12354 Wmissing-format-attribute with Wsuggest-attribute=format.
12355 (check_function_format): Likewise.
12357 2012-04-27 Ollie Wild <aaw@google.com>
12359 * c-common.c: Add CPP_W_LITERAL_SUFFIX mapping.
12360 * c-opts.c (c_common_handle_option): Handle OPT_Wliteral_suffix.
12361 * c.opt: Add Wliteral-suffix.
12363 2012-04-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
12366 * c.opt (Wpedantic): New.
12367 (pedantic): Alias Wpedantic.
12368 * c-opts.c (c_common_handle_option): Replace -pedantic with -Wpedantic.
12369 (c_common_post_options): Likewise.
12370 (sanitize_cpp_opts): Likewise.
12371 * c-lex.c (interpret_float): Likewise.
12372 * c-format.c (check_format_types): Likewise.
12373 * c-common.c (pointer_int_sum): Likewise.
12374 (c_sizeof_or_alignof_type): Likewise.
12375 (c_add_case_label): Likewise.
12376 (c_do_switch_warnings): Likewise.
12377 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
12379 2012-04-15 Jason Merrill <jason@redhat.com>
12382 * c-format.c (CPLUSPLUS_STD_VER): C++11 inherits from C99.
12383 (C_STD_NAME): Distinguish between C++98 and C++11.
12385 2012-04-11 Eric Botcazou <ebotcazou@adacore.com>
12388 * c-common.h (uint16_type_node): Rename into...
12389 (c_uint16_type_node): ...this.
12390 * c-common.c (c_common_nodes_and_builtins): Adjust for above renaming.
12391 * c-cppbuiltin.c (builtin_define_stdint_macros): Likewise.
12393 2012-04-10 Manuel López-Ibáñez <manu@gcc.gnu.org>
12395 * c-common.c (warn_if_unused_value): Move definition to here.
12396 * c-common.h (warn_if_unused_value): Move declaration to here.
12398 2012-03-23 William Bader <williambader@hotmail.com>
12400 * c-lex.c (c_lex_with_flags): Avoid declarations after stmts.
12402 2012-03-20 Jason Merrill <jason@redhat.com>
12404 * c-common.h (enum cxx_dialect): Add cxx1y.
12405 * c-common.c (c_common_nodes_and_builtins): Use >= for cxx_dialect
12407 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
12408 * c-opts.c (c_common_post_options): Likewise.
12409 (set_std_cxx1y): New.
12410 (c_common_handle_option): Call it.
12411 * c.opt (-std=c++1y, -std=gnu++1y): New flags.
12413 2012-03-19 Paolo Carlini <paolo.carlini@oracle.com>
12416 * c.opt ([Wuseless-cast]): Add.
12418 2012-03-16 Richard Guenther <rguenther@suse.de>
12420 * c-pretty-print.c (pp_c_initializer_list): Adjust.
12422 2012-03-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
12425 * c.opt (ftemplate-backtrace-limit) Add.
12427 2012-03-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12429 * c-cppbuiltin.c (c_cpp_builtins): Remove #pragma extern_prefix
12431 * c-pragma.c (handle_pragma_extern_prefix): Remove.
12432 (init_pragma): Don't register extern_prefix.
12434 2012-03-12 Richard Guenther <rguenther@suse.de>
12436 * c-common.c (c_common_get_narrower): Use c_common_type_for_size.
12437 (builtin_type_for_size): Likewise.
12439 2012-02-13 Jakub Jelinek <jakub@redhat.com>
12442 * c-common.c (sync_resolve_params): Don't decide whether to convert
12443 or not based on TYPE_SIZE comparison, convert whenever arg_type
12444 is unsigned INTEGER_TYPE.
12446 2012-02-06 Paolo Carlini <paolo.carlini@oracle.com>
12449 * c.opt ([Wunused-local-typedefs]): Fix description.
12451 2012-01-24 Mike Stump <mikestump@comcast.net>
12453 * c-common.c (c_common_type_for_mode): Match signed/unsigned types
12456 2012-01-18 Richard Guenther <rguenther@suse.de>
12458 * c-opts.c (c_common_post_options): Reset LTO flags if
12459 we are about to generate a PCH.
12461 2012-01-17 Paolo Carlini <paolo.carlini@oracle.com>
12464 * c-pretty-print.c (pp_c_integer_constant): For unsigned constants
12465 use pp_unsigned_wide_integer.
12467 2012-01-10 Richard Guenther <rguenther@suse.de>
12469 PR middle-end/51806
12470 * c-opts.c (c_common_handle_option): Move -Werror handling
12471 to language independent code.
12473 2012-01-05 Richard Guenther <rguenther@suse.de>
12475 PR middle-end/51764
12476 * c.opt (Wmudflap, fmudflap, fmudflapth, fmudflapir): Move here
12479 2011-12-30 Paolo Carlini <paolo.carlini@oracle.com>
12482 * c-common.c (c_sizeof_or_alignof_type): In C++ allow for alignof
12483 of array types with an unknown bound.
12485 2011-12-20 Joseph Myers <joseph@codesourcery.com>
12487 * c-common.c (flag_isoc99): Update comment to refer to C11.
12488 (flag_isoc1x): Change to flag_isoc11.
12489 * c-common.h (flag_isoc99): Update comment to refer to C11.
12490 (flag_isoc1x): Change to flag_isoc11.
12491 * c-cppbuiltin.c (cpp_atomic_builtins): Change comment to refer to
12493 * c-opts.c (set_std_c1x): Change to set_std_c11.
12494 (c_common_handle_option): Handle OPT_std_c11 and OPT_std_gnu11.
12496 (set_std_c89, set_std_c99, set_std_c11): Use flag_isoc11.
12497 (set_std_c1): Use CLK_STDC11 and CLK_GNUC11.
12498 * c.opt (std=c1x): Change to std=c11. Document as non-draft
12500 (std=c1x, std=iso9899:2011): Add as aliases of std=c11.
12501 (std=gnu1x): Change to std=gnu11. Refer to non-draft standard.
12502 (std=gnu1x): Make alias of std=gnu11.
12504 2011-12-19 Jason Merrill <jason@redhat.com>
12507 * c-common.c (handle_transparent_union_attribute): Check the first
12508 field if the type is complete.
12510 2011-12-15 Jonathan Wakely <jwakely.gcc@gmail.com>
12513 * c-common.c (RID_IS_FINAL): Add.
12514 * c-common.h (RID_IS_FINAL): Add.
12516 2011-11-30 Iain Sandoe <iains@gcc.gnu.org>
12518 * c.opt (fgnu-runtime): Provide full description.
12519 (fnext-runtime): Likewise.
12520 * c-opts.c (OPT_fgnu_runtime, OPT_fnext_runtime) Remove.
12522 2011-11-28 Andrew MacLeod <amacleod@redhat.com>
12524 * c-cpp-builtin.c (cpp_atomic_builtins):New. Emit all atomic
12525 predefines in one place. Add LOCK_FREE predefines.
12526 (c_cpp_builtins): Move Legacy HAVE_SYNC predefines to
12529 2011-11-24 Andrew MacLeod <amacleod@redhat.com>
12532 * c-common.c (get_atomic_generic_size): Check for various error
12534 (resolve_overloaded_atomic_exchange,
12535 resolve_overloaded_atomic_compare_exchange,
12536 resolve_overloaded_atomic_load, resolve_overloaded_atomic_store): Return
12537 error_mark_node for error conditions.
12539 2011-11-08 Richard Guenther <rguenther@suse.de>
12541 PR middle-end/51010
12542 * c-pretty-print.c (pp_c_expression): Handle SSA_NAMEs.
12544 2011-11-07 Richard Henderson <rth@redhat.com>
12545 Aldy Hernandez <aldyh@redhat.com>
12546 Torvald Riegel <triegel@redhat.com>
12548 Merged from transactional-memory.
12550 * c-common.c (handle_tm_wrap_attribute,
12551 handle_tm_attribute, ignore_attribute, parse_tm_stmt_attr): New.
12552 (struct c_common_reswords): Added __transaction* keywords.
12553 (struct c_common_attribute_table): Added transaction* and tm_regparm
12555 * c-common.h: Added RID_TRANSACTION*. Added TM_ATTR* and TM_STMT*
12557 (parse_tm_stmt_attr, tm_attr_to_mask, tm_mask_to_attr,
12558 find_tm_attribute): Declare.
12560 2011-11-07 Jason Merrill <jason@redhat.com>
12563 * c-common.c, c-common.h: Revert yesterday's changes.
12565 2011-11-06 Jason Merrill <jason@redhat.com>
12568 * c-common.c (decl_has_visibility_attr): Split out from...
12569 (c_determine_visibility): ...here.
12570 * c-common.h: Declare it.
12572 2011-11-06 Joseph Myers <joseph@codesourcery.com>
12574 * c-common.c (c_common_reswords): Add _Alignas and _Alignof.
12575 (c_sizeof_or_alignof_type): Diagnose alignof applied to a function
12577 (check_user_alignment): New. Split out of
12578 handle_aligned_attribute. Disallow integer constants with
12579 noninteger types. Conditionally allow zero.
12580 (handle_aligned_attribute): Use check_user_alignment.
12581 * c-common.h (RID_ALIGNAS, check_user_alignment): New.
12583 2011-11-06 Andrew MacLeod <amacleod@redhat.com>
12584 Richard Henderson <rth@redhat.com>
12586 Merged from cxx-mem-model.
12588 * c-cppbuiltin.c (c_cpp_builtins): Test both atomic and sync patterns.
12589 * c-common.c (sync_resolve_params, sync_resolve_return): Only tweak
12590 parameters that are the same type size.
12591 (get_atomic_generic_size): New. Find size of generic
12592 atomic function parameters and do typechecking.
12593 (add_atomic_size_parameter): New. Insert size into parameter list.
12594 (resolve_overloaded_atomic_exchange): Restructure __atomic_exchange to
12595 either __atomic_exchange_n or external library call.
12596 (resolve_overloaded_atomic_compare_exchange): Restructure
12597 __atomic_compare_exchange to either _n variant or external library call.
12598 (resolve_overloaded_atomic_load): Restructure __atomic_load to either
12599 __atomic_load_n or an external library call.
12600 (resolve_overloaded_atomic_store): Restructure __atomic_store to either
12601 __atomic_store_n or an external library call.
12602 (resolve_overloaded_builtin): Handle new __atomic builtins.
12604 2011-11-04 Eric Botcazou <ebotcazou@adacore.com>
12607 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Call fold_offsetof_1.
12608 (fold_offsetof_1): Make global. Remove STOP_REF argument and adjust.
12609 <INDIRECT_REF>: Return the argument.
12610 <ARRAY_REF>: Remove special code for negative offset.
12611 Call fold_build_pointer_plus instead of size_binop.
12612 (fold_offsetof): Remove STOP_REF argument and adjust.
12613 * c-common.h (fold_offsetof_1): Declare.
12614 (fold_offsetof): Remove STOP_REF argument.
12616 2011-11-02 Paolo Carlini <paolo.carlini@oracle.com>
12619 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
12620 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
12621 Wnarrowing for C++0x and C++98.
12622 * c.opt ([Wnarrowing]): Update.
12624 2011-11-01 Paolo Carlini <paolo.carlini@oracle.com>
12627 * c.opt: Add Wzero-as-null-pointer-constant.
12629 2011-10-31 Jason Merrill <jason@redhat.com>
12631 * c.opt (-fdeduce-init-list): Off by default.
12634 * c-common.h (cxx_dialect): Add cxx11 and cxx03.
12635 * c.opt: Add -std=c++11, -std=gnu++11, -std=gnu++03,
12636 and -Wc++11-compat.
12637 * c-opts.c (set_std_cxx11): Rename from set_std_cxx0x.
12639 2011-10-27 Roberto Agostino Vitillo <ravitillo@lbl.gov>
12642 * c.opt (fvisibility-inlines-hidden): Description change.
12644 2011-10-26 Ed Smith-Rowland <3dw4rd@verizon.net>
12646 Implement C++11 user-defined literals.
12647 * c-common.c (build_userdef_literal): New.
12648 * c-common.def: New tree code.
12649 * c-common.h (tree_userdef_literal): New tree struct and accessors.
12650 * c-lex.c (interpret_float): Add suffix parm.
12651 (c_lex_with_flags): Build literal tokens.
12653 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
12657 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
12660 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
12661 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
12662 Wnarrowing for C++0x and C++98.
12663 * c.opt ([Wnarrowing]): Update.
12665 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
12668 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
12669 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
12670 Wnarrowing for C++0x and C++98.
12671 * c.opt ([Wnarrowing]): Update.
12673 2011-10-21 Paolo Carlini <paolo.carlini@oracle.com>
12676 * c-common.c (conversion_warning): Remove code looking for
12677 artificial operands.
12679 2011-10-18 Dodji Seketeli <dodji@redhat.com>
12682 * c-lex.c (fe_file_change): Use LINEMAP_SYSP when
12683 !NO_IMPLICIT_EXTERN_C.
12685 2011-10-17 Michael Spertus <mike_spertus@symantec.com>
12687 * c-common.c (c_common_reswords): Add __bases,
12689 * c-common.h: Add RID_BASES and RID_DIRECT_BASES.
12691 2011-10-17 Paolo Carlini <paolo.carlini@oracle.com>
12694 * c.opt ([Wnonnull]): Add C++ and Objective-C++.
12696 2011-10-15 Tom Tromey <tromey@redhat.com>
12697 Dodji Seketeli <dodji@redhat.com>
12699 * c.opt (fdebug-cpp): New option.
12700 * c-opts.c (c_common_handle_option): Handle the option.
12701 * c-ppoutput.c (maybe_print_line_1): New static function. Takes an
12702 output stream in parameter. Factorized from ...
12703 (maybe_print_line): ... this. Dump location debug information when
12704 -fdebug-cpp is in effect.
12705 (print_line_1): New static function. Takes an output stream in
12706 parameter. Factorized from ...
12707 (print_line): ... here. Dump location information when -fdebug-cpp
12709 (scan_translation_unit): Dump location information when
12710 -fdebug-cpp is in effect.
12712 2011-10-15 Tom Tromey <tromey@redhat.com>
12713 Dodji Seketeli <dodji@redhat.com>
12715 * c.opt (ftrack-macro-expansion): New option. Handle it with and
12717 * c-opts.c (c_common_handle_option)<case
12718 OPT_ftrack_macro_expansion_, case OPT_ftrack_macro_expansion>: New
12719 cases. Handle -ftrack-macro-expansion with and without argument.
12721 2011-10-15 Tom Tromey <tromey@redhat.com>
12722 Dodji Seketeli <dodji@redhat.com>
12724 * c-ppoutput.c (scan_translation_unit, maybe_print_line)
12725 (print_line, cb_define, do_line_change): Adjust to avoid touching
12726 the internals of struct line_map. Use the public API instead.
12727 * c-pch.c (c_common_read_pch): Likewise.
12728 * c-lex.c (fe_file_change): Likewise.
12730 2011-10-14 Paolo Carlini <paolo.carlini@oracle.com>
12733 * c.opt ([Wformat-zero-length]): Add C++ and Objective-C++.
12735 2011-10-11 Paolo Carlini <paolo.carlini@oracle.com>
12738 * c-pretty-print.c (pp_c_floating_constant): Output
12739 max_digits10 (in the ISO C++ WG N1822 sense) decimal digits.
12741 2011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
12743 * c-common.c (def_builtin_1): Delete old interface with two
12744 parallel arrays to hold standard builtin declarations, and replace
12745 it with a function based interface that can support creating
12746 builtins on the fly in the future. Change all uses, and poison
12747 the old names. Make sure 0 is not a legitimate builtin index.
12748 * c-omp.c (c_finish_omp_barrier): Ditto.
12749 (c_finish_omp_taskwait): Ditto.
12750 (c_finish_omp_flush): Ditto.
12752 2011-10-11 Tristan Gingold <gingold@adacore.com>
12754 * c.opt: (fallow-parameterless-variadic-functions): New.
12756 2011-09-08 Dodji Seketeli <dodji@redhat.com>
12758 PR c++/33255 - Support -Wunused-local-typedefs warning
12759 * c-common.h (struct c_language_function::local_typedefs): New
12761 (record_locally_defined_typedef, maybe_record_typedef_use)
12762 (maybe_warn_unused_local_typedefs): Declare new functions.
12763 * c-common.c (record_locally_defined_typedef)
12764 (maybe_record_typedef_use)
12765 (maybe_warn_unused_local_typedefs): Define new functions.
12766 * c.opt: Declare new -Wunused-local-typedefs flag.
12768 2011-09-06 Eric Botcazou <ebotcazou@adacore.com>
12770 PR middle-end/50266
12771 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Fold offsetof-like
12774 2011-09-05 Richard Guenther <rguenther@suse.de>
12776 * c-common.c (complete_array_type): Use ssize_int (-1) instead
12777 of integer_minus_one_node for empty array upper bounds.
12779 2011-08-28 Dodji Seketeli <dodji@redhat.com>
12781 * c-pch.c (c_common_read_pch): Call linemap_add with LC_ENTER as
12782 it's the first time it's being called on this main TU.
12784 2011-08-24 Richard Guenther <rguenther@suse.de>
12787 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Fix conditional.
12789 2011-08-22 Gabriel Charette <gchare@google.com>
12791 * c-opts.c (c_finish_options): Force BUILTINS_LOCATION for tokens
12792 defined in cpp_init_builtins and c_cpp_builtins.
12794 2011-08-19 Joseph Myers <joseph@codesourcery.com>
12796 * c-common.c (c_common_reswords): Add __builtin_complex.
12797 * c-common.h (RID_BUILTIN_COMPLEX): New.
12799 2011-08-18 Joseph Myers <joseph@codesourcery.com>
12801 * c-common.c (c_common_reswords): Add _Noreturn.
12802 (keyword_is_function_specifier): Handle RID_NORETURN.
12803 * c-common.h (RID_NORETURN): New.
12805 2011-08-10 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
12807 * c-common.c (unsafe_conversion_p): New function. Check if it is
12808 unsafe to convert an expression to the type.
12809 (conversion_warning): Adjust, use unsafe_conversion_p.
12810 * c-common.h (unsafe_conversion_p): New function declaration.
12812 2011-08-02 Jakub Jelinek <jakub@redhat.com>
12814 * c-common.h (c_finish_omp_atomic): Adjust prototype.
12815 (c_finish_omp_taskyield): New prototype.
12816 * c-omp.c (c_finish_omp_atomic): Add OPCODE, V, LHS1 and RHS1
12817 arguments. Handle OMP_ATOMIC_READ, OMP_ATOMIC_CAPTURE_OLD and
12818 OMP_ATOMIC_CAPTURE_NEW in addition to OMP_ATOMIC. If LHS1
12819 or RHS1 have side-effects, evaluate those too in the right spot,
12820 if it is a decl and LHS is also a decl, error out if they
12822 (c_finish_omp_taskyield): New function.
12823 * c-cppbuiltin.c (c_cpp_builtins): Change _OPENMP to 201107.
12824 * c-pragma.c (omp_pragmas): Add taskyield.
12825 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKYIELD.
12826 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_FINAL and
12827 PRAGMA_OMP_CLAUSE_MERGEABLE.
12829 2011-07-25 Dodji Seketeli <dodji@redhat.com>
12831 * c-common.h (set_underlying_type): Remove parm name from
12834 2011-07-25 Romain Geissler <romain.geissler@gmail.com>
12836 * c-pretty-print.h: Search c-common.h in c-family.
12838 2011-07-22 Jason Merrill <jason@redhat.com>
12841 * c.opt (Wnarrowing): New.
12844 * c-common.h: Declare c_linkage_bindings.
12845 * c-pragma.c (handle_pragma_redefine_extname): Use it.
12848 * c-opts.c (set_std_cxx0x): Set flag_isoc94 and flag_isoc99.
12849 * c-pretty-print.c (pp_c_cv_qualifiers): Check c_dialect_cxx as well
12850 as flag_isoc99 for 'restrict'.
12851 (pp_c_specifier_qualifier_list): Likewise for _Complex.
12853 2011-07-21 Ian Lance Taylor <iant@google.com>
12855 PR middle-end/49705
12856 * c-common.c (c_disable_warnings): New static function.
12857 (c_enable_warnings): New static function.
12858 (c_fully_fold_internal): Change local unused_p to bool. Call
12859 c_disable_warnings and c_enable_warnings rather than change
12860 c_inhibit_evaluation_warnings.
12862 2011-07-20 Jason Merrill <jason@redhat.com>
12864 PR c++/6709 (DR 743)
12865 PR c++/42603 (DR 950)
12866 * c-common.h (CPP_KEYWORD, CPP_TEMPLATE_ID): Move from cp/parser.h.
12867 (CPP_NESTED_NAME_SPECIFIER, N_CP_TTYPES): Likewise.
12868 (CPP_DECLTYPE): New.
12869 * c-common.c (c_parse_error): Handle CPP_DECLTYPE.
12871 2011-07-19 Richard Guenther <rguenther@suse.de>
12873 * c-common.c (pointer_int_sum): Use fold_build_pointer_plus.
12874 * c-omp.c (c_finish_omp_for): Likewise.
12876 2011-07-12 Eric Botcazou <ebotcazou@adacore.com>
12878 * c-ada-spec.c (dump_nested_types): Put semi-colon after empty loop
12879 body on the next line.
12881 2011-07-08 Jason Merrill <jason@redhat.com>
12884 * c-omp.c (check_omp_for_incr_expr): Handle preevaluation.
12887 * c-common.c (c_apply_type_quals_to_decl): Don't check
12888 TYPE_NEEDS_CONSTRUCTING.
12890 2011-07-06 Richard Guenther <rguenther@suse.de>
12892 * c-common.c (c_common_nodes_and_builtins):
12893 Merge calls to build_common_tree_nodes and build_common_tree_nodes_2.
12895 2011-07-05 Richard Guenther <rguenther@suse.de>
12897 * c-common.c (c_common_nodes_and_builtins): Build all common
12900 2011-06-27 Jakub Jelinek <jakub@redhat.com>
12902 * c-common.h (c_tree_chain_next): New static inline function.
12904 * c-common.c (check_builtin_function_arguments): Handle
12905 BUILT_IN_ASSUME_ALIGNED.
12907 2011-06-21 Andrew MacLeod <amacleod@redhat.com>
12909 * c-common.c: Add sync_ or SYNC__ to builtin names.
12910 * c-omp.c: Add sync_ or SYNC__ to builtin names.
12912 2011-06-20 Pierre Vittet <piervit@pvittet.com>
12914 * c-pragma.h (pragma_handler_1arg, pragma_handler_2arg): New
12916 (gen_pragma_handler): New union.
12917 (internal_pragma_handler): New type.
12918 (c_register_pragma_with_data)
12919 (c_register_pragma_with_expansion_and_data): New functions.
12921 * c-pragma.c (registered_pragmas, c_register_pragma_1)
12922 (c_register_pragma, c_register_pragma_with_expansion)
12923 (c_invoke_pragma_handler): Changed to work with
12924 internal_pragma_handler.
12925 (c_register_pragma_with_data)
12926 (c_register_pragma_with_expansion_and_data): New functions.
12928 2011-06-14 Joseph Myers <joseph@codesourcery.com>
12930 * c-common.c: Include common/common-target.h.
12931 (handle_section_attribute): Use
12932 targetm_common.have_named_sections.
12933 * c-cppbuiltin.c: Include common/common-target.h.
12934 (c_cpp_builtins): Use targetm_common.except_unwind_info.
12936 2011-06-10 Richard Guenther <rguenther@suse.de>
12938 * c-pretty-print.c (pp_c_type_specifier): Use pp_c_identifier
12939 to print a IDENTIFIER_NODE.
12941 2011-06-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12942 Joseph Myers <joseph@codesourcery.com>
12944 * c.opt (fbuilding-libgcc): New option.
12945 * c-cppbuiltin.c (c_cpp_builtins): Define
12946 __LIBGCC_TRAMPOLINE_SIZE__ if flag_building_libgcc.
12948 2011-06-07 Jason Merrill <jason@redhat.com>
12950 * c-common.c (max_tinst_depth): Lower default to 900.
12952 * c-format.c (gcc_cxxdiag_char_table): Add 'S' format.
12954 2011-06-07 Richard Guenther <rguenther@suse.de>
12956 * c-common.c (c_common_nodes_and_builtins): Do not set
12957 size_type_node or call set_sizetype.
12959 2011-06-07 Dodji Seketeli <dodji@redhat.com>
12962 * c-pretty-print.c (pp_c_integer_constant): Consider the canonical
12963 type when using pointer comparison to compare types.
12965 2011-06-02 Jonathan Wakely <jwakely.gcc@gmail.com>
12967 * c.opt: Add -Wdelete-non-virtual-dtor.
12968 * c-opts.c (c_common_handle_option): Include it in -Wall.
12970 2011-05-30 Nathan Froyd <froydnj@gcc.gnu.org>
12975 2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
12977 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
12980 2011-05-27 Jakub Jelinek <jakub@redhat.com>
12983 * c-common.c (c_common_truthvalue_conversion) <case COND_EXPR>: For
12984 C++ don't call c_common_truthvalue_conversion on void type arms.
12986 2011-05-27 Nathan Froyd <froydnj@codesourcery.com>
12988 * c-common.h (struct stmt_tree_s) [x_cur_stmt_list]: Change to a VEC.
12989 (stmt_list_stack): Define.
12990 (cur_stmt_list): Adjust for new type of x_cur_stmt_list.
12991 * c-semantics.c (push_stmt_list, pop_stmt_list): Likewise.
12993 2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
12995 * c-common.c (warning_candidate_p): Check for BLOCKs.
12997 2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
12999 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
13002 2011-05-25 Jakub Jelinek <jakub@redhat.com>
13004 * c-common.c (def_fn_type): Remove extra va_end.
13006 2011-05-23 Jason Merrill <jason@redhat.com>
13009 * c-common.c (c_common_get_narrower): New.
13010 (shorten_binary_op, shorten_compare, warn_for_sign_compare): Use it.
13012 2011-05-23 Nathan Froyd <froydnj@codesourcery.com>
13014 * c-common.h (check_function_arguments): Tweak prototype of
13015 check_function_arguments.
13016 * c-common.c (check_function_arguments): Likewise. Adjust
13017 calls to check_function_nonnull, check_function_format, and
13018 check_function_sentinel.
13019 (check_function_sentinel): Take a FUNCTION_TYPE rather than
13020 separate attributes and typelist arguments. Use
13021 FOREACH_FUNCTION_ARGS to iterate over argument types.
13023 2011-05-15 Paolo Carlini <paolo.carlini@oracle.com>
13025 * c-common.c (c_common_reswords): Reorder.
13026 * c-common.h (rid): Likewise.
13028 2011-05-10 Nathan Froyd <froydnj@codesourcery.com>
13030 * c-common.c (def_fn_type): Don't call build_function_type, call
13031 build_function_type_array or build_varargs_function_type_array
13033 (c_common_nodes_and_builtins): Likewise.
13035 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
13037 * c-common.c (c_add_case_label): Omit the loc argument to
13039 * c-common.h (build_case_label): Remove.
13040 * c-semantics.c (build_case_label): Remove.
13042 2011-05-05 Joseph Myers <joseph@codesourcery.com>
13044 * c-objc.h (objc_start_method_definition): Update prototype.
13045 * stub-objc.c (objc_start_method_definition): Add extra parameter.
13047 2011-05-04 Nathan Froyd <froydnj@codesourcery.com>
13049 * c-common.c (check_main_parameter_types): Reindent. Don't use
13050 TYPE_ARG_TYPES directly.
13051 (handle_nonnull_attribute): Likewise.
13052 (sync_resolve_params): Likewise.
13053 * c-format.c (handle_format_arg_attribute): Likewise. Adjust call
13054 to check_format_string.
13055 (handle_format_attribute): Likewise.
13056 (check_format_string): Take a function type to examine instead of
13057 a type list. Use a function_arg_iterator to step through argument
13060 2011-05-04 Richard Guenther <rguenther@suse.de>
13062 * c-common.c (fix_string_type): Use size_int for index type bounds.
13063 (start_fname_decls): Do not pass NULL to build_int_cst.
13064 (c_init_attributes): Likewise.
13065 * c-lex.c (c_lex_with_flags): Likewise.
13067 2011-04-27 Jason Merrill <jason@redhat.com>
13069 * c-common.c (make_tree_vector_from_list): New.
13070 * c-common.h: Declare it.
13072 2011-04-26 Richard Guenther <rguenther@suse.de>
13074 PR preprocessor/48248
13075 * c-ppoutput.c (maybe_print_line): Always optimize newlines
13076 for output size with -P.
13078 2011-04-25 Paolo Carlini <paolo.carlini@oracle.com>
13080 * c-common.c (struct c_common_resword): Add __underlying_type.
13081 * c-common.h (enum rid): Add RID_UNDERLYING_TYPE.
13083 2011-04-20 Jim Meyering <meyering@redhat.com>
13085 * c-format.c (init_dollar_format_checking): Remove useless
13088 2011-04-15 Nicola Pero <nicola.pero@meta-innovation.com>
13090 * c-objc.h (objc_get_interface_ivars): Removed.
13091 (objc_detect_field_duplicates): New.
13092 * stub-objc.c: Likewise.
13094 2011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
13096 * stub-objc.c (objc_declare_protocols): Renamed to
13097 objc_declare_protocol.
13098 * c-objc.h: Likewise.
13100 2011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
13102 * stub-objc.c (objc_declare_class): Updated argument name.
13104 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
13106 * c-common.h (c_common_init_ts): Declare.
13107 * c-common.c (c_common_init_ts): Define.
13109 2011-04-12 Nicola Pero <nicola.pero@meta-innovation.com>
13111 * c-objc.h (objc_build_message_expr): Updated prototype.
13112 * stub-objc.c (objc_build_message_expr): Likewise.
13114 2011-04-12 Martin Jambor <mjambor@suse.cz>
13116 * c-gimplify.c (c_genericize): Call cgraph_get_create_node instead
13119 2011-04-11 Richard Guenther <rguenther@suse.de>
13121 * c-common.c (complete_array_type): Build a range type of
13124 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
13126 * c-common.c (handle_sentinel_attribute): Don't use TYPE_ARG_TYPES.
13127 (handle_type_generic_attribute): Likewise.
13129 2011-04-07 Jason Merrill <jason@redhat.com>
13132 * c-common.c (c_common_truthvalue_conversion): Don't ignore
13133 conversion from C++0x scoped enum.
13135 2011-04-06 Joseph Myers <joseph@codesourcery.com>
13137 * c-target-def.h: New file.
13138 * c-target.def: New file.
13139 * c-target.h: New file.
13140 * c-common.c (targetcm): Don't define here.
13141 * c-common.h (default_handle_c_option): Declare.
13142 * c-format.c: Include c-target.h instead of target.h.
13143 * c-opts.c: Include c-target.h instead of target.h. Explicitly
13145 (default_handle_c_option): Move from targhooks.c.
13147 2011-03-29 Jakub Jelinek <jakub@redhat.com>
13149 PR preprocessor/48248
13150 * c-ppoutput.c (print): Add src_file field.
13151 (init_pp_output): Initialize it.
13152 (maybe_print_line): Don't optimize by adding up to 8 newlines
13153 if map->to_file and print.src_file are different file.
13154 (print_line): Update print.src_file.
13156 2011-03-25 Kai Tietz <ktietz@redhat.com>
13158 * c-ada-spec.c (compare_comment): Use filename_cmp
13159 instead of strcmp for filename.
13161 2011-03-25 Jeff Law <law@redhat.com>
13163 * c-common.c (def_fn_type): Add missing va_end.
13165 2011-03-25 Jason Merrill <jason@redhat.com>
13167 * c.opt: Add -std=c++03.
13169 2011-03-22 Eric Botcazou <ebotcazou@adacore.com>
13171 * c-ada-spec.c (dump_ada_template): Skip non-class instances.
13173 2011-03-17 Kai Tietz <ktietz@redhat.com>
13176 * c-pretty-print.c (pp_c_specifier_qualifier_list):
13177 Display allowed attributes for function pointer types.
13178 (pp_c_attributes_display): New function to display
13179 attributes having affects_type_identity flag set to true.
13180 * c-pretty-print.h (pp_c_attributes_display): New prototype.
13182 * c-common.c (c_common_attribute_table):
13184 (c_common_format_attribute_table): Likewise.
13186 2011-03-18 Jason Merrill <jason@redhat.com>
13188 * c.opt (fconstexpr-depth): Add Var(max_constexpr_depth).
13189 * c-common.h: Don't declare it here.
13190 * c-common.c: Or define it here.
13191 * c-opts.c (c_common_handle_option): Or set it here.
13194 * c-common.c (handle_transparent_union_attribute): Don't
13195 make a duplicate type in C++.
13197 2011-03-15 Jason Merrill <jason@redhat.com>
13199 * c-common.c (max_constexpr_depth): New.
13200 * c-common.h: Declare it.
13201 * c-opts.c (c_common_handle_option): Set it.
13202 * c.opt (fconstexpr-depth): New option.
13204 2011-03-11 Jason Merrill <jason@redhat.com>
13206 * c-common.c (attribute_takes_identifier_p): Add missing const.
13209 * c-common.c (attribute_takes_identifier_p): Assume that an
13210 unknown attribute takes an identifier.
13212 2011-03-07 Nathan Froyd <froydnj@codesourcery.com>
13215 * c-common.c (c_type_hash): Call list_length instead of iterating
13216 through DECL_CHAIN. Rename 'i' to 'n_elements'.
13218 2011-02-19 Jakub Jelinek <jakub@redhat.com>
13221 * c-common.c (c_fully_fold_internal): Handle VIEW_CONVERT_EXPR.
13223 2011-02-17 Iain Sandoe <iains@gcc.gnu.org>
13225 * c.opt (fobjc-abi-version=) New.
13226 (fobjc-nilcheck): New.
13228 2011-02-03 Nathan Froyd <froydnj@codesourcery.com>
13231 * c-common.h (keyword_is_decl_specifier): Declare.
13232 * c-common.c (keyword_is_decl_specifier): Define.
13233 (keyword_is_function_specifier): New function.
13235 2011-01-26 Jakub Jelinek <jakub@redhat.com>
13238 * c-lex.c (interpret_float): If CPP_N_IMAGINARY, ensure
13239 EXCESS_PRECISION_EXPR is created with COMPLEX_TYPE instead of
13242 2011-01-26 Arnaud Charlet <charlet@adacore.com>
13244 * c-ada-spec.c (dump_generic_ada_node): Avoid dereferencing null type.
13246 2011-01-26 Jakub Jelinek <jakub@redhat.com>
13249 * c-opts.c (c_common_post_options): Call c_common_no_more_pch
13250 after init_c_lex if pch_file is set.
13252 2011-01-26 Dave Korn <dave.korn.cygwin@gmail.com>
13255 * c.opt (-fkeep-inline-dllexport): New switch.
13257 2011-01-12 Richard Guenther <rguenther@suse.de>
13259 PR middle-end/32511
13260 * c-common.c (handle_weak_attribute): Warn instead of error
13261 on declaring an inline function weak.
13263 2011-01-05 Tom Tromey <tromey@redhat.com>
13265 * c-common.h (lvalue_error): Update.
13266 * c-common.c (lvalue_error): Add 'loc' argument. Call error_at,
13269 2010-12-29 Nicola Pero <nicola.pero@meta-innovation.com>
13272 * c-objc.h (objc_finish_message_expr): Added argument to
13275 2010-12-22 Nathan Froyd <froydnj@codesourcery.com>
13277 * c-common.c (handle_nonnull_attribute, handle_sentinel_attribute):
13280 2010-12-18 Nicola Pero <nicola.pero@meta-innovation.com>
13282 * c-objc.h (objc_maybe_warn_exceptions): New.
13283 * stub-objc.c (objc_maybe_warn_exceptions): New.
13285 2010-12-10 Nathan Froyd <froydnj@codesourcery.com>
13287 * c-common.h (readonly_error): Declare.
13288 * c-common.c (readonly_error): Define.
13290 2010-12-09 Nathan Froyd <froydnj@codesourcery.com>
13292 * c-common.h (invalid_indirection_error): Declare.
13293 * c-common.c (invalid_indirection_error): Define.
13295 2010-12-03 Richard Guenther <rguenther@suse.de>
13298 * c-pretty-print.c (pp_c_postfix_expression): Handle MEM_REF.
13299 (pp_c_unary_expression): Likewise.
13300 (pp_c_expression): Likewise.
13302 2010-11-30 Nicola Pero <nicola.pero@meta-innovation.com>
13304 * c-common.h (objc_finish_function): New.
13305 (objc_non_volatilized_type): Removed.
13306 (objc_type_quals_match): Removed.
13307 * stub-objc.c (objc_finish_function): New.
13308 (objc_non_volatilized_type): Removed.
13309 (objc_type_quals_match): Removed.
13311 2010-11-30 Joseph Myers <joseph@codesourcery.com>
13313 * c-common.h (parse_optimize_options): Declare.
13314 * c-cppbuiltin.c, c-format.c, c-gimplify.c, c-lex.c, c-omp.c,
13315 c-pch.c, c-pragma.c, c-semantics.c: Don't include toplev.h.
13317 2010-11-29 Joseph Myers <joseph@codesourcery.com>
13319 * c-opts.c (check_deps_environment_vars): Use getenv instead of
13321 * c-pch.c (O_BINARY): Don't define here.
13322 * c-pragma.h: Include "cpplib.h" instead of <cpplib.h>.
13324 2010-11-25 Joseph Myers <joseph@codesourcery.com>
13326 * c-cppbuiltin.c (c_cpp_builtins): Pass &global_options to
13327 targetm.except_unwind_info.
13329 2010-11-23 Joseph Myers <joseph@codesourcery.com>
13331 * c-opts.c (c_common_handle_option): Pass location to
13332 set_struct_debug_option.
13334 2010-11-23 Joseph Myers <joseph@codesourcery.com>
13336 * c-common.c (visibility_options): Move from ../opts.c.
13337 * c-common.h (struct visibility_flags, visibility_options):
13339 * c-opts.c (finish_options): Rename to c_finish_options.
13340 (c_common_init): Update call to finish_options.
13342 2010-11-22 Nicola Pero <nicola.pero@meta-innovation.com>
13345 * c-lex.c (lex_string): Check that each string in an Objective-C
13346 string concat sequence starts with either one or zero '@', and
13347 that there are no spurious '@' signs at the end.
13349 2010-11-20 Joseph Myers <joseph@codesourcery.com>
13351 * c-pragma.c: Remove conditionals on HANDLE_PRAGMA_PACK,
13352 HANDLE_PRAGMA_PACK_PUSH_POP, HANDLE_PRAGMA_WEAK and
13353 HANDLE_PRAGMA_VISIBILITY.
13354 * c-pragma.h (HANDLE_PRAGMA_WEAK, HANDLE_PRAGMA_PACK,
13355 HANDLE_PRAGMA_VISIBILITY): Don't define.
13356 (HANDLE_SYSV_PRAGMA, HANDLE_PRAGMA_PACK_PUSH_POP): Don't test.
13358 2010-11-20 Nathan Froyd <froydnj@codesourcery.com>
13363 * c-common.h (keyword_begins_type_specifier): Declare.
13364 (keyword_is_storage_class_specifier): Declare.
13365 (keyword_is_type_qualifier): Declare.
13366 * c-common.c (keyword_begins_type_specifier): New function.
13367 (keyword_is_storage_class_specifier): New function.
13368 (keyword_is_type_qualifier): Declare.
13370 2010-11-19 Joseph Myers <joseph@codesourcery.com>
13373 * c-common.c (in_late_binary_op): Define.
13374 (c_common_truthvalue_conversion): Check in_late_binary_op before
13375 calling c_save_expr.
13376 * c-common.h (in_late_binary_op): Declare.
13378 2010-11-19 Joseph Myers <joseph@codesourcery.com>
13380 * c-opts.c (c_common_handle_option): Update calls to
13381 set_struct_debug_option.
13383 2010-11-19 Nicola Pero <nicola.pero@meta-innovation.com>
13385 * c-common.h (objc_declare_protocols): Added additional argument.
13386 * stub-objc.c (objc_declare_protocol): Same change.
13388 2010-11-18 Nathan Froyd <froydnj@codesourcery.com>
13391 * c-common.h (build_real_imag_expr): Declare.
13392 * c-semantics.c (build_real_imag_expr): Define.
13394 2010-11-17 Joseph Myers <joseph@codesourcery.com>
13396 * c-opts.c (c_common_parse_file): Take no arguments.
13397 * c-common.h (c_common_parse_file): Update prototype.
13399 2010-11-16 Jakub Jelinek <jakub@redhat.com>
13402 * c-common.c (warning_candidate_p): Don't track non-const calls
13405 2010-11-15 Ian Lance Taylor <iant@google.com>
13407 * c-lex.c (init_c_lex): Set macro debug callbacks if
13408 flag_dump_go_spec is set.
13410 2010-11-15 Nicola Pero <nicola.pero@meta-innovation.com>
13412 * c-common.h (objc_build_incr_expr_for_property_ref): New.
13413 * stub-objc.c (objc_build_incr_expr_for_property_ref): New.
13415 2010-11-15 Nathan Froyd <froydnj@codesourcery.com>
13417 PR preprocessor/45038
13418 * c-cppbuiltin.c (c_cpp_builtins): Use different format for C++
13421 2010-11-12 Joseph Myers <joseph@codesourcery.com>
13423 * c-common.h (c_family_lang_mask): Declare.
13424 * c-opts.c (c_family_lang_mask): Make extern.
13425 * c-pragma.c (handle_pragma_diagnostic): Use
13426 control_warning_option.
13428 2010-11-12 Joseph Myers <joseph@codesourcery.com>
13430 * c-common.c (parse_optimize_options): Update call to
13432 * c-common.h (c_common_handle_option): Update prototype.
13433 * c-opts.c (c_common_handle_option): Take location_t parameter and
13434 pass it to other functions.
13436 2010-11-11 Joseph Myers <joseph@codesourcery.com>
13438 * c-opts.c (warning_as_error_callback): Remove.
13439 (c_common_initialize_diagnostics): Don't call
13440 register_warning_as_error_callback.
13441 (c_common_handle_option): Handle -Werror=normalized= here.
13443 2010-11-10 Joseph Myers <joseph@codesourcery.com>
13445 * c-common.c (handle_mode_attribute): Use %' and word "signedness"
13447 * c-opts.c (c_common_parse_file): Start diagnostics with lowercase
13449 * c-pragma.c (handle_pragma_target, handle_pragma_optimize):
13450 Remove trailing '.' from diagnostics.
13451 * c.opt (Wwrite-strings_: Avoid '`' in help text.
13453 2010-11-10 Joseph Myers <joseph@codesourcery.com>
13455 * c-common.c (parse_optimize_options): Pass global_dc to
13457 * c-opts.c (c_common_handle_option): Pass &global_options to
13458 set_Wstrict_aliasing.
13459 * c.opt (v): Don't mark Common or document here.
13461 2010-11-06 Iain Sandoe <iains@gcc.gnu.org>
13464 * c-format.c (format_type): New type gcc_objc_string_format_type.
13465 (valid_stringptr_type_p): New.
13466 (handle_format_arg_attribute): Use valid_stringptr_type_p ().
13467 (check_format_string): Pass expected type, use
13468 valid_stringptr_type_p (), check that the format string types are
13469 consistent with the format specification.
13470 (decode_format_attr): Warn if NSString is used outside objective-c.
13471 (format_types_orig): Add NSString.
13472 (format_name): New.
13473 (format_flags): New.
13474 (check_format_arg): Handle format strings requiring an external parser.
13475 first_target_format_type: New variable.
13476 (handle_format_attribute): Set up first_target_format_type, pass the
13477 expected format arg string type to check_format_string().
13478 * c-common.h (FMT_FLAG_PARSE_ARG_CONVERT_EXTERNAL): New flag.
13479 * stub-objc.c (objc_string_ref_type_p): New.
13480 (objc_check_format_arg): New.
13482 2010-11-04 Nicola Pero <nicola.pero@meta-innovation.com>
13484 Fixed using the Objective-C 2.0 dot-syntax with class names.
13485 * c-common.h (objc_build_class_component_ref): New.
13486 * stub-objc.c (objc_build_class_component_ref): New.
13488 2010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
13490 * c.opt (Wproperty-assign-default): New option.
13492 2010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
13494 Implemented -fobjc-std=objc1 flag.
13495 * c.opt (fobjc-std=objc1): New option.
13497 2010-11-01 Nicola Pero <nicola.pero@meta-innovation.com>
13499 Implemented format and noreturn attributes for Objective-C methods.
13500 * c-common.c (handle_noreturn_attribute): Recognize 'noreturn'
13501 attribute for Objective-C methods.
13503 2010-10-31 Jason Merrill <jason@redhat.com>
13505 * c-common.c (conversion_warning, warn_for_collisions_1): Use
13508 2010-10-30 Nicola Pero <nicola.pero@meta-innovation.com>
13510 Implemented Objective-C 2.0 @property, @synthesize and @dynamic.
13511 * c-common.h (enum rid): Removed RID_COPIES and RID_IVAR.
13512 (objc_add_property_declaration): Removed arguments for copies and
13514 (objc_build_getter_call): Renamed to
13515 objc_maybe_build_component_ref.
13516 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
13517 (objc_is_property_ref): New.
13518 * c-common.c (c_common_reswords): Removed copies and ivar.
13519 * stub-objc.c (objc_add_property_declaration): Removed arguments
13520 for copies and ivar.
13521 (objc_build_getter_call): Renamed to
13522 objc_maybe_build_component_ref.
13523 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
13524 (objc_is_property_ref): New.
13526 2010-10-29 Arnaud Charlet <charlet@adacore.com>
13527 Matthew Gingell <gingell@adacore.com>
13529 * c-ada-spec.c (separate_class_package): New function.
13530 (pp_ada_tree_identifier): Prefix references to C++ classes with the
13531 name of their enclosing package.
13532 (print_ada_declaration): Use separate_class_package.
13534 2010-10-27 Jason Merrill <jason@redhat.com>
13536 * c-common.c (c_common_reswords): Add __is_literal_type.
13537 * c-common.h (enum rid): Add RID_IS_LITERAL_TYPE.
13539 * c-common.c (check_case_value): Remove special C++ code.
13541 2010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
13543 * c-common.h (enum rid): Added RID_READWRITE, RID_ASSIGN,
13544 RID_RETAIN, RID_COPY and RID_NONATOMIC. Updated RID_FIRST_PATTR
13545 and RID_LAST_PATTR.
13546 (objc_add_property_declaration): Added additional arguments.
13547 (objc_property_attribute_kind): Removed.
13548 (objc_set_property_attr): Removed.
13549 * c-common.c (c_common_reswords): Added readwrite, assign, retain,
13550 copy and nonatomic.
13551 * stub-objc.c (objc_add_property_declaration): Added additional
13553 (objc_set_property_attr): Removed.
13555 2010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
13557 * c-common.h (objc_add_property_variable): Renamed to
13558 objc_add_property_declaration. Added location argument.
13559 * stub-objc.c (objc_add_property_variable): Same change.
13561 2010-10-23 Nicola Pero <nicola.pero@meta-innovation.com>
13563 * c-common.h (objc_maybe_printable_name): New.
13564 * stub-objc.c (objc_maybe_printable_name): New.
13566 2010-10-22 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
13567 Andrew Pinski <pinskia@gmail.com>
13569 * c-common.h (c_common_mark_addressable_vec): Declare.
13570 * c-common.c (c_common_mark_addressable_vec): New function.
13572 2010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
13574 * c-common.h (objc_set_method_type): Removed.
13575 (objc_add_method_declaration): Added boolean argument.
13576 (objc_start_method_definition): Same change.
13577 (objc_build_method_signature): Same change.
13578 * stub-objc.c (objc_set_method_type): Removed.
13579 (objc_add_method_declaration): Added boolean argument.
13580 (objc_start_method_definition): Same change.
13581 (objc_build_method_signature): Same change.
13583 2010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
13585 * c-common.h (finish_file): Removed.
13586 (objc_write_global_declarations): New.
13587 * c-opts.c (c_common_parse_file): Do not call finish_file.
13588 * stub-objc.c (objc_write_global_declarations): New.
13590 2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
13592 Implemented parsing @synthesize and @dynamic for
13593 Objective-C/Objective-C++.
13594 * c-common.h (enum rid): Add RID_AT_SYNTHESIZE and RID_AT_DYNAMIC.
13595 (objc_add_synthesize_declaration): New.
13596 (objc_add_dynamic_declaration): New.
13597 * c-common.c (c_common_reswords): Add synthesize and dynamic.
13598 * stub-objc.c (objc_add_synthesize_declaration): New.
13599 (objc_add_dynamic_declaration): New.
13601 2010-10-18 Michael Meissner <meissner@linux.vnet.ibm.com>
13604 * c-cppbuiltin.c (mode_has_fma): Move function here from
13605 builtins.c. Don't use the fma optab, instead just use the
13606 HAVE_fma* macros, so that __FP_FAST_FMA* will be defined when
13609 2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
13611 Merge from 'apple/trunk' branch on FSF servers.
13613 2005-11-08 Fariborz Jahanian <fjahanian@apple.com>
13616 * c-common.h (objc_non_volatilized_type): New declaration
13617 * stub-objc.c (objc_non_volatilized_type): New stub.
13619 2010-10-17 Nicola Pero <nicola.pero@meta-innovation.com>
13621 Merge from 'apple/trunk' branch on FSF servers.
13623 2006-03-27 Fariborz Jahanian <fjahanian@apple.com>
13626 * c-common.h (objc_diagnose_private_ivar): New decl.
13627 * stub-objc.c (objc_diagnose_private_ivar): New stub.
13629 2010-10-17 Iain Sandoe <iains@gcc.gnu.org>
13631 * c-common.c (c_common_reswords): Add package, RID_AT_PACKAGE.
13632 * c-common.h (enum rid): Add RID_AT_PACKAGE.
13633 (objc_ivar_visibility_kind): New enum.
13634 (objc_set_visibility): Adjust prototype to use visibility enum.
13635 * stub-objc.c (objc_set_visibility): Adjust stub to use
13638 2010-10-14 Michael Meissner <meissner@linux.vnet.ibm.com>
13640 * c-cppbuiltin.c (builtin_define_float_constants): Emit
13641 __FP_FAST_FMA, __FP_FAST_FMAF, and __FP_FAST_FMAL if the machine
13642 has the appropriate fma builtins.
13643 (c_cpp_builtins): Adjust call to builtin_define_float_constants.
13645 2010-10-14 Iain Sandoe <iains@gcc.gnu.org>
13647 merge from FSF apple 'trunk' branch.
13648 2006 Fariborz Jahanian <fjahanian@apple.com>
13650 Radars 4436866, 4505126, 4506903, 4517826
13651 * c-common.c (c_common_resword): Define @property and its attributes.
13652 * c-common.h: Define property attribute enum entries.
13653 (OBJC_IS_PATTR_KEYWORD): New.
13654 (objc_property_attribute_kind): New enum.
13655 Declare objc_set_property_attr (), objc_add_property_variable (),
13656 objc_build_getter_call () and objc_build_setter_call ().
13657 * stub-objc.c (objc_set_property_attr): New stub.
13658 (objc_add_property_variable): Likewise.
13659 (objc_build_getter_call): Likewise.
13660 (objc_build_setter_call) Likewise.
13662 2010-10-13 Iain Sandoe <iains@gcc.gnu.org>
13664 merge from FSF apple 'trunk' branch.
13665 2006-04-26 Fariborz Jahanian <fjahanian@apple.com>
13667 Radar 3803157 (method attributes)
13668 * c-common.c (handle_deprecated_attribute): Recognize
13669 objc methods as valid declarations.
13670 * c-common.h: Declare objc_method_decl ().
13671 * stub-objc.c (objc_method_decl): New stub.
13673 2010-10-08 Joseph Myers <joseph@codesourcery.com>
13675 * c-common.c (parse_optimize_options): Call
13676 decode_cmdline_options_to_array_default_mask before
13677 decode_options. Update arguments to decode_options.
13678 * c-common.h (c_common_init_options_struct): Declare.
13679 * c-opts.c (c_common_init_options_struct): New. Split out from
13680 c_common_init_options.
13682 2010-10-06 Nicola Pero <nicola.pero@meta-innovation.com>
13684 Implemented fast enumeration for Objective-C.
13685 * c-common.h (objc_finish_foreach_loop): New.
13686 * stub-objc.c (objc_finish_foreach_loop): New.
13688 2010-10-05 Joseph Myers <joseph@codesourcery.com>
13690 * c-common.h (struct diagnostic_context): Don't declare here.
13691 (c_common_initialize_diagnostics): Declare using
13692 diagnostic_context typedef.
13693 * c-opts.c (c_common_handle_option): Pass global_dc to
13694 handle_generated_option.
13696 2010-10-04 Joseph Myers <joseph@codesourcery.com>
13698 * c-opts.c (c_common_handle_option): Pass &global_options_set to
13699 handle_generated_option.
13701 2010-10-03 Ian Lance Taylor <iant@google.com>
13703 * c.opt (-fplan9-extensions): New option.
13705 2010-10-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
13707 * c-cppbuiltin.c (define__GNUC__, builtin_define_type_precision):
13709 (c_cpp_builtins): Call functions from cppbuiltin.c instead
13710 of duplicating code.
13712 2010-09-30 Iain Sandoe <iains@gcc.gnu.org>
13714 * c-common.c: Add two new entries for @optional
13715 and @required keywords.
13717 merge from FSF 'apple/trunk' branch.
13718 2006-01-30 Fariborz Jahanian <fjahanian@apple.com>
13721 * c-common.h (RID_AT_OPTIONAL, RID_AT_REQUIRED): Two new
13722 objective-c keywords.
13723 (objc_set_method_opt): New declaration.
13724 * stub-objc.c (objc_set_method_opt): New stub.
13726 2010-09-30 Joseph Myers <joseph@codesourcery.com>
13728 * c-common.c (handle_optimize_attribute): Pass &global_options to
13729 cl_optimization_save and cl_optimization_restore.
13730 * c-opts.c (c_common_handle_option): Pass &global_options to
13731 handle_generated_option.
13732 * c-pragma.c (handle_pragma_diagnostic): Use option_flag_var.
13733 (handle_pragma_pop_options, handle_pragma_reset_options): Pass
13734 &global_options to cl_optimization_restore.
13736 2010-09-30 Nicola Pero <nicola.pero@meta-innovation.com>
13738 * c-lex.c (c_lex_with_flags): Updated comments for CPP_AT_NAME
13739 Objective-C/Objective-C++ keywords.
13741 2010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
13743 Merge from 'apple/trunk' branch on FSF servers.
13745 2005-10-04 Fariborz Jahanian <fjahanian@apple.com>
13748 * c-common.h (objc_check_global_decl): New declaration.
13749 * stub-objc.c (objc_check_global_decl): New stub.
13751 2010-09-29 Joseph Myers <joseph@codesourcery.com>
13753 * c.opt: Don't use VarExists.
13755 2010-09-29 Joseph Myers <joseph@codesourcery.com>
13757 * c-common.c (c_cpp_error): Update names of diagnostic_context
13759 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Update names of
13760 cl_optimization members.
13761 * c-opts.c (warning_as_error_callback, c_common_handle_option,
13762 sanitize_cpp_opts, finish_options): Update names of cpp_options
13765 2010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
13767 * c-common.h (OBJC_IS_CXX_KEYWORD): New macro. Updated comments.
13768 (objc_is_reserved_word): Removed.
13769 * c-common.c: Updated comments.
13770 * c-lex.c (c_lex_with_flags): Use OBJC_IS_CXX_KEYWORD instead of
13771 objc_is_reserved_word.
13772 * stub-objc.c (objc_is_reserved_word): Removed.
13774 2010-09-28 Iain Sandoe <iains@gcc.gnu.org>
13776 * c-common.h (objc_add_method_declaration): Adjust prototype to
13777 include attributes.
13778 (objc_start_method_definition): Likewise.
13779 (objc_build_keyword_decl): Likewise.
13780 * stub-objc.c:(objc_add_method_declaration): Handle attributes.
13781 (objc_start_method_definition): Likewise.
13782 (objc_build_keyword_decl): Likewise.
13784 2010-09-28 Iain Sandoe <iains@gcc.gnu.org>
13786 * c-common.h (objc_start_class_interface): Adjust prototype.
13787 (objc_start_category_interface): Likewise.
13788 (objc_start_protocol): Likewise.
13789 * stub-objc.c (objc_start_protocol): Adjust for extra argument.
13790 (objc_start_class_interface): Likewise.
13791 (objc_start_category_interface): Likewise.
13793 2010-09-27 Ian Lance Taylor <iant@google.com>
13795 * c-common.c (c_common_attribute_table): Add no_split_stack.
13796 (handle_no_split_stack_attribute): New static function.
13798 2010-09-27 Nicola Pero <nicola.pero@meta-innovation.com>
13800 Merge from 'apple/trunk' branch on FSF servers.
13802 2005-12-15 Fariborz Jahanian <fjahanian@apple.com>
13805 * c-common.h (objc_have_common_type): New declaration.
13806 * stub-objc.c (objc_have_common_type): New stub.
13808 2005-06-22 Ziemowit Laski <zlaski@apple.com>
13811 * c-common.h (objc_common_type): New prototype.
13812 * stub-objc.c (objc_common_type): New stub.
13814 2010-09-24 Jan Hubicka <jh@suse.cz>
13816 * c-common.c (handle_leaf_attribute): New function.
13817 (struct attribute_spec c_common_att): Add leaf.
13819 2010-09-22 Joseph Myers <joseph@codesourcery.com>
13821 * c.opt (-all-warnings, -ansi, -assert, -assert=, -comments,
13822 -comments-in-macros, -define-macro, -define-macro=, -dependencies,
13823 -dump, -dump=, -imacros, -imacros=, -include, -include=,
13824 -include-barrier, -include-directory, -include-directory=,
13825 -include-directory-after, -include-directory-after=,
13826 -include-prefix, -include-prefix=, -include-with-prefix,
13827 -include-with-prefix=, -include-with-prefix-after,
13828 -include-with-prefix-after=, -include-with-prefix-before,
13829 -include-with-prefix-before=, -no-integrated-cpp,
13830 -no-line-commands, -no-standard-includes, -no-warnings, -output,
13831 -output=, -pedantic, -pedantic-errors, -preprocess,
13832 -print-missing-file-dependencies, -trace-includes, -traditional,
13833 -traditional-cpp, -trigraphs, -undefine-macro, -undefine-macro=,
13834 -user-dependencies, -verbose, -write-dependencies,
13835 -write-user-dependencies, no-integrated-cpp, traditional): New.
13837 2010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
13840 * c-common.h (objc_start_method_definition): Return bool instead
13842 * stub-objc.c (objc_start_method_definition): Return bool instead
13845 2010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
13848 * c-common.h (objc_get_interface_ivars): New declaration.
13849 * stub-objc.c (objc_get_interface_ivars): New stub.
13851 2010-09-15 Ian Lance Taylor <iant@google.com>
13853 * c-common.c (parse_optimize_options): Do not capitalize warning
13854 messages. Remove period at end of warning message.
13856 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
13858 * c-common.c (handle_alias_ifunc_attribute): New, broken out of ...
13859 (handle_alias_attribute): ... here.
13860 (handle_ifunc_attribute): New.
13862 2010-09-06 Mark Mitchell <mark@codesourcery.com>
13864 * c-common.h (do_warn_double_promotion): Declare.
13865 * c-common.c (do_warn_double_promotion): Define.
13867 2010-09-05 Mark Mitchell <mark@codesourcery.com>
13869 * c.opt (Wdouble-promotion): New.
13871 2010-09-02 Joseph Myers <joseph@codesourcery.com>
13873 * c.opt (falt-external-templates, fhuge-objects, fvtable-gc,
13874 fvtable-thunks, fxref): Mark no longer supported in help text.
13876 2010-09-02 Joseph Myers <joseph@codesourcery.com>
13878 * c.opt (Wimport, fall-virtual, falt-external-templates,
13879 fdefault-inline, fenum-int-equiv, fexternal-templates,
13880 fguiding-decls, fhonor-std, fhuge-objects, flabels-ok,
13881 fname-mangling-version-, fnew-abi, fnonnull-objects,
13882 foptional-diags, fsquangle, fstrict-prototype, fthis-is-variable,
13883 fvtable-gc, fvtable-thunks, fxref): Mark with Ignore and Warn as
13885 (fhandle-exceptions): Mark with Alias and Warn.
13886 * c-opts.c (c_common_handle_option): Don't handle options marked
13889 2010-09-02 Joseph Myers <joseph@codesourcery.com>
13891 * c.opt (Wcomments, Werror-implicit-function-declaration,
13892 ftemplate-depth-, std=c89, std=c9x, std=gnu89, std=gnu9x,
13893 std=iso9899:1990, std=iso9899:1999, std=iso9899:199x): Mark as
13895 * c-common.c (option_codes): Use OPT_Wcomment instead of
13897 * c-opts.c (warning_as_error_callback, c_common_handle_option):
13898 Don't handle options marked as aliases.
13900 2010-08-25 Richard Guenther <rguenther@suse.de>
13902 * c-common.c (c_common_get_alias_set): Remove special
13903 handling for pointers.
13905 2010-08-20 Nathan Froyd <froydnj@codesourcery.com>
13907 * c-common.c: Use FOR_EACH_VEC_ELT.
13908 * c-gimplify.c: Likewise.
13909 * c-pragma.c: Likewise.
13911 2010-08-16 Joseph Myers <joseph@codesourcery.com>
13913 * c.opt (MDX): Change back to MD. Mark NoDriverArg instead of
13915 (MMDX): Change back to MMD. Mark NoDriverArg instead of
13917 * c-opts.c (c_common_handle_option): Use OPT_MD and OPT_MMD
13918 instead of OPT_MDX and OPT_MMDX.
13920 2010-08-16 Joseph Myers <joseph@codesourcery.com>
13922 * c.opt (MDX, MMDX, lang-asm): Mark RejectDriver.
13924 2010-08-12 Joseph Myers <joseph@codesourcery.com>
13926 * c.opt (MD, MMD): Change to MDX and MMDX.
13927 * c-opts.c (c_common_handle_option): Use OPT_MMD and OPT_MMDX.
13929 2010-08-11 Joseph Myers <joseph@codesourcery.com>
13931 * c-opts.c (c_common_handle_option): Call handle_generated_option
13932 instead of handle_option.
13934 2010-08-08 Nathan Froyd <froydnj@codesourcery.com>
13936 * c-pragma.c (add_to_renaming_pragma_list): Fix call to VEC_safe_push.
13937 (maybe_apply_renaming_pragma): Delete unneeded declarations.
13939 2010-08-08 Nathan Froyd <froydnj@codesourcery.com>
13941 * c-pragma.c (pending_redefinition): Declare. Declare a VEC of it.
13942 (pending_redefine_extname): Change type to a VEC.
13943 (add_to_renaming_pragma_list): Update for new type of
13944 pending_redefine_extname.
13945 (maybe_apply_renaming_pragma): Likewise.
13947 2010-08-04 Arnaud Charlet <charlet@adacore.com>
13949 * c-ada-spec.c (dump_ada_template): Mark underlying instance type as
13951 (dump_generic_ada_node): Code clean up. Use TREE_VISITED flag to
13952 decide whether a type has already been declared/seen.
13953 Do not go to the original type.
13954 (dump_nested_types): New parameter forward.
13955 Generate forward declaration if needed and mark type as visited.
13956 (print_ada_declaration): Call dump_nested_types if not already done.
13957 Mark types as visited.
13959 2010-08-03 Joseph Myers <joseph@codesourcery.com>
13961 * c.opt (-print-pch-checksum): Remove option.
13962 * c-opts.c (c_common_handle_option): Don't handle
13963 OPT_print_pch_checksum.
13965 2010-07-27 Joseph Myers <joseph@codesourcery.com>
13967 * c-common.h (c_common_handle_option): Update prototype and return
13969 * c-opts.c (c_common_handle_option): Update prototype and return
13970 value type. Update calls to handle_option and
13971 enable_warning_as_error.
13973 2010-07-27 Jakub Jelinek <jakub@redhat.com>
13976 * c-pretty-print.c (pp_c_expression): Handle C_MAYBE_CONST_EXPR.
13978 2010-07-27 Joseph Myers <joseph@codesourcery.com>
13980 * c-common.h (c_common_missing_argument): Remove.
13981 * c-opts.c (c_common_missing_argument): Remove.
13982 * c.opt (A, D, F, I, MD, MMD, MQ, MT, U, fconstant-string-class=,
13983 idirafter, imacros, include, isysroot, isystem, iquote): Add
13985 * c-objc-common.h (LANG_HOOKS_MISSING_ARGUMENT): Remove.
13987 2010-07-27 Joseph Myers <joseph@codesourcery.com>
13989 * c-common.h (c_common_option_lang_mask,
13990 c_common_initialize_diagnostics, c_common_complain_wrong_lang_p):
13992 (c_common_init_options): Update prototype.
13993 * c-opts.c (c_common_option_lang_mask): New.
13994 (c_common_initialize_diagnostics): Split out of
13995 c_common_init_options.
13996 (accept_all_c_family_options, c_common_complain_wrong_lang_p):
13998 (c_common_init_options): Update prototype. Use decoded options in
13999 search for -lang-asm.
14001 2010-07-15 Nathan Froyd <froydnj@codesourcery.com>
14003 * c-common.c: Carefully replace TREE_CHAIN with DECL_CHAIN.
14004 * c-format.c: Likewise.
14006 2010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
14008 * c-common.h: Include diagnostic-core.h. Error if already
14010 * c-semantics.c: Do not define GCC_DIAG_STYLE here.
14012 2010-07-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
14014 * c-common.c (IN_GCC_FRONTEND): Do not undef.
14015 Do not include expr.h
14016 (vector_mode_valid_p): Move here.
14018 2010-06-21 DJ Delorie <dj@redhat.com>
14020 * c-pragma.c (handle_pragma_diagnostic): Add push/pop,
14021 allow these pragmas anywhere.
14023 2010-06-14 Jakub Jelinek <jakub@redhat.com>
14026 * c-cppbuiltin.c: Include gt-c-family-c-cppbuiltin.h.
14027 (lazy_hex_fp_values, lazy_hex_fp_value_count): Add GTY(()) markers.
14028 (lazy_hex_fp_value, builtin_define_with_hex_fp_value): Use
14029 ggc_strdup instead of xstrdup.
14031 2010-06-10 Jakub Jelinek <jakub@redhat.com>
14033 * c-cppbuiltin.c: Include cpp-id-data.h.
14034 (lazy_hex_fp_values, lazy_hex_fp_value_count): New variables.
14035 (lazy_hex_fp_value): New function.
14036 (builtin_define_with_hex_fp_value): Provide definitions lazily.
14038 2010-06-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
14040 * c-gimplify.c: Do not include tree-flow.h
14042 2010-06-29 Joern Rennecke <joern.rennecke@embecosm.com>
14045 * c-common.c: Rename targetm member:
14046 targetm.enum_va_list -> targetm.enum_va_list_p
14048 2010-06-28 Anatoly Sokolov <aesok@post.ru>
14050 * c-common.c (shorten_compare): Adjust call to force_fit_type_double.
14052 2010-06-28 Steven Bosscher <steven@gcc.gnu.org>
14054 * c-cppbuiltin.c: Do not include except.h.
14056 2010-06-24 Andi Kleen <ak@linux.intel.com>
14058 * c-common.c (warn_for_omitted_condop): New.
14059 * c-common.h (warn_for_omitted_condop): Add prototype.
14061 2010-06-21 Joseph Myers <joseph@codesourcery.com>
14063 * c.opt (lang-objc): Remove.
14064 * c-opts.c (c_common_handle_option): Don't handle OPT_lang_objc.
14066 2010-06-21 Joern Rennecke <joern.rennecke@embecosm.com>
14068 * c-opts.c: Include "tm_p.h".
14070 2010-06-20 Joseph Myers <joseph@codesourcery.com>
14072 * c-common.c (parse_optimize_options): Update call to
14075 2010-06-18 Nathan Froyd <froydnj@codesourcery.com>
14077 * c-common.c (record_types_used_by_current_var_decl): Adjust for
14078 new type of types_used_by_cur_var_decl.
14080 2010-06-17 Joern Rennecke <joern.rennecke@embecosm.com>
14083 * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Add cast
14084 for C++ standard compliance.
14086 2010-06-16 Jason Merrill <jason@redhat.com>
14088 * c.opt: Add -Wnoexcept.
14090 2010-06-16 Richard Guenther <rguenther@suse.de>
14093 * c-common.c (c_common_truthvalue_conversion): Remove
14094 premature and wrong optimization concering ADDR_EXPRs.
14096 2010-06-15 Arnaud Charlet <charlet@adacore.com>
14098 * c-ada-spec.c (dump_sloc): Remove column info.
14099 (is_simple_enum): New function.
14100 (dump_generic_ada_node, print_ada_declaration): Map C enum types to Ada
14101 enum types when relevant.
14103 2010-06-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
14105 * c-common.c (conversion_warning): Warn at expression
14108 2010-06-10 Joseph Myers <joseph@codesourcery.com>
14110 * c-opts.c (c_common_handle_option): Don't handle
14113 2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
14115 * c-pragma.c (push_alignment): Use typed GC allocation.
14116 (handle_pragma_push_options): Likewise.
14118 * c-common.c (parse_optimize_options): Likewise.
14120 * c-common.h (struct sorted_fields_type): Add variable_size GTY
14123 2010-06-07 Joseph Myers <joseph@codesourcery.com>
14125 * c-common.c (flag_preprocess_only, flag_undef, flag_no_builtin,
14126 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
14127 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
14128 flag_signed_bitfields, warn_strict_null_sentinel,
14129 flag_nil_receivers, flag_zero_link, flag_replace_objc_classes,
14130 flag_gen_declaration, flag_no_gnu_keywords,
14131 flag_implement_inlines, flag_implicit_templates,
14132 flag_implicit_inline_templates, flag_optional_diags,
14133 flag_elide_constructors, flag_default_inline, flag_rtti,
14134 flag_conserve_space, flag_access_control, flag_check_new,
14135 flag_new_for_scope, flag_weak, flag_working_directory,
14136 flag_use_cxa_atexit, flag_use_cxa_get_exception_ptr,
14137 flag_enforce_eh_specs, flag_threadsafe_statics,
14138 flag_pretty_templates): Remove.
14139 * c-common.h (flag_preprocess_only, flag_nil_receivers,
14140 flag_objc_exceptions, flag_objc_sjlj_exceptions, flag_zero_link,
14141 flag_replace_objc_classes, flag_undef, flag_no_builtin,
14142 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
14143 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
14144 flag_const_strings, flag_signed_bitfields, flag_gen_declaration,
14145 flag_no_gnu_keywords, flag_implement_inlines,
14146 flag_implicit_templates, flag_implicit_inline_templates,
14147 flag_optional_diags, flag_elide_constructors, flag_default_inline,
14148 flag_rtti, flag_conserve_space, flag_access_control,
14149 flag_check_new, flag_new_for_scope, flag_weak,
14150 flag_working_directory, flag_use_cxa_atexit,
14151 flag_use_cxa_get_exception_ptr, flag_enforce_eh_specs,
14152 flag_threadsafe_statics, flag_pretty_templates,
14153 warn_strict_null_sentinel): Remove.
14154 * c.opt (E, Wstrict-null-sentinel, faccess-control, fasm,
14155 fbuiltin, fcheck-new, fconserve-space, felide-constructors,
14156 fenforce-eh-specs, ffor-scope, fgnu-keywords, fimplement-inlines,
14157 fimplicit-inline-templates, fimplicit-templates,
14158 flax-vector-conversions, fms-extensions, fnil-receivers,
14159 fnonansi-builtins, fpretty-templates, freplace-objc-classes,
14160 frtti, fshort-double, fshort-enums, fshort-wchar,
14161 fsigned-bitfields, fsigned-char, fstats, fthreadsafe-statics,
14162 funsigned-bitfields, funsigned-char, fuse-cxa-atexit,
14163 fuse-cxa-get-exception-ptr, fweak, fworking-directory, fzero-link,
14164 gen-decls, undef): Use Var.
14165 (fdefault-inline, foptional-diags): Document as doing nothing.
14166 * c-opts.c (c_common_handle_option): Remove cases for options now
14167 using Var. Mark ignored options as such.
14169 2010-06-05 Steven Bosscher <steven@gcc.gnu.org>
14171 * c-common.c: Moved to here from parent directory.
14172 * c-common.def: Likewise.
14173 * c-common.h: Likewise.
14174 * c-cppbuiltin.c: Likewise.
14175 * c-dump.c: Likewise.
14176 * c-format.c: Likewise.
14177 * c-format.h : Likewise.
14178 * c-gimplify.c: Likewise.
14179 * c-lex.c: Likewise.
14180 * c-omp.c: Likewise.
14182 * c-opts.c: Likewise.
14183 * c-pch.c: Likewise.
14184 * c-ppoutput.c: Likewise.
14185 * c-pragma.c: Likewise.
14186 * c-pragma.h: Likewise.
14187 * c-pretty-print.c: Likewise.
14188 * c-pretty-print.h: Likewise.
14189 * c-semantics.c: Likewise.
14190 * stub-objc.c: Likewise.
14192 * c-common.c: Include gt-c-family-c-common.h.
14193 * c-pragma.c: Include gt-c-family-c-pragma.h.
14195 Copyright (C) 2010-2023 Free Software Foundation, Inc.
14197 Copying and distribution of this file, with or without modification,
14198 are permitted in any medium without royalty provided the copyright
14199 notice and this notice are preserved.