1 2023-03-28 David Malcolm <dmalcolm@redhat.com>
4 * c-common.h (check_for_xor_used_as_pow): Add "rhs_loc" param.
5 * c-warn.cc (check_for_xor_used_as_pow): Add "rhs_loc" param.
6 Reject cases where involving macro expansions.
8 2023-03-28 Jason Merrill <jason@redhat.com>
11 * c-common.cc (verify_tree): Don't use sequenced handling
14 2023-03-17 Jakub Jelinek <jakub@redhat.com>
17 * c-ubsan.cc (ubsan_instrument_division): Handle all scalar integral
18 types rather than just INTEGER_TYPE.
20 2023-03-10 Marek Polacek <polacek@redhat.com>
24 * c-gimplify.cc (ubsan_walk_array_refs_r): For a MODIFY_EXPR, instrument
25 the RHS before the LHS.
27 2023-03-04 Jakub Jelinek <jakub@redhat.com>
30 * c-warn.cc (warn_for_sign_compare): Don't warn for unset bits
31 above innermost zero extension of BIT_NOT_EXPR result.
33 2023-03-04 Jakub Jelinek <jakub@redhat.com>
36 * c-warn.cc (warn_for_sign_compare): If c_common_get_narrower
37 doesn't return a narrower result, use TYPE_UNSIGNED to set unsignedp0
38 and unsignedp1. For the one BIT_NOT_EXPR case vs. one without,
39 only check for constant in the non-BIT_NOT_EXPR operand, use std::swap
40 to simplify the code, only warn if BIT_NOT_EXPR operand is extended
41 from narrower unsigned, fix up computation of mask for the constant
42 cases and for unsigned other operand case handle differently
43 BIT_NOT_EXPR result being sign vs. zero extended.
45 2023-03-04 Jakub Jelinek <jakub@redhat.com>
48 * c-warn.cc: Include langhooks.h.
49 (maybe_warn_shift_overflow): Set type0 to what TREE_TYPE (op0)
50 promotes to rather than TREE_TYPE (op0) itself, if TREE_TYPE (op0)
51 is narrower than type0 and unsigned, use wi::min_precision with
52 UNSIGNED and fold_convert op0 to type0 before emitting the warning.
54 2023-03-03 Alexandre Oliva <oliva@adacore.com>
56 * c-common.cc (c_common_nodes_and_builtins): Take
57 wchar_type_node for wint_type_node when aliased.
58 (c_stddef_cpp_builtins): Define __WINT_TYPE__, when aliased to
59 wchar_t, to the underlying type rather than wchar_t in
61 * c-cppbuiltin.cc (type_suffix): Handle wchar_type_node.
63 2023-02-28 Marek Polacek <polacek@redhat.com>
66 * c-warn.cc (check_address_or_pointer_of_packed_member): Check
69 2023-02-28 Jakub Jelinek <jakub@redhat.com>
72 * c-common.h (c_strict_flex_array_level_of): Declare.
73 * c-common.cc (c_strict_flex_array_level_of): New function,
74 moved and renamed from c-decl.cc's strict_flex_array_level_of.
75 * c-ubsan.cc (ubsan_instrument_bounds): Fix comment typo. For
76 C check c_strict_flex_array_level_of whether a trailing array
77 should be treated as flexible member like. Handle C [0] arrays.
78 Add 1 + index_off_by_one rather than index_off_by_one to bounds
79 and use tree_int_cst_lt rather than tree_int_cst_le for idx vs.
82 2023-02-23 Jakub Jelinek <jakub@redhat.com>
85 * c.opt (fcontracts): Fix description.
87 2023-02-22 Marek Polacek <polacek@redhat.com>
90 * c-gimplify.cc (c_genericize_control_stmt) <case STATEMENT_LIST>: Pass
92 (c_genericize): Call walk_tree with an explicit pset.
94 2023-02-18 Martin Uecker <uecker@tugraz.at>
97 * c-attribs.cc (append_access_attr): Use order of arguments when
99 (append_access_attr_idxs): Rename and make static.
100 * c-warn.cc (warn_parm_array_mismatch): Add assertion.
102 2023-02-16 Patrick Palka <ppalka@redhat.com>
104 * c-common.h: Mechanically drop static from static inline
105 functions via s/^static inline/inline/g.
107 2023-02-01 Jason Merrill <jason@redhat.com>
109 * c.opt: Add -Wno-changes-meaning.
111 2023-01-31 Marek Polacek <polacek@redhat.com>
115 * c-common.h (instantiation_dependent_expression_p): Declare.
116 * c-warn.cc (warn_duplicated_cond_add_or_warn): If the condition
117 is dependent, invalidate the chain.
119 2023-01-26 Marek Polacek <polacek@redhat.com>
122 * c-pragma.cc (handle_pragma_message): Warn for CPP_STRING_USERDEF.
124 2023-01-18 Marek Polacek <polacek@redhat.com>
127 * c-common.cc (check_case_value): Check INTEGRAL_TYPE_P.
129 2023-01-14 Jakub Jelinek <jakub@redhat.com>
132 * c-common.h (may_shorten_divmod): New static inline function.
134 2023-01-13 Eric Botcazou <ebotcazou@adacore.com>
136 * c-ada-spec.cc (is_float32): New function.
137 (is_float64): Likewise.
138 (is_float128): Tweak.
139 (dump_ada_node) <REAL_TYPE>: Call them to recognize more types.
141 2023-01-12 Lewis Hyatt <lhyatt@gmail.com>
143 PR preprocessor/108244
144 * c-pragma.cc (c_register_pragma_1): Don't attempt to register any
145 deferred pragmas if -fdirectives-only.
146 (init_pragma): Likewise.
148 2023-01-09 Martin Liska <mliska@suse.cz>
151 * c-attribs.cc (handle_target_clones_attribute): Check for
152 string constant for all target_clone attribute values.
154 2023-01-03 Florian Weimer <fweimer@redhat.com>
156 * c-cppbuiltin.cc (c_cpp_builtins): Define
157 __LIBGCC_DWARF_CIE_DATA_ALIGNMENT__.
159 2023-01-03 Florian Weimer <fweimer@redhat.com>
162 2023-01-03 Florian Weimer <fweimer@redhat.com>
164 * c-cppbuiltin.cc (__LIBGCC_DWARF_REG_SIZES_CONSTANT__):
165 Define if constant is known.
167 2023-01-03 Florian Weimer <fweimer@redhat.com>
170 2023-01-02 Florian Weimer <fweimer@redhat.com>
172 * c-cppbuiltin.cc (c_cpp_builtins): Define
173 __LIBGCC_DWARF_CIE_DATA_ALIGNMENT__.
175 2023-01-02 Florian Weimer <fweimer@redhat.com>
177 * c-cppbuiltin.cc (c_cpp_builtins): Define
178 __LIBGCC_DWARF_CIE_DATA_ALIGNMENT__.
180 2023-01-02 Florian Weimer <fweimer@redhat.com>
182 * c-cppbuiltin.cc (__LIBGCC_DWARF_REG_SIZES_CONSTANT__):
183 Define if constant is known.
185 2022-12-19 Marek Polacek <polacek@redhat.com>
188 * c-format.cc (check_function_format): Use get_attribute_name.
190 2022-12-16 Qing Zhao <qing.zhao@oracle.com>
192 * c.opt (Wstrict-flex-arrays): New option.
194 2022-12-02 Andrew MacLeod <amacleod@redhat.com>
196 * c-attribs.cc (handle_deprecated_attribute): Use type when
199 2022-12-02 Jakub Jelinek <jakub@redhat.com>
202 * c-omp.cc (c_omp_is_loop_iterator): For range for with structured
203 binding return TREE_VEC_LENGTH (d->declv) even if decl is equal
204 to any of the structured binding decls.
206 2022-11-30 Iskander Shakirzyanov <iskander@ispras.ru>
207 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
210 * c-common.cc (fold_offsetof,
211 convert_vector_to_array_for_subscript): Use OPT_Warray_bounds_
212 instead of OPT_Warray_bounds.
214 2022-11-24 Jakub Jelinek <jakub@redhat.com>
216 * c.opt (fcontract-role=, fcontract-semantic=): Terminate descriptions
219 2022-11-23 Andrew Pinski <apinski@marvell.com>
220 Jakub Jelinek <jakub@redhat.com>
223 * c-gimplify.cc (c_genericize): Use walk_tree_without_duplicates
224 instead of walk_tree for c_genericize_control_r.
226 2022-11-23 Jakub Jelinek <jakub@redhat.com>
228 * c.opt (fcontract-assumption-mode=, fcontract-continuation-mode=,
229 fcontract-role=, fcontract-semantic=): Add RejectNegative.
230 (fcontract-build-level=): Terminate description with dot.
232 2022-11-19 Jakub Jelinek <jakub@redhat.com>
234 * c-cppbuiltin.cc (c_cpp_builtins): Bump __cpp_constexpr
235 value from 202207L to 202211L.
237 2022-11-19 Jeff Chapman II <jchapman@lock3software.com>
238 Andrew Sutton <asutton@lock3software.com>
239 Andrew Marmaduke <amarmaduke@lock3software.com>
240 Michael Lopez <mlopez@lock3software.com>
241 Jason Merrill <jason@redhat.com>
243 * c.opt: Add contracts flags.
244 * c-cppbuiltin.cc (c_cpp_builtins): Add contracts feature-test
247 2022-11-16 Marek Polacek <polacek@redhat.com>
250 * c-cppbuiltin.cc (c_cpp_builtins): Update value of __cpp_constexpr for
252 * c-opts.cc (c_common_post_options): Set warn_invalid_constexpr
253 depending on cxx_dialect.
254 * c.opt (Winvalid-constexpr): New option.
256 2022-11-16 Jakub Jelinek <jakub@redhat.com>
258 * c-common.def (CONCEPT_DECL): New tree, moved here from
260 * c-common.cc (c_common_init_ts): Handle CONCEPT_DECL.
261 * c-attribs.cc (handle_deprecated_attribute): Allow deprecated
262 attribute on CONCEPT_DECL.
264 2022-11-15 Lewis Hyatt <lhyatt@gmail.com>
266 * c-opts.cc (c_finish_options): Use special_fname_builtin () rather
267 than a hard-coded string.
269 2022-11-15 Jakub Jelinek <jakub@redhat.com>
271 * c-cppbuiltin.cc (c_cpp_builtins): Bump C++23
272 __cpp_multidimensional_subscript macro value to 202211L.
274 2022-11-15 Patrick Palka <ppalka@redhat.com>
277 * c-lex.cc (c_common_has_attribute): Return 1 for init_priority
278 iff SUPPORTS_INIT_PRIORITY.
280 2022-11-14 Martin Liska <mliska@suse.cz>
283 2022-11-09 Martin Liska <mliska@suse.cz>
285 * c-target.def: Port to RST.
287 2022-11-12 Joseph Myers <joseph@codesourcery.com>
289 * c-common.cc (c_common_reswords): Use D_C2X instead of D_CXXONLY.
291 2022-11-11 Jonathan Wakely <jwakely@redhat.com>
294 * c-pragma.cc (handle_pragma_ignore): New function.
295 (init_pragma): Register region and endregion pragmas.
297 2022-11-09 Martin Liska <mliska@suse.cz>
299 * c-target.def: Port to RST.
301 2022-11-05 Lewis Hyatt <lhyatt@gmail.com>
303 PR preprocessor/55971
304 * c-ppoutput.cc (adjust_for_newlines): Update comment.
306 2022-11-03 Jason Merrill <jason@redhat.com>
308 * c-opts.cc (c_common_post_options): -fconcepts no longer implies
309 -fconcepts-ts before C++20.
311 2022-10-28 Joseph Myers <joseph@codesourcery.com>
313 * c-common.cc (def_fn_type): Call build_function_type for
314 zero-argument variable-argument function.
315 (c_common_nodes_and_builtins): Build default_function_type with
317 * c.opt (fallow-parameterless-variadic-functions): Mark as ignored
320 2022-10-28 Joseph Myers <joseph@codesourcery.com>
323 * c-common.h (ENUM_UNDERLYING_TYPE, ENUM_FIXED_UNDERLYING_TYPE_P):
324 New. Moved from cp/cp-tree.h.
325 * c-warn.cc (warnings_for_convert_and_check): Do not consider
326 conversions to enum with underlying type bool to overflow.
328 2022-10-26 Marek Polacek <polacek@redhat.com>
331 * c.opt (Wdangling-reference): New.
333 2022-10-19 Joseph Myers <joseph@codesourcery.com>
335 * c-format.h (enum format_lengths): Add FMT_LEN_w8, FMT_LEN_w16,
336 FMT_LEN_w32, FMT_LEN_w64, FMT_LEN_wf8, FMT_LEN_wf16, FMT_LEN_wf32
338 (NOARGUMENTS, NOLENGTHS): Update definitions.
339 (T_I8, T2X_I8, T_I16, T2X_I16, T_I32, T2X_I32, T_I64, T2X_I64)
340 (T_U8, T2X_U8, T_U16, T2X_U16, T_U32, T2X_U32, T_U64, T2X_U64)
341 (T_IF8, T2X_IF8, T_IF16, T2X_IF16, T_IF32, T2X_IF32, T_IF64)
342 (T2X_IF64, T_UF8, T2X_UF8, T_UF16, T2X_UF16, T_UF32, T2X_UF32)
343 (T_UF64, T2X_UF64): New macros.
344 * c-format.cc (printf_length_specs, scanf_length_specs): Add wN
345 and wfN length modifiers.
346 (print_char_table, scan_char_table): Add entries using wN and wfN
349 2022-10-18 Joseph Myers <joseph@codesourcery.com>
352 * c-common.cc (c_common_type_for_size): Add fallback to
353 widest_unsigned_literal_type_node or
354 widest_integer_literal_type_node for precision that may not
355 exactly match the precision of those types.
357 2022-10-14 Jakub Jelinek <jakub@redhat.com>
359 * c-cppbuiltin.cc (c_cpp_builtins): If bfloat16_type_node,
360 predefine __BFLT16_*__ macros and for C++23 also
361 __STDCPP_BFLOAT16_T__. Predefine bfloat16_type_node related
362 macros for -fbuilding-libgcc.
363 * c-lex.cc (interpret_float): Handle CPP_N_BFLOAT16.
365 2022-10-14 Jakub Jelinek <jakub@redhat.com>
369 * c-common.def (EXCESS_PRECISION_EXPR): Remove comment part about
370 the tree being specific to C/ObjC.
371 * c-opts.cc (c_common_post_options): Handle flag_excess_precision
372 in C++ the same as in C.
373 * c-lex.cc (interpret_float): Set const_type to excess_precision ()
376 2022-10-13 Joseph Myers <joseph@codesourcery.com>
378 * c-cppbuiltin.cc (builtin_define_float_constants): Do not use
379 value 2 for *_IS_IEC_60559.
381 2022-10-12 Lewis Hyatt <lhyatt@gmail.com>
383 PR preprocessor/60014
384 PR preprocessor/60723
385 * c-ppoutput.cc (class token_streamer): Remove member
386 line_marker_emitted to...
387 (token_streamer::stream): ...a local variable here. Set
388 print.prev_was_system_token on all code paths.
390 2022-10-10 Nathan Sidwell <nathan@acm.org>
392 * c-opts.cc (c_common_post_options): Bump abi to 18.
394 2022-10-10 Marek Polacek <polacek@redhat.com>
397 * c-pretty-print.cc (pp_c_specifier_qualifier_list): Print only GNU
399 (c_pretty_printer::direct_abstract_declarator): Print the standard [[]]
401 (pp_c_attributes): Remove.
402 (pp_c_attributes_display): Print the [[]] form if appropriate. Use
403 get_attribute_name. Don't print a trailing space when printing the
405 * c-pretty-print.h (pp_c_attributes): Remove.
407 2022-10-07 Qing Zhao <qing.zhao@oracle.com>
409 * c-attribs.cc (handle_strict_flex_array_attribute): New function.
410 (c_common_attribute_table): New item for strict_flex_array.
411 * c.opt: (fstrict-flex-arrays): New option.
412 (fstrict-flex-arrays=): New option.
414 2022-10-07 Martin Liska <mliska@suse.cz>
416 * name-hint.h: Use std::move.
418 2022-10-07 Jakub Jelinek <jakub@redhat.com>
420 * c-common.cc (attribute_fallthrough_p): Lookup fallthrough attribute
421 only in gnu namespace or as standard attribute, treat fallthrough
422 attributes in other namespaces like any other unknown attribute.
424 2022-10-06 Joseph Myers <joseph@codesourcery.com>
426 * c-common.cc (c_common_reswords): Mark typeof as D_EXT11. Add
428 * c-common.h (enum rid): Add RID_TYPEOF_UNQUAL.
429 (D_EXT11): New macro. Values of subsequent macros updated.
431 2022-10-06 Jakub Jelinek <jakub@redhat.com>
434 * c-attribs.cc (handle_assume_attribute): New function.
435 (c_common_attribute_table): Add entry for assume attribute.
436 * c-lex.cc (c_common_has_attribute): Handle
437 __have_cpp_attribute (assume).
439 2022-10-04 Jakub Jelinek <jakub@redhat.com>
441 * c-omp.cc (c_omp_directives): Uncomment begin declare target
444 2022-10-03 Patrick Palka <ppalka@redhat.com>
446 * c-common.cc (c_common_reswords): Use RID_IS_SAME instead of
449 2022-10-03 Joseph Myers <joseph@codesourcery.com>
451 * c-cppbuiltin.cc (builtin_define_float_constants): Do not
452 special-case __*_EPSILON__ setting for IBM long double for C2x.
454 2022-09-30 Patrick Palka <ppalka@redhat.com>
456 * c-common.cc (c_common_reswords): Use cp/cp-trait.def to handle
458 * c-common.h (enum rid): Likewise.
460 2022-09-29 Joseph Myers <joseph@codesourcery.com>
462 * c-lex.cc (c_common_has_attribute): Handle noreturn attribute for
465 2022-09-29 Patrick Palka <ppalka@redhat.com>
467 * c-common.cc (c_common_reswords): Add __remove_cv,
468 __remove_reference and __remove_cvref.
469 * c-common.h (enum rid): Add RID_REMOVE_CV, RID_REMOVE_REFERENCE
470 and RID_REMOVE_CVREF.
472 2022-09-27 Marek Polacek <polacek@redhat.com>
476 * c-cppbuiltin.cc (c_cpp_builtins): Define __cpp_implicit_move.
478 2022-09-27 Marek Polacek <polacek@redhat.com>
480 * c-format.cc (c_keywords): Drop nothrow.
482 2022-09-27 Jakub Jelinek <jakub@redhat.com>
485 * c-cppbuiltin.cc (c_cpp_builtins): Predefine
486 __cpp_static_call_operator=202207L for C++23.
488 2022-09-27 Jakub Jelinek <jakub@redhat.com>
490 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_ASSUME,
491 PRAGMA_OMP_ASSUMES and PRAGMA_OMP_BEGIN. Rename
492 PRAGMA_OMP_END_DECLARE_TARGET to PRAGMA_OMP_END.
493 * c-pragma.cc (omp_pragmas): Add assumes and begin.
494 For end rename PRAGMA_OMP_END_DECLARE_TARGET to PRAGMA_OMP_END.
495 (omp_pragmas_simd): Add assume.
496 * c-common.h (c_omp_directives): Declare.
497 * c-omp.cc (omp_directives): Rename to ...
498 (c_omp_directives): ... this. No longer static. Uncomment
499 assume, assumes, begin assumes and end assumes entries.
500 In end declare target entry rename PRAGMA_OMP_END_DECLARE_TARGET
502 (c_omp_categorize_directive): Adjust for omp_directives to
503 c_omp_directives renaming.
505 2022-09-27 Jakub Jelinek <jakub@redhat.com>
509 * c-common.cc (c_common_reswords): Change _Float{16,32,64,128} and
510 _Float{32,64,128}x flags from D_CONLY to 0.
511 (shorten_binary_op): Punt if common_type returns error_mark_node.
512 (shorten_compare): Likewise.
513 (c_common_nodes_and_builtins): For C++ record _Float{16,32,64,128}
514 and _Float{32,64,128}x builtin types if available. For C++
515 clear float128t_type_node.
516 * c-cppbuiltin.cc (c_cpp_builtins): Predefine
517 __STDCPP_FLOAT{16,32,64,128}_T__ for C++23 if supported.
518 * c-lex.cc (interpret_float): For q/Q suffixes prefer
519 float128t_type_node over float128_type_node. Allow
520 {f,F}{16,32,64,128} suffixes for C++ if supported with pedwarn
521 for C++20 and older. Allow {f,F}{32,64,128}x suffixes for C++
522 with pedwarn. Don't call excess_precision_type for C++.
524 2022-09-26 Marek Polacek <polacek@redhat.com>
527 * c-cppbuiltin.cc (c_cpp_builtins): Update value of __cpp_char8_t
530 2022-09-23 Marek Polacek <polacek@redhat.com>
533 * c-common.cc (c_common_reswords): Add __is_convertible and
534 __is_nothrow_convertible.
535 * c-common.h (enum rid): Add RID_IS_CONVERTIBLE and
536 RID_IS_NOTHROW_CONVERTIBLE.
538 2022-09-22 David Malcolm <dmalcolm@redhat.com>
541 * c-warn.cc (check_for_xor_used_as_pow): Don't try checking
542 values that don't fit in uhwi.
544 2022-09-15 Richard Biener <rguenther@suse.de>
546 * c-common.h (build_void_list_node): Remove.
547 * c-common.cc (c_common_nodes_and_builtins): Do not initialize
550 2022-09-09 Jan-Benedict Glaw <jbglaw@lug-owl.de>
552 * c-format.cc (convert_format_name_to_system_name): Fix warning.
554 2022-09-07 Joseph Myers <joseph@codesourcery.com>
556 * c-common.cc (c_common_reswords): Use D_C2X instead of D_CXXONLY
557 for alignas, alignof, bool, false, static_assert, thread_local and
560 2022-09-07 Jakub Jelinek <jakub@redhat.com>
562 * c.opt (Winvalid-utf8): Use ObjC instead of objC. Remove
563 " in comments" from description.
564 (Wunicode): New option.
566 2022-09-06 Jakub Jelinek <jakub@redhat.com>
569 * c-omp.cc (c_omp_split_clauses): Handle OMP_CLAUSE_DOACROSS.
571 2022-09-03 Jakub Jelinek <jakub@redhat.com>
573 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_DOACROSS.
574 * c-omp.cc (c_finish_omp_depobj): Check also for OMP_CLAUSE_DOACROSS
575 clause and diagnose it. Don't handle OMP_CLAUSE_DEPEND_SOURCE and
576 OMP_CLAUSE_DEPEND_SINK. Assert kind is not OMP_CLAUSE_DEPEND_INVALID.
578 2022-09-02 David Malcolm <dmalcolm@redhat.com>
581 * c-common.h (check_for_xor_used_as_pow): New decl.
582 * c-lex.cc (c_lex_with_flags): Add DECIMAL_INT to flags as appropriate.
583 * c-warn.cc (check_for_xor_used_as_pow): New.
584 * c.opt (Wxor-used-as-pow): New.
586 2022-09-01 Jason Merrill <jason@redhat.com>
588 * c-common.cc (c_common_nodes_and_builtins): Set TREE_STRING_FLAG on
590 (braced_list_to_string): Check for char-sized elements.
592 2022-09-01 Jakub Jelinek <jakub@redhat.com>
595 * c.opt (-Winvalid-utf8): New warning.
596 * c-opts.cc (c_common_handle_option) <case OPT_finput_charset_>:
597 Set cpp_opts->cpp_input_charset_explicit.
598 (c_common_post_options): If -finput-charset=UTF-8 is explicit
599 in C++23, enable -Winvalid-utf8 by default and if -pedantic
600 or -pedantic-errors, make it a pedwarn.
602 2022-08-31 Joseph Myers <joseph@codesourcery.com>
604 * c-attribs.cc (handle_deprecated_attribute): Check and pedwarn
606 * c-common.cc (c_add_case_label): Add argument ATTRS. Call
608 * c-common.h (do_case, c_add_case_label): Update declarations.
609 * c-lex.cc (c_common_has_attribute): For C, produce a result of
610 201910 for fallthrough and 202106 for maybe_unused.
612 2022-08-26 Marek Polacek <polacek@redhat.com>
615 * c.opt (Wself-move): New option.
617 2022-08-26 Jakub Jelinek <jakub@redhat.com>
619 * c-common.cc (check_builtin_function_arguments): Handle
620 BUILT_IN_ISSIGNALING.
622 2022-08-26 Jakub Jelinek <jakub@redhat.com>
625 * c-cppbuiltin.cc (c_cpp_builtins): Predefine
626 __cpp_named_character_escapes to 202207L.
628 2022-08-25 Marek Polacek <polacek@redhat.com>
630 * c-common.cc (c_common_reswords): Enable nullptr in C2X.
631 (c_common_nodes_and_builtins): Create the built-in node for nullptr.
632 * c-common.h (enum c_tree_index): Add CTI_NULLPTR, CTI_NULLPTR_TYPE.
633 (struct c_common_resword): Resize the disable member.
635 (nullptr_node): Define.
636 (nullptr_type_node): Define.
637 (NULLPTR_TYPE_P): Define.
638 * c-pretty-print.cc (c_pretty_printer::simple_type_specifier): Handle
640 (c_pretty_printer::direct_abstract_declarator): Likewise.
641 (c_pretty_printer::constant): Likewise.
643 2022-08-16 Tom Honermann <tom@honermann.net>
646 * c-opts.cc (c_common_post_options): Disable -Wc++20-compat
647 diagnostics in C++20 and later.
648 * c.opt (Wc++20-compat): Enable hooks for the preprocessor.
650 2022-08-11 Marek Polacek <polacek@redhat.com>
653 * c-gimplify.cc (c_gimplify_expr) <case DECL_EXPR>: Don't call
654 suppress_warning here.
656 2022-08-08 Tom Honermann <tom@honermann.net>
658 PR preprocessor/106426
659 * c-opts.cc (c_common_post_options): Assign cpp_opts->unsigned_utf8char
660 subject to -fchar8_t, -fsigned-char, and/or -funsigned-char.
662 2022-08-08 Tom Honermann <tom@honermann.net>
664 * c-lex.cc (lex_string, lex_charconst): Use char8_t as the type
665 of CPP_UTF8CHAR and CPP_UTF8STRING when char8_t support is
667 * c-opts.cc (c_common_post_options): Set flag_char8_t if
670 2022-07-31 Lewis Hyatt <lhyatt@gmail.com>
673 * c-common.h: Rename global done_lexing to
674 override_libcpp_locations.
675 * c-common.cc (c_cpp_diagnostic): Likewise.
676 * c-opts.cc (c_common_finish): Set override_libcpp_locations
677 (formerly done_lexing) immediately prior to calling cpp_finish ().
679 2022-07-27 Lewis Hyatt <lhyatt@gmail.com>
681 * c-ppoutput.cc (token_streamer::stream): Update input_location
682 prior to streaming each token.
684 2022-07-23 Immad Mir <mirimmad@outlook.com>
686 * c-attribs.cc: (c_common_attribute_table): add three new attributes
687 namely: fd_arg, fd_arg_read and fd_arg_write.
688 (handle_fd_arg_attribute): New.
690 2022-07-15 Marek Polacek <polacek@redhat.com>
693 * c-common.cc (c_common_reswords): Add
694 __reference_constructs_from_temporary and
695 __reference_converts_from_temporary.
696 * c-common.h (enum rid): Add RID_REF_CONSTRUCTS_FROM_TEMPORARY and
697 RID_REF_CONVERTS_FROM_TEMPORARY.
699 2022-07-15 Jonathan Wakely <jwakely@redhat.com>
701 * c-format.cc (class range_label_for_format_type_mismatch):
702 Adjust to new label_text API.
704 2022-07-11 Lewis Hyatt <lhyatt@gmail.com>
706 PR preprocessor/106252
707 * c-pragma.cc (handle_pragma_diagnostic_impl): Don't look up the
708 option argument prior to verifying the option was found.
710 2022-07-07 David Malcolm <dmalcolm@redhat.com>
712 * c-format.cc (range_label_for_format_type_mismatch::get_text):
713 Update for removal of label_text::maybe_free in favor of automatic
716 2022-07-06 Lewis Hyatt <lhyatt@gmail.com>
718 PR preprocessor/53920
720 * c-common.cc (c_option_is_from_cpp_diagnostics): New function.
721 * c-common.h (c_option_is_from_cpp_diagnostics): Declare.
722 (c_pp_stream_token): Declare.
723 * c-ppoutput.cc (init_pp_output): Refactor logic about skipping
725 (should_output_pragmas): ...here. New function.
726 (token_streamer::stream): Support handling early pragmas.
727 (do_line_change): Likewise.
728 (c_pp_stream_token): New function.
729 * c-pragma.cc (struct pragma_diagnostic_data): New helper class.
730 (pragma_diagnostic_lex_normal): New function. Moved logic for
731 interpreting GCC diagnostic pragmas here.
732 (pragma_diagnostic_lex_pp): New function for parsing diagnostic pragmas
733 directly from libcpp.
734 (handle_pragma_diagnostic): Refactor into helper function...
735 (handle_pragma_diagnostic_impl): ...here. New function.
736 (handle_pragma_diagnostic_early): New function.
737 (handle_pragma_diagnostic_early_pp): New function.
738 (struct pragma_ns_name): Renamed to...
739 (struct pragma_pp_data): ...this. Add new "early_handler" member.
740 (c_register_pragma_1): Support early pragmas in the preprocessor.
741 (c_register_pragma_with_early_handler): New function.
742 (c_register_pragma): Support the new early handlers in struct
743 internal_pragma_handler.
744 (c_register_pragma_with_data): Likewise.
745 (c_register_pragma_with_expansion): Likewise.
746 (c_register_pragma_with_expansion_and_data): Likewise.
747 (c_invoke_early_pragma_handler): New function.
748 (c_pp_invoke_early_pragma_handler): New function.
749 (init_pragma): Add early pragma support for diagnostic pragmas.
750 * c-pragma.h (struct internal_pragma_handler): Add new early handler
752 (c_register_pragma_with_early_handler): Declare.
753 (c_invoke_early_pragma_handler): Declare.
754 (c_pp_invoke_early_pragma_handler): Declare.
756 2022-07-05 Marek Polacek <polacek@redhat.com>
759 * c-format.cc (check_format_arg): Don't emit -Wformat warnings with
762 2022-07-01 Marek Polacek <polacek@redhat.com>
765 * c-common.h (enum rid): Update RID_LAST_CXX20.
767 2022-06-30 Jonathan Wakely <jwakely@redhat.com>
769 * known-headers.cc (get_stdlib_header_for_name): Add <time.h>
772 2022-06-24 Jason Merrill <jason@redhat.com>
776 * c.opt (Woverloaded-virtual): Add levels, include in -Wall.
778 2022-06-18 Jakub Jelinek <jakub@redhat.com>
780 * c-ubsan.cc (ubsan_instrument_division, ubsan_instrument_shift):
781 Use flag_sanitize_trap & SANITIZE_??? instead of
782 flag_sanitize_undefined_trap_on_error. If 2 sanitizers are involved
783 and flag_sanitize_trap differs for them, emit __builtin_trap only
784 for the comparison where trap is requested.
785 (ubsan_instrument_vla, ubsan_instrument_return): Use
786 lag_sanitize_trap & SANITIZE_??? instead of
787 flag_sanitize_undefined_trap_on_error.
789 2022-06-13 Jason Merrill <jason@redhat.com>
791 * c-ubsan.cc (ubsan_instrument_return): Use BUILTINS_LOCATION.
793 2022-05-27 Marek Polacek <polacek@redhat.com>
796 * c-attribs.cc (get_priority): Check FUNCTION_DECL.
798 2022-05-27 Jakub Jelinek <jakub@redhat.com>
800 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ENTER.
802 2022-05-20 David Malcolm <dmalcolm@redhat.com>
804 * c-format.cc: Replace uses of "FINAL" and "OVERRIDE" with "final"
806 * c-pretty-print.h: Likewise.
808 2022-05-18 Marek Polacek <polacek@redhat.com>
811 * c.opt (Wenum-int-mismatch): New.
813 2022-05-18 Marek Polacek <polacek@redhat.com>
816 * c-warn.cc (c_do_switch_warnings): Don't warn about unhandled
817 enumerator when it was marked with attribute unused.
819 2022-05-18 Eric Botcazou <ebotcazou@adacore.com>
821 * c-ada-spec.cc (dump_ada_node) <COMPLEX_TYPE>: Deal with usual
822 floating-point complex types.
823 <POINTER_TYPE>: Do not use limited_with clause if the designated
824 type is a scalar type.
826 2022-05-17 Jakub Jelinek <jakub@redhat.com>
828 * c-omp.cc (c_finish_omp_depobj): Handle
829 OMP_CLAUSE_DEPEND_INOUTSET.
831 2022-05-16 Jason Merrill <jason@redhat.com>
834 * c-attribs.cc (handle_mode_attribute): Don't fix broken typedefs
837 2022-05-16 Martin Liska <mliska@suse.cz>
839 * c-common.cc (ARRAY_SIZE): Use ARRAY_SIZE.
840 (c_common_nodes_and_builtins): Likewise.
841 * c-format.cc (check_tokens): Likewise.
842 (check_plain): Likewise.
843 * c-pragma.cc (c_pp_lookup_pragma): Likewise.
844 (init_pragma): Likewise.
845 * known-headers.cc (get_string_macro_hint): Likewise.
846 (get_stdlib_header_for_name): Likewise.
847 * c-attribs.cc: Likewise.
849 2022-05-13 Richard Biener <rguenther@suse.de>
851 * c-omp.cc: Remove gimple-fold.h include.
853 2022-05-12 Jakub Jelinek <jakub@redhat.com>
855 * c-common.h (enum rid): Add RID_OMP_ALL_MEMORY.
856 * c-omp.cc (c_finish_omp_depobj): Don't build_fold_addr_expr
857 if null_pointer_node.
859 2022-05-11 Martin Liska <mliska@suse.cz>
862 * c-opts.cc (c_common_handle_option): Change option name.
863 * c.opt: Remove Joined and use Separate option.
865 2022-05-09 Alex Coplan <alex.coplan@arm.com>
867 * c-common.h (get_dump_info): Delete.
868 * c-gimplify.cc (c_genericize): Get TDI_original dump file info
869 from the global dump_manager instead of the (now obsolete)
871 * c-opts.cc (original_dump_file): Delete.
872 (original_dump_flags): Delete.
873 (c_common_parse_file): Switch to using global dump_manager to
874 manage the original dump file; fix leak of dump file.
875 (get_dump_info): Delete.
877 2022-05-07 Marek Polacek <polacek@redhat.com>
881 * c-attribs.cc (positional_argument): Pass POS by reference. Deal
882 with FN being either a function declaration or function type. Use
883 maybe_adjust_arg_pos_for_attribute.
884 * c-common.cc (check_function_arguments): Maybe pass FNDECL down to
885 check_function_format.
886 * c-common.h (maybe_adjust_arg_pos_for_attribute): Declare.
887 (positional_argument): Adjust.
888 * c-format.cc (get_constant): Rename to ...
889 (validate_constant): ... this. Take EXPR by reference. Return bool
891 (handle_format_arg_attribute): Don't overwrite FORMAT_NUM_EXPR by the
892 return value of validate_constant.
893 (decode_format_attr): Don't overwrite FORMAT_NUM_EXPR and
894 FIRST_ARG_NUM_EXPR by the return value of validate_constant.
895 (check_function_format): Adjust a parameter name.
896 (handle_format_attribute): Maybe pass FNDECL down to decode_format_attr.
898 2022-05-04 Marek Polacek <polacek@redhat.com>
900 * c-warn.cc (warnings_for_convert_and_check): Convert constants of type
903 2022-04-30 Jason Merrill <jason@redhat.com>
906 * c-attribs.cc (handle_mode_attribute): Copy attributes, aligned,
908 * c-common.cc (set_underlying_type): Add assert.
910 2022-04-26 Patrick Palka <ppalka@redhat.com>
913 * c-common.cc (verify_tree) [restart]: Move up to before the
916 2022-04-11 Jakub Jelinek <jakub@redhat.com>
919 * c-common.cc (c_common_nodes_and_builtins): After registering __int%d
920 and __int%d__ builtin types, initialize corresponding ridpointers
923 2022-03-30 Marek Polacek <polacek@redhat.com>
926 * c-warn.cc (conversion_warning) <case COND_EXPR>: Don't call
927 conversion_warning when OP1 is null.
929 2022-03-30 Thomas Schwinge <thomas@codesourcery.com>
931 * c.opt (Wc++11-extensions, Wc++14-extensions, Wc++17-extensions)
932 (Wc++20-extensions, Wc++23-extensions): Remove 'LangEnabledBy'
935 2022-03-30 Thomas Schwinge <thomas@codesourcery.com>
937 * c.opt (Wuse-after-free): Remove.
939 2022-03-30 Thomas Schwinge <thomas@codesourcery.com>
941 * c.opt (Warray-bounds): Remove.
943 2022-03-26 Thomas Schwinge <thomas@codesourcery.com>
945 * c.opt: Properly quote comment.
947 2022-03-25 Eric Botcazou <ebotcazou@adacore.com>
949 * c-ada-spec.cc (dump_ada_import): Deal with the "section" attribute
950 (dump_ada_node) <POINTER_TYPE>: Do not modify and pass the name, but
951 the referenced type instead. Deal with the anonymous original type
952 of a typedef'ed type. In the actual access case, follow the chain
953 of external subtypes.
954 <TYPE_DECL>: Tidy up control flow.
956 2022-03-21 Qian Jianhua <qianjh@cn.fujitsu.com>
958 * c-ada-spec.cc: Change array length
960 2022-03-19 Arthur Cohen <arthur.cohen@embecosm.com>
962 * c-common.cc (c_family_tests): Call the new tests.
963 * c-common.h (c_diagnostic_tests): Declare.
964 (c_opt_problem_cc_tests): Likewise.
966 2022-03-19 Jakub Jelinek <jakub@redhat.com>
969 * c-pretty-print.cc (c_fold_indirect_ref_for_warn): For C++ don't
970 return COMPONENT_REFs with FIELD_DECLs whose containing scope can't
973 2022-03-16 Christophe Lyon <christophe.lyon@arm.com>
974 Roger Sayle <roger@nextmovesoftware.com>
977 * c-attribs.cc (decl_or_type_attrs): Add error_mark_node check.
979 2022-03-16 Patrick Palka <ppalka@redhat.com>
982 * c.opt: Add -ffold-simple-inlines.
984 2022-03-13 Tobias Burnus <tobias@codesourcery.com>
986 * c-target.def (check_string_object_format_arg): Fix description typo.
988 2022-03-12 Thomas Schwinge <thomas@codesourcery.com>
991 * c-common.h (c_omp_map_clause_name): Remove.
992 * c-omp.cc (c_omp_map_clause_name): Remove.
994 2022-03-09 Jakub Jelinek <jakub@redhat.com>
997 * c-opts.cc (c_common_post_options): Don't enable
998 -Wshift-negative-value from -Wextra for C++20 or later.
999 * c-ubsan.cc (ubsan_instrument_shift): Adjust comments.
1000 * c-warn.cc (maybe_warn_shift_overflow): Use TYPE_OVERFLOW_WRAPS
1001 instead of TYPE_UNSIGNED.
1003 2022-03-07 Jakub Jelinek <jakub@redhat.com>
1005 * c-attribs.cc: Fix up duplicated word issue in a comment.
1007 2022-03-01 Martin Liska <mliska@suse.cz>
1010 * c-attribs.cc (handle_target_clones_attribute): Use
1011 get_target_clone_attr_len and report warning soon.
1013 2022-02-17 Jonathan Wakely <jwakely@redhat.com>
1015 * c-pragma.cc (handle_pragma_pack): Remove parameter name.
1016 (handle_pragma_weak): Likewise.
1017 (handle_pragma_scalar_storage_order): Likewise.
1018 (handle_pragma_redefine_extname): Likewise.
1019 (handle_pragma_visibility): Likewise.
1020 (handle_pragma_diagnostic): Likewise.
1021 (handle_pragma_target): Likewise.
1022 (handle_pragma_optimize): Likewise.
1023 (handle_pragma_push_options): Likewise.
1024 (handle_pragma_pop_options): Likewise.
1025 (handle_pragma_reset_options): Likewise.
1026 (handle_pragma_message): Likewise.
1027 (handle_pragma_float_const_decimal64): Likewise.
1029 2022-02-16 Jakub Jelinek <jakub@redhat.com>
1032 * c-omp.cc (c_finish_omp_atomic): For MIN_EXPR/MAX_EXPR, try first
1033 build_binary_op with LT_EXPR and only if that doesn't return
1034 error_mark_node call build_modify_expr.
1036 2022-02-16 Jakub Jelinek <jakub@redhat.com>
1039 * c-common.cc (shorten_compare): Convert original arguments to
1040 the original *restype_ptr when mixing binary and decimal float.
1042 2022-02-14 Richard Biener <rguenther@suse.de>
1045 * c-pretty-print.cc (c_pretty_printer::postfix_expression): Handle
1046 internal function calls.
1048 2022-02-11 Richard Biener <rguenther@suse.de>
1050 * c-attribs.cc (c_common_attribute_table): Add entry for
1052 (handle_vector_mask_attribute): New.
1054 2022-02-10 Marcel Vollweiler <marcel@codesourcery.com>
1056 * c-omp.cc (c_omp_split_clauses): Added OMP_CLAUSE_HAS_DEVICE_ADDR case.
1057 * c-pragma.h (enum pragma_kind): Added 5.1 in comment.
1058 (enum pragma_omp_clause): Added PRAGMA_OMP_CLAUSE_HAS_DEVICE_ADDR.
1060 2022-02-09 Jason Merrill <jason@redhat.com>
1062 * c-cppbuiltin.cc (c_cpp_builtins): Update values
1063 of __cpp_constexpr and __cpp_concepts for C++20.
1065 2022-01-24 Marek Polacek <polacek@redhat.com>
1067 PR preprocessor/104030
1068 * c.opt (Wbidi-chars): Mark as EnumSet. Also accept =ucn.
1070 2022-01-21 Jakub Jelinek <jakub@redhat.com>
1073 * c-common.h (check_function_arguments_recurse): Add for_format
1075 * c-common.cc (check_function_nonnull): Pass false to
1076 check_function_arguments_recurse's last argument.
1077 (check_function_arguments_recurse): Add for_format argument,
1078 if true, don't stop on warning_suppressed_p.
1079 * c-format.cc (check_format_info): Pass true to
1080 check_function_arguments_recurse's last argument.
1082 2022-01-19 David Malcolm <dmalcolm@redhat.com>
1084 * c-common.cc (c_common_c_tests): Rename to...
1085 (c_common_cc_tests): ...this.
1086 (c_family_tests): Update calls for .c to .cc renaming.
1087 * c-common.h (c_format_c_tests): Rename to...
1088 (c_format_cc_tests): ...this.
1089 (c_indentation_c_tests): Rename to...
1090 (c_indentation_cc_tests): ...this.
1091 (c_pretty_print_c_tests): Rename to...
1092 (c_pretty_print_cc_tests): ...this.
1093 * c-format.cc (c_format_c_tests): Rename to...
1094 (c_format_cc_tests): ...this.
1095 * c-indentation.cc (c_indentation_c_tests): Rename to...
1096 (c_indentation_cc_tests): ...this.
1097 * c-pretty-print.cc (c_pretty_print_c_tests): Rename to...
1098 (c_pretty_print_cc_tests): ...this.
1100 2022-01-17 Martin Liska <mliska@suse.cz>
1102 * c-ada-spec.cc: Rename .c names to .cc.
1103 * c-ada-spec.h: Likewise.
1104 * c-common.cc (c_build_vec_convert): Likewise.
1105 (warning_candidate_p): Likewise.
1106 * c-common.h (enum rid): Likewise.
1107 (build_real_imag_expr): Likewise.
1108 (finish_label_address_expr): Likewise.
1109 (c_get_substring_location): Likewise.
1110 (c_build_bind_expr): Likewise.
1111 (conflict_marker_get_final_tok_kind): Likewise.
1112 (c_parse_error): Likewise.
1113 (check_missing_format_attribute): Likewise.
1114 (invalid_array_size_error): Likewise.
1115 (warn_for_multistatement_macros): Likewise.
1116 (build_attr_access_from_parms): Likewise.
1117 * c-cppbuiltin.cc (c_cpp_builtins): Likewise.
1118 * c-format.cc: Likewise.
1119 * c-gimplify.cc (c_gimplify_expr): Likewise.
1120 * c-indentation.h: Likewise.
1121 * c-objc.h (objc_prop_attr_kind_for_rid): Likewise.
1122 * c-omp.cc (c_omp_predetermined_mapping): Likewise.
1123 * c-opts.cc (c_common_post_options): Likewise.
1124 (set_std_cxx23): Likewise.
1125 * c-pragma.cc (handle_pragma_redefine_extname): Likewise.
1126 * c-pretty-print.h: Likewise.
1128 2022-01-17 Martin Liska <mliska@suse.cz>
1130 * c-ada-spec.c: Moved to...
1131 * c-ada-spec.cc: ...here.
1132 * c-attribs.c: Moved to...
1133 * c-attribs.cc: ...here.
1134 * c-common.c: Moved to...
1135 * c-common.cc: ...here.
1136 * c-cppbuiltin.c: Moved to...
1137 * c-cppbuiltin.cc: ...here.
1138 * c-dump.c: Moved to...
1139 * c-dump.cc: ...here.
1140 * c-format.c: Moved to...
1141 * c-format.cc: ...here.
1142 * c-gimplify.c: Moved to...
1143 * c-gimplify.cc: ...here.
1144 * c-indentation.c: Moved to...
1145 * c-indentation.cc: ...here.
1146 * c-lex.c: Moved to...
1147 * c-lex.cc: ...here.
1148 * c-omp.c: Moved to...
1149 * c-omp.cc: ...here.
1150 * c-opts.c: Moved to...
1151 * c-opts.cc: ...here.
1152 * c-pch.c: Moved to...
1153 * c-pch.cc: ...here.
1154 * c-ppoutput.c: Moved to...
1155 * c-ppoutput.cc: ...here.
1156 * c-pragma.c: Moved to...
1157 * c-pragma.cc: ...here.
1158 * c-pretty-print.c: Moved to...
1159 * c-pretty-print.cc: ...here.
1160 * c-semantics.c: Moved to...
1161 * c-semantics.cc: ...here.
1162 * c-ubsan.c: Moved to...
1163 * c-ubsan.cc: ...here.
1164 * c-warn.c: Moved to...
1165 * c-warn.cc: ...here.
1166 * cppspec.c: Moved to...
1167 * cppspec.cc: ...here.
1168 * stub-objc.c: Moved to...
1169 * stub-objc.cc: ...here.
1171 2022-01-15 Martin Sebor <msebor@redhat.com>
1174 * c.opt (-Wdangling-pointer): New option.
1176 2022-01-15 Martin Sebor <msebor@redhat.com>
1178 PR tree-optimization/80532
1179 * c.opt (-Wuse-after-free): New options.
1181 2022-01-14 David Malcolm <dmalcolm@redhat.com>
1183 * c-attribs.c (c_common_attribute_table): Add "tainted_args".
1184 (handle_tainted_args_attribute): New.
1186 2022-01-13 Anthony Sharp <anthonysharp15@gmail.com>
1187 Jason Merrill <jason@redhat.com>
1190 * c.opt: Added -Wmissing-template-keyword.
1192 2022-01-13 Richard Biener <rguenther@suse.de>
1195 * c-common.c (c_common_mark_addressable_vec): Handle TARGET_EXPR.
1197 2022-01-12 Martin Liska <mliska@suse.cz>
1200 * c-attribs.c (handle_optimize_attribute): Do not call
1201 cl_optimization_compare if we seen an error.
1203 2022-01-11 Jakub Jelinek <jakub@redhat.com>
1207 * c-warn.c (conversion_warning): Handle BIT_AND_EXPR, BIT_IOR_EXPR
1210 2022-01-10 Richard Biener <rguenther@suse.de>
1212 PR middle-end/101530
1213 * c-common.c (c_build_shufflevector): Wrap the BIT_FIELD_REF
1214 in a TARGET_EXPR to force a temporary.
1216 2022-01-06 Marek Polacek <polacek@redhat.com>
1219 * c-pragma.c (handle_pragma_scalar_storage_order): Use %< %> in
1220 diagnostic messages.
1221 (handle_pragma_diagnostic): Likewise.
1223 2022-01-03 Marek Polacek <polacek@redhat.com>
1226 * c-format.c (check_tokens): Accept "decl-specifier*".
1228 2022-01-03 Jakub Jelinek <jakub@redhat.com>
1231 * c-attribs.c (handle_non_overlapping_attribute): New function.
1232 (c_common_attribute_table): Add "non overlapping" attribute.
1234 2021-12-30 Jakub Jelinek <jakub@redhat.com>
1237 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Perform
1238 cpp_define_unused/cpp_undef calls with forced token locations
1241 2021-12-27 Patrick Palka <ppalka@redhat.com>
1244 * c-common.c (pointer_int_sum): When quiet, return
1245 error_mark_node for an incomplete pointed-to type and don't
1246 call size_in_bytes_loc.
1248 2021-12-17 Jason Merrill <jason@redhat.com>
1251 * c-opts.c (c_common_post_options): Update defaults.
1253 2021-12-16 Martin Liska <mliska@suse.cz>
1256 * c-pragma.c (handle_pragma_pop_options): Do not check
1257 global options modification when an error is seen in parsing
1258 of options (pragmas or attributes).
1260 2021-12-12 Jonathan Wakely <jwakely@redhat.com>
1262 * known-headers.cc: Define INCLUDE_MEMORY instead of
1264 * name-hint.h: Likewise.
1265 (class name_hint): Use std::unique_ptr instead of gnu::unique_ptr.
1267 2021-12-09 Jakub Jelinek <jakub@redhat.com>
1270 * c-pch.c (c_common_no_more_pch): Pass a temporary void * var
1271 with NULL value instead of NULL to host_hooks.gt_pch_use_address.
1273 2021-12-03 Jakub Jelinek <jakub@redhat.com>
1276 * c-pch.c (struct c_pch_validity): Remove pch_init member.
1277 (pch_init): Don't initialize v.pch_init.
1278 (c_common_valid_pch): Don't warn and punt if .text addresses change.
1280 2021-12-01 Jason Merrill <jason@redhat.com>
1283 * c.opt: Add -fconstexpr-fp-except.
1285 2021-11-29 Richard Biener <rguenther@suse.de>
1287 * c-format.c (check_format_string): Remove spurious
1290 2021-11-29 Richard Biener <rguenther@suse.de>
1292 * c-opts.c (c_common_post_options): Remove unreachable return.
1293 * c-pragma.c (handle_pragma_target): Likewise.
1294 (handle_pragma_optimize): Likewise.
1296 2021-11-25 Jakub Jelinek <jakub@redhat.com>
1299 * c-opts.c (c_common_post_options): Enable -Wcomma-subscript by
1300 default for C++23 regardless of warn_deprecated.
1301 * c-cppbuiltin.c (c_cpp_builtins): Predefine
1302 __cpp_multidimensional_subscript=202110L for C++23.
1304 2021-11-23 Martin Sebor <msebor@redhat.com>
1307 * c.opt: Add -Winfinite-recursion.
1309 2021-11-19 Martin Sebor <msebor@redhat.com>
1313 * c-common.c (decl_with_nonnull_addr_p): Call maybe_nonzero_address
1314 and improve handling tof defined symbols.
1316 2021-11-19 Martin Liska <mliska@suse.cz>
1319 2021-11-18 Martin Liska <mliska@suse.cz>
1321 * c-gimplify.c (genericize_c_loop): Use option directly.
1323 2021-11-18 Matthias Kretz <m.kretz@gsi.de>
1325 * c-common.c (c_common_reswords): Add __builtin_assoc_barrier.
1326 * c-common.h (enum rid): Add RID_BUILTIN_ASSOC_BARRIER.
1328 2021-11-18 Martin Liska <mliska@suse.cz>
1330 * c-gimplify.c (genericize_c_loop): Use option directly.
1332 2021-11-17 Martin Uecker <uecker@gcc.gnu.org>
1336 * c-common.c (pointer_int_sum): Make sure pointer expressions
1337 are evaluated first when the size expression depends on for
1338 variably-modified types.
1340 2021-11-17 Marek Polacek <polacek@redhat.com>
1342 PR preprocessor/103026
1343 * c.opt (Wbidi-chars, Wbidi-chars=): New option.
1345 2021-11-16 Jason Merrill <jason@redhat.com>
1347 * c-common.c (release_tree_vector): Only cache vecs smaller than
1350 2021-11-15 Jason Merrill <jason@redhat.com>
1352 * c.opt: Add -fimplicit-constexpr.
1353 * c-cppbuiltin.c: Define __cpp_implicit_constexpr.
1354 * c-opts.c (c_common_post_options): Disable below C++14.
1356 2021-11-15 Jakub Jelinek <jakub@redhat.com>
1358 * c-omp.c (c_omp_split_clauses) <case OMP_CLAUSE_THREAD_LIMIT>:
1359 Duplicate to both OMP_TARGET and OMP_TEAMS.
1361 2021-11-10 Marek Polacek <polacek@redhat.com>
1364 * c-pragma.c (handle_pragma_diagnostic): Handle #pragma GCC diagnostic
1367 2021-11-09 David Malcolm <dmalcolm@redhat.com>
1369 * c-pragma.c (GCC_BAD_AT): New macro.
1370 (GCC_BAD2_AT): New macro.
1371 (handle_pragma_pack): Use the location of the pertinent token when
1372 issuing diagnostics about invalid constants/actions, and trailing
1374 (handle_pragma_target): Likewise for non-string "GCC option".
1375 (handle_pragma_message): Likewise for trailing junk.
1377 2021-11-03 Joseph Myers <joseph@codesourcery.com>
1380 * c-common.c (convert_and_check): Add argument init_const. Call
1381 convert_init if init_const.
1382 * c-common.h (convert_and_check): Update prototype.
1383 (convert_init): New prototype.
1385 2021-11-01 David Malcolm <dmalcolm@redhat.com>
1387 * c-lex.c (c_lex_with_flags): When complaining about non-printable
1388 CPP_OTHER tokens, set the "escape on output" flag.
1390 2021-10-27 Jakub Jelinek <jakub@redhat.com>
1392 * c-omp.c (c_omp_check_loop_iv_r): Don't clear 3rd bit for
1394 (c_omp_check_nonrect_loop_iv): Handle POINTER_PLUS_EXPR.
1395 (c_omp_check_loop_iv): Set kind even if the iterator is non-integral.
1397 2021-10-27 Jakub Jelinek <jakub@redhat.com>
1400 * c-common.h (c_omp_check_loop_iv_exprs): Add enum tree_code argument.
1401 * c-omp.c (c_omp_check_loop_iv_r): For trees other than decls,
1402 TREE_VEC, PLUS_EXPR, MINUS_EXPR, MULT_EXPR, POINTER_PLUS_EXPR or
1403 conversions temporarily clear the 3rd bit from d->kind while walking
1405 (c_omp_check_loop_iv_exprs): Add CODE argument. Or in 4 into data.kind
1406 if possibly non-rectangular.
1408 2021-10-21 Jakub Jelinek <jakub@redhat.com>
1411 * c-omp.c (c_omp_predefined_variable): Return true also for
1412 ubsan_create_data created artificial variables.
1414 2021-10-14 Joseph Myers <joseph@codesourcery.com>
1416 * c-format.c (printf_length_specs, scanf_length_specs)
1417 (print_char_table, scan_char_table): Support DFP formats for C2X.
1418 * c-format.h (TEX_D32, TEX_D64, TEX_D128): Remove.
1419 (T2X_D32, T2X_D64, T2X_D128): New macros.
1421 2021-10-14 Kwok Cheung Yeung <kcy@codesourcery.com>
1423 * c-omp.c (c_omp_check_context_selector): Rename to
1424 omp_check_context_selector and move to omp-general.c.
1425 (c_omp_mark_declare_variant): Rename to omp_mark_declare_variant and
1426 move to omp-general.c.
1428 2021-10-12 Joseph Myers <joseph@codesourcery.com>
1430 * c-format.c (print_char_table): Add %b and %B formats.
1431 (scan_char_table): Add %b format.
1432 * c-format.h (T2X_UI, T2X_UL, T2X_ULL, T2X_US, T2X_UC, T2X_ST)
1433 (T2X_UPD, T2X_UIM): New macros.
1435 2021-10-12 Jakub Jelinek <jakub@redhat.com>
1437 * c-omp.c (c_finish_omp_atomic): Use
1438 clear_padding_type_may_have_padding_p.
1440 2021-10-08 Martin Liska <mliska@suse.cz>
1442 * c-opts.c (c_common_post_options): Use new macro
1445 2021-10-07 Martin Liska <mliska@suse.cz>
1447 * c-common.c (parse_optimize_options): Make
1448 save_opt_decoded_options a pointer type.
1450 2021-10-06 Jakub Jelinek <jakub@redhat.com>
1452 PR tree-optimization/102571
1453 * c-omp.c (c_finish_omp_atomic): Optimize the case where type has
1454 padding, but the non-padding bits are contiguous set of bytes
1455 by adjusting the memcmp call arguments instead of emitting
1456 __builtin_clear_padding and then comparing all the type's bytes.
1458 2021-10-06 Jakub Jelinek <jakub@redhat.com>
1461 * c-cppbuiltin.c (c_cpp_builtins): For -std=c++23 predefine
1462 __cpp_constexpr to 202110L rather than 201907L.
1464 2021-10-04 Marek Polacek <polacek@redhat.com>
1467 * c-common.h (do_warn_array_compare): Declare.
1468 * c-warn.c (do_warn_array_compare): New.
1469 * c.opt (Warray-compare): New option.
1471 2021-10-02 Iain Sandoe <iain@sandoe.co.uk>
1473 * c-format.c: Remove a test of TARGET_FORMAT_TYPES with
1474 NULL, this is not needed.
1476 2021-10-01 Martin Sebor <msebor@redhat.com>
1479 * c-common.c (decl_with_nonnull_addr_p): Handle members.
1480 Check and perform warning suppression.
1481 (c_common_truthvalue_conversion): Enhance warning suppression.
1483 2021-10-01 Martin Liska <mliska@suse.cz>
1486 * c-common.c (parse_optimize_options): decoded_options[0] is
1487 used for program name, so merged_decoded_options should also
1490 2021-10-01 Jakub Jelinek <jakub@redhat.com>
1491 Richard Biener <rguenther@suse.de>
1494 * c-ubsan.c (ubsan_instrument_division): Check the right
1495 flag_sanitize_recover bit, depending on which sanitization
1496 is done. Sanitize INT_MIN / -1 under SANITIZE_SI_OVERFLOW
1497 rather than SANITIZE_DIVIDE. If both SANITIZE_SI_OVERFLOW
1498 and SANITIZE_DIVIDE is enabled, neither check is known
1499 to be false and flag_sanitize_recover bits for those two
1500 aren't the same, emit both __ubsan_handle_divrem_overflow
1501 and __ubsan_handle_divrem_overflow_abort calls.
1503 2021-10-01 Martin Liska <mliska@suse.cz>
1505 * c-common.c (parse_optimize_options): Combine optimize
1506 options with what was provided on the command line.
1508 2021-10-01 Jakub Jelinek <jakub@redhat.com>
1510 * c-omp.c (c_omp_split_clauses): Also copy
1511 OMP_CLAUSE_ORDER_REPRODUCIBLE.
1513 2021-09-27 Martin Liska <mliska@suse.cz>
1515 * c-opts.c (c_common_init_options_struct): Set also
1516 x_flag_default_complex_method.
1518 2021-09-22 Jakub Jelinek <jakub@redhat.com>
1520 * c-omp.c (c_omp_split_clauses): Copy over OMP_CLAUSE_ALLOCATE_ALIGN.
1522 2021-09-20 Matthias Kretz <m.kretz@gsi.de>
1524 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Define or
1525 undefine __RECIPROCAL_MATH__, __NO_SIGNED_ZEROS__,
1526 __NO_TRAPPING_MATH__, __ASSOCIATIVE_MATH__, and
1527 __ROUNDING_MATH__ according to the new optimization flags.
1529 2021-09-18 Jakub Jelinek <jakub@redhat.com>
1531 * c-omp.c (c_omp_split_clauses): Split order clause also to
1532 distribute construct. Copy over OMP_CLAUSE_ORDER_UNCONSTRAINED.
1534 2021-09-17 Jakub Jelinek <jakub@redhat.com>
1536 * c-omp.c (c_finish_omp_atomic): Avoid creating
1537 TARGET_EXPR if test is true, use create_tmp_var_raw instead of
1538 create_tmp_var and add a zero initializer to TARGET_EXPRs that
1539 had NULL initializer. When omitting operands after v = x,
1540 use type of v rather than type of x. Fix type of vtmp
1543 2021-09-13 Jason Merrill <jason@redhat.com>
1545 * c.opt: Add -Winterference-size.
1546 * c-cppbuiltin.c (cpp_atomic_builtins): Add __GCC_DESTRUCTIVE_SIZE
1547 and __GCC_CONSTRUCTIVE_SIZE.
1549 2021-09-10 Jakub Jelinek <jakub@redhat.com>
1551 * c-common.h (c_finish_omp_atomic): Add r and weak arguments.
1552 * c-omp.c: Include gimple-fold.h.
1553 (c_finish_omp_atomic): Add r and weak arguments. Add support for
1556 2021-09-09 qing zhao <qing.zhao@oracle.com>
1558 * c-attribs.c (handle_uninitialized_attribute): New function.
1559 (c_common_attribute_table): Add "uninitialized" attribute.
1561 2021-09-08 liuhongt <hongtao.liu@intel.com>
1563 * c-common.c (excess_precision_mode_join): Update below comments.
1564 (c_ts18661_flt_eval_method): Set excess_precision_type to
1565 EXCESS_PRECISION_TYPE_FLOAT16 when -fexcess-precision=16.
1566 * c-cppbuiltin.c (cpp_atomic_builtins): Update below comments.
1567 (c_cpp_flt_eval_method_iec_559): Set excess_precision_type to
1568 EXCESS_PRECISION_TYPE_FLOAT16 when -fexcess-precision=16.
1570 2021-09-07 Marcel Vollweiler <marcel@codesourcery.com>
1572 * c-omp.c (c_finish_omp_flush): Handle MEMMODEL_SEQ_CST.
1574 2021-09-03 Eric Botcazou <ebotcazou@adacore.com>
1576 * c-ada-spec.c (dump_ads): Generate pragmas to disable style checks
1577 and -gnatwu warning for the package specification.
1579 2021-09-01 Iain Sandoe <iain@sandoe.co.uk>
1581 * c-attribs.c (handle_unavailable_attribute): New.
1583 2021-08-30 Jason Merrill <jason@redhat.com>
1585 * c.opt: Add -Wmissing-requires.
1587 2021-08-25 Lewis Hyatt <lhyatt@gmail.com>
1590 * c-opts.c (c_common_input_charset_cb): New function.
1591 (c_common_post_options): Call new function
1592 diagnostic_initialize_input_context().
1594 2021-08-20 Tobias Burnus <tobias@codesourcery.com>
1596 * c-format.c (gcc_gfc_length_specs): Add 'll' and 'w'.
1597 (gcc_gfc_char_table): Add T9L_LL and T9L_ULL to
1598 "di" and "u", respecitively; fill with BADLEN to match
1600 (get_init_dynamic_hwi): Split off from ...
1601 (init_dynamic_diag_info): ... here. Call it.
1602 (init_dynamic_gfc_info): Call it.
1604 2021-08-20 Jakub Jelinek <jakub@redhat.com>
1606 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_ERROR.
1607 * c-pragma.c (omp_pragmas): Add error directive.
1608 * c-omp.c (omp_directives): Uncomment error directive entry.
1610 2021-08-18 Jakub Jelinek <jakub@redhat.com>
1612 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_NOTHING.
1613 * c-pragma.c (omp_pragmas): Add nothing directive.
1614 * c-omp.c (omp_directives): Uncomment nothing directive entry.
1616 2021-08-17 Jakub Jelinek <jakub@redhat.com>
1619 * c-common.h (enum rid): Add RID_IS_LAYOUT_COMPATIBLE.
1620 * c-common.c (c_common_reswords): Add __is_layout_compatible.
1622 2021-08-17 Matt Jacobson <mhjacobson@me.com>
1624 * c-opts.c (c_common_post_options): Default to
1625 flag_objc_sjlj_exceptions = 1 only when flag_objc_abi < 2.
1627 2021-08-17 Jakub Jelinek <jakub@redhat.com>
1629 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_SCOPE.
1630 * c-pragma.c (omp_pragmas): Add scope construct.
1631 * c-omp.c (omp_directives): Uncomment scope directive entry.
1633 2021-08-16 Sebastian Huber <sebastian.huber@embedded-brains.de>
1635 * c-cppbuiltin.c (c_cpp_builtins): Define
1636 __LIBGCC_GCOV_TYPE_SIZE if flag_building_libgcc is true.
1638 2021-08-12 Jakub Jelinek <jakub@redhat.com>
1640 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_MASKED.
1641 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_FILTER.
1642 * c-pragma.c (omp_pragmas_simd): Add masked construct.
1643 * c-common.h (enum c_omp_clause_split): Add C_OMP_CLAUSE_SPLIT_MASKED
1645 (c_finish_omp_masked): Declare.
1646 * c-omp.c (c_finish_omp_masked): New function.
1647 (c_omp_split_clauses): Handle combined masked constructs.
1649 2021-07-30 Jakub Jelinek <jakub@redhat.com>
1652 * c-common.h (enum rid): Add RID_IS_POINTER_INTERCONVERTIBLE_BASE_OF.
1653 * c-common.c (c_common_reswords): Add
1654 __is_pointer_interconvertible_base_of.
1656 2021-07-29 Richard Biener <rguenther@suse.de>
1659 * c-common.c (c_common_mark_addressable_vec): Look through
1660 C_MAYBE_CONST_EXPR even if not at the toplevel.
1662 2021-07-27 Martin Sebor <msebor@redhat.com>
1665 * c-warn.c (warn_parm_ptrarray_mismatch): Use OEP_DECL_NAME.
1667 2021-07-23 Jakub Jelinek <jakub@redhat.com>
1669 * c-lex.c (c_common_has_attribute): Call canonicalize_attr_name also
1670 on attr_id. Return 1 for omp::directive or omp::sequence in C++11
1673 2021-07-23 Jakub Jelinek <jakub@redhat.com>
1675 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP__START_ and
1676 PRAGMA_OMP__LAST_ enumerators.
1678 2021-07-21 Thomas Schwinge <thomas@codesourcery.com>
1679 Joseph Myers <joseph@codesourcery.com>
1680 Cesar Philippidis <cesar@codesourcery.com>
1682 * c-pragma.h (pragma_omp_clause): Add 'PRAGMA_OACC_CLAUSE_NOHOST'.
1684 2021-07-20 Martin Sebor <msebor@redhat.com>
1686 * c-common.c (c_build_shufflevector): Adjust by-value argument to
1688 * c-common.h (c_build_shufflevector): Same.
1690 2021-07-16 Andrew Pinski <apinski@marvell.com>
1693 * c-common.c (parse_optimize_options): Use the correct
1696 2021-07-15 Martin Sebor <msebor@redhat.com>
1700 * c-warn.c (warn_parm_array_mismatch): Use OEP_DECL_NAME.
1702 2021-07-14 Jason Merrill <jason@redhat.com>
1704 * c-opts.c (c_common_post_options): Set -fdelete-dead-exceptions.
1706 2021-07-06 Martin Sebor <msebor@redhat.com>
1708 * c-format.c (gcc_tdiag_char_table): Remove support for %G and %K.
1709 (gcc_cdiag_char_table): Same.
1710 (gcc_cxxdiag_char_table): Same.
1712 2021-07-02 Jakub Jelinek <jakub@redhat.com>
1714 * c-common.h (enum c_omp_directive_kind): New enum.
1715 (struct c_omp_directive): New type.
1716 (c_omp_categorize_directive): Declare.
1717 * c-omp.c (omp_directives): New variable.
1718 (c_omp_categorize_directive): New function.
1720 2021-07-01 Eric Botcazou <ebotcazou@adacore.com>
1722 * c-ada-spec.c (packed_layout): New global variable.
1723 (dump_ada_declaration): Set it upon seeing a packed record type.
1724 Do not put the "aliased" keyword if it is set.
1725 (dump_ada_structure): Add Pack aspect if it is set and clear it.
1727 2021-07-01 Eric Botcazou <ebotcazou@adacore.com>
1729 * c-ada-spec.c (check_name): Rename into...
1730 (check_type_name_conflict): ...this. Minor tweak.
1731 (dump_ada_function_declaration): Adjust to above renaming.
1732 (dump_ada_array_domains): Fix oversight.
1733 (dump_ada_declaration): Call check_type_name_conflict for variables.
1735 2021-06-25 Martin Sebor <msebor@redhat.com>
1737 * c-common.c (c_wrap_maybe_const): Remove TREE_NO_WARNING.
1738 (c_common_truthvalue_conversion): Replace direct uses of
1739 TREE_NO_WARNING with warning_suppressed_p, suppress_warning, and
1741 (check_function_arguments_recurse): Same.
1742 * c-gimplify.c (c_gimplify_expr): Same.
1743 * c-warn.c (overflow_warning): Same.
1744 (warn_logical_operator): Same.
1745 (warn_if_unused_value): Same.
1746 (do_warn_unused_parameter): Same.
1748 2021-06-24 Jakub Jelinek <jakub@redhat.com>
1750 * c-common.h (enum c_omp_region_type): Add C_ORT_TARGET and
1752 * c-omp.c (c_omp_split_clauses): For OMP_CLAUSE_IN_REDUCTION on
1753 combined target constructs also add map (always, tofrom:) clause.
1755 2021-06-15 Robin Dapp <rdapp@linux.ibm.com>
1757 * c-attribs.c (common_handle_aligned_attribute): Remove short
1758 circuit and dead code.
1760 2021-06-14 Jonathan Wakely <jwakely@redhat.com>
1763 * known-headers.cc (get_stdlib_header_for_name): Add known
1764 headers for EXIT_FAILURE, EXIT_SUCCESS, abort, atexit, calloc,
1767 2021-06-12 Jason Merrill <jason@redhat.com>
1769 * c-attribs.c (handle_unused_attribute): Handle FIELD_DECL.
1771 2021-06-11 Jakub Jelinek <jakub@redhat.com>
1774 * c-cppbuiltin.c (c_cpp_builtins): Predefine __cpp_if_consteval for
1775 -std=c++2b for P1938R3 consteval if support.
1777 2021-06-09 Jason Merrill <jason@redhat.com>
1780 * c-warn.c (warn_for_sign_compare): Remove C++ enum mismatch
1783 2021-06-07 Martin Liska <mliska@suse.cz>
1785 * c-target.def: Split long lines and replace them
1788 2021-06-04 Martin Sebor <msebor@redhat.com>
1791 * c-attribs.c (positional_argument): Bail on erroneous types.
1793 2021-06-04 Martin Sebor <msebor@redhat.com>
1795 * c-warn.c (warn_parm_array_mismatch): Check TREE_PURPOSE to test
1796 for element presence.
1798 2021-06-03 Eric Botcazou <ebotcazou@adacore.com>
1800 * c-ada-spec.c (dump_ada_macros): Minor tweaks.
1801 (dump_ada_decl_name): Likewise.
1802 (dump_anonymous_type_name): Remove parent parameter and adjust.
1803 (dump_sloc): Minor tweak.
1804 (dump_ada_array_type): Remove type parameter and adjust.
1805 (dump_ada_enum_type): Remove parent parameter and adjust.
1806 (dump_ada_node): Adjust calls to above functions.
1807 (dumped_anonymous_types): New global variable.
1808 (dump_nested_types_1): Rename into...
1809 (dump_nested_types): ...this.
1810 (dump_nested_type): Remove parent and dumped_types parameters.
1811 <ARRAY_TYPE>: Replace dumped_types with dumped_anonymous_types.
1812 Adjust calls to dump_anonymous_type_name and dump_ada_array_type.
1813 (dump_ada_specs): Initialize and free dumped_anonymous_types.
1815 2021-06-03 Eric Botcazou <ebotcazou@adacore.com>
1817 * c-ada-spec.c (pp_ada_tree_identifier): Tidy up.
1818 (dump_ada_node) <POINTER_TYPE>: Deal specially with external subtypes.
1820 2021-06-03 Eric Botcazou <ebotcazou@adacore.com>
1822 * c-ada-spec.c (dump_ada_enum_type): Dump a prefix for constants.
1823 (htable_t): New typedef.
1824 (overloaded_names): Use it.
1825 (add_name): New function.
1826 (init_overloaded_names): Use add_name to populate the table and add
1827 special cases for sigaction and stat.
1828 (overloaded_name_p): Rename into...
1829 (overloading_index): ...this. Do not initialize overloaded_names table
1830 here. Return the index or zero.
1831 (dump_ada_declaration): Minor tweaks. Do not skip overloaded functions
1832 but add an overloading suffix instead.
1833 (dump_ada_specs): Initialize overloaded_names tables here.
1835 2021-06-01 Martin Liska <mliska@suse.cz>
1838 * c-attribs.c (handle_optimize_attribute): Limit sanity check
1839 to a situation where we are not in processing of an optimize
1841 * c-pragma.c (handle_pragma_pop_options): Restore target
1844 2021-05-31 Indu Bhagat <indu.bhagat@oracle.com>
1847 * c-pch.c (c_common_valid_pch): Use xstrdup for debug format set names.
1849 2021-05-31 Richard Biener <rguenther@suse.de>
1852 * c-common.c: Include tree-vector-builder.h and
1854 (c_common_reswords): Add __builtin_shufflevector.
1855 (c_build_shufflevector): New funtion.
1856 * c-common.h (enum rid): Add RID_BUILTIN_SHUFFLEVECTOR.
1857 (c_build_shufflevector): Declare.
1859 2021-05-28 Jakub Jelinek <jakub@redhat.com>
1862 * c-omp.c (c_omp_split_clauses): For reduction clause if combined with
1863 target add a map tofrom clause with OMP_CLAUSE_MAP_IMPLICIT.
1865 2021-05-28 Tobias Burnus <tobias@codesourcery.com>
1867 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_AFFINITY.
1869 2021-05-25 Martin Liska <mliska@suse.cz>
1871 PR tree-optimization/92860
1873 * c-attribs.c (handle_optimize_attribute): Save target node
1874 before calling parse_optimize_options and save it in case
1876 * c-pragma.c (handle_pragma_target): Similarly for pragma.
1877 (handle_pragma_pop_options): Likewise here.
1879 2021-05-25 Martin Liska <mliska@suse.cz>
1881 * c-attribs.c (handle_no_sanitize_coverage_attribute): New.
1883 2021-05-25 Jakub Jelinek <jakub@redhat.com>
1886 * c-omp.c (c_omp_split_clauses): Copy reduction to teams when teams is
1887 combined with simd and not with taskloop or for.
1889 2021-05-21 Jakub Jelinek <jakub@redhat.com>
1892 * c-omp.c (c_omp_split_clauses): Set OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT
1893 on firstprivate clause copy going to target construct, and for
1894 target simd set also OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT_TARGET bit.
1896 2021-05-20 Jonathan Wakely <jwakely@redhat.com>
1898 * c.opt (Wc++11-extensions, Wc++14-extensions)
1899 (Wc++17-extensions, Wc++20-extensions, Wc++23-extensions): New
1902 2021-05-20 Indu Bhagat <indu.bhagat@oracle.com>
1904 * c-lex.c (init_c_lex): Use dwarf_debuginfo_p.
1906 2021-05-20 Indu Bhagat <indu.bhagat@oracle.com>
1908 * c-opts.c (c_common_post_options): Adjust access to debug_type_names.
1909 * c-pch.c (struct c_pch_validity): Use type uint32_t.
1910 (pch_init): Renamed member.
1911 (c_common_valid_pch): Adjust access to debug_type_names.
1913 2021-05-19 Martin Sebor <msebor@redhat.com>
1916 * c-attribs.c (build_attr_access_from_parms): Handle arbitrarily many
1919 2021-05-18 Richard Biener <rguenther@suse.de>
1922 * c-attribs.c (type_valid_for_vector_size): Reject too large nunits.
1923 Reword existing nunit diagnostic.
1925 2021-05-17 Joern Rennecke <joern.rennecke@embecosm.com>
1927 * c-common.c (braced_list_to_string): Return CTOR unchanged
1928 if host and target character sizes don't match.
1930 2021-05-14 Martin Liska <mliska@suse.cz>
1932 * c.opt: Add Warning keyword for 2 options.
1934 2021-05-13 Martin Liska <mliska@suse.cz>
1936 PR middle-end/100504
1937 * c-attribs.c (handle_target_clones_attribute): Expect a string
1938 argument to target_clone argument.
1940 2021-05-11 Joseph Myers <joseph@codesourcery.com>
1942 * c-lex.c (interpret_float): Handle digit separators for C2X.
1944 2021-05-10 Martin Liska <mliska@suse.cz>
1946 * c-ada-spec.c (print_destructor): Use startswith
1947 function instead of strncmp.
1948 (dump_ada_declaration): Likewise.
1949 * c-common.c (disable_builtin_function): Likewise.
1950 (def_builtin_1): Likewise.
1951 * c-format.c (check_tokens): Likewise.
1952 (check_plain): Likewise.
1953 (convert_format_name_to_system_name): Likewise.
1955 2021-04-28 Patrick McGehearty <patrick.mcgehearty@oracle.com>
1957 * c-cppbuiltin.c (c_cpp_builtins): Add supporting macros for new
1960 2021-04-26 Thomas Schwinge <thomas@codesourcery.com>
1961 Nathan Sidwell <nathan@codesourcery.com>
1962 Tom de Vries <vries@codesourcery.com>
1963 Julian Brown <julian@codesourcery.com>
1964 Kwok Cheung Yeung <kcy@codesourcery.com>
1966 * c.opt (Wopenacc-parallelism): New.
1968 2021-04-19 Thomas Schwinge <thomas@codesourcery.com>
1970 * c.opt (fopenacc-kernels=): Remove.
1972 2021-04-08 Jakub Jelinek <jakub@redhat.com>
1974 * c-warn.c (do_warn_double_promotion): Fix comment typo,
1975 occured -> occurred.
1976 (check_alignment_of_packed_member): Fix a comment typo,
1978 (warn_parm_ptrarray_mismatch): Fix comment typos, os -> of
1979 and onless -> unless.
1980 (warn_parm_array_mismatch): Fix comment typos, declaratation
1981 -> declaration and woud -> would. Fix up comment indentation.
1983 2021-04-08 Martin Sebor <msebor@redhat.com>
1986 * c.opt (Wmismatched-new-delete): Correct spelling.
1988 2021-04-05 Eric Botcazou <ebotcazou@adacore.com>
1990 * c-ada-spec.c (is_simple_enum): Minor tweaks.
1991 (dump_ada_enum_type): Add TYPE and PARENT parameters. For non-simple
1992 enumeral types use again the type name for the enumeration constants.
1993 (dump_ada_node): Adjust call to dump_ada_enum_type.
1994 (dump_nested_type): Likewise.
1996 2021-04-01 Jason Merrill <jason@redhat.com>
1999 * c-opts.c (c_common_post_options): Bump latest_abi_version.
2001 2021-03-25 Jakub Jelinek <jakub@redhat.com>
2004 * c-warn.c (do_warn_duplicated_branches): Pass also
2005 OEP_ADDRESS_OF_SAME_FIELD to operand_equal_p.
2007 2021-03-20 Jakub Jelinek <jakub@redhat.com>
2010 * c-gimplify.c (c_genericize_control_stmt): Handle STATEMENT_LIST.
2012 2021-03-05 Eric Botcazou <ebotcazou@adacore.com>
2014 * c-ada-spec.c (dump_ada_declaration) <TYPE_DECL>: Dump nested types
2015 after entering the separate class package, if any.
2017 2021-03-04 Richard Biener <rguenther@suse.de>
2019 * c-pretty-print.c (c_pretty_printer::direct_abstract_declarator):
2022 2021-03-04 Jakub Jelinek <jakub@redhat.com>
2025 * c-ppoutput.c (print): Change src_line type from int to unsigned.
2026 (token_streamer::stream) Likewise.
2027 (maybe_print_line_1): Likewise. Don't strcmp src_file if src_loc is
2030 2021-03-03 Jakub Jelinek <jakub@redhat.com>
2033 * c-common.c (build_va_arg): Call c_common_mark_addressable_vec
2034 instead of mark_addressable. Fix a comment typo -
2035 neutrallly -> neutrally.
2037 2021-02-28 Jakub Jelinek <jakub@redhat.com>
2040 * c-attribs.c (handle_malloc_attribute): Fix a typo in inform
2041 message - refernced -> referenced. Remove superfluous space before
2042 closing paren of function calls.
2044 2021-02-25 Nathan Sidwell <nathan@acm.org>
2047 * c.opt (-flang-info-module-cmi): Renamed option.
2049 2021-02-19 Nathan Sidwell <nathan@acm.org>
2051 * c.opt (flang-info-module-read, flang-info-module-read=): New.
2053 2021-02-18 H.J. Lu <hjl.tools@gmail.com>
2056 * c-attribs.c (c_common_attribute_table): Add the "retain"
2058 (handle_retain_attribute): New function.
2060 2021-02-16 Marek Polacek <polacek@redhat.com>
2063 * c-attribs.c (handle_assume_aligned_attribute): Check that the
2064 alignment argument is non-negative. Tweak a warning message.
2066 2021-02-12 Martin Sebor <msebor@redhat.com>
2069 * c-warn.c (warn_parm_array_mismatch): Free strings returned from
2070 print_generic_expr_to_str.
2072 2021-02-10 Richard Biener <rguenther@suse.de>
2074 * c-common.c (parse_optimize_options): Free decoded_options.
2076 2021-02-04 emsr <3dw4rd@verizon.net>
2078 * c-cppbuiltin.c (c_cpp_builtins): __cpp_size_t_suffix=202011L.
2080 2021-02-03 Ed Smith-Rowland <3dw4rd@verizon.net>
2082 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_size_t_suffix.
2083 * c-lex.c (interpret_integer): Set node type for size literal.
2085 2021-01-28 Jakub Jelinek <jakub@redhat.com>
2087 * c.opt (-std=c++2a, -std=c++20, -std=gnu++2a, -std=gnu++20): Remove
2088 draft from description.
2089 (-std=c++2b): Fix a pasto, 2020 -> 2023.
2091 2021-01-26 Paul Fee <paul.f.fee@gmail.com>
2093 * c-common.h (cxx_dialect): Add cxx23 as a dialect.
2094 * c.opt: Add options for -std=c++23, std=c++2b, -std=gnu++23
2096 * c-opts.c (set_std_cxx23): New.
2097 (c_common_handle_option): Set options when -std=c++23 is enabled.
2098 (c_common_post_options): Adjust comments.
2099 (set_std_cxx20): Likewise.
2101 2021-01-25 Martin Sebor <msebor@redhat.com>
2104 * c-common.c (check_nonnull_arg): Adjust warning text.
2106 2021-01-17 Martin Sebor <msebor@redhat.com>
2108 * c-pretty-print.c (c_pretty_printer::primary_expression): Don't
2109 assume SSA_NAME_IDENTIFIER evaluates to nonzero.
2111 2021-01-16 Kwok Cheung Yeung <kcy@codesourcery.com>
2113 * c-pragma.h (pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_DETACH.
2114 Redefine PRAGMA_OACC_CLAUSE_DETACH.
2116 2021-01-15 Jakub Jelinek <jakub@redhat.com>
2118 PR tree-optimization/98597
2119 * c-pretty-print.c: Include options.h.
2120 (c_fold_indirect_ref_for_warn): New function.
2121 (print_mem_ref): Use it. If it returns something that has compatible
2122 type and is TBAA compatible with zero offset, print it and return,
2123 otherwise print it using offsetof syntax or array ref syntax. Fix up
2124 printing if MEM_REFs first operand is ADDR_EXPR, or when the first
2125 argument has pointer to array type. Print pointers using the standard
2128 2021-01-12 Martin Sebor <msebor@redhat.com>
2132 * c-pretty-print.c (print_mem_ref): Avoid assuming MEM_REF operand
2133 has pointer type. Remove redundant code. Avoid calling
2134 gimple_canonical_types_compatible_p.
2136 2021-01-07 Martin Sebor <msebor@redhat.com>
2139 * c-pretty-print.c (print_mem_ref): Strip array from access type.
2140 Avoid assuming acces type's size is constant. Correct condition
2141 guarding the printing of a parenthesis.
2143 2021-01-06 Martin Sebor <msebor@redhat.com>
2146 * c-pretty-print.c (c_pretty_printer::primary_expression): For
2147 SSA_NAMEs print VLA names and GIMPLE defining statements.
2148 (print_mem_ref): New function.
2149 (c_pretty_printer::unary_expression): Call it.
2151 2021-01-06 Richard Biener <rguenther@suse.de>
2153 PR tree-optimization/95582
2154 * c-attribs.c (c_common_attribute_table): Add entry for
2155 signed_bool_precision.
2156 (handle_signed_bool_precision_attribute): New.
2158 2020-12-24 Iain Sandoe <iain@sandoe.co.uk>
2160 * c.opt: Add -stdlib= option and enumerations for
2161 libstdc++ and libc++.
2163 2020-12-16 Martin Liska <mliska@suse.cz>
2165 * c.opt: Remove usage of Report.
2167 2020-12-14 Martin Sebor <msebor@redhat.com>
2172 * c-attribs.c (maybe_add_noinline): New function.
2173 (handle_malloc_attribute): Call it. Use ATTR_FLAG_INTERNAL.
2174 Implicitly add attribute noinline to functions not declared inline
2177 2020-12-09 Tobias Burnus <tobias@codesourcery.com>
2179 * c-pragma.c (omp_pragmas): Add 'allocate'.
2180 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_ALLOCATE.
2182 2020-12-08 Jakub Jelinek <jakub@redhat.com>
2185 * c-pragma.c (omp_pragmas): Remove "master".
2186 (omp_pragmas_simd): Add "master".
2188 2020-12-07 Marek Polacek <polacek@redhat.com>
2191 * c-common.c (verify_tree_lim_r): New function.
2192 (verify_sequence_points): Use it. Use nullptr instead of 0.
2194 2020-12-03 Martin Sebor <msebor@redhat.com>
2198 * c-attribs.c (handle_dealloc_attribute): New function.
2199 (handle_malloc_attribute): Handle argument forms of attribute.
2200 * c.opt (-Wmismatched-dealloc): New option.
2201 (-Wmismatched-new-delete): New option.
2203 2020-12-03 Jakub Jelinek <jakub@redhat.com>
2206 * c-common.h (enum rid): Add RID_BUILTIN_BIT_CAST.
2207 * c-common.c (c_common_reswords): Add __builtin_bit_cast.
2209 2020-12-01 JeanHeyd Meneide <phdofthehouse@gmail.com>
2211 * c-cppbuiltin.c (c_cpp_builtins): Add predefined
2212 {__GNUC_EXECUTION_CHARSET_NAME} and
2213 _WIDE_EXECUTION_CHARSET_NAME} macros.
2215 2020-12-01 Nathan Sidwell <nathan@acm.org>
2217 * c-common.c (module, import, export): New internal tokens (with
2219 * c-common.h (RID__MODULE, RID__IMPORT & RID__EXPORT): Enumerate
2221 (D_CXX_MODULES, D_CXX_MODULES_FLAGS): Enable them.
2222 * c-cppbuiltin.c (c_cpp_builtins): Feature macro.
2224 2020-12-01 Nathan Sidwell <nathan@acm.org>
2226 * c-opts.c (c_common_init_options): Ask for module dependencies.
2227 (c_common_handle_option): Handle -Mmodules -Mno-modules.
2228 * c-pch.c (c_common_valid_pch): ... does not play with C++
2230 * c.opt (Mmodules, Mno-modules): New preprocessor dependency
2232 (fmodules-ts, fmodule-header, fmodule-implicit-inline)
2233 (fmodule-only, fmodule-mapper, fmodule-lazy)
2234 (fmodule-version-ignore, Winvalid-imported-macros)
2235 (flang-info-include-translate, flang-info-include-translate-not):
2238 2020-11-28 Eric Botcazou <ebotcazou@adacore.com>
2240 * c-ada-spec.c (dump_nested_type) <RECORD_TYPE>: Remove obsolete code.
2241 (dump_ada_structure): Also deal with convention, unchecked union and
2242 bit-field for nested types. In the latter case, print an Alignment
2243 aspect along with the Pack aspect.
2245 2020-11-25 Martin Sebor <msebor@redhat.com>
2248 * c-attribs.c (handle_patchable_function_entry_attribute): Avoid
2251 2020-11-24 Martin Sebor <msebor@redhat.com>
2253 * c-warn.c (warn_parm_array_mismatch): Avoid invalid redeclarations.
2255 2020-11-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
2257 * c-attribs.c (handle_special_var_sec_attribute): New.
2258 (handle_noinit_attribute): Remove.
2259 (attr_noinit_exclusions): Rename to...
2260 (attr_section_exclusions): ...this, and add "persistent" attribute
2262 (c_common_attribute_table): Add "persistent" attribute.
2264 2020-11-21 Aaron Sawdey <acsawdey@linux.ibm.com>
2266 * c-pretty-print.c (c_pretty_printer::simple_type_specifier):
2267 Treat opaque types like other types.
2268 (c_pretty_printer::direct_abstract_declarator): Opaque types are
2271 2020-11-20 Martin Sebor <msebor@redhat.com>
2273 * c-warn.c (warn_parm_array_mismatch): Bail on invalid redeclarations
2274 with fewer arguments.
2276 2020-11-20 Martin Sebor <msebor@redhat.com>
2279 * c-attribs.c (handle_access_attribute): Handle ATTR_FLAG_INTERNAL.
2280 Error out on invalid modes.
2282 2020-11-20 Jakub Jelinek <jakub@redhat.com>
2285 * c-common.c (check_builtin_function_arguments): Handle
2286 BUILT_IN_CLEAR_PADDING.
2288 2020-11-18 Nathan Sidwell <nathan@acm.org>
2290 * c-lex.c (c_lex_with_flags): CPP_HEADER_NAMEs can now be seen.
2292 2020-11-17 Nathan Sidwell <nathan@acm.org>
2294 * c-common.h (enum c_tree_index): Reorder to place lazy fields
2295 after newly-added CTI_MODULE_HWM.
2297 2020-11-17 Joseph Myers <joseph@codesourcery.com>
2299 * c-cppbuiltin.c (builtin_define_float_constants): Define
2300 "*_IS_IEC_60559__" macros.
2302 2020-11-17 Nathan Sidwell <nathan@acm.org>
2304 * c-lex.c: #include "langhooks.h".
2305 (cb_undef): Maybe call preprocess_undef lang hook.
2306 * c-opts.c (c_common_post_options): Maybe call preprocess_options
2308 (push_command_line_include): Maybe call preprocess_main_file lang
2310 (cb_file_change): Likewise.
2311 * c-ppoutput.c: #include "langhooks.h.
2312 (scan_translation_unit): Maybe call preprocess_token lang hook.
2313 (class do_streamer): New, derive from token_streamer.
2314 (directives_only_cb): Data pointer is do_streamer, call
2315 preprocess_token lang hook.
2316 (scan_translation_unit_directives_only): Use do_streamer.
2317 (print_line_1): Move src_line recording to after string output.
2318 (cb_undef): Maybe call preprocess_undef lang hook.
2320 2020-11-17 Nathan Sidwell <nathan@acm.org>
2322 * c-ppoutput.c (scan_translation_unit): Use token_streamer, remove
2323 code duplicating that functionality.
2325 2020-11-17 Jakub Jelinek <jakub@redhat.com>
2328 * c-common.c (check_builtin_function_arguments)
2329 <case BUILT_IN_ADD_OVERFLOW>: Diagnose when last argument is pointer
2330 to _Atomic. For the TYPE_READONLY case, adjust message to be usable
2331 for more builtins and argument positions.
2333 2020-11-16 Iain Sandoe <iain@sandoe.co.uk>
2336 * stub-objc.c: Include c-common.h to declare enum rid.
2338 2020-11-13 Jakub Jelinek <jakub@redhat.com>
2341 * c-cppbuiltin.c: Include configargs.h.
2342 (c_cpp_builtins): For C++11 and later if THREAD_MODEL_SPEC is not
2343 defined, predefine __STDCPP_THREADS__ to 1 unless thread_model is
2346 2020-11-13 Gergö Barany <gergo@codesourcery.com>
2347 Thomas Schwinge <thomas@codesourcery.com>
2349 * c.opt (fopenacc-kernels): Add.
2351 2020-11-13 Jason Merrill <jason@redhat.com>
2353 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_using_enum.
2355 2020-11-13 Piotr H. Dabrowski <phd@phd.re>
2358 * c-cppbuiltin.c: c_cpp_builtins_optimize_pragma(): use cpp_define_unused()
2360 2020-11-13 Martin Liska <mliska@suse.cz>
2362 * c-attribs.c (build_attr_access_from_parms): Format properly.
2364 2020-11-13 Iain Sandoe <iain@sandoe.co.uk>
2367 * c-common.c (c_common_reswords): null_unspecified, nullable,
2368 nonnull, null_resettable: New keywords.
2369 * c-common.h (enum rid): RID_NULL_UNSPECIFIED, RID_NULLABLE,
2370 RID_NONNULL, RID_NULL_RESETTABLE: New.
2371 (OBJC_IS_PATTR_KEYWORD): Include nullability keywords in the
2372 ranges accepted for property attributes.
2373 * c-attribs.c (handle_objc_nullability_attribute): New.
2374 * c-objc.h (enum objc_property_attribute_group): Add
2375 OBJC_PROPATTR_GROUP_NULLABLE.
2376 (enum objc_property_attribute_kind):Add
2377 OBJC_PROPERTY_ATTR_NULL_UNSPECIFIED, OBJC_PROPERTY_ATTR_NULLABLE,
2378 OBJC_PROPERTY_ATTR_NONNULL, OBJC_PROPERTY_ATTR_NULL_RESETTABLE.
2380 2020-11-13 Iain Sandoe <iain@sandoe.co.uk>
2383 * c-attribs.c (handle_objc_root_class_attribute): New
2384 * c-objc.h (objc_start_class_interface): Add a location
2385 value for the position of the class name.
2386 * c.opt: Add Wobjc-root-class.
2387 * stub-objc.c (objc_start_class_interface): Add a location
2388 value for the position of the class name.
2390 2020-11-12 Joseph Myers <joseph@codesourcery.com>
2392 * c-lex.c (c_common_has_attribute): Take argument std_syntax.
2393 Allow scope for C. Handle standard attributes for C. Do not
2394 accept unscoped attributes if std_syntax and not handled as
2395 standard attributes.
2396 * c-common.h (c_common_has_attribute): Update prototype.
2398 2020-11-12 Nicholas Guriev <guriev-ns@ya.ru>
2401 * c-pch.c (c_common_valid_pch): Use cpp_warning with CPP_W_INVALID_PCH
2402 reason to fix -Werror=invalid-pch and -Wno-error=invalid-pch switches.
2404 2020-11-11 Patrick Palka <ppalka@redhat.com>
2407 * c-opts.c (c_common_post_options): Update latest_abi_version.
2409 2020-11-10 Jakub Jelinek <jakub@redhat.com>
2412 * c-common.h (warn_if_unused_value): Add quiet argument defaulted
2414 * c-warn.c (warn_if_unused_value): Likewise. Pass it down
2415 recursively and just return true instead of warning if it is true.
2416 Handle COMPLEX_EXPR.
2418 2020-11-10 Chung-Lin Tang <cltang@codesourcery.com>
2420 * c-common.h (c_omp_adjust_map_clauses): New declaration.
2421 * c-omp.c (struct map_clause): Helper type for c_omp_adjust_map_clauses.
2422 (c_omp_adjust_map_clauses): New function.
2424 2020-11-09 Marek Polacek <polacek@redhat.com>
2427 * c-common.c (attribute_fallthrough_p): Tweak the warning
2430 2020-11-09 Patrick Palka <ppalka@redhat.com>
2432 * c-pragma.c (handle_pragma_diagnostic): Split the
2433 unknown-option -Wpragmas diagnostic into a warning and a
2434 subsequent note containing a spelling suggestion. Avoid
2435 computing the suggestion if -Wpragmas warnings are being
2438 2020-11-09 Patrick Palka <ppalka@redhat.com>
2441 * c-indentation.c (get_visual_column): Remove location_t
2442 parameter. Move the column-tracking diagnostic code from here
2444 (should_warn_for_misleading_indentation): ... here, before the
2445 early exit for when the loci are not all distinct. Don't pass a
2446 location_t argument to get_visual_column.
2447 (assert_get_visual_column_succeeds): Don't pass a location_t
2448 argument to get_visual_column.
2449 (assert_get_visual_column_fails): Likewise.
2451 2020-11-08 Iain Sandoe <iain@sandoe.co.uk>
2453 * c-common.h (OBJC_IS_PATTR_KEYWORD): Add class to the list
2454 of keywords accepted in @property attribute contexts.
2455 * c-objc.h (enum objc_property_attribute_group): Add
2456 OBJC_PROPATTR_GROUP_CLASS.
2457 (enum objc_property_attribute_kind): Add
2458 OBJC_PROPERTY_ATTR_CLASS.
2460 2020-11-07 Iain Sandoe <iain@sandoe.co.uk>
2462 * c-common.c (c_common_reswords): Add 'atomic' property
2464 * c-common.h (enum rid): Add RID_PROPATOMIC for atomic
2465 property attributes.
2467 2020-11-07 Iain Sandoe <iain@sandoe.co.uk>
2469 * c-attribs.c (handle_nsobject_attribute): New.
2470 * c.opt: Add WNSObject-attribute.
2472 2020-11-06 Iain Sandoe <iain@sandoe.co.uk>
2474 * c-objc.h (enum objc_property_attribute_group): New
2475 (enum objc_property_attribute_kind): New.
2476 (OBJC_PROPATTR_GROUP_MASK): New.
2477 (struct property_attribute_info): Small class encapsulating
2478 parser output from property attributes.
2479 (objc_prop_attr_kind_for_rid): New
2480 (objc_add_property_declaration): Simplify interface.
2481 * stub-objc.c (enum rid): Dummy type.
2482 (objc_add_property_declaration): Simplify interface.
2483 (objc_prop_attr_kind_for_rid): New.
2485 2020-11-06 Nathan Sidwell <nathan@acm.org>
2487 * c-ada-spec.c (collect_ada_nodes): Rename
2488 DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
2489 (collect_ada_node): Likewise.
2490 (dump_forward_type): Likewise.
2491 * c-common.c (set_underlying_type): Rename
2492 DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
2493 (user_facing_original_type, c_common_finalize_early_debug): Likewise.
2495 2020-11-06 Jakub Jelinek <jakub@redhat.com>
2497 * c-common.c (verify_sequence_points): Remove DEBUG_FUNCTION.
2499 2020-11-05 Marek Polacek <polacek@redhat.com>
2502 * c.opt (Wexceptions): New option.
2504 2020-11-05 Marek Polacek <polacek@redhat.com>
2507 * c.opt (Wvexing-parse): New option.
2509 2020-11-04 Jakub Jelinek <jakub@redhat.com>
2512 * c-omp.c (c_omp_split_clauses): Look through array reductions to find
2513 underlying decl to clear in the allocate_head bitmap.
2515 2020-11-04 Iain Sandoe <iain@sandoe.co.uk>
2517 * c-objc.h (objc_non_constant_expr_p): New.
2518 * stub-objc.c (objc_non_constant_expr_p): New.
2520 2020-11-03 Nathan Sidwell <nathan@acm.org>
2522 * c.opt (MQ,MT): Reword description to be make-agnostic.
2524 2020-11-02 Nathan Sidwell <nathan@acm.org>
2526 * c-opts.c (c_common_post_options): Move var decl to its
2527 initialization point.
2529 2020-11-01 Iain Sandoe <iain@sandoe.co.uk>
2531 * c-lex.c (c_lex_with_flags): When combining '@' with a
2532 keyword for Objective-C, combine the location ranges too.
2534 2020-10-30 Qing Zhao <qing.zhao@oracle.com>
2535 H.J.Lu <hjl.tools@gmail.com>
2537 * c-attribs.c (c_common_attribute_table): Add new attribute
2538 zero_call_used_regs.
2539 (handle_zero_call_used_regs_attribute): New function.
2541 2020-10-28 Marek Polacek <polacek@redhat.com>
2544 * c-opts.c (c_common_post_options): In C++20, turn on
2545 -Wdeprecated-enum-enum-conversion and
2546 -Wdeprecated-enum-float-conversion.
2547 * c.opt (Wdeprecated-enum-enum-conversion,
2548 Wdeprecated-enum-float-conversion): New options.
2549 (Wenum-conversion): Allow for C++ too.
2551 2020-10-28 Jakub Jelinek <jakub@redhat.com>
2553 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ALLOCATE.
2554 * c-omp.c: Include bitmap.h.
2555 (c_omp_split_clauses): Handle OMP_CLAUSE_ALLOCATE.
2557 2020-10-26 Ville Voutilainen <ville.voutilainen@gmail.com>
2559 * c-common.c (__is_nothrow_assignable): New.
2560 (__is_nothrow_constructible): Likewise.
2561 * c-common.h (RID_IS_NOTHROW_ASSIGNABLE): New.
2562 (RID_IS_NOTHROW_CONSTRUCTIBLE): Likewise.
2564 2020-10-23 Jan Hubicka <hubicka@ucw.cz>
2566 * c-common.c (c_common_finalize_early_debug): Update for new thunk api.
2568 2020-10-23 Marek Polacek <polacek@redhat.com>
2571 * c-common.c (verify_tree): Handle PAREN_SIZEOF_EXPR.
2572 (c_common_init_ts): Likewise.
2573 * c-common.def (PAREN_SIZEOF_EXPR): New tree code.
2574 * c-common.h (maybe_warn_sizeof_array_div): Declare.
2575 * c-warn.c (sizeof_pointer_memaccess_warning): Unwrap NOP_EXPRs.
2576 (maybe_warn_sizeof_array_div): New function.
2577 * c.opt (Wsizeof-array-div): New option.
2579 2020-10-23 Martin Sebor <msebor@redhat.com>
2582 * c-warn.c (warn_parm_ptrarray_mismatch): Move null test earlier.
2584 2020-10-22 Martin Liska <mliska@suse.cz>
2587 * c-attribs.c (handle_no_stack_protect_function_attribute): New.
2588 (handle_stack_protect_attribute): Add error message for a
2589 no_stack_protector function.
2591 2020-10-22 Martin Liska <mliska@suse.cz>
2593 * c-cppbuiltin.c (c_cpp_builtins): Use the stack_protector enum.
2595 2020-10-22 Jan Hubicka <hubicka@ucw.cz>
2597 * c-gimplify.c: Include tree-nested.h
2598 (c_genericize): Update for new nested function info.
2600 2020-10-14 Martin Sebor <msebor@redhat.com>
2603 * c-attribs.c (build_attr_access_from_parms): Wrap chain of VLA
2604 bounds in an extra list.
2606 2020-10-05 Richard Biener <rguenther@suse.de>
2607 Jakub Jelinek <jakub@redhat.com>
2610 * c-pretty-print.c: Include langhooks.h.
2611 (c_pretty_printer::postfix_expression): Handle TARGET_MEM_REF as
2613 (c_pretty_printer::expression): Handle TARGET_MEM_REF as
2615 (c_pretty_printer::unary_expression): Handle TARGET_MEM_REF.
2617 2020-09-30 Martin Sebor <msebor@redhat.com>
2620 * c-attribs.c (append_access_attr): Use the function declaration
2621 location for a warning about an attribute access argument.
2623 2020-09-29 Marek Polacek <polacek@redhat.com>
2626 * c.opt (Wrange-loop-construct): New option.
2628 2020-09-23 Martin Sebor <msebor@redhat.com>
2631 * c-warn.c (warn_parm_ptrarray_mismatch): Handle more invalid input.
2633 2020-09-23 Marek Polacek <polacek@redhat.com>
2636 * c-gimplify.c (c_genericize): Only call do_warn_duplicated_branches_r
2637 after loops and other structured control constructs have been lowered.
2639 2020-09-22 Jakub Jelinek <jakub@redhat.com>
2641 * c.opt (Wbuiltin-declaration-mismatch): Fix typo in variable name:
2642 warn_builtin_declaraion_mismatch -> warn_builtin_declaration_mismatch.
2644 2020-09-21 Marek Polacek <polacek@redhat.com>
2646 * c.opt (Wctad-maybe-unsupported): New option.
2648 2020-09-19 Martin Sebor <msebor@redhat.com>
2651 * c-common.h (warn_parm_array_mismatch): Declare new function.
2652 (has_attribute): Move declaration of an existing function.
2653 (build_attr_access_from_parms): Declare new function.
2654 * c-warn.c (parm_array_as_string): Define new function.
2655 (plus_one): Define new function.
2656 (warn_parm_ptrarray_mismatch): Define new function.
2657 (warn_parm_array_mismatch): Define new function.
2658 (vla_bound_parm_decl): New function.
2659 * c.opt (-Warray-parameter, -Wvla-parameter): New options.
2660 * c-pretty-print.c (pp_c_type_qualifier_list): Don't print array type
2662 (c_pretty_printer::direct_abstract_declarator): ...but instead print
2663 them in brackets here. Also print [static]. Strip extraneous
2664 expressions from VLA bounds.
2666 2020-09-19 Martin Sebor <msebor@redhat.com>
2669 * c-attribs.c (c_common_attribute_table): Add "arg spec" attribute.
2670 (handle_argspec_attribute): New function.
2671 (get_argument, get_argument_type): New functions.
2672 (append_access_attrs): Add overload. Handle internal attribute
2673 representation in addition to external.
2674 (handle_access_attribute): Handle internal attribute representation
2675 in addition to external.
2676 (build_attr_access_from_parms): New function.
2678 2020-09-19 Sandra Loosemore <sandra@codesourcery.com>
2680 * c-gimplify.c (genericize_c_loop): Rewrite to match
2681 c_finish_loop in c-typeck.c.
2683 2020-09-19 Sandra Loosemore <sandra@codesourcery.com>
2685 * c-common.c (c_block_may_fallthrough): New, split from
2686 cxx_block_may_fallthrough in the cp front end.
2687 (c_common_init_ts): Move handling of loop and switch-related
2688 statements here from the cp front end.
2689 * c-common.def (FOR_STMT, WHILE_STMT, DO_STMT): Move here from
2691 (BREAK_STMT, CONTINUE_STMT, SWITCH_STMT): Likewise.
2692 * c-common.h (c_block_may_fallthru): Declare.
2693 (bc_state_t): Move here from cp front end.
2694 (save_bc_state, restore_bc_state): Declare.
2695 (c_genericize_control_stmt): Declare.
2696 (WHILE_COND, WHILE_BODY): Likewise.
2697 (DO_COND, DO_BODY): Likewise.
2698 (FOR_INIT_STMT, FOR_COND, FOR_EXPR, FOR_BODY, FOR_SCOPE): Likewise.
2699 (SWITCH_STMT_COND, SWITCH_STMT_BODY): Likewise.
2700 (SWITCH_STMT_TYPE, SWITCH_STMT_SCOPE): Likewise.
2701 (SWITCH_STMT_ALL_CASES_P, SWITCH_STMT_NO_BREAK_P): Likewise.
2702 (LABEL_DECL_BREAK, LABEL_DECL_CONTINUE): Likewise.
2703 * c-dump.c (dump_stmt): Copy from cp front end.
2704 (c_dump_tree): Move code to handle structured loop and switch
2705 tree nodes here from cp front end.
2706 * c-gimplify.c: Adjust includes.
2707 (enum bc_t, bc_label, begin_bc_block, finish_bc_block): Move from
2709 (save_bc_state, restore_bc_state): New functions using old code
2711 (get_bc_label, expr_loc_or_loc): Move from cp front end.
2712 (genericize_c_loop): Move from cp front end.
2713 (genericize_for_stmt, genericize_while_stmt): Likewise.
2714 (genericize_do_stmt, genericize_switch_stmt): Likewise.
2715 (genericize_continue_stmt, genericize_break_stmt): Likewise.
2716 (genericize_omp_for_stmt): Likewise.
2717 (c_genericize_control_stmt): New function using code split from
2719 (c_genericize_control_r): New.
2720 (c_genericize): Call walk_tree with c_genericize_control_r.
2721 * c-pretty-print.c (c_pretty_printer::statement): Move code to handle
2722 structured loop and switch tree nodes here from cp front end.
2724 2020-09-17 Patrick Palka <ppalka@redhat.com>
2727 * c-indentation.c (should_warn_for_misleading_indentation): Move
2728 declarations of local variables closer to their first use.
2729 Handle virtual token locations by resolving them to their
2730 respective macro expansion points. If all three tokens are
2731 produced from the same macro expansion, then instead use their
2732 loci within the macro definition.
2734 2020-09-16 Martin Sebor <msebor@redhat.com>
2738 * c-attribs.c (validate_attr_args): New function.
2739 (validate_attr_arg): Same.
2740 (handle_section_attribute): Call it. Introduce a local variable.
2741 (handle_alloc_size_attribute): Same.
2742 (handle_alloc_align_attribute): Same.
2744 2020-09-14 Jakub Jelinek <jakub@redhat.com>
2746 * c-attribs.c (handle_optimize_attribute): Adjust
2747 cl_optimization_save, cl_optimization_restore and
2748 build_optimization_node callers.
2749 * c-pragma.c (handle_pragma_optimize): Adjust
2750 build_optimization_node caller.
2751 (handle_pragma_push_options): Adjust
2752 build_optimization_node and build_target_option_node callers.
2753 (handle_pragma_pop_options, handle_pragma_reset_options):
2754 Adjust cl_optimization_restore callers.
2756 2020-08-28 Martin Sebor <msebor@redhat.com>
2758 * c.opt (Wstringop-overread): New option.
2760 2020-08-11 Jakub Jelinek <jakub@redhat.com>
2763 * c-common.c (get_atomic_generic_size): Require that first argument's
2764 type points to a complete type and use tree_fits_uhwi_p instead of
2765 just INTEGER_CST TREE_CODE check for the TYPE_SIZE_UNIT.
2767 2020-07-31 Martin Sebor <msebor@redhat.com>
2770 * c-common.c (check_function_arguments_recurse): Return early when
2771 no-warning bit is set.
2773 2020-07-31 Richard Biener <rguenther@suse.de>
2776 * c-common.h (c_common_finalize_early_debug): Declare.
2777 * c-common.c: Include debug.h.
2778 (c_common_finalize_early_debug): finalize_early_debug langhook
2779 implementation generating debug for extern declarations.
2781 2020-07-27 Nathan Sidwell <nathan@acm.org>
2783 * c-common.c (try_to_locate_new_include_insertion_point): Use
2784 strcmp, not pointer equality.
2786 2020-07-25 Martin Sebor <msebor@redhat.com>
2789 * c-common.c (check_nonnull_arg): Print note only when warning was
2792 2020-07-22 Tobias Burnus <tobias@codesourcery.com>
2794 * c-omp.c (c_finish_omp_critical): Check for no name but
2795 nonzero hint provided.
2797 2020-07-20 Jason Merrill <jason@redhat.com>
2799 * c-cppbuiltin.c (c_cpp_builtins): Update
2800 __cpp_nontype_template_args for C++20.
2802 2020-07-20 Martin Sebor <msebor@redhat.com>
2805 * c.opt: Remove stray text.
2807 2020-07-14 Lewis Hyatt <lhyatt@gmail.com>
2810 * c-indentation.c (should_warn_for_misleading_indentation): Get
2811 global tabstop from the new source.
2812 * c-opts.c (c_common_handle_option): Remove handling of -ftabstop, which
2813 is now a common option.
2816 2020-07-08 Eric Botcazou <ebotcazou@adacore.com>
2818 * c.opt (Wscalar-storage-order): Add explicit variable.
2820 2020-07-07 Nathan Sidwell <nathan@acm.org>
2822 * c-opts.c (c_common_post_options): Add 'injecting' arg to
2824 (c_finish_options): Add linemap_line_start calls for builtin and cmd
2825 maps. Force token position to line_table's highest line.
2826 * c-ppoutput.c (print_line_1): Refactor, print line zero.
2827 (cb_define): Always increment source line.
2829 2020-07-06 Martin Sebor <msebor@redhat.com>
2832 * c-common.c (check_function_nonnull): Avoid checking syntesized calls
2833 to stub lambda objects with null this pointer.
2834 (check_nonnull_arg): Handle C++ nullptr.
2836 2020-07-02 Jason Merrill <jason@redhat.com>
2837 Jakub Jelinek <jakub@redhat.com>
2839 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_consteval.
2841 2020-06-30 Jakub Jelinek <jakub@redhat.com>
2844 * c-common.c (check_function_arguments_recurse): Don't crash on
2845 calls to internal functions.
2847 2020-06-28 Martin Sebor <msebor@redhat.com>
2850 * c-common.c (struct nonnull_arg_ctx): Add members.
2851 (check_function_nonnull): Use nonnull_arg_ctx as argument. Handle
2852 C++ member functions specially. Consider the this pointer implicitly
2854 (check_nonnull_arg): Use location of argument when available.
2855 (check_function_arguments): Use nonnull_arg_ctx as argument.
2857 2020-06-27 Jakub Jelinek <jakub@redhat.com>
2860 * c-common.c (pointer_int_sum): Use TYPE_OVERFLOW_UNDEFINED instead of
2861 !TYPE_UNSIGNED check to see if we can apply distributive law and handle
2862 smaller precision intop operands separately.
2864 2020-06-26 Marek Polacek <polacek@redhat.com>
2866 * c-opts.c (c_common_init_options): Default to gnu++17.
2868 2020-06-17 Jonathan Wakely <jwakely@redhat.com>
2871 * c-common.c (get_atomic_generic_size): Check cv-qualifiers in
2874 2020-06-16 Jakub Jelinek <jakub@redhat.com>
2876 * c-common.h (c_omp_check_loop_iv_exprs): Add an int argument.
2877 * c-omp.c (struct c_omp_check_loop_iv_data): Add maybe_nonrect and
2879 (c_omp_is_loop_iterator): New function.
2880 (c_omp_check_loop_iv_r): Use it. Add support for silent scanning
2881 if outer loop iterator is present. Perform duplicate checking through
2882 hash_set in the function rather than expecting caller to do that.
2883 Pass NULL instead of d->ppset to walk_tree_1.
2884 (c_omp_check_nonrect_loop_iv): New function.
2885 (c_omp_check_loop_iv): Use it. Fill in new members, allow
2886 non-rectangular loop forms, diagnose multiple associated loops with
2887 the same iterator. Pass NULL instead of &pset to walk_tree_1.
2888 (c_omp_check_loop_iv_exprs): Likewise.
2890 2020-06-10 Martin Liska <mliska@suse.cz>
2892 PR tree-optimization/92860
2893 * c-attribs.c (handle_optimize_attribute):
2894 Save global options and compare it after parsing of function
2896 * c-pragma.c (opt_stack::saved_global_options): New field.
2897 (handle_pragma_push_options): Save global_options.
2898 (handle_pragma_pop_options): Compare them after pop.
2900 2020-06-09 Jakub Jelinek <jakub@redhat.com>
2903 * c-pretty-print.c (c_pretty_printer::unary_expression): Handle the
2904 case when MEM_REF's first argument has type pointer to incomplete type.
2906 2020-06-05 Jason Merrill <jason@redhat.com>
2908 * c-pretty-print.c (pp_c_additive_expression): Handle negative
2909 operand to POINTER_PLUS_EXPR.
2911 2020-06-04 Martin Sebor <msebor@redhat.com>
2915 * c-attribs.c (append_access_attrs): Handle attr_access::none.
2916 (handle_access_attribute): Same.
2918 2020-06-03 Mark Wielaard <mark@klomp.org>
2920 * known-headers.cc (get_cp_stdlib_header_for_string_macro_name):
2922 * known-headers.h (get_cp_stdlib_header_for_string_macro_name):
2923 New function declaration.
2925 2020-06-03 Mark Wielaard <mark@klomp.org>
2927 * known-headers.cc (get_string_macro_hint): New function.
2928 (get_stdlib_header_for_name): Use get_string_macro_hint.
2929 (get_c_stdlib_header_for_string_macro_name): New function.
2930 * known-headers.h (get_c_stdlib_header_for_string_macro_name):
2931 New function declaration.
2933 2020-06-03 Tobias Burnus <tobias@codesourcery.com>
2935 * c-common.h (c_omp_predetermined_mapping): Declare.
2936 * c-omp.c (c_omp_predetermined_mapping): New.
2938 2020-05-22 Mark Wielaard <mark@klomp.org>
2940 * known-headers.cc (get_stdlib_header_for_name): Add a new
2941 stdlib_hint array for stdbool and stdint.
2943 2020-05-22 Mark Wielaard <mark@klomp.org>
2945 * known-headers.cc (get_stdlib_header_for_name): Return
2946 "<stdbool.h>" for "bool", "true" or "false" when STDLIB_C and
2949 2020-05-20 Nathan Sidwell <nathan@acm.org>
2951 * c-common.c (try_to_locate_new_include_insertion_point): Revert change.
2953 * c-common.c (try_to_locate_new_include_insertion_point): Use
2954 strcmp to compare filenames.
2955 * c-lex.c (init_c_lex): Move declaration to initialization.
2956 * c-opts.c (handle_deferred_opts): Move cpp_get_deps call into
2957 deferred count loop.
2959 2020-05-15 Jason Merrill <jason@redhat.com>
2961 * c-opts.c (set_std_cxx20): Set flag_coroutines.
2963 2020-05-13 Jason Merrill <jason@redhat.com>
2965 * c.opt (std=c++20): Make c++2a the alias.
2966 (std=gnu++20): Likewise.
2967 * c-common.h (cxx_dialect): Change cxx2a to cxx20.
2969 * c-cppbuiltin.c: Adjust.
2970 * c-ubsan.c: Adjust.
2973 2020-05-12 Eric Botcazou <ebotcazou@adacore.com>
2975 * c-ada-spec.c (dump_ads): Output pragma Warnings ("U"); on entry.
2977 2020-05-08 Nathan Sidwell <nathan@acm.org>
2979 Reimplement directives only processing.
2980 * c-ppoutput.c (token_streamer): Ne.
2981 (directives_only_cb): New. Swallow ...
2982 (print_lines_directives_only): ... this.
2983 (scan_translation_unit_directives_only): Reimplment using the
2984 published interface.
2986 2020-05-07 Marek Polacek <polacek@redhat.com>
2988 * c-format.c (badwords): Add "nonstatic".
2990 202-05-07 Jakub Jelinek <jakub@redhat.com>
2993 * c-common.c (speculation_safe_value_resolve_params): Return false if
2994 error_operand_p (val2).
2995 (resolve_overloaded_builtin) <case BUILT_IN_SPECULATION_SAFE_VALUE_N>:
2996 Remove extraneous semicolon.
2998 2020-05-06 qing zhao <qing.zhao@oracle.com>
3001 * c-indentation.c (get_visual_column): Add a hint to use the new
3002 -flarge-source-files option.
3004 2020-05-05 Stefan Schulze Frielinghaus <stefansf@linux.ibm.com>
3006 * c-attribs.c (handle_vector_size_attribute): Add attribute
3007 nonnull for argument args in order to silence warning of
3008 uninitialized variable usage. Since this is local to the
3009 compilation unit and thus cannot be checked at call sides by the
3010 compiler, added an assert statement in order to verify this.
3012 2020-05-01 H.J. Lu <hongjiu.lu@intel.com>
3015 * c-attribs.c (handle_patchable_function_entry_attribute): Limit
3016 value to USHRT_MAX (65535).
3018 2020-04-29 Jakub Jelinek <jakub@redhat.com>
3020 * c-format.c (PP_FORMAT_CHAR_TABLE): Add %{ and %}.
3022 2020-04-27 Jakub Jelinek <jakub@redhat.com>
3025 * c-common.c (resolve_overloaded_builtin): Return error_mark_node for
3026 fncode == BUILT_IN_NONE before initialization of first_param.
3028 2020-04-23 Marek Polacek <polacek@redhat.com>
3031 * c-attribs.c (find_tm_attribute): Use get_attribute_name instead of
3034 2020-04-14 Patrick Palka <ppalka@redhat.com>
3037 * c-pretty-print.c (pp_c_pointer) <case REFERENCE_TYPE>: Print a double
3038 ampersand if it's an rvalue reference type.
3040 2020-04-13 Martin Sebor <msebor@redhat.com>
3043 * c-pretty-print.c (c_pretty_printer::direct_abstract_declarator): Avoid
3044 printing array bound for flexible array members.
3046 2020-04-13 Iain Sandoe <iain@sandoe.co.uk>
3048 * c-cppbuiltin.c (c_cpp_builtins): Update coroutines builtin
3051 2020-04-02 Richard Biener <rguenther@suse.de>
3054 * c-opts.c (c_common_post_options): Enable -ffinite-loops
3055 for -O2 and C++11 or newer.
3057 2020-03-28 Patrick Palka <ppalka@redhat.com>
3059 * c.opt: Add -fconcepts-diagnostics-depth.
3061 2020-03-27 Martin Sebor <msebor@redhat.com>
3064 * c-attribs.c (handle_copy_attribute): Avoid passing expressions
3065 to decl_attributes. Make handling of different kinds of entities
3068 2020-03-27 Martin Sebor <msebor@redhat.com>
3071 * c-attribs.c (handle_access_attribute): Avoid setting TYPE_ATTRIBUTES
3074 2020-03-23 Jakub Jelinek <jakub@redhat.com>
3077 * c-warn.c (warnings_for_convert_and_check): For expr and/or
3078 result being COMPOUND_EXPRs, skip to ultimate rhs.
3080 2020-03-20 Richard Sandiford <richard.sandiford@arm.com>
3083 * c-common.c (c_common_type_for_mode): Before using a registered
3084 built-in type, check that the vectorness of the type matches
3085 the vectorness of the mode.
3087 2020-03-17 Jakub Jelinek <jakub@redhat.com>
3089 * c-common.c (resolve_overloaded_builtin): Fix up duplicated word
3090 issue in a diagnostic message.
3092 2020-03-15 Lewis Hyatt <lhyatt@gmail.com>
3094 * c.opt: Avoid redundancy in the help text.
3096 2020-03-02 Marek Polacek <polacek@redhat.com>
3098 PR c++/93958 - add missing -std=gnu++20.
3099 * c.opt: Add -std=gnu++20.
3101 2020-03-01 Martin Sebor <msebor@redhat.com>
3104 * c-attribs.c (append_access_attrs): Correctly handle attribute.
3105 (handle_access_attribute): Same.
3107 2020-02-25 Jakub Jelinek <jakub@redhat.com>
3110 * c-pragma.c (handle_pragma_diagnostic): Add missing ? after
3111 "did you mean" hint in diagnostics.
3113 2020-02-15 Jason Merrill <jason@redhat.com>
3115 * c.opt: Add -std=c++20.
3117 2020-02-14 Eric Botcazou <ebotcazou@adacore.com>
3119 * c-ada-spec.c: Include bitmap.h.
3120 (dump_ada_double_name): Rename into...
3121 (dump_anonymous_type_name): ...this. Always use the TYPE_UID.
3122 (dump_ada_array_type): Adjust to above renaming. Robustify.
3123 (dump_nested_types_1): New function copied from... Add dumped_types
3124 parameter and pass it down to dump_nested_type.
3125 (dump_nested_types): ...this. Remove parent parameter. Just call
3126 dump_nested_types_1 on an automatic bitmap.
3127 (dump_nested_type): Add dumped_types parameter.
3128 <ARRAY_TYPE>: Do not dump it if already present in dumped_types.
3129 Adjust recursive calls and adjust to above renaming.
3130 (dump_ada_declaration): Adjust call to dump_nested_types.
3131 Tidy up and adjust to above renaming.
3132 (dump_ada_specs): Initialize and release bitmap obstack.
3134 2020-02-10 Martin Sebor <msebor@redhat.com>
3137 * c-attribs.c (handle_access_attribute): Correct off-by-one mistakes.
3139 2020-02-10 Jakub Jelinek <jakub@redhat.com>
3142 * c-format.c (check_plain): Fix up last argument of strncasecmp.
3143 Remove useless extra test.
3145 2020-02-03 Julian Brown <julian@codesourcery.com>
3146 Tobias Burnus <tobias@codesourcery.com>
3148 * c-cppbuiltin.c (c_cpp_builtins): Update _OPENACC define to 201711.
3150 2020-01-29 Jason Merrill <jason@redhat.com>
3153 * c-attribs.c (check_cxx_fundamental_alignment_constraints): Remove.
3155 2020-01-23 Jason Merrill <jason@redhat.com>
3157 * c-warn.c (conversion_warning): Change -Wsign-conversion handling.
3159 2020-01-23 Martin Sebor <msebor@redhat.com>
3162 * c-common.c (check_function_arguments): Avoid overlap checking
3163 of sprintf functions.
3165 2020-01-22 Jason Merrill <jason@redhat.com>
3167 PR testsuite/93391 - PR 40752 test fails with unsigned plain char.
3169 * c-warn.c (conversion_warning): Check operands only after checking
3170 the whole expression. Don't check second operand of + for sign.
3172 2020-01-21 Jason Merrill <jason@redhat.com>
3173 Manuel López-Ibáñez <manu@gcc.gnu.org>
3175 PR c++/40752 - useless -Wconversion with short +=.
3176 * c.opt (-Warith-conversion): New.
3177 * c-warn.c (conversion_warning): Recurse for operands of
3178 operators. Only warn about the whole expression with
3181 2020-01-21 Jason Merrill <jason@redhat.com>
3183 * c-common.c (unsafe_conversion_p): Don't warn, return UNSAFE_SIGN.
3184 * c-warn.c (conversion_warning): Warn about UNSAFE_SIGN.
3186 2020-01-20 Nathan Sidwell <nathan@acm.org>
3188 PR preprocessor/80005
3189 * c-cppbuiltins.c (c_cpp_builtins): Don't define __has_include{,_next}.
3191 2020-01-18 Iain Sandoe <iain@sandoe.co.uk>
3193 * c-common.c (co_await, co_yield, co_return): New.
3194 * c-common.h (RID_CO_AWAIT, RID_CO_YIELD,
3195 RID_CO_RETURN): New enumeration values.
3196 (D_CXX_COROUTINES): Bit to identify coroutines are active.
3197 (D_CXX_COROUTINES_FLAGS): Guard for coroutine keywords.
3198 * c-cppbuiltin.c (__cpp_coroutines): New cpp define.
3199 * c.opt (fcoroutines): New command-line switch.
3201 2020-01-10 David Malcolm <dmalcolm@redhat.com>
3203 * c-format.c (local_event_ptr_node): New.
3204 (PP_FORMAT_CHAR_TABLE): Add entry for "%@".
3205 (init_dynamic_diag_info): Initialize local_event_ptr_node.
3206 * c-format.h (T_EVENT_PTR): New define.
3208 2020-01-10 Martin Sebor <msebor@redhat.com>
3211 * c-attribs.c (append_access_attrs): Validate against the translated
3212 access string rather than the human-readable representation.
3214 2020-01-01 Jakub Jelinek <jakub@redhat.com>
3216 Update copyright years.
3218 2019-12-20 Eric Botcazou <ebotcazou@adacore.com>
3220 * c-ada-spec.h (decl_sloc): Delete.
3221 * c-ada-spec.c (decl_sloc): Make static.
3223 2019-12-19 Julian Brown <julian@codesourcery.com>
3225 * c-common.h (c_omp_map_clause_name): Add prototype.
3226 * c-omp.c (c_omp_map_clause_name): New function.
3227 * c-pragma.h (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ATTACH and
3228 PRAGMA_OACC_CLAUSE_DETACH.
3230 2019-12-19 Julian Brown <julian@codesourcery.com>
3231 Maciej W. Rozycki <macro@codesourcery.com>
3232 Tobias Burnus <tobias@codesourcery.com>
3233 Thomas Schwinge <thomas@codesourcery.com>
3235 * c-pragma.h (pragma_omp_clause): Add
3236 PRAGMA_OACC_CLAUSE_NO_CREATE.
3238 2019-12-17 Martin Sebor <msebor@redhat.com>
3241 * c.opt (-Wmismatched-tags, -Wredundant-tags): New options.
3243 2019-12-11 David Malcolm <dmalcolm@redhat.com>
3245 * c-pretty-print.c (c_pretty_printer::clone): New vfunc
3247 * c-pretty-print.h (c_pretty_printer::clone): New vfunc decl.
3249 2019-12-09 David Malcolm <dmalcolm@redhat.com>
3251 * c-format.c (range_label_for_format_type_mismatch::get_text):
3252 Replace label_text ctor called with true with label_text::take.
3254 2019-12-09 David Malcolm <dmalcolm@redhat.com>
3256 * c-format.c (selftest::test_type_mismatch_range_labels): Remove
3257 initial newline from expected outputs.
3258 * c-opts.c (c_diagnostic_finalizer): Add pp_newline call before
3259 call to diagnostic_show_locus.
3261 2019-12-06 Jakub Jelinek <jakub@redhat.com>
3263 * c-cppbuiltin.c (c_cpp_builtins): Don't define __cpp_consteval for
3266 2019-12-05 Marek Polacek <polacek@redhat.com>
3267 Jakub Jelinek <jakub@redhat.com>
3269 PR c++/91353 - P1331R2: Allow trivial default init in constexpr contexts.
3270 * c-cppbuiltin.c (c_cpp_builtins): Adjust the value of __cpp_constexpr.
3272 2019-12-05 Marek Polacek <polacek@redhat.com>
3274 PR c++/92271 - make __is_same alias for __is_same_as.
3275 * c-common.c: Add __is_same, an alias for __is_same_as.
3277 2019-12-03 Marek Polacek <polacek@redhat.com>
3279 PR c++/91363 - P0960R3: Parenthesized initialization of aggregates.
3280 * c-cppbuiltin.c (c_cpp_builtins): Predefine
3281 __cpp_aggregate_paren_init=201902 for -std=c++2a.
3283 2019-11-30 Jan Hubicka <hubicka@ucw.cz>
3285 * c-attribs.c (handle_symver_attribute): New function
3286 (c_common_attributes): Add symver.
3288 2019-11-30 Richard Sandiford <richard.sandiford@arm.com>
3290 * c-common.c (pointer_int_sum): Use verify_type_context to check
3291 whether the target allows pointer arithmetic for the types involved.
3292 (c_sizeof_or_alignof_type, c_alignof_expr): Use verify_type_context
3293 to check whether the target allows sizeof and alignof operations
3294 for the types involved.
3296 2019-11-27 Jason Merrill <jason@redhat.com>
3298 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_deduction_guides.
3300 2019-11-26 Jakub Jelinek <jakub@redhat.com>
3303 * c-attribs.c (handle_mode_attribute): Add mode attribute to
3306 2019-11-25 Joseph Myers <joseph@codesourcery.com>
3309 * c-common.c (c_common_type_for_mode): Handle decimal
3310 floating-point types being NULL_TREE.
3311 * c-format.c (get_format_for_type_1): Handle specified types being
3313 * c-lex.c (interpret_float): Give an error for decimal
3314 floating-point constants when decimal floating-point not
3317 2019-11-23 Jakub Jelinek <jakub@redhat.com>
3320 * c-attribs.c (append_access_attrs): Avoid buffer overflow. Avoid
3321 memory leak. Use XNEWVEC macro. Use auto_diagnostic_group to
3322 group warning with inform together.
3323 (handle_access_attribute): Formatting fix.
3325 2019-11-22 Jakub Jelinek <jakub@redhat.com>
3328 * c-common.h (identifier_global_tag): Declare.
3329 * c-format.c (get_pointer_to_named_type): Renamed to ...
3330 (get_named_type): ... this. Use identifier_global_tag instead of
3331 identifier_global_value, handle the return value being a TYPE_P.
3332 (init_dynamic_diag_info): Adjust get_pointer_to_named_type callers
3333 to call get_named_type instead. Formatting fixes.
3335 Implement P1902R1, Missing feature-test macros 2017-2019.
3336 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_init_captures
3337 and __cpp_generic_lambdas for -std=c++2a. Define
3338 __cpp_designated_initializers, __cpp_constexpr_in_decltype and
3339 __cpp_consteval for -std=c++2a. Remove a FIXME comment about
3340 __cpp_concepts for -std=c++2a.
3342 2019-11-22 Martin Sebor <msebor@redhat.com>
3345 * c-attribs.c (handle_access_attribute): New function.
3346 (c_common_attribute_table): Add new attribute.
3347 (get_argument_type): New function.
3348 (append_access_attrs): New function.
3349 (get_nonnull_operand): Rename...
3350 (get_attribute_operand): ...to this.
3351 * c-common.c (get_nonnull_operand): Rename...
3352 (get_attribute_operand): ...to this.
3354 2019-11-21 Joseph Myers <joseph@codesourcery.com>
3356 * c-attribs.c (handle_fallthrough_attribute): Use pedwarn instead
3359 2019-11-19 Joseph Myers <joseph@codesourcery.com>
3361 * c-common.c (attribute_fallthrough_p): In C, use pedwarn not
3362 warning for standard attributes mixed with fallthrough attributes.
3364 2019-11-15 Joseph Myers <joseph@codesourcery.com>
3366 * c-attribs.c (handle_fallthrough_attribute): Remove static.
3367 * c-common.h (handle_fallthrough_attribute): Declare.
3369 2019-11-15 Joseph Myers <joseph@codesourcery.com>
3371 * c-attribs.c (handle_deprecated_attribute): Remove static.
3372 * c-common.h (handle_deprecated_attribute): Declare.
3374 2019-11-14 Joseph Myers <joseph@codesourcery.com>
3376 * c-lex.c (lex_charconst): Make CPP_UTF8CHAR constants unsigned
3379 2019-11-14 Jakub Jelinek <jakub@redhat.com>
3381 * c-omp.c (c_omp_check_context_selector): Add nvidia to the list of
3384 * c-omp.c (c_omp_check_context_selector): Handle name lists
3385 containing string literals. Don't diagnose atomic_default_mem_order
3386 with multiple props.
3388 2019-11-13 Joseph Myers <joseph@codesourcery.com>
3390 * c-cppbuiltin.c (builtin_define_float_constants): Also define
3391 NORM_MAX constants. Update call to get_max_float.
3392 (LAZY_HEX_FP_VALUES_CNT): Update value to include NORM_MAX
3395 2019-11-13 Eric Botcazou <ebotcazou@adacore.com>
3397 * c-ada-spec.c (get_underlying_decl): Do not look through typedefs.
3398 (dump_forward_type): Do not generate a declaration for function types.
3399 (dump_nested_type) <ARRAY_TYPE>: Do not generate a nested declaration
3400 of the component type if it is declared in another file.
3402 2019-11-12 Martin Liska <mliska@suse.cz>
3404 * c-opts.c (c_common_post_options):
3405 Use SET_OPTION_IF_UNSET.
3407 2019-11-12 Maciej W. Rozycki <macro@codesourcery.com>
3408 Frederik Harwath <frederik@codesourcery.com>
3411 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_SERIAL enumeration
3413 * c-pragma.c (oacc_pragmas): Add "serial" entry.
3415 2019-11-08 Richard Sandiford <richard.sandiford@arm.com>
3417 * c-common.h (gnu_vector_type_p): New function.
3418 * c-common.c (c_build_vec_perm_expr): Require __builtin_shuffle
3419 vectors to satisfy gnu_vector_type_p.
3420 (c_build_vec_convert): Likewise __builtin_convertvector.
3421 (convert_vector_to_array_for_subscript): Likewise when applying
3422 implicit vector to array conversion.
3423 (scalar_to_vector): Likewise when converting vector-scalar
3424 operations to vector-vector operations.
3426 2019-11-08 Joseph Myers <joseph@codesourcery.com>
3428 * c.opt (Wold-style-definition): Initialize to -1.
3429 * c-opts.c (c_common_post_options): Set warn_old_style_definition
3430 to flag_isoc2x if not set explicitly.
3432 2019-11-07 Joseph Myers <joseph@codesourcery.com>
3434 * c-attribs.c (parse_tm_stmt_attr): Handle scoped attributes.
3436 2019-11-05 Jason Merrill <jason@redhat.com>
3438 * c-opts.c (c_common_post_options): -fconcepts-ts implies
3441 2019-11-04 Kamlesh Kumar <kamleshbhalui@gmail.com>
3443 * c-opts.c (c_common_post_options): Update
3446 2019-11-02 Jakub Jelinek <jakub@redhat.com>
3448 * c-common.h (c_omp_get_context_selector): Remove.
3449 * c-omp.c (c_omp_get_context_selector): Moved to omp-general.c
3450 and renamed to omp_get_context_selector.
3452 * c-omp.c (c_omp_mark_declare_variant): Use
3453 omp_context_selector_set_compare.
3455 PR c++/88335 - Implement P1073R3: Immediate functions
3456 * c-common.h (enum rid): Add RID_CONSTEVAL.
3457 * c-common.c (c_common_reswords): Add consteval.
3459 2019-11-01 Martin Sebor <msebor@redhat.com>
3465 * c-pretty-print.c (direct_abstract_declarator): Print
3466 bound in zero-length arrays.
3467 * c.opt (-Wzero-length-bounds): New option.
3469 2019-10-30 Nathan Sidwell <nathan@acm.org>
3471 * c-cppbuiltin.c (c_cpp_builtins): Add 'L' suffix to feature
3474 2019-10-28 Martin Sebor <msebor@redhat.com>
3477 * c-common.c (c_common_nodes_and_builtins): Call c_define_builtins
3478 even when only preprocessing.
3479 * c-common.h (names_builtin_p): Declare new function.
3480 * c-lex.c (init_c_lex): Set has_builtin.
3481 (c_common_has_builtin): Define a new function.
3482 * c-ppoutput.c (init_pp_output): Set has_builtin.
3484 2019-10-24 Jakub Jelinek <jakub@redhat.com>
3486 * c-common.h (c_omp_context_selector_matches): Remove.
3487 * c-omp.c (c_omp_context_selector_matches): Remove.
3488 * c-attribs.c (c_common_attribute_table): Add
3489 "omp declare target {host,nohost,block}" attributes.
3491 2019-10-17 JeanHeyd Meneide <phdofthehouse@gmail.com>
3493 * c-lex.c (c_common_has_attribute): Update nodiscard value.
3495 2019-10-14 Richard Sandiford <richard.sandiford@arm.com>
3497 * c-common.h (user_facing_original_type_p): Declare.
3498 * c-common.c: Include c-spellcheck.h.
3499 (user_facing_original_type_p): New function.
3501 2019-10-12 Jakub Jelinek <jakub@redhat.com>
3503 * c-common.h (c_omp_mark_declare_variant,
3504 c_omp_context_selector_matches): Declare.
3505 * c-omp.c: Include attribs.h, gimplify.h, cgraph.h, symbol-summary.h
3507 (c_omp_get_context_selector): Support second argument NULL.
3508 (c_omp_mark_declare_variant, c_omp_context_selector_matches): New
3510 * c-attribs.c (c_common_attribute_table): Remove "omp declare variant"
3511 attribute, add "omp declare variant base" and
3512 "omp declare variant variant" attributes.
3514 2019-10-11 Joseph Myers <joseph@codesourcery.com>
3516 * c.opt (Wc11-c2x-compat): Add CPP(cpp_warn_c11_c2x_compat)
3517 CppReason(CPP_W_C11_C2X_COMPAT).
3519 2019-10-11 Joseph Myers <joseph@codesourcery.com>
3521 * c-common.c (c_common_reswords): Do not use D_EXT for _Decimal32,
3522 _Decimal64 and _Decimal128.
3524 2019-10-10 Joseph Myers <joseph@codesourcery.com>
3526 * c-cppbuiltin.c (c_cpp_builtins): Do not define macros for DFP
3527 types if DFP not supported.
3529 2019-10-10 Jakub Jelinek <jakub@redhat.com>
3531 * c-common.h (c_omp_check_context_selector,
3532 c_omp_get_context_selector): Declare.
3533 * c-omp.c (c_omp_declare_simd_clauses_to_numbers): Fix spelling
3534 in diagnostic message.
3535 (c_omp_check_context_selector, c_omp_get_context_selector): New
3537 * c-attribs.c (c_common_attribute_table): Add "omp declare variant"
3539 (handle_omp_declare_variant_attribute): New function.
3541 2019-10-09 Martin Sebor <msebor@redhat.com>
3543 PR tree-optimization/90879
3544 * c.opt (-Wstring-compare): New option.
3546 2019-10-08 Andrew Sutton <asutton@lock3software.com>
3547 Jason Merrill <jason@redhat.com>
3549 Update the concepts implementation to conform to the C++20
3550 specification, improve compile times, and generally clean up
3553 * c-cppbuiltin.c (c_cpp_builtins): Use new feature test values for
3554 concepts when -std=c++2a. Bump __cpp_concepts to 201907.
3555 * c.opt: Add -Wconcepts-ts.
3556 * c-opts.c (c_common_post_options): Warn when -fconcepts is used
3557 with -std=c++2a. Disable warning for -fconcepts in C++20 mode.
3558 (set_std_cxx2a): Enable concepts by default.
3560 2019-10-08 Joseph Myers <joseph@codesourcery.com>
3562 * c-opts.c (c_common_post_options): Set
3563 -fno-fp-int-builtin-inexact for C2X.
3565 2019-10-05 Jakub Jelinek <jakub@redhat.com>
3567 PR c++/91369 - Implement P0784R7: constexpr new
3568 * c-cppbuiltin.c (c_cpp_builtins): Predefine
3569 __cpp_constexpr_dynamic_alloc=201907 for -std=c++2a.
3571 2019-10-04 Joseph Myers <joseph@codesourcery.com>
3574 * c-format.c (C_STD_VER): Handle C2x.
3575 (C_STD_NAME): Likewise.
3576 (strftime_flag_specs): Add 'O' modifier with 'p' flag.
3577 (time_char_table): Use separate entry for 'B' and 'b', with 'O'
3578 modifier allowed and 'p' flag.
3579 * c-format.h (enum format_std_version): Add STD_C2X.
3580 (struct format_char_info): Mention 'p' in comment on flags2.
3582 2019-10-01 David Malcolm <dmalcolm@redhat.com>
3584 * c-opts.c (c_diagnostic_finalizer): Temporarily clear prefix when
3585 calling diagnostic_show_locus, rather than destroying it afterwards.
3587 2019-10-01 Jakub Jelinek <jakub@redhat.com>
3590 * c-warn.c (check_alignment_of_packed_member): Ignore FIELD_DECLs
3591 with NULL DECL_FIELD_OFFSET.
3593 2019-10-01 Richard Sandiford <richard.sandiford@arm.com>
3595 * c-pretty-print.c (pp_c_specifier_qualifier_list): If a vector type
3596 has a type name, use it in preference to the __vector syntax.
3598 2019-09-30 Richard Sandiford <richard.sandiford@arm.com>
3600 * c-pretty-print.c (pp_c_parameter_type_list): Avoid printing
3601 two spaces between a comma and "...".
3603 2019-09-27 Jakub Jelinek <jakub@redhat.com>
3606 * c-common.h (c_omp_predefined_variable): Declare.
3607 * c-omp.c (c_omp_predefined_variable): New function.
3608 (c_omp_predetermined_sharing): Return OMP_CLAUSE_DEFAULT_SHARED
3609 for predefined variables.
3611 2019-09-27 Richard Sandiford <richard.sandiford@arm.com>
3613 * c-common.h (build_function_call_vec): Take the original
3614 function decl as an optional final parameter.
3615 (check_builtin_function_arguments): Take the original function decl.
3616 * c-common.c (check_builtin_function_arguments): Likewise.
3617 Handle all built-in functions, not just BUILT_IN_NORMAL ones.
3618 Use targetm.check_builtin_call to check BUILT_IN_MD functions.
3620 2019-09-15 Jason Merrill <jason@redhat.com>
3622 * c-warn.c (warn_logical_operator): Strip location wrappers. Don't
3623 fold_for_warn in "|| mask" warning.
3625 2019-09-10 Martin Liska <mliska@suse.cz>
3627 * c.opt: Use newly added WarnRemoved.
3629 2019-09-09 Martin Liska <mliska@suse.cz>
3631 * c.opt: Update comment of removed
3632 options that are preserved only for backward
3635 2019-09-06 Martin Liska <mliska@suse.cz>
3638 * c-common.c: Remove definition of flag_use_repository.
3639 * c-common.h: Likewise.
3640 * c-opts.c (c_common_handle_option):
3641 Do not handle OPT_frepo option.
3642 * c.opt: Mark the option with Deprecated.
3644 2019-09-04 Marek Polacek <polacek@redhat.com>
3646 * c.opt (fdeduce-init-list): Ignored.
3648 2019-09-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3651 * c.opt (Wenum-conversion): New option.
3653 2019-09-03 Jozef Lawrynowicz <jozef.l@mittosystems.com>
3655 * c-attribs.c (handle_section_attribute): Call the
3656 handle_generic_attribute target hook after performing target
3657 independent processing.
3658 (handle_noinit_attribute): Likewise.
3660 2019-09-03 Ian Lance Taylor <iant@golang.org>
3662 * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Always expand
3663 when using -fgo-dump-spec.
3665 2019-09-02 Martin Liska <mliska@suse.cz>
3668 * c-common.c (fname_as_string): Use cxx_printable_name for
3669 __PRETTY_FUNCTION__ same as was used before r265711.
3671 2019-08-28 Marek Polacek <polacek@redhat.com>
3673 Implement P1152R4: Deprecating some uses of volatile.
3675 * c-opts.c (c_common_post_options): Enable -Wvolatile by
3676 default for C++2a, unless -Wno-deprecated.
3677 * c.opt (Wvolatile): New warning.
3679 2019-08-28 Marek Polacek <polacek@redhat.com>
3681 PR c++/91360 - Implement C++20 P1143R2: constinit.
3682 * c-common.c (c_common_reswords): Add constinit and __constinit.
3683 (keyword_is_decl_specifier): Handle RID_CONSTINIT.
3684 * c-common.h (enum rid): Add RID_CONSTINIT, RID_FIRST_CXX20, and
3687 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_constinit.
3688 * c-format.c (cxx_keywords): Add "constinit".
3689 * c.opt (Wc++2a-compat, Wc++20-compat): New options.
3691 2019-08-27 Jakub Jelinek <jakub@redhat.com>
3694 * c-common.c (verify_tree): For LSHIFT_EXPR, RSHIFT_EXPR,
3695 COMPONENT_REF and ARRAY_REF in cxx_dialect >= cxx17 mode handle it
3696 like COMPOUND_EXPR rather than normal expression.
3698 2019-08-23 Iain Sandoe <iain@sandoe.co.uk>
3701 * c-lex.c (c_lex_with_flags): Don't call
3702 c_common_no_more_pch () from here.
3704 2019-08-23 Jakub Jelinek <jakub@redhat.com>
3707 * c-common.c (c_ts18661_flt_eval_method): Use flag_excess_precision
3708 instead of flag_excess_precision_cmdline.
3709 * c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): Likewise.
3710 * c-opts.c (c_common_post_options): Likewise.
3712 2019-08-22 Martin Sebor <msebor@redhat.com>
3715 * c-common.c (braced_list_to_string): Add argument and overload.
3716 Handle flexible length arrays and unions.
3718 2019-08-21 Eric Botcazou <ebotcazou@adacore.com>
3720 * c-ada-spec.c (dump_ada_function_declaration): Be prepared for broken
3721 function declarations where arguments are missing. Rename variables.
3723 2019-08-15 Richard Biener <rguenther@suse.de>
3725 * c-common.c (c_stddef_cpp_builtins): When the GIMPLE FE is
3726 enabled, define __SIZETYPE__.
3728 2019-08-14 Christophe Lyon <christophe.lyon@linaro.org>
3730 * c-attribs.c (c_common_attribute_table): Add "noinit" entry. Add
3731 exclusion with "section" attribute.
3732 (attr_noinit_exclusions): New table.
3733 (handle_noinit_attribute): New function.
3735 2019-08-13 Richard Sandiford <richard.sandiford@arm.com>
3738 * c-common.c (resolve_overloaded_builtin): Use
3739 copy_decl_built_in_function.
3741 2019-08-13 Martin Sebor <msebor@redhat.com>
3744 * c-format.c (printf_length_specs): Set FMT_LEN_w for "w".
3745 (asm_fprintf_length_spec): Same.
3746 * c-format.h (format_lengths): Add FMT_LEN_w.
3748 2019-08-10 Jakub Jelinek <jakub@redhat.com>
3750 * c-pragma.h (enum pragma_omp_clause): Add
3751 PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
3753 2019-08-07 Jakub Jelinek <jakub@redhat.com>
3755 * c-pragma.h (enum pragma_omp_clause): Add
3756 PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR. Set PRAGMA_OACC_CLAUSE_USE_DEVICE
3757 equal to PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR instead of being a separate
3760 2019-08-05 Marek Polacek <polacek@redhat.com>
3762 PR c++/91338 - Implement P1161R3: Deprecate a[b,c].
3763 * c-opts.c (c_common_post_options): Enable -Wcomma-subscript by
3764 default for C++2a, unless -Wno-deprecated.
3765 * c.opt (Wcomma-subscript): New warning.
3767 2019-07-20 Jakub Jelinek <jakub@redhat.com>
3769 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_LOOP.
3770 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_BIND.
3771 * c-pragma.c (omp_pragmas_simd): Add PRAGMA_OMP_LOOP entry.
3772 * c-common.h (enum c_omp_clause_split): Add C_OMP_CLAUSE_SPLIT_LOOP.
3773 * c-omp.c (c_omp_split_clauses): Add support for 4 new combined
3774 constructs with the loop construct.
3776 2019-07-13 Jakub Jelinek <jakub@redhat.com>
3779 * c-omp.c (c_omp_split_clauses): Fix a pasto in
3780 OMP_CLAUSE_REDUCTION_TASK handling.
3782 2019-07-12 Jakub Jelinek <jakub@redhat.com>
3784 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ORDER.
3785 * c-omp.c (c_omp_split_clauses): Handle splitting of OMP_CLAUSE_ORDER.
3787 2019-07-09 Martin Sebor <msebor@redhat.com>
3790 * c-opts.c (handle_deferred_opts): Change class-key of PODs to struct
3791 and others to class.
3792 * c-pretty-print.h: Same.
3794 2019-07-09 Martin Sebor <msebor@redhat.com>
3797 * c-format.c (check_argument_type): Change class-key from class to
3798 struct and vice versa to match convention and avoid -Wclass-is-pod
3799 and -Wstruct-no-pod.
3800 * c-pretty-print.h: Same.
3802 2019-07-03 Martin Liska <mliska@suse.cz>
3804 * c-common.c (try_to_locate_new_include_insertion_point): Remove
3807 2019-07-03 Jakub Jelinek <jakub@redhat.com>
3809 * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_REDUCTION_INSCAN
3810 clauses on OMP_FOR rather than OMP_PARALLEL when OMP_FOR is combined
3813 2019-07-02 qing zhao <qing.zhao@oracle.com>
3815 PR preprocessor/90581
3816 * c-opts.c (c_common_handle_option): Handle -fmax-include-depth.
3817 * c.opt: Add new option -fmax-include-depth.
3819 2019-06-26 Jason Merrill <jason@redhat.com>
3821 PR c++/55442 - memory-hog with highly recursive constexpr.
3822 * c.opt (fconstexpr-loop-limit): New.
3824 2019-06-25 Jakub Jelinek <jakub@redhat.com>
3827 * c-omp.c (c_finish_omp_atomic): Allow tree_invariant_p in addition
3828 to SAVE_EXPR in first operand of a COMPOUND_EXPR.
3830 2019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
3832 * c-common.c (c_common_nodes_and_builtins): Define
3833 alternate "__intN__" name for "__intN" types.
3835 2019-06-24 Jan Hubicka <jh@suse.cz>
3837 * c-common.c (braced_lists_to_strings): Check that
3838 type is array or integer prior checking string flag.
3840 2019-06-21 Matthew Beliveau <mbelivea@redhat.com>
3842 PR c++/90875 - added -Wswitch-outside-range option
3843 * c.opt (Wswitch-outside-range): Added new option.
3844 * c-warn.c (c_do_switch_warnings): Use OPT_Wswitch-outside-range.
3846 2019-06-21 Marek Polacek <polacek@redhat.com>
3848 PR c++/90953 - ICE with -Wmissing-format-attribute.
3849 * c-common.c (check_function_arguments_recurse): Use
3851 (check_missing_format_attribute): Likewise.
3853 2019-06-19 Marek Polacek <polacek@redhat.com>
3855 PR c++/60364 - noreturn after first decl not diagnosed.
3856 * c-attribs.c (handle_noreturn_attribute): No longer static.
3857 * c-common.h (handle_noreturn_attribute, attr_noreturn_exclusions):
3859 * c-format.c (check_function_format): Use get_attribute_name.
3861 2019-06-19 Martin Sebor <msebor@redhat.com>
3863 PR translation/90156
3864 * c-format.c (function_format_info::format_type): Adjust type.
3865 (function_format_info::is_raw): New member.
3866 (decode_format_type): Adjust signature. Handle "raw" diag attributes.
3867 (decode_format_attr): Adjust call to decode_format_type.
3868 Avoid a redundant call to convert_format_name_to_system_name.
3869 Avoid abbreviating the word "arguments" in a diagnostic.
3870 (format_warning_substr): New function.
3871 (avoid_dollar_number): Quote dollar sign in a diagnostic.
3872 (finish_dollar_format_checking): Same.
3873 (check_format_info): Same.
3874 (struct baltoks_t): New.
3875 (c_opers, c_keywords, cxx_keywords, badwords, contrs): New arrays.
3876 (maybe_diag_unbalanced_tokens, check_tokens, check_plain): New
3878 (check_format_info_main): Call check_plain. Use baltoks_t. Call
3879 maybe_diag_unbalanced_tokens.
3880 (handle_format_attribute): Spell out the word "arguments" in
3883 2019-06-11 Matthew Beliveau <mbelivea@redhat.com>
3885 PR c++/90449 - add -Winaccessible-base option.
3886 * c.opt (Winaccessible-base): New option.
3888 2019-06-10 Jakub Jelinek <jakub@redhat.com>
3890 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_SCAN.
3891 * c-pragma.c (omp_pragmas_simd): Add #pragma omp scan.
3892 * c-omp.c (c_omp_split_clauses): Diagnose inscan reductions on
3893 combined/composite constructs where it is not allowed. Copy over
3894 OMP_CLAUSE_REDUCTION_INSCAN.
3896 2019-06-05 Martin Sebor <msebor@redhat.com>
3898 * c-attribs.c (handle_mode_attribute): Adjust quoting and hyphenation.
3899 (handle_alias_ifunc_attribute): Same.
3900 (handle_copy_attribute): Same.
3901 (handle_weakref_attribute): Same.
3902 (handle_nonnull_attribute): Same.
3903 * c-warn.c (warn_for_sign_compare): Same.
3904 (warn_for_restrict): Same.
3907 2019-06-05 Martin Sebor <msebor@redhat.com>
3909 * c-pragma.c (handle_pragma_weak): Adjust quoting in a diagnostic.
3910 * c.opt (-Wformat-diag): Remove a spurious period.
3912 2019-05-29 Jakub Jelinek <jakub@redhat.com>
3915 * c-common.c (check_builtin_function_arguments)
3916 <case BUILTIN_*_OVERFLOW>: Diagnose pointer to const qualified integer
3919 2019-05-23 Eric Botcazou <ebotcazou@adacore.com>
3921 * c-ada-spec.c (compare_node): Compare the DECL_UIDs as a last resort.
3923 2019-05-22 Martin Liska <mliska@suse.cz>
3926 * c-attribs.c (handle_copy_attribute): Do not copy
3927 target_clones attribute.
3929 2019-05-21 Eric Botcazou <ebotcazou@adacore.com>
3931 * c-ada-spec.h (enum cpp_operation): Add IS_ASSIGNMENT_OPERATOR.
3932 * c-ada-spec.c (print_assignment_operator): New function.
3933 (dump_ada_declaration) <FUNCTION_DECL>: Call it do dump explicit copy
3934 assignment operators declared as methods and filter out the others.
3936 2019-05-17 Thomas Schwinge <thomas@codesourcery.com>
3939 * c-attribs.c (c_common_attribute_table): Set min_len to -1 for
3940 "omp declare target".
3942 2019-05-16 Martin Sebor <msebor@redhat.com>
3944 * c-attribs.c (handle_no_sanitize_attribute): Quote identifiers,
3945 keywords, operators, and types in diagnostics.
3946 (handle_scalar_storage_order_attribute): Same.
3947 (handle_mode_attribute): Same.
3948 (handle_visibility_attribute): Same.
3949 (handle_assume_aligned_attribute): Same.
3950 (handle_no_split_stack_attribute): Same.
3951 * c-common.c (shorten_compare): Same.
3952 (c_common_truthvalue_conversion): Same.
3953 (cb_get_source_date_epoch): Same.
3954 * c-lex.c (cb_def_pragma): Quote keywords, operators, and types
3956 (interpret_float): Same.
3957 * c-omp.c (c_finish_omp_for): Same.
3958 * c-opts.c (c_common_post_options): Same.
3959 * c-pch.c (c_common_pch_pragma): Same.
3960 * c-pragma.c (pop_alignment): Same.
3961 (handle_pragma_pack): Same.
3962 (apply_pragma_weak): Same.
3963 (handle_pragma_weak): Same.
3964 (handle_pragma_scalar_storage_order): Same.
3965 (handle_pragma_redefine_extname): Same.
3966 (add_to_renaming_pragma_list): Same.
3967 (maybe_apply_renaming_pragma): Same.
3968 (push_visibility): Same.
3969 (handle_pragma_visibility): Same.
3970 (handle_pragma_optimize): Same.
3971 (handle_pragma_message): Same.
3972 * c-warn.c (warn_for_omitted_condop): Same.
3973 (lvalue_error): Same.
3975 2019-05-15 Richard Biener <rguenther@suse.de>
3978 * c-common.c (c_common_mark_addressable_vec): Also mark
3979 a COMPOUND_LITERAL_EXPR_DECL addressable similar to
3982 2019-05-06 Nathan Sidwell <nathan@acm.org>
3984 * c-opts.c (handle_defered_opts): Rename struct deps to struc mkdeps.
3986 2019-04-30 Nathan Sidwell <nathan@acm.org>
3988 * c-common.c (c_common_init_ts): Use MARK_TS_EXP. Mark SIZEOF_EXPR.
3990 2019-04-30 Martin Liska <mliska@suse.cz>
3992 * c-pragma.c (handle_pragma_diagnostic): Provide hints
3993 for unknown options.
3995 2019-04-26 Richard Sandiford <richard.sandiford@arm.com>
3997 * c-warn.c (strict_aliasing_warning): Apply COMPLETE_TYPE_P to
3998 the pointer target rather than the pointer itself.
4000 2019-04-19 Jakub Jelinek <jakub@redhat.com>
4003 * c-common.h (c_add_case_label): Remove orig_type and outside_range_p
4005 (c_do_switch_warnings): Remove outside_range_p argument.
4006 * c-common.c (check_case_bounds): Removed.
4007 (c_add_case_label): Remove orig_type and outside_range_p arguments.
4008 Don't call check_case_bounds. Fold low_value as well as high_value.
4009 * c-warn.c (c_do_switch_warnings): Remove outside_range_p argument.
4010 Check for case labels outside of range of original type here and
4013 2019-04-12 Jakub Jelinek <jakub@redhat.com>
4015 PR translation/90041
4016 * c.opt (-fhandle-exceptions): Use %< and %> around option names
4017 in the Warn diagnostics.
4020 * c-attribs.c (handle_patchable_function_entry_attribute): Add
4021 function comment. Warn if arguments of the attribute are not positive
4024 2019-04-09 Eric Botcazou <ebotcazou@adacore.com>
4026 * c-ada-spec.c (print_destructor): Deal with deleting destructors.
4027 (dump_ada_declaration) <FUNCTION_DECL>: Likewise.
4029 2019-04-07 Eric Botcazou <ebotcazou@adacore.com>
4031 * c-ada-spec.c (is_float128): New predicate extracted from...
4032 (dump_ada_node) <COMPLEX_TYPE>: Use it to recognize __cfloat128.
4033 <REAL_TYPE>: ...here. Call it.
4035 2019-04-05 David Malcolm <dmalcolm@redhat.com>
4038 * c-warn.c (check_address_or_pointer_of_packed_member): Add
4039 auto_diagnostic_group. Guard inform calls by result of
4042 2019-04-05 Marek Polacek <polacek@redhat.com>
4044 PR c++/89973 - -Waddress-of-packed-member ICE with invalid conversion.
4045 * c-warn.c (check_address_or_pointer_of_packed_member): Check the type
4048 2019-04-03 Jason Merrill <jason@redhat.com>
4050 PR c++/86586 - -fcompare-debug=-Wsign-compare.
4051 * c-warn.c (warn_for_sign_compare): Call fold_for_warn.
4053 2019-04-01 Martin Sebor <msebor@redhat.com>
4056 * c-attribs.c (handle_copy_attribute): Handle references and
4057 non-constant expressions.
4059 2019-03-22 Jakub Jelinek <jakub@redhat.com>
4062 * c.opt (-fconstexpr-ops-limit=): New option.
4064 2019-03-21 Jakub Jelinek <jakub@redhat.com>
4066 * c-common.c (per_file_includes_t): Use false as Lazy in hash_set
4069 2019-03-19 Martin Sebor <msebor@redhat.com>
4071 PR tree-optimization/89688
4072 * c-common.c (braced_list_to_string): Make static.
4073 (braced_lists_to_strings): Define new function.
4074 * c-common.h (braced_list_to_string): Remove.
4075 (braced_lists_to_strings): Declare.
4077 2019-03-12 Martin Liska <mliska@suse.cz>
4079 * c-opts.c (c_common_handle_option): Wrap option with %< and %>.
4081 2019-03-11 Martin Liska <mliska@suse.cz>
4083 * c-opts.c (c_common_post_options): Wrap apostrophes
4084 in gcc internal format with %'.
4086 2019-03-11 Martin Liska <mliska@suse.cz>
4088 * c-attribs.c (handle_nocf_check_attribute): Wrap an option name
4089 in a string format message and fix GNU coding style.
4090 * c-common.c (vector_types_convertible_p): Likewise.
4091 (c_build_vec_perm_expr): Likewise.
4092 * c-indentation.c (get_visual_column): Likewise.
4093 * c-opts.c (c_common_handle_option): Likewise.
4094 (c_common_post_options): Likewise.
4095 (sanitize_cpp_opts): Likewise.
4096 * c-pch.c (c_common_pch_pragma): Likewise.
4097 * c-pragma.c (handle_pragma_pack): Likewise.
4099 2019-03-08 Jakub Jelinek <jakub@redhat.com>
4101 PR tree-optimization/89550
4102 * c-common.c (c_common_truthvalue_conversion): Only set
4103 TREE_NO_WARNING if warning_at returned true.
4104 * c-warn.c (overflow_warning, warn_logical_operator): Likewise.
4106 2019-02-25 Sandra Loosemore <sandra@codesourcery.com>
4107 Martin Sebor <msebor@gmail.com>
4109 * c.opt (Wmissing-attributes): Clean up doc string.
4111 2019-02-25 Jakub Jelinek <jakub@redhat.com>
4114 * c-format.c (maybe_read_dollar_number): Compute nargnum in
4115 HOST_WIDE_INT type to avoid overflows and change overflow_flag
4118 2019-02-22 Richard Biener <rguenther@suse.de>
4120 * c-pch.c (no_checksum): Remove.
4121 (pch_init): Remove assertion that executable_checksum is not
4123 (c_common_valid_pch): Likewise.
4125 2019-02-18 Martin Sebor <msebor@redhat.com>
4128 * c-common.c (invalid_array_size_error): Handle cst_size_not_constant.
4130 2019-02-16 David Malcolm <dmalcolm@redhat.com>
4133 * c-common.c (shorten_compare): Call fold_for_warn on op0 when
4134 implementing -Wtype-limits.
4136 2019-02-11 Martin Sebor <msebor@redhat.com>
4139 * c-common.c (invalid_array_size_error): New function.
4140 (valid_array_size_p): Call it. Handle size as well as type.
4141 * c-common.h (valid_constant_size_p): New function.
4142 (enum cst_size_error): New type.
4144 2019-01-31 David Malcolm <dmalcolm@redhat.com>
4147 * known-headers.cc (get_stdlib_header_for_name): Add
4148 {FLT|DBL|LDBL}_{MAX|MIN} to "hints" array.
4150 2019-01-31 Jakub Jelinek <jakub@redhat.com>
4153 * c-pretty-print.c (pp_c_enumeration_constant): Print always as
4154 a C cast in pp_c_flag_gnu_v3 mode.
4156 2019-01-29 Jakub Jelinek <jakub@redhat.com>
4159 * c-common.c (c_common_nodes_and_builtins): Build type variants for
4160 builtin_structptr_types types even for C.
4162 2019-01-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
4164 * c-warn.c (check_address_or_pointer_of_packed_member): Handle the case
4165 when rhs is of array type correctly. Fix handling of nested structures.
4166 Fix handling of indirect_ref together with nop_expr and/or addr_expr.
4167 (check_and_warn_address_or_pointer_of_packed_member): Fix handling of
4168 type casts within nested compound expressions.
4170 2019-01-22 Jakub Jelinek <jakub@redhat.com>
4173 * c-omp.c (c_finish_omp_atomic): For bitfield atomics, update type
4174 variable after using BIT_FIELD_REF.
4176 2019-01-18 H.J. Lu <hongjiu.lu@intel.com>
4180 * c-common.h (warn_for_address_or_pointer_of_packed_member):
4181 Remove the boolean argument.
4182 * c-warn.c (check_address_of_packed_member): Renamed to ...
4183 (check_address_or_pointer_of_packed_member): This. Also
4184 warn pointer conversion.
4185 (check_and_warn_address_of_packed_member): Renamed to ...
4186 (check_and_warn_address_or_pointer_of_packed_member): This.
4187 Also warn pointer conversion.
4188 (warn_for_address_or_pointer_of_packed_member): Remove the
4189 boolean argument. Don't check pointer conversion here.
4191 2019-01-15 Richard Sandiford <richard.sandiford@arm.com>
4194 * c.opt (Wdeprecated): Move documentation and variable to common.opt.
4196 2019-01-14 Jakub Jelinek <jakub@redhat.com>
4198 * c-cppbuiltin.c (c_cpp_builtin): Define __cpp_guaranteed_copy_elision
4199 and __cpp_nontype_template_parameter_auto. Add a comment that
4200 __cpp_template_auto is deprecated.
4202 2019-01-14 Tom Honermann <tom@honermann.net>
4204 Implement P0482R5, char8_t: A type for UTF-8 characters and strings
4205 * c-common.c (c_common_reswords): Add char8_t.
4206 (fix_string_type): Use char8_t for the type of u8 string literals.
4207 (c_common_get_alias_set): char8_t doesn't alias.
4208 (c_common_nodes_and_builtins): Define char8_t as a builtin type in
4210 (c_stddef_cpp_builtins): Add __CHAR8_TYPE__.
4211 (keyword_begins_type_specifier): Add RID_CHAR8.
4212 * c-common.h (rid): Add RID_CHAR8.
4213 (c_tree_index): Add CTI_CHAR8_TYPE and CTI_CHAR8_ARRAY_TYPE.
4214 Define D_CXX_CHAR8_T and D_CXX_CHAR8_T_FLAGS.
4215 Define char8_type_node and char8_array_type_node.
4216 * c-cppbuiltin.c (cpp_atomic_builtins): Predefine
4217 __GCC_ATOMIC_CHAR8_T_LOCK_FREE.
4218 (c_cpp_builtins): Predefine __cpp_char8_t.
4219 * c-lex.c (lex_string): Use char8_array_type_node as the type of
4221 (lex_charconst): Use char8_type_node as the type of CPP_UTF8CHAR.
4222 * c-opts.c: If not otherwise specified, enable -fchar8_t when
4224 * c.opt: Add the -fchar8_t command line option.
4226 2019-01-14 Martin Sebor <msebor@redhat.com>
4229 * c-attribs.c (positional_argument): Call valid_format_string_type_p
4230 and issue errors if it fails.
4231 * c-common.h (valid_format_string_type_p): Declare.
4232 * c-format.c (valid_stringptr_type_p): Rename...
4233 (valid_format_string_type_p): ...to this and make extern.
4234 (handle_format_arg_attribute): Adjust to new name.
4235 (check_format_string): Same.
4237 2019-01-13 H.J. Lu <hongjiu.lu@intel.com>
4239 * c-warn.c (warn_for_address_or_pointer_of_packed_member):
4240 Replace "may may" with "may" in warning message.
4242 2019-01-07 Jakub Jelinek <jakub@redhat.com>
4245 * c-common.h (enum rid): Add RID_BUILTIN_CONVERTVECTOR.
4246 (c_build_vec_convert): Declare.
4247 * c-common.c (c_build_vec_convert): New function.
4249 2019-01-04 Martin Sebor <msebor@redhat.com>
4252 * c-attribs.c (handle_copy_attribute): Avoid copying attribute leaf.
4253 Handle C++ empty throw specification and C11 _Noreturn.
4254 (has_attribute): Also handle C11 _Noreturn.
4256 2019-01-04 Martin Sebor <msebor@redhat.com>
4259 * c-attribs.c (positional_argument): Also accept enumerated types.
4261 2019-01-01 Jakub Jelinek <jakub@redhat.com>
4263 Update copyright years.
4265 2018-12-20 H.J. Lu <hongjiu.lu@intel.com>
4268 * c-common.h (warn_for_address_or_pointer_of_packed_member): New.
4269 * c-warn.c (check_alignment_of_packed_member): New function.
4270 (check_address_of_packed_member): Likewise.
4271 (check_and_warn_address_of_packed_member): Likewise.
4272 (warn_for_address_or_pointer_of_packed_member): Likewise.
4273 * c.opt: Add -Wno-address-of-packed-member.
4275 2018-12-20 David Malcolm <dmalcolm@redhat.com>
4278 * c-warn.c (get_outermost_macro_expansion): New function.
4279 (spelled_the_same_p): Use it to unwind the macro expansions, and
4280 compare the outermost macro in each nested expansion, rather than
4283 2018-12-19 David Malcolm <dmalcolm@redhat.com>
4286 * c-common.h (warn_tautological_cmp): Convert 1st param from
4287 location_t to const op_location_t &.
4288 * c-warn.c (find_array_ref_with_const_idx_r): Call fold_for_warn
4289 when testing for INTEGER_CST.
4290 (warn_tautological_bitwise_comparison): Convert 1st param from
4291 location_t to const op_location_t &; use it to build a
4292 binary_op_rich_location, and use this.
4293 (spelled_the_same_p): New function.
4294 (warn_tautological_cmp): Convert 1st param from location_t to
4295 const op_location_t &. Warn for macro expansions if
4296 spelled_the_same_p. Use binary_op_rich_location.
4298 2018-12-19 David Malcolm <dmalcolm@redhat.com>
4302 * c-common.c (unsafe_conversion_p): Fold any location wrapper.
4303 (verify_tree): Handle location wrappers.
4304 (c_common_truthvalue_conversion): Strip any location wrapper.
4306 (fold_offsetof): Strip any location wrapper.
4307 (complete_array_type): Likewise for initial_value.
4308 (convert_vector_to_array_for_subscript): Call fold_for_warn on the
4309 index before checking for INTEGER_CST.
4310 * c-pretty-print.c (c_pretty_printer::primary_expression): Don't
4311 print parentheses around location wrappers.
4312 * c-warn.c (warn_logical_operator): Call fold_for_warn on op_right
4313 before checking for INTEGER_CST.
4314 (warn_tautological_bitwise_comparison): Call
4315 tree_strip_any_location_wrapper on lhs, rhs, and bitop's operand
4316 before checking for INTEGER_CST.
4317 (readonly_error): Strip any location wrapper.
4318 (warn_array_subscript_with_type_char): Strip location wrappers
4319 before checking for INTEGER_CST. Use the location of the index if
4322 2018-12-06 Jason Merrill <jason@redhat.com>
4324 PR c++/88136 - -Wdeprecated-copy false positives
4325 * c.opt (Wdeprecated-copy-dtor): New.
4326 (Wdeprecated-copy): Move to -Wextra.
4328 2018-11-29 Martin Sebor <msebor@redhat.com>
4332 * c-attribs.c (common_handle_aligned_attribute): Silently avoid setting
4333 alignments to values less than the target requires.
4334 (has_attribute): For attribute aligned consider both the attribute
4335 and the alignment bits.
4336 * c-common.c (c_init_attributes): Optionally issue a warning for
4339 2018-11-28 Martin Sebor <msebor@redhat.com>
4343 * c-warn.c (sizeof_pointer_memaccess_warning): Bail if source
4344 or destination is an error.
4346 2018-11-28 Jakub Jelinek <jakub@redhat.com>
4349 * c-ubsan.c: Include langhooks.h.
4350 (ubsan_instrument_division): Change gcc_assert that main variants
4351 of op0 and op1 types are equal to gcc_checking_assert that the
4352 main variants are compatible types.
4354 2018-11-27 Eric Botcazou <ebotcazou@adacore.com>
4356 * c-ada-spec.c: Include stringpool.h.
4357 (has_static_fields): Return false for incomplete types.
4358 (is_tagged_type): Likewise.
4359 (has_nontrivial_methods): Likewise.
4360 (dump_ada_node) <INTEGER_TYPE>: Deal specifically with __int128.
4361 (struct overloaded_name_hash): New structure.
4362 (struct overloaded_name_hasher): Likewise.
4363 (overloaded_names): New global variable.
4364 (init_overloaded_names): New static function.
4365 (overloaded_name_p): New predicate.
4366 (dump_ada_declaration) <TYPE_DECL>: Tidy up and set TREE_VISITED
4367 on the TYPE_STUB_DECL of the original type of a typedef, if any.
4368 <FUNCTION_DECL>: Bail out for an unsupported overloaded name.
4369 Remove always-true condition and dump forward types.
4370 (dump_ada_specs): Delete overloaded_names.
4372 2018-11-20 Martin Sebor <msebor@redhat.com>
4374 * c-attribs.c (type_for_vector_size): New function.
4375 (type_valid_for_vector_size): Same.
4376 (handle_vector_size_attribute): Move code to the functions above
4378 (validate_attribute, has_attribute): New functions.
4379 * c-common.h (has_attribute): Declare.
4380 (rid): Add RID_HAS_ATTRIBUTE_EXPRESSION.
4381 * c-common.c (c_common_resword): Same.
4383 2018-11-16 Jason Merrill <jason@redhat.com>
4385 * c-lex.c (c_common_has_attribute): Handle likely/unlikely.
4386 * c-attribs.c (attr_cold_hot_exclusions): Make public.
4388 2018-11-16 Jakub Jelinek <jakub@redhat.com>
4391 * c-common.c (fix_string_type): Reject string literals larger than
4392 TYPE_MAX_VALUE (ssizetype) bytes.
4394 2018-11-15 Martin Sebor <msebor@redhat.com>
4398 * c-attribs.c (positional_argument): New function.
4399 (handle_alloc_size_attribute): Use it and simplify.
4400 (handle_alloc_align_attribute): Same.
4401 (handle_assume_aligned_attribute): Same.
4402 (handle_nonnull_attribute): Same.
4403 * c-common.c (check_function_arguments): Pass fntype to
4404 check_function_format.
4405 * c-common.h (check_function_format): Add an argument.
4406 (PosArgFlags, positional_argument): Declare new type and function.
4407 * c-format.c (decode_format_attr): Add arguments.
4408 (check_format_string, get_constant): Same.
4409 (convert_format_name_to_system_name): Adjust.
4411 2018-11-15 David Malcolm <dmalcolm@redhat.com>
4414 * c-opts.c (c_diagnostic_finalizer): Add diagnostic_t param.
4416 2018-11-14 Jakub Jelinek <jakub@redhat.com>
4418 P1236R1 - Signed integers are two's complement
4419 * c-warn.c (maybe_warn_shift_overflow): Don't warn for c++2a.
4420 * c-ubsan.c (ubsan_instrument_shift): Make signed shifts
4421 with in-range second operand well defined for -std=c++2a.
4424 * c-common.c (parse_optimize_options): Allocate option string from
4425 opts_obstack rather than as GC memory. Move the allocation after
4426 warning for invalid option.
4428 2018-11-13 David Malcolm <dmalcolm@redhat.com>
4430 * c-common.c (c_get_substring_location): Update for renaming of
4431 get_source_location_for_substring to get_location_within_string.
4432 * c-lex.c: Replace "source_location" with "location_t".
4433 * c-opts.c: Likewise.
4434 * c-ppoutput.c: Likewise.
4436 2018-11-13 Martin Sebor <msebor@redhat.com>
4439 * c-attribs.c (handle_copy_attribute): Exclude inlining attributes.
4440 (handle_tls_model_attribute): Improve diagnostics.
4442 2018-11-12 Jason Merrill <jason@redhat.com>
4444 * c-cppbuiltin.c (c_cpp_builtins): Define
4445 __cpp_impl_destroying_delete.
4447 * c-cppbuiltin.c (c_cpp_builtins): Change __cpp_explicit_bool to
4448 __cpp_conditional_explicit.
4450 2018-11-09 Martin Sebor <msebor@redhat.com>
4453 * c-attribs.c (handle_copy_attribute): New function.
4455 2018-11-09 Martin Sebor <msebor@redhat.com>
4458 * c-common.c (check_user_alignment): Use MAX_OFILE_ALIGNMENT.
4460 2018-11-08 Jakub Jelinek <jakub@redhat.com>
4462 * c-common.h (c_finish_omp_taskgroup): Add CLAUSES argument.
4463 (c_finish_omp_atomic): Replace bool SEQ_CST argument with
4464 enum omp_memory_order MEMORY_ORDER.
4465 (c_finish_omp_flush): Add MO argument.
4466 (c_omp_depend_t_p, c_finish_omp_depobj): Declare.
4467 (c_finish_omp_for): Add FINAL_P argument.
4468 * c-omp.c: Include memmodel.h.
4469 (c_finish_omp_taskgroup): Add CLAUSES argument. Set
4470 OMP_TASKGROUP_CLAUSES to it.
4471 (c_finish_omp_atomic): Replace bool SEQ_CST argument with
4472 enum omp_memory_order MEMORY_ORDER. Set OMP_ATOMIC_MEMORY_ORDER
4473 instead of OMP_ATOMIC_SEQ_CST.
4474 (c_omp_depend_t_p, c_finish_omp_depobj): New functions.
4475 (c_finish_omp_flush): Add MO argument, if not MEMMODEL_LAST, emit
4476 __atomic_thread_fence call with the given value.
4477 (check_omp_for_incr_expr): Formatting fixes.
4478 (c_finish_omp_for): Add FINAL_P argument. Allow NE_EXPR
4479 even in OpenMP loops, diagnose if NE_EXPR and incr expression
4480 is not constant expression 1 or -1. Transform NE_EXPR loops
4481 with iterators pointers to VLA into LT_EXPR or GT_EXPR loops.
4482 (c_omp_check_loop_iv_r): Look for orig decl of C++ range for
4484 (c_omp_split_clauses): Add support for combined
4485 #pragma omp parallel master and
4486 #pragma omp {,parallel }master taskloop{, simd} constructs.
4487 Handle OMP_CLAUSE_IN_REDUCTION. Handle OMP_CLAUSE_REDUCTION_TASK.
4488 Handle OMP_CLAUSE_NONTEMPORAL. Handle splitting OMP_CLAUSE_IF
4489 also to OMP_SIMD. Copy OMP_CLAUSE_LASTPRIVATE_CONDITIONAL.
4490 (c_omp_predetermined_sharing): Don't return
4491 OMP_CLAUSE_DEFAULT_SHARED for const qualified decls.
4492 * c-pragma.c (omp_pragmas): Add PRAGMA_OMP_DEPOBJ and
4493 PRAGMA_OMP_REQUIRES.
4494 * c-pragma.h (enum pragma_kind): Likewise.
4495 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_NONTEMPORAL
4496 and PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
4498 2018-11-08 David Malcolm <dmalcolm@redhat.com>
4500 * c-format.c (gcc_dump_printf_char_table): Add entry for %f.
4502 2018-11-08 David Malcolm <dmalcolm@redhat.com>
4504 * c-format.c (local_cgraph_node_ptr_node): New variable.
4505 (gcc_dump_printf_char_table): Add entry for %C.
4506 (get_pointer_to_named_type): New function, taken from the handling
4507 code for "gimple *" from...
4508 (init_dynamic_diag_info): ...here. Add handling for
4510 * c-format.h (T_CGRAPH_NODE): New.
4512 2018-10-19 Jason Merrill <jason@redhat.com>
4514 * c-cppbuiltin.c (c_cpp_builtins): Add
4515 __cpp_nontype_template_parameter_class.
4517 2018-10-31 Nathan Sidwell <nathan@acm.org>
4519 * c-opts.c (c_finish_options): Force command line macro
4520 location. Refactor to avoid repeating main debug hook.
4521 (push_command_line_include): Clarify comment.
4523 * c-opts.c (c_finish_options): Adjust cpp_force_token_locations call.
4525 2018-10-30 Martin Sebor <msebor@redhat.com>
4528 * c-format.c (check_format_types): Avoid diagnosing null pointer
4529 arguments to printf-family of functions.
4531 2018-10-30 Marek Polacek <polacek@redhat.com>
4533 Implement P0892R2, explicit(bool).
4534 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_explicit_bool.
4536 2018-10-29 David Malcolm <dmalcolm@redhat.com>
4538 * name-hint.h (name_hint::take_deferred): New member function.
4540 2018-10-29 David Malcolm <dmalcolm@redhat.com>
4543 * c-common.c (check_function_sentinel): Call fold_for_warn on the
4545 (check_function_restrict): Rename param "argarray" to
4546 "unfolded_argarray", and make a copy named "argarray", calling
4547 fold_for_warn on each argument.
4548 (check_function_arguments): Add note about responsibility for
4549 folding the arguments.
4551 2018-10-17 Joseph Myers <joseph@codesourcery.com>
4553 * c-common.c (flag_isoc2x): New variable.
4554 * c-common.h (clk_c): Update comment to reference C2X.
4555 (flag_isoc99, flag_isoc11): Update comments to reference future
4556 standard versions in general.
4557 (flag_isoc2x): Declare.
4558 * c-opts.c (set_std_c2x): New function.
4559 (c_common_handle_option): Handle -std=c2x and -std=gnu2x.
4560 (set_std_c89, set_std_c99, set_std_c11, set_std_c17): Set
4562 * c.opt (Wc11-c2x-compat, std=c2x, std=gnu2x): New options.
4564 2018-10-17 Joseph Myers <joseph@codesourcery.com>
4566 * c.opt (std=c17, std=c18, std=gnu17, std=gnu18, std=iso9899:2017)
4567 (std=iso9899:2018): Document C17 as published in 2018.
4569 2018-10-12 Christophe Lyon <christophe.lyon@linaro.org>
4572 * c-pretty-print.c (c_pretty_printer::constant): Fix typo.
4574 2018-10-11 Will Wray <wjwray@gmail.com>
4577 * c-pretty-print.h (pp_c_type_cast): Prototype.
4578 (pp_c_integer_constant): Likewise.
4579 * c-pretty-print.c (pp_c_type_cast): No longer static.
4580 (pp_c_integer_constant): Likewise.
4581 (pp_c_enumeration_constant): Fix loop termination when finding
4582 name of constant. No longer returns a value. Call
4583 pp_c_integer_constant.
4584 (c_pretty_printer::constant): Update for changes to
4585 pp_c_enumeration_constant.
4587 2018-10-11 Jakub Jelinek <jakub@redhat.com>
4589 * c-lex.c (c_common_has_attribute): Return 201803 instead of 20180312
4590 for no_unique_address.
4592 2018-10-09 David Malcolm <dmalcolm@redhat.com>
4594 * c-common.c (c_option_controlling_cpp_error): Rename to...
4595 (c_option_controlling_cpp_diagnostic): ...this, and convert
4596 "reason" from int to enum.
4597 (c_cpp_error): Rename to...
4598 (c_cpp_diagnostic): ...this, converting level and reason to enums.
4599 * c-common.h (c_cpp_error): Rename to...
4600 (c_cpp_diagnostic): ...this, converting level and reason to enums.
4601 * c-opts.c (c_common_init_options): Update for renaming.
4603 2018-10-08 Richard Sandiford <richard.sandiford@arm.com>
4606 * c-common.c (vector_types_compatible_elements_p): Use
4607 INTEGRAL_TYPE_P instead of checking only for INTEGER_TYPE.
4609 2018-10-04 Vinay Kumar <vinay.kumar@blackfigtech.com>
4611 * c-attribs.c (get_priority): Add a warning flag warn_prio_ctor_dtor
4612 to generate constructor destructor priority warning.
4613 * c.opt (-Wprio-ctor-dtor): New option.
4615 2018-10-01 Jason Merrill <jason@redhat.com>
4617 * c-lex.c (c_common_has_attribute): Add no_unique_address.
4619 2018-10-01 Eric Botcazou <ebotcazou@adacore.com>
4621 * c-ada-spec.c (get_underlying_decl): Get to the main type variant.
4622 (dump_ada_node): Add const keyword.
4624 2018-09-25 Martin Liska <mliska@suse.cz>
4626 * c-common.c (c_common_truthvalue_conversion):
4627 Remove Pascal from documentation.
4629 2018-09-21 Eric Botcazou <ebotcazou@adacore.com>
4631 * c-ada-spec.c: Include diagnostic.h.
4632 (dump_ada_declaration) <RECORD_TYPE>: Issue a warning on packed layout.
4634 2018-09-19 Marek Polacek <polacek@redhat.com>
4636 * c.opt (Wclass-conversion): New.
4638 2018-09-17 David Malcolm <dmalcolm@redhat.com>
4640 * c-format.c (range_label_for_format_type_mismatch::get_text):
4641 Update for new param.
4643 2018-09-17 David Malcolm <dmalcolm@redhat.com>
4645 * c-format.c (format_warning_at_char): Update for introduction of
4646 format_string_diagnostic_t.
4647 (format_type_warning): Likewise.
4649 2018-09-17 Martin Jambor <mjambor@suse.cz>
4652 * c.opt (Wabsolute-value): New.
4654 2018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
4656 * c-common.c (complete_flexible_array_elts): New helper function.
4657 * c-common.h (complete_flexible_array_elts): Declare.
4659 2018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
4661 * c-common.c (braced_list_to_string): Remove eval parameter.
4662 Add some more checks. Always create zero-terminated STRING_CST.
4663 * c-common.h (braced_list_to_string): Adjust prototype.
4665 2018-08-27 David Malcolm <dmalcolm@redhat.com>
4668 * c-common.c (c_cpp_error): Update for conversion of show_caret_p
4670 (maybe_suggest_missing_token_insertion): Likewise.
4671 (maybe_add_include_fixit): Add param "override_location". If set,
4672 and source-printing is enabled, then override the rich_location's
4673 primary location with that of the insertion point for the fix-it
4674 hint, marking it with SHOW_LINES_WITHOUT_RANGE.
4675 * c-common.h (extern void maybe_add_include_fixit): Add bool
4677 * c-format.c (selftest::test_type_mismatch_range_labels): Update
4678 for conversion of show_caret_p to a tri-state.
4679 * c-warn.c (warn_for_restrict): Likewise.
4681 (suggest_missing_header::~suggest_missing_header): Update call to
4682 maybe_add_include_fixit to suggest overriding the location, as it
4685 2018-08-27 Martin Liska <mliska@suse.cz>
4687 * c-common.c (check_function_restrict): Use new function
4688 fndecl_built_in_p and remove check for FUNCTION_DECL if
4690 (check_builtin_function_arguments): Likewise.
4691 (reject_gcc_builtin): Likewise.
4692 * c-warn.c (sizeof_pointer_memaccess_warning): Likewise.
4694 2018-08-26 Marek Polacek <polacek@redhat.com>
4696 PR c++/87029, Implement -Wredundant-move.
4697 * c.opt (Wredundant-move): New option.
4699 2018-08-21 Marek Polacek <polacek@redhat.com>
4701 PR c++/86981, Implement -Wpessimizing-move.
4702 * c.opt (Wpessimizing-move): New option.
4704 2018-08-20 David Malcolm <dmalcolm@redhat.com>
4707 * c-attribs.c (common_handle_aligned_attribute): Add
4708 auto_diagnostic_group instance.
4709 * c-indentation.c (warn_for_misleading_indentation): Likewise.
4710 * c-opts.c (c_common_post_options): Likewise.
4711 * c-warn.c (warn_logical_not_parentheses): Likewise.
4712 (warn_duplicated_cond_add_or_warn): Likewise.
4713 (warn_for_multistatement_macros): Likewise.
4715 2018-08-20 Nathan Sidwell <nathan@acm.org>
4717 * c-ada-spec.c (macro_length, dump_ada_macros): Adjust macro parm
4720 2018-08-17 Nathan Sidwell <nathan@acm.org>
4722 * c-cppbuiltin.c (struct lazy_hex_fp_value_struct): Remove macro
4724 (laxy_hex_fp_value_count): Make unsigned.
4725 (lazy_hex_fp_value): Provided with macro & lazy number. Directly
4726 manipulate the macro.
4727 (builtin_defin_with_hex_fp_value): Adjust callback name, use
4730 2018-08-17 David Malcolm <dmalcolm@redhat.com>
4732 * c-format.c (enum format_type): Add gcc_dump_printf_format_type.
4733 (gcc_dump_printf_length_specs): New.
4734 (gcc_dump_printf_flag_pairs): New.
4735 (gcc_dump_printf_flag_specs): New.
4736 (gcc_dump_printf_char_table): New.
4737 (format_types_orig): Add entry for "gcc_dump_printf".
4738 (init_dynamic_diag_info): Set up length_char_specs and
4739 conversion_specs for gcc_dump_printf_format_type.
4740 (handle_format_attribute): Handle gcc_dump_printf_format_type.
4742 2018-08-17 Nathan Sidwell <nathan@acm.org>
4744 * c-ada-spec.c (macro_length, dump_ada_macros): Constify.
4746 * c-ada-spec.c: Don't #include "cpp-id-data.h"
4747 * c-cppbuiltin.c: Likewise.
4749 2018-08-17 Martin Liska <mliska@suse.cz>
4751 * c.opt: Remove Warn, Init and Report for options with
4752 Ignore/Deprecated flag. Warning is done automatically for
4755 2018-08-16 David Malcolm <dmalcolm@redhat.com>
4758 * c-common.c (selftest::c_family_tests): Call
4759 selftest::c_indentation_c_tests.
4760 * c-common.h (selftest::c_indentation_c_tests): New decl.
4761 * c-indentation.c: Include "selftest.h".
4762 (next_tab_stop): Add "tab_width" param, rather than accessing
4764 (get_visual_column): Likewise. Clarify comment. Bulletproof
4765 against reading past the end of the line.
4766 (get_first_nws_vis_column): Add "tab_width" param.
4767 (detect_intervening_unindent): Likewise.
4768 (should_warn_for_misleading_indentation): Read tab width from
4769 cpp_opts and pass around.
4770 (selftest::test_next_tab_stop): New test.
4771 (selftest::assert_get_visual_column_succeeds): New function.
4772 (ASSERT_GET_VISUAL_COLUMN_SUCCEEDS): New macro.
4773 (selftest::assert_get_visual_column_fails): New function.
4774 (ASSERT_GET_VISUAL_COLUMN_FAILS): New macro.
4775 (selftest::test_get_visual_column): New test.
4776 (selftest::c_indentation_c_tests): New function.
4778 2018-08-16 Nathan Sidwell <nathan@acm.org>
4780 * c-ada-spec.c (count_ada_macro): Use cpp_user_macro_p.
4781 (store_ada_macro): Likewise.
4782 * c-ppoutput.c (cb_used_define, dump_macro): Likewise.
4783 * c-spellcheck.cc (should-suggest_as_macro_p): Likewise,
4785 2018-08-15 David Malcolm <dmalcolm@redhat.com>
4787 * c-format.c: Include "selftest-diagnostic.h" and
4788 "gcc-rich-location.h".
4789 (format_warning_at_char): Pass NULL for new label params of
4791 (class indirection_suffix): New class.
4792 (class range_label_for_format_type_mismatch): New class.
4793 (format_type_warning): Move logic for generating "*" suffix to
4794 class indirection_suffix. Create "fmt_label" and "param_label"
4795 to show their types, and pass them to the
4796 format_warning_at_substring calls.
4797 (selftest::test_type_mismatch_range_labels): New test.
4798 (selftest::c_format_c_tests): Call it.
4800 2018-08-13 Martin Sebor <msebor@redhat.com>
4802 PR tree-optimization/71625
4803 * c-common.c (braced_list_to_string): New function.
4804 * c-common.h (braced_list_to_string): Declare it.
4806 2018-08-08 Nathan Sidwell <nathan@acm.org>
4808 * c-common.c (try_to_locate_new_include_inertion_point): Use
4809 linemap_included_from_linemap.
4810 * c-lex.c (fe_file_change): Use linemap_included_from.
4811 * c-ppoutput.c (pp_file_change): Likewise.
4813 2018-08-01 Martin Sebor <msebor@redhat.com>
4815 PR tree-optimization/86650
4816 * c-format.c (gcc_tdiag_char_table): Update comment for "%G".
4817 (gcc_cdiag_char_table, gcc_cxxdiag_char_table): Same.
4818 (init_dynamic_diag_info): Update from "gcall *" to "gimple *".
4819 * c-format.h (T89_G): Update to be "gimple *" rather than
4821 (local_gcall_ptr_node): Rename...
4822 (local_gimple_ptr_node): ...to this.
4824 2018-07-31 David Malcolm <dmalcolm@redhat.com>
4826 * c-format.c (PP_FORMAT_CHAR_TABLE): New macro, based on existing
4827 table entries for gcc_diag_char_table, and the 'Z' entry from
4828 gcc_tdiag_char_table, changing the "chain" entry for 'Z' from
4829 &gcc_tdiag_char_table[0] to &gcc_diag_char_table[0].
4830 (gcc_diag_char_table): Use PP_FORMAT_CHAR_TABLE, implicitly
4831 adding missing "Z" for this table. Remove erroneous "G" and "K"
4833 (gcc_tdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
4834 (gcc_cdiag_char_table): Use PP_FORMAT_CHAR_TABLE.
4835 (gcc_cxxdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
4837 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
4839 * c-common.c (speculation_safe_resolve_call): New function.
4840 (speculation_safe_resolve_params): New function.
4841 (speculation_safe_resolve_return): New function.
4842 (resolve_overloaded_builtin): Handle __builtin_speculation_safe_value.
4843 * c-cppbuiltin.c (c_cpp_builtins): Add pre-define for
4844 __HAVE_SPECULATION_SAFE_VALUE.
4846 2018-07-20 David Malcolm <dmalcolm@redhat.com>
4848 * c-common.c (c_cpp_error): Remove redundant "line_table"
4849 parameter from call to rich_location::set_range.
4850 (maybe_suggest_missing_token_insertion): Likewise.
4852 2018-07-20 Martin Sebor <msebor@redhat.com>
4855 * c.opt (-Warray-bounds): Remove redundant -Wall.
4857 2018-07-20 Martin Sebor <msebor@redhat.com>
4860 * c-common.h (c_common_handle_option): Change function argument
4862 * c-opts.c (c_common_init_options): Same.
4863 (c_common_handle_option): Same. Remove special handling of
4864 OPT_Walloca_larger_than_ and OPT_Wvla_larger_than_.
4865 * c.opt (-Walloc-size-larger-than, -Walloca-larger-than): Change
4866 options to take a HOST_WIDE_INT argument and accept a byte-size
4868 (-Wvla-larger-than): Same.
4869 (-Wno-alloc-size-larger-than, -Wno-alloca-larger-than): New.
4870 (-Wno-vla-larger-than): Same.
4872 2018-07-12 Jakub Jelinek <jakub@redhat.com>
4874 * c-attribs.c (c_common_attribute_table): Add
4875 "omp declare target implicit" attribute.
4877 2018-07-12 Richard Biener <rguenther@suse.de>
4880 * c-attribs.c (handle_packed_attribute): Do not build a variant
4881 type with TYPE_PACKED, instead ignore the attribute if we may
4882 not apply to the original type.
4884 2018-07-10 Jakub Jelinek <jakub@redhat.com>
4887 * c-omp.c (c_omp_check_loop_iv_r, c_omp_check_loop_iv): Allow declv
4888 to contain TREE_LIST for both the original class iterator and the
4891 2018-07-07 Eric Botcazou <ebotcazou@adacore.com>
4893 * c-ada-spec.c (to_ada_name): Remove index parameter.
4894 (pp_ada_tree_identifier): Likewise.
4895 (dump_ada_macros): Adjust call to to_ada_name.
4896 (struct overloaded_name_hash): Delete.
4897 (struct overloaded_name_hasher): Likewise.
4898 (overloaded_names): Likewise.
4899 (compute_overloading_index): Likewise.
4900 (dump_ada_decl_name): Do not call compute_overloading_index and
4901 adjust calls to pp_ada_tree_identifier.
4902 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
4903 (dump_ada_import): Add spc parameter and switch to aspect syntax.
4904 (dump_ada_function_declaration): Adjust call to pp_ada_tree_identifier.
4905 (dump_ada_enum_type): Remove type and display_convention parameters.
4906 Adjust calls to pp_ada_tree_identifier.
4907 (dump_ada_node): Likewise and for dump_ada_structure.
4908 (dump_nested_type) <ENUMERAL_TYPE>: Adjust call to dump_ada_enum_type
4910 <RECORD_TYPE>: Adjust call to dump_ada_structure and switch to aspect
4912 (print_constructor): Adjust call to pp_ada_tree_identifier.
4913 (print_destructor): Likewise.
4914 (dump_ada_declaration): Switch to aspect syntax.
4915 (dump_ada_structure): Likewise and tidy up. Replace display_convention
4916 parameter with nested parameter.
4917 (dump_ads): Emit pragma Ada_2012 in lieu of pragma Ada_2005.
4918 (dump_ada_specs): Do not delete overloaded_names table.
4920 2018-07-06 Peter Bergner <bergner@linux.ibm.com>
4923 * c-attribs.c (handle_mode_attribute): Call translate_mode_attribute
4926 2018-07-05 Nathan Sidwell <nathan@acm.org>
4928 * c-lex.c (fe_file_change): Check SYSTEM_IMPLICIT_EXTERN_C not
4929 NO_IMPLICIT_EXTERN_C.
4931 2018-06-28 Martin Liska <mliska@suse.cz>
4933 * cppspec.c: Include opt-suggestions.h.
4935 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
4936 Thomas Schwinge <thomas@codesourcery.com>
4937 Cesar Philippidis <cesar@codesourcery.com>
4939 * c-pragma.h (enum pragma_omp_clause): Add
4940 PRAGMA_OACC_CLAUSE_{FINALIZE,IF_PRESENT}. Remove
4941 PRAGMA_OACC_CLAUSE_PRESENT_OR_{COPY,COPYIN,COPYOUT,CREATE}.
4943 2018-06-20 Jakub Jelinek <jakub@redhat.com>
4946 * c-common.c (check_nonnull_arg): Use fold_for_warn. Adjust obsolete
4949 2018-06-18 Martin Sebor <msebor@redhat.com>
4952 * c-warn.c (sizeof_pointer_memaccess_warning): Check for attribute
4955 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
4957 * c-common.c (c_common_truthvalue_conversion): Handle ABSU_EXPR.
4959 2018-06-13 Jason Merrill <jason@redhat.com>
4961 * c-opts.c (c_common_post_options): Warn about useless -Wabi.
4962 (c_common_handle_option) [OPT_Wabi_]: Remove flag_abi_compat_version
4965 PR c++/86094 - wrong code with defaulted move ctor.
4966 * c-opts.c (c_common_post_options): Bump the current ABI version to
4967 13. Set warn_abi_version and flag_abi_compat_version to the current
4968 version rather than 0. Fix defaulting flag_abi_compat_version from
4971 2018-06-12 Martin Sebor <msebor@redhat.com>
4974 * c-warn.c (sizeof_pointer_memaccess_warning): Avoid warning when
4975 sizeof source and destination yields the same value.
4977 2018-06-12 Martin Liska <mliska@suse.cz>
4979 * c.opt: Make MPX-related options as Deprecated.
4981 2018-06-08 David Malcolm <dmalcolm@redhat.com>
4983 * c-pretty-print.c (c_pretty_printer::statement): Use TDF_NONE
4986 2018-06-08 Martin Liska <mliska@suse.cz>
4988 * c-attribs.c (handle_bnd_variable_size_attribute): Remove support
4989 for MPX (macros, related functions, fields in cgraph_node, ...).
4990 (handle_bnd_legacy): Likewise.
4991 (handle_bnd_instrument): Likewise.
4994 2018-06-06 Jakub Jelinek <jakub@redhat.com>
4997 * c-cppbuiltin.c (c_cpp_builtins): Fix a typo, set
4998 __cpp_transactional_memory to 201500 instead of 210500.
5000 2018-06-06 Jason Merrill <jason@redhat.com>
5002 PR c++/85710 - ICE with -Wmemset-elt-size.
5003 * c-warn.c (warn_for_memset): Don't crash on incomplete element type.
5005 2018-06-01 Jason Merrill <jason@redhat.com>
5007 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_deduction_guides to
5010 2018-06-01 Eric Botcazou <ebotcazou@adacore.com>
5012 * c-ada-spec.c (dump_ada_declaration) <TYPE_DECL>: Generate a forward
5013 declaration for a typedef independently of whether the declaration of
5014 the subtype is generated.
5016 2018-05-31 Martin Sebor <msebor@redhat.com>
5019 * c.opt (-Wno-alloc-size-larger-than): New option.
5021 2018-04-22 David Pagan <dave.pagan@oracle.com>
5024 * c-opts.c (c_common_post_options): Set default for warn_return_type
5025 for C++/C++ with ObjC extensions only. For C, makes it possible to
5026 differentiate between default (no option), -Wreturn-type, and
5029 2018-05-29 Jason Merrill <jason@redhat.com>
5031 * c.opt (Winit-list-lifetime): New flag.
5033 2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
5035 * c-lex.c (get_fileinfo): Use splay_tree_compare_strings and
5036 splay_tree_delete_pointers.
5038 2018-05-26 Jakub Jelinek <jakub@redhat.com>
5041 * c-warn.c (diagnose_mismatched_attributes): Remove unnecessary
5042 noinline variable to workaround broken kernel headers.
5044 2018-05-18 Jason Merrill <jason@redhat.com>
5046 * c.opt (Wdeprecated-copy): New flag.
5048 2018-05-17 Martin Liska <mliska@suse.cz>
5050 * c-warn.c (overflow_warning): Do not use
5051 space in between 'G_' and '('.
5053 2018-05-09 Jason Merrill <jason@redhat.com>
5055 * c-common.c (valid_array_size_p): Add complain parameter.
5056 * c-common.h: ...which defaults to true.
5058 2018-05-11 Jakub Jelinek <jakub@redhat.com>
5061 * c-omp.c (c_omp_predetermined_sharing): Return
5062 OMP_CLAUSE_DEFAULT_SHARED for artificial vars with integral type.
5064 2018-05-11 Martin Liska <mliska@suse.cz>
5067 * c-attribs.c (handle_no_sanitize_attribute): Iterate all
5070 2018-05-10 Jakub Jelinek <jakub@redhat.com>
5073 * c-common.h (fold_offsetof_1): Removed.
5074 (fold_offsetof): Add TYPE argument defaulted to size_type_node and
5075 CTX argument defaulted to ERROR_MARK.
5076 * c-common.c (fold_offsetof_1): Renamed to ...
5077 (fold_offsetof): ... this. Remove wrapper function. Add TYPE
5078 argument, convert the pointer constant to TYPE and use size_binop
5079 with PLUS_EXPR instead of fold_build_pointer_plus if type is not
5080 a pointer type. Adjust recursive calls.
5082 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
5085 * c-attribs.c (handle_visibility_attribute): Do not set no_add_attrs.
5087 2018-05-07 Nathan Sidwell <nathan@acm.org>
5089 * c.opt (ffor-scope): Remove functionality, issue warning.
5091 2018-05-03 Nathan Sidwell <nathan@acm.org>
5093 * c.opt (ffriend-injection): Remove functionality, issue warning.
5095 2018-05-01 David Malcolm <dmalcolm@redhat.com>
5098 * c-format.c (struct format_check_results): Add field
5100 (check_format_info): Initialize it, and warn if encountered.
5101 (check_format_arg): Distinguish between wide char and
5102 everything else when detecting arrays of non-char.
5104 2018-04-30 David Malcolm <dmalcolm@redhat.com>
5106 * c-format.c (get_corrected_substring): Update for
5107 location_get_source_line returning a char_span. Use a char_span
5108 when handling the prefix of the correction.
5109 * c-indentation.c (get_visual_column): Update for
5110 location_get_source_line returning a char_span.
5111 (get_first_nws_vis_column): Likewise.
5113 2018-03-29 David Malcolm <dmalcolm@redhat.com>
5116 * known-headers.cc (get_stdlib_header_for_name): Add various names
5117 from <assert.h>, <string.h>, and <memory.h>; add more names from
5120 2018-03-27 Jakub Jelinek <jakub@redhat.com>
5123 * c-common.c (fold_offsetof_1) <case COMPOUND_EXPR>: Assert that
5124 get_base_address of the second operand is a VAR_P, rather than the
5125 operand itself, and use gcc_checking_assert instead of gcc_assert.
5127 2018-03-23 Marek Polacek <polacek@redhat.com>
5130 * c-pretty-print.c (c_pretty_printer::multiplicative_expression)
5131 <case RDIV_EXPR>: Tweak condition.
5133 2018-03-20 Eric Botcazou <ebotcazou@adacore.com>
5135 * c-ada-spec.c (pp_ada_tree_identifier): Deal specifically with _Bool.
5137 2018-03-16 Jakub Jelinek <jakub@redhat.com>
5140 * c-warn.c (conversion_warning): Replace "to to" with "to" in
5144 * c-warn.c (diagnose_mismatched_attributes): Remove trailing space from
5147 2018-03-16 Richard Biener <rguenther@suse.de>
5150 * c-gimplify.c (c_gimplify_expr): Revert previous change. Instead
5151 unshare the possibly folded expression.
5153 2018-03-15 Richard Biener <rguenther@suse.de>
5156 * c-gimplify.c (c_gimplify_expr): Do not fold expressions.
5158 2018-03-13 Martin Sebor <msebor@redhat.com>
5160 PR tree-optimization/84725
5161 * c-attribs.c (handle_nonstring_attribute): Allow attribute nonstring
5162 with all three narrow character types, including their qualified forms.
5164 2018-03-12 Martin Sebor <msebor@redhat.com>
5166 PR tree-optimization/83456
5167 * c-common.c (check_function_restrict): Return bool.
5168 Restore checking of bounded built-in functions.
5169 (check_function_arguments): Also return the result
5170 of warn_for_restrict.
5171 * c-common.c (check_function_restrict): Return bool.
5172 * c-warn.c (warn_for_restrict): Return bool.
5174 2018-03-02 Marek Polacek <polacek@redhat.com>
5177 * c-warn.c (warn_for_sign_compare): Bail out if any of the operands
5180 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
5182 * c-attribs.c (c_common_attribute_table): Remove "cilk simd
5185 2018-03-01 Marek Polacek <polacek@redhat.com>
5188 * c-attribs.c (common_handle_aligned_attribute): Don't use invalid
5189 alignment in computation.
5191 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
5193 * c-ada-spec.c (dump_ada_node) <NULLPTR_TYPE>: New case.
5194 <REAL_TYPE>: Deal specifically with _Float128/__float128.
5196 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
5198 * c-ada-spec.c (dump_ada_double_name) <ENUMERAL_TYPE>: New case.
5199 (is_char_array): Take a type instead of a declaration.
5200 (dump_ada_array_type): Likewise.
5201 (is_simple_enum): Minor tweak.
5202 (dump_ada_enum_type): New function extracted from...
5203 (dump_ada_node) <ENUMERAL_TYPE>: ...here. Invoke it.
5204 <INTEGER_TYPE>: Remove unreachable code.
5205 <RECORD_TYPE>: Likewise. Minor tweaks.
5206 (dump_nested_type) <ARRAY_TYPE>: Adjust to above changes.
5207 <ENUMERAL_TYPE>: New case.
5208 <RECORD_TYPE>: Factor out common code.
5209 (dump_ada_declaration) <ARRAY_TYPE>: Adjust to above changes.
5210 Minor tweaks. Deal with enumeral types.
5211 (dump_ada_structure): Minor tweaks.
5213 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
5215 * c-ada-spec.c (dump_ada_node) <POINTER_TYPE>: Do not use generic
5216 address for incomplete structures.
5217 (dump_forward_type): Do not bail out for incomplete structures.
5218 (dump_ada_declaration): Do not special-case incomplete structures
5219 for subtypes. Dump them as null records for types.
5221 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
5223 * c-ada-spec.c (dump_ada_import): Use boolean and fix formatting.
5224 (is_char_array): Fix formatting.
5225 (dump_template_types): Likewise.
5226 (dump_generic_ada_node): Rename into...
5227 (dump_ada_node): ...this.
5228 <POINTER_TYPE>: Remove superfluous space. Use generic address for
5229 incomplete structures and not for empty structures. Do not use it
5230 when forward declarations are needed.
5231 (dump_forward_type): New function.
5232 (dump_nested_types): Remove FORWARD parameter. Do not consider
5233 TREE_VISITED and do not generate a forward declaration. Only dump
5234 original nested types for nested declaration.
5235 (dump_nested_type) <POINTER_TYPE>: Call dump_forward_type.
5236 <ARRAY_TYPE>: Likewise if the component type is an anonymous pointer.
5237 <RECORD_TYPE>: Do not consider TREE_VISITED.
5238 (dump_ada_declaration): Use booleans and fix formatting throughout.
5239 <TYPE_DECL>: Skip incomplete structures and not empty structures.
5240 Call dump_forward_type instead of dump_nested_types for a typedef.
5241 Remove superfluous check and adjust call to dump_nested_types.
5242 <POINTER_TYPE>: Call dump_forward_type and fall through.
5243 (dump_ada_struct_decl): Rename into...
5244 (dump_ada_structure): ...this. Do not special-case empty structures.
5246 2018-02-27 Martin Sebor <msebor@redhat.com>
5249 * c.opt (-Wmissing-attributes): New option.
5251 2018-02-21 Martin Liska <mliska@suse.cz>
5253 * c.opt (Wcatch-value=): Add IntegerRange.
5255 2018-02-15 Jason Merrill <jason@redhat.com>
5257 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_deduction_guides.
5259 2018-02-09 Nathan Sidwell <nathan@acm.org>
5262 * c-common.h (strict_aliasing_warning): Drop OTYPE arg, insert LOC
5264 * c-warn.c (strict_aliasing_warning): Drop OTYPE arg, require LOC
5267 2018-02-09 Martin Sebor <msebor@redhat.com>
5270 * c.opt (-Wstringop-overflow, -Warray-bounds): Add LTO.
5271 (-Walloc-size-larger-than, -Wformat-truncation=): Same.
5272 (-Wmaybe-uninitialized, -Wnonnull, -Wrestrict): Same.
5273 (-Wstrict-overflow, -Wsuggest-attribute): Same.
5274 (-Wuninitialized): Same.
5276 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
5278 * c-ada-spec.c (dump_ada_declaration): Do not generate the 'constant'
5279 keyword for components.
5281 2018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
5283 * c-common.h (DECL_UNNAMED_BIT_FIELD): New.
5285 2018-02-02 Julia Koval <julia.koval@intel.com>
5287 * c-common.h (omp_clause_mask): Move to wide_int_bitmask.h.
5289 2018-01-29 Marek Polacek <polacek@redhat.com>
5292 * c-format.c (check_function_format): Check current_function_decl.
5294 2018-01-27 Jakub Jelinek <jakub@redhat.com>
5296 * c-cppbuiltin.c (c_cpp_builtins): Use ggc_strdup for the fp_suffix
5298 (LAZY_HEX_FP_VALUES_CNT): Define.
5299 (lazy_hex_fp_values): Allow up to LAZY_HEX_FP_VALUES_CNT lazy hex fp
5300 values rather than just 12.
5301 (builtin_define_with_hex_fp_value): Likewise.
5303 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
5306 * c.opt (-fmacro-prefix-map): New option.
5307 * c-opts.c (c_common_handle_option): Handle it.
5308 * c-lex.c (init_c_lex): Set remap_filename cpp callback.
5309 * c-ppoutput.c (init_pp_output): Likewise.
5311 2018-01-17 David Malcolm <dmalcolm@redhat.com>
5314 * c-common.c (fold_for_warn): Move to c/c-fold.c and cp/expr.c.
5316 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
5318 * c-ada-spec.c (dump_number): Add FLOAT_P parameter.
5319 Skip 'f' and 'F' characters if it is true.
5320 (store_ada_macro): Minor tweak.
5321 (dump_ada_macros) <CPP_COMMENT>: Likewise.
5322 <CPP_WSTRING>: Likewise.
5323 <CPP_STRING>: Output '&' in the buffer if not the first string.
5324 <CPP_NUMBER>: Adjust calls to dump_number.
5326 2018-01-10 David Malcolm <dmalcolm@redhat.com>
5329 * c-common.c: Include "selftest.h".
5330 (get_atomic_generic_size): Perform the test for integral type
5331 before the range test for any integer constant, fixing indentation
5332 of braces. Call fold_for_warn before testing for an INTEGER_CST.
5333 (reject_gcc_builtin): Strip any location wrapper from EXPR.
5334 (selftest::test_fold_for_warn): New function.
5335 (selftest::c_common_c_tests): New function.
5336 (selftest::c_family_tests): Call it, and
5337 selftest::c_pretty_print_c_tests.
5338 * c-common.h (selftest::c_pretty_print_c_tests): New decl.
5339 * c-format.c (check_format_arg): Convert VAR_P check to a
5341 * c-pretty-print.c: Include "selftest.h".
5342 (pp_c_cast_expression): Don't print casts for location wrappers.
5343 (selftest::assert_c_pretty_printer_output): New function.
5344 (ASSERT_C_PRETTY_PRINTER_OUTPUT): New macro.
5345 (selftest::test_location_wrappers): New function.
5346 (selftest::c_pretty_print_c_tests): New function.
5347 * c-warn.c (warn_for_memset): Call fold_for_warn on the arguments.
5349 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
5350 Alan Hayward <alan.hayward@arm.com>
5351 David Sherwood <david.sherwood@arm.com>
5353 * c-common.c (c_common_type_for_mode): Handle MODE_VECTOR_BOOL.
5355 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
5356 Alan Hayward <alan.hayward@arm.com>
5357 David Sherwood <david.sherwood@arm.com>
5359 * c-ubsan.c (ubsan_instrument_shift): Treat GET_MODE_BITSIZE
5362 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
5363 Alan Hayward <alan.hayward@arm.com>
5364 David Sherwood <david.sherwood@arm.com>
5366 * c-common.c (vector_types_convertible_p, c_build_vec_perm_expr)
5367 (convert_vector_to_array_for_subscript): Handle polynomial
5368 TYPE_VECTOR_SUBPARTS.
5369 (c_common_type_for_mode): Check valid_vector_subparts_p.
5370 * c-pretty-print.c (pp_c_initializer_list): Handle polynomial
5373 2018-01-03 Jakub Jelinek <jakub@redhat.com>
5375 Update copyright years.
5377 2017-12-22 Mike Stump <mikestump@comcast.net>
5378 Eric Botcazou <ebotcazou@adacore.com>
5380 * c-pragma.c (init_pragma): Register pragma GCC unroll.
5381 * c-pragma.h (enum pragma_kind): Add PRAGMA_UNROLL.
5383 2017-12-22 Alexandre Oliva <aoliva@redhat.com>
5387 * c-semantics.c (only_debug_stmts_after_p): New.
5388 (pop_stmt_list): Clear side effects in debug-only stmt list.
5389 Check for single nondebug stmt followed by debug stmts only.
5391 2017-12-21 Alexandre Oliva <aoliva@redhat.com>
5394 * c-semantics.c (pop_stmt_list): Propagate side effects from
5395 single nondebug stmt to container list.
5397 2017-12-19 Jakub Jelinek <jakub@redhat.com>
5399 * known-headers.cc (get_stdlib_header_for_name): Replace Yoda
5400 conditions with typical order conditions.
5402 2017-12-18 Marek Polacek <polacek@redhat.com>
5404 * c-warn.c (warn_logical_operator): Return early if -Wlogical-op is
5407 2017-12-17 Martin Sebor <msebor@redhat.com>
5409 * c-attribs.c (common_handle_aligned_attribute): Avoid issuing
5410 an error for attribute warn_if_not_aligned.
5412 2017-12-16 Martin Sebor <msebor@redhat.com>
5414 PR tree-optimization/78918
5415 * c-common.c (check_function_restrict): Avoid checking built-ins.
5416 * c.opt (-Wrestrict): Include in -Wall.
5418 2017-12-15 Jakub Jelinek <jakub@redhat.com>
5420 * c-attribs.c (c_common_attribute_table,
5421 c_common_format_attribute_table): Swap affects_type_identity
5422 and handler fields, adjust comments.
5424 2017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
5426 * c.opt (Wcast-function-type): New warning option.
5427 * c-lex.c (get_fileinfo): Avoid warning.
5428 * c-ppoutput.c (scan_translation_unit_directives_only): Remove cast.
5430 2017-12-14 Qing Zhao <qing.zhao@oracle.com>
5433 * c-cppbuiltin.c (builtin_define_with_hex_fp_value):
5434 Adjust the size of buf1 and buf2, add a new buf to avoid
5435 format-overflow warning.
5437 2017-12-12 Alexandre Oliva <aoliva@redhat.com>
5439 * c-semantics.c (pop_stmt_list): Move begin stmt marker into
5440 subsequent statement list.
5442 2017-12-07 Martin Sebor <msebor@redhat.com>
5446 * c-attribs.c (attr_aligned_exclusions): New array.
5447 (attr_alloc_exclusions, attr_cold_hot_exclusions): Same.
5448 (attr_common_exclusions, attr_const_pure_exclusions): Same.
5449 (attr_gnu_inline_exclusions, attr_inline_exclusions): Same.
5450 (attr_noreturn_exclusions, attr_returns_twice_exclusions): Same.
5451 (attr_warn_unused_result_exclusions): Same.
5452 (handle_hot_attribute, handle_cold_attribute): Simplify.
5453 (handle_const_attribute): Warn on function returning void.
5454 (handle_pure_attribute): Same.
5455 (handle_aligned_attribute): Diagnose conflicting attribute
5457 * c-warn.c (diagnose_mismatched_attributes): Simplify.
5459 2017-12-06 David Malcolm <dmalcolm@redhat.com>
5462 * c-common.c (selftest::c_family_tests): Call
5463 selftest::c_spellcheck_cc_tests.
5464 * c-common.h (selftest::c_spellcheck_cc_tests): New decl.
5465 * c-spellcheck.cc: Include "selftest.h".
5466 (name_reserved_for_implementation_p): New function.
5467 (should_suggest_as_macro_p): New function.
5468 (find_closest_macro_cpp_cb): Move the check for NT_MACRO to
5469 should_suggest_as_macro_p and call it.
5470 (selftest::test_name_reserved_for_implementation_p): New function.
5471 (selftest::c_spellcheck_cc_tests): New function.
5472 * c-spellcheck.h (name_reserved_for_implementation_p): New decl.
5474 2017-12-06 David Malcolm <dmalcolm@redhat.com>
5476 * c-spellcheck.cc: New file, taken from macro-handling code in
5478 * c-spellcheck.h: New file, taken from macro-handling code in
5481 2017-12-01 Jakub Jelinek <jakub@redhat.com>
5483 * c-attribs.c (c_common_attribute_table): Remove "cilk simd function"
5485 (handle_simd_attribute): Don't check for "cilk simd function"
5486 attribute. Reindent, formatting changes.
5488 2017-11-30 Julia Koval <julia.koval@intel.com>
5490 * c-common.h (inv_list): Remove.
5492 2017-11-28 Jakub Jelinek <jakub@redhat.com>
5495 * c-common.c (c_switch_covers_all_cases_p_1,
5496 c_switch_covers_all_cases_p): New functions.
5497 * c-common.h (c_switch_covers_all_cases_p): Declare.
5499 2017-11-28 Julia Koval <julia.koval@intel.com>
5500 Sebastian Peryt <sebastian.peryt@intel.com>
5502 * array-notation-common.c: Delete.
5503 * c-cilkplus.c: Ditto.
5504 * c-common.c (_Cilk_spawn, _Cilk_sync, _Cilk_for): Remove.
5505 * c-common.def (ARRAY_NOTATION_REF): Remove.
5506 * c-common.h (RID_CILK_SPAWN, build_array_notation_expr,
5507 build_array_notation_ref, C_ORT_CILK, c_check_cilk_loop,
5508 c_validate_cilk_plus_loop, cilkplus_an_parts,
5509 cilk_ignorable_spawn_rhs_op,
5510 cilk_recognize_spawn): Remove.
5511 * c-gimplify.c (CILK_SPAWN_STMT): Remove.
5512 * c-omp.c: Remove CILK_SIMD check.
5513 * c-pragma.c: Ditto.
5514 * c-pragma.h: Remove CILK related pragmas.
5515 * c-pretty-print.c (c_pretty_printer::postfix_expression): Remove
5516 ARRAY_NOTATION_REF condition.
5517 (c_pretty_printer::expression): Ditto.
5518 * c.opt (fcilkplus): Remove.
5521 2017-11-21 Marc Glisse <marc.glisse@inria.fr>
5523 * c-pretty-print.c (pp_c_additive_expression,
5524 c_pretty_printer::expression): Handle POINTER_DIFF_EXPR.
5526 2017-11-21 Jakub Jelinek <jakub@redhat.com>
5528 * c-common.c (get_nonnull_operand): Use tree_to_uhwi.
5531 * c-common.c (get_atomic_generic_size): Use TREE_INT_CST_LOW
5532 instead of tree_to_uhwi, formatting fix.
5534 2017-11-20 David Malcolm <dmalcolm@redhat.com>
5537 * known-headers.cc: New file, based on material from c/c-decl.c.
5538 (suggest_missing_header): Copied as-is.
5539 (get_stdlib_header_for_name): New, based on get_c_name_hint but
5540 heavily edited to add C++ support. Add some knowledge about
5541 <limits.h>, <stdint.h>, and <wchar.h>.
5542 * known-headers.h: Likewise.
5544 2017-11-20 David Malcolm <dmalcolm@redhat.com>
5546 * c-common.h (enum lookup_name_fuzzy_kind): Move to name-hint.h.
5547 (lookup_name_fuzzy): Likewise. Convert return type from
5548 const char * to name_hint. Add location_t param.
5549 * name-hint.h: New header.
5551 2017-11-19 Jakub Jelinek <jakub@redhat.com>
5555 * c-common.h (c_fully_fold): Add LVAL argument defaulted to false.
5557 2017-11-16 Joseph Myers <joseph@codesourcery.com>
5559 * c.opt (-std=c17, std=gnu17, -std=iso9899:2017): Refer to 2018
5560 expected publication date of C17.
5561 (-std=c18, -std=gnu18, -std=iso9899:2018): New option aliases.
5563 2017-11-15 Joseph Myers <joseph@codesourcery.com>
5566 * c-common.c (c_common_reswords): Add __builtin_tgmath.
5567 * c-common.h (enum rid): Add RID_BUILTIN_TGMATH.
5569 2017-11-10 Martin Sebor <msebor@redhat.com>
5572 * c-common.c (catenate_strings): Use memcpy instead of strncpy.
5573 * c-warn.c (sizeof_pointer_memaccess_warning): Handle arrays.
5574 * c.opt (-Wstringop-truncation): New option.
5576 2017-11-06 Martin Liska <mliska@suse.cz>
5579 * c-opts.c (c_common_post_options): Set -Wreturn-type for C++
5581 * c.opt: Set default value of warn_return_type.
5583 2017-10-31 David Malcolm <dmalcolm@redhat.com>
5585 * c-common.c (binary_op_error): Update for renaming of
5587 (c_parse_error): Likewise.
5588 * c-warn.c (warn_logical_not_parentheses): Likewise for
5589 renaming of inform_at_rich_loc.
5590 (warn_for_restrict): Likewise for renaming of
5591 warning_at_rich_loc_n.
5593 2017-10-30 Joseph Myers <joseph@codesourcery.com>
5595 * c.opt (std=c17, std=gnu17, std=iso9899:2017): New options.
5596 * c-opts.c (set_std_c17): New function.
5597 (c_common_init_options): Use gnu17 as default C version.
5598 (c_common_handle_option): Handle -std=c17 and -std=gnu17.
5600 2017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
5602 * c-cppbuiltin.c (mode_has_fma): Add support for PowerPC KFmode.
5603 (c_cpp_builtins): If a machine has a fast fma _Float<N> and
5604 _Float<N>X variant, define __FP_FAST_FMA<N> and/or
5607 2017-10-23 Marek Polacek <polacek@redhat.com>
5610 * c-warn.c (warnings_for_convert_and_check): Fix typos.
5612 2017-10-19 Eric Botcazou <ebotcazou@adacore.com>
5614 * c-common.c (check_builtin_function_arguments): Also check arguments
5615 of __builtin_alloca_with_align_and_max.
5617 2017-10-17 David Malcolm <dmalcolm@redhat.com>
5619 * c-format.c (format_warning_at_char): Pass UNKNOWN_LOCATION
5620 rather than NULL to format_warning_va.
5621 (check_format_types): Likewise when calling format_type_warning.
5622 Remove code to extract source_ranges and source_range * in favor
5623 of just a location_t.
5624 (format_type_warning): Convert source_range * param to a
5627 2017-10-13 Jakub Jelinek <jakub@redhat.com>
5629 * c-gimplify.c (c_gimplify_expr): Handle [LR]ROTATE_EXPR like
5632 2017-10-12 David Malcolm <dmalcolm@redhat.com>
5634 * c-common.c (enum missing_token_insertion_kind): New enum.
5635 (get_missing_token_insertion_kind): New function.
5636 (maybe_suggest_missing_token_insertion): New function.
5637 * c-common.h (maybe_suggest_missing_token_insertion): New decl.
5639 2017-10-11 Nathan Sidwell <nathan@acm.org>
5641 * c-opts.c (add_prefixed_path): Change chain to incpath_kind.
5642 (c_common_handle_option): Update incpath_kind names.
5644 2017-10-11 Martin Liska <mliska@suse.cz>
5647 * c-attribs.c (handle_no_sanitize_attribute): Report directly
5648 Wattributes warning.
5650 2017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
5652 * c-ada-spec.c (dump_generic_ada_node): Use wi::to_wide when
5653 operating on trees as wide_ints.
5654 * c-common.c (pointer_int_sum): Likewise.
5655 * c-pretty-print.c (pp_c_integer_constant): Likewise.
5656 * c-warn.c (match_case_to_enum_1): Likewise.
5657 (c_do_switch_warnings): Likewise.
5658 (maybe_warn_shift_overflow): Likewise.
5660 2017-10-10 Jakub Jelinek <jakub@redhat.com>
5663 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_wide
5664 instead of wide_int::from.
5666 2017-10-06 Jakub Jelinek <jakub@redhat.com>
5669 * c-warn.c (warn_tautological_bitwise_comparison): Instead of
5670 using to_widest use wide_int with the larger of the two precisions.
5672 2017-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
5674 * c-pretty-print.c (pp_c_parameter_type_list): Print ... for variadic
5677 2017-10-02 Richard Sandiford <richard.sandiford@linaro.org>
5679 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_widest
5680 when combining the original unconverted comparison operands.
5682 2017-09-29 Jakub Jelinek <jakub@redhat.com>
5684 * c-attribs.c (handle_noipa_attribute): Don't add "stack_protect"
5687 2017-09-29 Eric Botcazou <ebotcazou@adacore.com>
5689 * c-ada-spec.c (to_ada_name): Add index parameter.
5690 (pp_ada_tree_identifier): Likewise.
5691 (dump_ada_macros): Adjust call to to_ada_name.
5692 (struct overloaded_name_hash): New type.
5693 (struct overloaded_name_hasher): Likewise.
5694 (overloaded_names): New hash table.
5695 (compute_overloading_index): New function.
5696 (dump_ada_decl_name): Call it and pass the result to
5697 pp_ada_tree_identifier.
5698 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
5699 (dump_ada_function_declaration): Likewise.
5700 (dump_generic_ada_node): Likewise.
5701 (print_constructor): Likewise.
5702 (print_destructor): Likewise.
5703 (dump_ada_specs): Delete overloaded_names table.
5705 2017-09-29 Eric Botcazou <ebotcazou@adacore.com>
5707 * c-ada-spec.c (max_ada_macros): Move around.
5708 (store_ada_macro_index): Likewise.
5709 (source_file): Rename into...
5710 (macro_source_file): ...this.
5711 (count_ada_macro): Move around.
5712 (store_ada_macro): Likewise.
5713 (compare_macro): Likewise.
5714 (print_ada_macros): Merge in...
5715 (dump_ada_macros): ...this.
5716 (source_file_base): Rename into...
5717 (current_source_file): ...this.
5718 (print_comment): Move around.
5719 (dump_ada_nodes): Call dump_ada_declaration directly.
5720 (struct with): Change type of limited field to bool.
5721 (append_withs): Change type of limited_access parameter to bool.
5722 (pp_ada_tree_identifie): Likewise.
5723 (dump_ada_decl_nam): Likewise.
5724 (dump_generic_ada_node): Likewise. Do not print the return type.
5725 (to_ada_name): Change type of space_found parameter to bool.
5726 (dump_ada_function_declaration): Return void and change type of
5727 parameters to bool. Also print the return type for a function.
5728 (print_ada_methods): Rename into...
5729 (dump_ada_methods): ...this.
5730 (print_ada_declaration): Rename into ...
5731 (dump_ada_declaration): ...this. Do not print the return type.
5732 (print_ada_struct_decl): Rename into...
5733 (dump_ada_struct_decl): ...this.
5735 2017-09-29 Jakub Jelinek <jakub@redhat.com>
5737 * c-attribs.c (handle_packed_attribute): Test DECL_C_BIT_FIELD
5738 rather than DECL_INITIAL.
5739 (common_handle_aligned_attribute): Likewise.
5741 2017-09-20 Alexandre Oliva <aoliva@redhat.com>
5743 * c.opt (gen-decls): Add RejectNegative.
5745 2017-09-15 Andrew Sutton <andrew.n.sutton@gmail.com>
5746 Jakub Jelinek <jakub@redhat.com>
5748 Add support for -std=c++2a.
5749 * c-common.h (cxx_dialect): Add cxx2a as a dialect.
5750 * opt.c: Add options for -std=c++2a and -std=gnu++2a.
5751 * c-opts.c (set_std_cxx2a): New.
5752 (c_common_handle_option): Set options when -std=c++2a is enabled.
5753 (c_common_post_options): Adjust comments.
5754 (set_std_cxx14, set_std_cxx17): Likewise.
5756 2017-09-15 Eric Botcazou <ebotcazou@adacore.com>
5758 * c-pragma.c (handle_pragma_scalar_storage_order): Expand on error
5759 message for non-uniform endianness and issue a warning in C++.
5761 2017-09-15 Jakub Jelinek <jakub@redhat.com>
5763 * c.opt (Wc++1z-compat): Change from option to undocumented alias.
5764 (Wc++17-compat): Change from undocumented alias to option.
5765 (Wnoexcept-type): Enable by Wc++17-compat instead of Wc++1z-compat,
5766 change C++1z to C++17 in description.
5767 (std=c++1z, std=gnu++1z): Change from option to undocumented
5769 (std=c++17, std=gnu++17): Change from undocumented alias to option.
5771 * c-common.h (enum cxx_dialect): Rename cxx1z to cxx17.
5772 * c-opts.c (set_std_cxx1z): Rename to ...
5773 (set_std_cxx17): ... this.
5774 (c_common_handle_option): Rename OPT_std_c__1z to OPT_std_c__17
5775 and OPT_std_gnu__1z to OPT_std_gnu__17. Adjust set_std_cxx1z
5777 (c_common_post_options): Use cxx17 instead of cxx1z. Adjust
5780 2017-09-12 H.J. Lu <hongjiu.lu@intel.com>
5782 * c-attribs.c (common_handle_aligned_attribute): Don't warn
5783 function alignment if warn_if_not_aligned_p is true.
5785 2017-09-12 Nathan Sidwell <nathan@acm.org>
5787 * c-common.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
5788 resort_sorted_fields): Move to c/c-decl.c.
5789 * c-common.h (field_decl_cmp, resort_sorted_fields): Delete.
5790 (struct sorted_fields_type): Move to c/c-lang.h.
5792 2017-09-09 Jonathan Wakely <jwakely@redhat.com>
5795 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_threadsafe_static_init.
5797 2017-09-04 Marek Polacek <polacek@redhat.com>
5800 * c-warn.c (warn_tautological_bitwise_comparison): New function.
5801 (warn_tautological_cmp): Call it.
5803 2017-09-01 Boris Kolpackov <boris@codesynthesis.com>
5805 * c-opts.c (c_common_finish): Write dependency information even if
5808 2017-09-01 Jakub Jelinek <jakub@redhat.com>
5811 * c-pragma.c (omp_pragmas): Move "ordered" entry from here to ...
5812 (omp_pragmas_simd): ... here.
5813 * c-omp.c (c_finish_omp_ordered): If clauses isn't simd clause alone,
5814 create new clauses list containing just simd clause.
5816 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5817 Alan Hayward <alan.hayward@arm.com>
5818 David Sherwood <david.sherwood@arm.com>
5820 * c-attribs.c (vector_mode_valid_p) Fold GET_MODE_INNER call
5821 into scalar_mode_supported_p call.
5822 (handle_mode_attribute): Update call to scalar_mode_supported_p.
5824 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5825 Alan Hayward <alan.hayward@arm.com>
5826 David Sherwood <david.sherwood@arm.com>
5828 * c-common.c (c_common_fixed_point_type_for_size): Use opt_scalar_mode
5829 for the mode iterator.
5831 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5832 Alan Hayward <alan.hayward@arm.com>
5833 David Sherwood <david.sherwood@arm.com>
5835 * c-lex.c (interpret_fixed): Use SCALAR_TYPE_MODE.
5836 * c-common.c (c_build_vec_perm_expr): Likewise.
5838 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5839 Alan Hayward <alan.hayward@arm.com>
5840 David Sherwood <david.sherwood@arm.com>
5842 * c-common.c (c_common_type_for_mode): Use as_a <scalar_int_mode>.
5844 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5845 Alan Hayward <alan.hayward@arm.com>
5846 David Sherwood <david.sherwood@arm.com>
5848 * c-attribs.c (handle_mode_attribute): Check for a scalar_int_mode
5849 before calling targetm.addr_space.valid_pointer_mode.
5851 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5852 Alan Hayward <alan.hayward@arm.com>
5853 David Sherwood <david.sherwood@arm.com>
5855 * c-cppbuiltin.c (c_cpp_builtins): Use opt_scalar_float_mode.
5857 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5858 Alan Hayward <alan.hayward@arm.com>
5859 David Sherwood <david.sherwood@arm.com>
5861 * c-common.c (c_common_fixed_point_type_for_size): Use new mode
5863 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
5865 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5866 Alan Hayward <alan.hayward@arm.com>
5867 David Sherwood <david.sherwood@arm.com>
5869 * c-cppbuiltin.c (mode_has_fma): Prefix mode names with E_ in
5872 2017-08-29 Martin Liska <mliska@suse.cz>
5875 * c-common.c (parse_optimize_options): Add argument to function
5877 * c-pragma.c (handle_pragma_diagnostic): Likewise.
5879 2017-08-24 David Malcolm <dmalcolm@redhat.com>
5881 * c-lex.c (interpret_float): Use token location
5882 when building an EXCESS_PRECISION_EXPR.
5884 2017-08-21 David Malcolm <dmalcolm@redhat.com>
5886 * c-common.c (check_function_arguments): Add "arglogs" param; pass
5887 it to check_function_format.
5888 * c-common.h (check_function_arguments): Add vec<location_t> *
5890 (check_function_format): Likewise.
5891 * c-format.c (struct format_check_context): Add field "arglocs".
5892 (check_function_format): Add param "arglocs"; pass it to
5894 (check_format_info): Add param "arglocs"; use it to initialize
5895 new field of format_ctx.
5896 (check_format_arg): Pass format_ctx->arglocs to new param of
5897 check_format_info_main.
5898 (class argument_parser): New field "arglocs".
5899 (argument_parser::argument_parser): Add "arglocs_" param and use
5900 it to initialize new field.
5901 (argument_parser::check_argument_type): Pass new arglocs field to
5903 (check_format_info_main): Add param "arglocs", and use it when
5904 constructing arg_parser.
5905 (check_format_types): Add param "arglocs"; use it if non-NULL when
5906 !EXPR_HAS_LOCATION (cur_param) to get at location information.
5908 2017-08-18 H.J. Lu <hongjiu.lu@intel.com>
5911 * c-attribs.c (handle_warn_if_not_aligned_attribute): New.
5912 (c_common_attribute_table): Add warn_if_not_aligned.
5913 (handle_aligned_attribute): Renamed to ...
5914 (common_handle_aligned_attribute): Remove argument, name, and add
5915 argument, warn_if_not_aligned. Handle warn_if_not_aligned.
5916 (handle_aligned_attribute): New.
5917 * c.opt: Add -Wif-not-aligned and -Wpacked-not-aligned.
5919 2017-08-14 Martin Sebor <msebor@redhat.com>
5922 * c-attribs.c (c_common_attribute_table): Add nonstring entry.
5923 (handle_nonstring_attribute): New function.
5925 2017-08-14 Martin Sebor <msebor@redhat.com>
5928 * c-format.h (T89_G): New macro.
5929 * c-format.c (local_gcall_ptr_node): New variable.
5930 (init_dynamic_diag_info): Initialize it.
5932 2017-08-11 Martin Liska <mliska@suse.cz>
5934 * c-opts.c (c_common_post_options): Replace ASM_OUTPUT_DEF with
5935 TARGET_SUPPORTS_ALIASES.
5937 2017-08-10 David Malcolm <dmalcolm@redhat.com>
5939 * c-common.c (c_parse_error): Add rich_location * param, using it
5940 rather implicitly using input_location.
5941 * c-common.h (c_parse_error): Add rich_location * param.
5943 2017-08-09 Marek Polacek <polacek@redhat.com>
5945 * c-common.c (pointer_int_sum): Use true/false instead of 1/0.
5946 (c_common_truthvalue_conversion): Likewise.
5947 * c-omp.c (c_finish_omp_atomic): Likewise.
5948 * c-common.h (build_binary_op): Update declaration.
5950 2017-08-08 Martin Liska <mliska@suse.cz>
5952 * c-ada-spec.c: Include header files.
5953 * c-ubsan.c: Likewise.
5954 * c-warn.c: Likewise.
5956 2017-08-07 Jakub Jelinek <jakub@redhat.com>
5959 * c-omp.c (c_finish_omp_atomic): Handle atomics on bitfields.
5961 2017-08-07 Eric Botcazou <ebotcazou@adacore.com>
5963 * c-ada-spec.c (has_nontrivial_methods): Test for FUNCTION_DECL.
5964 (print_ada_methods): Likewise.
5965 (print_ada_declaration): Likewise.
5967 2017-08-07 Martin Liska <mliska@suse.cz>
5969 * array-notation-common.c: Add new includes.
5970 * c-format.c( handle_format_attribute): Canonicalize a format
5972 * c-lex.c (c_common_has_attribute): Canonicalize name of an
5974 * c-pretty-print.c: Add new include.
5976 2017-08-05 Eric Botcazou <ebotcazou@adacore.com>
5978 * c-ada-spec.c (has_static_fields): Look only into variables.
5979 (print_constructor): Add TYPE parameter and use it for the name.
5980 (print_destructor): Likewise.
5981 (print_ada_declaration): Adjust to new constructor/destructor names.
5982 Adjust calls to print_constructor and print_destructor.
5983 (print_ada_struct_decl): Do not test TREE_STATIC on FIELD_DECL.
5984 Look only into variables in the final loop.
5986 2017-08-01 Eric Botcazou <ebotcazou@adacore.com>
5988 * c-ada-spec.c (has_static_fields): Look only into fields.
5989 (dump_generic_ada_node): Small tweak.
5990 (dump_nested_types): Look only into fields.
5991 (print_ada_declaration): Look only into methods. Small tweak.
5992 (print_ada_struct_decl): Look only into fields. Use DECL_VIRTUAL_P.
5994 2017-08-01 Eric Botcazou <ebotcazou@adacore.com>
5996 * c-ada-spec.c (print_generic_ada_decl): Pass correctly-typed constant.
5997 (dump_ada_function_declaration): Likewise.
5998 (dump_generic_ada_node): Likewise.
5999 (print_ada_declaration): Add support for const-qualified variables.
6001 2017-07-31 Martin Liska <mliska@suse.cz>
6004 * c-ubsan.c (ubsan_maybe_instrument_array_ref):
6005 Guard condition with flag_sanitize_p also with current_function_decl
6007 (ubsan_maybe_instrument_reference_or_call): Likewise.
6009 2017-07-30 Uros Bizjak <ubizjak@gmail.com>
6011 * c-format.c (asm_fprintf_char_table): Add 'z' to format_chars.
6013 2017-07-29 Eric Botcazou <ebotcazou@adacore.com>
6015 * c-ada-spec.c (dump_generic_ada_node): Take into account signedness
6017 (print_ada_declaration): Add missing guard for record types.
6019 2017-07-27 Jakub Jelinek <jakub@redhat.com>
6022 * c-omp.c (c_finish_omp_for): If the condition is wrapped in
6023 rhs of COMPOUND_EXPR(s), skip them and readd their lhs into
6024 new COMPOUND_EXPRs around the rhs of the comparison.
6026 2017-07-27 Marek Polacek <polacek@redhat.com>
6029 * c-warn.c (warn_for_sign_compare): Tweak the warning message. Print
6032 2017-07-27 Jakub Jelinek <jakub@redhat.com>
6034 * c-attribs.c (c_common_attribute_table): Add noipa attribute.
6035 (handle_noipa_attribute): New function.
6037 2017-07-07 Torsten Duwe <duwe@suse.de>
6039 * c-attribs.c (c_common_attribute_table): Add entry for
6040 "patchable_function_entry".
6042 2017-07-20 Nathan Sidwell <nathan@acm.org>
6044 Remove TYPE_METHODS.
6045 * c-ada-spec.c (is_tagged_type, has_nontrivial_methods,
6046 dump_ada_template, print_ada_methods,
6047 print_ada_declaration): Member fns are on TYPE_FIELDS.
6049 2017-07-18 Nathan Sidwell <nathan@acm.org>
6051 * c-warn.c (warn_for_memset): Use TYPE_{MIN,MAX}_VALUE.
6053 2017-07-14 David Malcolm <dmalcolm@redhat.com>
6055 * c-common.c (try_to_locate_new_include_insertion_point): New
6057 (per_file_includes_t): New typedef.
6058 (added_includes_t): New typedef.
6059 (added_includes): New variable.
6060 (maybe_add_include_fixit): New function.
6061 * c-common.h (maybe_add_include_fixit): New decl.
6063 2017-07-10 Martin Sebor <msebor@redhat.com>
6066 * c.opt (-Wstringop-overflow): Set defaults in LangEnabledBy.
6068 2017-07-06 David Malcolm <dmalcolm@redhat.com>
6070 * c-common.c (selftest::c_family_tests): New.
6071 * c-common.h (selftest::run_c_tests): Move decl to c/c-lang.h.
6072 (selftest::c_family_tests): New decl.
6074 2017-07-04 Marek Polacek <polacek@redhat.com>
6077 * c-common.c (sync_resolve_size): Give error for pointers to incomplete
6080 2017-07-04 Marek Polacek <polacek@redhat.com>
6082 * c-warn.c (warn_if_unused_value): Remove WITH_CLEANUP_EXPR handling.
6084 2017-06-28 Martin Liska <mliska@suse.cz>
6087 * c-attribs.c (handle_alias_ifunc_attribute): Append ifunc alias
6088 to a function declaration.
6090 2017-06-28 Martin Liska <mliska@suse.cz>
6093 * c.opt: Add IntegerRange to various options.
6095 2017-06-26 Marek Polacek <polacek@redhat.com>
6098 * c-common.h (warn_for_multistatement_macros): Declare.
6099 * c-warn.c: Include "c-family/c-indentation.h".
6100 (warn_for_multistatement_macros): New function.
6101 * c.opt (Wmultistatement-macros): New option.
6102 * c-indentation.c (guard_tinfo_to_string): No longer static.
6103 Change the parameter type to "enum rid". Handle RID_SWITCH.
6104 * c-indentation.h (guard_tinfo_to_string): Declare.
6106 2017-06-23 Marc Glisse <marc.glisse@inria.fr>
6108 * c-common.c (c_common_nodes_and_builtins): Use builtin_structptr_types.
6110 2017-06-15 Martin Sebor <msebor@redhat.com>
6113 * c.opt (-Wclass-memaccess): New option.
6115 2017-06-14 Boris Kolpackov <boris@codesynthesis.com>
6117 * c-opts.c (c_common_finish): Handle '-' special value to -MF.
6119 2017-06-13 Marek Polacek <polacek@redhat.com>
6122 * c-warn.c (do_warn_duplicated_branches): Return if any of the
6125 2017-06-13 Martin Liska <mliska@suse.cz>
6128 * c-attribs.c (add_no_sanitize_value): New function.
6129 (handle_no_sanitize_attribute): Likewise.
6130 (handle_no_sanitize_address_attribute): Use the function.
6131 (handle_no_sanitize_thread_attribute): New function.
6132 (handle_no_address_safety_analysis_attribute): Use
6133 add_no_sanitize_value.
6134 (handle_no_sanitize_undefined_attribute): Likewise.
6135 * c-common.h: Declare new functions.
6136 * c-ubsan.c (ubsan_instrument_division): Use sanitize_flags_p.
6137 (ubsan_instrument_shift): Likewise.
6138 (ubsan_instrument_bounds): Likewise.
6139 (ubsan_maybe_instrument_array_ref): Likewise.
6140 (ubsan_maybe_instrument_reference_or_call): Likewise.
6142 2017-06-11 Jason Merrill <jason@redhat.com>
6144 * c-ada-spec.c, c-pragma.c: Use id_equal.
6146 2017-06-04 Marek Polacek <polacek@redhat.com>
6149 * c-format.c (matching_type_p): Return false if any of the types
6150 requires structural equality.
6152 2017-06-02 Martin Sebor <msebor@redhat.com>
6155 * c-warn.c (conversion_warning): Use -Wconversion for integer
6156 conversion and -Wfloat-conversion for floating one.
6158 2017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
6160 * c.opt (Wsizeof-pointer-div): New warning option.
6162 2017-06-01 Volker Reichelt <v.reichelt@netcologne.de>
6164 * c.opt (Wcatch-value): New shortcut for Wcatch-value=1.
6165 (Wcatch-value=1): Enable by -Wall.
6167 2017-05-30 David Malcolm <dmalcolm@redhat.com>
6169 * c-format.c (gcc_cxxdiag_char_table): Add 'H' and 'I' to
6171 * c.opt (fdiagnostics-show-template-tree): New option.
6172 (felide-type): New option.
6174 2017-05-25 Volker Reichelt <v.reichelt@netcologne.de>
6176 * c.opt (Wcatch-value=): New C++ warning flag.
6178 2017-05-24 Nathan Sidwell <nathan@acm.org>
6180 * c=common.c (field_decl_cmp, resort_field_decl_cmp): Adjust T
6181 const casts to avoid warning.
6183 2017-05-24 Martin Sebor <msebor@redhat.com>
6186 * c-common.h (unsafe_conversion_p): Add a function argument.
6187 * c-common.c (unsafe_conversion_p): Same.
6188 Add type names and values to diagnostics.
6189 (scalar_to_vector): Adjust.
6190 * c-warn.c (constant_expression_error): Add a function argument.
6191 Add type names and values to diagnostics.
6192 (conversion_warning): Add a function argument.
6193 Add type names and values to diagnostics.
6194 (warnings_for_convert_and_check): Same.
6196 2017-05-19 Jason Merrill <jason@redhat.com>
6198 * c-warn.c (match_case_to_enum_1): Don't warn about enums with no
6201 2017-05-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
6203 * c-format.c (locus): Move out of function scope,
6206 2017-05-19 Nathan Sidwell <nathan@acm.org>
6208 * c-opts.c (class_dump_file, class_dump_flags): Delete.
6209 (c_common_parse_file): Remove class dump handling.
6210 (get_dump_info): Likewise.
6212 2017-05-19 Richard Biener <rguenther@suse.de>
6215 * c-warn.c (strict_aliasing_warning): Do not warn for accesses
6216 to alias-set zero memory.
6218 2017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
6220 * c-format.c (local_tree_type_node): Add GTY attribute.
6222 2017-05-18 Marek Polacek <polacek@redhat.com>
6224 * c-common.c (c_common_type_for_size): Use NULL_TREE instead of 0.
6225 (c_common_fixed_point_type_for_size): Likewise.
6226 (c_common_type_for_mode): Likewise.
6227 (shorten_compare): Likewise.
6228 (c_promoting_integer_type_p): Use false/true instead of 0/1.
6229 * c-pragma.c (maybe_apply_renaming_pragma): Use NULL_TREE instead of 0.
6231 2017-05-18 Marek Polacek <polacek@redhat.com>
6233 * c-common.c (self_promoting_args_p): Change the return type to bool.
6234 Use false/true instead of 0/1.
6235 * c-common.h (self_promoting_args_p): Update.
6237 2017-05-17 Marek Polacek <polacek@redhat.com>
6239 * c-common.c: Use NULL_TREE instead of 0 where appropriate.
6240 * c-warn.c: Likewise.
6242 2017-05-17 Ville Voutilainen <ville.voutilainen@gmail.com>
6244 Implement new C++ intrinsics __is_assignable and __is_constructible.
6245 * c-common.c (__is_assignable, __is_constructible): New.
6246 * c-common.h (RID_IS_ASSIGNABLE, RID_IS_CONSTRUCTIBLE): Likewise.
6248 2017-05-17 Martin Liska <mliska@suse.cz>
6250 * c-common.h: Introduce dump_flags_t type and
6251 use it instead of int type.
6252 * c-gimplify.c (c_genericize): Likewise.
6253 * c-opts.c: Likewise.
6255 2017-05-17 Marek Polacek <polacek@redhat.com>
6257 * c-common.c (c_save_expr): Remove.
6258 (c_common_truthvalue_conversion): Remove a call to c_save_expr.
6259 * c-common.h (c_save_expr): Remove declaration.
6261 2017-05-09 Volker Reichelt <v.reichelt@netcologne.de>
6264 * c-pretty-print.c (c_pretty_printer::expression): Handle MAX_EXPR,
6265 MIN_EXPR, EXACT_DIV_EXPR, RDIV_EXPR, LROTATE_EXPR, RROTATE_EXPR.
6266 (c_pretty_printer::postfix_expression): Handle MAX_EXPR, MIN_EXPR.
6267 (c_pretty_printer::multiplicative_expression): Handle EXACT_DIV_EXPR,
6269 (pp_c_shift_expression): Handle LROTATE_EXPR, RROTATE_EXPR.
6271 2017-05-09 Marek Polacek <polacek@redhat.com>
6274 * c-warn.c (unwrap_c_maybe_const): New.
6275 (warn_logical_operator): Call it.
6277 2017-05-09 Nathan Sidwell <nathan@acm.org>
6279 * c-common.c (c_register_builtin_type): Use pushdecl lang_hook.
6280 * c-common.h (pushdecl_top_level, pushdecl): Don't declare here.
6282 2017-05-08 Martin Sebor <msebor@redhat.com>
6284 PR translation/80280
6285 * c-format.h (struct format_flag_spec): Add new member.
6287 * c-format.c (local_tree_type_node): New global.
6288 (printf_flag_specs, asm_fprintf_flag_spec): Initialize new data.
6289 (gcc_diag_flag_specs, scanf_flag_specs, strftime_flag_specs): Ditto.
6290 (strfmon_flag_specs): Likewise.
6291 (gcc_diag_char_table, gcc_cdiag_char_table): Split up specifiers
6292 with distinct quoting properties.
6293 (gcc_tdiag_char_table, gcc_cxxdiag_char_table): Same.
6294 (flag_chars_t::validate): Add argument and handle bad quoting.
6295 (check_format_info_main): Handle quoting problems.
6296 (init_dynamic_diag_info): Simplify.
6298 2017-05-08 Jason Merrill <jason@redhat.com>
6300 * c-opts.c (c_common_post_options): Update defaults for
6301 flag_abi_version and flag_abi_compat_version.
6303 2017-05-05 David Malcolm <dmalcolm@redhat.com>
6305 * c-common.c (c_cpp_error): Replace report_diagnostic
6306 with diagnostic_report_diagnostic.
6308 2017-05-04 Martin Sebor <msebor@redhat.com>
6310 PR translation/80280
6311 * c-attribs.c (handle_alias_ifunc_attribute): Quote a %D directive.
6312 (handle_weakref_attribute): Same.
6314 2017-05-03 Nathan Sidwell <nathan@acm.org>
6316 Canonicalize canonical type hashing
6317 * c-common.c (complete_array_type): Use type_hash_canon.
6319 2017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
6322 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): Remove
6324 (cilk_install_body_pedigree_operations): Likewise.
6325 * cilk.c (cilk_set_spawn_marker): Mark functions that should be
6327 (cilk_gimplify_call_params_in_spawned_fn): Remove.
6328 (cilk_install_body_pedigree_operations): Likewise.
6329 (gimplify_cilk_spawn): Add EXPR_STMT and CLEANUP_POINT_EXPR
6332 2017-04-27 Jakub Jelinek <jakub@redhat.com>
6335 * c-common.c (complete_array_type): Only hash TYPE_TYPELESS_STORAGE
6336 flag on non-aggregate element types.
6338 2017-04-25 Bernd Edlinger <bernd.edlinger@hotmail.de>
6340 * c-common.c (c_type_hasher, type_hash_table): Remove.
6341 (c_common_get_alias_set): Remove unreachable code.
6342 * c-opts.c (c_common_post_options): Make sure cc1 takes only one file.
6344 2017-04-20 Volker Reichelt <v.reichelt@netcologne.de>
6346 * c.opt (Wextra-semi): New C++ warning flag.
6348 2017-04-20 Jakub Jelinek <jakub@redhat.com>
6351 * c-common.c (complete_array_type): Preserve TYPE_TYPELESS_STORAGE.
6353 2017-04-18 Jakub Jelinek <jakub@redhat.com>
6357 * c-common.c (c_common_type_for_mode): Don't handle
6358 widest_*_literal_type_node here.
6359 c_common_signed_or_unsigned_type): Likewise.
6360 (c_common_nodes_and_builtins): Set widest_*_literal_type_node
6361 to *intTI_type_node or *intDI_type_node depending on whether
6362 TImode is supported by the target or not.
6364 2017-04-10 Martin Liska <mliska@suse.cz>
6367 * c-ubsan.c (ubsan_instrument_shift): Evaluate RHS before
6368 doing an UBSAN check.
6370 2017-04-03 Jonathan Wakely <jwakely@redhat.com>
6372 * c-warn.c (do_warn_double_promotion): Fix typo in comment.
6374 2017-03-31 Jakub Jelinek <jakub@redhat.com>
6377 * c-ubsan.h (ubsan_maybe_instrument_reference): Change argument to
6379 * c-ubsan.c (ubsan_maybe_instrument_reference): Likewise. Handle
6380 not just NOP_EXPR to REFERENCE_TYPE, but also INTEGER_CST with
6383 2017-03-31 David Malcolm <dmalcolm@redhat.com>
6385 PR documentation/78732
6386 * c.opt (Wendif-labels): Fix description to refer to
6387 #else rather than #elif.
6389 2017-03-31 Jakub Jelinek <jakub@redhat.com>
6392 * c-common.h (enum rid): Add RID_IS_AGGREGATE.
6393 * c-common.c (c_common_reswords): Add __is_aggregate trait.
6395 2017-03-27 Jakub Jelinek <jakub@redhat.com>
6398 * c-common.c (c_common_mark_addressable_vec): Don't set
6399 TREE_ADDRESSABLE on DECL_HARD_REGISTER.
6401 2017-03-21 Martin Sebor <msebor@redhat.com>
6404 * c-common.c (set_underlying_type): Mark type used only when
6405 original del is declared unused.
6407 2017-03-10 David Malcolm <dmalcolm@redhat.com>
6409 PR translation/79848
6410 * c-format.c (check_format_string): Simplify uses of "%<%s%>" to
6413 2017-03-10 David Malcolm <dmalcolm@redhat.com>
6416 * c-indentation.c (warn_for_misleading_indentation): Remove parens
6417 from inform's message, so that xgettext can locate it.
6419 2017-03-09 Marek Polacek <polacek@redhat.com>
6423 * c-attribs.c (handle_nonnull_attribute): Save the result of default
6424 conversion to the attribute list.
6426 2017-03-09 Martin Liska <mliska@suse.cz>
6428 * c-ada-spec.c (macro_length): Increment value instead of a pointer.
6430 2017-03-03 Jason Merrill <jason@redhat.com>
6432 * c.opt (Wnoexcept-type): New.
6434 2017-03-02 Richard Biener <rguenther@suse.de>
6437 * c-common.c (c_common_mark_addressable_vec): Look through
6440 2017-02-28 Martin Liska <mliska@suse.cz>
6442 * c.opt: Replace space with tabular for options of <number>
6445 2017-02-28 Martin Liska <mliska@suse.cz>
6447 * c.opt: Fix --help=option -Q for options which are of
6450 2017-02-24 Jakub Jelinek <jakub@redhat.com>
6453 * c-common.c (check_function_restrict): New function.
6454 (check_function_arguments): Add FNDECL argument. Call
6455 check_function_restrict if -Wrestrict.
6456 * c-warn.c (warn_for_restrict): Remove ARGS argument, add ARGARRAY
6457 and NARGS. Use auto_vec for ARG_POSITIONS, simplify.
6458 * c-common.h (check_function_arguments): Add FNDECL argument.
6459 (warn_for_restrict): Remove ARGS argument, add ARGARRAY and NARGS.
6461 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
6463 * c-ada-spec.c (dump_ada_function_declaration): Add comment about the
6464 treatment of parameters with pointer-to-tagged type and tidy up.
6465 (print_ada_methods): Remove the special treatment of C++ static member
6468 2017-02-22 Martin Liska <mliska@suse.cz>
6470 * c.opt: Replace inequality signs with square brackets
6473 2017-02-21 Jakub Jelinek <jakub@redhat.com>
6476 * c-attribs.c (handle_mode_attribute): Use build_qualified_type to
6479 2017-02-17 Joseph Myers <joseph@codesourcery.com>
6481 * c-cppbuiltin.c (builtin_define_float_constants): Define
6482 __DECIMAL_DIG__ to the value for long double.
6484 2017-02-15 Marek Polacek <polacek@redhat.com>
6487 * c-warn.c (do_warn_double_promotion): Don't warn if an invalid
6488 conversion has occured.
6490 2017-01-24 David Malcolm <dmalcolm@redhat.com>
6492 * c-common.c (c_common_reswords): Add "__RTL".
6493 * c-common.h (enum rid): Add RID_RTL.
6495 2017-01-20 Marek Polacek <polacek@redhat.com>
6498 * c-common.h (do_warn_duplicated_branches_r): Declare.
6499 * c-gimplify.c (c_genericize): Walk the function tree calling
6500 do_warn_duplicated_branches_r.
6501 * c-warn.c (expr_from_macro_expansion_r): New.
6502 (do_warn_duplicated_branches): New.
6503 (do_warn_duplicated_branches_r): New.
6504 * c.opt (Wduplicated-branches): New option.
6506 2017-01-17 David Malcolm <dmalcolm@redhat.com>
6509 * c-indentation.c (warn_for_misleading_indentation): Use the past
6510 subjunctive in the note.
6512 2017-01-17 Aldy Hernandez <aldyh@redhat.com>
6515 * array-notation-common.c (cilkplus_extract_an_triplets): Convert
6516 start type to integer_type.
6518 2017-01-16 Jakub Jelinek <jakub@redhat.com>
6521 * c.opt (gen-decls): Add Driver flag.
6523 2017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
6526 2017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
6529 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
6531 2017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
6534 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
6536 2017-01-12 Martin Sebor <msebor@redhat.com>
6538 (-Wformat-overflow): ...to this.
6540 2017-01-11 Martin Sebor <msebor@redhat.com>
6543 * c.opt (-Walloca-larger-than, -Wformat-length, -Wformat-truncation):
6544 Also enable for LTO.
6546 2017-01-10 Jason Merrill <jason@redhat.com>
6548 Implement P0195R2, C++17 variadic using.
6549 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_variadic_using.
6551 2017-01-09 Jakub Jelinek <jakub@redhat.com>
6553 PR translation/79019
6554 PR translation/79020
6555 * c.opt (Wnormalized=): Fix typo in description.
6557 2017-01-08 Martin Sebor <msebor@redhat.com>
6560 * c.opt (-Wformat-truncation): New option.
6562 2017-01-06 Alexandre Oliva <aoliva@redhat.com>
6564 * c-pretty-print.c (pp_c_tree_decl_identifier): Convert 16-bit
6565 value to unsigned short to fit in 4 hex digits without
6568 2017-01-05 Eric Botcazou <ebotcazou@adacore.com>
6570 * c.opt (fsso-struct): Add 'native' value.
6572 2017-01-05 Martin Liska <mliska@suse.cz>
6575 * c-opts.c (c_common_post_options): Reject '-' filename for a precompiled
6578 2017-01-04 Marek Polacek <polacek@redhat.com>
6581 * c.opt (Wpointer-compare): New option.
6583 2017-01-04 Jakub Jelinek <jakub@redhat.com>
6586 * c.opt (fsso-struct=): Add RejectNegative.
6588 2017-01-01 Jakub Jelinek <jakub@redhat.com>
6590 Update copyright years.
6592 2016-12-29 Martin Liska <mliska@suse.cz>
6595 * c.opt (strong-eval-order): Add RejectNegative keyword.
6597 2016-12-22 Jason Merrill <jason@redhat.com>
6599 Implement P0522R0, matching of template template arguments.
6600 * c-cppbuiltin.c (c_cpp_builtins): Define
6601 __cpp_template_template_args.
6603 2016-12-21 Jakub Jelinek <jakub@redhat.com>
6606 * c-common.c (struct nonnull_arg_ctx): New type.
6607 (check_function_nonnull): Return bool instead of void. Use
6608 nonnull_arg_ctx as context rather than just location_t.
6609 (check_nonnull_arg): Adjust for the new context type, set
6610 warned_p to true if a warning has been diagnosed.
6611 (check_function_arguments): Return bool instead of void.
6612 * c-common.h (check_function_arguments): Adjust prototype.
6614 2016-12-21 Jason Merrill <jason@redhat.com>
6616 * c.opt (-fnew-ttp-matching): New flag.
6617 * c-opts.c (c_common_post_options): Default on if -std=c++1z.
6619 2016-12-14 Martin Jambor <mjambor@suse.cz>
6621 * c-omp.c: Include omp-general.h instead of omp-low.h.
6622 (c_finish_oacc_wait): Adjusted call to find_omp_clause to use its new
6625 2016-12-14 Martin Sebor <msebor@redhat.com>
6628 * c-common.c (check_nonnull_arg): Disable when optimization
6631 2016-12-12 Marek Polacek <polacek@redhat.com>
6634 * c-common.c (attribute_fallthrough_p): Return false for
6637 2016-12-08 Martin Sebor <msebor@redhat.com>
6640 * c.opt (-Walloc-zero, -Walloc-size-larger-than): New options.
6642 2016-12-08 Martin Sebor <msebor@redhat.com>
6645 * c-pretty-print (pp_c_integer_constant): Avoid formatting type
6648 2016-12-07 Martin Sebor <msebor@redhat.com>
6654 * c.opt (-Wstringop-overflow): New option.
6656 2016-12-02 Maxim Ostapenko <m.ostapenko@samsung.com>
6658 * c-attribs.c (asan odr indicator): New attribute.
6659 (handle_asan_odr_indicator_attribute): New function.
6661 2016-11-26 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
6663 * c-common.c (c_common_nodes_and_builtins): Remove initialization of
6666 2016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
6668 * c-common.c (excess_precision_mode_join): New.
6669 (c_ts18661_flt_eval_method): New.
6670 (c_c11_flt_eval_method): Likewise.
6671 (c_flt_eval_method): Likewise.
6672 * c-common.h (excess_precision_mode_join): New.
6673 (c_flt_eval_method): Likewise.
6674 * c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): New.
6675 (cpp_iec_559_value): Call it.
6676 (c_cpp_builtins): Modify logic for __LIBGCC_*_EXCESS_PRECISION__,
6677 call c_flt_eval_method to set __FLT_EVAL_METHOD__ and
6678 __FLT_EVAL_METHOD_TS_18661_3__.
6680 2016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
6682 * c-opts.c (c_common_post_options): Add logic to handle the default
6683 case for -fpermitted-flt-eval-methods.
6685 2016-11-23 Paolo Bonzini <bonzini@gnu.org>
6687 * c.opt (Wexpansion-to-defined): New.
6689 2016-11-23 Jakub Jelinek <jakub@redhat.com>
6692 * c-pragma.c (handle_pragma_target): Don't replace
6693 current_target_pragma, but chainon the new args to the current one.
6695 2016-11-22 Nathan Sidwell <nathan@acm.org>
6697 * array-notation-common.c (cilkplus_extract_an_trplets): Fix
6698 indentation and formatting.
6700 2016-11-21 Martin Sebor <msebor@redhat.com>
6702 * c.opt (-fprintf-return-value): Enable by default.
6704 2016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
6707 * c.opt (-Wbuiltin-declaration-mismatch): New warning.
6708 * c-common.c (c_common_nodes_and_builtins): Initialize
6709 const_tm_ptr_type_node.
6711 2016-11-16 Marek Polacek <polacek@redhat.com>
6714 * c-common.c (c_add_case_label): Turn error_at calls into inform.
6716 2016-11-14 Jakub Jelinek <jakub@redhat.com>
6718 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_structured_bindings.
6720 2016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
6721 Richard Biener <rguenther@suse.de>
6723 * c-common.h (c_common_resword): Add RID_GIMPLE, RID_PHI types.
6724 * c-common.h (enum rid): Add RID_GIMPLE, RID_PHI.
6725 * c.opt (fgimple): New option.
6727 2016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
6730 * c-common.h (warn_for_restrict): Declare.
6731 * c-warn.c: Include gcc-rich-location.h.
6732 (warn_for_restrict): New function.
6733 * c-format.c (gcc_tdiag_char_table): Add entry for "Z" specifier.
6734 (gcc_cdiag_char_table): Likewise.
6735 (gcc_cxxdiag_char_table): Likewise.
6736 * c.opt (Wrestrict): New option.
6738 2016-11-13 Eric Botcazou <ebotcazou@adacore.com>
6740 * c-ada-spec.c (print_ada_declaration): For typedef declarations, look
6741 for nested types only if the type is a record or union and dump SLOC.
6743 2016-11-09 Jason Merrill <jason@redhat.com>
6745 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_template_auto.
6747 2016-11-09 Jakub Jelinek <jakub@redhat.com>
6749 * c-ubsan.c (ubsan_instrument_shift): Handle split
6750 -fsanitize=shift-base and -fsanitize=shift-exponent.
6752 2016-11-07 Jason Merrill <jason@redhat.com>
6754 * c.opt (Wc++1z-compat): New.
6755 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_noexcept_function_type.
6757 2016-11-07 Martin Liska <mliska@suse.cz>
6759 * c-warn.c (warn_for_unused_label): Save all labels used
6760 in goto or in &label.
6762 2016-11-03 Jason Merrill <jason@redhat.com>
6764 * c-cppbuiltin.c (c_cpp_builtins): Correct
6765 __cpp_inheriting_constructors.
6767 2016-11-01 Jason Merrill <jason@redhat.com>
6769 * c-cppbuiltin.c (c_cpp_builtins): Update
6770 __cpp_inheriting_constructors.
6772 * c.opt (-fnew-inheriting-ctors): New.
6773 * c-opts.c: Default to on for ABI 11+.
6775 2016-10-31 Jakub Jelinek <jakub@redhat.com>
6778 * c.opt (fext-numeric-literals): Add Var and Init.
6779 * c-opts.c (c_common_handle_option): Don't clear
6780 cpp_opts->ext_numeric_literals for -std=c++{11,14,1z}.
6781 (c_common_post_options): Clear it here if not set
6784 2016-10-28 Aldy Hernandez <aldyh@redhat.com>
6787 * c-pretty-print.c (simple_type_specifier): Do not dereference `t'
6790 2016-10-25 Jakub Jelinek <jakub@redhat.com>
6792 * c-common.h (enum rid): Add RID_BUILTIN_LAUNDER.
6793 * c-common.c (c_common_reswords): Add __builtin_launder.
6795 2016-10-24 Bernd Edlinger <bernd.edlinger@hotmail.de>
6797 * c-common.c (c_common_truthvalue_conversion): Warn for
6798 multiplications in boolean context. Fix the quoting of '<<' and '<'
6799 in the shift warning.
6801 2016-10-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
6803 * c-common.c (c_common_truthvalue_conversion): Fix the comment.
6805 2016-10-20 Jason Merrill <jason@redhat.com>
6807 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_concepts value.
6809 2016-10-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
6811 * c-common.c (c_common_truthvalue_conversion): Warn only for signed
6812 integer shift ops in boolean context.
6814 2016-10-18 Aldy Hernandez <aldyh@redhat.com>
6816 * c.opt (Walloca): New.
6817 (Walloca-larger-than=): New.
6818 (Wvla-larger-than=): New.
6820 2016-10-17 Marek Polacek <polacek@redhat.com>
6822 * c-warn.c (find_array_ref_with_const_idx_r): Remove parameter names.
6823 Return immediately when finding a match.
6824 (warn_tautological_cmp): Remove a boolean variable that is no longer
6827 2016-10-17 Marek Polacek <polacek@redhat.com>
6829 * c-attribs.c: New file.
6830 * c-common.c: Move attributes handling to c-attribs.c.
6831 (get_nonnull_operand): No longer static.
6832 * c-common.h: Move the declarations from c-attribs.c to its own section.
6834 2016-10-14 Jason Merrill <jason@redhat.com>
6836 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_aggregate_bases
6837 and __cpp_deduction_guides.
6839 2016-10-13 Jason Merrill <jason@redhat.com>
6841 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_inline_variables.
6843 2016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
6845 * c-cppbuiltin.c: Include memmodel.h.
6846 * c-opts.c: Likewise.
6847 * c-pragma.c: Likewise.
6848 * c-warn.c: Likewise.
6850 2016-10-12 Jakub Jelinek <jakub@redhat.com>
6852 * c.opt (Wextra): Add as C/C++/ObjC/ObjC++ option.
6853 (Wimplicit-fallthrough=): Enable for these languages by -Wextra.
6854 * c-opts.c (sanitize_cpp_opts): Initialize
6855 cpp_opts->cpp_warn_implicit_fallthrough.
6857 2016-10-11 Marek Polacek <polacek@redhat.com>
6859 * c-common.c (warning_candidate_p): Change the return type to bool
6860 and return true/false instead of 1/0.
6861 (vector_mode_valid_p): Likewise.
6863 2016-10-11 Marek Polacek <polacek@redhat.com>
6865 * c-common.c (fold_for_warn): No longer static.
6866 (bool_promoted_to_int_p): Likewise.
6867 (c_common_get_narrower): Likewise.
6868 (constant_expression_warning): Move to c-warn.c.
6869 (constant_expression_error): Likewise.
6870 (overflow_warning): Likewise.
6871 (warn_logical_operator): Likewise.
6872 (find_array_ref_with_const_idx_r): Likewise.
6873 (warn_tautological_cmp): Likewise.
6874 (expr_has_boolean_operands_p): Likewise.
6875 (warn_logical_not_parentheses): Likewise.
6876 (warn_if_unused_value): Likewise.
6877 (strict_aliasing_warning): Likewise.
6878 (sizeof_pointer_memaccess_warning): Likewise.
6879 (check_main_parameter_types): Likewise.
6880 (conversion_warning): Likewise.
6881 (warnings_for_convert_and_check): Likewise.
6882 (match_case_to_enum_1): Likewise.
6883 (match_case_to_enum): Likewise.
6884 (c_do_switch_warnings): Likewise.
6885 (warn_for_omitted_condop): Likewise.
6886 (readonly_error): Likewise.
6887 (lvalue_error): Likewise.
6888 (invalid_indirection_error): Likewise.
6889 (warn_array_subscript_with_type_char): Likewise.
6890 (warn_about_parentheses): Likewise.
6891 (warn_for_unused_label): Likewise.
6892 (warn_for_div_by_zero): Likewise.
6893 (warn_for_memset): Likewise.
6894 (warn_for_sign_compare): Likewise.
6895 (do_warn_double_promotion): Likewise.
6896 (do_warn_unused_parameter): Likewise.
6897 (record_locally_defined_typedef): Likewise.
6898 (maybe_record_typedef_use): Likewise.
6899 (maybe_warn_unused_local_typedefs): Likewise.
6900 (maybe_warn_bool_compare): Likewise.
6901 (maybe_warn_shift_overflow): Likewise.
6902 (warn_duplicated_cond_add_or_warn): Likewise.
6903 (diagnose_mismatched_attributes): Likewise.
6904 * c-common.h: Move the declarations from c-warn.c to its own section.
6905 * c-warn.c: New file.
6907 2016-10-08 Jason Merrill <jason@redhat.com>
6909 * c-common.c (c_common_truthvalue_conversion): Don't distribute
6910 into COND_EXPR in C++.
6912 2016-10-08 Jakub Jelinek <jakub@redhat.com>
6914 * c-lex.c (c_lex_with_flags) <case CPP_COMMENT>: For CPP_COMMENT
6915 token with PREV_FALLTHROUGH, skip all following CPP_PADDING and
6916 CPP_COMMENT tokens and set add_flags to PREV_FALLTHROUGH afterwards.
6918 2016-10-07 Jakub Jelinek <jakub@redhat.com>
6920 Implement LWG2296 helper intrinsic
6921 * c-common.h (enum rid): Add RID_ADDRESSOF.
6922 * c-common.c (c_common_reswords): Add __builtin_addressof.
6924 2016-10-07 Bernd Edlinger <bernd.edlinger@hotmail.de>
6927 * c-common.c (c_common_truthvalue_conversion): Warn also for
6928 suspicious enum values in boolean context.
6930 2016-10-06 Jakub Jelinek <jakub@redhat.com>
6932 Implement P0258R2 - helper for C++17
6933 std::has_unique_object_representations trait
6934 * c-common.h (enum rid): Add RID_HAS_UNIQUE_OBJ_REPRESENTATIONS.
6935 * c-common.c (c_common_reswords): Add
6936 __has_unique_object_representations.
6938 2016-10-05 Jakub Jelinek <jakub@redhat.com>
6941 * c-ubsan.c (ubsan_instrument_return): Don't call
6942 initialize_sanitizer_builtins here.
6944 2016-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
6946 * c-common.c (c_common_truthvalue_conversion): Warn also for suspicious
6947 conditional expression in boolean context when only one arm is
6950 2016-10-05 Jakub Jelinek <jakub@redhat.com>
6953 * c-ubsan.c (ubsan_instrument_shift): Return NULL_TREE if type0
6956 * c-common.c (c_common_reswords): Update comment for C++11.
6958 2016-10-04 Jason Merrill <jason@redhat.com>
6960 * c-common.c (make_tree_vector_from_ctor): New.
6961 * c-common.h: Declare it.
6963 2016-10-04 Jakub Jelinek <jakub@redhat.com>
6965 * c-cppbuiltin.c (c_cpp_builtins): Don't define
6966 __LIBGCC_JCR_SECTION_NAME__.
6968 2016-10-03 Bernd Edlinger <bernd.edlinger@hotmail.de>
6970 * c-common.c (c_common_truthvalue_conversion): Warn for suspicious
6971 left shift in boolean context.
6973 2016-09-29 Jakub Jelinek <jakub@redhat.com>
6975 Implement P0001R1 - C++17 removal of register storage class specifier
6976 * c.opt (Wregister): New warning.
6977 * c-opts.c (c_common_post_options): Enable -Wregister by
6980 2016-09-29 James Greenhalgh <james.greenhalgh@arm.com>
6982 * c-opts.c (c_common_post_options): Remove special case for
6983 TARGET_FLT_EVAL_METHOD_NON_DEFAULT with -fexcess-precision=standard
6986 2016-09-27 Jakub Jelinek <jakub@redhat.com>
6988 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_capture_star_this for
6991 * c-ada-spec.c (print_ada_declaration): Remove break after return.
6993 2016-09-26 Thomas Preud'homme <thomas.preudhomme@arm.com>
6995 * c-common.c: Include memmodel.h.
6997 2016-09-26 Marek Polacek <polacek@redhat.com>
6999 * c-lex.c (c_common_has_attribute): Handle attribute fallthrough.
7001 2016-09-26 Marek Polacek <polacek@redhat.com>
7004 * c-common.c (c_common_attribute_table): Add fallthrough attribute.
7005 (handle_fallthrough_attribute): New function.
7006 (attribute_fallthrough_p): New function.
7007 * c-common.h (attribute_fallthrough_p): Declare.
7009 2016-09-24 Marek Polacek <polacek@redhat.com>
7012 * c.opt (Wbool-operation): New.
7014 2016-09-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
7016 * c-common.c (c_common_truthvalue_conversion): Inhibit
7017 Wint-in-bool-context warning with from_macro_definition_at.
7018 Mention the expression will always evaluate to true.
7020 2016-09-21 Martin Sebor <msebor@redhat.com>
7023 * c.opt (fprintf-return-value): Temporarily initialize to zero
7024 to unblock bootstrap failures.
7026 2016-09-21 Jakub Jelinek <jakub@redhat.com>
7029 * c.opt (Waligned-new=): Add RejectNegative.
7030 (faligned-new=): Likewise. Spelling fix - change
7031 aligned_new_threshhold to aligned_new_threshold.
7032 * c-cppbuiltin.c (c_cpp_builtins): Change aligned_new_threshhold
7033 to aligned_new_threshold.
7035 2016-09-20 Martin Sebor <msebor@redhat.com>
7038 * c.opt: Add -Wformat-length and -fprintf-return-value.
7040 2016-09-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
7043 * c.opt (Wint-in-bool-context): New warning.
7044 * c-common.c (c_common_truthvalue_conversion): Warn on integer
7045 constants in boolean context.
7047 2016-09-19 Joseph Myers <joseph@codesourcery.com>
7049 * c-common.c (max_align_t_align): Also consider alignment of
7052 2016-09-15 Jason Merrill <jason@redhat.com>
7054 * c-common.c (check_cxx_fundamental_alignment_constraints): Check
7057 2016-09-14 Jason Merrill <jason@redhat.com>
7059 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
7060 limit FIELD_DECL, either.
7062 2016-09-14 Marek Polacek <polacek@redhat.com>
7064 * c-common.c (c_common_truthvalue_conversion): Use false instead of 0.
7065 * c-common.h (build_unary_op): Change nonconvert parameter type to bool.
7066 * c-omp.c (c_finish_omp_atomic): Use false instead of 0.
7068 2016-09-13 David Malcolm <dmalcolm@redhat.com>
7070 * c-common.c (warn_logical_not_parentheses): Replace
7071 rich_location::add_fixit_insert calls with add_fixit_insert_before
7072 and add_fixit_insert_after, eliminating the "next_loc" calculation.
7074 2016-09-13 Jason Merrill <jason@redhat.com>
7075 Tom de Vries <tom@codesourcery.com>
7078 * c-common.c (set_underlying_type): Don't treat array as builtin type.
7080 2016-09-13 Jason Merrill <jason@redhat.com>
7082 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
7085 2016-09-12 Jason Merrill <jason@redhat.com>
7087 * c-common.c (check_cxx_fundamental_alignment_constraints): Fix
7088 bit/byte confusion, allow large alignment for types.
7090 2016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
7093 * c-common.c (warn_for_omitted_condop): Also warn for boolean data.
7095 2016-09-12 David Malcolm <dmalcolm@redhat.com>
7098 * c-format.c (argument_parser::check_argument_type): Add params
7099 "type_start" and "conversion_char". Use the former to generate
7100 offset_to_type_start and pass it and conversion_char to
7102 (check_format_info_main): Capture the start of the type
7103 information as "type_start", and pass it an format_char
7104 to arg_parser.check_argument_type.
7105 (check_format_types): Provide an example in the leading comment.
7106 Add params "offset_to_type_start" and "conversion_char"; pass
7107 them to format_type_warning calls.
7108 (test_get_modifier_for_format_len): Likewise.
7109 (matching_type_p): New function.
7110 (get_format_for_type): Add param "conversion_char" and move
7111 implementation into...
7112 (get_format_for_type_1): ...new function, called twice.
7113 Use new function matching_type_p rather than checking for
7114 TYPE_CANONICAL equality.
7115 (get_corrected_substring): New function.
7116 (format_type_warning): Provide an example in the leading comment.
7117 Add params "offset_to_type_start" and "conversion_char". Replace
7118 call to get_format_for_type with call to get_corrected_substring
7119 and move rejection of hints for widths/precisions there.
7120 (assert_format_for_type_streq): Add param "conversion_char".
7121 (ASSERT_FORMAT_FOR_TYPE_STREQ): Add param CONVERSION_CHAR.
7122 (test_get_format_for_type_printf): Add conversion chars to the
7123 tests, adding coverage for various combinations of integer
7124 vs double conversions, and for preserving octal and hexadecimal
7126 (test_get_format_for_type_scanf): Add conversion chars to the
7129 2016-09-10 Tom de Vries <tom@codesourcery.com>
7132 * c-common.c (build_va_arg): Handle more strict
7133 targetm.canonical_va_list_type. Replace first argument type error with
7136 2016-09-09 Martin Sebor <msebor@redhat.com>
7140 * c-format.c (argument_parser::find_format_char_info): Use %qc
7141 format directive unconditionally.
7143 2016-09-09 Jason Merrill <jason@redhat.com>
7145 Implement C++17 new of over-aligned types.
7146 * c.opt: Add -faligned-new and -Waligned-new.
7147 * c-common.c (max_align_t_align): Split out from...
7148 (cxx_fundamental_alignment_p): ...here.
7149 * c-common.h: Declare it.
7150 * c-cppbuiltin.c (c_cpp_builtins): Handle aligned new.
7152 2016-09-09 Joseph Myers <joseph@codesourcery.com>
7154 * c-cppbuiltin.c (builtin_define_type_width): New function.
7155 (builtin_define_stdint_macros, c_cpp_builtins): Define type width
7158 2016-09-07 David Malcolm <dmalcolm@redhat.com>
7160 * c-common.c (get_cpp_ttype_from_string_type): Handle being passed
7162 (substring_loc::get_location): Move to substring-locations.c,
7163 keeping implementation as...
7164 (c_get_substring_location): New function, from the above, reworked
7165 to use accessors rather than member lookup.
7166 * c-common.h (class substring_loc): Move to substring-locations.h,
7167 replacing with a forward decl.
7168 (c_get_substring_location): New decl.
7169 * c-format.c: Include "substring-locations.h".
7170 (format_warning_va): Move to substring-locations.c.
7171 (format_warning_at_substring): Likewise.
7173 2016-09-06 Martin Sebor <msebor@redhat.com>
7176 * c-format.c (check_function_format): Avoid issuing warnings for
7177 functions unless they call format functions with non-constant
7180 2016-09-06 Richard Biener <rguenther@suse.de>
7183 * c-common.c (c_common_mark_addressable_vec): Handle
7184 COMPOUND_LITERAL_EXPR.
7186 2016-09-05 Marek Polacek <polacek@redhat.com>
7189 * c-common.c (bool_promoted_to_int_p): New function.
7190 (expr_has_boolean_operands_p): New function.
7191 (warn_logical_not_parentheses): Return if expr_has_boolean_operands_p.
7192 (maybe_warn_bool_compare): Use bool_promoted_to_int_p.
7194 2016-09-04 Tom de Vries <tom@codesourcery.com>
7197 2016-08-29 Tom de Vries <tom@codesourcery.com>
7199 * c-common.c (build_va_arg): Replace first argument type error
7202 2016-09-02 Jakub Jelinek <jakub@redhat.com>
7205 * c-omp.c (c_finish_omp_atomic): Reject _Atomic qualified expressions.
7206 (c_finish_omp_for): Reject _Atomic qualified iterators.
7208 2016-09-01 Martin Sebor <msebor@redhat.com>
7210 * c-ada-spec.c (dump_ada_function_declaration): Increase buffer
7211 size to guarantee it fits the output of the formatted function
7212 regardless of its arguments.
7214 2016-09-01 Marek Polacek <polacek@redhat.com>
7217 * c-common.c (resolve_overloaded_builtin): Fix formatting. Add
7220 2016-08-29 Marek Polacek <polacek@redhat.com>
7223 * c-common.c (warn_logical_not_parentheses): Don't warn for
7224 a comparison or a logical operator.
7226 2016-08-29 Tom de Vries <tom@codesourcery.com>
7228 * c-common.c (build_va_arg): Fix type comparison assert.
7230 2016-08-29 Tom de Vries <tom@codesourcery.com>
7232 * c-common.c (build_va_arg): Replace first argument type error
7235 2016-08-29 Tom de Vries <tom@codesourcery.com>
7238 * c-common.c (build_va_arg): Add first argument error. Build va_arg
7239 with error_mark_node as va_list instead of with illegal va_list.
7241 2016-08-25 Marek Polacek <polacek@redhat.com>
7242 David Malcolm <dmalcolm@redhat.com>
7244 * c-common.c (warn_logical_not_parentheses): Print fixit hints.
7245 * c-common.h (warn_logical_not_parentheses): Update declaration.
7247 2016-08-22 Marek Polacek <polacek@redhat.com>
7250 * c-common.c (warn_for_memset): Check type for null.
7252 2016-08-22 Joseph Myers <joseph@codesourcery.com>
7254 * c-cppbuiltin.c (c_cpp_builtins): Check _FloatN and
7255 _FloatNx types for suffixes for built-in functions.
7257 2016-08-19 Joseph Myers <joseph@codesourcery.com>
7260 * c-common.h (RID_FLOAT16, RID_FLOATN_NX_FIRST, RID_FLOAT32)
7261 (RID_FLOAT64, RID_FLOAT128, RID_FLOAT32X, RID_FLOAT64X)
7262 (RID_FLOAT128X): New enum rid values.
7263 (CASE_RID_FLOATN_NX): New macro.
7264 * c-common.c (c_common_reswords): Add _FloatN and _FloatNx
7266 (c_common_type_for_mode): Check for _FloatN and _FloatNx and
7267 corresponding complex types.
7268 (c_common_nodes_and_builtins): For non-C++, register _FloatN and
7269 _FloatNx and corresponding complex types.
7270 (keyword_begins_type_specifier): Use CASE_RID_FLOATN_NX.
7271 * c-cppbuiltin.c (builtin_define_float_constants): Check _FloatN
7272 and _FloatNx types for the widest type for determining
7273 DECIMAL_DIG. Define __LDBL_DECIMAL_DIG__ as well as
7274 __DECIMAL_DIG__ for long double. Handle FMA_SUFFIX being NULL.
7275 (c_cpp_builtins): Call builtin_define_float_constants for _FloatN
7277 * c-lex.c (interpret_float): Handle _FloatN and _FloatNx
7279 * c-pretty-print.c (pp_c_floating_constant): Handle _FloatN and
7282 2016-08-18 David Malcolm <dmalcolm@redhat.com>
7284 * c-opts.c (c_diagnostic_finalizer): Update for change to
7285 diagnostic_show_locus.
7287 2016-08-18 David Malcolm <dmalcolm@redhat.com>
7289 * c-common.c: Include "spellcheck.h".
7290 (cb_get_suggestion): New function.
7291 * c-common.h (cb_get_suggestion): New decl.
7292 * c-lex.c (init_c_lex): Initialize cb->get_suggestion to
7295 2016-08-18 Marek Polacek <polacek@redhat.com>
7298 * c-common.c (get_atomic_generic_size): Disallow pointer-to-function
7301 2016-08-16 David Malcolm <dmalcolm@redhat.com>
7304 * c-common.c (substring_loc::get_range): Rename to...
7305 (substring_loc::get_location): ...this, converting param from a
7306 source_range * to a location_t *. Call
7307 get_source_location_for_substring rather than
7308 get_source_range_for_substring, and pass in m_caret_idx.
7309 * c-common.h (substring_loc::substring_loc): Add param "caret_idx".
7310 (substring_loc::get_range): Replace with...
7311 (substring_loc::get_location): ...this.
7312 (substring_loc::set_caret_index): New method.
7313 (substring_loc): Add field m_caret_idx.
7314 * c-format.c (format_warning_va): Update for above changes.
7315 Rename local "substring_loc" to "fmt_substring_loc" to avoid
7316 clashing with type name.
7317 (format_warning_at_char): Add caret_idx param to substring_loc ctor.
7318 (check_argument_type): Likewise.
7319 (format_type_warning): Rename param "fmt_loc" to "whole_fmt_loc"
7320 Use a copy when emitting warnings, setting the caret index from TYPE.
7322 2016-08-16 Eric Botcazou <ebotcazou@adacore.com>
7323 Arnaud Charlet <charlet@adacore.com>
7325 * c-ada-spec.c (dump_number): New function.
7326 (handle_escape_character): Likewise.
7327 (print_ada_macros): Add handling of constant integers and strings.
7329 2016-08-12 Marek Polacek <polacek@redhat.com>
7332 * c-common.c (scalar_to_vector): Adjust fall through comment.
7333 * c-opts.c (c_common_handle_option): Likewise.
7334 * c-pragma.c (handle_pragma_pack): Add FALLTHRU.
7335 * c-pretty-print.c (c_pretty_printer::postfix_expression): Adjust
7336 fall through comment.
7337 * cilk.c (extract_free_variables): Add FALLTHRU.
7339 2016-08-10 Jason Merrill <jason@redhat.com>
7341 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_if_constexpr.
7343 2016-08-09 Jason Merrill <jason@redhat.com>
7345 * c-common.c (c_common_attribute_table): vector_size affects type
7348 2016-08-09 Marek Polacek <polacek@redhat.com>
7351 * c-ada-spec.c (dump_generic_ada_node): Add return.
7353 2016-08-09 Jason Merrill <jason@redhat.com>
7355 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_constexpr for
7356 C++17 constexpr lambdas.
7358 2016-08-08 David Malcolm <dmalcolm@redhat.com>
7361 * c-common.h (selftest::c_format_c_tests): New declaration.
7362 (selftest::run_c_tests): New declaration.
7363 * c-format.c: Include "selftest.h.
7364 (format_warning_va): Add param "corrected_substring" and use
7365 it to add a replacement fix-it hint.
7366 (format_warning_at_substring): Likewise.
7367 (format_warning_at_char): Update for new param of
7369 (argument_parser::check_argument_type): Pass "fki" to
7371 (check_format_types): Add param "fki" and pass it to
7372 format_type_warning.
7373 (deref_n_times): New function.
7374 (get_modifier_for_format_len): New function.
7375 (selftest::test_get_modifier_for_format_len): New function.
7376 (get_format_for_type): New function.
7377 (format_type_warning): Add param "fki" and use it to attempt
7378 to provide hints for argument types when calling
7379 format_warning_at_substring.
7380 (selftest::get_info): New function.
7381 (selftest::assert_format_for_type_streq): New function.
7382 (ASSERT_FORMAT_FOR_TYPE_STREQ): New macro.
7383 (selftest::test_get_format_for_type_printf): New function.
7384 (selftest::test_get_format_for_type_scanf): New function.
7385 (selftest::c_format_c_tests): New function.
7387 2016-08-08 David Malcolm <dmalcolm@redhat.com>
7390 * c-format.c: Include "diagnostic.h".
7391 (location_column_from_byte_offset): Delete.
7392 (location_from_offset): Delete.
7393 (format_warning_va): New function.
7394 (format_warning_at_substring): New function.
7395 (format_warning_at_char): New function.
7396 (check_format_arg): Capture location of format_tree and pass to
7397 check_format_info_main.
7398 (argument_parser): Add fields "start_of_this_format" and
7399 "format_string_cst".
7400 (flag_chars_t::validate): Add param "format_string_cst". Convert
7401 warning_at call using location_from_offset to call to
7402 format_warning_at_char.
7403 (argument_parser::argument_parser): Add param "format_string_cst_"
7404 and use use it to initialize field "format_string_cst".
7405 Initialize new field "start_of_this_format".
7406 (argument_parser::read_format_flags): Convert warning_at call
7407 using location_from_offset to a call to format_warning_at_char.
7408 (argument_parser::read_any_format_left_precision): Likewise.
7409 (argument_parser::read_any_format_precision): Likewise.
7410 (argument_parser::read_any_other_modifier): Likewise.
7411 (argument_parser::find_format_char_info): Likewise, in three places.
7412 (argument_parser::parse_any_scan_set): Likewise, in one place.
7413 (argument_parser::handle_conversions): Likewise, in two places.
7414 (argument_parser::check_argument_type): Add param "fmt_param_loc"
7415 and use it to make a substring_loc. Pass the latter to
7417 (check_format_info_main): Add params "fmt_param_loc" and
7418 "format_string_cst". Convert warning_at calls using
7419 location_from_offset to calls to format_warning_at_char. Pass the
7420 new params to the arg_parser ctor. Pass "format_string_cst" to
7421 flag_chars.validate. Pass "fmt_param_loc" to
7422 arg_parser.check_argument_type.
7423 (check_format_types): Convert first param from a location_t
7424 to a const substring_loc & and rename to "fmt_loc". Attempt
7425 to extract the range of the relevant parameter and pass it
7426 to format_type_warning.
7427 (format_type_warning): Convert first param from a location_t
7428 to a const substring_loc & and rename to "fmt_loc". Add
7429 params "param_range" and "type". Replace calls to warning_at
7430 with calls to format_warning_at_substring.
7432 2016-08-08 David Malcolm <dmalcolm@redhat.com>
7434 * c-format.c (class flag_chars_t): New class.
7435 (struct length_modifier): New struct.
7436 (class argument_parser): New class.
7437 (flag_chars_t::flag_chars_t): New ctor.
7438 (flag_chars_t::has_char_p): New method.
7439 (flag_chars_t::add_char): New method.
7440 (flag_chars_t::validate): New method.
7441 (flag_chars_t::get_alloc_flag): New method.
7442 (flag_chars_t::assignment_suppression_p): New method.
7443 (argument_parser::argument_parser): New ctor.
7444 (argument_parser::read_any_dollar): New method.
7445 (argument_parser::read_format_flags): New method.
7446 (argument_parser::read_any_format_width): New method.
7447 (argument_parser::read_any_format_left_precision): New method.
7448 (argument_parser::read_any_format_precision): New method.
7449 (argument_parser::handle_alloc_chars): New method.
7450 (argument_parser::read_any_length_modifier): New method.
7451 (argument_parser::read_any_other_modifier): New method.
7452 (argument_parser::find_format_char_info): New method.
7453 (argument_parser::validate_flag_pairs): New method.
7454 (argument_parser::give_y2k_warnings): New method.
7455 (argument_parser::parse_any_scan_set): New method.
7456 (argument_parser::handle_conversions): New method.
7457 (argument_parser::check_argument_type): New method.
7458 (check_format_info_main): Introduce classes argument_parser
7459 and flag_chars_t, moving the code within the loop into methods
7460 of these classes. Make various locals "const".
7462 2016-08-05 David Malcolm <dmalcolm@redhat.com>
7464 * c-common.c: Include "substring-locations.h".
7465 (get_cpp_ttype_from_string_type): New function.
7466 (g_string_concat_db): New global.
7467 (substring_loc::get_range): New method.
7468 * c-common.h (g_string_concat_db): New declaration.
7469 (class substring_loc): New class.
7470 * c-lex.c (lex_string): When concatenating strings, capture the
7471 locations of all tokens using a new obstack, and record the
7472 concatenation locations within g_string_concat_db.
7473 * c-opts.c (c_common_init_options): Construct g_string_concat_db
7476 2016-07-29 Marek Polacek <polacek@redhat.com>
7479 * c-common.c (c_common_truthvalue_conversion): Use LOCATION for the
7480 parentheses warning.
7483 * c-common.c (handle_alloc_align_attribute): Also check FUNCTION_DECL.
7485 2016-07-28 Martin Liska <mliska@suse.cz>
7487 PR gcov-profile/68025
7488 * c-common.c (handle_no_profile_instrument_function_attribute):
7490 2016-07-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
7492 * c-common.c (check_user_alignment): Use LOG2_BITS_PER_UNIT instead of
7495 2016-07-25 Jason Merrill <jason@redhat.com>
7498 * c.opt (fconstexpr-loop-limit): New.
7500 2016-07-22 Martin Sebor <msebor@redhat.com>
7503 * c-common.c (resolve_overloaded_builtin): Avoid converting
7504 __atomic_compare_exchange_n return type to that of what its
7505 first argument points to.
7507 2016-07-22 Uros Bizjak <ubizjak@gmail.com>
7509 * c-common.c: Use HOST_WIDE_INT_M1U instead of
7510 ~(unsigned HOST_WIDE_INT) 0.
7512 2016-07-22 Martin Liska <mliska@suse.cz>
7514 PR gcov-profile/69028
7515 PR gcov-profile/62047
7516 * cilk.c (create_cilk_helper_decl): Set location of a new decl
7517 to the current_function_decl.
7519 2016-07-21 Jason Merrill <jason@redhat.com>
7522 * c-common.c (c_common_truthvalue_conversion): Check
7523 c_inhibit_evaluation_warnings for warning about address of
7526 2016-07-20 David Malcolm <dmalcolm@redhat.com>
7528 * c-common.h (lookup_name_fuzzy): Convert return type from tree to
7531 2016-07-15 Jason Merrill <jason@redhat.com>
7533 * c-opts.c (c_common_post_options): Update -fabi-version default to 11.
7535 2016-07-15 Jakub Jelinek <jakub@redhat.com>
7538 * c-common.h (enum lookup_name_fuzzy_kind): Add
7539 FUZZY_LOOKUP_FUNCTION_NAME.
7541 2016-07-08 Jason Merrill <jason@redhat.com>
7543 P0145: Refining Expression Order for C++.
7544 * c.opts (-fargs-in-order): Rename to -fstrong-eval-order.
7547 2016-07-05 Markus Trippelsdorf <markus@trippelsdorf.de>
7550 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_rvalue_references.
7552 2016-06-29 Thomas Schwinge <thomas@codesourcery.com>
7554 * c-pragma.h (enum pragma_kind): Rename
7555 PRAGMA_OMP_DECLARE_REDUCTION to PRAGMA_OMP_DECLARE. Adjust all
7558 2016-06-29 Richard Biener <rguenther@suse.de>
7561 * c-common.c (c_common_get_alias_set): Remove union type punning case.
7563 2016-06-24 Jason Merrill <jason@redhat.com>
7565 P0145R2: Refining Expression Order for C++.
7566 * c-common.c (verify_tree) [COMPOUND_EXPR]: Fix handling on LHS of
7569 2016-06-24 Jakub Jelinek <jakub@redhat.com>
7571 * c-common.c (check_builtin_function_arguments): Require last
7572 argument of BUILT_IN_*_OVERFLOW_P to have INTEGER_TYPE type.
7573 Adjust wording of diagnostics for BUILT_IN_*_OVERLFLOW
7574 if the last argument is pointer to enumerated or boolean type.
7576 2016-06-22 David Malcolm <dmalcolm@redhat.com>
7579 * c-common.h (enum lookup_name_fuzzy_kind): New enum.
7580 (lookup_name_fuzzy): New prototype.
7582 2016-06-21 John David Anglin <danglin@gcc.gnu.org>
7584 * c-common.c (get_source_date_epoch): Use int64_t instead of long long.
7586 2016-06-14 Jason Merrill <jason@redhat.com>
7588 P0145R2: Refining Expression Order for C++.
7589 * c.opt (fargs-in-order): New.
7590 * c-opts.c (c_common_post_options): Adjust flag_args_in_order.
7592 2016-06-13 Jakub Jelinek <jakub@redhat.com>
7595 * c-gimplify.c (ubsan_walk_array_refs_r): Set *walk_subtrees = 0 on
7596 all BIND_EXPRs, and on all BIND_EXPRs recurse also on BIND_EXPR_BODY.
7598 PR preprocessor/71183
7599 * c-ppoutput.c (init_pp_output): Set cb->get_source_date_epoch
7600 to cb_get_source_date_epoch.
7602 2016-06-10 Jakub Jelinek <jakub@redhat.com>
7605 * c.opt (Wpsabi): Add Warning flag.
7607 2016-06-10 Martin Sebor <msebor@redhat.com>
7610 * c-common.c (handle_nonnull_attribute): Accept
7611 the nonnull attribute in type-generic builtins.
7613 2016-06-09 Martin Sebor <msebor@redhat.com>
7616 * c-common.c (builtin_function_validate_nargs): Make text of error
7617 message consistent with others like it.
7619 2016-06-08 Martin Sebor <msebor@redhat.com>
7620 Jakub Jelinek <jakub@redhat.com>
7624 * c-common.c (check_builtin_function_arguments): Handle
7625 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
7627 2016-06-08 Richard Biener <rguenther@suse.de>
7629 * c-common.c (parse_optimize_options): Improve diagnostic messages.
7631 2016-06-07 Richard Biener <rguenther@suse.de>
7634 * c-common.c (parse_optimize_options): Only apply CL_OPTIMIZATION
7635 options and warn about others.
7637 2016-06-01 Eduard Sanou <dhole@openmailbox.org>
7639 * c-common.c (get_source_date_epoch): Rename to
7640 cb_get_source_date_epoch.
7641 * c-common.c (cb_get_source_date_epoch): Use a single generic erorr
7642 message when the parsing fails. Use error_at instead of fatal_error.
7643 * c-common.h (get_source_date_epoch): Rename to
7644 cb_get_source_date_epoch.
7645 * c-common.h (cb_get_source_date_epoch): Prototype.
7646 * c-common.h (MAX_SOURCE_DATE_EPOCH): Define.
7647 * c-common.h (c_omp_region_type): Remove trailing comma.
7648 * c-lex.c (init_c_lex): Set cb->get_source_date_epoch callback.
7649 * c-lex.c (c_lex_with_flags): Remove initialization of
7650 pfile->source_date_epoch.
7652 2016-05-30 Jakub Jelinek <jakub@redhat.com>
7655 * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_DEPEND to
7656 C_OMP_CLAUSE_SPLIT_TARGET. Put OMP_CLAUSE_NOWAIT to
7657 C_OMP_CLAUSE_SPLIT_TARGET if combined with target construct,
7658 instead of C_OMP_CLAUSE_SPLIT_FOR.
7660 2016-05-24 Richard Biener <rguenther@suse.de>
7664 * c-common.h (convert_vector_to_pointer_for_subscript): Rename to ...
7665 (convert_vector_to_array_for_subscript): ... this.
7666 * c-common.c (convert_vector_to_pointer_for_subscript): Use a
7667 VIEW_CONVERT_EXPR to an array type. Rename to ...
7668 (convert_vector_to_array_for_subscript): ... this.
7670 2016-05-12 Marek Polacek <polacek@redhat.com>
7673 * c-common.c (pointer_int_sum): Call size_in_bytes_loc instead of
7674 size_in_bytes and pass LOC to it.
7676 2016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
7679 * c.opt (Wduplicate-decl-specifier): New option.
7681 2016-05-11 Marek Polacek <polacek@redhat.com>
7684 * c-common.c (diagnose_mismatched_attributes): New function.
7685 * c-common.h (diagnose_mismatched_attributes): Declare.
7687 2016-05-04 Marek Polacek <polacek@redhat.com>
7689 * c.opt (Wdangling-else): New option.
7691 2016-05-03 Marek Polacek <polacek@redhat.com>
7694 * c-common.c (builtin_function_validate_nargs): Add location
7696 (check_builtin_function_arguments): Add location and arguments
7697 parameters. Use them.
7698 * c-common.h (check_builtin_function_arguments): Update declaration.
7700 2016-05-03 Richard Biener <rguenther@suse.de>
7702 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Do not
7703 allow call args to gimplify to SSA names.
7705 2016-05-03 Marek Polacek <polacek@redhat.com>
7707 * c-common.h (enum c_omp_region_type): Remove stray comma.
7709 2016-05-02 Cesar Philippidis <cesar@codesourcery.com>
7711 * c-common.h (enum c_omp_region_type): Define.
7713 2016-05-02 Richard Sandiford <richard.sandiford@arm.com>
7715 * c-common.c (shorten_compare): Use wi::to_wide.
7717 2016-04-29 Cesar Philippidis <cesar@codesourcery.com>
7720 * c-common.h (c_oacc_split_loop_clauses): Add boolean argument.
7721 * c-omp.c (c_oacc_split_loop_clauses): Use it to duplicate
7722 reduction clauses in acc parallel loops.
7724 2016-04-29 Marek Polacek <polacek@redhat.com>
7727 * c-common.c (warn_for_memset): Check domain before accessing it.
7729 2016-04-29 Dominik Vogt <vogt@linux.vnet.ibm.com>
7732 * c-common.c (handle_aligned_attribute): Allow 0 as an argument to the
7733 "aligned" attribute.
7735 2016-04-28 Jason Merrill <jason@redhat.com>
7737 * c-lex.c (c_common_has_attribute): Handle nodiscard.
7739 2016-04-28 Eduard Sanou <dhole@openmailbox.org>
7740 Matthias Klose <doko@debian.org>
7742 * c-common.c (get_source_date_epoch): New function, gets the environment
7743 variable SOURCE_DATE_EPOCH and parses it as long long with error
7745 * c-common.h (get_source_date_epoch): Prototype.
7746 * c-lex.c (c_lex_with_flags): set parse_in->source_date_epoch.
7748 2015-04-27 Ryan Burn <contact@rnburn.com>
7752 * cilk.c (cilk_ignorable_spawn_rhs_op): Change to external linkage.
7753 (cilk_recognize_spawn): Renamed from recognize_spawn and change to
7755 (cilk_detect_and_unwrap): Corresponding changes.
7756 (extract_free_variables): Don't extract free variables from
7757 AGGR_INIT_EXPR slot.
7758 * c-common.h (cilk_ignorable_spawn_rhs_op): Prototype.
7759 (cilk_recognize_spawn): Likewise.
7761 2016-04-27 Bernd Schmidt <bschmidt@redhat.com>
7763 * c.opt (Wmemset-elt-size): New option.
7764 * c-common.c (warn_for_memset): New function.
7765 * c-common.h (warn_for_memset): Declare.
7767 2016-04-25 Jason Merrill <jason@redhat.com>
7769 * c-common.c (handle_unused_attribute): Accept CONST_DECL.
7771 * c-common.h: Declare it.
7772 * c-lex.c (c_common_has_attribute): Add maybe_unused.
7774 2016-04-22 Jason Merrill <jason@redhat.com>
7776 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_range_based_for.
7778 2016-04-20 Ilya Verbin <ilya.verbin@intel.com>
7781 * c-cilkplus.c (c_finish_cilk_clauses): Remove function.
7782 * c-common.h (c_finish_cilk_clauses): Remove declaration.
7784 2016-04-18 Michael Matz <matz@suse.de>
7786 * c-common.c (handle_aligned_attribute): Use SET_TYPE_ALIGN
7789 2016-04-17 Eric Botcazou <ebotcazou@adacore.com>
7791 * c-ada-spec.c (get_underlying_decl): Return the typedef, if any.
7792 (dump_generic_ada_node) <POINTER_TYPE>: Clean up handling of access
7793 to incomplete types.
7794 (dump_nested_type): Remove redundant tests and tidy up.
7795 (print_ada_declaration): Also set TREE_VISITED on the declaration of
7796 a type which is the typedef of an original type.
7798 2016-04-15 Marek Polacek <polacek@redhat.com>
7801 * c-common.c (build_va_arg): Change two asserts into errors and return
7804 2016-04-13 Marek Polacek <polacek@redhat.com>
7807 * c-indentation.c (should_warn_for_misleading_indentation): Bail out
7808 for switch statements, too.
7810 2016-03-28 Jason Merrill <jason@redhat.com>
7812 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_range_based_for.
7814 2016-03-23 Marek Polacek <polacek@redhat.com>
7817 * c.opt (Wignored-attributes): New option.
7819 2016-03-22 David Malcolm <dmalcolm@redhat.com>
7822 * c-indentation.c (warn_for_misleading_indentation): Rewrite the
7823 diagnostic text, reversing the order of the warning and note so
7824 that they appear in source order.
7826 2016-03-17 Marek Polacek <polacek@redhat.com>
7829 * c-common.c (resolve_overloaded_builtin): Set TREE_USED for the fetch
7832 2016-03-14 Jason Merrill <jason@redhat.com>
7834 * c-cppbuiltin.c (c_cpp_builtins): Set __cpp_hex_float.
7836 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_range_based_for.
7838 2016-03-09 Richard Biener <rguenther@suse.de>
7841 * c-common.c (strict_aliasing_warning): Add back
7842 alias_sets_conflict_p check.
7844 2016-03-08 Jason Merrill <jason@redhat.com>
7846 * c-opts.c (set_std_cxx1z): Don't enable concepts.
7848 2016-03-04 David Malcolm <dmalcolm@redhat.com>
7851 * c-indentation.c (get_visual_column): Move code to determine next
7853 (next_tab_stop): ...this new function.
7854 (line_contains_hash_if): Delete function.
7855 (detect_preprocessor_logic): Delete function.
7856 (get_first_nws_vis_column): New function.
7857 (detect_intervening_unindent): New function.
7858 (should_warn_for_misleading_indentation): Replace call to
7859 detect_preprocessor_logic with a call to
7860 detect_intervening_unindent.
7862 2016-03-04 David Malcolm <dmalcolm@redhat.com>
7865 * c-indentation.c (should_warn_for_misleading_indentation): When
7866 suppressing warnings about cases where the guard and body are on
7867 the same column, only use the first non-whitespace column in place
7868 of the guard token column when dealing with "else" clauses.
7869 When rejecting aligned BODY and NEXT, loosen the requirement
7870 from equality with the first non-whitespace of guard to simply
7871 that they not be indented relative to it.
7873 2016-03-04 Richard Biener <rguenther@suse.de>
7876 * c-common.c (strict_aliasing_warning): Use alias_set_subset_of
7877 instead of alias_sets_conflict_p.
7879 2016-03-01 Marek Polacek <polacek@redhat.com>
7882 * c-common.c (reject_gcc_builtin): Check for FUNCTION_DECL rather than
7885 2016-02-22 Martin Sebor <msebor@redhat.com>
7888 * c-common.c (check_builtin_function_arguments): Validate and
7889 reject invalid arguments to __builtin_alloca_with_align.
7891 2016-02-20 Mark Wielaard <mjw@redhat.com>
7894 * c.opt (Wunused-const-variable): Turn into Alias for...
7895 (Wunused-const-variable=): New option.
7897 2016-02-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
7900 * c-opts.c (c_common_post_options): Move call to set_std_cxx14 from
7902 (c_common_init_options): ...to here.
7903 (set_std_cxx98): Initialize flag_isoc94 and flag_isoc99.
7905 2016-02-19 Jakub Jelinek <jakub@redhat.com>
7908 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_GRAINSIZE.
7909 (init_pragma): Register PRAGMA_CILK_GRAINSIZE even for
7910 flag_preprocess_only.
7912 2016-02-16 Jakub Jelinek <jakub@redhat.com>
7915 * c.opt (Wnonnull-compare): Enable for -Wall.
7917 2016-02-15 Jakub Jelinek <jakub@redhat.com>
7920 * c-common.c (sync_resolve_size): Diagnose too few arguments
7921 even when params is non-NULL empty vector.
7923 2016-02-08 Bernd Schmidt <bschmidt@redhat.com>
7926 * c.opt (fshort-double): Remove.
7928 2016-02-05 Martin Sebor <msebor@redhat.com>
7931 * c.opt (Warning options): Update -Wplacement-new to take
7932 an optional argument.
7934 2016-02-01 Jakub Jelinek <jakub@redhat.com>
7936 PR preprocessor/69543
7938 * c-pragma.c (handle_pragma_diagnostic): Pass input_location
7939 instead of loc to control_warning_option.
7941 2016-02-01 Nathan Sidwell <nathan@codesourcery.com>
7943 * c.opt (fopenacc-dim=): New option.
7945 2016-01-27 Ryan Burn <contact@rnburn.com>
7948 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Change to use
7949 gimplify_arg. Removed superfluous post_p argument.
7950 * c-family.h (cilk_gimplify_call_params_in_spawned_fn): Removed
7951 superfluous post_p argument.
7952 * c-gimplify.c (c_gimplify_expr): Likewise.
7954 2016-01-26 David Malcolm <dmalcolm@redhat.com>
7957 * c-opts.c (c_diagnostic_finalizer): Replace invocation of
7958 pp_newline_and_flush with pp_flush.
7960 2016-01-20 Martin Sebor <msebor@redhat.com>
7963 * c-common.c (sync_resolve_size): Avoid printing diagnostic about
7964 an incompatible argument when the argument isn't a valid tree node.
7966 2016-01-18 Jason Merrill <jason@redhat.com>
7969 * c-common.c (check_function_arguments_recurse): Fold the whole
7970 COND_EXPR, not just the condition.
7972 2016-01-18 Tom de Vries <tom@codesourcery.com>
7974 * c-omp.c (c_oacc_split_loop_clauses): Don't copy OMP_CLAUSE_REDUCTION,
7975 classify as loop clause.
7977 2016-01-15 Jakub Jelinek <jakub@redhat.com>
7980 * c-pragma.c (c_register_pragma_1): Adjust comment to note that
7981 C++ FE no longer has limit on number of pragmas.
7983 2015-01-14 Ryan Burn <contact@rnburn.com>
7986 * cilk.c (create_cilk_wrapper_body): Call fold_build_cleanup_point_expr
7987 to add missing cleanup point.
7989 2016-01-14 David Malcolm <dmalcolm@redhat.com>
7992 * c-indentation.c (get_visual_column): Add location_t param.
7993 Handle the column number being zero by effectively disabling the
7994 warning, with an "inform".
7995 (should_warn_for_misleading_indentation): Add location_t argument
7996 for all uses of get_visual_column.
7998 2016-01-10 Patrick Palka <ppalka@gcc.gnu.org>
8001 * c-indentation.c (should_warn_for_misleading_indentation):
8002 Don't warn about do-while statements.
8004 2016-01-07 Martin Sebor <msebor@redhat.com>
8007 * c-common.c (sync_resolve_size): Reject first argument when it's
8010 2016-01-05 David Malcolm <dmalcolm@redhat.com>
8013 * c-indentation.c (get_visual_column): Remove default argument.
8014 (should_warn_for_misleading_indentation): For the multiline case,
8015 update call to get_visual_column for next_stmt_exploc so that it
8016 captures the location of the first non-whitespace character in the
8017 relevant line. Don't issue warnings if there is non-whitespace
8018 before the next statement.
8020 2016-01-04 Jakub Jelinek <jakub@redhat.com>
8022 Update copyright years.
8024 2015-12-21 David Malcolm <dmalcolm@redhat.com>
8026 * c-common.c (binary_op_error): Convert first param from
8027 location_t to rich_location * and use it when emitting an error.
8028 * c-common.h (binary_op_error): Convert first param from
8029 location_t to rich_location *.
8031 2015-12-16 David Malcolm <dmalcolm@redhat.com>
8033 * c-common.h (conflict_marker_get_final_tok_kind): New prototype.
8034 * c-lex.c (conflict_marker_get_final_tok_kind): New function.
8036 2015-12-15 Ilya Verbin <ilya.verbin@intel.com>
8038 * c-common.c (c_common_attribute_table): Handle "omp declare target
8041 2015-12-14 Jakub Jelinek <jakub@redhat.com>
8044 * c.opt (Wmissing-format-attribute, Wnormalized): Add Warning option.
8046 2014-12-12 Tobias Burnus <burnus@net-b.de>
8049 * c-format.c (gcc_gfc_char_table): Add 'q' flag to remaining
8050 specifiers (%d, %i,%u and %c).
8052 2015-12-10 David Malcolm <dmalcolm@redhat.com>
8054 * c.opt (Wmisleading-indentation): Add to -Wall for C and C++.
8056 2015-12-08 Jakub Jelinek <jakub@redhat.com>
8060 * c.opt (Wfloat-conversion, Wsign-conversion): Add Warning.
8061 * c-pragma.c (handle_pragma_diagnostic): Adjust
8062 control_warning_option caller.
8064 2015-12-07 David Malcolm <dmalcolm@redhat.com>
8066 * c-common.c (c_cpp_error): Update for change to
8067 rich_location::set_range.
8069 2015-12-04 Paolo Bonzini <bonzini@gnu.org>
8071 * c-common.c (maybe_warn_shift_overflow): Warn on all overflows if
8072 shifting 1 out of the sign bit.
8074 2015-12-04 Kirill Yukhin <kirill.yukhin@intel.com>
8076 * c-common.c (c_common_attribute_table[]): Update max arguments
8077 count for "simd" attribute.
8078 (handle_simd_attribute): Parse "notinbranch" and "inbranch" arguments.
8080 2015-12-03 Jakub Jelinek <jakub@redhat.com>
8082 PR preprocessor/57580
8083 * c-ppoutput.c (print): Change printed field to bool.
8084 Move src_file last for smaller padding.
8085 (init_pp_output): Set print.printed to false instead of 0.
8086 (scan_translation_unit): Fix up formatting. Set print.printed
8087 to true after printing something other than newline.
8088 (scan_translation_unit_trad): Set print.printed to true instead of 1.
8089 (maybe_print_line_1): Set print.printed to false instead of 0.
8090 (print_line_1): Likewise.
8091 (do_line_change): Set print.printed to true instead of 1.
8092 (cb_define, dump_queued_macros, cb_include, cb_def_pragma,
8093 dump_macro): Set print.printed to false after printing newline.
8095 2015-12-02 Jason Merrill <jason@redhat.com>
8097 * c-common.c (fold_for_warn): New.
8098 (warn_logical_operator, warn_tautological_cmp)
8099 (check_function_arguments_recurse, maybe_warn_bool_compare): Use it.
8101 * c-common.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
8102 (c_fully_fold_internal, decl_constant_value_for_optimization):
8104 * c-common.h: Don't declare decl_constant_value_for_optimization.
8106 2015-12-02 Joseph Myers <joseph@codesourcery.com>
8109 * c-common.h (c_build_qualified_type): Add extra default
8112 2015-12-01 Julian Brown <julian@codesourcery.com>
8113 Cesar Philippidis <cesar@codesourcery.com>
8114 James Norris <James_Norris@mentor.com>
8116 * c-pragma.c (oacc_pragmas): Add PRAGMA_OACC_HOST_DATA.
8117 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_HOST_DATA.
8118 (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_USE_DEVICE.
8120 2015-11-30 Eric Botcazou <ebotcazou@adacore.com>
8122 * c-ada-spec.c (print_ada_macros): Remove redundant blank line.
8123 (decl_sloc_common): Delete and move bulk of processing to...
8124 (decl_sloc): ...here.
8125 (pp_ada_tree_identifier): Remove reference to QUAL_UNION_TYPE.
8126 (dump_ada_double_name): Remove S parameter and compute the suffix.
8127 (dump_ada_array_type): Add PARENT parameter. Simplify computation of
8128 element type and deal with an anonymous one.
8129 (dump_ada_template): Use RECORD_OR_UNION_TYPE_P macro.
8130 (dump_generic_ada_node): Tweak. Adjust call to dump_ada_array_type
8131 and remove reference to QUAL_UNION_TYPE.
8132 (dump_nested_types): Make 2 passes on the fields and move bulk to...
8133 (dump_nested_type): ...here. New function extracted from above.
8134 Generate a full declaration for anonymous element type of arrays.
8135 (print_ada_declaration): Really skip anonymous declarations. Remove
8136 references to QUAL_UNION_TYPE. Adjust call to dump_ada_array_type.
8137 Clean up processing of declarations of array types and objects.
8138 (print_ada_struct_decl): Remove reference to QUAL_UNION_TYPE.
8139 Remove obsolete code and tidy up.
8141 2015-11-29 Jan Hubicka <hubicka@ucw.cz>
8144 * c-common.c (handle_transparent_union_attribute): Update
8147 2015-11-27 Martin Liska <mliska@suse.cz>
8150 * array-notation-common.c (cilkplus_extract_an_triplets):
8151 Release vector of vectors.
8152 * cilk.c (gimplify_cilk_spawn): Free allocated memory.
8154 2015-11-26 Eric Botcazou <ebotcazou@adacore.com>
8157 * c-ada-spec.c (dump_nested_types): Add guard for error_mark_node.
8158 (print_ada_struct_decl): Likewise.
8160 2015-11-23 Igor Zamyatin <igor.zamyatin@intel.com>
8163 * c-gimplify.c (c_gimplify_expr): Stop the process if see an error.
8164 * cilk.c (recognize_spawn): Determine location in a more precise
8167 2015-11-19 Jason Merrill <jason@redhat.com>
8169 * c-common.c (shorten_compare): But look through macros from
8172 2015-11-18 Jason Merrill <jason@redhat.com>
8174 * c-common.c (shorten_compare): Don't -Wtype-limits if the
8175 non-constant operand comes from a macro.
8177 2015-11-17 Jason Merrill <jason@redhat.com>
8180 * c-common.c (warn_tautological_cmp): Fold before checking for
8183 2015-11-16 Marek Polacek <polacek@redhat.com>
8186 * c-common.c (check_case_bounds): Fold low and high cases.
8188 2015-11-16 Marek Polacek <polacek@redhat.com>
8190 * c-ada-spec.c (dump_ada_template): Use RECORD_OR_UNION_TYPE_P.
8191 * c-common.c (c_common_get_alias_set): Likewise.
8192 (handle_visibility_attribute): Likewise.
8194 2015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
8196 * c-common.c (handle_simd_attribute): New.
8197 (struct attribute_spec): Add entry for "simd".
8198 (handle_simd_attribute): New.
8200 2015-11-13 Kai Tietz <ktietz70@googlemail.com>
8202 * c-lex.c (interpret_float): Use fold_convert.
8204 2015-11-13 David Malcolm <dmalcolm@redhat.com>
8206 * c-common.c (c_fully_fold_internal): Capture existing souce_range,
8207 and store it on the result.
8208 * c-opts.c (c_common_init_options): Set
8209 global_dc->colorize_source_p.
8211 2015-11-12 James Norris <jnorris@codesourcery.com>
8212 Joseph Myers <joseph@codesourcery.com>
8214 * c-pragma.c (oacc_pragmas): Add entry for declare directive.
8215 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_DECLARE.
8216 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT and
8217 PRAGMA_OACC_CLAUSE_LINK.
8219 2015-11-11 Marek Polacek <polacek@redhat.com>
8223 * c-common.c (valid_array_size_p): New function.
8224 * c-common.h (valid_array_size_p): Declare.
8226 2015-11-11 Dominique d'Humieres <dominiq@lps.ens.fr>
8229 * c-pragma.c (c_register_pragma_1): Update the gcc_assert to 256.
8231 2015-11-11 Andrew MacLeod <amacleod@redhat.com>
8233 * array-notation-common.c: Remove unused header files.
8234 * c-ada-spec.c: Likewise.
8235 * c-cilkplus.c: Likewise.
8236 * c-common.c: Likewise.
8237 * c-cppbuiltin.c: Likewise.
8238 * c-dump.c: Likewise.
8239 * c-format.c: Likewise.
8240 * c-gimplify.c: Likewise.
8241 * c-indentation.c: Likewise.
8242 * c-lex.c: Likewise.
8243 * c-omp.c: Likewise.
8244 * c-opts.c: Likewise.
8245 * c-pch.c: Likewise.
8246 * c-ppoutput.c: Likewise.
8247 * c-pragma.c: Likewise.
8248 * c-pretty-print.c: Likewise.
8249 * c-semantics.c: Likewise.
8250 * c-ubsan.c: Likewise.
8252 * stub-objc.c: Likewise.
8254 2015-11-09 Thomas Schwinge <thomas@codesourcery.com>
8255 Cesar Philippidis <cesar@codesourcery.com>
8256 James Norris <jnorris@codesourcery.com>
8257 Julian Brown <julian@codesourcery.com>
8258 Nathan Sidwell <nathan@codesourcery.com>
8260 * c-pragma.c (oacc_pragmas): Add "routine".
8261 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ROUTINE.
8263 2015-11-08 Eric Botcazou <ebotcazou@adacore.com>
8265 * c-common.c (c_common_attributes): Add scalar_storage_order.
8266 (handle_scalar_storage_order_attribute): New function.
8267 * c-pragma.c (global_sso): New variable.
8268 (maybe_apply_pragma_scalar_storage_order): New function.
8269 (handle_pragma_scalar_storage_order): Likewise.
8270 (init_pragma): Register scalar_storage_order.
8271 * c-pragma.h (maybe_apply_pragma_scalar_storage_order): Declare.
8272 * c.opt (Wscalar-storage-order): New warning.
8273 (fsso-struct=): New option.
8275 2015-11-08 Martin Sebor <msebor@redhat.com>
8277 * c.opt (Wplacement-new): Add a period to the end of a sentence.
8279 2015-11-07 Richard Sandiford <richard.sandiford@arm.com>
8281 * c-common.c: Don't undef DEF_BUILTIN.
8283 2015-11-06 David Malcolm <dmalcolm@redhat.com>
8285 * c-common.c (c_cpp_error): Convert parameter from location_t to
8286 rich_location *. Eliminate the "column_override" parameter and
8287 the call to diagnostic_override_column.
8288 Update the "done_lexing" clause to set range 0
8289 on the rich_location, rather than overwriting a location_t.
8290 * c-common.h (c_cpp_error): Convert parameter from location_t to
8291 rich_location *. Eliminate the "column_override" parameter.
8293 2015-11-05 Cesar Philippidis <cesar@codesourcery.com>
8294 Thomas Schwinge <thomas@codesourcery.com>
8295 James Norris <jnorris@codesourcery.com>
8297 * c-omp.c (c_oacc_split_loop_clauses): Make TILE, GANG, WORKER, VECTOR,
8298 AUTO, SEQ, INDEPENDENT and PRIVATE loop clauses. Associate REDUCTION
8299 clauses with parallel and kernels and loops.
8300 * c-pragma.h (enum pragma_omp_clause): Add entries for
8301 PRAGMA_OACC_CLAUSE_{INDEPENDENT,TILE,DEFAULT}.
8302 * pt.c (tsubst_omp_clauses): Add support for OMP_CLAUSE_{NUM_GANGS,
8303 NUM_WORKERS,VECTOR_LENGTH,GANG,WORKER,VECTOR,ASYNC,WAIT,TILE,AUTO,
8305 (tsubst_expr): Add support for OMP_CLAUSE_{KERNELS,PARALLEL,LOOP}.
8307 2015-11-05 Martin Sebor <msebor@redhat.com>
8310 * c.opt (-Wplacement-new): New option.
8312 2015-11-05 Jakub Jelinek <jakub@redhat.com>
8314 * c-common.h (c_finish_omp_atomic): Add TEST argument.
8315 (c_omp_check_loop_iv, c_omp_check_loop_iv_exprs): New prototypes.
8316 * c-omp.c (c_finish_omp_atomic): Add TEST argument. Don't call
8317 save_expr or create_tmp_var* if TEST is true.
8318 (c_finish_omp_for): Store OMP_FOR_ORIG_DECLS always.
8319 Don't call add_stmt here.
8320 (struct c_omp_check_loop_iv_data): New type.
8321 (c_omp_check_loop_iv_r, c_omp_check_loop_iv,
8322 c_omp_check_loop_iv_exprs): New functions.
8323 (c_omp_split_clauses): Adjust for lastprivate being allowed on
8325 (c_omp_declare_simd_clauses_to_numbers): Change
8326 OMP_CLAUSE_LINEAR_VARIABLE_STRIDE OMP_CLAUSE_LINEAR_STEP into numbers.
8327 (c_omp_declare_simd_clauses_to_decls): Similarly change those
8328 from numbers to PARM_DECLs.
8330 2015-11-04 Mikhail Maltsev <maltsevm@gmail.com>
8332 * c-omp.c (c_omp_split_clauses): Remove conditional compilation. Use
8335 2015-11-03 Bernd Schmidt <bschmidt@redhat.com>
8338 * c-common.h (fold_offsetof_1): Add argument.
8339 * c-common.c (fold_offsetof_1): Diagnose more invalid
8340 offsetof expressions that reference elements past the end of
8343 2015-11-03 Thomas Schwinge <thomas@codesourcery.com>
8344 Chung-Lin Tang <cltang@codesourcery.com>
8346 * c-pragma.c (oacc_pragmas): Add "atomic".
8347 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ATOMIC.
8349 2015-10-30 Evgeny Stupachenko <evstupac@gmail.com>
8351 * c-common.c (handle_target_clones_attribute): New.
8352 (c_common_attribute_table): Add handle_target_clones_attribute.
8353 (handle_always_inline_attribute): Add check on target_clones attribute.
8354 (handle_target_attribute): Ditto.
8356 2015-10-29 Andrew MacLeod <amacleod@redhat.com>
8358 * array-notation-common.c: Reorder #include's and remove duplicates.
8359 * c-ada-spec.c: Likewise.
8360 * c-cilkplus.c: Likewise.
8361 * c-common.c: Likewise.
8362 * c-cppbuiltin.c: Likewise.
8363 * c-dump.c: Likewise.
8364 * c-format.c: Likewise.
8365 * c-gimplify.c: Likewise.
8366 * c-indentation.c: Likewise.
8367 * c-lex.c: Likewise.
8368 * c-omp.c: Likewise.
8369 * c-opts.c: Likewise.
8370 * c-pch.c: Likewise.
8371 * c-ppoutput.c: Likewise.
8372 * c-pragma.c: Likewise.
8373 * c-pretty-print.c: Likewise.
8374 * c-semantics.c: Likewise.
8375 * c-ubsan.c: Likewise.
8377 * stub-objc.c: Likewise.
8379 2015-10-28 Jason Merrill <jason@redhat.com>
8381 * c-common.c (pointer_int_sum): Fold the MULT_EXPR.
8383 2015-10-27 Thomas Schwinge <thomas@codesourcery.com>
8384 James Norris <jnorris@codesourcery.com>
8385 Cesar Philippidis <cesar@codesourcery.com>
8389 * c-common.h (c_oacc_split_loop_clauses): Declare function.
8390 * c-omp.c (c_oacc_split_loop_clauses): New function.
8392 2015-10-21 Martin Sebor <msebor@redhat.com>
8395 * c.opt: End each sentence that describes an option with a period.
8397 2015-10-20 Marek Polacek <polacek@redhat.com>
8399 * array-notation-common.c (is_cilkplus_vector_p): Define.
8400 * c-common.h (is_cilkplus_vector_p): Declare.
8402 2015-10-20 Marek Polacek <polacek@redhat.com>
8404 * c.opt (std=gnu++11): Do not describe as experimental.
8405 (std=gnu++14): Likewise.
8407 2015-10-19 Jason Merrill <jason@redhat.com>
8409 * c-cppbuiltin.c (c_cpp_builtins): Define
8410 __cpp_nontype_template_args.
8412 2015-10-19 Jason Merrill <jason@redhat.com>
8414 * c-cppbuiltin.c (c_cpp_builtins): Define
8415 __cpp_enumerator_attributes, __cpp_fold_expressions,
8416 __cpp_unicode_characters.
8418 2015-10-13 Jakub Jelinek <jakub@redhat.com>
8419 Aldy Hernandez <aldyh@redhat.com>
8421 * c-common.c (enum c_builtin_type): Define DEF_FUNCTION_TYPE_9,
8422 DEF_FUNCTION_TYPE_10 and DEF_FUNCTION_TYPE_11.
8423 (c_define_builtins): Likewise.
8424 * c-common.h (enum c_omp_clause_split): Add
8425 C_OMP_CLAUSE_SPLIT_TASKLOOP.
8426 (c_finish_omp_critical, c_finish_omp_ordered): Add CLAUSES argument.
8427 (c_finish_omp_for): Add ORIG_DECLV argument.
8428 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP as
8429 201511 instead of 201307.
8430 * c-omp.c (c_finish_omp_critical): Add CLAUSES argument, set
8431 OMP_CRITICAL_CLAUSES to it.
8432 (c_finish_omp_ordered): Add CLAUSES argument, set
8433 OMP_ORDERED_CLAUSES to it.
8434 (c_finish_omp_for): Add ORIG_DECLV argument, set OMP_FOR_ORIG_DECLS
8435 to it if OMP_FOR. Clear DECL_INITIAL on the IVs.
8436 (c_omp_split_clauses): Handle OpenMP 4.5 combined/composite
8437 constructs and new OpenMP 4.5 clauses. Clear
8438 OMP_CLAUSE_SCHEDULE_SIMD if not combined with OMP_SIMD. Add
8440 * c-pragma.c (omp_pragmas_simd): Add taskloop.
8441 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKLOOP.
8442 (enum pragma_omp_clause): Add
8443 PRAGMA_OMP_CLAUSE_{DEFAULTMAP,GRAINSIZE,HINT,{IS,USE}_DEVICE_PTR}
8444 and PRAGMA_OMP_CLAUSE_{LINK,NOGROUP,NUM_TASKS,PRIORITY,SIMD,THREADS}.
8446 2015-10-05 Richard Sandiford <richard.sandiford@arm.com>
8448 * c-lex.c (interpret_float): Use real_equal instead of
8451 2015-10-04 Jason Merrill <jason@redhat.com>
8453 Implement N4514, C++ Extensions for Transactional Memory.
8454 * c-common.c (c_common_reswords): Add C++ TM TS keywords.
8455 (c_common_attribute_table): Add transaction_safe_dynamic.
8456 transaction_safe now affects type identity.
8457 (handle_tm_attribute): Handle transaction_safe_dynamic.
8458 * c-common.h (enum rid): Add RID_ATOMIC_NOEXCEPT,
8459 RID_ATOMIC_CANCEL, RID_SYNCHRONIZED.
8460 (OBJC_IS_CXX_KEYWORD): Add RID_SYNCHRONIZED.
8462 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_transactional_memory.
8463 * c-pretty-print.c (pp_c_attributes_display): Don't print
8464 transaction_safe in C++.
8466 2015-10-02 Marek Polacek <polacek@redhat.com>
8468 * c.opt (Wduplicated-cond): Don't enable by -Wall anymore.
8470 2015-10-02 Marek Polacek <polacek@redhat.com>
8473 * c-common.c (warn_duplicated_cond_add_or_warn): New function.
8474 * c-common.h (warn_duplicated_cond_add_or_warn): Declare.
8475 * c.opt (Wduplicated-cond): New option.
8477 2015-10-01 Joseph Myers <joseph@codesourcery.com>
8479 * c.opt (std=c11): Do not describe as experimental.
8480 (std=gnu11): Likewise.
8481 (std=iso9899:2011): Likewise.
8483 2015-09-28 Nathan Sidwell <nathan@codesourcery.com>
8485 * c-common.c (DEF_FUNCTION_TYPE_VAR_6): New.
8486 (DEF_FUNCTION_TYPE_VAR_11): Delete.
8488 2015-09-25 Marek Polacek <polacek@redhat.com>
8490 * c-ubsan.c (ubsan_instrument_division): Remove unnecessary code.
8491 (ubsan_instrument_shift): Likewise.
8493 2015-09-25 Marek Polacek <polacek@redhat.com>
8496 * c-ubsan.c (ubsan_instrument_division): Also pre-evaluate OP1.
8498 2015-09-24 Patrick Palka <ppalka@gcc.gnu.org>
8500 * c-indentation.c (should_warn_for_misleading_indentation):
8501 Compare next_stmt_vis_column with guard_line_first_nws instead
8502 of with guard_line_vis_column.
8504 2015-09-23 Manuel López-Ibáñez <manu@gcc.gnu.org>
8508 * c-pragma.c (handle_pragma_diagnostic): Detect non-warning
8509 options and options not valid for the current language.
8511 2015-09-22 Patrick Palka <ppalka@gcc.gnu.org>
8513 * c-indentation.c (should_warn_for_misleading_indentation):
8514 Float out and consolidate the calls to get_visual_column that
8515 are passed guard_exploc as an argument. Compare
8516 next_stmt_vis_column with guard_line_first_nws instead of with
8517 body_line_first_nws.
8519 2015-09-22 Nathan Sidwell <nathan@codesourcery.com>
8521 * c.opt (Wmultiple-inheritance, Wvirtual-inheritance, Wtemplates,
8522 Wnamespaces): New C++ warnings.
8524 2015-09-22 Jason Merrill <jason@redhat.com>
8526 * c-common.h (abi_compat_version_crosses): New.
8527 (warn_abi_version): Declare.
8528 * c-common.c: Define it.
8529 * c-opts.c (c_common_post_options): Handle it.
8530 flag_abi_compat_version defaults to 8.
8532 2015-09-21 Ville Voutilainen <ville.voutilainen@gmail.com>
8534 Complete the implementation of N4230, Nested namespace definition.
8535 * c-cppbuiltin.c: Add __cpp_namespace_attributes and
8536 __cpp_nested_namespace_definitions.
8538 2015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
8540 * c-pragma.c (handle_pragma_diagnostic): Fix wrong return.
8542 2015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
8544 * c-pragma.c (handle_pragma_diagnostic): Use explicit location
8546 * c-pragma.h (pragma_lex): Add optional loc argument.
8548 2015-09-16 Mikhail Maltsev <maltsevm@gmail.com>
8550 * c-format.c (check_format_arg): Adjust to use common block size in all
8553 2015-09-15 David Malcolm <dmalcolm@redhat.com>
8555 * c-format.c (location_from_offset): Update for change in
8556 signature of location_get_source_line.
8557 * c-indentation.c (get_visual_column): Likewise.
8558 (line_contains_hash_if): Likewise.
8560 2015-09-14 Marek Polacek <polacek@redhat.com>
8562 * c-opts.c (c_common_post_options): Set C++ standard earlier, before
8563 setting various warnings.
8565 2015-09-14 Marek Polacek <polacek@redhat.com>
8567 * c-common.c (warn_for_sign_compare): Cast to unsigned when shifting
8570 2015-09-11 Mark Wielaard <mjw@redhat.com>
8573 * c.opt (Wunused-variable): Option from common.opt.
8574 (Wunused-const-variable): New option.
8576 2015-09-09 Paolo Carlini <paolo.carlini@oracle.com>
8579 * c.opt ([Wsubobject-linkage]): Add.
8581 2015-09-03 Martin Sebor <msebor@redhat.com>
8584 * c-common.h (c_decl_implicit, reject_gcc_builtin): Declare new
8586 * c-common.c (reject_gcc_builtin): Define.
8588 2015-09-02 Balaji V. Iyer <balaji.v.iyer@intel.com>
8591 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): New
8593 * c-gimplify.c (c_gimplify_expr): Added a call to the function
8594 cilk_gimplify_call_params_in_spawned_fn.
8595 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): New function.
8596 (gimplify_cilk_spawn): Removed EXPR_STMT and CLEANUP_POINT_EXPR
8599 2015-08-25 Marek Polacek <polacek@redhat.com>
8602 * c-common.c (handle_weak_attribute): Don't check whether the
8603 visibility can be changed here.
8605 2015-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
8607 * c-lex.c (c_lex_with_flags): Use explicit locations.
8609 2015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
8611 * c-ada-spec.h, c-common.c, c-common.h, c-format.c, c-format.h,
8612 c-objc.h, c-ppoutput.c, c-pragma.c, c-pragma.h: Remove useless
8614 2015-08-18 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
8617 * c-common.c (check_builtin_function_arguments): Add check
8618 for BUILT_IN_SIGNBIT argument.
8620 2015-08-18 Paolo Carlini <paolo.carlini@oracle.com>
8623 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_static_assert value
8626 2015-08-17 Marek Polacek <polacek@redhat.com>
8628 * c-pretty-print.c (pp_c_cv_qualifiers): Remove code dealing
8629 with whitespaces before qualifier names.
8631 2015-08-12 Marek Polacek <polacek@redhat.com>
8634 * c-common.c (maybe_warn_shift_overflow): Properly handle
8635 left-shifting 1 into the sign bit.
8637 2015-08-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
8639 * c.opt (Wchkp): Use LangEnabledBy instead of EnabledBy.
8641 2015-08-06 Andrew Sutton <andrew.n.sutton@gmail.com>
8642 Braden Obrzut <admin@maniacsvault.net>
8643 Jason Merrill <jason@redhat.com>
8645 Add C++ Concepts TS support.
8646 * c-common.c (c_common_reswords): Add __is_same_as, concept, requires.
8647 * c-common.h (enum rid): Add RID_IS_SAME_AS, RID_CONCEPT, RID_REQUIRES.
8648 (D_CXX_CONCEPTS, D_CXX_CONCEPTS_FLAGS): New.
8649 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_concepts.
8650 * c-opts.c (set_std_cxx1z): Set flag_concepts.
8651 * c.opt (fconcepts): New.
8653 2015-08-02 Martin Sebor <msebor@redhat.com>
8655 * c.opt (-Wframe-address): New warning option.
8657 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
8659 * c-indentation.c (should_warn_for_misleading_indentation):
8662 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
8664 * c-indentation.c (get_visual_column): Add parameter first_nws,
8665 use it. Update comment documenting the function.
8666 (is_first_nonwhitespace_on_line): Remove.
8667 (should_warn_for_misleading_indentation): Replace usage of
8668 of is_first_nonwhitespace_on_line with get_visual_column.
8670 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
8672 * c-indentation.h (struct token_indent_info): Define.
8673 (get_token_indent_info): Define.
8674 (warn_for_misleading_information): Declare.
8675 * c-common.h (warn_for_misleading_information): Remove.
8676 * c-identation.c (warn_for_misleading_indentation):
8677 Change declaration to take three token_indent_infos. Adjust
8679 * c-identation.c (should_warn_for_misleading_indentation):
8680 Likewise. Bail out early if the body is a compound statement.
8681 (guard_tinfo_to_string): Define.
8683 2015-07-30 Jason Merrill <jason@redhat.com>
8685 * c-pretty-print.c (unary_expression) [INDIRECT_REF]: Don't print
8686 '*' for reference decay.
8688 2015-07-30 Marek Polacek <polacek@redhat.com>
8690 * c-common.c (warn_tautological_cmp): Bail for float types.
8692 2015-07-27 Marek Polacek <polacek@redhat.com>
8695 * c-common.c (warn_tautological_cmp): Don't warn for macro expansion.
8697 2015-07-27 Marek Polacek <polacek@redhat.com>
8701 * c-common.c (find_array_ref_with_const_idx_r): New function.
8702 (warn_tautological_cmp): New function.
8703 * c-common.h (warn_tautological_cmp): Declare.
8704 * c.opt (Wtautological-compare): New option.
8706 2015-07-23 Marek Polacek <polacek@redhat.com>
8708 * c-ubsan.c (ubsan_instrument_division): Use unshare_expr throughout.
8709 (ubsan_instrument_shift): Likewise.
8711 2015-07-23 Marek Polacek <polacek@redhat.com>
8714 * c-ubsan.c: Include gimplify.h.
8715 (ubsan_instrument_division): Unshare OP0 and OP1.
8716 (ubsan_instrument_shift): Likewise.
8718 2015-07-20 Marek Polacek <polacek@redhat.com>
8719 Richard Sandiford <richard.sandiford@arm.com>
8722 * c-common.c (c_fully_fold_internal): Warn about left shift overflows.
8723 Use EXPR_LOC_OR_LOC.
8724 (maybe_warn_shift_overflow): New function.
8725 * c-common.h (maybe_warn_shift_overflow): Declare.
8726 * c-opts.c (c_common_post_options): Set warn_shift_overflow.
8727 * c.opt (Wshift-overflow): New option.
8729 2015-07-16 Martin Liska <mliska@suse.cz>
8731 * c-format.c (static void check_format_info_main): Use
8732 object_allocator instead of pool_allocator.
8733 (check_format_arg): Likewise.
8734 (check_format_info_main): Likewise.
8736 2015-07-15 Andrew MacLeod <amacleod@redhat.com>
8738 * c-opts.c: Remove multiline #include comment.
8740 2015-07-12 Aldy Hernandez <aldyh@redhat.com>
8742 * c-common.c: Fix double word typos.
8744 2015-07-10 Eric Botcazou <ebotcazou@adacore.com>
8746 * c-ada-spec.h (cpp_operation): Revert latest change.
8747 * c-ada-spec.c (print_ada_declaration): Likewise. Skip implicit
8748 constructors and destructors.
8750 2015-07-09 Andrew MacLeod <amacleod@redhat.com>
8752 * c-common.h: Adjust includes for flags.h changes.
8753 * stub-objc.c: Likewise.
8755 2015-07-08 Eric Botcazou <ebotcazou@adacore.com>
8757 * c-ada-spec.h (cpp_operation): Add IS_CONSTEXPR.
8758 * c-ada-spec.c (print_ada_declaration): Skip constexpr constructors.
8760 2015-07-08 Jakub Jelinek <jakub@redhat.com>
8762 * c-omp.c (c_omp_declare_simd_clauses_to_numbers): If all clauses
8763 are to be removed, return NULL rather than original clauses list.
8765 2015-07-07 Andrew MacLeod <amacleod@redhat.com>
8767 * array-notation-common.c: Adjust includes.
8768 * c-ada-spec.c: Likewise.
8769 * c-cilkplus.c: Likewise.
8770 * c-common.h: Likewise.
8771 * c-cppbuiltin.c: Likewise.
8772 * c-dump.c: Likewise.
8773 * c-format.c: Likewise.
8774 * c-gimplify.c: Likewise.
8775 * c-indentation.c: Likewise.
8776 * c-lex.c: Likewise.
8777 * c-omp.c: Likewise.
8778 * c-opts.c: Likewise.
8779 * c-pch.c: Likewise.
8780 * c-ppoutput.c: Likewise.
8781 * c-pragma.c: Likewise.
8782 * c-pretty-print.c: Likewise.
8783 * c-semantics.c: Likewise.
8784 * c-ubsan.c: Likewise.
8786 * stub-objc.c: Likewise.
8788 2015-07-07 Eric Botcazou <ebotcazou@adacore.com>
8790 * c-ada-spec.h (cpp_operation): Add IS_MOVE_CONSTRUCTOR.
8791 * c-ada-spec.c (print_ada_declaration): Skip move constructors.
8793 2015-07-01 Jason Merrill <jason@redhat.com>
8795 * c-common.h (D_CXX11): Rename from D_CXX0X.
8796 (RID_FIRST_CXX11, RID_LAST_CXX11): Rename from *_CXX0X.
8797 * c-common.c: Adjust.
8799 * c-opts.c (c_common_post_options): Default to C++14.
8801 * c-opts.c (c_common_post_options): Highest ABI level is now 10.
8803 2015-06-30 Edward Smith-Rowland <3dw4rd@verizon.net>
8805 Implement N4197 - Adding u8 character literals
8806 * c-ada-spec.c (print_ada_macros): Treat CPP_UTF8CHAR like
8808 * c-common.c (c_parse_error): Print CPP_UTF8CHAR and
8809 CPP_UTF8CHAR_USERDEF tokens.
8810 * c-lex.c (c_lex_with_flags): Treat CPP_UTF8CHAR_USERDEF
8811 and CPP_UTF8CHAR tokens.
8812 (lex_charconst): Treat CPP_UTF8CHAR token.
8814 2015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
8817 * c-common.c (do_warn_unused_parameter): Move here.
8818 * c-common.h (do_warn_unused_parameter): Declare.
8820 2015-06-29 Marek Polacek <polacek@redhat.com>
8823 * c-common.c (check_case_bounds): Add bool * parameter. Set
8825 (c_add_case_label): Add bool * parameter. Pass it down to
8827 (c_do_switch_warnings): Add bool parameters. Implement -Wswitch-bool
8829 * c-common.h (c_add_case_label, c_do_switch_warnings): Update
8832 2015-06-27 Marek Polacek <polacek@redhat.com>
8834 * c-common.c (check_main_parameter_types): Use VECTOR_TYPE_P
8835 or VECTOR_INTEGER_TYPE_P throughout.
8836 * c-gimplify.c: Likewise.
8838 2015-06-26 Marek Polacek <polacek@redhat.com>
8840 * array-notation-common.c (find_rank): Use INDIRECT_REF_P.
8841 * c-common.c (c_fully_fold_internal): Likewise.
8842 (c_alignof_expr): Likewise.
8843 * c-pretty-print.c (c_pretty_printer::postfix_expression): Likewise.
8844 * c-ubsan.c (ubsan_instrument_bounds): Likewise.
8845 * cilk.c (create_parm_list): Likewise.
8847 2015-06-26 Marek Polacek <polacek@redhat.com>
8849 * c-common.c (handle_unused_attribute): Use VAR_OR_FUNCTION_DECL_P.
8851 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
8853 * c-common.c: Remove ipa-ref.h and plugin-api.h from include list.
8854 * c-gimplify.c: Likewise.
8855 * c-pragma.c: Likewise.
8856 * c-ubsan.c: Likewise.
8859 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
8861 * c-common.c (c_type_hasher): Inherit from ggc_ptr_hash rather than
8864 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
8866 * cilk.c: Move calls.h after tm.h in the include chain.
8868 2015-06-25 Marek Polacek <polacek@redhat.com>
8870 * array-notation-common.c: Use VAR_P throughout.
8871 * c-ada-spec.c: Likewise.
8872 * c-common.c: Likewise.
8873 * c-format.c: Likewise.
8874 * c-gimplify.c: Likewise.
8875 * c-omp.c: Likewise.
8876 * c-pragma.c: Likewise.
8877 * c-pretty-print.c: Likewise.
8880 2015-06-25 Marek Polacek <polacek@redhat.com>
8882 * cilk.c (extract_free_variables): Use is_global_var.
8884 2015-06-23 Richard Sandiford <richard.sandiford@arm.com>
8886 * c-common.c: Don't include target-def.h.
8888 2015-06-23 Marek Polacek <polacek@redhat.com>
8890 * c-common.c (warn_logical_operator): Use tree_int_cst_equal
8891 when comparing INTEGER_CSTs.
8893 2015-06-22 Pierre-Marie de Rodat <derodat@adacore.com>
8895 * c-ada-spec.h (cpp_operation): Add HAS_DEPENDENT_TEMPLATE_ARGS.
8896 * c-ada-spec.c (collect_ada_nodes): Skip NAMESPACE_DECL
8897 (dump_ada_template): Skip partially specialized types.
8899 2015-06-22 Mikhail Maltsev <maltsevm@gmail.com>
8901 * c-common.c (scalar_to_vector): Use std::swap instead of manually
8904 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
8906 * array-notation-common.c: Do not include input.h, line-map.h or is-a.h.
8907 * c-ada-spec.c: Likewise.
8908 * c-cilkplus.c: Likewise.
8909 * c-common.c: Likewise.
8910 * c-common.h: Likewise.
8911 * c-cppbuiltin.c: Likewise.
8912 * c-dump.c: Likewise.
8913 * c-format.c: Likewise.
8914 * c-gimplify.c: Likewise.
8915 * c-indentation.c: Likewise.
8916 * c-lex.c: Likewise.
8917 * c-omp.c: Likewise.
8918 * c-opts.c: Likewise.
8919 * c-pch.c: Likewise.
8920 * c-ppoutput.c: Likewise.
8921 * c-pragma.c: Likewise.
8922 * c-pretty-print.c: Likewise.
8923 * c-semantics.c: Likewise.
8924 * c-ubsan.c: Likewise.
8926 * stub-objc.c: Likewise.
8928 2015-06-13 Patrick Palka <ppalka@gcc.gnu.org>
8931 * c-common.c (c_common_truthvalue_conversion): Warn when
8932 converting an address of a reference to a truth value.
8934 2015-06-08 Andrew MacLeod <amacleod@redhat.com>
8936 * array-notation-common.c : Adjust include files.
8937 * c-ada-spec.c : Likewise.
8938 * c-cilkplus.c : Likewise.
8939 * c-common.c : Likewise.
8940 * c-common.h : Likewise.
8941 * c-cppbuiltin.c : Likewise.
8942 * c-dump.c : Likewise.
8943 * c-format.c : Likewise.
8944 * c-gimplify.c : Likewise.
8945 * c-indentation.c : Likewise.
8946 * c-lex.c : Likewise.
8947 * c-omp.c : Likewise.
8948 * c-opts.c : Likewise.
8949 * c-pch.c : Likewise.
8950 * c-ppoutput.c : Likewise.
8951 * c-pragma.c : Likewise.
8952 * c-pretty-print.c : Likewise.
8953 * c-semantics.c : Likewise.
8954 * c-ubsan.c : Likewise.
8955 * cilk.c : Likewise.
8956 * stub-objc.c : Likewise.
8958 2015-06-08 Marek Polacek <polacek@redhat.com>
8961 * c-format.c (location_from_offset): Return LOC if LINE is null.
8963 2015-06-05 Aldy Hernandez <aldyh@redhat.com>
8965 * c-common.h (c_parse_final_cleanups): New prototype.
8966 * c-opts.c (c_common_parse_file): Call c_parse_final_cleanups.
8968 2015-06-04 Sriraman Tallam <tmsriram@google.com>
8970 * c-common.c (noplt): New attribute.
8971 (handle_noplt_attribute): New handler.
8973 2015-06-04 Andrew MacLeod <amacleod@redhat.com>
8975 * array-notation-common.c: Adjust includes for restructured coretypes.h.
8976 * c-ada-spec.c: Likewise.
8977 * c-cilkplus.c: Likewise.
8978 * c-common.c: Likewise.
8979 * c-common.h: Likewise.
8980 * c-cppbuiltin.c: Likewise.
8981 * c-dump.c: Likewise.
8982 * c-format.c: Likewise.
8983 * c-gimplify.c: Likewise.
8984 * c-indentation.c: Likewise.
8985 * c-lex.c: Likewise.
8986 * c-omp.c: Likewise.
8987 * c-opts.c: Likewise.
8988 * c-pch.c: Likewise.
8989 * c-ppoutput.c: Likewise.
8990 * c-pragma.c: Likewise.
8991 * c-pretty-print.c: Likewise.
8992 * c-semantics.c: Likewise.
8993 * c-ubsan.c: Likewise.
8995 * stub-objc.c: Likewise.
8997 2015-06-02 David Malcolm <dmalcolm@redhat.com>
9000 * c-indentation.c (should_warn_for_misleading_indentation): Use
9001 expand_location rather than expand_location_to_spelling_point.
9002 Don't warn if the guarding statement is more indented than the
9005 2015-06-02 David Malcolm <dmalcolm@redhat.com>
9007 * c-indentation.c (warn_for_misleading_indentation): Bail out
9008 immediately if -Wmisleading-indentation isn't enabled.
9010 2015-06-01 Martin Liska <mliska@suse.cz>
9012 * c-format.c (check_format_arg):Use new type-based pool allocator.
9013 (check_format_info_main) Likewise.
9015 2015-05-31 Eric Botcazou <ebotcazou@adacore.com>
9017 * c-ada-spec.c (is_tagged_type): Test for TYPE_METHODS on main variant.
9018 (has_nontrivial_methods): Likewise.
9020 2015-05-25 Marek Polacek <polacek@redhat.com>
9022 * c-ubsan.c (ubsan_instrument_shift): Use type0.
9024 2015-05-22 Marek Polacek <polacek@redhat.com>
9027 * c-common.c (handle_deprecated_attribute): Allow CONST_DECL.
9029 2015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
9031 * c-cppbuiltin.c (c_cpp_builtins): Use if instead of #if with
9032 STACK_GROWS_DOWNWARD.
9034 2015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
9036 * c-cppbuiltin.c (c_cpp_builtins): Check the value of
9037 STACK_GROWS_DOWNWARD rather than if it is defined.
9039 2015-05-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
9042 * c-format.c (location_column_from_byte_offset): New.
9043 (location_from_offset): New.
9044 (struct format_wanted_type): Add offset_loc field.
9045 (check_format_info): Move handling of location for extra arguments
9046 closer to the point of warning.
9047 (check_format_info_main): Pass the result of location_from_offset
9049 (format_type_warning): Pass the result of location_from_offset
9052 2015-05-20 Marek Polacek <polacek@redhat.com>
9054 * c-omp.c (check_omp_for_incr_expr): Use BINARY_CLASS_P.
9056 2015-05-20 Marek Polacek <polacek@redhat.com>
9058 * c-ada-spec.c (dump_sloc): Use DECL_P.
9060 2015-05-20 Marek Polacek <polacek@redhat.com>
9062 * c-pragma.c: Use VAR_OR_FUNCTION_DECL_P throughout.
9063 * c-common.c: Likewise.
9065 2015-05-19 David Malcolm <dmalcolm@redhat.com>
9067 * c-common.h (fe_file_change): Strengthen param from
9068 const line_map * to const line_map_ordinary *.
9069 (pp_file_change): Likewise.
9070 * c-lex.c (fe_file_change): Likewise.
9071 (cb_define): Use linemap_check_ordinary when invoking
9073 (cb_undef): Likewise.
9074 * c-opts.c (c_finish_options): Use linemap_check_ordinary when
9075 invoking cb_file_change.
9076 (c_finish_options): Likewise.
9077 (push_command_line_include): Likewise.
9078 (cb_file_change): Strengthen param "new_map" from
9079 const line_map * to const line_map_ordinary *.
9080 * c-ppoutput.c (cb_define): Likewise for local "map".
9081 (pp_file_change): Likewise for param "map" and local "from".
9083 2015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
9085 * c-common.c (shorten_compare): Use std::swap instead of explicit swaps.
9087 2015-05-18 Tom de Vries <tom@codesourcery.com>
9089 * c-common.c (build_va_arg_1): New function.
9090 (build_va_arg): Add address operator to va_list operand if necessary.
9092 2015-05-15 Mikhail Maltsev <maltsevm@gmail.com>
9095 * c-common.c (int_safely_convertible_to_real_p): Define.
9096 (unsafe_conversion_p): Check conversions involving complex types.
9097 (conversion_warning): Add new warning message for conversions which
9098 discard imaginary component.
9099 * c-common.h: (enum conversion_safety): Add new enumerator for such
9102 2015-05-14 Marek Polacek <polacek@redhat.com>
9106 * c-common.c (c_fully_fold): Pass false down to c_fully_fold_internal.
9107 (c_fully_fold_internal): Fold C_MAYBE_CONST_EXPRs with
9108 C_MAYBE_CONST_EXPR_INT_OPERANDS set. Add FOR_INT_CONST argument and
9109 use it. If FOR_INT_CONST, require that all evaluated operands be
9112 2015-05-12 David Malcolm <dmalcolm@redhat.com>
9114 * c-common.h (warn_for_misleading_indentation): New prototype.
9115 * c-indentation.c: New file.
9116 * c.opt (Wmisleading-indentation): New option.
9118 2015-05-12 Tom de Vries <tom@codesourcery.com>
9120 PR tree-optimization/66010
9121 * c-common.c (build_va_arg): Don't mark ap addressable unless necessary.
9123 2015-05-09 Jason Merrill <jason@redhat.com>
9125 * c-opts.c (c_common_post_options): Also clear
9126 cpp_opts->cpp_warn_cxx11_compat.
9128 * c-common.h (enum cxx_dialect): Add cxx_unset.
9129 * c-common.c (cxx_dialect): Initialize to cxx_unset.
9130 * c-opts.c (c_common_post_options): Set C++ dialect to C++98 if unset.
9132 * c.opt (std=c++14): Remove Undocumented flag and experimental warning.
9133 (std=gnu++0x): Mark as Undocumented.
9134 (std=gnu++1y): Add deprecated message.
9136 2015-05-08 Jason Merrill <jason@redhat.com>
9138 * c.opt (Wc++11-compat): Make primary. Rename var warn_cxx11_compat.
9141 * c.opt (Wc++0x-compat): Also set cpp_warn_cxx11_compat.
9143 2015-05-08 Marek Polacek <polacek@redhat.com>
9146 * c.opt (Woverride-init-side-effects): New option.
9148 2015-05-07 Marek Polacek <polacek@redhat.com>
9151 * c-common.c (c_fully_fold_internal): Warn when left shifting a
9153 * c.opt (Wshift-negative-value): New option.
9154 * c-opts.c (c_common_post_options): Set warn_shift_negative_value
9155 when -Wextra and C99/C++11 mode.
9157 2015-05-07 Marek Polacek <polacek@redhat.com>
9158 Martin Uecker <uecker@eecs.berkeley.edu>
9160 * c-ubsan.c (ubsan_instrument_bounds): Don't skip instrumenting
9161 flexible member array-like members if SANITIZE_BOUNDS_STRICT.
9163 2015-05-05 Jason Merrill <jason@redhat.com>
9165 * c.opt (Wterminate): New.
9167 2015-04-30 Marek Polacek <polacek@redhat.com>
9169 * c-common.c (maybe_warn_bool_compare): When comparing with 0/1,
9170 require that the non-constant be of a boolean type.
9172 2015-04-29 Josh Triplett <josh@joshtriplett.org>
9174 * c-common.c (handle_section_attribute): Refactor to reduce
9175 nesting and distinguish between error cases.
9177 2015-04-29 Marek Polacek <polacek@redhat.com>
9180 * c-common.c (maybe_warn_bool_compare): Warn when comparing a boolean
9183 2015-04-29 Jakub Jelinek <jakub@redhat.com>
9185 * c-common.h (omp_clause_mask): Unconditionally define as a class.
9186 Use uint64_t instead of unsigned HOST_WIDE_INT and 64 instead of
9187 HOST_BITS_PER_WIDE_INT.
9189 2015-04-28 Tom de Vries <tom@codesourcery.com>
9191 PR tree-optimization/65887
9192 * c-common.c (build_va_arg): Mark va_arg ap argument as addressable.
9194 2015-04-28 Eric Botcazou <ebotcazou@adacore.com>
9195 Pierre-Marie de Rodat <derodat@adacore.com>
9197 * c-ada-spec.c (in_function): Delete.
9198 (dump_generic_ada_node): Do not change in_function and remove the
9199 redundant code dealing with it.
9200 (print_ada_declaration): Do not change in_function. Use INDENT_INCR.
9201 (print_ada_methods): Output the static member functions in a nested
9202 package after the regular methods as well as associated renamings.
9204 2015-04-24 Marek Polacek <polacek@redhat.com>
9207 * c-common.c (c_fully_fold_internal): Use OPT_Wshift_count_negative
9208 and OPT_Wshift_count_overflow.
9211 * c-common.c (warn_logical_operator): Warn if the operands have the
9214 2015-04-24 Marek Polacek <polacek@redhat.com>
9217 * c-common.c (warn_logical_operator): Bail if either operand comes
9218 from a macro expansion.
9220 2015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
9223 * c-common.c (c_default_pointer_mode): Add definition.
9224 * c-common.h (c_default_pointer_mode): Add declaration.
9226 2015-03-11 Jakub Jelinek <jakub@redhat.com>
9228 * c-common.c (c_common_nodes_and_builtins): Don't call xstrdup
9229 on record_builtin_type argument.
9231 2015-03-10 Jakub Jelinek <jakub@redhat.com>
9234 * c-common.c (warn_logical_not_parentheses): Don't warn for
9237 2015-03-07 Marek Polacek <polacek@redhat.com>
9240 * c-ubsan.c (ubsan_instrument_bounds): Check for COMPONENT_REF
9241 before trying to figure out whether we have a flexible array member.
9243 2015-03-06 Eric Botcazou <ebotcazou@adacore.com>
9244 Jonathan Wakely <jwakely.gcc@gmail.com>
9246 * c-ada-spec.c (dump_ada_double_name): Fix pasto.
9248 2015-03-05 Eric Botcazou <ebotcazou@adacore.com>
9251 * c-ada-spec.c (print_destructor): Remove obsolete code.
9253 2015-03-01 Eric Botcazou <ebotcazou@adacore.com>
9255 * c-ada-spec.c (is_tagged_type): Add guard for DECL_VINDEX.
9256 (dump_template_types): Adjust DECL_TEMPLATE_INSTANTIATIONS and
9257 DECL_TEMPLATE_RESULT emulations.
9258 (dump_ada_template)): Add guard for TYPE_METHODS.
9260 2015-02-27 Marek Polacek <polacek@redhat.com>
9263 * c.opt (Wformat-signedness): Don't enable by -Wformat=2.
9265 2015-02-27 Kai Tietz <ktietz@redhat.com>
9268 * c-pragma.c (handle_pragma_weak): Do not try to create
9269 weak/alias of declarations not being function, or variable
9272 2015-02-24 Thomas Schwinge <thomas@codesourcery.com>
9275 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
9277 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
9279 2015-02-16 Marek Polacek <polacek@redhat.com>
9282 * c-format.c (check_format_types): Handle null param.
9284 2015-02-13 Marek Polacek <polacek@redhat.com>
9287 * c-format.c (check_format_types): Don't warn about different
9288 signedness if the original value is in the range of WANTED_TYPE.
9290 2015-02-12 Jason Merrill <jason@redhat.com>
9293 * c-opts.c (c_common_post_options): Change flag_abi_version from 0
9294 to the current highest version.
9295 * c-cppbuiltin.c (c_cpp_builtins): Assert that it isn't 0.
9297 2015-02-04 Jakub Jelinek <jakub@redhat.com>
9301 * c-omp.c (c_finish_omp_atomic): Use TRUNC_DIV_EXPR
9302 instead of RDIV_EXPR. Use build_binary_op instead of
9305 2015-01-30 Joseph Myers <joseph@codesourcery.com>
9307 * c-opts.c, c-pch.c, cppspec.c: All callers of fatal_error changed
9308 to pass input_location as first argument.
9310 2015-01-23 Tom de Vries <tom@codesourcery.com>
9313 * c.opt (fopenacc): Mark as LTO option.
9315 2015-01-23 Tom de Vries <tom@codesourcery.com>
9318 * c.opt (fopenmp): Mark as LTO option.
9320 2015-01-21 Jakub Jelinek <jakub@redhat.com>
9323 * cilk.c (fill_decls_vec): Only put decls into vector v.
9324 (compare_decls): Fix up formatting.
9326 2015-01-21 Igor Zamyatin <igor.zamyatin@intel.com>
9329 * cilk.c: Include vec.h.
9330 (struct cilk_decls): New structure.
9331 (wrapper_parm_cb): Split this function to...
9332 (fill_decls_vec): ...this...
9333 (create_parm_list): ...and this.
9334 (compare_decls): New function.
9335 (for_local_cb): Remove.
9336 (wrapper_local_cb): Ditto.
9337 (build_wrapper_type): For now first traverse and fill vector of
9338 declarations then sort it and then deal with sorted vector.
9339 (cilk_outline): Ditto.
9340 (declare_one_free_variable): Ditto.
9342 2015-01-21 Jason Merrill <jason@redhat.com>
9345 * c-format.c (check_format_arg): Call decl_constant_value.
9347 2015-01-19 Martin Liska <mliska@suse.cz>
9349 * c-common.c (handle_noicf_attribute): New function.
9351 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
9352 Bernd Schmidt <bernds@codesourcery.com>
9353 James Norris <jnorris@codesourcery.com>
9354 Cesar Philippidis <cesar@codesourcery.com>
9355 Ilmir Usmanov <i.usmanov@samsung.com>
9356 Jakub Jelinek <jakub@redhat.com>
9358 * c.opt (fopenacc): New option.
9359 * c-cppbuiltin.c (c_cpp_builtins): Conditionally define _OPENACC.
9360 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
9362 * c-common.h (c_finish_oacc_wait): New prototype.
9363 * c-omp.c: Include "omp-low.h" and "gomp-constants.h".
9364 (c_finish_oacc_wait): New function.
9365 * c-pragma.c (oacc_pragmas): New variable.
9366 (c_pp_lookup_pragma, init_pragma): Handle it.
9367 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_CACHE,
9368 PRAGMA_OACC_DATA, PRAGMA_OACC_ENTER_DATA, PRAGMA_OACC_EXIT_DATA,
9369 PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP, PRAGMA_OACC_PARALLEL,
9370 PRAGMA_OACC_UPDATE, PRAGMA_OACC_WAIT.
9371 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ASYNC,
9372 PRAGMA_OACC_CLAUSE_AUTO, PRAGMA_OACC_CLAUSE_COLLAPSE,
9373 PRAGMA_OACC_CLAUSE_COPY, PRAGMA_OACC_CLAUSE_COPYIN,
9374 PRAGMA_OACC_CLAUSE_COPYOUT, PRAGMA_OACC_CLAUSE_CREATE,
9375 PRAGMA_OACC_CLAUSE_DELETE, PRAGMA_OACC_CLAUSE_DEVICE,
9376 PRAGMA_OACC_CLAUSE_DEVICEPTR, PRAGMA_OACC_CLAUSE_FIRSTPRIVATE,
9377 PRAGMA_OACC_CLAUSE_GANG, PRAGMA_OACC_CLAUSE_HOST,
9378 PRAGMA_OACC_CLAUSE_IF, PRAGMA_OACC_CLAUSE_NUM_GANGS,
9379 PRAGMA_OACC_CLAUSE_NUM_WORKERS, PRAGMA_OACC_CLAUSE_PRESENT,
9380 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPY,
9381 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYIN,
9382 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYOUT,
9383 PRAGMA_OACC_CLAUSE_PRESENT_OR_CREATE, PRAGMA_OACC_CLAUSE_PRIVATE,
9384 PRAGMA_OACC_CLAUSE_REDUCTION, PRAGMA_OACC_CLAUSE_SELF,
9385 PRAGMA_OACC_CLAUSE_SEQ, PRAGMA_OACC_CLAUSE_VECTOR,
9386 PRAGMA_OACC_CLAUSE_VECTOR_LENGTH, PRAGMA_OACC_CLAUSE_WAIT,
9387 PRAGMA_OACC_CLAUSE_WORKER.
9389 2015-01-14 Marcos Diaz <marcos.diaz@tallertechnologies.com>
9391 * c-cppbuiltin.c (c_cpp_builtins): New cpp define __SSP_EXPLICIT__
9392 for the new option fstack-protector_explicit.
9393 * c-common.c (c_common_attribute_table): Add stack_protect attribute.
9394 (handle_stack_protect_attribute): New function.
9396 2015-01-13 Martin Uecker <uecker@eecs.berkeley.edu>
9398 * c.opt: New option -Warray-bounds=.
9400 2015-01-09 Michael Collison <michael.collison@linaro.org>
9402 * array-notation-common.c: Include hash-set.h, machmode.h,
9403 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
9404 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
9405 * c-ada-spec.c: Ditto.
9406 * c-cilkplus.c: Ditto.
9407 * c-common.c: Include input.h due to flattening of tree.h.
9408 Define macro GCC_C_COMMON_C.
9409 * c-common.h: Flatten tree.h header files into c-common.h.
9410 Remove include of tree-core.h.
9411 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
9412 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
9413 fold-const.h, wide-int.h, and inchash.h due to
9414 flattening of tree.h.
9416 * c-format.c: Flatten tree.h header files into c-common.h.
9417 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
9418 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
9419 fold-const.h, wide-int.h, and inchash.h due to
9420 flattening of tree.h.
9421 * c-dump.c: Include hash-set.h, machmode.h,
9422 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
9423 fold-const.h, wide-int.h, and inchash.h due to
9424 flattening of tree.h.
9425 * c-format.c: Include hash-set.h, machmode.h,
9426 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
9427 fold-const.h, wide-int.h, inchash.h and real.h due to
9428 flattening of tree.h.
9429 * c-gimplify.c: Include hash-set.h, machmode.h,
9430 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
9431 fold-const.h, wide-int.h, and inchash.h due to
9432 flattening of tree.h.
9438 * c-ppoutput.c: Ditto.
9439 * c-pragma.c: Ditto.
9440 * c-pretty-print.c: Ditto.
9441 * c-semantics.c: Ditto.
9443 * stub-objc.c: Ditto.
9445 2015-01-08 Jason Merrill <jason@redhat.com>
9447 * c-ubsan.c (ubsan_maybe_instrument_array_ref): Use
9448 do_ubsan_in_current_function.
9449 (ubsan_maybe_instrument_reference_or_call): Likewise.
9450 * c-ubsan.h: Declare it.
9452 2015-01-08 Mike Stump <mikestump@comcast.net>
9454 * c-common.c (c_common_attribute_table): Add no_sanitize_thread.
9456 2015-01-07 Marek Polacek <polacek@redhat.com>
9459 * c-common.c (c_fully_fold_internal): Warn for division and modulo
9460 if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST and is zero.
9462 2015-01-05 Trevor Saunders <tsaunders@mozilla.com>
9465 * c.opt (Wsuggest-override): New option.
9467 2015-01-05 Jakub Jelinek <jakub@redhat.com>
9469 Update copyright years.
9471 2015-01-05 Marek Polacek <polacek@redhat.com>
9474 * c-common.c (warn_array_subscript_with_type_char): Add location_t
9476 * c-common.h (warn_array_subscript_with_type_char): Update
9479 2014-12-20 Edward Smith-Rowland <3dw4rd@verizon.net>
9481 * c-cppbuiltin.c (__cpp_sized_deallocation): Uncomment and move macro.
9482 Control macro with flag_sized_deallocation.
9484 2014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
9486 * c.opt (Wdiscarded-array-qualifiers): New option.
9488 2014-12-19 Jakub Jelinek <jakub@redhat.com>
9490 PR preprocessor/63831
9491 * c-cppbuiltin.c (c_cpp_builtins): Don't define __has_attribute
9492 and __has_cpp_attribute here.
9493 * c-ppoutput.c (init_pp_output): Set cb->has_attribute to
9494 c_common_has_attribute.
9495 * c-common.h (c_common_has_attribute): New prototype.
9496 * c-lex.c (init_c_lex): Set cb->has_attribute to
9497 c_common_has_attribute instead of cb_has_attribute.
9498 (get_token_no_padding): New function.
9499 (cb_has_attribute): Renamed to ...
9500 (c_common_has_attribute): ... this. No longer static. Use
9501 get_token_no_padding, require ()s, don't build TREE_LIST
9502 unnecessarily, fix up formatting, adjust diagnostics, call
9505 2014-12-15 Jason Merrill <jason@redhat.com>
9507 * c.opt (-fsized-deallocation, -Wc++14-compat): New.
9508 (-Wsized-deallocation): New.
9509 * c-opts.c (c_common_post_options): -fsized-deallocation defaults
9510 to on in C++14 and up.
9512 2014-12-11 Jason Merrill <jason@redhat.com>
9514 * c-cppbuiltin.c (c_cpp_builtins): Enable C++14 __cpp_constexpr.
9516 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_runtime_arrays if
9517 we aren't complaining about VLAs.
9519 2014-12-06 Marek Polacek <polacek@redhat.com>
9521 PR tree-optimization/64183
9522 * c-gimplify.c (c_gimplify_expr): Don't convert the RHS of a
9523 shift-expression if it is integer_type_node. Use types_compatible_p.
9525 2014-11-29 Jakub Jelinek <jakub@redhat.com>
9527 * c-common.c (convert_vector_to_pointer_for_subscript): Remove NULL
9528 last argument from create_tmp_var_raw and create_tmp_var calls.
9529 * cilk.c (gimplify_cilk_spawn): Likewise.
9530 * c-omp.c (c_finish_omp_atomic): Likewise.
9532 2014-11-28 Marek Polacek <polacek@redhat.com>
9534 * c-ubsan.c (ubsan_instrument_shift): Use op1_utype for MINUS_EXPR
9535 instead of unsigned_type_node.
9537 2014-11-28 Marek Polacek <polacek@redhat.com>
9540 * c-ubsan.c (ubsan_instrument_shift): Change the type of a MINUS_EXPR
9542 * c-gimplify.c (c_gimplify_expr): Convert right operand of a shift
9543 expression to unsigned_type_node.
9545 2014-11-20 Mark Wielaard <mjw@redhat.com>
9548 * c-opts.c (set_std_c89): Set lang_hooks.name.
9549 (set_std_c99): Likewise.
9550 (set_std_c11): Likewise.
9551 (set_std_cxx98): Likewise.
9552 (set_std_cxx11): Likewise.
9553 (set_std_cxx14): Likewise.
9554 (set_std_cxx1z): Likewise.
9556 2014-11-21 Jakub Jelinek <jakub@redhat.com>
9559 * c-common.h (convert_vector_to_pointer_for_subscript): Change
9560 return type to bool.
9561 * c-common.c: Include gimple-expr.h.
9562 (convert_vector_to_pointer_for_subscript): Change return type to
9563 bool. If *vecp is not lvalue_p and has VECTOR_TYPE, return true
9564 and copy it into a TARGET_EXPR and use that instead of *vecp
9567 2014-11-19 David Malcolm <dmalcolm@redhat.com>
9569 Merger of git branch "gimple-classes-v2-option-3".
9570 * ChangeLog.gimple-classes: New.
9571 * c-gimplify.c (add_block_to_enclosing): Strengthen local "stack"
9572 from being just a vec<gimple> to a vec<gbind *>.
9574 2014-11-18 Jakub Jelinek <jakub@redhat.com>
9577 * c-ubsan.c (ubsan_maybe_instrument_reference_or_call): Change type
9578 argument to ptype, set type to TREE_TYPE (ptype). Don't call
9579 get_pointer_alignment for non-pointers. Use ptype, or if it is
9580 reference type, corresponding pointer type, as type of kind
9582 (ubsan_maybe_instrument_reference,
9583 ubsan_maybe_instrument_member_call): Adjust callers.
9585 2014-11-15 Marek Polacek <polacek@redhat.com>
9588 * array-notation-common.c (is_sec_implicit_index_fn): Return false
9590 (extract_array_notation_exprs): Return for NULL node.
9592 2014-11-12 Joseph Myers <joseph@codesourcery.com>
9594 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Define and
9595 undefine __NO_MATH_ERRNO__ based on changes to -fmath-errno state.
9597 2014-11-12 Jakub Jelinek <jakub@redhat.com>
9600 * c-common.c (check_builtin_function_arguments): Handle
9601 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW.
9603 2014-11-10 Andi Kleen <ak@linux.intel.com>
9606 * c-common.h (check_no_cilk): Declare.
9607 * cilk.c (get_error_location): New function.
9608 (check_no_cilk): Dito.
9610 2014-11-10 Andi Kleen <ak@linux.intel.com>
9612 * cilk.c (recognize_spawn): Use expression location
9615 2014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
9617 * c.opt ([Wshift-count-negative, Wshift-count-overflow]): Add.
9619 2014-11-10 Edward Smith-Rowland <3dw4rd@verizon.net>
9621 * c-cppbuiltin.c (__has_attribute, __has_cpp_attribute): New macros;
9622 (__cpp_rtti, __cpp_exceptions): New macros for C++98;
9623 (__cpp_range_based_for, __cpp_initializer_lists,
9624 __cpp_delegating_constructors, __cpp_nsdmi,
9625 __cpp_inheriting_constructors, __cpp_ref_qualifiers): New macros
9626 for C++11; (__cpp_attribute_deprecated): Remove in favor of
9627 __has_cpp_attribute.
9628 * c-lex.c (cb_has_attribute): New callback CPP function;
9629 (init_c_lex): Set has_attribute callback.
9631 2014-11-04 Richard Biener <rguenther@suse.de>
9633 * c-common.c (shorten_compare): Do not shorten mixed
9634 DFP and non-DFP compares.
9636 2014-11-01 Edward Smith-Rowland <3dw4rd@verizon.net>
9638 * g++.dg/cpp1y/feat-cxx11.C: Commentary and rearrangement of tests.
9639 * g++.dg/cpp1y/feat-cxx11-neg.C: Add aggregate NSDMI test.
9640 Commentary and rearrangement of tests.
9641 * g++.dg/cpp1y/feat-cxx14.C: Enable aggregate NSDMI test.
9642 Commentary and rearrangement of tests.
9643 * g++.dg/cpp1y/feat-cxx98-neg.C: Ditto.
9644 * g++.dg/cpp1y/feat-cxx98.C: Commentary.
9646 2014-10-29 Richard Sandiford <richard.sandiford@arm.com>
9648 * c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant
9649 enum from machine_mode.
9651 2014-10-28 Andrew MacLeod <amacleod@redhat.com>
9653 * c-common.c: Adjust include files.
9654 * c-gimplify.c: Ditto.
9656 * c-pragma.c: Ditto.
9659 2014-10-27 Andrew MacLeod <amacleod@redhat.com>
9661 * c-gimplify.c: Adjust include files.
9663 2014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
9666 * c-opts.c (c_common_diagnostics_set_defaults): Renamed from
9667 c_common_initialize_diagnostics.
9668 * c-common.h: Likewise.
9670 2014-10-24 Marek Polacek <polacek@redhat.com>
9673 * c-pretty-print.c (c_pretty_printer::simple_type_specifier): Don't
9674 print "struct"/"union"/"enum" for typedefed names.
9676 2014-10-23 Marek Polacek <polacek@redhat.com>
9678 * c-ubsan.c (ubsan_instrument_shift): Perform the MINUS_EXPR
9681 2014-10-22 Jakub Jelinek <jakub@redhat.com>
9682 Yury Gribov <y.gribov@samsung.com>
9684 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
9685 ubsan_instrument_vla): Check bits in flag_sanitize_recover bitmask
9686 instead of flag_sanitize_recover as bool flag.
9688 2014-10-21 Kirill Yukhin <kirill.yukhin@intel.com>
9690 * cilk.c: Revert previous change.
9692 2014-10-20 Igor Zamyatin <igor.zamyatin@intel.com>
9695 * cilk.c: Include vec.h.
9696 (struct cilk_decls): New structure.
9697 (wrapper_parm_cb): Split this function to...
9698 (fill_decls_vec): ...this...
9699 (create_parm_list): ...and this.
9700 (compare_decls): New function.
9701 (for_local_cb): Remove.
9702 (wrapper_local_cb): Ditto.
9703 (build_wrapper_type): For now first traverse and fill vector of
9704 declarations then sort it and then deal with sorted vector.
9705 (cilk_outline): Ditto.
9706 (declare_one_free_variable): Ditto.
9708 2014-10-17 Marek Polacek <polacek@redhat.com>
9710 * c-opts.c (c_common_post_options): Set warn_implicit_int.
9711 * c.opt (Wimplicit-int): Initialize to -1.
9713 2014-10-16 Andrew MacLeod <amacleod@redhat.com>
9715 * c-pragma.c: Adjust include files.
9716 * c-semantics.c: Likewise.
9718 2014-10-16 DJ Delorie <dj@redhat.com>
9720 * c-cppbuiltin.c (cpp_atomic_builtins): Don't assume pointers are
9723 2014-10-14 Jason Merrill <jason@redhat.com>
9726 * c-common.h (CPP_PREPARSED_EXPR): New.
9727 (N_CP_TTYPES): Adjust.
9729 2014-10-15 Marek Polacek <polacek@redhat.com>
9731 * c-opts.c (c_common_init_options): Make -std=gnu11 the default for C.
9733 2014-10-14 DJ Delorie <dj@redhat.com>
9735 * c-pretty-print.c (pp_c_integer_constant): Check for all __intN
9736 types, not just __int128.
9737 * c-cppbuiltin.c (c_cpp_builtins): Add builtins for all __intN
9738 types, not just __int128.
9739 (cpp_atomic_builtins): Round pointer sizes up.
9740 (type_suffix): Use type precision, not specific types.
9741 * c-common.c (c_common_reswords): Remove __int128 special case.
9742 (c_common_type_for_size): Check for all __intN types, not just
9744 (c_common_type_for_mode): Likewise.
9745 (c_common_signed_or_unsigned_type): Likewise.
9746 (c_build_bitfield_integer_type): Likewise.
9747 (c_common_nodes_and_builtins): Likewise.
9748 (keyword_begins_type_specifier): Likewise.
9749 * c-common.h (rid): Remove RID_INT128 and add RID_INT_N_* for all
9752 2014-10-12 Trevor Saunders <tsaunders@mozilla.com>
9754 * c-common.c: Use hash_table instead of hashtab.
9756 2014-10-06 Edward Smith-Rowland <3dw4rd@verizon.net>
9758 * c-cppbuiltin.c: Move __cpp_attribute_deprecated to the
9761 2014-10-03 Marc Glisse <marc.glisse@inria.fr>
9766 * c-common.c (warn_logical_operator): Punt for vectors.
9768 2014-10-01 Edward Smith-Rowland <3dw4rd@verizon.net>
9770 Implement SD-6: SG10 Feature Test Recommendations
9771 * c-cppbuiltin.c (c_cpp_builtins()): Define language feature
9772 macros and the __has_header macro.
9774 2014-09-30 Jason Merrill <jason@redhat.com>
9776 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_ASSIGNABLE and
9777 RID_IS_TRIVIALLY_CONSTRUCTIBLE.
9778 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
9780 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_COPYABLE.
9781 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
9783 * c-common.h (enum rid): Remove RID_IS_CONVERTIBLE_TO.
9784 * c-common.c (c_common_reswords): Remove __is_convertible_to.
9786 2014-09-24 Marek Polacek <polacek@redhat.com>
9790 * c-common.h (struct c_common_resword): Don't define CPP_KEYWORD.
9792 2014-09-23 Andi Kleen <ak@linux.intel.com>
9794 * c-common.c (handle_no_reorder_attribute): New function.
9795 (c_common_attribute_table): Add no_reorder attribute.
9797 2014-09-22 Joseph Myers <joseph@codesourcery.com>
9799 * c-cppbuiltin.c (c_cpp_builtins): Define
9800 __LIBGCC_*_EXCESS_PRECISION__ macros for supported floating-point
9803 2014-09-18 Joseph Myers <joseph@codesourcery.com>
9805 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_*_FUNC_EXT__
9806 for supported floating-point modes.
9808 2014-09-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
9810 * c.opt (Wpsabi): Use LangEnabledBy.
9811 * c-opts.c (c_common_handle_option): Do not handle here.
9813 2014-09-12 Joseph Myers <joseph@codesourcery.com>
9815 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_HAS_%s_MODE__
9816 macros for floating-point modes.
9818 2014-09-11 Marc Glisse <marc.glisse@inria.fr>
9821 * c-cppbuiltin.c (builtin_define_float_constants): Correct
9822 __*_DENORM_MIN__ without denormals.
9824 2014-09-10 Jakub Jelinek <jakub@redhat.com>
9826 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
9827 ubsan_instrument_vla, ubsan_instrument_return): Adjust
9828 ubsan_create_data callers.
9829 (ubsan_instrument_bounds): Don't emit UBSAN_BOUNDS at all if
9830 index is constant or BIT_AND_EXPR with constant mask and is
9831 small enough for the bound.
9832 * c-gimplify.c (ubsan_walk_array_refs_r): For ADDR_EXPR of
9833 ARRAY_REF, make sure the inner ARRAY_REF is not walked again.
9835 2014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
9837 * c.opt: Add CppReason to various flags.
9838 (Wdate-time): Re-sort.
9839 * c-common.c: Include c-common.h earlier.
9840 (struct reason_option_codes_t): Delete.
9841 (c_option_controlling_cpp_error): Prefix global type and struct
9844 2014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
9846 * c.opt (Wnormalized): New.
9847 (Wnormalized=): Use Enum and Reject Negative.
9848 * c-opts.c (c_common_handle_option): Do not handle Wnormalized here.
9850 2014-09-08 Joseph Myers <joseph@codesourcery.com>
9852 * c-cppbuiltin.c (c_cpp_builtins): Define macros for mantissa
9853 digits of floating-point modes if -fbuilding-libgcc.
9855 2014-09-05 Joseph Myers <joseph@codesourcery.com>
9857 * c-cppbuiltin.c (c_cpp_builtins): Also define
9858 __LIBGCC_EH_TABLES_CAN_BE_READ_ONLY__,
9859 __LIBGCC_EH_FRAME_SECTION_NAME__, __LIBGCC_JCR_SECTION_NAME__,
9860 __LIBGCC_CTORS_SECTION_ASM_OP__, __LIBGCC_DTORS_SECTION_ASM_OP__,
9861 __LIBGCC_TEXT_SECTION_ASM_OP__, __LIBGCC_INIT_SECTION_ASM_OP__,
9862 __LIBGCC_INIT_ARRAY_SECTION_ASM_OP__,
9863 __LIBGCC_STACK_GROWS_DOWNWARD__,
9864 __LIBGCC_DONT_USE_BUILTIN_SETJMP__,
9865 __LIBGCC_DWARF_ALT_FRAME_RETURN_COLUMN__,
9866 __LIBGCC_DWARF_FRAME_REGISTERS__,
9867 __LIBGCC_EH_RETURN_STACKADJ_RTX__, __LIBGCC_JMP_BUF_SIZE__,
9868 __LIBGCC_STACK_POINTER_REGNUM__ and
9869 __LIBGCC_VTABLE_USES_DESCRIPTORS__ for -fbuilding-libgcc.
9870 (builtin_define_with_value): Handle backslash-escaping in string
9873 2014-09-05 Richard Biener <rguenther@suse.de>
9876 * c-format.c (check_format_arg): Properly handle
9877 effectively signed POINTER_PLUS_EXPR offset.
9879 2014-09-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
9881 * c.opt (Wc90-c99-compat,Wc++-compat,Wcomment,Wendif-labels,
9882 Winvalid-pch,Wlong-long,Wmissing-include-dirs,Wmultichar,Wpedantic,
9883 (Wdate-time,Wtraditional,Wundef,Wvariadic-macros): Add CPP, Var
9885 * c-opts.c (c_common_handle_option): Do not handle here.
9886 (sanitize_cpp_opts): Likewise.
9887 * c-common.c (struct reason_option_codes_t): Handle
9888 CPP_W_C90_C99_COMPAT and CPP_W_PEDANTIC.
9890 2014-09-03 Marek Polacek <polacek@redhat.com>
9892 * c.opt (Wlogical-not-parentheses): Enable by -Wall.
9894 2014-09-02 Jakub Jelinek <jakub@redhat.com>
9895 Balaji V. Iyer <balaji.v.iyer@intel.com>
9896 Igor Zamyatin <igor.zamyatin@intel.com>
9898 * c-cilkplus.c (cilk_for_number_of_iterations): New function.
9899 * c-common.c (c_common_reswords): Added _Cilk_for.
9900 * c-common.h (enum rid): Added RID_CILK_FOR.
9901 (cilk_for_number_of_iterations): Add declaration.
9902 * c-omp.c (c_finish_omp_for): Added checks for CILK_SIMD and
9904 * c-pragma.c (init_pragma): Register "grainsize" pragma.
9905 * c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_GRAINSIZE.
9907 2014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
9909 * c.opt (Wbuiltin-macro-redefined,Wdeprecated,Wendif-labels,
9910 Winvalid-pch,Wliteral-suffix,Wmissing-include-dirs,Wtrigraphs,
9911 Wundef): Use CPP, Var and Init.
9912 * c-opts.c (c_common_handle_option): Do not handle the above flags here.
9914 2014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
9916 * c.opt (Wbuiltin-macro-redefined): Use CPP, Var and Init.
9917 * c-opts.c (c_common_handle_option): Do not handle here.
9919 2014-08-25 Jason Merrill <jason@redhat.com>
9921 * c.opt: Change -std=c++1y and -std=gnu++1y to be aliases for
9922 -std=c++14 and -std=gnu++14, rather than the reverse.
9923 * c-opts.c (c_common_handle_option): Change OPT_std_c__1y and
9924 OPT_std_gnu__1y to OPT_std_c__14 and OPT_std_gnu__14.
9925 * c-common.h (cxx_dialect): Remove cxx1y.
9927 2014-08-23 Edward Smith-Rowland <3dw4rd@verizon.net>
9929 * c-common.h (enum cxx_dialect): Add cxx14.
9930 * c-opts.c (set_std_cxx1y): Rename to set_std_cxx14; Use cxx14.
9931 * c-ubsan.c (ubsan_instrument_shift): Change comment and logic from
9932 cxx_dialect == cxx11 || cxx_dialect == cxx1y to cxx_dialect >= cxx11.
9934 2014-08-22 Jason Merrill <jason@redhat.com>
9936 * c.opt (std=gnu++17): Fix alias.
9938 2014-08-22 Marek Polacek <polacek@redhat.com>
9941 * c-common.c (warn_logical_not_parentheses): Don't check LHS. Don't
9942 check for vector types. Drop LHS argument.
9943 * c-common.h (warn_logical_not_parentheses): Adjust.
9945 2014-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
9947 * c.opt (Wcomment): Use CPP, Var and LangEnabledBy.
9948 (Wmultichar): Likewise.
9949 (Wdate-time): Use C-family languages instead of Common. Use CPP
9951 * c-opts.c (c_common_handle_option): Do not handle the above
9953 (sanitize_cpp_opts): Likewise.
9955 2014-08-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
9958 * c-opts.c: Include tree-diagnostics.h.
9959 (c_diagnostic_finalizer): New.
9960 (c_common_initialize_diagnostics): Use it.
9962 2014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
9964 PR preprocessor/51303
9965 * c-common.c (struct reason_option_codes_t option_codes):
9966 Add CPP_W_MISSING_INCLUDE_DIRS. Sort alphabetically.
9968 2014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
9972 * c.opt (Wvariadic-macros): Use CPP and LangEnabledBy.
9973 * c-opts.c (c_common_handle_option): Call cpp_handle_option_auto.
9974 (c_common_post_options): Call init_global_opts_from_cpp.
9975 (sanitize_cpp_opts): Do not handle Wvariadic-macros here.
9977 2014-08-19 Marek Polacek <polacek@redhat.com>
9980 * c-common.c (maybe_warn_bool_compare): New function.
9981 * c-common.h (maybe_warn_bool_compare): Declare.
9982 * c.opt (Wbool-compare): New option.
9984 2014-08-19 Marek Polacek <polacek@redhat.com>
9986 * c.opt (Wc99-c11-compat): New option.
9988 2014-08-19 Marek Polacek <polacek@redhat.com>
9990 * c-opts.c (sanitize_cpp_opts): Make warn_long_long be set according
9991 to warn_c90_c99_compat.
9992 * c.opt (Wc90-c99-compat, Wdeclaration-after-statement): Initialize
9995 2014-08-19 Manuel López-Ibáñez <manu@gcc.gnu.org>
9996 Steven Bosscher <steven@gcc.gnu.org>
9999 * c-format.c: Add extra_arg_loc and format_string_loc to struct
10000 format_check_results.
10001 (check_function_format): Use true and add comment for boolean
10003 (finish_dollar_format_checking): Use explicit location when warning.
10004 (check_format_info): Likewise.
10005 (check_format_arg): Set extra_arg_loc and format_string_loc.
10006 (check_format_info_main): Use explicit location when warning.
10007 (check_format_types): Pass explicit location.
10008 (format_type_warning): Likewise.
10010 2014-08-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
10013 * c-format.c: Handle Fortran flags.
10015 2014-08-12 Igor Zamyatin <igor.zamyatin@intel.com>
10018 * array-notation-common.c (find_rank): Added handling for other
10019 types of references.
10021 2014-08-10 Marek Polacek <polacek@redhat.com>
10024 * c-opts.c (sanitize_cpp_opts): Pass warn_c90_c99_compat to libcpp.
10025 * c.opt (Wc90-c99-compat): Add option.
10027 2014-08-07 Trevor Saunders <tsaunders@mozilla.com>
10029 * c-gimplify.c, cilk.c: Remove includes of pointer-set.h.
10031 2014-08-03 Marek Polacek <polacek@redhat.com>
10033 * c-common.c (check_case_value): Add location_t parameter. Use it.
10034 (c_add_case_label): Pass loc to check_case_value.
10036 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
10038 * cilk.c: Use hash_map instead of pointer_map.
10040 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
10042 * c-gimplify.c: Use hash_set instead of pointer_set.
10044 2014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
10046 PR middle-end/61455
10047 * array-notation-common.c (extract_array_notation_exprs): Handling
10048 of DECL_EXPR added.
10050 2014-08-01 Jakub Jelinek <jakub@redhat.com>
10052 * c-common.h (min_align_of_type): Removed prototype.
10053 * c-common.c (min_align_of_type): Removed.
10054 * c-ubsan.h (ubsan_maybe_instrument_reference,
10055 ubsan_maybe_instrument_member_call): New prototypes.
10056 * c-ubsan.c: Include stor-layout.h and builtins.h.
10057 (ubsan_maybe_instrument_reference_or_call,
10058 ubsan_maybe_instrument_reference, ubsan_maybe_instrument_call): New
10061 2014-07-31 Marc Glisse <marc.glisse@inria.fr>
10064 * c.opt (-Wreturn-local-addr): Move to common.opt.
10066 2014-07-30 Jason Merrill <jason@redhat.com>
10071 * c.opt (-fuse-all-virtuals): New.
10073 2014-07-30 Tom Tromey <tromey@redhat.com>
10076 * c.opt (Wdesignated-init): New option.
10077 * c-common.c (c_common_attribute_table): Add "designated_init".
10078 (handle_designated_init): New function.
10080 2014-07-24 Marek Polacek <polacek@redhat.com>
10083 * c-opts.c (c_finish_options): If -imacros is in effect, return.
10085 2014-07-16 Dodji Seketeli <dodji@redhat.com>
10087 PR preprocessor/60723 - missing system-ness marks for macro tokens
10088 * c-ppoutput.c (struct print::prev_was_system_token): New data
10090 (init_pp_output): Initialize it.
10091 (maybe_print_line_1, maybe_print_line, print_line_1, print_line)
10092 (do_line_change): Return a flag saying if a line marker was
10094 (scan_translation_unit): Detect if the system-ness of the token we
10095 are about to emit is different from the one of the previously
10096 emitted token. If so, emit a line marker. Avoid emitting useless
10097 adjacent line markers. Avoid emitting line markers for tokens
10098 originating from the expansion of built-in macros.
10099 (scan_translation_unit_directives_only): Adjust.
10101 2014-07-15 Marek Polacek <polacek@redhat.com>
10103 * c-ubsan.c (ubsan_instrument_bounds): Don't instrument if
10104 TYPE_MAX_VALUE is NULL.
10106 2014-07-14 Jakub Jelinek <jakub@redhat.com>
10108 PR middle-end/61294
10109 * c.opt (Wmemset-transposed-args): New warning.
10111 2014-07-10 Jason Merrill <jason@redhat.com>
10115 * c.opt (-fuse-all-virtuals): New.
10117 2014-07-09 Richard Biener <rguenther@suse.de>
10120 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
10121 using unsigned arithmetic if overflow does not wrap instead of
10122 if overflow is undefined.
10124 2014-07-06 Marek Polacek <polacek@redhat.com>
10127 * c.opt (Wsizeof-array-argument): New option.
10129 2014-07-03 Jakub Jelinek <jakub@redhat.com>
10131 * c-ada-spec.c (dump_ada_nodes): Don't call qsort if
10132 comments->count <= 1, as comments->entries might be NULL.
10134 2014-07-01 Marek Polacek <polacek@redhat.com>
10136 * c.opt (Wint-conversion): New option.
10138 2014-07-01 Marek Polacek <polacek@redhat.com>
10141 * c.opt (Wincompatible-pointer-types): New option.
10143 2014-06-30 Paolo Carlini <paolo.carlini@oracle.com>
10146 * c-common.c (handle_noreturn_attribute, handle_const_attribute):
10147 Do not discard TYPE_QUALS of type.
10149 2014-06-26 Jason Merrill <jason@redhat.com>
10151 * c-common.h (enum cxx_dialect): Add cxx1z.
10152 * c.opt (std=c++1z, std=c++17, std=gnu++1z, std=gnu++17): New.
10153 * c-opts.c (c_common_handle_option, set_std_cxx1z): Handle it.
10155 2014-06-26 Teresa Johnson <tejohnson@google.com>
10157 * c-common.h (get_dump_info): Declare.
10158 * c-gimplify.c (c_genericize): Use saved dump files.
10159 * c-opts.c (c_common_parse_file): Begin and end dumps
10160 once around parsing invocation.
10161 (get_dump_info): New function.
10163 2014-06-23 Marek Polacek <polacek@redhat.com>
10164 Andrew MacLeod <amacleod@redhat.com>
10167 * c-common.c (get_atomic_generic_size): Don't segfault if the
10168 type doesn't have a size.
10170 2014-06-20 Marek Polacek <polacek@redhat.com>
10172 * c-gimplify.c: Include "c-ubsan.h" and "pointer-set.h".
10173 (ubsan_walk_array_refs_r): New function.
10174 (c_genericize): Instrument array bounds.
10175 * c-ubsan.c: Include "internal-fn.h".
10176 (ubsan_instrument_division): Mark instrumented arrays as having
10177 side effects. Adjust ubsan_type_descriptor call.
10178 (ubsan_instrument_shift): Likewise.
10179 (ubsan_instrument_vla): Adjust ubsan_type_descriptor call.
10180 (ubsan_instrument_bounds): New function.
10181 (ubsan_array_ref_instrumented_p): New function.
10182 (ubsan_maybe_instrument_array_ref): New function.
10183 * c-ubsan.h (ubsan_instrument_bounds): Declare.
10184 (ubsan_array_ref_instrumented_p): Declare.
10185 (ubsan_maybe_instrument_array_ref): Declare.
10187 2014-06-20 Hale Wang <hale.wang@arm.com>
10190 * c.opt (fshort-enums): Add to LTO.
10191 * c.opt (fshort-wchar): Likewise.
10193 2014-06-16 Marek Polacek <polacek@redhat.com>
10196 * c.opt (Wswitch-bool): Add Var.
10198 2014-06-12 Jakub Jelinek <jakub@redhat.com>
10200 PR middle-end/61486
10201 * c-omp.c (c_omp_split_clauses): Don't crash on firstprivate in
10202 #pragma omp target teams or
10203 #pragma omp {,target }teams distribute simd.
10205 2014-06-12 Jason Merrill <jason@redhat.com>
10207 * c.opt (Wabi=, fabi-compat-version): New.
10208 * c-opts.c (c_common_handle_option): Handle -Wabi=.
10209 (c_common_post_options): Handle flag_abi_compat_version default.
10210 Disallow -fabi-compat-version=1.
10211 * c-common.h (abi_version_crosses): New.
10213 2014-06-11 Jan Hubicka <hubicka@ucw.cz>
10215 * c-common.c (handle_section_attribute): Update handling for
10216 section names that are no longer trees.
10218 2014-06-10 Jakub Jelinek <jakub@redhat.com>
10221 * c-pragma.c (omp_pragmas_simd): Move PRAGMA_OMP_TASK...
10222 (omp_pragmas): ... back here.
10224 2014-06-05 Marek Polacek <polacek@redhat.com>
10227 * c-common.c (warn_logical_not_parentheses): New function.
10228 * c-common.h (warn_logical_not_parentheses): Declare.
10229 * c.opt (Wlogical-not-parentheses): New option.
10231 2014-06-04 Marek Polacek <polacek@redhat.com>
10234 * c-common.c (check_case_bounds): Add location parameter.
10236 (c_add_case_label): Pass loc to check_case_bounds.
10238 2014-06-03 Marek Polacek <polacek@redhat.com>
10241 * c.opt (Wswitch-bool): New option.
10243 2014-05-22 Thomas Schwinge <thomas@codesourcery.com>
10245 * c-common.h (c_omp_sharing_predetermined, c_omp_remap_decl):
10247 (record_types_used_by_current_var_decl): Move prototype to where
10250 * c-common.c (DEF_FUNCTION_TYPE_0, DEF_FUNCTION_TYPE_6)
10251 (DEF_FUNCTION_TYPE_7, DEF_FUNCTION_TYPE_8)
10252 (DEF_FUNCTION_TYPE_VAR_5): Cosmetic fixes.
10254 2014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
10256 * c-common.h (CTI_VOID_ZERO, void_zero_node): Delete.
10257 * c-common.c (c_common_nodes_and_builtins): Don't initialize
10259 * c-pretty-print.c (pp_c_void_constant): New function.
10260 (c_pretty_printer::constant, c_pretty_printer::primary_expression)
10261 (c_pretty_printer::expression): Handle VOID_CST.
10262 * cilk.c (extract_free_variables): Likewise.
10263 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift)
10264 (ubsan_instrument_vla): Use void_node instead of void_zero_node.
10266 2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
10268 * c-common.h (sorted_fields_type): Remove variable_size GTY attribute.
10269 * c-pragma.c (push_alignment): Adjust.
10270 (handle_pragma_push_options): Likewise.
10272 2014-05-09 Marek Polacek <polacek@redhat.com>
10275 * c-common.c (check_user_alignment): Return -1 if alignment is error
10277 (handle_aligned_attribute): Don't call default_conversion on
10279 (handle_vector_size_attribute): Likewise.
10280 (handle_tm_wrap_attribute): Handle case when wrap_decl is error node.
10281 (handle_sentinel_attribute): Call default_conversion and allow even
10282 integral types as an argument.
10284 2014-05-08 Marek Polacek <polacek@redhat.com>
10287 * c-common.c (min_align_of_type): New function factored out from...
10288 (c_sizeof_or_alignof_type): ...here.
10289 * c-common.h (min_align_of_type): Declare.
10291 2014-05-08 Marek Polacek <polacek@redhat.com>
10294 * c-common.c (check_main_parameter_types): Warn for _Atomic-qualified
10295 parameter type of main.
10297 2014-05-07 DJ Delorie <dj@redhat.com>
10299 * c-cppbuiltin.c (print_bits_of_hex): New.
10300 (builtin_define_type_minmax): Print values using hex so as not to
10301 require a pre-computed list of string values.
10303 2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
10304 Mike Stump <mikestump@comcast.net>
10305 Richard Sandiford <rdsandiford@googlemail.com>
10307 * c-ada-spec.c: Include wide-int.h.
10308 (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Remove.
10309 (dump_generic_ada_node): Use wide-int interfaces.
10310 * c-common.c: Include wide-int-print.h.
10311 (shorten_compare): Use wide-int interfaces and tree_int_cst_lt.
10312 (pointer_int_sum): Use wide-int interfaces.
10313 (c_common_nodes_and_builtins): Use make_int_cst.
10314 (match_case_to_enum_1): Use tree_fits_uhwi_p and tree_fits_shwi_p.
10315 (handle_alloc_size_attribute): Use wide-int interfaces.
10316 (get_nonnull_operand): Likewise.
10317 * c-format.c (get_constant): Use tree_fits_uhwi_p.
10318 * c-lex.c: Include wide-int.h.
10319 (narrowest_unsigned_type): Take a widest_int rather than two
10321 (narrowest_signed_type): Likewise.
10322 (interpret_integer): Update accordingly. Use wide-int interfaces.
10323 (lex_charconst): Use wide-int interfaces.
10324 * c-pretty-print.c: Include wide-int.h.
10325 (pp_c_integer_constant): Use wide-int interfaces.
10326 * cilk.c (declare_one_free_variable): Use tree_int_cst_lt instead of
10327 INT_CST_LT_UNSIGNED.
10329 2014-05-06 Richard Biener <rguenther@suse.de>
10331 * c-opts.c (c_common_post_options): For -freestanding,
10332 -fno-hosted and -fno-builtin disable pattern recognition
10333 if not enabled explicitely.
10335 2014-05-02 Marek Polacek <polacek@redhat.com>
10337 * c.opt (Wsizeof-pointer-memaccess): Describe option.
10339 2014-05-01 Marek Polacek <polacek@redhat.com>
10342 * c.opt (Wdiscarded-qualifiers): Add.
10344 2014-04-30 Marek Polacek <polacek@redhat.com>
10346 * c-ubsan.c (ubsan_instrument_division): Handle REAL_TYPEs. Perform
10347 INT_MIN / -1 sanitization only for integer types.
10349 2014-04-25 Marek Polacek <polacek@redhat.com>
10352 * c-common.c (handle_noinline_attribute): Warn if the attribute
10353 conflicts with always_inline attribute.
10354 (handle_always_inline_attribute): Warn if the attribute conflicts
10355 with noinline attribute.
10357 2014-04-25 Marek Polacek <polacek@redhat.com>
10360 * c-common.c (check_main_parameter_types): Warn about variadic main.
10362 2014-04-24 Mike Stump <mikestump@comcast.net>
10364 * c.opt (Wshadow-ivar): Default to on.
10366 2014-04-24 Dimitris Papavasiliou <dpapavas@gmail.com>
10368 * c.opt (Wshadow-ivar, flocal-ivars, fivar-visibility): Add.
10370 2014-04-23 Marek Polacek <polacek@redhat.com>
10372 * c-common.c (handle_tm_wrap_attribute): Tweak error message.
10374 2014-04-22 Jakub Jelinek <jakub@redhat.com>
10377 * c-ubsan.c (ubsan_instrument_return): Return __builtin_trap ()
10378 if flag_sanitize_undefined_trap_on_error.
10379 (ubsan_instrument_division, ubsan_instrument_shift,
10380 ubsan_instrument_vla): Likewise. Use __ubsan_handle_*_abort ()
10381 if !flag_sanitize_recover.
10383 2014-04-22 Marc Glisse <marc.glisse@inria.fr>
10386 * c-common.c (registered_builtin_types): Make non-static.
10387 * c-common.h (registered_builtin_types): Declare.
10389 2014-04-14 Richard Biener <rguenther@suse.de>
10390 Marc Glisse <marc.glisse@inria.fr>
10393 * c-common.c (convert_vector_to_pointer_for_subscript): Properly
10394 apply may-alias the scalar pointer type when applicable.
10396 2014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
10398 PR middle-end/60467
10399 * cilk.c (cilk_set_spawn_marker): Remove FUNCTION_DECL
10400 as possible argument for Cilk_spawn.
10402 2014-04-11 Tobias Burnus <burnus@net-b.de>
10405 * c.opt (Wformat-signedness): Add
10406 * c-format.c(check_format_types): Use it.
10408 2014-04-11 Jason Merrill <jason@redhat.com>
10411 * c-common.c (sync_resolve_size, get_atomic_generic_size): Call
10412 default_conversion for an array argument.
10414 2014-04-08 Marek Polacek <polacek@redhat.com>
10417 * c-ubsan.c: Include asan.h.
10418 (ubsan_instrument_return): Call initialize_sanitizer_builtins.
10420 2014-04-03 Nathan Sidwell <nathan@codesourcery.com>
10422 * c.opt (Wnon-virtual-dtor): Auto set when Weffc++.
10424 2014-04-02 Marek Polacek <polacek@redhat.com>
10426 * c-common.h (c_expand_expr): Remove declaration.
10428 2014-03-28 Jakub Jelinek <jakub@redhat.com>
10431 * c-common.c (add_atomic_size_parameter): When creating new
10432 params vector, push the size argument first.
10434 2014-03-26 Jakub Jelinek <jakub@redhat.com>
10436 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
10437 ubsan_instrument_vla, ubsan_instrument_return): Adjust
10438 ubsan_create_data callers.
10440 2014-03-22 Jakub Jelinek <jakub@redhat.com>
10443 * c-opts.c (c_finish_options): Restore cb_file_change call to
10446 2014-03-13 Jakub Jelinek <jakub@redhat.com>
10448 PR middle-end/36282
10449 * c-pragma.c (apply_pragma_weak): Only look at
10450 TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl)) if
10451 DECL_ASSEMBLER_NAME_SET_P (decl).
10452 (maybe_apply_pending_pragma_weaks): Exit early if
10453 vec_safe_is_empty (pending_weaks) rather than only when
10455 (maybe_apply_pragma_weak): Likewise. If !DECL_ASSEMBLER_NAME_SET_P,
10456 set assembler name back to NULL afterwards.
10458 2014-03-11 Jason Merrill <jason@redhat.com>
10460 * c.opt: Add -std=gnu++14.
10462 2014-03-11 Ian Bolton <ian.bolton@arm.com>
10464 * c-opts.c (c_common_post_options): Don't override
10465 -ffp-contract=fast if unsafe-math-optimizations is on.
10467 2014-03-08 Paulo Matos <paulo@matos-sorge.com>
10469 * c.opt: Enable LTO FE for fshort-double.
10471 2014-03-07 Jason Merrill <jason@redhat.com>
10473 * c.opt: Add -std=c++14.
10475 2014-03-06 Marek Polacek <polacek@redhat.com>
10478 * cilk.c (contains_cilk_spawn_stmt): New function.
10479 (contains_cilk_spawn_stmt_walker): Likewise.
10480 (recognize_spawn): Give error on invalid use of _Cilk_spawn.
10481 * c-common.h (contains_cilk_spawn_stmt): Add declaration.
10483 2014-03-03 Jakub Jelinek <jakub@redhat.com>
10485 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_SIMD.
10486 (init_pragma): Call cpp_register_deferred_pragma for PRAGMA_CILK_SIMD
10487 even when flag_preprocess_only.
10489 2014-02-26 Jason Merrill <jason@redhat.com>
10493 * c-common.c (shorten_compare): Don't check
10494 c_inhibit_evaluation_warnings.
10496 2014-02-19 Jakub Jelinek <jakub@redhat.com>
10499 * c-common.c (c_common_nodes_and_builtins): When initializing
10500 c_uint{16,32,64}_type_node, also set corresponding
10501 uint{16,32,64}_type_node to the same value.
10504 * c-pragma.c (init_pragma): Don't call cpp_register_deferred_pragma
10505 for PRAGMA_IVDEP if flag_preprocess_only.
10507 2014-02-12 Jakub Jelinek <jakub@redhat.com>
10510 * c-common.c (merge_tlist): If copy is true, call new_tlist,
10511 if false, add ADD itself, rather than vice versa.
10512 (verify_tree): For COND_EXPR, don't call merge_tlist with non-zero
10513 copy. For SAVE_EXPR, only call merge_tlist once.
10515 2014-02-08 Jakub Jelinek <jakub@redhat.com>
10517 PR middle-end/60092
10518 * c-common.c (handle_alloc_size_attribute): Use tree_fits_uhwi_p
10520 (handle_alloc_align_attribute, handle_assume_aligned_attribute): New
10522 (c_common_attribute_table): Add alloc_align and assume_aligned
10525 2014-02-06 Marek Polacek <polacek@redhat.com>
10528 * c-common.c (warn_for_sign_compare): Call warning_at with location
10529 instead of warning.
10531 2014-02-05 Marek Polacek <polacek@redhat.com>
10534 * c-omp.c (c_finish_omp_atomic): Remove unreachable return
10537 2014-02-04 Marek Polacek <polacek@redhat.com>
10540 * c-common.c (conversion_warning): Unwrap C_MAYBE_CONST_EXPR and/or
10543 2014-02-03 Marc Glisse <marc.glisse@inria.fr>
10547 * c-common.c (handle_aligned_attribute, handle_alloc_size_attribute,
10548 handle_vector_size_attribute, handle_nonnull_attribute): Call
10549 default_conversion on the attribute argument.
10550 (handle_nonnull_attribute): Increment the argument number.
10552 2014-01-31 Marek Polacek <polacek@redhat.com>
10555 * c-common.c (add_atomic_size_parameter): Pass vNULL to
10556 build_function_call_vec.
10557 (resolve_overloaded_builtin): Likewise.
10558 * c-common.h (build_function_call_vec): Adjust declaration.
10560 2014-01-30 Marek Polacek <polacek@redhat.com>
10563 * c-common.h (unsafe_conversion_p): Adjust declaration.
10564 (warnings_for_convert_and_check): Likewise.
10565 (convert_and_check): Likewise.
10566 * c-common.c (unsafe_conversion_p): Add location parameter. Call
10567 expansion_point_location_if_in_system_header on it.
10568 (warnings_for_convert_and_check): Add location parameter. Call
10569 expansion_point_location_if_in_system_header on it. Use it.
10570 (convert_and_check): Add location parameter. Use it.
10571 (conversion_warning): Likewise.
10572 (c_add_case_label): Adjust convert_and_check calls.
10573 (scalar_to_vector): Adjust unsafe_conversion_p calls.
10575 2014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
10577 * c-common.c (c_define_builtins): Replaced flag_enable_cilkplus with
10579 * c-pragma.c (init_pragma): Likewise.
10582 2014-01-23 Marek Polacek <polacek@redhat.com>
10585 * c-common.c (shorten_compare): Add location_t parameter.
10586 * c-common.h (shorten_binary_op): Adjust declaration.
10588 2014-01-23 Marek Polacek <polacek@redhat.com>
10591 * c-common.c (pointer_to_zero_sized_aggr_p): New function.
10592 * c-common.h: Declare it.
10594 2014-01-20 Eric Botcazou <ebotcazou@adacore.com>
10596 * c-ada-spec.h (dump_ada_specs): Revert prototype change.
10597 * c-ada-spec.c (dump_ads): Likewise.
10598 (cpp_check): Likewise.
10599 (dump_ada_specs): Likewise.
10601 2014-01-15 Laurent Alfonsi <laurent.alfonsi@st.com>
10604 * c-common.c (handle_no_instrument_function_attribute): Allow
10605 no_instrument_function attribute in class member
10606 definition/declaration.
10608 2014-01-15 Jakub Jelinek <jakub@redhat.com>
10611 * c-omp.c (c_finish_omp_atomic): Set in_late_binary_op around
10612 build_modify_expr with non-NOP_EXPR opcode. Handle return from it
10613 being COMPOUND_EXPR.
10614 (c_finish_omp_for): Handle incr being COMPOUND_EXPR with first
10615 operand a SAVE_EXPR and second MODIFY_EXPR.
10617 2014-01-09 Jakub Jelinek <jakub@redhat.com>
10620 * c-pch.c (c_common_write_pch): Call
10621 prepare_target_option_nodes_for_pch.
10623 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
10625 Update copyright years
10627 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
10629 * array-notation-common.c, c-cilkplus.c: Use the standard form for
10630 the copyright notice.
10632 2013-12-28 Eric Botcazou <ebotcazou@adacore.com>
10634 * c-ada-spec.c (print_constructor): New function.
10635 (print_destructor): Retrieve the origin of the destructor.
10636 (print_ada_declaration): Revamp handling of constructors/destructors.
10638 2013-12-23 Stuart Hastings <stuart@apple.com>
10639 Bill Maddox <maddox@google.com>
10640 Jason Merrill <jason@redhat.com>
10642 * c.opt: Add -fdeclone-ctor-dtor.
10643 * c-opts.c (c_common_post_options): Default to on iff -Os.
10645 2013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
10647 * c-common.c (c_common_attribute_table): Added "cilk simd function"
10649 * c-pragma.h (enum pragma_cilk_clause): Remove.
10650 (enum pragma_omp_clause): Added the following fields:
10651 PRAGMA_CILK_CLAUSE_NOMASK, PRAGMA_CILK_CLAUSE_MASK,
10652 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_NONE,
10653 PRAGMA_CILK_CLAUSE_LINEAR, PRAGMA_CILK_CLAUSE_PRIVATE,
10654 PRAGMA_CILK_CLAUSE_FIRSTPRIVATE, PRAGMA_CILK_CLAUSE_LASTPRIVATE,
10655 PRAGMA_CILK_CLAUSE_UNIFORM.
10658 2013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
10660 * cilk.c (cilk_outline): Made this function non-static.
10661 (gimplify_cilk_spawn): Removed pre_p and post_p arguments.
10662 (create_cilk_wrapper): Added a new parameter: a function pointer.
10663 (c_install_body_w_frame_cleanup): Remove
10664 (extract_free_variables): Added VEC_INIT_EXPR and CONSTRUCTOR case.
10665 * c-common.h (cilk_outline): New prototype.
10666 (gimplify_cilk_spawn): Removed two parameters.
10667 (cilk_install_body_with_frame_cleanup): New prototype.
10668 * c-gimplify.c (c_gimplify_expr): Added MODIFY_EXPR, CALL_EXPR and
10669 CILK_SPAWN_STMT case.
10671 2013-12-11 Bernd Schmidt <bernds@codesourcery.com>
10673 * c-common.c (c_fully_fold_internal): Handle ADDR_SPACE_CONVERT_EXPR.
10675 * c-common.h (enum c_tree_index): Remove CTI_INT_ARRAY_TYPE.
10676 (int_array_type_node): Remove.
10677 * c-common.c (c_common_nodes_and_builtins): Don't build it.
10679 2013-12-05 Marek Polacek <polacek@redhat.com>
10682 * c-common.c (c_sizeof_or_alignof_type): Move a declaration into
10683 [ADJUST_FIELD_ALIGN].
10685 2013-12-04 Joseph Myers <joseph@codesourcery.com>
10688 * c-common.c (c_sizeof_or_alignof_type): Add parameter min_alignof
10689 and check field alignment if set.
10690 * c-common.h (c_sizeof_or_alignof_type): Update prototype.
10691 (c_sizeof, c_alignof): Update calls to c_sizeof_or_alignof_type.
10693 2013-12-04 Jakub Jelinek <jakub@redhat.com>
10694 Marek Polacek <polacek@redhat.com>
10696 * c-gimplify.c (c_gimplify_expr): If doing the integer-overflow
10697 sanitization, call unsigned_type_for only when !TYPE_OVERFLOW_WRAPS.
10699 2013-11-29 H.J. Lu <hongjiu.lu@intel.com>
10702 * cilk.c (gimplify_cilk_spawn): Properly handle function without
10705 2013-11-29 Jakub Jelinek <jakub@redhat.com>
10708 * c-common.c (get_priority): If TREE_VALUE (args) is IDENTIFIER_NODE,
10709 goto invalid. If it is error_mark_node, don't issue further
10712 2013-11-28 Sergey Ostanevich <sergos.gnu@gmail.com>
10714 * c.opt (Wopenmp-simd): New.
10716 2013-11-22 Jakub Jelinek <jakub@redhat.com>
10718 * c-ubsan.h (ubsan_instrument_return): New prototype.
10719 * c-ubsan.c (ubsan_instrument_return): New function.
10721 2013-11-22 Andrew MacLeod <amacleod@redhat.com>
10723 * c-common.c: Add required include files from gimple.h.
10724 * c-gimplify.c: Likewise.
10725 * cilk.c: Likewise.
10727 2013-11-22 David Malcolm <dmalcolm@redhat.com>
10729 * c-common.c (unsafe_conversion_p): Remove use of
10730 EXPR_LOC_OR_HERE macro.
10731 (conversion_warning): Likewise.
10732 (warnings_for_convert_and_check): Likewise.
10733 (warn_for_collisions_1): Likewise.
10734 (shorten_compare): Likewise, and remove use of in_system_header
10735 macro, using the location from the former.
10736 * c-lex.c (dump_one_header): Remove use of input_filename macro.
10737 (cb_def_pragma): Remove use of in_system_header macro.
10738 (lex_string): Likewise.
10739 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
10741 2013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
10742 Mike Stump <mikestump@comcast.net>
10743 Richard Sandiford <rdsandiford@googlemail.com>
10745 * c-ada-spec.c (is_simple_enum): Use tree_to_shwi and tree_to_uhwi
10746 instead of TREE_INT_CST_LOW, in cases where there is a protecting
10747 tree_fits_shwi_p or tree_fits_uhwi_p.
10748 (dump_generic_ada_node): Likewise.
10749 * c-format.c (check_format_arg): Likewise.
10750 * c-pretty-print.c (pp_c_integer_constant): Likewise.
10752 2013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
10754 * c-common.c (check_function_arguments_recurse): Use tree_to_uhwi.
10756 2013-11-19 Joshua J Cogliati <jrincayc@yahoo.com>
10759 * c-common.c (unsafe_conversion_p): Make this function
10760 return an enumeration with more detail.
10761 (conversion_warning): Use the new return type of
10762 unsafe_conversion_p to separately warn either about conversions
10763 that lower floating point number precision or about the other
10764 kinds of conversions.
10765 * c-common.h (enum conversion_safety): New enumeration.
10766 (unsafe_conversion_p): switching return type to
10767 conversion_safety enumeration.
10768 * c.opt: Adding new warning -Wfloat-conversion and
10769 enabling it with -Wconversion.
10771 2013-11-19 Basile Starynkevitch <basile@starynkevitch.net>
10773 * c-opts.c: Include plugin.h.
10774 (cb_file_change): Invoke plugin event PLUGIN_INCLUDE_FILE.
10776 2013-11-19 Marek Polacek <polacek@redhat.com>
10778 * c-ubsan.c (ubsan_instrument_division): Adjust ubsan_create_data
10780 (ubsan_instrument_shift): Likewise.
10781 (ubsan_instrument_vla): Likewise.
10783 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
10785 * c-common.c (convert_vector_to_pointer_for_subscript): Remove
10786 cast to unsigned type.
10788 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
10790 * c-common.c (fold_offsetof_1): Use tree_to_uhwi rather than
10792 (complete_array_type): Update comment to refer to tree_to_[su]hwi
10793 rather than tree_low_cst.
10795 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
10797 * c-common.c, c-cppbuiltin.c: Replace tree_low_cst (..., 1) with
10798 tree_to_uhwi throughout.
10800 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
10802 * c-common.c, c-format.c, c-omp.c, c-pretty-print.c: Replace
10803 tree_low_cst (..., 0) with tree_to_shwi throughout.
10805 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
10807 * c-ada-spec.c, c-common.c, c-pretty-print.c: Replace
10808 host_integerp (..., 1) with tree_fits_uhwi_p throughout.
10810 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
10812 * c-ada-spec.c, c-common.c, c-format.c, c-pretty-print.c: Replace
10813 host_integerp (..., 0) with tree_fits_shwi_p throughout.
10815 2013-11-15 Aldy Hernandez <aldyh@redhat.com>
10817 * c-cilkplus.c: New file.
10818 * c-common.c (readonly_error): Add location argument.
10819 * c-common.h (readonly_error): Same.
10820 (c_finish_cilk_clauses): Protoize.
10821 (c_check_cilk_loop): Same.
10822 c-omp.c (c_finish_omp_for): Handle CILK_SIMD nodes.
10823 Do not fail on error_mark_node.
10824 Abstract increment canonicalization to here...
10825 (c_omp_for_incr_canonicalize_ptr): New.
10826 c-pragma.c (init_pragma): Register "simd" pragma.
10827 c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_SIMD.
10828 (enum pragma_cilk_clause): New.
10830 2013-11-15 Richard Sandiford <rdsandiford@googlemail.com>
10832 * c-pretty-print.c (pp_c_character_constant): Remove unnecessary
10833 wchar_type and host_integerp checks.
10835 2013-11-14 Andrew MacLeod <amacleod@redhat.com>
10837 * c-common.c: Likewise.
10838 * c-gimplify.c: Likewise.
10839 * cilk.c: Likewise.
10841 2013-11-14 Diego Novillo <dnovillo@google.com>
10843 * c-common.c: Include fold-const.h.
10844 Include stor-layout.h.
10846 Include stringpool.h.
10849 Include trans-mem.h.
10850 * c-cppbuiltin.c: Include stor-layout.h.
10851 Include stringpool.h.
10852 * c-format.c: Include stringpool.h.
10853 * c-lex.c: Include stringpool.h.
10854 Include stor-layout.h.
10855 * c-pragma.c: Include stringpool.h.
10858 Include gcc-symtab.h.
10859 * c-pretty-print.c: Include stor-layout.h.
10861 * cilk.c: Include stringpool.h.
10864 2013-11-13 Joseph Myers <joseph@codesourcery.com>
10866 * c-common.h (enum rid): Add RID_AUTO_TYPE.
10867 * c-common.c (c_common_reswords): Add __auto_type.
10868 (keyword_begins_type_specifier): Handle RID_AUTO_TYPE.
10870 2013-11-12 Andrew MacLeod <amacleod@redhat.com>
10872 * c-common.c: Include gimplify.h.
10873 * c-gimplify.c: Likewise.
10874 * cilk.c: Likewise.
10875 * c-omp.c: Include gimple-expr.h instead of gimple.h.
10876 * c-ubsan.c: Don't include gimple.h.
10878 2013-11-12 Joseph Myers <joseph@codesourcery.com>
10880 * c-common.c (c_common_reswords): Add _Thread_local.
10882 2013-11-09 Joseph Myers <joseph@codesourcery.com>
10884 * c-common.c (atomic_size_supported_p): New function.
10885 (resolve_overloaded_atomic_exchange)
10886 (resolve_overloaded_atomic_compare_exchange)
10887 (resolve_overloaded_atomic_load, resolve_overloaded_atomic_store):
10888 Use it instead of comparing size with a local list of sizes.
10890 2013-11-07 Andrew MacLeod <amacleod@redhat.com>
10891 Joseph Myers <joseph@codesourcery.com>
10893 * c-common.h (enum rid): Add RID_ATOMIC.
10894 * c-common.c (c_common_reswords): Add _Atomic.
10895 (sync_resolve_params): Use TYPE_MAIN_VARIANT on pointer argument.
10896 (keyword_is_type_qualifier): Accept RID_ATOMIC.
10897 * c-format.c (check_format_types): Check for extra _Atomic
10898 qualifiers in format argument.
10899 * c-pretty-print.c (pp_c_cv_qualifiers): Handle atomic qualifier.
10900 (pp_c_type_qualifier_list): Mention _Atomic in comment.
10902 2013-11-06 Tobias Burnus <burnus@net-b.de>
10904 * c-common.c (reason_option_codes_t): Add CPP_W_DATE_TIME.
10906 2013-11-06 Joseph Myers <joseph@codesourcery.com>
10908 * c-opts.c (c_common_post_options): Set -ffp-contract=off in C
10910 * c-cppbuiltin.c (cpp_iec_559_value): Consider -ffp-contract=fast
10911 to mean lack of IEEE 754 support.
10913 2013-11-05 Tobias Burnus <burnus@net-b.de>
10915 * c.opt (-Wdate-time): New option
10916 * c-opts.c (sanitize_cpp_opts): Pass on to libcpp.
10918 2013-11-05 Joseph Myers <joseph@codesourcery.com>
10920 * c-cppbuiltin.c (cpp_iec_559_value): Test
10921 flag_excess_precision_cmdline not flag_excess_precision.
10923 2013-11-05 Tobias Burnus <burnus@net-b.de>
10925 * c.opt (fopenmp-simd): New option.
10926 * c-pragma.c (omp_pragmas): Move pragmas which can contain simd to ...
10927 (omp_pragmas): ... this new struct.
10928 (c_pp_lookup_pragma): Also walk omp_pragmas.
10929 (init_pragma): Init pragmas for -fopenmp-simd.
10931 2013-11-04 Marek Polacek <polacek@redhat.com>
10934 * c-common.c (invalid_indirection_error): Handle RO_ARROW_STAR case.
10936 2013-11-04 Joseph Myers <joseph@codesourcery.com>
10938 * c-cppbuiltin.c (cpp_iec_559_value, cpp_iec_559_complex_value):
10940 (c_cpp_builtins): Define __GCC_IEC_559 and __GCC_IEC_559_COMPLEX.
10942 2013-11-04 Eric Botcazou <ebotcazou@adacore.com>
10944 * c-ada-spec.h (cpp_operation): Add IS_TRIVIAL.
10945 (dump_ada_specs): Adjust prototype of second callback.
10946 * c-ada-spec.c (cpp_check): New global variable.
10947 (dump_ada_nodes): Remove cpp_check parameter and do not pass it down.
10948 (print_generic_ada_decl): Likewise.
10949 (has_static_fields): Change return type to bool and add guard.
10950 (has_nontrivial_methods): New predicate.
10951 (is_tagged_type): Change return type to bool.
10952 (separate_class_package): Call has_nontrivial_methods.
10953 (pp_ada_tree_identifier): Minor tweaks.
10954 (dump_ada_function_declaration): Adjust calls to dump_generic_ada_node.
10955 (dump_ada_array_domains): Likewise.
10956 (dump_ada_array_type): Likewise.
10957 (dump_template_types): Remove cpp_check parameter and do not pass it to
10958 dump_generic_ada_node.
10959 (dump_ada_template): Likewise.
10960 (dump_generic_ada_node): Remove cpp_check parameter and do not pass it
10962 (print_ada_methods): Change return type to integer. Remove cpp_check
10963 parameter and do not pass it down.
10964 (dump_nested_types): Remove cpp_check parameter and do not pass it to
10965 dump_generic_ada_node.
10966 (print_ada_declaration): Likewise. Test RECORD_OR_UNION_TYPE_P before
10968 (print_ada_struct_decl): Remove cpp_check parameter and do not pass it
10969 down. Use has_nontrivial_methods to recognize C++ classes. Use return
10970 value of print_ada_methods.
10971 (dump_ads): Rename cpp_check parameter to check and adjust prototype.
10972 Set cpp_check to it before invoking dump_ada_nodes.
10973 (dump_ada_specs): Likewise.
10975 2013-11-03 Marek Polacek <polacek@redhat.com>
10977 * c-ubsan.c: Don't include hash-table.h.
10978 (ubsan_instrument_vla): New function.
10979 * c-ubsan.h: Declare it.
10981 2013-10-31 David Malcolm <dmalcolm@redhat.com>
10983 Automated part of renaming of symtab_node_base to symtab_node.
10985 Patch autogenerated by rename_symtab.py from
10986 https://github.com/davidmalcolm/gcc-refactoring-scripts
10987 revision 58bb219cc090b2f4516a9297d868c245495ee622
10989 * c-pragma.c (maybe_apply_pending_pragma_weaks): Rename
10990 symtab_node_base to symtab_node.
10992 2013-10-31 Edward Smith-Rowland <3dw4rd@verizon.net>
10994 Implement C++14 digit separators.
10995 * c-lex.c (interpret_float): Remove digit separators from scratch string
10996 before building real literal.
10998 2013-10-30 Jakub Jelinek <jakub@redhat.com>
11000 * cilk.c (create_cilk_helper_decl): Use HOST_WIDE_INT_PRINT_DEC.
11002 2013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
11004 * c-common.c (c_common_reswords[]): Added _Cilk_spawn and _Cilk_sync
11006 (c_define_builtins): Called cilk_init_builtins if Cilk Plus is
11008 * c-common.h (enum rid): Added RID_CILK_SPAWN and RID_CILK_SYNC.
11009 (insert_cilk_frame): New prototype.
11010 (cilk_init_builtins): Likewise.
11011 (gimplify_cilk_spawn): Likewise.
11012 (c_cilk_install_body_w_frame_cleanup): Likewise.
11013 (cilk_detect_spawn_and_unwrap): Likewise.
11014 (cilk_set_spawn_marker): Likewise.
11015 (build_cilk_sync): Likewise.
11016 (build_cilk_spawn): Likewise.
11017 * cilk.c: New file.
11019 2013-10-29 David Malcolm <dmalcolm@redhat.com>
11021 Patch autogenerated by refactor_symtab.py from
11022 https://github.com/davidmalcolm/gcc-refactoring-scripts
11023 revision 58bb219cc090b2f4516a9297d868c245495ee622
11025 * c-gimplify.c (c_genericize): Update for conversion of symtab types
11026 to a true class hierarchy.
11027 * c-pragma.c (maybe_apply_pending_pragma_weaks): Likewise.
11029 2013-10-27 Richard Sandiford <rdsandiford@googlemail.com>
11031 * c-lex.c (interpret_integer): Remove call to cpp_num_sign_extend.
11033 2013-10-26 Jeff Law <law@redhat.com>
11035 * c-common.c (c_define_builtins): Remove mudflap support.
11036 * c.opt: Ignore and warn for mudflap options.
11038 2013-10-24 Tobias Burnus <burnus@net-b.de>
11041 * c-pragma.c (init_pragma) Add #pragma ivdep handling.
11042 * c-pragma.h (pragma_kind): Add PRAGMA_IVDEP.
11044 2013-10-23 Jason Merrill <jason@redhat.com>
11046 * c-format.c (gcc_cxxdiag_char_table): Add %X.
11048 2013-10-11 Jakub Jelinek <jakub@redhat.com>
11050 * c-common.h (omp_clause_mask::operator !=): New method.
11051 * c-omp.c (c_omp_split_clauses): Use if ((mask & something) != 0)
11052 instead of if (mask & something) tests everywhere.
11054 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP to
11055 201307 instead of 201107.
11056 * c-common.c (DEF_FUNCTION_TYPE_8): Define.
11057 (c_common_attribute_table): Add "omp declare target" and
11058 "omp declare simd" attributes.
11059 (handle_omp_declare_target_attribute,
11060 handle_omp_declare_simd_attribute): New functions.
11061 * c-omp.c: Include c-pragma.h.
11062 (c_finish_omp_taskgroup): New function.
11063 (c_finish_omp_atomic): Add swapped argument, if true,
11064 build the operation first with rhs, lhs arguments and use NOP_EXPR
11066 (c_finish_omp_for): Add code argument, pass it down to make_code.
11067 (c_omp_split_clauses): New function.
11068 (c_split_parallel_clauses): Removed.
11069 (c_omp_declare_simd_clause_cmp, c_omp_declare_simd_clauses_to_numbers,
11070 c_omp_declare_simd_clauses_to_decls): New functions.
11071 * c-common.h (omp_clause_mask): New type.
11072 (OMP_CLAUSE_MASK_1): Define.
11073 (omp_clause_mask::omp_clause_mask, omp_clause_mask::operator &=,
11074 omp_clause_mask::operator |=, omp_clause_mask::operator ~,
11075 omp_clause_mask::operator |, omp_clause_mask::operator &,
11076 omp_clause_mask::operator <<, omp_clause_mask::operator >>,
11077 omp_clause_mask::operator ==): New methods.
11078 (enum c_omp_clause_split): New.
11079 (c_finish_omp_taskgroup): New prototype.
11080 (c_finish_omp_atomic): Add swapped argument.
11081 (c_finish_omp_for): Add code argument.
11082 (c_omp_split_clauses): New prototype.
11083 (c_split_parallel_clauses): Removed.
11084 (c_omp_declare_simd_clauses_to_numbers,
11085 c_omp_declare_simd_clauses_to_decls): New prototypes.
11086 * c-pragma.c (omp_pragmas): Add new OpenMP 4.0 constructs.
11087 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_CANCEL,
11088 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_DECLARE_REDUCTION,
11089 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_SIMD,
11090 PRAGMA_OMP_TARGET, PRAGMA_OMP_TASKGROUP and PRAGMA_OMP_TEAMS.
11091 Remove PRAGMA_OMP_PARALLEL_FOR and PRAGMA_OMP_PARALLEL_SECTIONS.
11092 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ALIGNED,
11093 PRAGMA_OMP_CLAUSE_DEPEND, PRAGMA_OMP_CLAUSE_DEVICE,
11094 PRAGMA_OMP_CLAUSE_DIST_SCHEDULE, PRAGMA_OMP_CLAUSE_FOR,
11095 PRAGMA_OMP_CLAUSE_FROM, PRAGMA_OMP_CLAUSE_INBRANCH,
11096 PRAGMA_OMP_CLAUSE_LINEAR, PRAGMA_OMP_CLAUSE_MAP,
11097 PRAGMA_OMP_CLAUSE_NOTINBRANCH, PRAGMA_OMP_CLAUSE_NUM_TEAMS,
11098 PRAGMA_OMP_CLAUSE_PARALLEL, PRAGMA_OMP_CLAUSE_PROC_BIND,
11099 PRAGMA_OMP_CLAUSE_SAFELEN, PRAGMA_OMP_CLAUSE_SECTIONS,
11100 PRAGMA_OMP_CLAUSE_SIMDLEN, PRAGMA_OMP_CLAUSE_TASKGROUP,
11101 PRAGMA_OMP_CLAUSE_THREAD_LIMIT, PRAGMA_OMP_CLAUSE_TO and
11102 PRAGMA_OMP_CLAUSE_UNIFORM.
11104 2013-10-09 Marc Glisse <marc.glisse@inria.fr>
11106 PR tree-optimization/20318
11107 * c-common.c (handle_returns_nonnull_attribute): New function.
11108 (c_common_attribute_table): Add returns_nonnull.
11110 2013-10-03 Marc Glisse <marc.glisse@inria.fr>
11113 * c.opt (fcheck-new): Move to common.opt.
11115 2013-09-25 Marek Polacek <polacek@redhat.com>
11116 Jakub Jelinek <jakub@redhat.com>
11119 * c-ubsan.c (ubsan_instrument_shift): Don't instrument
11120 an expression if we can prove it is correct.
11121 (ubsan_instrument_division): Likewise. Remove unnecessary
11124 2013-09-18 Marek Polacek <polacek@redhat.com>
11127 * c-common.c (handle_no_sanitize_undefined_attribute): New function.
11129 (struct attribute_spec c_common_att): Add no_sanitize_undefined.
11131 2013-09-14 Iain Sandoe <iain@codesourcery.com>
11134 * c.opt (fgnu-runtime, fnext-runtime, fobjc-abi-version,
11135 fobjc-gc, freplace-objc-classes): Accept for LTO.
11137 2013-09-13 Jacek Caban <jacek@codeweavers.com>
11139 * c-target.def: New hook
11141 2013-09-09 Paolo Carlini <paolo.carlini@oracle.com>
11144 * c.opt (Wdelete-incomplete): Add.
11146 2013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
11148 * c-common.c (same_scalar_type_ignoring_signedness): Delete.
11149 (vector_types_compatible_elements_p): New function.
11150 * c-common.h: (same_scalar_type_ignoring_signedness): Delete
11152 (vector_types_compatible_elements_p): Declare.
11154 2013-09-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
11156 * c-pretty-print.h (c_pretty_printer::simple_type_specifier): Now
11157 a virtual member function.
11158 (pp_simple_type_specifier): Remove.
11159 (pp_c_type_specifier): Likewise.
11160 * c-pretty-print.c (c_pretty_printer::simple_type_specifier):
11161 Rename from pp_c_type_specifier. Adjust.
11162 (c_pretty_printer::c_pretty_printer): Do not assign to
11163 simple_type_specifier.
11165 2013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
11167 * c-pretty-print.h (c_pretty_printer::type_id): Now a virtual
11169 (c_pretty_printer::storage_class_specifier): Likewise.
11170 (c_pretty_printer::initializer): Likewise.
11171 (pp_declaration): Remove.
11172 (pp_declaration_specifiers): Likewise.
11173 (pp_abstract_declarator): Likewise.
11174 (pp_declarator): Likewise.
11175 (pp_type_id): Likewise.
11176 (pp_statement): Likewise.
11177 (pp_constant): Likewise.
11178 (pp_id_expression): Likewise.
11179 (pp_primary_expression): Likewise.
11180 (pp_unary_expression): Likewise.
11181 (pp_multiplicative_expression): Likewise.
11182 (pp_conditional_expression): Likewise.
11183 (pp_assignment_expression): Likewise.
11184 (pp_expression): Likewise.
11185 (pp_c_type_id): Likewise.
11186 (pp_c_storage_class_specifier): Likewise.
11187 * c-pretty-print.c (pp_c_type_cast): Tidy.
11188 (pp_c_pointer): Likewise.
11189 (pp_c_type_specifier): Likewise.
11190 (pp_c_parameter_type_list): Likewise.
11191 (pp_c_function_definition): Likewise.
11192 (pp_c_init_declarator): Likewise.
11193 (pp_c_initializer_list): Likewise.
11194 (pp_c_constructor_elts): Likewise.
11195 (c_pretty_printer::direct_abstract_declarator): Likewise.
11196 (c_pretty_printer::declaration_specifiers): Likewise.
11197 (c_pretty_printer::primary_expression): Likewise.
11198 (c_pretty_printer::postfix_expression): Likewise.
11199 (c_pretty_printer::type_id): Rename from pp_c_type_id.
11200 (c_pretty_printer::storage_class_specifier): Rename from
11201 pp_c_storage_class_specifier.
11202 (c_pretty_printer::initializer): Rename from pp_c_initializer.
11203 (c_pretty_printer::c_pretty_printer): Do not assign to type_id,
11204 storage_class_specifier, initializer, offset_list, flags.
11206 2013-08-30 Marek Polacek <polacek@redhat.com>
11208 * c-ubsan.c: New file.
11209 * c-ubsan.h: New file.
11211 2013-08-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
11213 * c-pretty-print.h (c_pretty_printer::declaration): Now a virtual
11215 (c_pretty_printer::declaration_specifiers): Likewise.
11216 (c_pretty_printer::declarator): Likewise.
11217 (c_pretty_printer::abstract_declarator): Likewise.
11218 (c_pretty_printer::direct_abstract_declarator): Likewise.
11219 (c_pretty_printer::direct_declarator): Likewise.
11220 (c_pretty_printer::function_specifier): Likewise.
11221 (pp_declaration): Adjust.
11222 (pp_declaration_specifiers): Likewise.
11223 (pp_abstract_declarator): Likewise.
11224 (pp_direct_declarator): Likewise.
11225 (pp_function_specifier): Likewise.
11226 (pp_direct_abstract_declarator): Remove as unused.
11227 (pp_c_declaration): Remove.
11228 (pp_c_declaration_specifiers): Likewise.
11229 (pp_c_declarator): Likewise.
11230 (pp_c_direct_declarator): Likewise.
11231 (pp_c_function_specifier): Likewise.
11232 (pp_c_direct_abstract_declarator): Likewise.
11233 * c-pretty-print.c (c_pretty_printer::abstract_declarator): Rename
11234 from pp_c_abstract_declarator. Adjust.
11235 (c_pretty_printer::direct_abstract_declarator): Rename from
11236 pp_c_direct_abstract_declarator. Adjust.
11237 (c_pretty_printer::function_specifier): Rename from
11238 pp_c_function_specifier. Adjust.
11239 (c_pretty_printer::declaration_specifiers): Rename from
11240 pp_c_declaration_specifiers. Adjust.
11241 (c_pretty_printer::direct_declarator): Rename from
11242 pp_c_direct_declarator. Adjust.
11243 (c_pretty_printer::declarator): Rename from pp_c_declarator. Adjust.
11244 (c_pretty_printer::declaration): Rename from pp_c_declaration. Adjust.
11245 (c_pretty_printer::c_pretty_printer): Do not assign to
11246 declaration, declaration_specifiers, declarator,
11247 direct_declarator, direct_abstract_declarator, function_specifier.
11249 2013-08-26 Gabriel Dos Reis <gdre@integrable-solutions.net>
11251 * c-pretty-print.h (c_pretty_printer::unary_expression): Now a
11252 virtual member function.
11253 (c_pretty_printer::multiplicative_expression): Likewise.
11254 (c_pretty_printer::conditional_expression): Likewise.
11255 (c_pretty_printer::assignment_expression): Likewise.
11256 (c_pretty_printer::expression): Likewise.
11257 (pp_unary_expression): Adjust.
11258 (pp_multiplicative_expression): Likewise.
11259 (pp_assignment_expression): Likewise.
11260 (pp_conditional_expression): Likewise.
11261 (pp_expression): Likewise.
11262 * c-pretty-print.c (c_pretty_printer::unary_expression): Rename
11263 from pp_c_unary_expression. Adjust.
11264 (c_pretty_printer::multiplicative_expression): Rename from
11265 pp_c_multiplicative_expression. Adjust.
11266 (c_pretty_printer::conditional_expression): Rename from
11267 pp_c_conditional_expression. Adjust.
11268 (c_pretty_printer::assignment_expression): Rename from
11269 pp_c_assignment_expression. Adjust.
11270 (c_pretty_printer::expression): Rename from pp_c_expression. Adjust.
11271 (c_pretty_printer::c_pretty_printer): Do not assign to
11272 unary_expression, multiplicative_expression,
11273 conditional_expression, expression.
11275 2013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
11277 * c-pretty-print.h (c_pretty_printer::postfix_expression): Now a
11278 virtual member function.
11279 (pp_postfix_expression): Adjust.
11280 (pp_c_postfix_expression): Remove.
11281 * c-pretty-print.c (c_pretty_printer::postfix_expression): Rename
11282 from pp_c_postfix_expression. Adjust.
11283 (c_pretty_printer::c_pretty_printer): Do not assign to
11284 postfix_expression.
11286 2013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
11288 * c-pretty-print.h (c_pretty_printer::primary_expression): Now a
11289 virtua member function.
11290 (pp_primary_expression): Adjust.
11291 (pp_c_primary_expression): Remove.
11292 * c-pretty-print.c (c_pretty_printer::primary_expression): Rename
11293 from pp_c_primary_expression. Adjust.
11294 (pp_c_initializer_list): Use pp_primary_expression.
11295 (c_pretty_printer::c_pretty_printer): Do not assign to
11296 primary_expression.
11298 2013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
11300 * c-pretty-print.h (c_pretty_printer::translate_string): Declare.
11301 * c-pretty-print.c (M_): Remove.
11302 (c_pretty_printer::translate_string): Define.
11303 (pp_c_type_specifier): Use it.
11304 (pp_c_primary_expression): Likewise.
11305 (pp_c_expression): Likewise.
11307 2013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
11309 * c-pretty-print.h (c_pretty_printer::id_expression): Now a
11311 (pp_c_id_expression): Remove.
11312 (pp_id_expression): Adjust.
11313 * c-pretty-print.c (c_pretty_printer::id_expression): Rename from
11314 pp_c_id_expression. Adjust.
11315 (pp_c_postfix_expression): Use pp_id_expression.
11316 (c_pretty_printer::c_pretty_printer): Do not assign to id_expression.
11318 2013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
11320 * c-pretty-print.h (c_pretty_printer::constant): Now a virtual
11322 (pp_constant): Adjust.
11323 (pp_c_constant): Remove.
11324 * c-pretty-print.c (c_pretty_printer::constant): Rename from
11325 pp_c_constant. Adjust.
11327 (pp_c_primary_expression): Call pp_constant in lieu of pp_c_constant.
11328 (c_pretty_printer::c_pretty_printer): Remove assignment to constant.
11330 2013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
11332 * c-pretty-print.h (pp_c_pretty_printer_init): Remove.
11333 (c_pretty_printer::c_pretty_printer): Declare.
11334 * c-pretty-print.c (pretty_printer::c_pretty_printer): Rename from
11335 c_pretty_printer_init. Adjust.
11336 (print_c_tree): Do not call c_pretty_printer_init.
11337 * c-ada-spec.c (dump_ads): Remove call to pp_construct.
11339 2013-08-09 Arnaud Charlet <charlet@adacore.com>
11341 * c-ada-spec.c (print_ada_declaration): Prevent accessing null asm name
11343 2013-08-05 Paolo Carlini <paolo.carlini@oracle.com>
11346 * c-common.c (pointer_int_sum): Add bool parameter.
11347 * c-common.h (pointer_int_sum): Adjust declaration.
11349 2013-08-05 Gabriel Dos Reis <gdr@integrable-solutions.net>
11351 * c-pretty-print.c (print_c_tree): Simplify. Use non-static local
11352 c_pretty_printer variable.
11354 2013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
11356 * c-pretty-print.h (c_pretty_printer): Derive from pretty_printer.
11358 (pp_c_base): Likewise. Adjust users.
11359 * c-pretty-print.c (pp_c_maybe_whitespace): Adjust.
11360 (pp_c_whitespace): Do not call pp_base.
11361 (pp_c_left_paren): Likewise.
11362 (pp_c_right_paren): Likewise.
11363 (pp_c_left_brace): Likewise.
11364 (pp_c_right_brace): Likewise.
11365 (pp_c_left_bracket): Likewise.
11366 (pp_c_right_bracket): Likewise.
11367 (pp_c_dot): Likewise.
11368 (pp_c_ampersand): Likewise.
11369 (pp_c_star): Likewise.
11370 (pp_c_arrow): Likewise.
11371 (pp_c_semicolon): Likewise.
11372 (pp_c_complement): Likewise.
11373 (pp_c_exclamation): Likewise.
11374 (pp_c_direct_declarator): Likewise.
11375 (pp_c_ws_string): Likewise.
11376 (pp_c_identifier): Likewise.
11377 (pp_c_statement): Likewise.
11378 (print_c_tree): Likewise.
11380 2013-08-04 Ed Smith-Rowland <3dw4rd@verizon.net>
11383 * c-common.c (c_parse_error): Catch user-defined literal tokens and
11384 provide useful error strings.
11386 2013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
11388 * c-ada-spec.c (pp_ada_tree_identifier): Use specialized pretty
11389 printer functions instead of pp_string or operators and punctuators.
11390 (dump_generic_ada_node): Likewise.
11391 * c-pretty-print.c (pp_c_type_specifier): Likewise.
11392 (pp_c_relational_expression): Likewise.
11393 (pp_c_logical_or_expression): Likewise.
11395 2013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
11397 * c-ada-spec.c (print_ada_macros): Use specialized pretty printer
11398 functions instead of pp_character.
11399 (pp_ada_tree_identifier): Likewise.
11400 (dump_ada_double_name): Likewise.
11401 (dump_ada_function_declaration): Likewise.
11402 (dump_ada_array_domains): Likewise.
11403 (dump_template_types): Likewise.
11404 (dump_generic_ada_node): Likewise.
11405 (print_ada_declaration): Likewise.
11406 (print_ada_struct_decl): Likewise.
11407 * c-pretty-print.c (pp_c_integer_constant): Likewise.
11409 2013-07-23 Tom Tromey <tromey@redhat.com>
11411 * c-common.h (enum rid) <RID_GENERIC>: New constant.
11412 * c-common.c (c_common_reswords): Add _Generic.
11414 2013-07-21 OndÅej BÃlka <neleai@seznam.cz>
11416 * c-common.c: Fix typos.
11417 * c-common.h: Likewise.
11419 2013-07-13 Lubos Lunak <l.lunak@suse.cz>
11422 * c-common.c (c_common_attribute_table): Add warn_unused.
11423 (handle_warn_unused_attribute): New.
11425 2013-07-10 Jakub Jelinek <jakub@redhat.com>
11427 * c-ppoutput.c (scan_translation_unit): Call account_for_newlines
11428 for all CPP_TOKEN_FLD_STR tokens, not just CPP_COMMENT.
11430 2013-07-10 Paolo Carlini <paolo.carlini@oracle.com>
11433 * c.opt: Add Wconditionally-supported.
11435 2013-07-08 Graham Stott <graham.stott@btinternet.com>
11437 * array-notation-common.c (length_mismatch_in_expr_p): Delete
11438 unused variables l_length and l_node.
11440 2013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
11443 * c-common.c (complete_array_type): Delay folding first index
11444 like other indices. When folding, check for index overflow.
11446 2013-06-27 Marc Glisse <marc.glisse@inria.fr>
11449 * c-common.h (c_build_vec_perm_expr): New complain argument.
11450 * c-common.c (c_build_vec_perm_expr): Likewise.
11451 Use save_expr also in C++.
11453 2013-06-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
11455 * c-common.c (c_common_nodes_and_builtins): Use cxx11 in lieu of cxx0x.
11456 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
11457 * c-opts.c (c_common_post_options): Likewise.
11459 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
11461 * array-notation-common.c (length_mismatch_in_expr): Changed the
11462 parameter type's from a dynamic array to a vec_tree. Also removed
11463 the size parameters.
11464 * c-common.h (length_mismatch_in_expr_p): Fixed prototype's as per
11467 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
11469 * c-common.h (struct cilkplus_an_parts): New structure.
11470 (struct cilkplus_an_loop_parts): Likewise.
11471 (cilkplus_extract_an_triplets): New prototype.
11472 (fix_sec_implicit_args): Likewise.
11473 * array-notation-common.c (cilkplus_extract_an_triplets): New function.
11474 (fix_sec_implicit_args): Likewise.
11476 2013-06-20 Balaji V. Iyer <balaji.v.iyer@intel.com>
11478 * array-notation-common.c (find_inv_trees): Removed an unwanted
11480 * c-common.h (struct inv_list::additional_tcodes): Changed type from
11481 enum rid to enum tree_code.
11483 2013-06-11 Jan Hubicka <jh@suse.cz>
11485 * c-common.c (handle_alias_ifunc_attribute): Do not set
11486 DECL_EXTERNAL for weakref variables.
11487 * c-pragma.c (handle_pragma_weak): Make sure aliases
11488 are not declared as external.
11490 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
11492 * array-notation-common.c (length_mismatch_in_expr_p): Moved this
11493 function from c/c-array-notation.c.
11494 (is_cilkplus_reduce_builtin): Likewise.
11495 (find_rank): Likewise.
11496 (extract_array_notation_exprs): Likewise.
11497 (replace_array_notations): Likewise.
11498 (find_inv_trees): Likewise.
11499 (replace_inv_trees): Likewise.
11500 (contains_array_notation_expr): Likewise.
11501 (find_correct_array_notation_type): Likewise.
11502 * c-common.h (struct inv_list): Moved this struct from the file
11503 c/c-array-notation.c and added a new field called additional tcodes.
11504 (length_mismatch_in_expr_p): New prototype.
11505 (is_cilkplus_reduce_builtin): Likewise.
11506 (find_rank): Likewise.
11507 (extract_array_notation_exprs): Likewise.
11508 (replace_array_notation): Likewise.
11509 (find_inv_trees): Likewise.
11510 (replace_inv_trees): Likewise.
11511 (find_correct_array_notation_type): Likewise.
11513 2013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
11515 * c-common.c (c_define_builtins): When cilkplus is enabled, the
11516 function array_notation_init_builtins is called.
11517 (c_common_init_ts): Added ARRAY_NOTATION_REF as typed.
11518 * c-common.def (ARRAY_NOTATION_REF): New tree.
11519 * c-common.h (build_array_notation_expr): New function declaration.
11520 (build_array_notation_ref): Likewise.
11521 (extract_sec_implicit_index_arg): New extern declaration.
11522 (is_sec_implicit_index_fn): Likewise.
11523 (ARRAY_NOTATION_CHECK): New define.
11524 (ARRAY_NOTATION_ARRAY): Likewise.
11525 (ARRAY_NOTATION_START): Likewise.
11526 (ARRAY_NOTATION_LENGTH): Likewise.
11527 (ARRAY_NOTATION_STRIDE): Likewise.
11528 * c-pretty-print.c (pp_c_postifix_expression): Added a new case for
11529 ARRAY_NOTATION_REF.
11530 (pp_c_expression): Likewise.
11531 * c.opt (flag_enable_cilkplus): New flag.
11532 * array-notation-common.c: New file.
11534 2013-05-14 Jakub Jelinek <jakub@redhat.com>
11537 * c-common.c (verify_tree): Don't recurse into SIZEOF_EXPR.
11539 2013-05-10 Marc Glisse <marc.glisse@inria.fr>
11541 * c-common.c (vector_types_convertible_p): No TYPE_PRECISION for
11544 2013-05-07 Han Shen <shenhan@google.com>
11546 * c-cppbuiltin.c (c_cpp_builtins): Added "__SSP_STRONG__=3".
11548 2013-04-29 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
11550 * c-common.c (check_user_alignment): Emit error for negative values.
11552 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
11554 * c-opts.c (set_std_cxx11): Use CLK_CXX1Y and CLK_GNUCXX1Y.
11556 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
11558 * c-cppbuiltin.c (c_cpp_builtins): Do not define
11559 __GXX_EXPERIMENTAL_CXX1Y__.
11561 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
11562 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
11564 * c.opt ([Wpointer-arith]): Enabled by -Wpedantic, as documented.
11565 * c-common.c (pointer_int_sum): Change -Wpointer-arith pedwarns
11566 to simply use OPT_Wpointer_arith.
11567 (c_sizeof_or_alignof_type): Likewise.
11569 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
11571 * c-cppbuiltin.c (c_cpp_builtins): Define __GXX_EXPERIMENTAL_CXX1Y__.
11573 2013-04-12 Jakub Jelinek <jakub@redhat.com>
11575 * c-format.c (gcc_diag_char_table, gcc_tdiag_char_table,
11576 gcc_cdiag_char_table, gcc_cxxdiag_char_table): Add %r and %R format
11579 2013-04-07 Steven Bosscher <steven@gcc.gnu.org>
11581 * c-pragma.c (add_to_renaming_pragma_list): Fix leading comment.
11583 2013-04-03 Paolo Carlini <paolo.carlini@oracle.com>
11585 * c-common.c (pointer_int_sum): Remove dead code.
11587 2013-03-09 Richard Sandiford <rdsandiford@googlemail.com>
11589 PR middle-end/56524
11590 * c-common.c (handle_optimize_attribute): Don't call
11591 save_optabs_if_changed.
11593 2013-03-05 Jakub Jelinek <jakub@redhat.com>
11595 PR middle-end/56461
11596 * c-pch.c (pch_init): Free target_validity at the end.
11598 2013-03-04 Jakub Jelinek <jakub@redhat.com>
11600 * c-pretty-print.c (pp_c_pretty_printer_init): Clear pp->flags.
11602 2013-02-28 Konstantin Serebryany <konstantin.s.serebryany@gmail.com>
11603 Jakub Jelinek <jakub@redhat.com>
11606 * c-common.c (handle_no_sanitize_address_attribute): New function.
11607 (c_common_attribute_table): Add no_sanitize_address attribute.
11608 (handle_no_address_safety_analysis_attribute): Add
11609 no_sanitize_address attribute, not no_address_safety_analysis
11612 2013-02-18 Aldy Hernandez <aldyh@redhat.com>
11615 * c-common.c (handle_optimize_attribute): Call
11616 save_optabs_if_changed.
11618 2013-02-18 Jakub Jelinek <jakub@redhat.com>
11619 Steven Bosscher <steven@gcc.gnu.org>
11622 * c-opts.c (c_common_post_options): If debug info is enabled
11623 and non-dwarf*, refuse to load PCH files and when writing PCH
11626 2013-02-05 Jakub Jelinek <jakub@redhat.com>
11628 PR middle-end/56167
11629 * c-common.c (handle_error_attribute): Fix condition.
11631 2013-01-30 Jakub Jelinek <jakub@redhat.com>
11634 * c-common.c (handle_target_attribute): Revert 2012-12-26 change.
11636 2013-01-18 Jason Merrill <jason@redhat.com>
11639 * c.opt (-fextern-tls-init): New.
11640 * c-opts.c (c_common_post_options): Handle it.
11642 2013-01-09 Jakub Jelinek <jakub@redhat.com>
11645 * c-common.c (c_fully_fold_internal): Warn for LSHIFT_EXPR and
11646 RSHIFT_EXPR, if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST
11647 and is either negative or bigger or equal to type precision
11648 of the first operand.
11650 2012-12-03 Marek Polacek <polacek@redhat.com>
11653 * c-common.c (check_user_alignment): Swap order of tests,
11654 check TREE_CODE first.
11656 2012-11-29 Ed Smith-Rowland <3dw4rd@verizon.net>
11659 * c-common.h (overflow_type): New enum.
11660 (build_userdef_literal): Add overflow_type argument.
11661 (tree_userdef_literal): Add overflow_type.
11662 (USERDEF_LITERAL_OVERFLOW): New access macro.
11663 * c-common.c (build_userdef_literal): Add overflow_type
11665 * c-lex.c (c_lex_with_flags): Add overflow_type to
11666 build_userdef_literal calls.
11667 (interpret_integer, interpret_float): Add overflow_type argument.
11669 2012-11-28 Richard Biener <rguenther@suse.de>
11672 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
11673 here and use a type with proper overflow behavior for types that would
11674 need to be promoted for the arithmetic.
11676 2012-11-23 Jakub Jelinek <jakub@redhat.com>
11679 * c-common.c (handle_no_address_safety_analysis_attribute): New
11681 (c_common_attribute_table): Add no_address_safety_analysis.
11683 2012-11-16 Simon Baldwin <simonb@google.com>
11685 * c.opt: Add f[no-]canonical-system-headers.
11686 * c-opts.c (c_common_handle_option): Handle
11687 OPT_fcanonical_system_headers.
11689 2012-11-09 Ed Smith-Rowland <3dw4rd@verizon.net>
11692 * c-opts.c (c_common_handle_option): Set new flags.
11693 * c.opt: Describe new flags.
11695 2012-11-09 Jason Merrill <jason@redhat.com>
11697 * c.opt (Wabi-tag): New.
11699 2012-11-09 Andi Kleen <ak@linux.intel.com>
11702 * c-common.c (get_atomic_generic_size): Mask with
11705 2012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
11708 * c.opt (Wformat): Make it Alias Wformat=1.
11709 (Wformat-contains-nul,Wformat-extra-args,Wformat-nonliteral,
11710 Wformat-security,Wformat-y2k,Wformat-zero-length): Use
11712 (Wformat=): RejectNegative. Use LangEnabledBy.
11713 (Wnonnull): Use LangEnabledBy.
11714 * c-opts.c (c_common_handle_option): Do not handle Wformat here.
11715 * c-format.c (set_Wformat): Delete.
11716 (decode_format_attr): Replace OPT_Wformat with OPT_Wformat_.
11717 (maybe_read_dollar_number): Likewise.
11718 (avoid_dollar_number): Likewise.
11719 (finish_dollar_format_checking): Likewise.
11720 (check_format_info): Likewise.
11721 (check_format_info_main): Likewise.
11722 (check_format_types): Likewise.
11723 (format_type_warning): Likewise.
11724 * c-common.c (int): Likewise.
11725 (check_function_sentinel): Likewise.
11726 * c-common.h (warn_format,set_Wformat): Do not declare here.
11728 2012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
11731 * c.opt(Warray-bounds,Wdelete-non-virtual-dtor,Wenum-compare,
11732 Wmain,Woverlength-strings, Wunknown-pragmas,Wunused-macros):
11734 (Wswitch,Wswitch-default,Wswitch-enum): Likewise. Move here from
11736 (Wvariadic-macros): Init(1).
11737 * c-opts.c (c_common_handle_option): Do not handle them
11739 (c_common_post_options): Likewise.
11740 (sanitize_cpp_opts): warn_unused_macros is now
11741 cpp_warn_unused_macros.
11742 (push_command_line_include): Likewise.
11743 * c-common.c (warn_unknown_pragmas): Do not define.
11744 * c-common.h (warn_unknown_pragmas): Do not declare.
11746 2012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
11749 * c-common.c (conversion_warning): Handle conditional expressions.
11751 2012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
11754 * c.opt (Wreturn_local_addr): Define new option.
11756 2012-10-25 Jason Merrill <jason@redhat.com>
11758 * c.opt (Wvirtual-move-assign): New.
11760 * c.opt (Winherited-variadic-ctor): New.
11762 2012-10-25 Marc Glisse <marc.glisse@inria.fr>
11765 * c-common.c (scalar_to_vector): Handle VEC_COND_EXPR.
11767 2012-10-23 Joseph Myers <joseph@codesourcery.com>
11769 * c-common.h (pch_cpp_save_state): Declare.
11770 * c-target.def (c_preinclude): New hook.
11771 * c-opts.c (done_preinclude): New.
11772 (push_command_line_include): Handle default preincluded header.
11773 (cb_file_change): Call pch_cpp_save_state when calling
11774 push_command_line_include.
11775 * c-pch.c (pch_ready_to_save_cpp_state, pch_cpp_state_saved)
11776 (pch_cpp_save_state): New.
11777 (pch_init): Call pch_cpp_save_state conditionally, instead of
11778 calling cpp_save_state.
11780 2012-10-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
11784 * c.opt (Waddress,Wchar-subscripts,Wsign-conversion,Wimplicit,
11785 Wimplicit-function-declaration,Wimplicit-int,Wsizeof-pointer-memaccess,
11786 Wnarrowing,Wparentheses,Wpointer-sign,Wreturn-type,Wsequence-point,
11787 Wsign-compare,Wuninitialized,Wmaybe-uninitialized,Wunused,
11788 Wvolatile-register-var): Add LangEnabledBy or EnabledBy.
11789 * c-opts.c (c_common_handle_option): Remove explicit handling from
11791 (c_common_post_options): Likewise.
11793 2012-10-18 Eric Botcazou <ebotcazou@adacore.com>
11795 * c-ada-spec.c (LOCATION_COL): Delete.
11796 (compare_location): New function.
11797 (compare_node): Use it.
11798 (compare_comment): Likewise.
11800 2012-10-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
11804 * c.opt (Wstrict-aliasing=,Wstrict-overflow=): Use LangEnabledBy.
11805 * c-opts.c (c_common_handle_option): Do not set them here. Add
11807 (c_common_post_options): Likewise.
11809 2012-10-16 Eric Botcazou <ebotcazou@adacore.com>
11811 * c-ada-spec.c (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Define.
11812 (dump_generic_ada_node) <INTEGER_CST>: Deal with sizetype specially.
11813 Remove POINTER_TYPE handling, add large unsigned handling and use
11814 ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX for big numbers.
11816 2012-10-12 Jakub Jelinek <jakub@redhat.com>
11819 * c-common.h (sizeof_pointer_memaccess_warning): Adjust prototype.
11820 * c-common.c (sizeof_pointer_memaccess_warning): Take array of 3
11821 locs and array of 3 trees instead of just single loc and single
11822 sizeof_arg tree. Handle __builtin___*_chk builtins too, and
11823 also stpncpy, bcopy, bcmp, bzero, snprintf and vsnprintf builtins.
11824 For *cmp* builtins that take two sources strings report warnings
11825 about first and second source, not about destination and source.
11827 2012-10-12 Marc Glisse <marc.glisse@inria.fr>
11830 * c-common.h (enum ref_operator) [RO_ARROW_STAR]: New.
11832 2012-10-11 Eric Botcazou <ebotcazou@adacore.com>
11834 * c-ada-spec.c (dump_ada_template): Bail out for template declarations
11835 declaring something coming from another file.
11837 2012-10-10 Arnaud Charlet <charlet@adacore.com>
11840 * c-ada-spec.c (print_ada_struct_decl): Increase buf size.
11842 2012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
11845 * c-common.c (warn_about_parentheses): Add location_t parameter;
11846 use EXPR_LOC_OR_LOC.
11847 * c-common.h: Update declaration.
11849 2012-10-09 Marc Glisse <marc.glisse@inria.fr>
11852 * c-common.c (scalar_to_vector): Moved from c-typeck.c. Support
11853 more operations. Make error messages optional.
11854 * c-common.h (enum stv_conv): Moved from c-typeck.c.
11855 (scalar_to_vector): Declare.
11857 2012-10-08 Jason Merrill <jason@redhat.com>
11859 * c-common.c (c_common_reswords): Add thread_local.
11861 2012-10-08 Dodji Seketeli <dodji@redhat.com>
11863 PR c++/53528 C++11 attribute support
11864 * c-common.h (bitfield_p, cxx_fundamental_alignment_p): Declare
11866 * c-common.c (check_cxx_fundamental_alignment_constraints): New
11868 (handle_aligned_attribute): In choose strictest alignment
11869 among many. Use new check_cxx_fundamental_alignment_constraints.
11870 (handle_transparent_union_attribute): In c++11 attribute syntax,
11871 don't look through typedefs.
11873 2012-10-04 Arnaud Charlet <charlet@adacore.com>
11875 * c-ada-spec.c (print_ada_declaration): Remove handling of TDF_RAW.
11876 * c.opt (-fdump-ada-spec, -fdump-ada-spec-slim): Move switch definition
11879 2012-09-25 Dehao Chen <dehao@google.com>
11881 PR middle-end/54645
11882 * c-pch.c (c_common_read_pch): Rebuild the location_adhoc_data
11883 map when read in the pch.
11885 2012-09-18 Arnaud Charlet <charlet@adacore.com>
11887 * c-ada-spec.c: Style fixes.
11889 2012-09-18 Thomas Quinot <quinot@adacore.com>
11891 * c.opt (-fada-spec-parent): Define new command line switch.
11892 * c-ada-spec.c (get_ada_package): When -fada-spec-parent
11893 is specified, generate binding spec as a child of the specified unit.
11895 2012-09-13 Paolo Carlini <paolo.carlini@oracle.com>
11896 Manuel López-Ibáñez <manu@gcc.gnu.org>
11899 * c.opt ([Winit-self]): Enabled by -Wall in C++.
11901 2012-08-23 Arnaud Charlet <charlet@adacore.com>
11903 * c-ada-spec.c (dump_generic_ada_node): Fix handling of name_only
11904 for pointers, and add missing Convention C pragma.
11905 (print_ada_struct_decl): Add missing aliased keyword.
11906 (dump_ads): Add pragma Ada_2005 and Style_Checks (Off).
11908 2012-08-17 Jakub Jelinek <jakub@redhat.com>
11910 * c-common.c (sizeof_pointer_memaccess_warning): New function.
11911 * c.opt (-Wsizeof-pointer-memaccess): Add new option.
11912 * c-opts.c (c_common_handle_option): Enable it for -Wall.
11913 * c-common.h (sizeof_pointer_memaccess_warning): Add prototype.
11914 * c-common.def (SIZEOF_EXPR): Moved here from cp-tree.def.
11916 2012-08-10 Richard Guenther <rguenther@suse.de>
11918 * c-pretty-print.c (pp_c_expression): Handle anonymous SSA names.
11920 2012-08-07 Steven Bosscher <steven@gcc.gnu.org>
11922 * c-pretty-print.c (pp_c_function_definition): Use pp_newline_and_flush
11923 instead of separate pp_newline and pp_flush.
11924 (print_c_tree): Likewise.
11926 2012-07-26 Richard Henderson <rth@redhat.com>
11928 * c-common.c (handle_hot_attribute): Allow labels.
11929 (handle_cold_attribute): Likewise.
11931 2012-07-20 Jakub Jelinek <jakub@redhat.com>
11934 * c-common.c (check_function_nonnull): Handle multiple nonnull
11935 attributes properly.
11937 2012-07-16 Steven Bosscher <steven@gcc.gnu.org>
11939 * c-gimplify.c: Include dumpfile.h instead of tree-dump.h.
11940 * c-ada-spec.c: Likewise.
11941 * c-dump.c (dump_stmt): Move to cp/dump.c, the only user.
11943 2012-07-14 Steven Bosscher <steven@gcc.gnu.org>
11945 * c-pch.c (CHECK_NO_ASM_OUT_DURING_PCH): Do not define.
11946 Remove code conditional on it.
11948 2012-07-11 Steven Bosscher <steven@gcc.gnu.org>
11950 * c-gimplify.c: Do not include basic-block.h.
11951 * c-common.c: Do not include linfuncs.h.
11953 2012-07-08 Steven Bosscher <steven@gcc.gnu.org>
11955 * c-common.h: Include tree.h.
11957 2012-07-02 Jason Merrill <jason@redhat.com>
11960 * c-common.c (get_priority): Call default_conversion.
11962 2012-07-01 Uros Bizjak <ubizjak@gmail.com>
11964 * c-pch.c (c_common_write_pch): Remove unused variables.
11966 2012-06-29 Steven Bosscher <steven@gcc.gnu.org>
11968 * cppspec.c: Moved from gcc/ to here.
11970 2012-06-27 Kai Tietz <ktietz@redhat.com>
11972 PR preprocessor/37215
11973 * c-ppoutput.c (preprocess_file): Check for nonempty buffer.
11975 2012-06-21 Steven Bosscher <steven@gcc.gnu.org>
11977 * c-common.h (c_common_print_pch_checksum): Remove.
11978 * c-pch.c: Do not include output.h.
11979 (CHECK_NO_ASM_OUT_DURING_PCH): Define and add FIXME.
11980 (asm_out_file): Define iff CHECK_NO_ASM_OUT_DURING_PCH isdefined.
11981 (asm_file_startpos): Define iff CHECK_NO_ASM_OUT_DURING_PCH is defined.
11982 (struct c_pch_header): Remove.
11983 (get_ident): Update gpch version.
11984 (pch_init): Do not print executable_checksum to asm_out_file.
11985 Do not fail if there is no asm_out_file to read back from. Set
11986 asm_file_startpos only if CHECK_NO_ASM_OUT_DURING_PCH is defined.
11987 (c_common_write_pch): Verify that nothing was written to asm_out_file
11988 since pch_init was called. Do not write a c_pch_header, and do not
11989 copy from asm_out_file to the PCH.
11990 (c_common_read_pch): Do not read a c_pch_header, and do not restore
11991 the content of asm_out_file from the PCH.
11992 (c_common_print_pch_checksum): Remove.
11993 * c-opts.c (c_common_init): Print out executable_checksum directly.
11995 2012-06-19 Steven Bosscher <steven@gcc.gnu.org>
11997 * c-target.def (objc_declare_unresolved_class_reference,
11998 objc_declare_class_definition): Add new hooks.
12000 2012-06-19 Steven Bosscher <steven@gcc.gnu.org>
12002 * c-lex.c: Do not include output.h.
12003 (cb_ident): Try to put out .ident with targetm.asm_out.output_ident.
12004 Remove uses of ASM_OUTPUT_IDENT.
12006 2012-06-15 Marc Glisse <marc.glisse@inria.fr>
12009 * c-common.h (c_build_vec_perm_expr): Move decl here.
12010 * c-common.c (c_build_vec_perm_expr): Move definition
12013 2012-06-06 Steven Bosscher <steven@gcc.gnu.org>
12015 * c.opt (fconserve-space): Turn into a no-op.
12017 2012-06-04 Sterling Augustine <saugustine@google.com>
12019 * c-pretty-print.h (pp_c_flag_gnu_v3): New enumerator.
12020 * c-pretty-print.c (pp_c_specifier_qualifier_list): Check it at
12021 both the start and end of the function.
12023 2012-06-04 Steven Bosscher <steven@gcc.gnu.org>
12025 * c-common.c: Do not include output.h.
12026 * c-pragma.c: Likewise.
12028 2012-06-04 Steven Bosscher <steven@gcc.gnu.org>
12030 * error.c (dump_decl): Check pp_c_flag_gnu_v3.
12031 (decl_as_dwarf_string, lang_decl_dwarf_name): New functions.
12032 (lang_decl_name): Handle namespace decls.
12034 2012-05-31 Steven Bosscher <steven@gcc.gnu.org>
12036 * c-ada-spec.c: Do not include output.h.
12037 * c-semantics.c: Likewise.
12039 2012-05-29 Joseph Myers <joseph@codesourcery.com>
12041 * c-common.c: Fix typo.
12043 2012-05-29 Michael Matz <matz@suse.de>
12045 * c-common.h (c_expand_decl): Remove prototype.
12047 2012-05-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
12049 * c.opt (Wmissing-braces): Use LangEnabledBy(C ObjC,Wall).
12050 * c-opts.c (c_common_handle_option): Remove code handling
12051 warn_missing_braces.
12053 2012-05-28 Paolo Carlini <paolo.carlini@oracle.com>
12056 * c-opts.c (c_common_handle_option): For C++ -Wall doesn't enable
12059 2012-05-22 Dodji Seketeli <dodji@redhat.com>
12062 * c.opt (Wunused-local-typedefs): Use EnabledBy(Wunused).
12064 2012-05-17 Manuel López-Ibáñez <manu@gcc.gnu.org>
12066 * c.opt (--pedantic-errors,-pedantic-errors): Do not handle here.
12067 * c-opts.c (c_common_handle_option): Do not handle explicitly
12068 Wreturn-type, Wwrite-strings, warn_ecpp, and -pedantic-errors.
12070 2012-05-16 Dodji Seketeli <dodji@redhat.com>
12072 PR preprocessor/7263
12073 * c-lex.c (c_lex_with_flags): Pass a virtual location to the call
12074 to cpp_classify_number. For diagnostics, use the precise location
12075 instead of the global input_location.
12077 2012-05-15 Paolo Carlini <paolo.carlini@oracle.com>
12080 * c-common.c (shorten_compare): Check c_inhibit_evaluation_warnings.
12082 2012-05-14 Bernd Schmidt <bernds@codesourcery.com>
12084 * c-common.c (DEF_ATTR_STRING): Define and undefine as necessary.
12086 2012-05-14 Manuel López-Ibáñez <manu@gcc.gnu.org>
12089 * c.opt (Wc++0X-compat,Wdelete-non-virtual-dtor,Wjump-misses-init,
12090 Wreorder): Use LangEnabledBy.
12091 * c-opts.c (c_common_handle_option): Do not enable them
12092 explicitly. Call lang-specific generated functions.
12093 (c_common_post_options): Do not set them here.
12095 2012-05-13 Manuel López-Ibáñez <manu@gcc.gnu.org>
12097 * c.opt (Wclobbered,Wempty-body,Wignored-qualifiers,
12098 Wmissing-field-initializers,Wmissing-parameter-type,
12099 Wold-style-declaration,Woverride-init): Use EnabledBy.
12100 * c-opts.c (c_common_post_options): Do not set here explicitly.
12102 2012-05-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
12105 * c-opts.c (c_common_handle_option): Use handle_generated_option
12106 to enable sub-options.
12108 2012-05-10 Paolo Carlini <paolo.carlini@oracle.com>
12111 * c-common.c (warnings_for_convert_and_check): Use warning_at.
12113 2012-05-10 Richard Guenther <rguenther@suse.de>
12115 * c-common.c (c_sizeof_or_alignof_type): Remove assert and
12116 adjust commentary about TYPE_IS_SIZETYPE types.
12118 2012-05-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
12121 * c-common.c (warn_logical_operator): Check that argument of
12122 integer_zerop is not NULL.
12124 2012-05-05 Manuel López-Ibáñez <manu@gcc.gnu.org>
12127 * c-common.c (warn_logical_operator): Do not warn if either side
12128 is already true or false.
12130 2012-05-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
12133 * c-common.c (expr_original_type): New.
12134 (shorten_compare): Do not warn for enumeration types.
12136 2012-05-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
12138 * c.opt (fpermissive): Add Var(flag_permissive).
12140 2012-04-30 Marc Glisse <marc.glisse@inria.fr>
12143 * c-common.c (convert_vector_to_pointer_for_subscript): New function.
12144 * c-common.h (convert_vector_to_pointer_for_subscript): Declare it.
12146 2012-04-30 Dodji Seketeli <dodji@redhat.com>
12148 Add -Wvarargs option
12149 * c.opt (Wvarargs): Define new option.
12151 2012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
12153 * c-common.c (check_function_arguments): Replace
12154 Wmissing-format-attribute with Wsuggest-attribute=format.
12156 2012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
12158 * c.opt (Wsuggest-attribute=format): New. Alias of
12159 Wmissing-format-attribute.
12160 * c-format.c (decode_format_type): Replace
12161 Wmissing-format-attribute with Wsuggest-attribute=format.
12162 (check_function_format): Likewise.
12164 2012-04-27 Ollie Wild <aaw@google.com>
12166 * c-common.c: Add CPP_W_LITERAL_SUFFIX mapping.
12167 * c-opts.c (c_common_handle_option): Handle OPT_Wliteral_suffix.
12168 * c.opt: Add Wliteral-suffix.
12170 2012-04-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
12173 * c.opt (Wpedantic): New.
12174 (pedantic): Alias Wpedantic.
12175 * c-opts.c (c_common_handle_option): Replace -pedantic with -Wpedantic.
12176 (c_common_post_options): Likewise.
12177 (sanitize_cpp_opts): Likewise.
12178 * c-lex.c (interpret_float): Likewise.
12179 * c-format.c (check_format_types): Likewise.
12180 * c-common.c (pointer_int_sum): Likewise.
12181 (c_sizeof_or_alignof_type): Likewise.
12182 (c_add_case_label): Likewise.
12183 (c_do_switch_warnings): Likewise.
12184 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
12186 2012-04-15 Jason Merrill <jason@redhat.com>
12189 * c-format.c (CPLUSPLUS_STD_VER): C++11 inherits from C99.
12190 (C_STD_NAME): Distinguish between C++98 and C++11.
12192 2012-04-11 Eric Botcazou <ebotcazou@adacore.com>
12195 * c-common.h (uint16_type_node): Rename into...
12196 (c_uint16_type_node): ...this.
12197 * c-common.c (c_common_nodes_and_builtins): Adjust for above renaming.
12198 * c-cppbuiltin.c (builtin_define_stdint_macros): Likewise.
12200 2012-04-10 Manuel López-Ibáñez <manu@gcc.gnu.org>
12202 * c-common.c (warn_if_unused_value): Move definition to here.
12203 * c-common.h (warn_if_unused_value): Move declaration to here.
12205 2012-03-23 William Bader <williambader@hotmail.com>
12207 * c-lex.c (c_lex_with_flags): Avoid declarations after stmts.
12209 2012-03-20 Jason Merrill <jason@redhat.com>
12211 * c-common.h (enum cxx_dialect): Add cxx1y.
12212 * c-common.c (c_common_nodes_and_builtins): Use >= for cxx_dialect
12214 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
12215 * c-opts.c (c_common_post_options): Likewise.
12216 (set_std_cxx1y): New.
12217 (c_common_handle_option): Call it.
12218 * c.opt (-std=c++1y, -std=gnu++1y): New flags.
12220 2012-03-19 Paolo Carlini <paolo.carlini@oracle.com>
12223 * c.opt ([Wuseless-cast]): Add.
12225 2012-03-16 Richard Guenther <rguenther@suse.de>
12227 * c-pretty-print.c (pp_c_initializer_list): Adjust.
12229 2012-03-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
12232 * c.opt (ftemplate-backtrace-limit) Add.
12234 2012-03-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12236 * c-cppbuiltin.c (c_cpp_builtins): Remove #pragma extern_prefix
12238 * c-pragma.c (handle_pragma_extern_prefix): Remove.
12239 (init_pragma): Don't register extern_prefix.
12241 2012-03-12 Richard Guenther <rguenther@suse.de>
12243 * c-common.c (c_common_get_narrower): Use c_common_type_for_size.
12244 (builtin_type_for_size): Likewise.
12246 2012-02-13 Jakub Jelinek <jakub@redhat.com>
12249 * c-common.c (sync_resolve_params): Don't decide whether to convert
12250 or not based on TYPE_SIZE comparison, convert whenever arg_type
12251 is unsigned INTEGER_TYPE.
12253 2012-02-06 Paolo Carlini <paolo.carlini@oracle.com>
12256 * c.opt ([Wunused-local-typedefs]): Fix description.
12258 2012-01-24 Mike Stump <mikestump@comcast.net>
12260 * c-common.c (c_common_type_for_mode): Match signed/unsigned types
12263 2012-01-18 Richard Guenther <rguenther@suse.de>
12265 * c-opts.c (c_common_post_options): Reset LTO flags if
12266 we are about to generate a PCH.
12268 2012-01-17 Paolo Carlini <paolo.carlini@oracle.com>
12271 * c-pretty-print.c (pp_c_integer_constant): For unsigned constants
12272 use pp_unsigned_wide_integer.
12274 2012-01-10 Richard Guenther <rguenther@suse.de>
12276 PR middle-end/51806
12277 * c-opts.c (c_common_handle_option): Move -Werror handling
12278 to language independent code.
12280 2012-01-05 Richard Guenther <rguenther@suse.de>
12282 PR middle-end/51764
12283 * c.opt (Wmudflap, fmudflap, fmudflapth, fmudflapir): Move here
12286 2011-12-30 Paolo Carlini <paolo.carlini@oracle.com>
12289 * c-common.c (c_sizeof_or_alignof_type): In C++ allow for alignof
12290 of array types with an unknown bound.
12292 2011-12-20 Joseph Myers <joseph@codesourcery.com>
12294 * c-common.c (flag_isoc99): Update comment to refer to C11.
12295 (flag_isoc1x): Change to flag_isoc11.
12296 * c-common.h (flag_isoc99): Update comment to refer to C11.
12297 (flag_isoc1x): Change to flag_isoc11.
12298 * c-cppbuiltin.c (cpp_atomic_builtins): Change comment to refer to
12300 * c-opts.c (set_std_c1x): Change to set_std_c11.
12301 (c_common_handle_option): Handle OPT_std_c11 and OPT_std_gnu11.
12303 (set_std_c89, set_std_c99, set_std_c11): Use flag_isoc11.
12304 (set_std_c1): Use CLK_STDC11 and CLK_GNUC11.
12305 * c.opt (std=c1x): Change to std=c11. Document as non-draft
12307 (std=c1x, std=iso9899:2011): Add as aliases of std=c11.
12308 (std=gnu1x): Change to std=gnu11. Refer to non-draft standard.
12309 (std=gnu1x): Make alias of std=gnu11.
12311 2011-12-19 Jason Merrill <jason@redhat.com>
12314 * c-common.c (handle_transparent_union_attribute): Check the first
12315 field if the type is complete.
12317 2011-12-15 Jonathan Wakely <jwakely.gcc@gmail.com>
12320 * c-common.c (RID_IS_FINAL): Add.
12321 * c-common.h (RID_IS_FINAL): Add.
12323 2011-11-30 Iain Sandoe <iains@gcc.gnu.org>
12325 * c.opt (fgnu-runtime): Provide full description.
12326 (fnext-runtime): Likewise.
12327 * c-opts.c (OPT_fgnu_runtime, OPT_fnext_runtime) Remove.
12329 2011-11-28 Andrew MacLeod <amacleod@redhat.com>
12331 * c-cpp-builtin.c (cpp_atomic_builtins):New. Emit all atomic
12332 predefines in one place. Add LOCK_FREE predefines.
12333 (c_cpp_builtins): Move Legacy HAVE_SYNC predefines to
12336 2011-11-24 Andrew MacLeod <amacleod@redhat.com>
12339 * c-common.c (get_atomic_generic_size): Check for various error
12341 (resolve_overloaded_atomic_exchange,
12342 resolve_overloaded_atomic_compare_exchange,
12343 resolve_overloaded_atomic_load, resolve_overloaded_atomic_store): Return
12344 error_mark_node for error conditions.
12346 2011-11-08 Richard Guenther <rguenther@suse.de>
12348 PR middle-end/51010
12349 * c-pretty-print.c (pp_c_expression): Handle SSA_NAMEs.
12351 2011-11-07 Richard Henderson <rth@redhat.com>
12352 Aldy Hernandez <aldyh@redhat.com>
12353 Torvald Riegel <triegel@redhat.com>
12355 Merged from transactional-memory.
12357 * c-common.c (handle_tm_wrap_attribute,
12358 handle_tm_attribute, ignore_attribute, parse_tm_stmt_attr): New.
12359 (struct c_common_reswords): Added __transaction* keywords.
12360 (struct c_common_attribute_table): Added transaction* and tm_regparm
12362 * c-common.h: Added RID_TRANSACTION*. Added TM_ATTR* and TM_STMT*
12364 (parse_tm_stmt_attr, tm_attr_to_mask, tm_mask_to_attr,
12365 find_tm_attribute): Declare.
12367 2011-11-07 Jason Merrill <jason@redhat.com>
12370 * c-common.c, c-common.h: Revert yesterday's changes.
12372 2011-11-06 Jason Merrill <jason@redhat.com>
12375 * c-common.c (decl_has_visibility_attr): Split out from...
12376 (c_determine_visibility): ...here.
12377 * c-common.h: Declare it.
12379 2011-11-06 Joseph Myers <joseph@codesourcery.com>
12381 * c-common.c (c_common_reswords): Add _Alignas and _Alignof.
12382 (c_sizeof_or_alignof_type): Diagnose alignof applied to a function
12384 (check_user_alignment): New. Split out of
12385 handle_aligned_attribute. Disallow integer constants with
12386 noninteger types. Conditionally allow zero.
12387 (handle_aligned_attribute): Use check_user_alignment.
12388 * c-common.h (RID_ALIGNAS, check_user_alignment): New.
12390 2011-11-06 Andrew MacLeod <amacleod@redhat.com>
12391 Richard Henderson <rth@redhat.com>
12393 Merged from cxx-mem-model.
12395 * c-cppbuiltin.c (c_cpp_builtins): Test both atomic and sync patterns.
12396 * c-common.c (sync_resolve_params, sync_resolve_return): Only tweak
12397 parameters that are the same type size.
12398 (get_atomic_generic_size): New. Find size of generic
12399 atomic function parameters and do typechecking.
12400 (add_atomic_size_parameter): New. Insert size into parameter list.
12401 (resolve_overloaded_atomic_exchange): Restructure __atomic_exchange to
12402 either __atomic_exchange_n or external library call.
12403 (resolve_overloaded_atomic_compare_exchange): Restructure
12404 __atomic_compare_exchange to either _n variant or external library call.
12405 (resolve_overloaded_atomic_load): Restructure __atomic_load to either
12406 __atomic_load_n or an external library call.
12407 (resolve_overloaded_atomic_store): Restructure __atomic_store to either
12408 __atomic_store_n or an external library call.
12409 (resolve_overloaded_builtin): Handle new __atomic builtins.
12411 2011-11-04 Eric Botcazou <ebotcazou@adacore.com>
12414 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Call fold_offsetof_1.
12415 (fold_offsetof_1): Make global. Remove STOP_REF argument and adjust.
12416 <INDIRECT_REF>: Return the argument.
12417 <ARRAY_REF>: Remove special code for negative offset.
12418 Call fold_build_pointer_plus instead of size_binop.
12419 (fold_offsetof): Remove STOP_REF argument and adjust.
12420 * c-common.h (fold_offsetof_1): Declare.
12421 (fold_offsetof): Remove STOP_REF argument.
12423 2011-11-02 Paolo Carlini <paolo.carlini@oracle.com>
12426 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
12427 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
12428 Wnarrowing for C++0x and C++98.
12429 * c.opt ([Wnarrowing]): Update.
12431 2011-11-01 Paolo Carlini <paolo.carlini@oracle.com>
12434 * c.opt: Add Wzero-as-null-pointer-constant.
12436 2011-10-31 Jason Merrill <jason@redhat.com>
12438 * c.opt (-fdeduce-init-list): Off by default.
12441 * c-common.h (cxx_dialect): Add cxx11 and cxx03.
12442 * c.opt: Add -std=c++11, -std=gnu++11, -std=gnu++03,
12443 and -Wc++11-compat.
12444 * c-opts.c (set_std_cxx11): Rename from set_std_cxx0x.
12446 2011-10-27 Roberto Agostino Vitillo <ravitillo@lbl.gov>
12449 * c.opt (fvisibility-inlines-hidden): Description change.
12451 2011-10-26 Ed Smith-Rowland <3dw4rd@verizon.net>
12453 Implement C++11 user-defined literals.
12454 * c-common.c (build_userdef_literal): New.
12455 * c-common.def: New tree code.
12456 * c-common.h (tree_userdef_literal): New tree struct and accessors.
12457 * c-lex.c (interpret_float): Add suffix parm.
12458 (c_lex_with_flags): Build literal tokens.
12460 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
12464 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
12467 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
12468 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
12469 Wnarrowing for C++0x and C++98.
12470 * c.opt ([Wnarrowing]): Update.
12472 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
12475 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
12476 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
12477 Wnarrowing for C++0x and C++98.
12478 * c.opt ([Wnarrowing]): Update.
12480 2011-10-21 Paolo Carlini <paolo.carlini@oracle.com>
12483 * c-common.c (conversion_warning): Remove code looking for
12484 artificial operands.
12486 2011-10-18 Dodji Seketeli <dodji@redhat.com>
12489 * c-lex.c (fe_file_change): Use LINEMAP_SYSP when
12490 !NO_IMPLICIT_EXTERN_C.
12492 2011-10-17 Michael Spertus <mike_spertus@symantec.com>
12494 * c-common.c (c_common_reswords): Add __bases,
12496 * c-common.h: Add RID_BASES and RID_DIRECT_BASES.
12498 2011-10-17 Paolo Carlini <paolo.carlini@oracle.com>
12501 * c.opt ([Wnonnull]): Add C++ and Objective-C++.
12503 2011-10-15 Tom Tromey <tromey@redhat.com>
12504 Dodji Seketeli <dodji@redhat.com>
12506 * c.opt (fdebug-cpp): New option.
12507 * c-opts.c (c_common_handle_option): Handle the option.
12508 * c-ppoutput.c (maybe_print_line_1): New static function. Takes an
12509 output stream in parameter. Factorized from ...
12510 (maybe_print_line): ... this. Dump location debug information when
12511 -fdebug-cpp is in effect.
12512 (print_line_1): New static function. Takes an output stream in
12513 parameter. Factorized from ...
12514 (print_line): ... here. Dump location information when -fdebug-cpp
12516 (scan_translation_unit): Dump location information when
12517 -fdebug-cpp is in effect.
12519 2011-10-15 Tom Tromey <tromey@redhat.com>
12520 Dodji Seketeli <dodji@redhat.com>
12522 * c.opt (ftrack-macro-expansion): New option. Handle it with and
12524 * c-opts.c (c_common_handle_option)<case
12525 OPT_ftrack_macro_expansion_, case OPT_ftrack_macro_expansion>: New
12526 cases. Handle -ftrack-macro-expansion with and without argument.
12528 2011-10-15 Tom Tromey <tromey@redhat.com>
12529 Dodji Seketeli <dodji@redhat.com>
12531 * c-ppoutput.c (scan_translation_unit, maybe_print_line)
12532 (print_line, cb_define, do_line_change): Adjust to avoid touching
12533 the internals of struct line_map. Use the public API instead.
12534 * c-pch.c (c_common_read_pch): Likewise.
12535 * c-lex.c (fe_file_change): Likewise.
12537 2011-10-14 Paolo Carlini <paolo.carlini@oracle.com>
12540 * c.opt ([Wformat-zero-length]): Add C++ and Objective-C++.
12542 2011-10-11 Paolo Carlini <paolo.carlini@oracle.com>
12545 * c-pretty-print.c (pp_c_floating_constant): Output
12546 max_digits10 (in the ISO C++ WG N1822 sense) decimal digits.
12548 2011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
12550 * c-common.c (def_builtin_1): Delete old interface with two
12551 parallel arrays to hold standard builtin declarations, and replace
12552 it with a function based interface that can support creating
12553 builtins on the fly in the future. Change all uses, and poison
12554 the old names. Make sure 0 is not a legitimate builtin index.
12555 * c-omp.c (c_finish_omp_barrier): Ditto.
12556 (c_finish_omp_taskwait): Ditto.
12557 (c_finish_omp_flush): Ditto.
12559 2011-10-11 Tristan Gingold <gingold@adacore.com>
12561 * c.opt: (fallow-parameterless-variadic-functions): New.
12563 2011-09-08 Dodji Seketeli <dodji@redhat.com>
12565 PR c++/33255 - Support -Wunused-local-typedefs warning
12566 * c-common.h (struct c_language_function::local_typedefs): New
12568 (record_locally_defined_typedef, maybe_record_typedef_use)
12569 (maybe_warn_unused_local_typedefs): Declare new functions.
12570 * c-common.c (record_locally_defined_typedef)
12571 (maybe_record_typedef_use)
12572 (maybe_warn_unused_local_typedefs): Define new functions.
12573 * c.opt: Declare new -Wunused-local-typedefs flag.
12575 2011-09-06 Eric Botcazou <ebotcazou@adacore.com>
12577 PR middle-end/50266
12578 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Fold offsetof-like
12581 2011-09-05 Richard Guenther <rguenther@suse.de>
12583 * c-common.c (complete_array_type): Use ssize_int (-1) instead
12584 of integer_minus_one_node for empty array upper bounds.
12586 2011-08-28 Dodji Seketeli <dodji@redhat.com>
12588 * c-pch.c (c_common_read_pch): Call linemap_add with LC_ENTER as
12589 it's the first time it's being called on this main TU.
12591 2011-08-24 Richard Guenther <rguenther@suse.de>
12594 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Fix conditional.
12596 2011-08-22 Gabriel Charette <gchare@google.com>
12598 * c-opts.c (c_finish_options): Force BUILTINS_LOCATION for tokens
12599 defined in cpp_init_builtins and c_cpp_builtins.
12601 2011-08-19 Joseph Myers <joseph@codesourcery.com>
12603 * c-common.c (c_common_reswords): Add __builtin_complex.
12604 * c-common.h (RID_BUILTIN_COMPLEX): New.
12606 2011-08-18 Joseph Myers <joseph@codesourcery.com>
12608 * c-common.c (c_common_reswords): Add _Noreturn.
12609 (keyword_is_function_specifier): Handle RID_NORETURN.
12610 * c-common.h (RID_NORETURN): New.
12612 2011-08-10 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
12614 * c-common.c (unsafe_conversion_p): New function. Check if it is
12615 unsafe to convert an expression to the type.
12616 (conversion_warning): Adjust, use unsafe_conversion_p.
12617 * c-common.h (unsafe_conversion_p): New function declaration.
12619 2011-08-02 Jakub Jelinek <jakub@redhat.com>
12621 * c-common.h (c_finish_omp_atomic): Adjust prototype.
12622 (c_finish_omp_taskyield): New prototype.
12623 * c-omp.c (c_finish_omp_atomic): Add OPCODE, V, LHS1 and RHS1
12624 arguments. Handle OMP_ATOMIC_READ, OMP_ATOMIC_CAPTURE_OLD and
12625 OMP_ATOMIC_CAPTURE_NEW in addition to OMP_ATOMIC. If LHS1
12626 or RHS1 have side-effects, evaluate those too in the right spot,
12627 if it is a decl and LHS is also a decl, error out if they
12629 (c_finish_omp_taskyield): New function.
12630 * c-cppbuiltin.c (c_cpp_builtins): Change _OPENMP to 201107.
12631 * c-pragma.c (omp_pragmas): Add taskyield.
12632 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKYIELD.
12633 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_FINAL and
12634 PRAGMA_OMP_CLAUSE_MERGEABLE.
12636 2011-07-25 Dodji Seketeli <dodji@redhat.com>
12638 * c-common.h (set_underlying_type): Remove parm name from
12641 2011-07-25 Romain Geissler <romain.geissler@gmail.com>
12643 * c-pretty-print.h: Search c-common.h in c-family.
12645 2011-07-22 Jason Merrill <jason@redhat.com>
12648 * c.opt (Wnarrowing): New.
12651 * c-common.h: Declare c_linkage_bindings.
12652 * c-pragma.c (handle_pragma_redefine_extname): Use it.
12655 * c-opts.c (set_std_cxx0x): Set flag_isoc94 and flag_isoc99.
12656 * c-pretty-print.c (pp_c_cv_qualifiers): Check c_dialect_cxx as well
12657 as flag_isoc99 for 'restrict'.
12658 (pp_c_specifier_qualifier_list): Likewise for _Complex.
12660 2011-07-21 Ian Lance Taylor <iant@google.com>
12662 PR middle-end/49705
12663 * c-common.c (c_disable_warnings): New static function.
12664 (c_enable_warnings): New static function.
12665 (c_fully_fold_internal): Change local unused_p to bool. Call
12666 c_disable_warnings and c_enable_warnings rather than change
12667 c_inhibit_evaluation_warnings.
12669 2011-07-20 Jason Merrill <jason@redhat.com>
12671 PR c++/6709 (DR 743)
12672 PR c++/42603 (DR 950)
12673 * c-common.h (CPP_KEYWORD, CPP_TEMPLATE_ID): Move from cp/parser.h.
12674 (CPP_NESTED_NAME_SPECIFIER, N_CP_TTYPES): Likewise.
12675 (CPP_DECLTYPE): New.
12676 * c-common.c (c_parse_error): Handle CPP_DECLTYPE.
12678 2011-07-19 Richard Guenther <rguenther@suse.de>
12680 * c-common.c (pointer_int_sum): Use fold_build_pointer_plus.
12681 * c-omp.c (c_finish_omp_for): Likewise.
12683 2011-07-12 Eric Botcazou <ebotcazou@adacore.com>
12685 * c-ada-spec.c (dump_nested_types): Put semi-colon after empty loop
12686 body on the next line.
12688 2011-07-08 Jason Merrill <jason@redhat.com>
12691 * c-omp.c (check_omp_for_incr_expr): Handle preevaluation.
12694 * c-common.c (c_apply_type_quals_to_decl): Don't check
12695 TYPE_NEEDS_CONSTRUCTING.
12697 2011-07-06 Richard Guenther <rguenther@suse.de>
12699 * c-common.c (c_common_nodes_and_builtins):
12700 Merge calls to build_common_tree_nodes and build_common_tree_nodes_2.
12702 2011-07-05 Richard Guenther <rguenther@suse.de>
12704 * c-common.c (c_common_nodes_and_builtins): Build all common
12707 2011-06-27 Jakub Jelinek <jakub@redhat.com>
12709 * c-common.h (c_tree_chain_next): New static inline function.
12711 * c-common.c (check_builtin_function_arguments): Handle
12712 BUILT_IN_ASSUME_ALIGNED.
12714 2011-06-21 Andrew MacLeod <amacleod@redhat.com>
12716 * c-common.c: Add sync_ or SYNC__ to builtin names.
12717 * c-omp.c: Add sync_ or SYNC__ to builtin names.
12719 2011-06-20 Pierre Vittet <piervit@pvittet.com>
12721 * c-pragma.h (pragma_handler_1arg, pragma_handler_2arg): New
12723 (gen_pragma_handler): New union.
12724 (internal_pragma_handler): New type.
12725 (c_register_pragma_with_data)
12726 (c_register_pragma_with_expansion_and_data): New functions.
12728 * c-pragma.c (registered_pragmas, c_register_pragma_1)
12729 (c_register_pragma, c_register_pragma_with_expansion)
12730 (c_invoke_pragma_handler): Changed to work with
12731 internal_pragma_handler.
12732 (c_register_pragma_with_data)
12733 (c_register_pragma_with_expansion_and_data): New functions.
12735 2011-06-14 Joseph Myers <joseph@codesourcery.com>
12737 * c-common.c: Include common/common-target.h.
12738 (handle_section_attribute): Use
12739 targetm_common.have_named_sections.
12740 * c-cppbuiltin.c: Include common/common-target.h.
12741 (c_cpp_builtins): Use targetm_common.except_unwind_info.
12743 2011-06-10 Richard Guenther <rguenther@suse.de>
12745 * c-pretty-print.c (pp_c_type_specifier): Use pp_c_identifier
12746 to print a IDENTIFIER_NODE.
12748 2011-06-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12749 Joseph Myers <joseph@codesourcery.com>
12751 * c.opt (fbuilding-libgcc): New option.
12752 * c-cppbuiltin.c (c_cpp_builtins): Define
12753 __LIBGCC_TRAMPOLINE_SIZE__ if flag_building_libgcc.
12755 2011-06-07 Jason Merrill <jason@redhat.com>
12757 * c-common.c (max_tinst_depth): Lower default to 900.
12759 * c-format.c (gcc_cxxdiag_char_table): Add 'S' format.
12761 2011-06-07 Richard Guenther <rguenther@suse.de>
12763 * c-common.c (c_common_nodes_and_builtins): Do not set
12764 size_type_node or call set_sizetype.
12766 2011-06-07 Dodji Seketeli <dodji@redhat.com>
12769 * c-pretty-print.c (pp_c_integer_constant): Consider the canonical
12770 type when using pointer comparison to compare types.
12772 2011-06-02 Jonathan Wakely <jwakely.gcc@gmail.com>
12774 * c.opt: Add -Wdelete-non-virtual-dtor.
12775 * c-opts.c (c_common_handle_option): Include it in -Wall.
12777 2011-05-30 Nathan Froyd <froydnj@gcc.gnu.org>
12782 2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
12784 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
12787 2011-05-27 Jakub Jelinek <jakub@redhat.com>
12790 * c-common.c (c_common_truthvalue_conversion) <case COND_EXPR>: For
12791 C++ don't call c_common_truthvalue_conversion on void type arms.
12793 2011-05-27 Nathan Froyd <froydnj@codesourcery.com>
12795 * c-common.h (struct stmt_tree_s) [x_cur_stmt_list]: Change to a VEC.
12796 (stmt_list_stack): Define.
12797 (cur_stmt_list): Adjust for new type of x_cur_stmt_list.
12798 * c-semantics.c (push_stmt_list, pop_stmt_list): Likewise.
12800 2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
12802 * c-common.c (warning_candidate_p): Check for BLOCKs.
12804 2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
12806 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
12809 2011-05-25 Jakub Jelinek <jakub@redhat.com>
12811 * c-common.c (def_fn_type): Remove extra va_end.
12813 2011-05-23 Jason Merrill <jason@redhat.com>
12816 * c-common.c (c_common_get_narrower): New.
12817 (shorten_binary_op, shorten_compare, warn_for_sign_compare): Use it.
12819 2011-05-23 Nathan Froyd <froydnj@codesourcery.com>
12821 * c-common.h (check_function_arguments): Tweak prototype of
12822 check_function_arguments.
12823 * c-common.c (check_function_arguments): Likewise. Adjust
12824 calls to check_function_nonnull, check_function_format, and
12825 check_function_sentinel.
12826 (check_function_sentinel): Take a FUNCTION_TYPE rather than
12827 separate attributes and typelist arguments. Use
12828 FOREACH_FUNCTION_ARGS to iterate over argument types.
12830 2011-05-15 Paolo Carlini <paolo.carlini@oracle.com>
12832 * c-common.c (c_common_reswords): Reorder.
12833 * c-common.h (rid): Likewise.
12835 2011-05-10 Nathan Froyd <froydnj@codesourcery.com>
12837 * c-common.c (def_fn_type): Don't call build_function_type, call
12838 build_function_type_array or build_varargs_function_type_array
12840 (c_common_nodes_and_builtins): Likewise.
12842 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
12844 * c-common.c (c_add_case_label): Omit the loc argument to
12846 * c-common.h (build_case_label): Remove.
12847 * c-semantics.c (build_case_label): Remove.
12849 2011-05-05 Joseph Myers <joseph@codesourcery.com>
12851 * c-objc.h (objc_start_method_definition): Update prototype.
12852 * stub-objc.c (objc_start_method_definition): Add extra parameter.
12854 2011-05-04 Nathan Froyd <froydnj@codesourcery.com>
12856 * c-common.c (check_main_parameter_types): Reindent. Don't use
12857 TYPE_ARG_TYPES directly.
12858 (handle_nonnull_attribute): Likewise.
12859 (sync_resolve_params): Likewise.
12860 * c-format.c (handle_format_arg_attribute): Likewise. Adjust call
12861 to check_format_string.
12862 (handle_format_attribute): Likewise.
12863 (check_format_string): Take a function type to examine instead of
12864 a type list. Use a function_arg_iterator to step through argument
12867 2011-05-04 Richard Guenther <rguenther@suse.de>
12869 * c-common.c (fix_string_type): Use size_int for index type bounds.
12870 (start_fname_decls): Do not pass NULL to build_int_cst.
12871 (c_init_attributes): Likewise.
12872 * c-lex.c (c_lex_with_flags): Likewise.
12874 2011-04-27 Jason Merrill <jason@redhat.com>
12876 * c-common.c (make_tree_vector_from_list): New.
12877 * c-common.h: Declare it.
12879 2011-04-26 Richard Guenther <rguenther@suse.de>
12881 PR preprocessor/48248
12882 * c-ppoutput.c (maybe_print_line): Always optimize newlines
12883 for output size with -P.
12885 2011-04-25 Paolo Carlini <paolo.carlini@oracle.com>
12887 * c-common.c (struct c_common_resword): Add __underlying_type.
12888 * c-common.h (enum rid): Add RID_UNDERLYING_TYPE.
12890 2011-04-20 Jim Meyering <meyering@redhat.com>
12892 * c-format.c (init_dollar_format_checking): Remove useless
12895 2011-04-15 Nicola Pero <nicola.pero@meta-innovation.com>
12897 * c-objc.h (objc_get_interface_ivars): Removed.
12898 (objc_detect_field_duplicates): New.
12899 * stub-objc.c: Likewise.
12901 2011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
12903 * stub-objc.c (objc_declare_protocols): Renamed to
12904 objc_declare_protocol.
12905 * c-objc.h: Likewise.
12907 2011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
12909 * stub-objc.c (objc_declare_class): Updated argument name.
12911 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
12913 * c-common.h (c_common_init_ts): Declare.
12914 * c-common.c (c_common_init_ts): Define.
12916 2011-04-12 Nicola Pero <nicola.pero@meta-innovation.com>
12918 * c-objc.h (objc_build_message_expr): Updated prototype.
12919 * stub-objc.c (objc_build_message_expr): Likewise.
12921 2011-04-12 Martin Jambor <mjambor@suse.cz>
12923 * c-gimplify.c (c_genericize): Call cgraph_get_create_node instead
12926 2011-04-11 Richard Guenther <rguenther@suse.de>
12928 * c-common.c (complete_array_type): Build a range type of
12931 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
12933 * c-common.c (handle_sentinel_attribute): Don't use TYPE_ARG_TYPES.
12934 (handle_type_generic_attribute): Likewise.
12936 2011-04-07 Jason Merrill <jason@redhat.com>
12939 * c-common.c (c_common_truthvalue_conversion): Don't ignore
12940 conversion from C++0x scoped enum.
12942 2011-04-06 Joseph Myers <joseph@codesourcery.com>
12944 * c-target-def.h: New file.
12945 * c-target.def: New file.
12946 * c-target.h: New file.
12947 * c-common.c (targetcm): Don't define here.
12948 * c-common.h (default_handle_c_option): Declare.
12949 * c-format.c: Include c-target.h instead of target.h.
12950 * c-opts.c: Include c-target.h instead of target.h. Explicitly
12952 (default_handle_c_option): Move from targhooks.c.
12954 2011-03-29 Jakub Jelinek <jakub@redhat.com>
12956 PR preprocessor/48248
12957 * c-ppoutput.c (print): Add src_file field.
12958 (init_pp_output): Initialize it.
12959 (maybe_print_line): Don't optimize by adding up to 8 newlines
12960 if map->to_file and print.src_file are different file.
12961 (print_line): Update print.src_file.
12963 2011-03-25 Kai Tietz <ktietz@redhat.com>
12965 * c-ada-spec.c (compare_comment): Use filename_cmp
12966 instead of strcmp for filename.
12968 2011-03-25 Jeff Law <law@redhat.com>
12970 * c-common.c (def_fn_type): Add missing va_end.
12972 2011-03-25 Jason Merrill <jason@redhat.com>
12974 * c.opt: Add -std=c++03.
12976 2011-03-22 Eric Botcazou <ebotcazou@adacore.com>
12978 * c-ada-spec.c (dump_ada_template): Skip non-class instances.
12980 2011-03-17 Kai Tietz <ktietz@redhat.com>
12983 * c-pretty-print.c (pp_c_specifier_qualifier_list):
12984 Display allowed attributes for function pointer types.
12985 (pp_c_attributes_display): New function to display
12986 attributes having affects_type_identity flag set to true.
12987 * c-pretty-print.h (pp_c_attributes_display): New prototype.
12989 * c-common.c (c_common_attribute_table):
12991 (c_common_format_attribute_table): Likewise.
12993 2011-03-18 Jason Merrill <jason@redhat.com>
12995 * c.opt (fconstexpr-depth): Add Var(max_constexpr_depth).
12996 * c-common.h: Don't declare it here.
12997 * c-common.c: Or define it here.
12998 * c-opts.c (c_common_handle_option): Or set it here.
13001 * c-common.c (handle_transparent_union_attribute): Don't
13002 make a duplicate type in C++.
13004 2011-03-15 Jason Merrill <jason@redhat.com>
13006 * c-common.c (max_constexpr_depth): New.
13007 * c-common.h: Declare it.
13008 * c-opts.c (c_common_handle_option): Set it.
13009 * c.opt (fconstexpr-depth): New option.
13011 2011-03-11 Jason Merrill <jason@redhat.com>
13013 * c-common.c (attribute_takes_identifier_p): Add missing const.
13016 * c-common.c (attribute_takes_identifier_p): Assume that an
13017 unknown attribute takes an identifier.
13019 2011-03-07 Nathan Froyd <froydnj@codesourcery.com>
13022 * c-common.c (c_type_hash): Call list_length instead of iterating
13023 through DECL_CHAIN. Rename 'i' to 'n_elements'.
13025 2011-02-19 Jakub Jelinek <jakub@redhat.com>
13028 * c-common.c (c_fully_fold_internal): Handle VIEW_CONVERT_EXPR.
13030 2011-02-17 Iain Sandoe <iains@gcc.gnu.org>
13032 * c.opt (fobjc-abi-version=) New.
13033 (fobjc-nilcheck): New.
13035 2011-02-03 Nathan Froyd <froydnj@codesourcery.com>
13038 * c-common.h (keyword_is_decl_specifier): Declare.
13039 * c-common.c (keyword_is_decl_specifier): Define.
13040 (keyword_is_function_specifier): New function.
13042 2011-01-26 Jakub Jelinek <jakub@redhat.com>
13045 * c-lex.c (interpret_float): If CPP_N_IMAGINARY, ensure
13046 EXCESS_PRECISION_EXPR is created with COMPLEX_TYPE instead of
13049 2011-01-26 Arnaud Charlet <charlet@adacore.com>
13051 * c-ada-spec.c (dump_generic_ada_node): Avoid dereferencing null type.
13053 2011-01-26 Jakub Jelinek <jakub@redhat.com>
13056 * c-opts.c (c_common_post_options): Call c_common_no_more_pch
13057 after init_c_lex if pch_file is set.
13059 2011-01-26 Dave Korn <dave.korn.cygwin@gmail.com>
13062 * c.opt (-fkeep-inline-dllexport): New switch.
13064 2011-01-12 Richard Guenther <rguenther@suse.de>
13066 PR middle-end/32511
13067 * c-common.c (handle_weak_attribute): Warn instead of error
13068 on declaring an inline function weak.
13070 2011-01-05 Tom Tromey <tromey@redhat.com>
13072 * c-common.h (lvalue_error): Update.
13073 * c-common.c (lvalue_error): Add 'loc' argument. Call error_at,
13076 2010-12-29 Nicola Pero <nicola.pero@meta-innovation.com>
13079 * c-objc.h (objc_finish_message_expr): Added argument to
13082 2010-12-22 Nathan Froyd <froydnj@codesourcery.com>
13084 * c-common.c (handle_nonnull_attribute, handle_sentinel_attribute):
13087 2010-12-18 Nicola Pero <nicola.pero@meta-innovation.com>
13089 * c-objc.h (objc_maybe_warn_exceptions): New.
13090 * stub-objc.c (objc_maybe_warn_exceptions): New.
13092 2010-12-10 Nathan Froyd <froydnj@codesourcery.com>
13094 * c-common.h (readonly_error): Declare.
13095 * c-common.c (readonly_error): Define.
13097 2010-12-09 Nathan Froyd <froydnj@codesourcery.com>
13099 * c-common.h (invalid_indirection_error): Declare.
13100 * c-common.c (invalid_indirection_error): Define.
13102 2010-12-03 Richard Guenther <rguenther@suse.de>
13105 * c-pretty-print.c (pp_c_postfix_expression): Handle MEM_REF.
13106 (pp_c_unary_expression): Likewise.
13107 (pp_c_expression): Likewise.
13109 2010-11-30 Nicola Pero <nicola.pero@meta-innovation.com>
13111 * c-common.h (objc_finish_function): New.
13112 (objc_non_volatilized_type): Removed.
13113 (objc_type_quals_match): Removed.
13114 * stub-objc.c (objc_finish_function): New.
13115 (objc_non_volatilized_type): Removed.
13116 (objc_type_quals_match): Removed.
13118 2010-11-30 Joseph Myers <joseph@codesourcery.com>
13120 * c-common.h (parse_optimize_options): Declare.
13121 * c-cppbuiltin.c, c-format.c, c-gimplify.c, c-lex.c, c-omp.c,
13122 c-pch.c, c-pragma.c, c-semantics.c: Don't include toplev.h.
13124 2010-11-29 Joseph Myers <joseph@codesourcery.com>
13126 * c-opts.c (check_deps_environment_vars): Use getenv instead of
13128 * c-pch.c (O_BINARY): Don't define here.
13129 * c-pragma.h: Include "cpplib.h" instead of <cpplib.h>.
13131 2010-11-25 Joseph Myers <joseph@codesourcery.com>
13133 * c-cppbuiltin.c (c_cpp_builtins): Pass &global_options to
13134 targetm.except_unwind_info.
13136 2010-11-23 Joseph Myers <joseph@codesourcery.com>
13138 * c-opts.c (c_common_handle_option): Pass location to
13139 set_struct_debug_option.
13141 2010-11-23 Joseph Myers <joseph@codesourcery.com>
13143 * c-common.c (visibility_options): Move from ../opts.c.
13144 * c-common.h (struct visibility_flags, visibility_options):
13146 * c-opts.c (finish_options): Rename to c_finish_options.
13147 (c_common_init): Update call to finish_options.
13149 2010-11-22 Nicola Pero <nicola.pero@meta-innovation.com>
13152 * c-lex.c (lex_string): Check that each string in an Objective-C
13153 string concat sequence starts with either one or zero '@', and
13154 that there are no spurious '@' signs at the end.
13156 2010-11-20 Joseph Myers <joseph@codesourcery.com>
13158 * c-pragma.c: Remove conditionals on HANDLE_PRAGMA_PACK,
13159 HANDLE_PRAGMA_PACK_PUSH_POP, HANDLE_PRAGMA_WEAK and
13160 HANDLE_PRAGMA_VISIBILITY.
13161 * c-pragma.h (HANDLE_PRAGMA_WEAK, HANDLE_PRAGMA_PACK,
13162 HANDLE_PRAGMA_VISIBILITY): Don't define.
13163 (HANDLE_SYSV_PRAGMA, HANDLE_PRAGMA_PACK_PUSH_POP): Don't test.
13165 2010-11-20 Nathan Froyd <froydnj@codesourcery.com>
13170 * c-common.h (keyword_begins_type_specifier): Declare.
13171 (keyword_is_storage_class_specifier): Declare.
13172 (keyword_is_type_qualifier): Declare.
13173 * c-common.c (keyword_begins_type_specifier): New function.
13174 (keyword_is_storage_class_specifier): New function.
13175 (keyword_is_type_qualifier): Declare.
13177 2010-11-19 Joseph Myers <joseph@codesourcery.com>
13180 * c-common.c (in_late_binary_op): Define.
13181 (c_common_truthvalue_conversion): Check in_late_binary_op before
13182 calling c_save_expr.
13183 * c-common.h (in_late_binary_op): Declare.
13185 2010-11-19 Joseph Myers <joseph@codesourcery.com>
13187 * c-opts.c (c_common_handle_option): Update calls to
13188 set_struct_debug_option.
13190 2010-11-19 Nicola Pero <nicola.pero@meta-innovation.com>
13192 * c-common.h (objc_declare_protocols): Added additional argument.
13193 * stub-objc.c (objc_declare_protocol): Same change.
13195 2010-11-18 Nathan Froyd <froydnj@codesourcery.com>
13198 * c-common.h (build_real_imag_expr): Declare.
13199 * c-semantics.c (build_real_imag_expr): Define.
13201 2010-11-17 Joseph Myers <joseph@codesourcery.com>
13203 * c-opts.c (c_common_parse_file): Take no arguments.
13204 * c-common.h (c_common_parse_file): Update prototype.
13206 2010-11-16 Jakub Jelinek <jakub@redhat.com>
13209 * c-common.c (warning_candidate_p): Don't track non-const calls
13212 2010-11-15 Ian Lance Taylor <iant@google.com>
13214 * c-lex.c (init_c_lex): Set macro debug callbacks if
13215 flag_dump_go_spec is set.
13217 2010-11-15 Nicola Pero <nicola.pero@meta-innovation.com>
13219 * c-common.h (objc_build_incr_expr_for_property_ref): New.
13220 * stub-objc.c (objc_build_incr_expr_for_property_ref): New.
13222 2010-11-15 Nathan Froyd <froydnj@codesourcery.com>
13224 PR preprocessor/45038
13225 * c-cppbuiltin.c (c_cpp_builtins): Use different format for C++
13228 2010-11-12 Joseph Myers <joseph@codesourcery.com>
13230 * c-common.h (c_family_lang_mask): Declare.
13231 * c-opts.c (c_family_lang_mask): Make extern.
13232 * c-pragma.c (handle_pragma_diagnostic): Use
13233 control_warning_option.
13235 2010-11-12 Joseph Myers <joseph@codesourcery.com>
13237 * c-common.c (parse_optimize_options): Update call to
13239 * c-common.h (c_common_handle_option): Update prototype.
13240 * c-opts.c (c_common_handle_option): Take location_t parameter and
13241 pass it to other functions.
13243 2010-11-11 Joseph Myers <joseph@codesourcery.com>
13245 * c-opts.c (warning_as_error_callback): Remove.
13246 (c_common_initialize_diagnostics): Don't call
13247 register_warning_as_error_callback.
13248 (c_common_handle_option): Handle -Werror=normalized= here.
13250 2010-11-10 Joseph Myers <joseph@codesourcery.com>
13252 * c-common.c (handle_mode_attribute): Use %' and word "signedness"
13254 * c-opts.c (c_common_parse_file): Start diagnostics with lowercase
13256 * c-pragma.c (handle_pragma_target, handle_pragma_optimize):
13257 Remove trailing '.' from diagnostics.
13258 * c.opt (Wwrite-strings_: Avoid '`' in help text.
13260 2010-11-10 Joseph Myers <joseph@codesourcery.com>
13262 * c-common.c (parse_optimize_options): Pass global_dc to
13264 * c-opts.c (c_common_handle_option): Pass &global_options to
13265 set_Wstrict_aliasing.
13266 * c.opt (v): Don't mark Common or document here.
13268 2010-11-06 Iain Sandoe <iains@gcc.gnu.org>
13271 * c-format.c (format_type): New type gcc_objc_string_format_type.
13272 (valid_stringptr_type_p): New.
13273 (handle_format_arg_attribute): Use valid_stringptr_type_p ().
13274 (check_format_string): Pass expected type, use
13275 valid_stringptr_type_p (), check that the format string types are
13276 consistent with the format specification.
13277 (decode_format_attr): Warn if NSString is used outside objective-c.
13278 (format_types_orig): Add NSString.
13279 (format_name): New.
13280 (format_flags): New.
13281 (check_format_arg): Handle format strings requiring an external parser.
13282 first_target_format_type: New variable.
13283 (handle_format_attribute): Set up first_target_format_type, pass the
13284 expected format arg string type to check_format_string().
13285 * c-common.h (FMT_FLAG_PARSE_ARG_CONVERT_EXTERNAL): New flag.
13286 * stub-objc.c (objc_string_ref_type_p): New.
13287 (objc_check_format_arg): New.
13289 2010-11-04 Nicola Pero <nicola.pero@meta-innovation.com>
13291 Fixed using the Objective-C 2.0 dot-syntax with class names.
13292 * c-common.h (objc_build_class_component_ref): New.
13293 * stub-objc.c (objc_build_class_component_ref): New.
13295 2010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
13297 * c.opt (Wproperty-assign-default): New option.
13299 2010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
13301 Implemented -fobjc-std=objc1 flag.
13302 * c.opt (fobjc-std=objc1): New option.
13304 2010-11-01 Nicola Pero <nicola.pero@meta-innovation.com>
13306 Implemented format and noreturn attributes for Objective-C methods.
13307 * c-common.c (handle_noreturn_attribute): Recognize 'noreturn'
13308 attribute for Objective-C methods.
13310 2010-10-31 Jason Merrill <jason@redhat.com>
13312 * c-common.c (conversion_warning, warn_for_collisions_1): Use
13315 2010-10-30 Nicola Pero <nicola.pero@meta-innovation.com>
13317 Implemented Objective-C 2.0 @property, @synthesize and @dynamic.
13318 * c-common.h (enum rid): Removed RID_COPIES and RID_IVAR.
13319 (objc_add_property_declaration): Removed arguments for copies and
13321 (objc_build_getter_call): Renamed to
13322 objc_maybe_build_component_ref.
13323 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
13324 (objc_is_property_ref): New.
13325 * c-common.c (c_common_reswords): Removed copies and ivar.
13326 * stub-objc.c (objc_add_property_declaration): Removed arguments
13327 for copies and ivar.
13328 (objc_build_getter_call): Renamed to
13329 objc_maybe_build_component_ref.
13330 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
13331 (objc_is_property_ref): New.
13333 2010-10-29 Arnaud Charlet <charlet@adacore.com>
13334 Matthew Gingell <gingell@adacore.com>
13336 * c-ada-spec.c (separate_class_package): New function.
13337 (pp_ada_tree_identifier): Prefix references to C++ classes with the
13338 name of their enclosing package.
13339 (print_ada_declaration): Use separate_class_package.
13341 2010-10-27 Jason Merrill <jason@redhat.com>
13343 * c-common.c (c_common_reswords): Add __is_literal_type.
13344 * c-common.h (enum rid): Add RID_IS_LITERAL_TYPE.
13346 * c-common.c (check_case_value): Remove special C++ code.
13348 2010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
13350 * c-common.h (enum rid): Added RID_READWRITE, RID_ASSIGN,
13351 RID_RETAIN, RID_COPY and RID_NONATOMIC. Updated RID_FIRST_PATTR
13352 and RID_LAST_PATTR.
13353 (objc_add_property_declaration): Added additional arguments.
13354 (objc_property_attribute_kind): Removed.
13355 (objc_set_property_attr): Removed.
13356 * c-common.c (c_common_reswords): Added readwrite, assign, retain,
13357 copy and nonatomic.
13358 * stub-objc.c (objc_add_property_declaration): Added additional
13360 (objc_set_property_attr): Removed.
13362 2010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
13364 * c-common.h (objc_add_property_variable): Renamed to
13365 objc_add_property_declaration. Added location argument.
13366 * stub-objc.c (objc_add_property_variable): Same change.
13368 2010-10-23 Nicola Pero <nicola.pero@meta-innovation.com>
13370 * c-common.h (objc_maybe_printable_name): New.
13371 * stub-objc.c (objc_maybe_printable_name): New.
13373 2010-10-22 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
13374 Andrew Pinski <pinskia@gmail.com>
13376 * c-common.h (c_common_mark_addressable_vec): Declare.
13377 * c-common.c (c_common_mark_addressable_vec): New function.
13379 2010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
13381 * c-common.h (objc_set_method_type): Removed.
13382 (objc_add_method_declaration): Added boolean argument.
13383 (objc_start_method_definition): Same change.
13384 (objc_build_method_signature): Same change.
13385 * stub-objc.c (objc_set_method_type): Removed.
13386 (objc_add_method_declaration): Added boolean argument.
13387 (objc_start_method_definition): Same change.
13388 (objc_build_method_signature): Same change.
13390 2010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
13392 * c-common.h (finish_file): Removed.
13393 (objc_write_global_declarations): New.
13394 * c-opts.c (c_common_parse_file): Do not call finish_file.
13395 * stub-objc.c (objc_write_global_declarations): New.
13397 2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
13399 Implemented parsing @synthesize and @dynamic for
13400 Objective-C/Objective-C++.
13401 * c-common.h (enum rid): Add RID_AT_SYNTHESIZE and RID_AT_DYNAMIC.
13402 (objc_add_synthesize_declaration): New.
13403 (objc_add_dynamic_declaration): New.
13404 * c-common.c (c_common_reswords): Add synthesize and dynamic.
13405 * stub-objc.c (objc_add_synthesize_declaration): New.
13406 (objc_add_dynamic_declaration): New.
13408 2010-10-18 Michael Meissner <meissner@linux.vnet.ibm.com>
13411 * c-cppbuiltin.c (mode_has_fma): Move function here from
13412 builtins.c. Don't use the fma optab, instead just use the
13413 HAVE_fma* macros, so that __FP_FAST_FMA* will be defined when
13416 2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
13418 Merge from 'apple/trunk' branch on FSF servers.
13420 2005-11-08 Fariborz Jahanian <fjahanian@apple.com>
13423 * c-common.h (objc_non_volatilized_type): New declaration
13424 * stub-objc.c (objc_non_volatilized_type): New stub.
13426 2010-10-17 Nicola Pero <nicola.pero@meta-innovation.com>
13428 Merge from 'apple/trunk' branch on FSF servers.
13430 2006-03-27 Fariborz Jahanian <fjahanian@apple.com>
13433 * c-common.h (objc_diagnose_private_ivar): New decl.
13434 * stub-objc.c (objc_diagnose_private_ivar): New stub.
13436 2010-10-17 Iain Sandoe <iains@gcc.gnu.org>
13438 * c-common.c (c_common_reswords): Add package, RID_AT_PACKAGE.
13439 * c-common.h (enum rid): Add RID_AT_PACKAGE.
13440 (objc_ivar_visibility_kind): New enum.
13441 (objc_set_visibility): Adjust prototype to use visibility enum.
13442 * stub-objc.c (objc_set_visibility): Adjust stub to use
13445 2010-10-14 Michael Meissner <meissner@linux.vnet.ibm.com>
13447 * c-cppbuiltin.c (builtin_define_float_constants): Emit
13448 __FP_FAST_FMA, __FP_FAST_FMAF, and __FP_FAST_FMAL if the machine
13449 has the appropriate fma builtins.
13450 (c_cpp_builtins): Adjust call to builtin_define_float_constants.
13452 2010-10-14 Iain Sandoe <iains@gcc.gnu.org>
13454 merge from FSF apple 'trunk' branch.
13455 2006 Fariborz Jahanian <fjahanian@apple.com>
13457 Radars 4436866, 4505126, 4506903, 4517826
13458 * c-common.c (c_common_resword): Define @property and its attributes.
13459 * c-common.h: Define property attribute enum entries.
13460 (OBJC_IS_PATTR_KEYWORD): New.
13461 (objc_property_attribute_kind): New enum.
13462 Declare objc_set_property_attr (), objc_add_property_variable (),
13463 objc_build_getter_call () and objc_build_setter_call ().
13464 * stub-objc.c (objc_set_property_attr): New stub.
13465 (objc_add_property_variable): Likewise.
13466 (objc_build_getter_call): Likewise.
13467 (objc_build_setter_call) Likewise.
13469 2010-10-13 Iain Sandoe <iains@gcc.gnu.org>
13471 merge from FSF apple 'trunk' branch.
13472 2006-04-26 Fariborz Jahanian <fjahanian@apple.com>
13474 Radar 3803157 (method attributes)
13475 * c-common.c (handle_deprecated_attribute): Recognize
13476 objc methods as valid declarations.
13477 * c-common.h: Declare objc_method_decl ().
13478 * stub-objc.c (objc_method_decl): New stub.
13480 2010-10-08 Joseph Myers <joseph@codesourcery.com>
13482 * c-common.c (parse_optimize_options): Call
13483 decode_cmdline_options_to_array_default_mask before
13484 decode_options. Update arguments to decode_options.
13485 * c-common.h (c_common_init_options_struct): Declare.
13486 * c-opts.c (c_common_init_options_struct): New. Split out from
13487 c_common_init_options.
13489 2010-10-06 Nicola Pero <nicola.pero@meta-innovation.com>
13491 Implemented fast enumeration for Objective-C.
13492 * c-common.h (objc_finish_foreach_loop): New.
13493 * stub-objc.c (objc_finish_foreach_loop): New.
13495 2010-10-05 Joseph Myers <joseph@codesourcery.com>
13497 * c-common.h (struct diagnostic_context): Don't declare here.
13498 (c_common_initialize_diagnostics): Declare using
13499 diagnostic_context typedef.
13500 * c-opts.c (c_common_handle_option): Pass global_dc to
13501 handle_generated_option.
13503 2010-10-04 Joseph Myers <joseph@codesourcery.com>
13505 * c-opts.c (c_common_handle_option): Pass &global_options_set to
13506 handle_generated_option.
13508 2010-10-03 Ian Lance Taylor <iant@google.com>
13510 * c.opt (-fplan9-extensions): New option.
13512 2010-10-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
13514 * c-cppbuiltin.c (define__GNUC__, builtin_define_type_precision):
13516 (c_cpp_builtins): Call functions from cppbuiltin.c instead
13517 of duplicating code.
13519 2010-09-30 Iain Sandoe <iains@gcc.gnu.org>
13521 * c-common.c: Add two new entries for @optional
13522 and @required keywords.
13524 merge from FSF 'apple/trunk' branch.
13525 2006-01-30 Fariborz Jahanian <fjahanian@apple.com>
13528 * c-common.h (RID_AT_OPTIONAL, RID_AT_REQUIRED): Two new
13529 objective-c keywords.
13530 (objc_set_method_opt): New declaration.
13531 * stub-objc.c (objc_set_method_opt): New stub.
13533 2010-09-30 Joseph Myers <joseph@codesourcery.com>
13535 * c-common.c (handle_optimize_attribute): Pass &global_options to
13536 cl_optimization_save and cl_optimization_restore.
13537 * c-opts.c (c_common_handle_option): Pass &global_options to
13538 handle_generated_option.
13539 * c-pragma.c (handle_pragma_diagnostic): Use option_flag_var.
13540 (handle_pragma_pop_options, handle_pragma_reset_options): Pass
13541 &global_options to cl_optimization_restore.
13543 2010-09-30 Nicola Pero <nicola.pero@meta-innovation.com>
13545 * c-lex.c (c_lex_with_flags): Updated comments for CPP_AT_NAME
13546 Objective-C/Objective-C++ keywords.
13548 2010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
13550 Merge from 'apple/trunk' branch on FSF servers.
13552 2005-10-04 Fariborz Jahanian <fjahanian@apple.com>
13555 * c-common.h (objc_check_global_decl): New declaration.
13556 * stub-objc.c (objc_check_global_decl): New stub.
13558 2010-09-29 Joseph Myers <joseph@codesourcery.com>
13560 * c.opt: Don't use VarExists.
13562 2010-09-29 Joseph Myers <joseph@codesourcery.com>
13564 * c-common.c (c_cpp_error): Update names of diagnostic_context
13566 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Update names of
13567 cl_optimization members.
13568 * c-opts.c (warning_as_error_callback, c_common_handle_option,
13569 sanitize_cpp_opts, finish_options): Update names of cpp_options
13572 2010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
13574 * c-common.h (OBJC_IS_CXX_KEYWORD): New macro. Updated comments.
13575 (objc_is_reserved_word): Removed.
13576 * c-common.c: Updated comments.
13577 * c-lex.c (c_lex_with_flags): Use OBJC_IS_CXX_KEYWORD instead of
13578 objc_is_reserved_word.
13579 * stub-objc.c (objc_is_reserved_word): Removed.
13581 2010-09-28 Iain Sandoe <iains@gcc.gnu.org>
13583 * c-common.h (objc_add_method_declaration): Adjust prototype to
13584 include attributes.
13585 (objc_start_method_definition): Likewise.
13586 (objc_build_keyword_decl): Likewise.
13587 * stub-objc.c:(objc_add_method_declaration): Handle attributes.
13588 (objc_start_method_definition): Likewise.
13589 (objc_build_keyword_decl): Likewise.
13591 2010-09-28 Iain Sandoe <iains@gcc.gnu.org>
13593 * c-common.h (objc_start_class_interface): Adjust prototype.
13594 (objc_start_category_interface): Likewise.
13595 (objc_start_protocol): Likewise.
13596 * stub-objc.c (objc_start_protocol): Adjust for extra argument.
13597 (objc_start_class_interface): Likewise.
13598 (objc_start_category_interface): Likewise.
13600 2010-09-27 Ian Lance Taylor <iant@google.com>
13602 * c-common.c (c_common_attribute_table): Add no_split_stack.
13603 (handle_no_split_stack_attribute): New static function.
13605 2010-09-27 Nicola Pero <nicola.pero@meta-innovation.com>
13607 Merge from 'apple/trunk' branch on FSF servers.
13609 2005-12-15 Fariborz Jahanian <fjahanian@apple.com>
13612 * c-common.h (objc_have_common_type): New declaration.
13613 * stub-objc.c (objc_have_common_type): New stub.
13615 2005-06-22 Ziemowit Laski <zlaski@apple.com>
13618 * c-common.h (objc_common_type): New prototype.
13619 * stub-objc.c (objc_common_type): New stub.
13621 2010-09-24 Jan Hubicka <jh@suse.cz>
13623 * c-common.c (handle_leaf_attribute): New function.
13624 (struct attribute_spec c_common_att): Add leaf.
13626 2010-09-22 Joseph Myers <joseph@codesourcery.com>
13628 * c.opt (-all-warnings, -ansi, -assert, -assert=, -comments,
13629 -comments-in-macros, -define-macro, -define-macro=, -dependencies,
13630 -dump, -dump=, -imacros, -imacros=, -include, -include=,
13631 -include-barrier, -include-directory, -include-directory=,
13632 -include-directory-after, -include-directory-after=,
13633 -include-prefix, -include-prefix=, -include-with-prefix,
13634 -include-with-prefix=, -include-with-prefix-after,
13635 -include-with-prefix-after=, -include-with-prefix-before,
13636 -include-with-prefix-before=, -no-integrated-cpp,
13637 -no-line-commands, -no-standard-includes, -no-warnings, -output,
13638 -output=, -pedantic, -pedantic-errors, -preprocess,
13639 -print-missing-file-dependencies, -trace-includes, -traditional,
13640 -traditional-cpp, -trigraphs, -undefine-macro, -undefine-macro=,
13641 -user-dependencies, -verbose, -write-dependencies,
13642 -write-user-dependencies, no-integrated-cpp, traditional): New.
13644 2010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
13647 * c-common.h (objc_start_method_definition): Return bool instead
13649 * stub-objc.c (objc_start_method_definition): Return bool instead
13652 2010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
13655 * c-common.h (objc_get_interface_ivars): New declaration.
13656 * stub-objc.c (objc_get_interface_ivars): New stub.
13658 2010-09-15 Ian Lance Taylor <iant@google.com>
13660 * c-common.c (parse_optimize_options): Do not capitalize warning
13661 messages. Remove period at end of warning message.
13663 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
13665 * c-common.c (handle_alias_ifunc_attribute): New, broken out of ...
13666 (handle_alias_attribute): ... here.
13667 (handle_ifunc_attribute): New.
13669 2010-09-06 Mark Mitchell <mark@codesourcery.com>
13671 * c-common.h (do_warn_double_promotion): Declare.
13672 * c-common.c (do_warn_double_promotion): Define.
13674 2010-09-05 Mark Mitchell <mark@codesourcery.com>
13676 * c.opt (Wdouble-promotion): New.
13678 2010-09-02 Joseph Myers <joseph@codesourcery.com>
13680 * c.opt (falt-external-templates, fhuge-objects, fvtable-gc,
13681 fvtable-thunks, fxref): Mark no longer supported in help text.
13683 2010-09-02 Joseph Myers <joseph@codesourcery.com>
13685 * c.opt (Wimport, fall-virtual, falt-external-templates,
13686 fdefault-inline, fenum-int-equiv, fexternal-templates,
13687 fguiding-decls, fhonor-std, fhuge-objects, flabels-ok,
13688 fname-mangling-version-, fnew-abi, fnonnull-objects,
13689 foptional-diags, fsquangle, fstrict-prototype, fthis-is-variable,
13690 fvtable-gc, fvtable-thunks, fxref): Mark with Ignore and Warn as
13692 (fhandle-exceptions): Mark with Alias and Warn.
13693 * c-opts.c (c_common_handle_option): Don't handle options marked
13696 2010-09-02 Joseph Myers <joseph@codesourcery.com>
13698 * c.opt (Wcomments, Werror-implicit-function-declaration,
13699 ftemplate-depth-, std=c89, std=c9x, std=gnu89, std=gnu9x,
13700 std=iso9899:1990, std=iso9899:1999, std=iso9899:199x): Mark as
13702 * c-common.c (option_codes): Use OPT_Wcomment instead of
13704 * c-opts.c (warning_as_error_callback, c_common_handle_option):
13705 Don't handle options marked as aliases.
13707 2010-08-25 Richard Guenther <rguenther@suse.de>
13709 * c-common.c (c_common_get_alias_set): Remove special
13710 handling for pointers.
13712 2010-08-20 Nathan Froyd <froydnj@codesourcery.com>
13714 * c-common.c: Use FOR_EACH_VEC_ELT.
13715 * c-gimplify.c: Likewise.
13716 * c-pragma.c: Likewise.
13718 2010-08-16 Joseph Myers <joseph@codesourcery.com>
13720 * c.opt (MDX): Change back to MD. Mark NoDriverArg instead of
13722 (MMDX): Change back to MMD. Mark NoDriverArg instead of
13724 * c-opts.c (c_common_handle_option): Use OPT_MD and OPT_MMD
13725 instead of OPT_MDX and OPT_MMDX.
13727 2010-08-16 Joseph Myers <joseph@codesourcery.com>
13729 * c.opt (MDX, MMDX, lang-asm): Mark RejectDriver.
13731 2010-08-12 Joseph Myers <joseph@codesourcery.com>
13733 * c.opt (MD, MMD): Change to MDX and MMDX.
13734 * c-opts.c (c_common_handle_option): Use OPT_MMD and OPT_MMDX.
13736 2010-08-11 Joseph Myers <joseph@codesourcery.com>
13738 * c-opts.c (c_common_handle_option): Call handle_generated_option
13739 instead of handle_option.
13741 2010-08-08 Nathan Froyd <froydnj@codesourcery.com>
13743 * c-pragma.c (add_to_renaming_pragma_list): Fix call to VEC_safe_push.
13744 (maybe_apply_renaming_pragma): Delete unneeded declarations.
13746 2010-08-08 Nathan Froyd <froydnj@codesourcery.com>
13748 * c-pragma.c (pending_redefinition): Declare. Declare a VEC of it.
13749 (pending_redefine_extname): Change type to a VEC.
13750 (add_to_renaming_pragma_list): Update for new type of
13751 pending_redefine_extname.
13752 (maybe_apply_renaming_pragma): Likewise.
13754 2010-08-04 Arnaud Charlet <charlet@adacore.com>
13756 * c-ada-spec.c (dump_ada_template): Mark underlying instance type as
13758 (dump_generic_ada_node): Code clean up. Use TREE_VISITED flag to
13759 decide whether a type has already been declared/seen.
13760 Do not go to the original type.
13761 (dump_nested_types): New parameter forward.
13762 Generate forward declaration if needed and mark type as visited.
13763 (print_ada_declaration): Call dump_nested_types if not already done.
13764 Mark types as visited.
13766 2010-08-03 Joseph Myers <joseph@codesourcery.com>
13768 * c.opt (-print-pch-checksum): Remove option.
13769 * c-opts.c (c_common_handle_option): Don't handle
13770 OPT_print_pch_checksum.
13772 2010-07-27 Joseph Myers <joseph@codesourcery.com>
13774 * c-common.h (c_common_handle_option): Update prototype and return
13776 * c-opts.c (c_common_handle_option): Update prototype and return
13777 value type. Update calls to handle_option and
13778 enable_warning_as_error.
13780 2010-07-27 Jakub Jelinek <jakub@redhat.com>
13783 * c-pretty-print.c (pp_c_expression): Handle C_MAYBE_CONST_EXPR.
13785 2010-07-27 Joseph Myers <joseph@codesourcery.com>
13787 * c-common.h (c_common_missing_argument): Remove.
13788 * c-opts.c (c_common_missing_argument): Remove.
13789 * c.opt (A, D, F, I, MD, MMD, MQ, MT, U, fconstant-string-class=,
13790 idirafter, imacros, include, isysroot, isystem, iquote): Add
13792 * c-objc-common.h (LANG_HOOKS_MISSING_ARGUMENT): Remove.
13794 2010-07-27 Joseph Myers <joseph@codesourcery.com>
13796 * c-common.h (c_common_option_lang_mask,
13797 c_common_initialize_diagnostics, c_common_complain_wrong_lang_p):
13799 (c_common_init_options): Update prototype.
13800 * c-opts.c (c_common_option_lang_mask): New.
13801 (c_common_initialize_diagnostics): Split out of
13802 c_common_init_options.
13803 (accept_all_c_family_options, c_common_complain_wrong_lang_p):
13805 (c_common_init_options): Update prototype. Use decoded options in
13806 search for -lang-asm.
13808 2010-07-15 Nathan Froyd <froydnj@codesourcery.com>
13810 * c-common.c: Carefully replace TREE_CHAIN with DECL_CHAIN.
13811 * c-format.c: Likewise.
13813 2010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
13815 * c-common.h: Include diagnostic-core.h. Error if already
13817 * c-semantics.c: Do not define GCC_DIAG_STYLE here.
13819 2010-07-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
13821 * c-common.c (IN_GCC_FRONTEND): Do not undef.
13822 Do not include expr.h
13823 (vector_mode_valid_p): Move here.
13825 2010-06-21 DJ Delorie <dj@redhat.com>
13827 * c-pragma.c (handle_pragma_diagnostic): Add push/pop,
13828 allow these pragmas anywhere.
13830 2010-06-14 Jakub Jelinek <jakub@redhat.com>
13833 * c-cppbuiltin.c: Include gt-c-family-c-cppbuiltin.h.
13834 (lazy_hex_fp_values, lazy_hex_fp_value_count): Add GTY(()) markers.
13835 (lazy_hex_fp_value, builtin_define_with_hex_fp_value): Use
13836 ggc_strdup instead of xstrdup.
13838 2010-06-10 Jakub Jelinek <jakub@redhat.com>
13840 * c-cppbuiltin.c: Include cpp-id-data.h.
13841 (lazy_hex_fp_values, lazy_hex_fp_value_count): New variables.
13842 (lazy_hex_fp_value): New function.
13843 (builtin_define_with_hex_fp_value): Provide definitions lazily.
13845 2010-06-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
13847 * c-gimplify.c: Do not include tree-flow.h
13849 2010-06-29 Joern Rennecke <joern.rennecke@embecosm.com>
13852 * c-common.c: Rename targetm member:
13853 targetm.enum_va_list -> targetm.enum_va_list_p
13855 2010-06-28 Anatoly Sokolov <aesok@post.ru>
13857 * c-common.c (shorten_compare): Adjust call to force_fit_type_double.
13859 2010-06-28 Steven Bosscher <steven@gcc.gnu.org>
13861 * c-cppbuiltin.c: Do not include except.h.
13863 2010-06-24 Andi Kleen <ak@linux.intel.com>
13865 * c-common.c (warn_for_omitted_condop): New.
13866 * c-common.h (warn_for_omitted_condop): Add prototype.
13868 2010-06-21 Joseph Myers <joseph@codesourcery.com>
13870 * c.opt (lang-objc): Remove.
13871 * c-opts.c (c_common_handle_option): Don't handle OPT_lang_objc.
13873 2010-06-21 Joern Rennecke <joern.rennecke@embecosm.com>
13875 * c-opts.c: Include "tm_p.h".
13877 2010-06-20 Joseph Myers <joseph@codesourcery.com>
13879 * c-common.c (parse_optimize_options): Update call to
13882 2010-06-18 Nathan Froyd <froydnj@codesourcery.com>
13884 * c-common.c (record_types_used_by_current_var_decl): Adjust for
13885 new type of types_used_by_cur_var_decl.
13887 2010-06-17 Joern Rennecke <joern.rennecke@embecosm.com>
13890 * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Add cast
13891 for C++ standard compliance.
13893 2010-06-16 Jason Merrill <jason@redhat.com>
13895 * c.opt: Add -Wnoexcept.
13897 2010-06-16 Richard Guenther <rguenther@suse.de>
13900 * c-common.c (c_common_truthvalue_conversion): Remove
13901 premature and wrong optimization concering ADDR_EXPRs.
13903 2010-06-15 Arnaud Charlet <charlet@adacore.com>
13905 * c-ada-spec.c (dump_sloc): Remove column info.
13906 (is_simple_enum): New function.
13907 (dump_generic_ada_node, print_ada_declaration): Map C enum types to Ada
13908 enum types when relevant.
13910 2010-06-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
13912 * c-common.c (conversion_warning): Warn at expression
13915 2010-06-10 Joseph Myers <joseph@codesourcery.com>
13917 * c-opts.c (c_common_handle_option): Don't handle
13920 2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
13922 * c-pragma.c (push_alignment): Use typed GC allocation.
13923 (handle_pragma_push_options): Likewise.
13925 * c-common.c (parse_optimize_options): Likewise.
13927 * c-common.h (struct sorted_fields_type): Add variable_size GTY
13930 2010-06-07 Joseph Myers <joseph@codesourcery.com>
13932 * c-common.c (flag_preprocess_only, flag_undef, flag_no_builtin,
13933 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
13934 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
13935 flag_signed_bitfields, warn_strict_null_sentinel,
13936 flag_nil_receivers, flag_zero_link, flag_replace_objc_classes,
13937 flag_gen_declaration, flag_no_gnu_keywords,
13938 flag_implement_inlines, flag_implicit_templates,
13939 flag_implicit_inline_templates, flag_optional_diags,
13940 flag_elide_constructors, flag_default_inline, flag_rtti,
13941 flag_conserve_space, flag_access_control, flag_check_new,
13942 flag_new_for_scope, flag_weak, flag_working_directory,
13943 flag_use_cxa_atexit, flag_use_cxa_get_exception_ptr,
13944 flag_enforce_eh_specs, flag_threadsafe_statics,
13945 flag_pretty_templates): Remove.
13946 * c-common.h (flag_preprocess_only, flag_nil_receivers,
13947 flag_objc_exceptions, flag_objc_sjlj_exceptions, flag_zero_link,
13948 flag_replace_objc_classes, flag_undef, flag_no_builtin,
13949 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
13950 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
13951 flag_const_strings, flag_signed_bitfields, flag_gen_declaration,
13952 flag_no_gnu_keywords, flag_implement_inlines,
13953 flag_implicit_templates, flag_implicit_inline_templates,
13954 flag_optional_diags, flag_elide_constructors, flag_default_inline,
13955 flag_rtti, flag_conserve_space, flag_access_control,
13956 flag_check_new, flag_new_for_scope, flag_weak,
13957 flag_working_directory, flag_use_cxa_atexit,
13958 flag_use_cxa_get_exception_ptr, flag_enforce_eh_specs,
13959 flag_threadsafe_statics, flag_pretty_templates,
13960 warn_strict_null_sentinel): Remove.
13961 * c.opt (E, Wstrict-null-sentinel, faccess-control, fasm,
13962 fbuiltin, fcheck-new, fconserve-space, felide-constructors,
13963 fenforce-eh-specs, ffor-scope, fgnu-keywords, fimplement-inlines,
13964 fimplicit-inline-templates, fimplicit-templates,
13965 flax-vector-conversions, fms-extensions, fnil-receivers,
13966 fnonansi-builtins, fpretty-templates, freplace-objc-classes,
13967 frtti, fshort-double, fshort-enums, fshort-wchar,
13968 fsigned-bitfields, fsigned-char, fstats, fthreadsafe-statics,
13969 funsigned-bitfields, funsigned-char, fuse-cxa-atexit,
13970 fuse-cxa-get-exception-ptr, fweak, fworking-directory, fzero-link,
13971 gen-decls, undef): Use Var.
13972 (fdefault-inline, foptional-diags): Document as doing nothing.
13973 * c-opts.c (c_common_handle_option): Remove cases for options now
13974 using Var. Mark ignored options as such.
13976 2010-06-05 Steven Bosscher <steven@gcc.gnu.org>
13978 * c-common.c: Moved to here from parent directory.
13979 * c-common.def: Likewise.
13980 * c-common.h: Likewise.
13981 * c-cppbuiltin.c: Likewise.
13982 * c-dump.c: Likewise.
13983 * c-format.c: Likewise.
13984 * c-format.h : Likewise.
13985 * c-gimplify.c: Likewise.
13986 * c-lex.c: Likewise.
13987 * c-omp.c: Likewise.
13989 * c-opts.c: Likewise.
13990 * c-pch.c: Likewise.
13991 * c-ppoutput.c: Likewise.
13992 * c-pragma.c: Likewise.
13993 * c-pragma.h: Likewise.
13994 * c-pretty-print.c: Likewise.
13995 * c-pretty-print.h: Likewise.
13996 * c-semantics.c: Likewise.
13997 * stub-objc.c: Likewise.
13999 * c-common.c: Include gt-c-family-c-common.h.
14000 * c-pragma.c: Include gt-c-family-c-pragma.h.
14002 Copyright (C) 2010-2023 Free Software Foundation, Inc.
14004 Copying and distribution of this file, with or without modification,
14005 are permitted in any medium without royalty provided the copyright
14006 notice and this notice are preserved.