1 2023-11-14 Lewis Hyatt <lhyatt@gmail.com>
5 * c-opts.cc (c_common_post_options): Set cpp_opts->main_search
6 so libcpp knows it is compiling a header file separately.
8 2023-11-14 David Malcolm <dmalcolm@redhat.com>
10 * c-warn.cc (conversion_warning): Update call to
11 global_dc->m_option_enabled to use option_enabled_p.
13 2023-11-14 David Malcolm <dmalcolm@redhat.com>
15 * c-common.cc (c_get_substring_location): Use global_dc's
17 * c-format.cc (get_corrected_substring): Likewise.
18 * c-indentation.cc (get_visual_column): Add file_cache param.
19 (get_first_nws_vis_column): Likewise.
20 (detect_intervening_unindent): Likewise.
21 (should_warn_for_misleading_indentation): Use global_dc's
23 (assert_get_visual_column_succeeds): Add file_cache param.
24 (ASSERT_GET_VISUAL_COLUMN_SUCCEEDS): Likewise.
25 (assert_get_visual_column_fails): Likewise.
26 (define ASSERT_GET_VISUAL_COLUMN_FAILS): Likewise.
27 (selftest::test_get_visual_column): Create and use a temporary
30 2023-11-14 Jakub Jelinek <jakub@redhat.com>
33 * c-common.cc (check_builtin_function_arguments): Handle
34 BUILT_IN_{CLZ,CTZ,CLRSB,FFS,PARITY,POPCOUNT}G.
35 * c-gimplify.cc (c_gimplify_expr): If __builtin_c[lt]zg second
36 argument hasn't been folded into constant yet, transform it to one
37 argument call inside of a COND_EXPR which for first argument 0
38 returns the second argument.
40 2023-11-11 Martin Uecker <uecker@tugraz.at>
44 * c-attribs.cc (build_attr_access_from_parms): Synthesize
45 nonnull attribute for parameters declared with `static`.
47 2023-11-09 Florian Weimer <fweimer@redhat.com>
49 * c.opt (Wreturn-mismatch): New.
51 2023-11-08 Florian Weimer <fweimer@redhat.com>
53 * c.opt (fpermissive): Enable for C and ObjC.
54 * c-opts.cc (c_common_post_options): Enable -fpermissive.
56 2023-11-07 Joseph Myers <joseph@codesourcery.com>
58 * c-format.h (T2X_UI): Rename to T23_UI.
59 (T2X_UL): Rename to T23_UL.
60 (T2X_ULL): Rename to T23_ULL.
61 (T2X_US): Rename to T23_US.
62 (T2X_UC): Rename to T23_UC.
63 (T2X_ST): Rename to T23_ST.
64 (T2X_UPD): Rename to T23_UPD.
65 (T2X_UIM): Rename to T23_UIM.
66 (T2X_D32): Rename to T23_D32.
67 (T2X_D64): Rename to T23_D64.
68 (T2X_D128): Rename to T23_D128.
69 (T2X_I8): Rename to T23_I8.
70 (T2X_I16): Rename to T23_I16.
71 (T2X_I32): Rename to T23_I32.
72 (T2X_I64): Rename to T23_I64.
73 (T2X_U8): Rename to T23_U8.
74 (T2X_U16): Rename to T23_U16.
75 (T2X_U32): Rename to T23_U32.
76 (T2X_U64): Rename to T23_U64.
77 (T2X_IF8): Rename to T23_IF8.
78 (T2X_IF16): Rename to T23_IF16.
79 (T2X_IF32): Rename to T23_IF32.
80 (T2X_IF64): Rename to T23_IF64.
81 (T2X_UF8): Rename to T23_UF8.
82 (T2X_UF16): Rename to T23_UF16.
83 (T2X_UF32): Rename to T23_UF32.
84 (T2X_UF64): Rename to T23_UF64.
85 * c-format.cc: Update all uses of T2X_* macros to use T23_*.
87 2023-11-07 Kwok Cheung Yeung <kcy@codesourcery.com>
89 * c-attribs.cc (c_common_attribute_table): Add attribute for
91 * c-pragma.h (enum parma_omp_clause): Add entry for indirect clause.
93 2023-11-07 Joseph Myers <joseph@codesourcery.com>
95 * c-common.cc (flag_isoc2x): Rename to flag_isoc23.
96 (c_common_reswords): Use D_C23 instead of D_C2X.
97 * c-common.h: Refer throughout to C23 instead of C2X in comments.
98 (D_C2X): Rename to D_C23.
99 (flag_isoc2x): Rename to flag_isoc23.
100 * c-cppbuiltin.cc (builtin_define_float_constants): Use
101 flag_isoc23 instead of flag_isoc2x. Refer to C23 instead of C2x
103 * c-format.cc: Use STD_C23 instead of STD_C2X and flag_isoc23
104 instead of flag_isoc2x. Refer to C23 instead of C2X in comments.
105 * c-format.h: Use STD_C23 instead of STD_C2X.
106 * c-lex.cc: Use warn_c11_c23_compat instead of warn_c11_c2x_compat
107 and flag_isoc23 instead of flag_isoc2x. Refer to C23 instead of
109 * c-opts.cc: Use flag_isoc23 instead of flag_isoc2x. Refer to C23
110 instead of C2X in comments.
111 (set_std_c2x): Rename to set_std_c23.
112 * c.opt (Wc11-c23-compat): Use CPP(cpp_warn_c11_c23_compat)
113 CppReason(CPP_W_C11_C23_COMPAT) Var(warn_c11_c23_compat) instead
114 of CPP(cpp_warn_c11_c2x_compat) CppReason(CPP_W_C11_C2X_COMPAT)
115 Var(warn_c11_c2x_compat).
117 2023-11-06 Joseph Myers <joseph@codesourcery.com>
120 * c.opt (Wc11-c2x-compat): Rename to Wc11-c23-compat and make into
121 a deprecated alias of Wc11-c23-compat.
122 (std=c2x): Rename to std=c23 and make into a deprecated alias of
124 (std=gnu2x): Rename to std=gnu23 and make into a deprecated alias
126 (std=iso9899:2024): New option. Alias of std=c23.
127 * c-lex.cc (interpret_float): Use OPT_Wc11_c23_compat instead of
129 * c-opts.cc (c_common_handle_option): Use OPT_std_c23 instead of
130 OPT_std_c2x and OPT_std_gnu23 instead of OPT_std_gnu2x.
132 2023-11-05 Jakub Jelinek <jakub@redhat.com>
134 * c-lex.cc (c_common_has_attribute): Return 1 for omp::directive
135 and omp::sequence with -fopenmp or -fopenmp-simd also for C, not
136 just for C++. Return 1 for omp::decl with -fopenmp or -fopenmp-simd
139 2023-11-04 David Malcolm <dmalcolm@redhat.com>
141 * c-pragma.cc:: (handle_pragma_push_options): Fix missing "GCC" in
142 name of pragma in "junk" message.
143 (handle_pragma_pop_options): Likewise.
145 2023-11-04 David Malcolm <dmalcolm@redhat.com>
147 * c-common.cc: Update for changes to diagnostic_context.
148 * c-indentation.cc: Likewise.
149 * c-opts.cc: Likewise.
150 * c-warn.cc: Likewise.
152 2023-11-01 Martin Uecker <uecker@tugraz.at>
155 * c.opt (Walloc-size): New option.
157 2023-10-31 David Malcolm <dmalcolm@redhat.com>
159 * c-warn.cc (warn_for_multistatement_macros): Update for removal
160 of MACRO_MAP_EXPANSION_POINT_LOCATION.
162 2023-10-27 Lewis Hyatt <lhyatt@gmail.com>
164 PR preprocessor/87299
165 * c-pragma.cc (init_pragma): Register `#pragma GCC target' and
166 related pragmas in preprocess-only mode, and enable early handling.
167 (c_reset_target_pragmas): New function refactoring code from...
168 (handle_pragma_reset_options): ...here.
169 * c-pragma.h (c_reset_target_pragmas): Declare.
171 2023-10-26 David Malcolm <dmalcolm@redhat.com>
173 * c-attribs.cc (c_common_attribute_table): Add
174 "null_terminated_string_arg".
175 (handle_null_terminated_string_arg_attribute): New.
177 2023-10-23 Lewis Hyatt <lhyatt@gmail.com>
179 PR preprocessor/36887
180 * c-opts.cc (c_common_init_options): Pass new extra hash map
181 argument to cpp_create_reader().
183 2023-10-20 Marek Polacek <polacek@redhat.com>
186 * c-common.cc (c_common_get_alias_set): Return -1 for char8_t only
189 2023-10-20 Patrick Palka <ppalka@redhat.com>
191 * c-warn.cc (check_address_or_pointer_of_packed_member): Handle
192 type-dependent callee of CALL_EXPR.
194 2023-10-20 Alexandre Oliva <oliva@adacore.com>
196 * c-attribs.cc (handle_expected_throw_attribute): New.
197 (c_common_attribute_table): Add expected_throw.
199 2023-10-19 Lewis Hyatt <lhyatt@gmail.com>
202 * c-pragma.cc (handle_pragma_diagnostic_impl): Handle
203 -Wunknown-pragmas during early processing.
205 2023-10-15 Jakub Jelinek <jakub@redhat.com>
207 PR tree-optimization/111800
208 * c-warn.cc (match_case_to_enum_1): Assert w.get_precision ()
209 is smaller or equal to WIDE_INT_MAX_INL_PRECISION rather than
210 w.get_len () is smaller or equal to WIDE_INT_MAX_INL_ELTS.
212 2023-10-12 Jakub Jelinek <jakub@redhat.com>
215 * c-warn.cc (match_case_to_enum_1): Use wi::to_wide just once instead
216 of 3 times, assert get_len () is smaller than WIDE_INT_MAX_INL_ELTS.
218 2023-10-02 David Malcolm <dmalcolm@redhat.com>
220 * c-common.cc (maybe_add_include_fixit): Update for renaming of
221 diagnostic_context's show_caret to m_source_printing.enabled.
222 * c-opts.cc (c_common_init_options): Update for renaming of
223 diagnostic_context's colorize_source_p to
224 m_source_printing.colorize_source_p.
226 2023-09-20 Jakub Jelinek <jakub@redhat.com>
229 * c-omp.cc (c_omp_directives): Add commented out groupprivate
232 2023-09-19 Ben Boeckel <ben.boeckel@kitware.com>
234 * c-opts.cc (c_common_handle_option): Add fdeps_file variable and
235 -fdeps-format=, -fdeps-file=, and -fdeps-target= parsing.
236 * c.opt: Add -fdeps-format=, -fdeps-file=, and -fdeps-target=
239 2023-09-19 Javier Martinez <javier.martinez.bugzilla@gmail.com>
241 * c-attribs.cc (handle_hot_attribute): remove warning on
242 RECORD_TYPE and UNION_TYPE when in c_dialect_xx.
243 (handle_cold_attribute): Likewise.
245 2023-09-19 Jakub Jelinek <jakub@redhat.com>
247 * c-common.cc (c_common_signed_or_unsigned_type): Return INTEGER_TYPE
248 for signed variant of unsigned _BitInt(1).
250 2023-09-06 Jakub Jelinek <jakub@redhat.com>
253 * c-attribs.cc (type_valid_for_vector_size): Reject vector types
254 with BITINT_TYPE elements even if they have mode precision and
257 2023-09-06 Jakub Jelinek <jakub@redhat.com>
260 * c-common.cc (c_common_reswords): Add _BitInt as keyword.
261 (unsafe_conversion_p): Handle BITINT_TYPE like INTEGER_TYPE.
262 (c_common_signed_or_unsigned_type): Handle BITINT_TYPE.
263 (c_common_truthvalue_conversion, c_common_get_alias_set,
264 check_builtin_function_arguments): Handle BITINT_TYPE like
266 (sync_resolve_size): Add ORIG_FORMAT argument. If
267 FETCH && !ORIG_FORMAT, type is BITINT_TYPE, return -1 if size isn't
268 one of 1, 2, 4, 8 or 16 or if it is 16 but TImode is not supported.
269 (atomic_bitint_fetch_using_cas_loop): New function.
270 (resolve_overloaded_builtin): Adjust sync_resolve_size caller. If
271 -1 is returned, use atomic_bitint_fetch_using_cas_loop to lower it.
273 (keyword_begins_type_specifier): Handle RID_BITINT.
274 * c-common.h (enum rid): Add RID_BITINT enumerator.
275 * c-cppbuiltin.cc (c_cpp_builtins): For C call
276 targetm.c.bitint_type_info and predefine __BITINT_MAXWIDTH__
277 and for -fbuilding-libgcc also __LIBGCC_BITINT_LIMB_WIDTH__ and
278 __LIBGCC_BITINT_ORDER__ macros if _BitInt is supported.
279 * c-lex.cc (interpret_integer): Handle CPP_N_BITINT.
280 * c-pretty-print.cc (c_pretty_printer::simple_type_specifier,
281 c_pretty_printer::direct_abstract_declarator,
282 c_pretty_printer::direct_declarator, c_pretty_printer::declarator):
284 (pp_c_integer_constant): Handle printing of large precision wide_ints
285 which would buffer overflow digit_buffer.
286 * c-warn.cc (conversion_warning, warnings_for_convert_and_check,
287 warnings_for_convert_and_check): Handle BITINT_TYPE like
290 2023-09-06 Jakub Jelinek <jakub@redhat.com>
293 * c-ubsan.cc (ubsan_instrument_shift): Use UBSAN_PRINT_FORCE_INT
294 for type0 type descriptor.
296 2023-09-06 Jakub Jelinek <jakub@redhat.com>
298 * c-lex.cc (interpret_float): For C diagnostics on FN and FNx suffixes
299 append " before C2X" to diagnostics text and follow behavior of
302 2023-09-01 Jakub Jelinek <jakub@redhat.com>
305 * c-opts.cc (c_common_post_options): Change latest_abi_version to 19.
307 2023-08-31 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
309 * c.opt: Change spelling to macOS.
311 2023-08-31 Richard Biener <rguenther@suse.de>
314 * c-pretty-print.cc (c_pretty_printer::primary_expression):
315 Only dump gimple_assign_single_p SSA def RHS.
317 2023-08-25 Sandra Loosemore <sandra@codesourcery.com>
319 * c-common.h (c_omp_check_loop_binding_exprs): Declare.
320 * c-omp.cc: Include tree-iterator.h.
321 (find_binding_in_body): New.
322 (check_loop_binding_expr_r): New.
324 (check_looop_binding_expr): New.
325 (c_omp_check_loop_binding_exprs): New.
327 2023-08-25 Uros Bizjak <ubizjak@gmail.com>
329 * c-format.cc (read_any_format_width):
330 Rename TRUE/FALSE to true/false.
332 2023-08-20 Martin Uecker <uecker@tugraz.at>
334 * c-format.cc: Fix identation.
336 2023-08-20 Tomas Kalibera <tomas.kalibera@gmail.com>
339 * c-format.cc: skip default format for printf symbol if
340 explicitly declared by prototype.
342 2023-08-17 Jose E. Marchesi <jose.marchesi@oracle.com>
345 * c.opt (Wcompare-distinct-pointer-types): New option.
347 2023-08-14 Jason Merrill <jason@redhat.com>
349 * c-cppbuiltin.cc (c_cpp_builtins): Adjust __cpp_concepts.
351 2023-08-11 Jakub Jelinek <jakub@redhat.com>
353 * c-common.cc (c_common_reswords): Add __typeof_unqual
354 and __typeof_unqual__ spellings of typeof_unqual.
356 2023-08-11 Martin Uecker <uecker@tugraz.at>
359 * c.opt: Enable warning for C and ObjC.
361 2023-08-05 Martin Uecker <uecker@tugraz.at>
364 * c-warn.cc (warn_parm_array_mismatch): Do not warn if more
365 bounds are specified.
367 2023-08-04 Tamar Christina <tamar.christina@arm.com>
369 * c-pragma.h (enum pragma_kind): Add PRAGMA_NOVECTOR.
370 * c-pragma.cc (init_pragma): Use it.
372 2023-08-01 Lewis Hyatt <lhyatt@gmail.com>
374 * c-common.h (c_init_preprocess): Declare new function.
375 * c-opts.cc (c_common_init): Call it.
376 * c-lex.cc (cb_def_pragma): Add a comment.
377 (get_token): New function wrapping cpp_get_token.
378 (c_lex_with_flags): Use the new wrapper function to support
379 obtaining tokens in preprocess_only mode.
380 (lex_string): Likewise.
381 * c-pragma.cc (pragma_diagnostic_lex_normal): Rename to...
382 (pragma_diagnostic_lex): ...this.
383 (pragma_diagnostic_lex_pp): Remove.
384 (handle_pragma_diagnostic_impl): Call pragma_diagnostic_lex () in
386 (c_pp_invoke_early_pragma_handler): Adapt to support pragma_lex ()
388 * c-pragma.h (pragma_lex_discard_to_eol): Declare.
390 2023-07-31 Hamza Mahfooz <someguy@effective-light.com>
393 * c.opt (-Wmissing-variable-declarations): New option.
395 2023-07-20 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
398 * c-common.cc (check_builtin_function_arguments):
399 Handle BUILT_IN_ISEQSIG.
401 2023-07-05 Robin Dapp <rdapp@ventanamicro.com>
402 Juzhe-Zhong <juzhe.zhong@rivai.ai>
404 * c-common.cc (c_common_type_for_mode): Use GET_MODE_PRECISION.
406 2023-06-29 Qing Zhao <qing.zhao@oracle.com>
409 * c.opt: New option -Wflex-array-member-not-at-end.
411 2023-06-28 Jason Merrill <jason@redhat.com>
414 * c-cppbuiltin.cc (c_cpp_builtins): Update __cpp_constexpr.
416 2023-06-26 Richard Biener <rguenther@suse.de>
418 * c-common.cc (shorten_binary_op): Exit early for VECTOR_TYPE
421 2023-06-23 Marek Polacek <polacek@redhat.com>
423 * c-common.h (cxx_dialect): Add cxx26 as a dialect.
424 * c-opts.cc (set_std_cxx26): New.
425 (c_common_handle_option): Set options when -std={c,gnu}++2{c,6} is
427 (c_common_post_options): Adjust comments.
428 * c.opt: Add options for -std=c++26, std=c++2c, -std=gnu++26,
430 (std=c++2b): Mark as Undocumented.
431 (std=c++23): No longer Undocumented.
433 2023-06-21 Alexander Monakov <amonakov@ispras.ru>
435 * c-gimplify.cc (fma_supported_p): New helper.
436 (c_gimplify_expr) [PLUS_EXPR, MINUS_EXPR]: Implement FMA
439 2023-06-16 Alex Coplan <alex.coplan@arm.com>
441 * c.opt (Welaborated-enum-base): New.
443 2023-06-13 David Malcolm <dmalcolm@redhat.com>
447 (suggest_missing_header::~suggest_missing_header): Reword note to
448 avoid negative tone of "forgetting".
450 2023-06-07 Jason Merrill <jason@redhat.com>
455 2023-05-26 Martin Uecker <uecker@tugraz.at>
457 * c-attribs.cc (build_attr_access_from_parms): Split loop to first
458 record all parameters.
460 2023-05-18 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
462 * c-ada-spec.cc (has_static_fields): Use _P() defines from tree.h.
463 (dump_ada_declaration): Ditto.
464 (dump_ada_structure): Ditto.
465 * c-common.cc (unsafe_conversion_p): Ditto.
466 (shorten_compare): Ditto.
467 (pointer_int_sum): Ditto.
468 (c_common_truthvalue_conversion): Ditto.
469 (scalar_to_vector): Ditto.
470 * c-common.h (gnu_vector_type_p): Ditto.
471 * c-omp.cc (c_omp_depend_t_p): Ditto.
472 (c_omp_split_clauses): Ditto.
473 * c-ubsan.cc (ubsan_instrument_division): Ditto.
474 * c-warn.cc (conversion_warning): Ditto.
475 (warnings_for_convert_and_check): Ditto.
477 2023-05-18 Joseph Myers <joseph@codesourcery.com>
479 * c-format.cc (print_char_table): Handle %B like %b.
481 2023-05-15 Joseph Myers <joseph@codesourcery.com>
483 * c-lex.cc (c_common_has_attribute): Use 202311 as
484 __has_c_attribute return for all C2x attributes.
486 2023-05-15 Patrick Palka <ppalka@redhat.com>
488 * c-cppbuiltin.cc (c_cpp_builtins): Predefine __cpp_auto_cast
491 2023-05-01 Marek Polacek <polacek@redhat.com>
493 * c-ubsan.cc (ubsan_maybe_instrument_array_ref): Don't copy_node.
495 2023-03-28 David Malcolm <dmalcolm@redhat.com>
498 * c-common.h (check_for_xor_used_as_pow): Add "rhs_loc" param.
499 * c-warn.cc (check_for_xor_used_as_pow): Add "rhs_loc" param.
500 Reject cases where involving macro expansions.
502 2023-03-28 Jason Merrill <jason@redhat.com>
505 * c-common.cc (verify_tree): Don't use sequenced handling
508 2023-03-17 Jakub Jelinek <jakub@redhat.com>
511 * c-ubsan.cc (ubsan_instrument_division): Handle all scalar integral
512 types rather than just INTEGER_TYPE.
514 2023-03-10 Marek Polacek <polacek@redhat.com>
518 * c-gimplify.cc (ubsan_walk_array_refs_r): For a MODIFY_EXPR, instrument
519 the RHS before the LHS.
521 2023-03-04 Jakub Jelinek <jakub@redhat.com>
524 * c-warn.cc (warn_for_sign_compare): Don't warn for unset bits
525 above innermost zero extension of BIT_NOT_EXPR result.
527 2023-03-04 Jakub Jelinek <jakub@redhat.com>
530 * c-warn.cc (warn_for_sign_compare): If c_common_get_narrower
531 doesn't return a narrower result, use TYPE_UNSIGNED to set unsignedp0
532 and unsignedp1. For the one BIT_NOT_EXPR case vs. one without,
533 only check for constant in the non-BIT_NOT_EXPR operand, use std::swap
534 to simplify the code, only warn if BIT_NOT_EXPR operand is extended
535 from narrower unsigned, fix up computation of mask for the constant
536 cases and for unsigned other operand case handle differently
537 BIT_NOT_EXPR result being sign vs. zero extended.
539 2023-03-04 Jakub Jelinek <jakub@redhat.com>
542 * c-warn.cc: Include langhooks.h.
543 (maybe_warn_shift_overflow): Set type0 to what TREE_TYPE (op0)
544 promotes to rather than TREE_TYPE (op0) itself, if TREE_TYPE (op0)
545 is narrower than type0 and unsigned, use wi::min_precision with
546 UNSIGNED and fold_convert op0 to type0 before emitting the warning.
548 2023-03-03 Alexandre Oliva <oliva@adacore.com>
550 * c-common.cc (c_common_nodes_and_builtins): Take
551 wchar_type_node for wint_type_node when aliased.
552 (c_stddef_cpp_builtins): Define __WINT_TYPE__, when aliased to
553 wchar_t, to the underlying type rather than wchar_t in
555 * c-cppbuiltin.cc (type_suffix): Handle wchar_type_node.
557 2023-02-28 Marek Polacek <polacek@redhat.com>
560 * c-warn.cc (check_address_or_pointer_of_packed_member): Check
563 2023-02-28 Jakub Jelinek <jakub@redhat.com>
566 * c-common.h (c_strict_flex_array_level_of): Declare.
567 * c-common.cc (c_strict_flex_array_level_of): New function,
568 moved and renamed from c-decl.cc's strict_flex_array_level_of.
569 * c-ubsan.cc (ubsan_instrument_bounds): Fix comment typo. For
570 C check c_strict_flex_array_level_of whether a trailing array
571 should be treated as flexible member like. Handle C [0] arrays.
572 Add 1 + index_off_by_one rather than index_off_by_one to bounds
573 and use tree_int_cst_lt rather than tree_int_cst_le for idx vs.
576 2023-02-23 Jakub Jelinek <jakub@redhat.com>
578 PR translation/108890
579 * c.opt (fcontracts): Fix description.
581 2023-02-22 Marek Polacek <polacek@redhat.com>
584 * c-gimplify.cc (c_genericize_control_stmt) <case STATEMENT_LIST>: Pass
586 (c_genericize): Call walk_tree with an explicit pset.
588 2023-02-18 Martin Uecker <uecker@tugraz.at>
591 * c-attribs.cc (append_access_attr): Use order of arguments when
593 (append_access_attr_idxs): Rename and make static.
594 * c-warn.cc (warn_parm_array_mismatch): Add assertion.
596 2023-02-16 Patrick Palka <ppalka@redhat.com>
598 * c-common.h: Mechanically drop static from static inline
599 functions via s/^static inline/inline/g.
601 2023-02-01 Jason Merrill <jason@redhat.com>
603 * c.opt: Add -Wno-changes-meaning.
605 2023-01-31 Marek Polacek <polacek@redhat.com>
609 * c-common.h (instantiation_dependent_expression_p): Declare.
610 * c-warn.cc (warn_duplicated_cond_add_or_warn): If the condition
611 is dependent, invalidate the chain.
613 2023-01-26 Marek Polacek <polacek@redhat.com>
616 * c-pragma.cc (handle_pragma_message): Warn for CPP_STRING_USERDEF.
618 2023-01-18 Marek Polacek <polacek@redhat.com>
621 * c-common.cc (check_case_value): Check INTEGRAL_TYPE_P.
623 2023-01-14 Jakub Jelinek <jakub@redhat.com>
626 * c-common.h (may_shorten_divmod): New static inline function.
628 2023-01-13 Eric Botcazou <ebotcazou@adacore.com>
630 * c-ada-spec.cc (is_float32): New function.
631 (is_float64): Likewise.
632 (is_float128): Tweak.
633 (dump_ada_node) <REAL_TYPE>: Call them to recognize more types.
635 2023-01-12 Lewis Hyatt <lhyatt@gmail.com>
637 PR preprocessor/108244
638 * c-pragma.cc (c_register_pragma_1): Don't attempt to register any
639 deferred pragmas if -fdirectives-only.
640 (init_pragma): Likewise.
642 2023-01-09 Martin Liska <mliska@suse.cz>
645 * c-attribs.cc (handle_target_clones_attribute): Check for
646 string constant for all target_clone attribute values.
648 2023-01-03 Florian Weimer <fweimer@redhat.com>
650 * c-cppbuiltin.cc (c_cpp_builtins): Define
651 __LIBGCC_DWARF_CIE_DATA_ALIGNMENT__.
653 2023-01-03 Florian Weimer <fweimer@redhat.com>
656 2023-01-03 Florian Weimer <fweimer@redhat.com>
658 * c-cppbuiltin.cc (__LIBGCC_DWARF_REG_SIZES_CONSTANT__):
659 Define if constant is known.
661 2023-01-03 Florian Weimer <fweimer@redhat.com>
664 2023-01-02 Florian Weimer <fweimer@redhat.com>
666 * c-cppbuiltin.cc (c_cpp_builtins): Define
667 __LIBGCC_DWARF_CIE_DATA_ALIGNMENT__.
669 2023-01-02 Florian Weimer <fweimer@redhat.com>
671 * c-cppbuiltin.cc (c_cpp_builtins): Define
672 __LIBGCC_DWARF_CIE_DATA_ALIGNMENT__.
674 2023-01-02 Florian Weimer <fweimer@redhat.com>
676 * c-cppbuiltin.cc (__LIBGCC_DWARF_REG_SIZES_CONSTANT__):
677 Define if constant is known.
679 2022-12-19 Marek Polacek <polacek@redhat.com>
682 * c-format.cc (check_function_format): Use get_attribute_name.
684 2022-12-16 Qing Zhao <qing.zhao@oracle.com>
686 * c.opt (Wstrict-flex-arrays): New option.
688 2022-12-02 Andrew MacLeod <amacleod@redhat.com>
690 * c-attribs.cc (handle_deprecated_attribute): Use type when
693 2022-12-02 Jakub Jelinek <jakub@redhat.com>
696 * c-omp.cc (c_omp_is_loop_iterator): For range for with structured
697 binding return TREE_VEC_LENGTH (d->declv) even if decl is equal
698 to any of the structured binding decls.
700 2022-11-30 Iskander Shakirzyanov <iskander@ispras.ru>
701 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
704 * c-common.cc (fold_offsetof,
705 convert_vector_to_array_for_subscript): Use OPT_Warray_bounds_
706 instead of OPT_Warray_bounds.
708 2022-11-24 Jakub Jelinek <jakub@redhat.com>
710 * c.opt (fcontract-role=, fcontract-semantic=): Terminate descriptions
713 2022-11-23 Andrew Pinski <apinski@marvell.com>
714 Jakub Jelinek <jakub@redhat.com>
717 * c-gimplify.cc (c_genericize): Use walk_tree_without_duplicates
718 instead of walk_tree for c_genericize_control_r.
720 2022-11-23 Jakub Jelinek <jakub@redhat.com>
722 * c.opt (fcontract-assumption-mode=, fcontract-continuation-mode=,
723 fcontract-role=, fcontract-semantic=): Add RejectNegative.
724 (fcontract-build-level=): Terminate description with dot.
726 2022-11-19 Jakub Jelinek <jakub@redhat.com>
728 * c-cppbuiltin.cc (c_cpp_builtins): Bump __cpp_constexpr
729 value from 202207L to 202211L.
731 2022-11-19 Jeff Chapman II <jchapman@lock3software.com>
732 Andrew Sutton <asutton@lock3software.com>
733 Andrew Marmaduke <amarmaduke@lock3software.com>
734 Michael Lopez <mlopez@lock3software.com>
735 Jason Merrill <jason@redhat.com>
737 * c.opt: Add contracts flags.
738 * c-cppbuiltin.cc (c_cpp_builtins): Add contracts feature-test
741 2022-11-16 Marek Polacek <polacek@redhat.com>
744 * c-cppbuiltin.cc (c_cpp_builtins): Update value of __cpp_constexpr for
746 * c-opts.cc (c_common_post_options): Set warn_invalid_constexpr
747 depending on cxx_dialect.
748 * c.opt (Winvalid-constexpr): New option.
750 2022-11-16 Jakub Jelinek <jakub@redhat.com>
752 * c-common.def (CONCEPT_DECL): New tree, moved here from
754 * c-common.cc (c_common_init_ts): Handle CONCEPT_DECL.
755 * c-attribs.cc (handle_deprecated_attribute): Allow deprecated
756 attribute on CONCEPT_DECL.
758 2022-11-15 Lewis Hyatt <lhyatt@gmail.com>
760 * c-opts.cc (c_finish_options): Use special_fname_builtin () rather
761 than a hard-coded string.
763 2022-11-15 Jakub Jelinek <jakub@redhat.com>
765 * c-cppbuiltin.cc (c_cpp_builtins): Bump C++23
766 __cpp_multidimensional_subscript macro value to 202211L.
768 2022-11-15 Patrick Palka <ppalka@redhat.com>
771 * c-lex.cc (c_common_has_attribute): Return 1 for init_priority
772 iff SUPPORTS_INIT_PRIORITY.
774 2022-11-14 Martin Liska <mliska@suse.cz>
777 2022-11-09 Martin Liska <mliska@suse.cz>
779 * c-target.def: Port to RST.
781 2022-11-12 Joseph Myers <joseph@codesourcery.com>
783 * c-common.cc (c_common_reswords): Use D_C2X instead of D_CXXONLY.
785 2022-11-11 Jonathan Wakely <jwakely@redhat.com>
788 * c-pragma.cc (handle_pragma_ignore): New function.
789 (init_pragma): Register region and endregion pragmas.
791 2022-11-09 Martin Liska <mliska@suse.cz>
793 * c-target.def: Port to RST.
795 2022-11-05 Lewis Hyatt <lhyatt@gmail.com>
797 PR preprocessor/55971
798 * c-ppoutput.cc (adjust_for_newlines): Update comment.
800 2022-11-03 Jason Merrill <jason@redhat.com>
802 * c-opts.cc (c_common_post_options): -fconcepts no longer implies
803 -fconcepts-ts before C++20.
805 2022-10-28 Joseph Myers <joseph@codesourcery.com>
807 * c-common.cc (def_fn_type): Call build_function_type for
808 zero-argument variable-argument function.
809 (c_common_nodes_and_builtins): Build default_function_type with
811 * c.opt (fallow-parameterless-variadic-functions): Mark as ignored
814 2022-10-28 Joseph Myers <joseph@codesourcery.com>
817 * c-common.h (ENUM_UNDERLYING_TYPE, ENUM_FIXED_UNDERLYING_TYPE_P):
818 New. Moved from cp/cp-tree.h.
819 * c-warn.cc (warnings_for_convert_and_check): Do not consider
820 conversions to enum with underlying type bool to overflow.
822 2022-10-26 Marek Polacek <polacek@redhat.com>
825 * c.opt (Wdangling-reference): New.
827 2022-10-19 Joseph Myers <joseph@codesourcery.com>
829 * c-format.h (enum format_lengths): Add FMT_LEN_w8, FMT_LEN_w16,
830 FMT_LEN_w32, FMT_LEN_w64, FMT_LEN_wf8, FMT_LEN_wf16, FMT_LEN_wf32
832 (NOARGUMENTS, NOLENGTHS): Update definitions.
833 (T_I8, T2X_I8, T_I16, T2X_I16, T_I32, T2X_I32, T_I64, T2X_I64)
834 (T_U8, T2X_U8, T_U16, T2X_U16, T_U32, T2X_U32, T_U64, T2X_U64)
835 (T_IF8, T2X_IF8, T_IF16, T2X_IF16, T_IF32, T2X_IF32, T_IF64)
836 (T2X_IF64, T_UF8, T2X_UF8, T_UF16, T2X_UF16, T_UF32, T2X_UF32)
837 (T_UF64, T2X_UF64): New macros.
838 * c-format.cc (printf_length_specs, scanf_length_specs): Add wN
839 and wfN length modifiers.
840 (print_char_table, scan_char_table): Add entries using wN and wfN
843 2022-10-18 Joseph Myers <joseph@codesourcery.com>
846 * c-common.cc (c_common_type_for_size): Add fallback to
847 widest_unsigned_literal_type_node or
848 widest_integer_literal_type_node for precision that may not
849 exactly match the precision of those types.
851 2022-10-14 Jakub Jelinek <jakub@redhat.com>
853 * c-cppbuiltin.cc (c_cpp_builtins): If bfloat16_type_node,
854 predefine __BFLT16_*__ macros and for C++23 also
855 __STDCPP_BFLOAT16_T__. Predefine bfloat16_type_node related
856 macros for -fbuilding-libgcc.
857 * c-lex.cc (interpret_float): Handle CPP_N_BFLOAT16.
859 2022-10-14 Jakub Jelinek <jakub@redhat.com>
863 * c-common.def (EXCESS_PRECISION_EXPR): Remove comment part about
864 the tree being specific to C/ObjC.
865 * c-opts.cc (c_common_post_options): Handle flag_excess_precision
866 in C++ the same as in C.
867 * c-lex.cc (interpret_float): Set const_type to excess_precision ()
870 2022-10-13 Joseph Myers <joseph@codesourcery.com>
872 * c-cppbuiltin.cc (builtin_define_float_constants): Do not use
873 value 2 for *_IS_IEC_60559.
875 2022-10-12 Lewis Hyatt <lhyatt@gmail.com>
877 PR preprocessor/60014
878 PR preprocessor/60723
879 * c-ppoutput.cc (class token_streamer): Remove member
880 line_marker_emitted to...
881 (token_streamer::stream): ...a local variable here. Set
882 print.prev_was_system_token on all code paths.
884 2022-10-10 Nathan Sidwell <nathan@acm.org>
886 * c-opts.cc (c_common_post_options): Bump abi to 18.
888 2022-10-10 Marek Polacek <polacek@redhat.com>
891 * c-pretty-print.cc (pp_c_specifier_qualifier_list): Print only GNU
893 (c_pretty_printer::direct_abstract_declarator): Print the standard [[]]
895 (pp_c_attributes): Remove.
896 (pp_c_attributes_display): Print the [[]] form if appropriate. Use
897 get_attribute_name. Don't print a trailing space when printing the
899 * c-pretty-print.h (pp_c_attributes): Remove.
901 2022-10-07 Qing Zhao <qing.zhao@oracle.com>
903 * c-attribs.cc (handle_strict_flex_array_attribute): New function.
904 (c_common_attribute_table): New item for strict_flex_array.
905 * c.opt: (fstrict-flex-arrays): New option.
906 (fstrict-flex-arrays=): New option.
908 2022-10-07 Martin Liska <mliska@suse.cz>
910 * name-hint.h: Use std::move.
912 2022-10-07 Jakub Jelinek <jakub@redhat.com>
914 * c-common.cc (attribute_fallthrough_p): Lookup fallthrough attribute
915 only in gnu namespace or as standard attribute, treat fallthrough
916 attributes in other namespaces like any other unknown attribute.
918 2022-10-06 Joseph Myers <joseph@codesourcery.com>
920 * c-common.cc (c_common_reswords): Mark typeof as D_EXT11. Add
922 * c-common.h (enum rid): Add RID_TYPEOF_UNQUAL.
923 (D_EXT11): New macro. Values of subsequent macros updated.
925 2022-10-06 Jakub Jelinek <jakub@redhat.com>
928 * c-attribs.cc (handle_assume_attribute): New function.
929 (c_common_attribute_table): Add entry for assume attribute.
930 * c-lex.cc (c_common_has_attribute): Handle
931 __have_cpp_attribute (assume).
933 2022-10-04 Jakub Jelinek <jakub@redhat.com>
935 * c-omp.cc (c_omp_directives): Uncomment begin declare target
938 2022-10-03 Patrick Palka <ppalka@redhat.com>
940 * c-common.cc (c_common_reswords): Use RID_IS_SAME instead of
943 2022-10-03 Joseph Myers <joseph@codesourcery.com>
945 * c-cppbuiltin.cc (builtin_define_float_constants): Do not
946 special-case __*_EPSILON__ setting for IBM long double for C2x.
948 2022-09-30 Patrick Palka <ppalka@redhat.com>
950 * c-common.cc (c_common_reswords): Use cp/cp-trait.def to handle
952 * c-common.h (enum rid): Likewise.
954 2022-09-29 Joseph Myers <joseph@codesourcery.com>
956 * c-lex.cc (c_common_has_attribute): Handle noreturn attribute for
959 2022-09-29 Patrick Palka <ppalka@redhat.com>
961 * c-common.cc (c_common_reswords): Add __remove_cv,
962 __remove_reference and __remove_cvref.
963 * c-common.h (enum rid): Add RID_REMOVE_CV, RID_REMOVE_REFERENCE
964 and RID_REMOVE_CVREF.
966 2022-09-27 Marek Polacek <polacek@redhat.com>
970 * c-cppbuiltin.cc (c_cpp_builtins): Define __cpp_implicit_move.
972 2022-09-27 Marek Polacek <polacek@redhat.com>
974 * c-format.cc (c_keywords): Drop nothrow.
976 2022-09-27 Jakub Jelinek <jakub@redhat.com>
979 * c-cppbuiltin.cc (c_cpp_builtins): Predefine
980 __cpp_static_call_operator=202207L for C++23.
982 2022-09-27 Jakub Jelinek <jakub@redhat.com>
984 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_ASSUME,
985 PRAGMA_OMP_ASSUMES and PRAGMA_OMP_BEGIN. Rename
986 PRAGMA_OMP_END_DECLARE_TARGET to PRAGMA_OMP_END.
987 * c-pragma.cc (omp_pragmas): Add assumes and begin.
988 For end rename PRAGMA_OMP_END_DECLARE_TARGET to PRAGMA_OMP_END.
989 (omp_pragmas_simd): Add assume.
990 * c-common.h (c_omp_directives): Declare.
991 * c-omp.cc (omp_directives): Rename to ...
992 (c_omp_directives): ... this. No longer static. Uncomment
993 assume, assumes, begin assumes and end assumes entries.
994 In end declare target entry rename PRAGMA_OMP_END_DECLARE_TARGET
996 (c_omp_categorize_directive): Adjust for omp_directives to
997 c_omp_directives renaming.
999 2022-09-27 Jakub Jelinek <jakub@redhat.com>
1003 * c-common.cc (c_common_reswords): Change _Float{16,32,64,128} and
1004 _Float{32,64,128}x flags from D_CONLY to 0.
1005 (shorten_binary_op): Punt if common_type returns error_mark_node.
1006 (shorten_compare): Likewise.
1007 (c_common_nodes_and_builtins): For C++ record _Float{16,32,64,128}
1008 and _Float{32,64,128}x builtin types if available. For C++
1009 clear float128t_type_node.
1010 * c-cppbuiltin.cc (c_cpp_builtins): Predefine
1011 __STDCPP_FLOAT{16,32,64,128}_T__ for C++23 if supported.
1012 * c-lex.cc (interpret_float): For q/Q suffixes prefer
1013 float128t_type_node over float128_type_node. Allow
1014 {f,F}{16,32,64,128} suffixes for C++ if supported with pedwarn
1015 for C++20 and older. Allow {f,F}{32,64,128}x suffixes for C++
1016 with pedwarn. Don't call excess_precision_type for C++.
1018 2022-09-26 Marek Polacek <polacek@redhat.com>
1021 * c-cppbuiltin.cc (c_cpp_builtins): Update value of __cpp_char8_t
1024 2022-09-23 Marek Polacek <polacek@redhat.com>
1027 * c-common.cc (c_common_reswords): Add __is_convertible and
1028 __is_nothrow_convertible.
1029 * c-common.h (enum rid): Add RID_IS_CONVERTIBLE and
1030 RID_IS_NOTHROW_CONVERTIBLE.
1032 2022-09-22 David Malcolm <dmalcolm@redhat.com>
1035 * c-warn.cc (check_for_xor_used_as_pow): Don't try checking
1036 values that don't fit in uhwi.
1038 2022-09-15 Richard Biener <rguenther@suse.de>
1040 * c-common.h (build_void_list_node): Remove.
1041 * c-common.cc (c_common_nodes_and_builtins): Do not initialize
1044 2022-09-09 Jan-Benedict Glaw <jbglaw@lug-owl.de>
1046 * c-format.cc (convert_format_name_to_system_name): Fix warning.
1048 2022-09-07 Joseph Myers <joseph@codesourcery.com>
1050 * c-common.cc (c_common_reswords): Use D_C2X instead of D_CXXONLY
1051 for alignas, alignof, bool, false, static_assert, thread_local and
1054 2022-09-07 Jakub Jelinek <jakub@redhat.com>
1056 * c.opt (Winvalid-utf8): Use ObjC instead of objC. Remove
1057 " in comments" from description.
1058 (Wunicode): New option.
1060 2022-09-06 Jakub Jelinek <jakub@redhat.com>
1063 * c-omp.cc (c_omp_split_clauses): Handle OMP_CLAUSE_DOACROSS.
1065 2022-09-03 Jakub Jelinek <jakub@redhat.com>
1067 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_DOACROSS.
1068 * c-omp.cc (c_finish_omp_depobj): Check also for OMP_CLAUSE_DOACROSS
1069 clause and diagnose it. Don't handle OMP_CLAUSE_DEPEND_SOURCE and
1070 OMP_CLAUSE_DEPEND_SINK. Assert kind is not OMP_CLAUSE_DEPEND_INVALID.
1072 2022-09-02 David Malcolm <dmalcolm@redhat.com>
1075 * c-common.h (check_for_xor_used_as_pow): New decl.
1076 * c-lex.cc (c_lex_with_flags): Add DECIMAL_INT to flags as appropriate.
1077 * c-warn.cc (check_for_xor_used_as_pow): New.
1078 * c.opt (Wxor-used-as-pow): New.
1080 2022-09-01 Jason Merrill <jason@redhat.com>
1082 * c-common.cc (c_common_nodes_and_builtins): Set TREE_STRING_FLAG on
1084 (braced_list_to_string): Check for char-sized elements.
1086 2022-09-01 Jakub Jelinek <jakub@redhat.com>
1089 * c.opt (-Winvalid-utf8): New warning.
1090 * c-opts.cc (c_common_handle_option) <case OPT_finput_charset_>:
1091 Set cpp_opts->cpp_input_charset_explicit.
1092 (c_common_post_options): If -finput-charset=UTF-8 is explicit
1093 in C++23, enable -Winvalid-utf8 by default and if -pedantic
1094 or -pedantic-errors, make it a pedwarn.
1096 2022-08-31 Joseph Myers <joseph@codesourcery.com>
1098 * c-attribs.cc (handle_deprecated_attribute): Check and pedwarn
1100 * c-common.cc (c_add_case_label): Add argument ATTRS. Call
1102 * c-common.h (do_case, c_add_case_label): Update declarations.
1103 * c-lex.cc (c_common_has_attribute): For C, produce a result of
1104 201910 for fallthrough and 202106 for maybe_unused.
1106 2022-08-26 Marek Polacek <polacek@redhat.com>
1109 * c.opt (Wself-move): New option.
1111 2022-08-26 Jakub Jelinek <jakub@redhat.com>
1113 * c-common.cc (check_builtin_function_arguments): Handle
1114 BUILT_IN_ISSIGNALING.
1116 2022-08-26 Jakub Jelinek <jakub@redhat.com>
1119 * c-cppbuiltin.cc (c_cpp_builtins): Predefine
1120 __cpp_named_character_escapes to 202207L.
1122 2022-08-25 Marek Polacek <polacek@redhat.com>
1124 * c-common.cc (c_common_reswords): Enable nullptr in C2X.
1125 (c_common_nodes_and_builtins): Create the built-in node for nullptr.
1126 * c-common.h (enum c_tree_index): Add CTI_NULLPTR, CTI_NULLPTR_TYPE.
1127 (struct c_common_resword): Resize the disable member.
1129 (nullptr_node): Define.
1130 (nullptr_type_node): Define.
1131 (NULLPTR_TYPE_P): Define.
1132 * c-pretty-print.cc (c_pretty_printer::simple_type_specifier): Handle
1134 (c_pretty_printer::direct_abstract_declarator): Likewise.
1135 (c_pretty_printer::constant): Likewise.
1137 2022-08-16 Tom Honermann <tom@honermann.net>
1140 * c-opts.cc (c_common_post_options): Disable -Wc++20-compat
1141 diagnostics in C++20 and later.
1142 * c.opt (Wc++20-compat): Enable hooks for the preprocessor.
1144 2022-08-11 Marek Polacek <polacek@redhat.com>
1146 PR middle-end/102633
1147 * c-gimplify.cc (c_gimplify_expr) <case DECL_EXPR>: Don't call
1148 suppress_warning here.
1150 2022-08-08 Tom Honermann <tom@honermann.net>
1152 PR preprocessor/106426
1153 * c-opts.cc (c_common_post_options): Assign cpp_opts->unsigned_utf8char
1154 subject to -fchar8_t, -fsigned-char, and/or -funsigned-char.
1156 2022-08-08 Tom Honermann <tom@honermann.net>
1158 * c-lex.cc (lex_string, lex_charconst): Use char8_t as the type
1159 of CPP_UTF8CHAR and CPP_UTF8STRING when char8_t support is
1161 * c-opts.cc (c_common_post_options): Set flag_char8_t if
1164 2022-07-31 Lewis Hyatt <lhyatt@gmail.com>
1167 * c-common.h: Rename global done_lexing to
1168 override_libcpp_locations.
1169 * c-common.cc (c_cpp_diagnostic): Likewise.
1170 * c-opts.cc (c_common_finish): Set override_libcpp_locations
1171 (formerly done_lexing) immediately prior to calling cpp_finish ().
1173 2022-07-27 Lewis Hyatt <lhyatt@gmail.com>
1175 * c-ppoutput.cc (token_streamer::stream): Update input_location
1176 prior to streaming each token.
1178 2022-07-23 Immad Mir <mirimmad@outlook.com>
1180 * c-attribs.cc: (c_common_attribute_table): add three new attributes
1181 namely: fd_arg, fd_arg_read and fd_arg_write.
1182 (handle_fd_arg_attribute): New.
1184 2022-07-15 Marek Polacek <polacek@redhat.com>
1187 * c-common.cc (c_common_reswords): Add
1188 __reference_constructs_from_temporary and
1189 __reference_converts_from_temporary.
1190 * c-common.h (enum rid): Add RID_REF_CONSTRUCTS_FROM_TEMPORARY and
1191 RID_REF_CONVERTS_FROM_TEMPORARY.
1193 2022-07-15 Jonathan Wakely <jwakely@redhat.com>
1195 * c-format.cc (class range_label_for_format_type_mismatch):
1196 Adjust to new label_text API.
1198 2022-07-11 Lewis Hyatt <lhyatt@gmail.com>
1200 PR preprocessor/106252
1201 * c-pragma.cc (handle_pragma_diagnostic_impl): Don't look up the
1202 option argument prior to verifying the option was found.
1204 2022-07-07 David Malcolm <dmalcolm@redhat.com>
1206 * c-format.cc (range_label_for_format_type_mismatch::get_text):
1207 Update for removal of label_text::maybe_free in favor of automatic
1210 2022-07-06 Lewis Hyatt <lhyatt@gmail.com>
1212 PR preprocessor/53920
1214 * c-common.cc (c_option_is_from_cpp_diagnostics): New function.
1215 * c-common.h (c_option_is_from_cpp_diagnostics): Declare.
1216 (c_pp_stream_token): Declare.
1217 * c-ppoutput.cc (init_pp_output): Refactor logic about skipping
1219 (should_output_pragmas): ...here. New function.
1220 (token_streamer::stream): Support handling early pragmas.
1221 (do_line_change): Likewise.
1222 (c_pp_stream_token): New function.
1223 * c-pragma.cc (struct pragma_diagnostic_data): New helper class.
1224 (pragma_diagnostic_lex_normal): New function. Moved logic for
1225 interpreting GCC diagnostic pragmas here.
1226 (pragma_diagnostic_lex_pp): New function for parsing diagnostic pragmas
1227 directly from libcpp.
1228 (handle_pragma_diagnostic): Refactor into helper function...
1229 (handle_pragma_diagnostic_impl): ...here. New function.
1230 (handle_pragma_diagnostic_early): New function.
1231 (handle_pragma_diagnostic_early_pp): New function.
1232 (struct pragma_ns_name): Renamed to...
1233 (struct pragma_pp_data): ...this. Add new "early_handler" member.
1234 (c_register_pragma_1): Support early pragmas in the preprocessor.
1235 (c_register_pragma_with_early_handler): New function.
1236 (c_register_pragma): Support the new early handlers in struct
1237 internal_pragma_handler.
1238 (c_register_pragma_with_data): Likewise.
1239 (c_register_pragma_with_expansion): Likewise.
1240 (c_register_pragma_with_expansion_and_data): Likewise.
1241 (c_invoke_early_pragma_handler): New function.
1242 (c_pp_invoke_early_pragma_handler): New function.
1243 (init_pragma): Add early pragma support for diagnostic pragmas.
1244 * c-pragma.h (struct internal_pragma_handler): Add new early handler
1246 (c_register_pragma_with_early_handler): Declare.
1247 (c_invoke_early_pragma_handler): Declare.
1248 (c_pp_invoke_early_pragma_handler): Declare.
1250 2022-07-05 Marek Polacek <polacek@redhat.com>
1253 * c-format.cc (check_format_arg): Don't emit -Wformat warnings with
1256 2022-07-01 Marek Polacek <polacek@redhat.com>
1259 * c-common.h (enum rid): Update RID_LAST_CXX20.
1261 2022-06-30 Jonathan Wakely <jwakely@redhat.com>
1263 * known-headers.cc (get_stdlib_header_for_name): Add <time.h>
1266 2022-06-24 Jason Merrill <jason@redhat.com>
1270 * c.opt (Woverloaded-virtual): Add levels, include in -Wall.
1272 2022-06-18 Jakub Jelinek <jakub@redhat.com>
1274 * c-ubsan.cc (ubsan_instrument_division, ubsan_instrument_shift):
1275 Use flag_sanitize_trap & SANITIZE_??? instead of
1276 flag_sanitize_undefined_trap_on_error. If 2 sanitizers are involved
1277 and flag_sanitize_trap differs for them, emit __builtin_trap only
1278 for the comparison where trap is requested.
1279 (ubsan_instrument_vla, ubsan_instrument_return): Use
1280 lag_sanitize_trap & SANITIZE_??? instead of
1281 flag_sanitize_undefined_trap_on_error.
1283 2022-06-13 Jason Merrill <jason@redhat.com>
1285 * c-ubsan.cc (ubsan_instrument_return): Use BUILTINS_LOCATION.
1287 2022-05-27 Marek Polacek <polacek@redhat.com>
1290 * c-attribs.cc (get_priority): Check FUNCTION_DECL.
1292 2022-05-27 Jakub Jelinek <jakub@redhat.com>
1294 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ENTER.
1296 2022-05-20 David Malcolm <dmalcolm@redhat.com>
1298 * c-format.cc: Replace uses of "FINAL" and "OVERRIDE" with "final"
1300 * c-pretty-print.h: Likewise.
1302 2022-05-18 Marek Polacek <polacek@redhat.com>
1305 * c.opt (Wenum-int-mismatch): New.
1307 2022-05-18 Marek Polacek <polacek@redhat.com>
1310 * c-warn.cc (c_do_switch_warnings): Don't warn about unhandled
1311 enumerator when it was marked with attribute unused.
1313 2022-05-18 Eric Botcazou <ebotcazou@adacore.com>
1315 * c-ada-spec.cc (dump_ada_node) <COMPLEX_TYPE>: Deal with usual
1316 floating-point complex types.
1317 <POINTER_TYPE>: Do not use limited_with clause if the designated
1318 type is a scalar type.
1320 2022-05-17 Jakub Jelinek <jakub@redhat.com>
1322 * c-omp.cc (c_finish_omp_depobj): Handle
1323 OMP_CLAUSE_DEPEND_INOUTSET.
1325 2022-05-16 Jason Merrill <jason@redhat.com>
1328 * c-attribs.cc (handle_mode_attribute): Don't fix broken typedefs
1331 2022-05-16 Martin Liska <mliska@suse.cz>
1333 * c-common.cc (ARRAY_SIZE): Use ARRAY_SIZE.
1334 (c_common_nodes_and_builtins): Likewise.
1335 * c-format.cc (check_tokens): Likewise.
1336 (check_plain): Likewise.
1337 * c-pragma.cc (c_pp_lookup_pragma): Likewise.
1338 (init_pragma): Likewise.
1339 * known-headers.cc (get_string_macro_hint): Likewise.
1340 (get_stdlib_header_for_name): Likewise.
1341 * c-attribs.cc: Likewise.
1343 2022-05-13 Richard Biener <rguenther@suse.de>
1345 * c-omp.cc: Remove gimple-fold.h include.
1347 2022-05-12 Jakub Jelinek <jakub@redhat.com>
1349 * c-common.h (enum rid): Add RID_OMP_ALL_MEMORY.
1350 * c-omp.cc (c_finish_omp_depobj): Don't build_fold_addr_expr
1351 if null_pointer_node.
1353 2022-05-11 Martin Liska <mliska@suse.cz>
1356 * c-opts.cc (c_common_handle_option): Change option name.
1357 * c.opt: Remove Joined and use Separate option.
1359 2022-05-09 Alex Coplan <alex.coplan@arm.com>
1361 * c-common.h (get_dump_info): Delete.
1362 * c-gimplify.cc (c_genericize): Get TDI_original dump file info
1363 from the global dump_manager instead of the (now obsolete)
1365 * c-opts.cc (original_dump_file): Delete.
1366 (original_dump_flags): Delete.
1367 (c_common_parse_file): Switch to using global dump_manager to
1368 manage the original dump file; fix leak of dump file.
1369 (get_dump_info): Delete.
1371 2022-05-07 Marek Polacek <polacek@redhat.com>
1375 * c-attribs.cc (positional_argument): Pass POS by reference. Deal
1376 with FN being either a function declaration or function type. Use
1377 maybe_adjust_arg_pos_for_attribute.
1378 * c-common.cc (check_function_arguments): Maybe pass FNDECL down to
1379 check_function_format.
1380 * c-common.h (maybe_adjust_arg_pos_for_attribute): Declare.
1381 (positional_argument): Adjust.
1382 * c-format.cc (get_constant): Rename to ...
1383 (validate_constant): ... this. Take EXPR by reference. Return bool
1385 (handle_format_arg_attribute): Don't overwrite FORMAT_NUM_EXPR by the
1386 return value of validate_constant.
1387 (decode_format_attr): Don't overwrite FORMAT_NUM_EXPR and
1388 FIRST_ARG_NUM_EXPR by the return value of validate_constant.
1389 (check_function_format): Adjust a parameter name.
1390 (handle_format_attribute): Maybe pass FNDECL down to decode_format_attr.
1392 2022-05-04 Marek Polacek <polacek@redhat.com>
1394 * c-warn.cc (warnings_for_convert_and_check): Convert constants of type
1397 2022-04-30 Jason Merrill <jason@redhat.com>
1400 * c-attribs.cc (handle_mode_attribute): Copy attributes, aligned,
1402 * c-common.cc (set_underlying_type): Add assert.
1404 2022-04-26 Patrick Palka <ppalka@redhat.com>
1407 * c-common.cc (verify_tree) [restart]: Move up to before the
1410 2022-04-11 Jakub Jelinek <jakub@redhat.com>
1413 * c-common.cc (c_common_nodes_and_builtins): After registering __int%d
1414 and __int%d__ builtin types, initialize corresponding ridpointers
1417 2022-03-30 Marek Polacek <polacek@redhat.com>
1420 * c-warn.cc (conversion_warning) <case COND_EXPR>: Don't call
1421 conversion_warning when OP1 is null.
1423 2022-03-30 Thomas Schwinge <thomas@codesourcery.com>
1425 * c.opt (Wc++11-extensions, Wc++14-extensions, Wc++17-extensions)
1426 (Wc++20-extensions, Wc++23-extensions): Remove 'LangEnabledBy'
1429 2022-03-30 Thomas Schwinge <thomas@codesourcery.com>
1431 * c.opt (Wuse-after-free): Remove.
1433 2022-03-30 Thomas Schwinge <thomas@codesourcery.com>
1435 * c.opt (Warray-bounds): Remove.
1437 2022-03-26 Thomas Schwinge <thomas@codesourcery.com>
1439 * c.opt: Properly quote comment.
1441 2022-03-25 Eric Botcazou <ebotcazou@adacore.com>
1443 * c-ada-spec.cc (dump_ada_import): Deal with the "section" attribute
1444 (dump_ada_node) <POINTER_TYPE>: Do not modify and pass the name, but
1445 the referenced type instead. Deal with the anonymous original type
1446 of a typedef'ed type. In the actual access case, follow the chain
1447 of external subtypes.
1448 <TYPE_DECL>: Tidy up control flow.
1450 2022-03-21 Qian Jianhua <qianjh@cn.fujitsu.com>
1452 * c-ada-spec.cc: Change array length
1454 2022-03-19 Arthur Cohen <arthur.cohen@embecosm.com>
1456 * c-common.cc (c_family_tests): Call the new tests.
1457 * c-common.h (c_diagnostic_tests): Declare.
1458 (c_opt_problem_cc_tests): Likewise.
1460 2022-03-19 Jakub Jelinek <jakub@redhat.com>
1463 * c-pretty-print.cc (c_fold_indirect_ref_for_warn): For C++ don't
1464 return COMPONENT_REFs with FIELD_DECLs whose containing scope can't
1467 2022-03-16 Christophe Lyon <christophe.lyon@arm.com>
1468 Roger Sayle <roger@nextmovesoftware.com>
1471 * c-attribs.cc (decl_or_type_attrs): Add error_mark_node check.
1473 2022-03-16 Patrick Palka <ppalka@redhat.com>
1476 * c.opt: Add -ffold-simple-inlines.
1478 2022-03-13 Tobias Burnus <tobias@codesourcery.com>
1480 * c-target.def (check_string_object_format_arg): Fix description typo.
1482 2022-03-12 Thomas Schwinge <thomas@codesourcery.com>
1485 * c-common.h (c_omp_map_clause_name): Remove.
1486 * c-omp.cc (c_omp_map_clause_name): Remove.
1488 2022-03-09 Jakub Jelinek <jakub@redhat.com>
1491 * c-opts.cc (c_common_post_options): Don't enable
1492 -Wshift-negative-value from -Wextra for C++20 or later.
1493 * c-ubsan.cc (ubsan_instrument_shift): Adjust comments.
1494 * c-warn.cc (maybe_warn_shift_overflow): Use TYPE_OVERFLOW_WRAPS
1495 instead of TYPE_UNSIGNED.
1497 2022-03-07 Jakub Jelinek <jakub@redhat.com>
1499 * c-attribs.cc: Fix up duplicated word issue in a comment.
1501 2022-03-01 Martin Liska <mliska@suse.cz>
1504 * c-attribs.cc (handle_target_clones_attribute): Use
1505 get_target_clone_attr_len and report warning soon.
1507 2022-02-17 Jonathan Wakely <jwakely@redhat.com>
1509 * c-pragma.cc (handle_pragma_pack): Remove parameter name.
1510 (handle_pragma_weak): Likewise.
1511 (handle_pragma_scalar_storage_order): Likewise.
1512 (handle_pragma_redefine_extname): Likewise.
1513 (handle_pragma_visibility): Likewise.
1514 (handle_pragma_diagnostic): Likewise.
1515 (handle_pragma_target): Likewise.
1516 (handle_pragma_optimize): Likewise.
1517 (handle_pragma_push_options): Likewise.
1518 (handle_pragma_pop_options): Likewise.
1519 (handle_pragma_reset_options): Likewise.
1520 (handle_pragma_message): Likewise.
1521 (handle_pragma_float_const_decimal64): Likewise.
1523 2022-02-16 Jakub Jelinek <jakub@redhat.com>
1526 * c-omp.cc (c_finish_omp_atomic): For MIN_EXPR/MAX_EXPR, try first
1527 build_binary_op with LT_EXPR and only if that doesn't return
1528 error_mark_node call build_modify_expr.
1530 2022-02-16 Jakub Jelinek <jakub@redhat.com>
1533 * c-common.cc (shorten_compare): Convert original arguments to
1534 the original *restype_ptr when mixing binary and decimal float.
1536 2022-02-14 Richard Biener <rguenther@suse.de>
1539 * c-pretty-print.cc (c_pretty_printer::postfix_expression): Handle
1540 internal function calls.
1542 2022-02-11 Richard Biener <rguenther@suse.de>
1544 * c-attribs.cc (c_common_attribute_table): Add entry for
1546 (handle_vector_mask_attribute): New.
1548 2022-02-10 Marcel Vollweiler <marcel@codesourcery.com>
1550 * c-omp.cc (c_omp_split_clauses): Added OMP_CLAUSE_HAS_DEVICE_ADDR case.
1551 * c-pragma.h (enum pragma_kind): Added 5.1 in comment.
1552 (enum pragma_omp_clause): Added PRAGMA_OMP_CLAUSE_HAS_DEVICE_ADDR.
1554 2022-02-09 Jason Merrill <jason@redhat.com>
1556 * c-cppbuiltin.cc (c_cpp_builtins): Update values
1557 of __cpp_constexpr and __cpp_concepts for C++20.
1559 2022-01-24 Marek Polacek <polacek@redhat.com>
1561 PR preprocessor/104030
1562 * c.opt (Wbidi-chars): Mark as EnumSet. Also accept =ucn.
1564 2022-01-21 Jakub Jelinek <jakub@redhat.com>
1567 * c-common.h (check_function_arguments_recurse): Add for_format
1569 * c-common.cc (check_function_nonnull): Pass false to
1570 check_function_arguments_recurse's last argument.
1571 (check_function_arguments_recurse): Add for_format argument,
1572 if true, don't stop on warning_suppressed_p.
1573 * c-format.cc (check_format_info): Pass true to
1574 check_function_arguments_recurse's last argument.
1576 2022-01-19 David Malcolm <dmalcolm@redhat.com>
1578 * c-common.cc (c_common_c_tests): Rename to...
1579 (c_common_cc_tests): ...this.
1580 (c_family_tests): Update calls for .c to .cc renaming.
1581 * c-common.h (c_format_c_tests): Rename to...
1582 (c_format_cc_tests): ...this.
1583 (c_indentation_c_tests): Rename to...
1584 (c_indentation_cc_tests): ...this.
1585 (c_pretty_print_c_tests): Rename to...
1586 (c_pretty_print_cc_tests): ...this.
1587 * c-format.cc (c_format_c_tests): Rename to...
1588 (c_format_cc_tests): ...this.
1589 * c-indentation.cc (c_indentation_c_tests): Rename to...
1590 (c_indentation_cc_tests): ...this.
1591 * c-pretty-print.cc (c_pretty_print_c_tests): Rename to...
1592 (c_pretty_print_cc_tests): ...this.
1594 2022-01-17 Martin Liska <mliska@suse.cz>
1596 * c-ada-spec.cc: Rename .c names to .cc.
1597 * c-ada-spec.h: Likewise.
1598 * c-common.cc (c_build_vec_convert): Likewise.
1599 (warning_candidate_p): Likewise.
1600 * c-common.h (enum rid): Likewise.
1601 (build_real_imag_expr): Likewise.
1602 (finish_label_address_expr): Likewise.
1603 (c_get_substring_location): Likewise.
1604 (c_build_bind_expr): Likewise.
1605 (conflict_marker_get_final_tok_kind): Likewise.
1606 (c_parse_error): Likewise.
1607 (check_missing_format_attribute): Likewise.
1608 (invalid_array_size_error): Likewise.
1609 (warn_for_multistatement_macros): Likewise.
1610 (build_attr_access_from_parms): Likewise.
1611 * c-cppbuiltin.cc (c_cpp_builtins): Likewise.
1612 * c-format.cc: Likewise.
1613 * c-gimplify.cc (c_gimplify_expr): Likewise.
1614 * c-indentation.h: Likewise.
1615 * c-objc.h (objc_prop_attr_kind_for_rid): Likewise.
1616 * c-omp.cc (c_omp_predetermined_mapping): Likewise.
1617 * c-opts.cc (c_common_post_options): Likewise.
1618 (set_std_cxx23): Likewise.
1619 * c-pragma.cc (handle_pragma_redefine_extname): Likewise.
1620 * c-pretty-print.h: Likewise.
1622 2022-01-17 Martin Liska <mliska@suse.cz>
1624 * c-ada-spec.c: Moved to...
1625 * c-ada-spec.cc: ...here.
1626 * c-attribs.c: Moved to...
1627 * c-attribs.cc: ...here.
1628 * c-common.c: Moved to...
1629 * c-common.cc: ...here.
1630 * c-cppbuiltin.c: Moved to...
1631 * c-cppbuiltin.cc: ...here.
1632 * c-dump.c: Moved to...
1633 * c-dump.cc: ...here.
1634 * c-format.c: Moved to...
1635 * c-format.cc: ...here.
1636 * c-gimplify.c: Moved to...
1637 * c-gimplify.cc: ...here.
1638 * c-indentation.c: Moved to...
1639 * c-indentation.cc: ...here.
1640 * c-lex.c: Moved to...
1641 * c-lex.cc: ...here.
1642 * c-omp.c: Moved to...
1643 * c-omp.cc: ...here.
1644 * c-opts.c: Moved to...
1645 * c-opts.cc: ...here.
1646 * c-pch.c: Moved to...
1647 * c-pch.cc: ...here.
1648 * c-ppoutput.c: Moved to...
1649 * c-ppoutput.cc: ...here.
1650 * c-pragma.c: Moved to...
1651 * c-pragma.cc: ...here.
1652 * c-pretty-print.c: Moved to...
1653 * c-pretty-print.cc: ...here.
1654 * c-semantics.c: Moved to...
1655 * c-semantics.cc: ...here.
1656 * c-ubsan.c: Moved to...
1657 * c-ubsan.cc: ...here.
1658 * c-warn.c: Moved to...
1659 * c-warn.cc: ...here.
1660 * cppspec.c: Moved to...
1661 * cppspec.cc: ...here.
1662 * stub-objc.c: Moved to...
1663 * stub-objc.cc: ...here.
1665 2022-01-15 Martin Sebor <msebor@redhat.com>
1668 * c.opt (-Wdangling-pointer): New option.
1670 2022-01-15 Martin Sebor <msebor@redhat.com>
1672 PR tree-optimization/80532
1673 * c.opt (-Wuse-after-free): New options.
1675 2022-01-14 David Malcolm <dmalcolm@redhat.com>
1677 * c-attribs.c (c_common_attribute_table): Add "tainted_args".
1678 (handle_tainted_args_attribute): New.
1680 2022-01-13 Anthony Sharp <anthonysharp15@gmail.com>
1681 Jason Merrill <jason@redhat.com>
1684 * c.opt: Added -Wmissing-template-keyword.
1686 2022-01-13 Richard Biener <rguenther@suse.de>
1689 * c-common.c (c_common_mark_addressable_vec): Handle TARGET_EXPR.
1691 2022-01-12 Martin Liska <mliska@suse.cz>
1694 * c-attribs.c (handle_optimize_attribute): Do not call
1695 cl_optimization_compare if we seen an error.
1697 2022-01-11 Jakub Jelinek <jakub@redhat.com>
1701 * c-warn.c (conversion_warning): Handle BIT_AND_EXPR, BIT_IOR_EXPR
1704 2022-01-10 Richard Biener <rguenther@suse.de>
1706 PR middle-end/101530
1707 * c-common.c (c_build_shufflevector): Wrap the BIT_FIELD_REF
1708 in a TARGET_EXPR to force a temporary.
1710 2022-01-06 Marek Polacek <polacek@redhat.com>
1713 * c-pragma.c (handle_pragma_scalar_storage_order): Use %< %> in
1714 diagnostic messages.
1715 (handle_pragma_diagnostic): Likewise.
1717 2022-01-03 Marek Polacek <polacek@redhat.com>
1720 * c-format.c (check_tokens): Accept "decl-specifier*".
1722 2022-01-03 Jakub Jelinek <jakub@redhat.com>
1725 * c-attribs.c (handle_non_overlapping_attribute): New function.
1726 (c_common_attribute_table): Add "non overlapping" attribute.
1728 2021-12-30 Jakub Jelinek <jakub@redhat.com>
1731 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Perform
1732 cpp_define_unused/cpp_undef calls with forced token locations
1735 2021-12-27 Patrick Palka <ppalka@redhat.com>
1738 * c-common.c (pointer_int_sum): When quiet, return
1739 error_mark_node for an incomplete pointed-to type and don't
1740 call size_in_bytes_loc.
1742 2021-12-17 Jason Merrill <jason@redhat.com>
1745 * c-opts.c (c_common_post_options): Update defaults.
1747 2021-12-16 Martin Liska <mliska@suse.cz>
1750 * c-pragma.c (handle_pragma_pop_options): Do not check
1751 global options modification when an error is seen in parsing
1752 of options (pragmas or attributes).
1754 2021-12-12 Jonathan Wakely <jwakely@redhat.com>
1756 * known-headers.cc: Define INCLUDE_MEMORY instead of
1758 * name-hint.h: Likewise.
1759 (class name_hint): Use std::unique_ptr instead of gnu::unique_ptr.
1761 2021-12-09 Jakub Jelinek <jakub@redhat.com>
1764 * c-pch.c (c_common_no_more_pch): Pass a temporary void * var
1765 with NULL value instead of NULL to host_hooks.gt_pch_use_address.
1767 2021-12-03 Jakub Jelinek <jakub@redhat.com>
1770 * c-pch.c (struct c_pch_validity): Remove pch_init member.
1771 (pch_init): Don't initialize v.pch_init.
1772 (c_common_valid_pch): Don't warn and punt if .text addresses change.
1774 2021-12-01 Jason Merrill <jason@redhat.com>
1777 * c.opt: Add -fconstexpr-fp-except.
1779 2021-11-29 Richard Biener <rguenther@suse.de>
1781 * c-format.c (check_format_string): Remove spurious
1784 2021-11-29 Richard Biener <rguenther@suse.de>
1786 * c-opts.c (c_common_post_options): Remove unreachable return.
1787 * c-pragma.c (handle_pragma_target): Likewise.
1788 (handle_pragma_optimize): Likewise.
1790 2021-11-25 Jakub Jelinek <jakub@redhat.com>
1793 * c-opts.c (c_common_post_options): Enable -Wcomma-subscript by
1794 default for C++23 regardless of warn_deprecated.
1795 * c-cppbuiltin.c (c_cpp_builtins): Predefine
1796 __cpp_multidimensional_subscript=202110L for C++23.
1798 2021-11-23 Martin Sebor <msebor@redhat.com>
1801 * c.opt: Add -Winfinite-recursion.
1803 2021-11-19 Martin Sebor <msebor@redhat.com>
1807 * c-common.c (decl_with_nonnull_addr_p): Call maybe_nonzero_address
1808 and improve handling tof defined symbols.
1810 2021-11-19 Martin Liska <mliska@suse.cz>
1813 2021-11-18 Martin Liska <mliska@suse.cz>
1815 * c-gimplify.c (genericize_c_loop): Use option directly.
1817 2021-11-18 Matthias Kretz <m.kretz@gsi.de>
1819 * c-common.c (c_common_reswords): Add __builtin_assoc_barrier.
1820 * c-common.h (enum rid): Add RID_BUILTIN_ASSOC_BARRIER.
1822 2021-11-18 Martin Liska <mliska@suse.cz>
1824 * c-gimplify.c (genericize_c_loop): Use option directly.
1826 2021-11-17 Martin Uecker <uecker@gcc.gnu.org>
1830 * c-common.c (pointer_int_sum): Make sure pointer expressions
1831 are evaluated first when the size expression depends on for
1832 variably-modified types.
1834 2021-11-17 Marek Polacek <polacek@redhat.com>
1836 PR preprocessor/103026
1837 * c.opt (Wbidi-chars, Wbidi-chars=): New option.
1839 2021-11-16 Jason Merrill <jason@redhat.com>
1841 * c-common.c (release_tree_vector): Only cache vecs smaller than
1844 2021-11-15 Jason Merrill <jason@redhat.com>
1846 * c.opt: Add -fimplicit-constexpr.
1847 * c-cppbuiltin.c: Define __cpp_implicit_constexpr.
1848 * c-opts.c (c_common_post_options): Disable below C++14.
1850 2021-11-15 Jakub Jelinek <jakub@redhat.com>
1852 * c-omp.c (c_omp_split_clauses) <case OMP_CLAUSE_THREAD_LIMIT>:
1853 Duplicate to both OMP_TARGET and OMP_TEAMS.
1855 2021-11-10 Marek Polacek <polacek@redhat.com>
1858 * c-pragma.c (handle_pragma_diagnostic): Handle #pragma GCC diagnostic
1861 2021-11-09 David Malcolm <dmalcolm@redhat.com>
1863 * c-pragma.c (GCC_BAD_AT): New macro.
1864 (GCC_BAD2_AT): New macro.
1865 (handle_pragma_pack): Use the location of the pertinent token when
1866 issuing diagnostics about invalid constants/actions, and trailing
1868 (handle_pragma_target): Likewise for non-string "GCC option".
1869 (handle_pragma_message): Likewise for trailing junk.
1871 2021-11-03 Joseph Myers <joseph@codesourcery.com>
1874 * c-common.c (convert_and_check): Add argument init_const. Call
1875 convert_init if init_const.
1876 * c-common.h (convert_and_check): Update prototype.
1877 (convert_init): New prototype.
1879 2021-11-01 David Malcolm <dmalcolm@redhat.com>
1881 * c-lex.c (c_lex_with_flags): When complaining about non-printable
1882 CPP_OTHER tokens, set the "escape on output" flag.
1884 2021-10-27 Jakub Jelinek <jakub@redhat.com>
1886 * c-omp.c (c_omp_check_loop_iv_r): Don't clear 3rd bit for
1888 (c_omp_check_nonrect_loop_iv): Handle POINTER_PLUS_EXPR.
1889 (c_omp_check_loop_iv): Set kind even if the iterator is non-integral.
1891 2021-10-27 Jakub Jelinek <jakub@redhat.com>
1894 * c-common.h (c_omp_check_loop_iv_exprs): Add enum tree_code argument.
1895 * c-omp.c (c_omp_check_loop_iv_r): For trees other than decls,
1896 TREE_VEC, PLUS_EXPR, MINUS_EXPR, MULT_EXPR, POINTER_PLUS_EXPR or
1897 conversions temporarily clear the 3rd bit from d->kind while walking
1899 (c_omp_check_loop_iv_exprs): Add CODE argument. Or in 4 into data.kind
1900 if possibly non-rectangular.
1902 2021-10-21 Jakub Jelinek <jakub@redhat.com>
1905 * c-omp.c (c_omp_predefined_variable): Return true also for
1906 ubsan_create_data created artificial variables.
1908 2021-10-14 Joseph Myers <joseph@codesourcery.com>
1910 * c-format.c (printf_length_specs, scanf_length_specs)
1911 (print_char_table, scan_char_table): Support DFP formats for C2X.
1912 * c-format.h (TEX_D32, TEX_D64, TEX_D128): Remove.
1913 (T2X_D32, T2X_D64, T2X_D128): New macros.
1915 2021-10-14 Kwok Cheung Yeung <kcy@codesourcery.com>
1917 * c-omp.c (c_omp_check_context_selector): Rename to
1918 omp_check_context_selector and move to omp-general.c.
1919 (c_omp_mark_declare_variant): Rename to omp_mark_declare_variant and
1920 move to omp-general.c.
1922 2021-10-12 Joseph Myers <joseph@codesourcery.com>
1924 * c-format.c (print_char_table): Add %b and %B formats.
1925 (scan_char_table): Add %b format.
1926 * c-format.h (T2X_UI, T2X_UL, T2X_ULL, T2X_US, T2X_UC, T2X_ST)
1927 (T2X_UPD, T2X_UIM): New macros.
1929 2021-10-12 Jakub Jelinek <jakub@redhat.com>
1931 * c-omp.c (c_finish_omp_atomic): Use
1932 clear_padding_type_may_have_padding_p.
1934 2021-10-08 Martin Liska <mliska@suse.cz>
1936 * c-opts.c (c_common_post_options): Use new macro
1939 2021-10-07 Martin Liska <mliska@suse.cz>
1941 * c-common.c (parse_optimize_options): Make
1942 save_opt_decoded_options a pointer type.
1944 2021-10-06 Jakub Jelinek <jakub@redhat.com>
1946 PR tree-optimization/102571
1947 * c-omp.c (c_finish_omp_atomic): Optimize the case where type has
1948 padding, but the non-padding bits are contiguous set of bytes
1949 by adjusting the memcmp call arguments instead of emitting
1950 __builtin_clear_padding and then comparing all the type's bytes.
1952 2021-10-06 Jakub Jelinek <jakub@redhat.com>
1955 * c-cppbuiltin.c (c_cpp_builtins): For -std=c++23 predefine
1956 __cpp_constexpr to 202110L rather than 201907L.
1958 2021-10-04 Marek Polacek <polacek@redhat.com>
1961 * c-common.h (do_warn_array_compare): Declare.
1962 * c-warn.c (do_warn_array_compare): New.
1963 * c.opt (Warray-compare): New option.
1965 2021-10-02 Iain Sandoe <iain@sandoe.co.uk>
1967 * c-format.c: Remove a test of TARGET_FORMAT_TYPES with
1968 NULL, this is not needed.
1970 2021-10-01 Martin Sebor <msebor@redhat.com>
1973 * c-common.c (decl_with_nonnull_addr_p): Handle members.
1974 Check and perform warning suppression.
1975 (c_common_truthvalue_conversion): Enhance warning suppression.
1977 2021-10-01 Martin Liska <mliska@suse.cz>
1980 * c-common.c (parse_optimize_options): decoded_options[0] is
1981 used for program name, so merged_decoded_options should also
1984 2021-10-01 Jakub Jelinek <jakub@redhat.com>
1985 Richard Biener <rguenther@suse.de>
1988 * c-ubsan.c (ubsan_instrument_division): Check the right
1989 flag_sanitize_recover bit, depending on which sanitization
1990 is done. Sanitize INT_MIN / -1 under SANITIZE_SI_OVERFLOW
1991 rather than SANITIZE_DIVIDE. If both SANITIZE_SI_OVERFLOW
1992 and SANITIZE_DIVIDE is enabled, neither check is known
1993 to be false and flag_sanitize_recover bits for those two
1994 aren't the same, emit both __ubsan_handle_divrem_overflow
1995 and __ubsan_handle_divrem_overflow_abort calls.
1997 2021-10-01 Martin Liska <mliska@suse.cz>
1999 * c-common.c (parse_optimize_options): Combine optimize
2000 options with what was provided on the command line.
2002 2021-10-01 Jakub Jelinek <jakub@redhat.com>
2004 * c-omp.c (c_omp_split_clauses): Also copy
2005 OMP_CLAUSE_ORDER_REPRODUCIBLE.
2007 2021-09-27 Martin Liska <mliska@suse.cz>
2009 * c-opts.c (c_common_init_options_struct): Set also
2010 x_flag_default_complex_method.
2012 2021-09-22 Jakub Jelinek <jakub@redhat.com>
2014 * c-omp.c (c_omp_split_clauses): Copy over OMP_CLAUSE_ALLOCATE_ALIGN.
2016 2021-09-20 Matthias Kretz <m.kretz@gsi.de>
2018 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Define or
2019 undefine __RECIPROCAL_MATH__, __NO_SIGNED_ZEROS__,
2020 __NO_TRAPPING_MATH__, __ASSOCIATIVE_MATH__, and
2021 __ROUNDING_MATH__ according to the new optimization flags.
2023 2021-09-18 Jakub Jelinek <jakub@redhat.com>
2025 * c-omp.c (c_omp_split_clauses): Split order clause also to
2026 distribute construct. Copy over OMP_CLAUSE_ORDER_UNCONSTRAINED.
2028 2021-09-17 Jakub Jelinek <jakub@redhat.com>
2030 * c-omp.c (c_finish_omp_atomic): Avoid creating
2031 TARGET_EXPR if test is true, use create_tmp_var_raw instead of
2032 create_tmp_var and add a zero initializer to TARGET_EXPRs that
2033 had NULL initializer. When omitting operands after v = x,
2034 use type of v rather than type of x. Fix type of vtmp
2037 2021-09-13 Jason Merrill <jason@redhat.com>
2039 * c.opt: Add -Winterference-size.
2040 * c-cppbuiltin.c (cpp_atomic_builtins): Add __GCC_DESTRUCTIVE_SIZE
2041 and __GCC_CONSTRUCTIVE_SIZE.
2043 2021-09-10 Jakub Jelinek <jakub@redhat.com>
2045 * c-common.h (c_finish_omp_atomic): Add r and weak arguments.
2046 * c-omp.c: Include gimple-fold.h.
2047 (c_finish_omp_atomic): Add r and weak arguments. Add support for
2050 2021-09-09 qing zhao <qing.zhao@oracle.com>
2052 * c-attribs.c (handle_uninitialized_attribute): New function.
2053 (c_common_attribute_table): Add "uninitialized" attribute.
2055 2021-09-08 liuhongt <hongtao.liu@intel.com>
2057 * c-common.c (excess_precision_mode_join): Update below comments.
2058 (c_ts18661_flt_eval_method): Set excess_precision_type to
2059 EXCESS_PRECISION_TYPE_FLOAT16 when -fexcess-precision=16.
2060 * c-cppbuiltin.c (cpp_atomic_builtins): Update below comments.
2061 (c_cpp_flt_eval_method_iec_559): Set excess_precision_type to
2062 EXCESS_PRECISION_TYPE_FLOAT16 when -fexcess-precision=16.
2064 2021-09-07 Marcel Vollweiler <marcel@codesourcery.com>
2066 * c-omp.c (c_finish_omp_flush): Handle MEMMODEL_SEQ_CST.
2068 2021-09-03 Eric Botcazou <ebotcazou@adacore.com>
2070 * c-ada-spec.c (dump_ads): Generate pragmas to disable style checks
2071 and -gnatwu warning for the package specification.
2073 2021-09-01 Iain Sandoe <iain@sandoe.co.uk>
2075 * c-attribs.c (handle_unavailable_attribute): New.
2077 2021-08-30 Jason Merrill <jason@redhat.com>
2079 * c.opt: Add -Wmissing-requires.
2081 2021-08-25 Lewis Hyatt <lhyatt@gmail.com>
2084 * c-opts.c (c_common_input_charset_cb): New function.
2085 (c_common_post_options): Call new function
2086 diagnostic_initialize_input_context().
2088 2021-08-20 Tobias Burnus <tobias@codesourcery.com>
2090 * c-format.c (gcc_gfc_length_specs): Add 'll' and 'w'.
2091 (gcc_gfc_char_table): Add T9L_LL and T9L_ULL to
2092 "di" and "u", respecitively; fill with BADLEN to match
2094 (get_init_dynamic_hwi): Split off from ...
2095 (init_dynamic_diag_info): ... here. Call it.
2096 (init_dynamic_gfc_info): Call it.
2098 2021-08-20 Jakub Jelinek <jakub@redhat.com>
2100 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_ERROR.
2101 * c-pragma.c (omp_pragmas): Add error directive.
2102 * c-omp.c (omp_directives): Uncomment error directive entry.
2104 2021-08-18 Jakub Jelinek <jakub@redhat.com>
2106 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_NOTHING.
2107 * c-pragma.c (omp_pragmas): Add nothing directive.
2108 * c-omp.c (omp_directives): Uncomment nothing directive entry.
2110 2021-08-17 Jakub Jelinek <jakub@redhat.com>
2113 * c-common.h (enum rid): Add RID_IS_LAYOUT_COMPATIBLE.
2114 * c-common.c (c_common_reswords): Add __is_layout_compatible.
2116 2021-08-17 Matt Jacobson <mhjacobson@me.com>
2118 * c-opts.c (c_common_post_options): Default to
2119 flag_objc_sjlj_exceptions = 1 only when flag_objc_abi < 2.
2121 2021-08-17 Jakub Jelinek <jakub@redhat.com>
2123 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_SCOPE.
2124 * c-pragma.c (omp_pragmas): Add scope construct.
2125 * c-omp.c (omp_directives): Uncomment scope directive entry.
2127 2021-08-16 Sebastian Huber <sebastian.huber@embedded-brains.de>
2129 * c-cppbuiltin.c (c_cpp_builtins): Define
2130 __LIBGCC_GCOV_TYPE_SIZE if flag_building_libgcc is true.
2132 2021-08-12 Jakub Jelinek <jakub@redhat.com>
2134 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_MASKED.
2135 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_FILTER.
2136 * c-pragma.c (omp_pragmas_simd): Add masked construct.
2137 * c-common.h (enum c_omp_clause_split): Add C_OMP_CLAUSE_SPLIT_MASKED
2139 (c_finish_omp_masked): Declare.
2140 * c-omp.c (c_finish_omp_masked): New function.
2141 (c_omp_split_clauses): Handle combined masked constructs.
2143 2021-07-30 Jakub Jelinek <jakub@redhat.com>
2146 * c-common.h (enum rid): Add RID_IS_POINTER_INTERCONVERTIBLE_BASE_OF.
2147 * c-common.c (c_common_reswords): Add
2148 __is_pointer_interconvertible_base_of.
2150 2021-07-29 Richard Biener <rguenther@suse.de>
2153 * c-common.c (c_common_mark_addressable_vec): Look through
2154 C_MAYBE_CONST_EXPR even if not at the toplevel.
2156 2021-07-27 Martin Sebor <msebor@redhat.com>
2159 * c-warn.c (warn_parm_ptrarray_mismatch): Use OEP_DECL_NAME.
2161 2021-07-23 Jakub Jelinek <jakub@redhat.com>
2163 * c-lex.c (c_common_has_attribute): Call canonicalize_attr_name also
2164 on attr_id. Return 1 for omp::directive or omp::sequence in C++11
2167 2021-07-23 Jakub Jelinek <jakub@redhat.com>
2169 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP__START_ and
2170 PRAGMA_OMP__LAST_ enumerators.
2172 2021-07-21 Thomas Schwinge <thomas@codesourcery.com>
2173 Joseph Myers <joseph@codesourcery.com>
2174 Cesar Philippidis <cesar@codesourcery.com>
2176 * c-pragma.h (pragma_omp_clause): Add 'PRAGMA_OACC_CLAUSE_NOHOST'.
2178 2021-07-20 Martin Sebor <msebor@redhat.com>
2180 * c-common.c (c_build_shufflevector): Adjust by-value argument to
2182 * c-common.h (c_build_shufflevector): Same.
2184 2021-07-16 Andrew Pinski <apinski@marvell.com>
2187 * c-common.c (parse_optimize_options): Use the correct
2190 2021-07-15 Martin Sebor <msebor@redhat.com>
2194 * c-warn.c (warn_parm_array_mismatch): Use OEP_DECL_NAME.
2196 2021-07-14 Jason Merrill <jason@redhat.com>
2198 * c-opts.c (c_common_post_options): Set -fdelete-dead-exceptions.
2200 2021-07-06 Martin Sebor <msebor@redhat.com>
2202 * c-format.c (gcc_tdiag_char_table): Remove support for %G and %K.
2203 (gcc_cdiag_char_table): Same.
2204 (gcc_cxxdiag_char_table): Same.
2206 2021-07-02 Jakub Jelinek <jakub@redhat.com>
2208 * c-common.h (enum c_omp_directive_kind): New enum.
2209 (struct c_omp_directive): New type.
2210 (c_omp_categorize_directive): Declare.
2211 * c-omp.c (omp_directives): New variable.
2212 (c_omp_categorize_directive): New function.
2214 2021-07-01 Eric Botcazou <ebotcazou@adacore.com>
2216 * c-ada-spec.c (packed_layout): New global variable.
2217 (dump_ada_declaration): Set it upon seeing a packed record type.
2218 Do not put the "aliased" keyword if it is set.
2219 (dump_ada_structure): Add Pack aspect if it is set and clear it.
2221 2021-07-01 Eric Botcazou <ebotcazou@adacore.com>
2223 * c-ada-spec.c (check_name): Rename into...
2224 (check_type_name_conflict): ...this. Minor tweak.
2225 (dump_ada_function_declaration): Adjust to above renaming.
2226 (dump_ada_array_domains): Fix oversight.
2227 (dump_ada_declaration): Call check_type_name_conflict for variables.
2229 2021-06-25 Martin Sebor <msebor@redhat.com>
2231 * c-common.c (c_wrap_maybe_const): Remove TREE_NO_WARNING.
2232 (c_common_truthvalue_conversion): Replace direct uses of
2233 TREE_NO_WARNING with warning_suppressed_p, suppress_warning, and
2235 (check_function_arguments_recurse): Same.
2236 * c-gimplify.c (c_gimplify_expr): Same.
2237 * c-warn.c (overflow_warning): Same.
2238 (warn_logical_operator): Same.
2239 (warn_if_unused_value): Same.
2240 (do_warn_unused_parameter): Same.
2242 2021-06-24 Jakub Jelinek <jakub@redhat.com>
2244 * c-common.h (enum c_omp_region_type): Add C_ORT_TARGET and
2246 * c-omp.c (c_omp_split_clauses): For OMP_CLAUSE_IN_REDUCTION on
2247 combined target constructs also add map (always, tofrom:) clause.
2249 2021-06-15 Robin Dapp <rdapp@linux.ibm.com>
2251 * c-attribs.c (common_handle_aligned_attribute): Remove short
2252 circuit and dead code.
2254 2021-06-14 Jonathan Wakely <jwakely@redhat.com>
2257 * known-headers.cc (get_stdlib_header_for_name): Add known
2258 headers for EXIT_FAILURE, EXIT_SUCCESS, abort, atexit, calloc,
2261 2021-06-12 Jason Merrill <jason@redhat.com>
2263 * c-attribs.c (handle_unused_attribute): Handle FIELD_DECL.
2265 2021-06-11 Jakub Jelinek <jakub@redhat.com>
2268 * c-cppbuiltin.c (c_cpp_builtins): Predefine __cpp_if_consteval for
2269 -std=c++2b for P1938R3 consteval if support.
2271 2021-06-09 Jason Merrill <jason@redhat.com>
2274 * c-warn.c (warn_for_sign_compare): Remove C++ enum mismatch
2277 2021-06-07 Martin Liska <mliska@suse.cz>
2279 * c-target.def: Split long lines and replace them
2282 2021-06-04 Martin Sebor <msebor@redhat.com>
2285 * c-attribs.c (positional_argument): Bail on erroneous types.
2287 2021-06-04 Martin Sebor <msebor@redhat.com>
2289 * c-warn.c (warn_parm_array_mismatch): Check TREE_PURPOSE to test
2290 for element presence.
2292 2021-06-03 Eric Botcazou <ebotcazou@adacore.com>
2294 * c-ada-spec.c (dump_ada_macros): Minor tweaks.
2295 (dump_ada_decl_name): Likewise.
2296 (dump_anonymous_type_name): Remove parent parameter and adjust.
2297 (dump_sloc): Minor tweak.
2298 (dump_ada_array_type): Remove type parameter and adjust.
2299 (dump_ada_enum_type): Remove parent parameter and adjust.
2300 (dump_ada_node): Adjust calls to above functions.
2301 (dumped_anonymous_types): New global variable.
2302 (dump_nested_types_1): Rename into...
2303 (dump_nested_types): ...this.
2304 (dump_nested_type): Remove parent and dumped_types parameters.
2305 <ARRAY_TYPE>: Replace dumped_types with dumped_anonymous_types.
2306 Adjust calls to dump_anonymous_type_name and dump_ada_array_type.
2307 (dump_ada_specs): Initialize and free dumped_anonymous_types.
2309 2021-06-03 Eric Botcazou <ebotcazou@adacore.com>
2311 * c-ada-spec.c (pp_ada_tree_identifier): Tidy up.
2312 (dump_ada_node) <POINTER_TYPE>: Deal specially with external subtypes.
2314 2021-06-03 Eric Botcazou <ebotcazou@adacore.com>
2316 * c-ada-spec.c (dump_ada_enum_type): Dump a prefix for constants.
2317 (htable_t): New typedef.
2318 (overloaded_names): Use it.
2319 (add_name): New function.
2320 (init_overloaded_names): Use add_name to populate the table and add
2321 special cases for sigaction and stat.
2322 (overloaded_name_p): Rename into...
2323 (overloading_index): ...this. Do not initialize overloaded_names table
2324 here. Return the index or zero.
2325 (dump_ada_declaration): Minor tweaks. Do not skip overloaded functions
2326 but add an overloading suffix instead.
2327 (dump_ada_specs): Initialize overloaded_names tables here.
2329 2021-06-01 Martin Liska <mliska@suse.cz>
2332 * c-attribs.c (handle_optimize_attribute): Limit sanity check
2333 to a situation where we are not in processing of an optimize
2335 * c-pragma.c (handle_pragma_pop_options): Restore target
2338 2021-05-31 Indu Bhagat <indu.bhagat@oracle.com>
2341 * c-pch.c (c_common_valid_pch): Use xstrdup for debug format set names.
2343 2021-05-31 Richard Biener <rguenther@suse.de>
2346 * c-common.c: Include tree-vector-builder.h and
2348 (c_common_reswords): Add __builtin_shufflevector.
2349 (c_build_shufflevector): New funtion.
2350 * c-common.h (enum rid): Add RID_BUILTIN_SHUFFLEVECTOR.
2351 (c_build_shufflevector): Declare.
2353 2021-05-28 Jakub Jelinek <jakub@redhat.com>
2356 * c-omp.c (c_omp_split_clauses): For reduction clause if combined with
2357 target add a map tofrom clause with OMP_CLAUSE_MAP_IMPLICIT.
2359 2021-05-28 Tobias Burnus <tobias@codesourcery.com>
2361 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_AFFINITY.
2363 2021-05-25 Martin Liska <mliska@suse.cz>
2365 PR tree-optimization/92860
2367 * c-attribs.c (handle_optimize_attribute): Save target node
2368 before calling parse_optimize_options and save it in case
2370 * c-pragma.c (handle_pragma_target): Similarly for pragma.
2371 (handle_pragma_pop_options): Likewise here.
2373 2021-05-25 Martin Liska <mliska@suse.cz>
2375 * c-attribs.c (handle_no_sanitize_coverage_attribute): New.
2377 2021-05-25 Jakub Jelinek <jakub@redhat.com>
2380 * c-omp.c (c_omp_split_clauses): Copy reduction to teams when teams is
2381 combined with simd and not with taskloop or for.
2383 2021-05-21 Jakub Jelinek <jakub@redhat.com>
2386 * c-omp.c (c_omp_split_clauses): Set OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT
2387 on firstprivate clause copy going to target construct, and for
2388 target simd set also OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT_TARGET bit.
2390 2021-05-20 Jonathan Wakely <jwakely@redhat.com>
2392 * c.opt (Wc++11-extensions, Wc++14-extensions)
2393 (Wc++17-extensions, Wc++20-extensions, Wc++23-extensions): New
2396 2021-05-20 Indu Bhagat <indu.bhagat@oracle.com>
2398 * c-lex.c (init_c_lex): Use dwarf_debuginfo_p.
2400 2021-05-20 Indu Bhagat <indu.bhagat@oracle.com>
2402 * c-opts.c (c_common_post_options): Adjust access to debug_type_names.
2403 * c-pch.c (struct c_pch_validity): Use type uint32_t.
2404 (pch_init): Renamed member.
2405 (c_common_valid_pch): Adjust access to debug_type_names.
2407 2021-05-19 Martin Sebor <msebor@redhat.com>
2410 * c-attribs.c (build_attr_access_from_parms): Handle arbitrarily many
2413 2021-05-18 Richard Biener <rguenther@suse.de>
2416 * c-attribs.c (type_valid_for_vector_size): Reject too large nunits.
2417 Reword existing nunit diagnostic.
2419 2021-05-17 Joern Rennecke <joern.rennecke@embecosm.com>
2421 * c-common.c (braced_list_to_string): Return CTOR unchanged
2422 if host and target character sizes don't match.
2424 2021-05-14 Martin Liska <mliska@suse.cz>
2426 * c.opt: Add Warning keyword for 2 options.
2428 2021-05-13 Martin Liska <mliska@suse.cz>
2430 PR middle-end/100504
2431 * c-attribs.c (handle_target_clones_attribute): Expect a string
2432 argument to target_clone argument.
2434 2021-05-11 Joseph Myers <joseph@codesourcery.com>
2436 * c-lex.c (interpret_float): Handle digit separators for C2X.
2438 2021-05-10 Martin Liska <mliska@suse.cz>
2440 * c-ada-spec.c (print_destructor): Use startswith
2441 function instead of strncmp.
2442 (dump_ada_declaration): Likewise.
2443 * c-common.c (disable_builtin_function): Likewise.
2444 (def_builtin_1): Likewise.
2445 * c-format.c (check_tokens): Likewise.
2446 (check_plain): Likewise.
2447 (convert_format_name_to_system_name): Likewise.
2449 2021-04-28 Patrick McGehearty <patrick.mcgehearty@oracle.com>
2451 * c-cppbuiltin.c (c_cpp_builtins): Add supporting macros for new
2454 2021-04-26 Thomas Schwinge <thomas@codesourcery.com>
2455 Nathan Sidwell <nathan@codesourcery.com>
2456 Tom de Vries <vries@codesourcery.com>
2457 Julian Brown <julian@codesourcery.com>
2458 Kwok Cheung Yeung <kcy@codesourcery.com>
2460 * c.opt (Wopenacc-parallelism): New.
2462 2021-04-19 Thomas Schwinge <thomas@codesourcery.com>
2464 * c.opt (fopenacc-kernels=): Remove.
2466 2021-04-08 Jakub Jelinek <jakub@redhat.com>
2468 * c-warn.c (do_warn_double_promotion): Fix comment typo,
2469 occured -> occurred.
2470 (check_alignment_of_packed_member): Fix a comment typo,
2472 (warn_parm_ptrarray_mismatch): Fix comment typos, os -> of
2473 and onless -> unless.
2474 (warn_parm_array_mismatch): Fix comment typos, declaratation
2475 -> declaration and woud -> would. Fix up comment indentation.
2477 2021-04-08 Martin Sebor <msebor@redhat.com>
2480 * c.opt (Wmismatched-new-delete): Correct spelling.
2482 2021-04-05 Eric Botcazou <ebotcazou@adacore.com>
2484 * c-ada-spec.c (is_simple_enum): Minor tweaks.
2485 (dump_ada_enum_type): Add TYPE and PARENT parameters. For non-simple
2486 enumeral types use again the type name for the enumeration constants.
2487 (dump_ada_node): Adjust call to dump_ada_enum_type.
2488 (dump_nested_type): Likewise.
2490 2021-04-01 Jason Merrill <jason@redhat.com>
2493 * c-opts.c (c_common_post_options): Bump latest_abi_version.
2495 2021-03-25 Jakub Jelinek <jakub@redhat.com>
2498 * c-warn.c (do_warn_duplicated_branches): Pass also
2499 OEP_ADDRESS_OF_SAME_FIELD to operand_equal_p.
2501 2021-03-20 Jakub Jelinek <jakub@redhat.com>
2504 * c-gimplify.c (c_genericize_control_stmt): Handle STATEMENT_LIST.
2506 2021-03-05 Eric Botcazou <ebotcazou@adacore.com>
2508 * c-ada-spec.c (dump_ada_declaration) <TYPE_DECL>: Dump nested types
2509 after entering the separate class package, if any.
2511 2021-03-04 Richard Biener <rguenther@suse.de>
2513 * c-pretty-print.c (c_pretty_printer::direct_abstract_declarator):
2516 2021-03-04 Jakub Jelinek <jakub@redhat.com>
2519 * c-ppoutput.c (print): Change src_line type from int to unsigned.
2520 (token_streamer::stream) Likewise.
2521 (maybe_print_line_1): Likewise. Don't strcmp src_file if src_loc is
2524 2021-03-03 Jakub Jelinek <jakub@redhat.com>
2527 * c-common.c (build_va_arg): Call c_common_mark_addressable_vec
2528 instead of mark_addressable. Fix a comment typo -
2529 neutrallly -> neutrally.
2531 2021-02-28 Jakub Jelinek <jakub@redhat.com>
2534 * c-attribs.c (handle_malloc_attribute): Fix a typo in inform
2535 message - refernced -> referenced. Remove superfluous space before
2536 closing paren of function calls.
2538 2021-02-25 Nathan Sidwell <nathan@acm.org>
2541 * c.opt (-flang-info-module-cmi): Renamed option.
2543 2021-02-19 Nathan Sidwell <nathan@acm.org>
2545 * c.opt (flang-info-module-read, flang-info-module-read=): New.
2547 2021-02-18 H.J. Lu <hjl.tools@gmail.com>
2550 * c-attribs.c (c_common_attribute_table): Add the "retain"
2552 (handle_retain_attribute): New function.
2554 2021-02-16 Marek Polacek <polacek@redhat.com>
2557 * c-attribs.c (handle_assume_aligned_attribute): Check that the
2558 alignment argument is non-negative. Tweak a warning message.
2560 2021-02-12 Martin Sebor <msebor@redhat.com>
2563 * c-warn.c (warn_parm_array_mismatch): Free strings returned from
2564 print_generic_expr_to_str.
2566 2021-02-10 Richard Biener <rguenther@suse.de>
2568 * c-common.c (parse_optimize_options): Free decoded_options.
2570 2021-02-04 emsr <3dw4rd@verizon.net>
2572 * c-cppbuiltin.c (c_cpp_builtins): __cpp_size_t_suffix=202011L.
2574 2021-02-03 Ed Smith-Rowland <3dw4rd@verizon.net>
2576 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_size_t_suffix.
2577 * c-lex.c (interpret_integer): Set node type for size literal.
2579 2021-01-28 Jakub Jelinek <jakub@redhat.com>
2581 * c.opt (-std=c++2a, -std=c++20, -std=gnu++2a, -std=gnu++20): Remove
2582 draft from description.
2583 (-std=c++2b): Fix a pasto, 2020 -> 2023.
2585 2021-01-26 Paul Fee <paul.f.fee@gmail.com>
2587 * c-common.h (cxx_dialect): Add cxx23 as a dialect.
2588 * c.opt: Add options for -std=c++23, std=c++2b, -std=gnu++23
2590 * c-opts.c (set_std_cxx23): New.
2591 (c_common_handle_option): Set options when -std=c++23 is enabled.
2592 (c_common_post_options): Adjust comments.
2593 (set_std_cxx20): Likewise.
2595 2021-01-25 Martin Sebor <msebor@redhat.com>
2598 * c-common.c (check_nonnull_arg): Adjust warning text.
2600 2021-01-17 Martin Sebor <msebor@redhat.com>
2602 * c-pretty-print.c (c_pretty_printer::primary_expression): Don't
2603 assume SSA_NAME_IDENTIFIER evaluates to nonzero.
2605 2021-01-16 Kwok Cheung Yeung <kcy@codesourcery.com>
2607 * c-pragma.h (pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_DETACH.
2608 Redefine PRAGMA_OACC_CLAUSE_DETACH.
2610 2021-01-15 Jakub Jelinek <jakub@redhat.com>
2612 PR tree-optimization/98597
2613 * c-pretty-print.c: Include options.h.
2614 (c_fold_indirect_ref_for_warn): New function.
2615 (print_mem_ref): Use it. If it returns something that has compatible
2616 type and is TBAA compatible with zero offset, print it and return,
2617 otherwise print it using offsetof syntax or array ref syntax. Fix up
2618 printing if MEM_REFs first operand is ADDR_EXPR, or when the first
2619 argument has pointer to array type. Print pointers using the standard
2622 2021-01-12 Martin Sebor <msebor@redhat.com>
2626 * c-pretty-print.c (print_mem_ref): Avoid assuming MEM_REF operand
2627 has pointer type. Remove redundant code. Avoid calling
2628 gimple_canonical_types_compatible_p.
2630 2021-01-07 Martin Sebor <msebor@redhat.com>
2633 * c-pretty-print.c (print_mem_ref): Strip array from access type.
2634 Avoid assuming acces type's size is constant. Correct condition
2635 guarding the printing of a parenthesis.
2637 2021-01-06 Martin Sebor <msebor@redhat.com>
2640 * c-pretty-print.c (c_pretty_printer::primary_expression): For
2641 SSA_NAMEs print VLA names and GIMPLE defining statements.
2642 (print_mem_ref): New function.
2643 (c_pretty_printer::unary_expression): Call it.
2645 2021-01-06 Richard Biener <rguenther@suse.de>
2647 PR tree-optimization/95582
2648 * c-attribs.c (c_common_attribute_table): Add entry for
2649 signed_bool_precision.
2650 (handle_signed_bool_precision_attribute): New.
2652 2020-12-24 Iain Sandoe <iain@sandoe.co.uk>
2654 * c.opt: Add -stdlib= option and enumerations for
2655 libstdc++ and libc++.
2657 2020-12-16 Martin Liska <mliska@suse.cz>
2659 * c.opt: Remove usage of Report.
2661 2020-12-14 Martin Sebor <msebor@redhat.com>
2666 * c-attribs.c (maybe_add_noinline): New function.
2667 (handle_malloc_attribute): Call it. Use ATTR_FLAG_INTERNAL.
2668 Implicitly add attribute noinline to functions not declared inline
2671 2020-12-09 Tobias Burnus <tobias@codesourcery.com>
2673 * c-pragma.c (omp_pragmas): Add 'allocate'.
2674 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_ALLOCATE.
2676 2020-12-08 Jakub Jelinek <jakub@redhat.com>
2679 * c-pragma.c (omp_pragmas): Remove "master".
2680 (omp_pragmas_simd): Add "master".
2682 2020-12-07 Marek Polacek <polacek@redhat.com>
2685 * c-common.c (verify_tree_lim_r): New function.
2686 (verify_sequence_points): Use it. Use nullptr instead of 0.
2688 2020-12-03 Martin Sebor <msebor@redhat.com>
2692 * c-attribs.c (handle_dealloc_attribute): New function.
2693 (handle_malloc_attribute): Handle argument forms of attribute.
2694 * c.opt (-Wmismatched-dealloc): New option.
2695 (-Wmismatched-new-delete): New option.
2697 2020-12-03 Jakub Jelinek <jakub@redhat.com>
2700 * c-common.h (enum rid): Add RID_BUILTIN_BIT_CAST.
2701 * c-common.c (c_common_reswords): Add __builtin_bit_cast.
2703 2020-12-01 JeanHeyd Meneide <phdofthehouse@gmail.com>
2705 * c-cppbuiltin.c (c_cpp_builtins): Add predefined
2706 {__GNUC_EXECUTION_CHARSET_NAME} and
2707 _WIDE_EXECUTION_CHARSET_NAME} macros.
2709 2020-12-01 Nathan Sidwell <nathan@acm.org>
2711 * c-common.c (module, import, export): New internal tokens (with
2713 * c-common.h (RID__MODULE, RID__IMPORT & RID__EXPORT): Enumerate
2715 (D_CXX_MODULES, D_CXX_MODULES_FLAGS): Enable them.
2716 * c-cppbuiltin.c (c_cpp_builtins): Feature macro.
2718 2020-12-01 Nathan Sidwell <nathan@acm.org>
2720 * c-opts.c (c_common_init_options): Ask for module dependencies.
2721 (c_common_handle_option): Handle -Mmodules -Mno-modules.
2722 * c-pch.c (c_common_valid_pch): ... does not play with C++
2724 * c.opt (Mmodules, Mno-modules): New preprocessor dependency
2726 (fmodules-ts, fmodule-header, fmodule-implicit-inline)
2727 (fmodule-only, fmodule-mapper, fmodule-lazy)
2728 (fmodule-version-ignore, Winvalid-imported-macros)
2729 (flang-info-include-translate, flang-info-include-translate-not):
2732 2020-11-28 Eric Botcazou <ebotcazou@adacore.com>
2734 * c-ada-spec.c (dump_nested_type) <RECORD_TYPE>: Remove obsolete code.
2735 (dump_ada_structure): Also deal with convention, unchecked union and
2736 bit-field for nested types. In the latter case, print an Alignment
2737 aspect along with the Pack aspect.
2739 2020-11-25 Martin Sebor <msebor@redhat.com>
2742 * c-attribs.c (handle_patchable_function_entry_attribute): Avoid
2745 2020-11-24 Martin Sebor <msebor@redhat.com>
2747 * c-warn.c (warn_parm_array_mismatch): Avoid invalid redeclarations.
2749 2020-11-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
2751 * c-attribs.c (handle_special_var_sec_attribute): New.
2752 (handle_noinit_attribute): Remove.
2753 (attr_noinit_exclusions): Rename to...
2754 (attr_section_exclusions): ...this, and add "persistent" attribute
2756 (c_common_attribute_table): Add "persistent" attribute.
2758 2020-11-21 Aaron Sawdey <acsawdey@linux.ibm.com>
2760 * c-pretty-print.c (c_pretty_printer::simple_type_specifier):
2761 Treat opaque types like other types.
2762 (c_pretty_printer::direct_abstract_declarator): Opaque types are
2765 2020-11-20 Martin Sebor <msebor@redhat.com>
2767 * c-warn.c (warn_parm_array_mismatch): Bail on invalid redeclarations
2768 with fewer arguments.
2770 2020-11-20 Martin Sebor <msebor@redhat.com>
2773 * c-attribs.c (handle_access_attribute): Handle ATTR_FLAG_INTERNAL.
2774 Error out on invalid modes.
2776 2020-11-20 Jakub Jelinek <jakub@redhat.com>
2779 * c-common.c (check_builtin_function_arguments): Handle
2780 BUILT_IN_CLEAR_PADDING.
2782 2020-11-18 Nathan Sidwell <nathan@acm.org>
2784 * c-lex.c (c_lex_with_flags): CPP_HEADER_NAMEs can now be seen.
2786 2020-11-17 Nathan Sidwell <nathan@acm.org>
2788 * c-common.h (enum c_tree_index): Reorder to place lazy fields
2789 after newly-added CTI_MODULE_HWM.
2791 2020-11-17 Joseph Myers <joseph@codesourcery.com>
2793 * c-cppbuiltin.c (builtin_define_float_constants): Define
2794 "*_IS_IEC_60559__" macros.
2796 2020-11-17 Nathan Sidwell <nathan@acm.org>
2798 * c-lex.c: #include "langhooks.h".
2799 (cb_undef): Maybe call preprocess_undef lang hook.
2800 * c-opts.c (c_common_post_options): Maybe call preprocess_options
2802 (push_command_line_include): Maybe call preprocess_main_file lang
2804 (cb_file_change): Likewise.
2805 * c-ppoutput.c: #include "langhooks.h.
2806 (scan_translation_unit): Maybe call preprocess_token lang hook.
2807 (class do_streamer): New, derive from token_streamer.
2808 (directives_only_cb): Data pointer is do_streamer, call
2809 preprocess_token lang hook.
2810 (scan_translation_unit_directives_only): Use do_streamer.
2811 (print_line_1): Move src_line recording to after string output.
2812 (cb_undef): Maybe call preprocess_undef lang hook.
2814 2020-11-17 Nathan Sidwell <nathan@acm.org>
2816 * c-ppoutput.c (scan_translation_unit): Use token_streamer, remove
2817 code duplicating that functionality.
2819 2020-11-17 Jakub Jelinek <jakub@redhat.com>
2822 * c-common.c (check_builtin_function_arguments)
2823 <case BUILT_IN_ADD_OVERFLOW>: Diagnose when last argument is pointer
2824 to _Atomic. For the TYPE_READONLY case, adjust message to be usable
2825 for more builtins and argument positions.
2827 2020-11-16 Iain Sandoe <iain@sandoe.co.uk>
2830 * stub-objc.c: Include c-common.h to declare enum rid.
2832 2020-11-13 Jakub Jelinek <jakub@redhat.com>
2835 * c-cppbuiltin.c: Include configargs.h.
2836 (c_cpp_builtins): For C++11 and later if THREAD_MODEL_SPEC is not
2837 defined, predefine __STDCPP_THREADS__ to 1 unless thread_model is
2840 2020-11-13 Gergö Barany <gergo@codesourcery.com>
2841 Thomas Schwinge <thomas@codesourcery.com>
2843 * c.opt (fopenacc-kernels): Add.
2845 2020-11-13 Jason Merrill <jason@redhat.com>
2847 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_using_enum.
2849 2020-11-13 Piotr H. Dabrowski <phd@phd.re>
2852 * c-cppbuiltin.c: c_cpp_builtins_optimize_pragma(): use cpp_define_unused()
2854 2020-11-13 Martin Liska <mliska@suse.cz>
2856 * c-attribs.c (build_attr_access_from_parms): Format properly.
2858 2020-11-13 Iain Sandoe <iain@sandoe.co.uk>
2861 * c-common.c (c_common_reswords): null_unspecified, nullable,
2862 nonnull, null_resettable: New keywords.
2863 * c-common.h (enum rid): RID_NULL_UNSPECIFIED, RID_NULLABLE,
2864 RID_NONNULL, RID_NULL_RESETTABLE: New.
2865 (OBJC_IS_PATTR_KEYWORD): Include nullability keywords in the
2866 ranges accepted for property attributes.
2867 * c-attribs.c (handle_objc_nullability_attribute): New.
2868 * c-objc.h (enum objc_property_attribute_group): Add
2869 OBJC_PROPATTR_GROUP_NULLABLE.
2870 (enum objc_property_attribute_kind):Add
2871 OBJC_PROPERTY_ATTR_NULL_UNSPECIFIED, OBJC_PROPERTY_ATTR_NULLABLE,
2872 OBJC_PROPERTY_ATTR_NONNULL, OBJC_PROPERTY_ATTR_NULL_RESETTABLE.
2874 2020-11-13 Iain Sandoe <iain@sandoe.co.uk>
2877 * c-attribs.c (handle_objc_root_class_attribute): New
2878 * c-objc.h (objc_start_class_interface): Add a location
2879 value for the position of the class name.
2880 * c.opt: Add Wobjc-root-class.
2881 * stub-objc.c (objc_start_class_interface): Add a location
2882 value for the position of the class name.
2884 2020-11-12 Joseph Myers <joseph@codesourcery.com>
2886 * c-lex.c (c_common_has_attribute): Take argument std_syntax.
2887 Allow scope for C. Handle standard attributes for C. Do not
2888 accept unscoped attributes if std_syntax and not handled as
2889 standard attributes.
2890 * c-common.h (c_common_has_attribute): Update prototype.
2892 2020-11-12 Nicholas Guriev <guriev-ns@ya.ru>
2895 * c-pch.c (c_common_valid_pch): Use cpp_warning with CPP_W_INVALID_PCH
2896 reason to fix -Werror=invalid-pch and -Wno-error=invalid-pch switches.
2898 2020-11-11 Patrick Palka <ppalka@redhat.com>
2901 * c-opts.c (c_common_post_options): Update latest_abi_version.
2903 2020-11-10 Jakub Jelinek <jakub@redhat.com>
2906 * c-common.h (warn_if_unused_value): Add quiet argument defaulted
2908 * c-warn.c (warn_if_unused_value): Likewise. Pass it down
2909 recursively and just return true instead of warning if it is true.
2910 Handle COMPLEX_EXPR.
2912 2020-11-10 Chung-Lin Tang <cltang@codesourcery.com>
2914 * c-common.h (c_omp_adjust_map_clauses): New declaration.
2915 * c-omp.c (struct map_clause): Helper type for c_omp_adjust_map_clauses.
2916 (c_omp_adjust_map_clauses): New function.
2918 2020-11-09 Marek Polacek <polacek@redhat.com>
2921 * c-common.c (attribute_fallthrough_p): Tweak the warning
2924 2020-11-09 Patrick Palka <ppalka@redhat.com>
2926 * c-pragma.c (handle_pragma_diagnostic): Split the
2927 unknown-option -Wpragmas diagnostic into a warning and a
2928 subsequent note containing a spelling suggestion. Avoid
2929 computing the suggestion if -Wpragmas warnings are being
2932 2020-11-09 Patrick Palka <ppalka@redhat.com>
2935 * c-indentation.c (get_visual_column): Remove location_t
2936 parameter. Move the column-tracking diagnostic code from here
2938 (should_warn_for_misleading_indentation): ... here, before the
2939 early exit for when the loci are not all distinct. Don't pass a
2940 location_t argument to get_visual_column.
2941 (assert_get_visual_column_succeeds): Don't pass a location_t
2942 argument to get_visual_column.
2943 (assert_get_visual_column_fails): Likewise.
2945 2020-11-08 Iain Sandoe <iain@sandoe.co.uk>
2947 * c-common.h (OBJC_IS_PATTR_KEYWORD): Add class to the list
2948 of keywords accepted in @property attribute contexts.
2949 * c-objc.h (enum objc_property_attribute_group): Add
2950 OBJC_PROPATTR_GROUP_CLASS.
2951 (enum objc_property_attribute_kind): Add
2952 OBJC_PROPERTY_ATTR_CLASS.
2954 2020-11-07 Iain Sandoe <iain@sandoe.co.uk>
2956 * c-common.c (c_common_reswords): Add 'atomic' property
2958 * c-common.h (enum rid): Add RID_PROPATOMIC for atomic
2959 property attributes.
2961 2020-11-07 Iain Sandoe <iain@sandoe.co.uk>
2963 * c-attribs.c (handle_nsobject_attribute): New.
2964 * c.opt: Add WNSObject-attribute.
2966 2020-11-06 Iain Sandoe <iain@sandoe.co.uk>
2968 * c-objc.h (enum objc_property_attribute_group): New
2969 (enum objc_property_attribute_kind): New.
2970 (OBJC_PROPATTR_GROUP_MASK): New.
2971 (struct property_attribute_info): Small class encapsulating
2972 parser output from property attributes.
2973 (objc_prop_attr_kind_for_rid): New
2974 (objc_add_property_declaration): Simplify interface.
2975 * stub-objc.c (enum rid): Dummy type.
2976 (objc_add_property_declaration): Simplify interface.
2977 (objc_prop_attr_kind_for_rid): New.
2979 2020-11-06 Nathan Sidwell <nathan@acm.org>
2981 * c-ada-spec.c (collect_ada_nodes): Rename
2982 DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
2983 (collect_ada_node): Likewise.
2984 (dump_forward_type): Likewise.
2985 * c-common.c (set_underlying_type): Rename
2986 DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
2987 (user_facing_original_type, c_common_finalize_early_debug): Likewise.
2989 2020-11-06 Jakub Jelinek <jakub@redhat.com>
2991 * c-common.c (verify_sequence_points): Remove DEBUG_FUNCTION.
2993 2020-11-05 Marek Polacek <polacek@redhat.com>
2996 * c.opt (Wexceptions): New option.
2998 2020-11-05 Marek Polacek <polacek@redhat.com>
3001 * c.opt (Wvexing-parse): New option.
3003 2020-11-04 Jakub Jelinek <jakub@redhat.com>
3006 * c-omp.c (c_omp_split_clauses): Look through array reductions to find
3007 underlying decl to clear in the allocate_head bitmap.
3009 2020-11-04 Iain Sandoe <iain@sandoe.co.uk>
3011 * c-objc.h (objc_non_constant_expr_p): New.
3012 * stub-objc.c (objc_non_constant_expr_p): New.
3014 2020-11-03 Nathan Sidwell <nathan@acm.org>
3016 * c.opt (MQ,MT): Reword description to be make-agnostic.
3018 2020-11-02 Nathan Sidwell <nathan@acm.org>
3020 * c-opts.c (c_common_post_options): Move var decl to its
3021 initialization point.
3023 2020-11-01 Iain Sandoe <iain@sandoe.co.uk>
3025 * c-lex.c (c_lex_with_flags): When combining '@' with a
3026 keyword for Objective-C, combine the location ranges too.
3028 2020-10-30 Qing Zhao <qing.zhao@oracle.com>
3029 H.J.Lu <hjl.tools@gmail.com>
3031 * c-attribs.c (c_common_attribute_table): Add new attribute
3032 zero_call_used_regs.
3033 (handle_zero_call_used_regs_attribute): New function.
3035 2020-10-28 Marek Polacek <polacek@redhat.com>
3038 * c-opts.c (c_common_post_options): In C++20, turn on
3039 -Wdeprecated-enum-enum-conversion and
3040 -Wdeprecated-enum-float-conversion.
3041 * c.opt (Wdeprecated-enum-enum-conversion,
3042 Wdeprecated-enum-float-conversion): New options.
3043 (Wenum-conversion): Allow for C++ too.
3045 2020-10-28 Jakub Jelinek <jakub@redhat.com>
3047 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ALLOCATE.
3048 * c-omp.c: Include bitmap.h.
3049 (c_omp_split_clauses): Handle OMP_CLAUSE_ALLOCATE.
3051 2020-10-26 Ville Voutilainen <ville.voutilainen@gmail.com>
3053 * c-common.c (__is_nothrow_assignable): New.
3054 (__is_nothrow_constructible): Likewise.
3055 * c-common.h (RID_IS_NOTHROW_ASSIGNABLE): New.
3056 (RID_IS_NOTHROW_CONSTRUCTIBLE): Likewise.
3058 2020-10-23 Jan Hubicka <hubicka@ucw.cz>
3060 * c-common.c (c_common_finalize_early_debug): Update for new thunk api.
3062 2020-10-23 Marek Polacek <polacek@redhat.com>
3065 * c-common.c (verify_tree): Handle PAREN_SIZEOF_EXPR.
3066 (c_common_init_ts): Likewise.
3067 * c-common.def (PAREN_SIZEOF_EXPR): New tree code.
3068 * c-common.h (maybe_warn_sizeof_array_div): Declare.
3069 * c-warn.c (sizeof_pointer_memaccess_warning): Unwrap NOP_EXPRs.
3070 (maybe_warn_sizeof_array_div): New function.
3071 * c.opt (Wsizeof-array-div): New option.
3073 2020-10-23 Martin Sebor <msebor@redhat.com>
3076 * c-warn.c (warn_parm_ptrarray_mismatch): Move null test earlier.
3078 2020-10-22 Martin Liska <mliska@suse.cz>
3081 * c-attribs.c (handle_no_stack_protect_function_attribute): New.
3082 (handle_stack_protect_attribute): Add error message for a
3083 no_stack_protector function.
3085 2020-10-22 Martin Liska <mliska@suse.cz>
3087 * c-cppbuiltin.c (c_cpp_builtins): Use the stack_protector enum.
3089 2020-10-22 Jan Hubicka <hubicka@ucw.cz>
3091 * c-gimplify.c: Include tree-nested.h
3092 (c_genericize): Update for new nested function info.
3094 2020-10-14 Martin Sebor <msebor@redhat.com>
3097 * c-attribs.c (build_attr_access_from_parms): Wrap chain of VLA
3098 bounds in an extra list.
3100 2020-10-05 Richard Biener <rguenther@suse.de>
3101 Jakub Jelinek <jakub@redhat.com>
3104 * c-pretty-print.c: Include langhooks.h.
3105 (c_pretty_printer::postfix_expression): Handle TARGET_MEM_REF as
3107 (c_pretty_printer::expression): Handle TARGET_MEM_REF as
3109 (c_pretty_printer::unary_expression): Handle TARGET_MEM_REF.
3111 2020-09-30 Martin Sebor <msebor@redhat.com>
3114 * c-attribs.c (append_access_attr): Use the function declaration
3115 location for a warning about an attribute access argument.
3117 2020-09-29 Marek Polacek <polacek@redhat.com>
3120 * c.opt (Wrange-loop-construct): New option.
3122 2020-09-23 Martin Sebor <msebor@redhat.com>
3125 * c-warn.c (warn_parm_ptrarray_mismatch): Handle more invalid input.
3127 2020-09-23 Marek Polacek <polacek@redhat.com>
3130 * c-gimplify.c (c_genericize): Only call do_warn_duplicated_branches_r
3131 after loops and other structured control constructs have been lowered.
3133 2020-09-22 Jakub Jelinek <jakub@redhat.com>
3135 * c.opt (Wbuiltin-declaration-mismatch): Fix typo in variable name:
3136 warn_builtin_declaraion_mismatch -> warn_builtin_declaration_mismatch.
3138 2020-09-21 Marek Polacek <polacek@redhat.com>
3140 * c.opt (Wctad-maybe-unsupported): New option.
3142 2020-09-19 Martin Sebor <msebor@redhat.com>
3145 * c-common.h (warn_parm_array_mismatch): Declare new function.
3146 (has_attribute): Move declaration of an existing function.
3147 (build_attr_access_from_parms): Declare new function.
3148 * c-warn.c (parm_array_as_string): Define new function.
3149 (plus_one): Define new function.
3150 (warn_parm_ptrarray_mismatch): Define new function.
3151 (warn_parm_array_mismatch): Define new function.
3152 (vla_bound_parm_decl): New function.
3153 * c.opt (-Warray-parameter, -Wvla-parameter): New options.
3154 * c-pretty-print.c (pp_c_type_qualifier_list): Don't print array type
3156 (c_pretty_printer::direct_abstract_declarator): ...but instead print
3157 them in brackets here. Also print [static]. Strip extraneous
3158 expressions from VLA bounds.
3160 2020-09-19 Martin Sebor <msebor@redhat.com>
3163 * c-attribs.c (c_common_attribute_table): Add "arg spec" attribute.
3164 (handle_argspec_attribute): New function.
3165 (get_argument, get_argument_type): New functions.
3166 (append_access_attrs): Add overload. Handle internal attribute
3167 representation in addition to external.
3168 (handle_access_attribute): Handle internal attribute representation
3169 in addition to external.
3170 (build_attr_access_from_parms): New function.
3172 2020-09-19 Sandra Loosemore <sandra@codesourcery.com>
3174 * c-gimplify.c (genericize_c_loop): Rewrite to match
3175 c_finish_loop in c-typeck.c.
3177 2020-09-19 Sandra Loosemore <sandra@codesourcery.com>
3179 * c-common.c (c_block_may_fallthrough): New, split from
3180 cxx_block_may_fallthrough in the cp front end.
3181 (c_common_init_ts): Move handling of loop and switch-related
3182 statements here from the cp front end.
3183 * c-common.def (FOR_STMT, WHILE_STMT, DO_STMT): Move here from
3185 (BREAK_STMT, CONTINUE_STMT, SWITCH_STMT): Likewise.
3186 * c-common.h (c_block_may_fallthru): Declare.
3187 (bc_state_t): Move here from cp front end.
3188 (save_bc_state, restore_bc_state): Declare.
3189 (c_genericize_control_stmt): Declare.
3190 (WHILE_COND, WHILE_BODY): Likewise.
3191 (DO_COND, DO_BODY): Likewise.
3192 (FOR_INIT_STMT, FOR_COND, FOR_EXPR, FOR_BODY, FOR_SCOPE): Likewise.
3193 (SWITCH_STMT_COND, SWITCH_STMT_BODY): Likewise.
3194 (SWITCH_STMT_TYPE, SWITCH_STMT_SCOPE): Likewise.
3195 (SWITCH_STMT_ALL_CASES_P, SWITCH_STMT_NO_BREAK_P): Likewise.
3196 (LABEL_DECL_BREAK, LABEL_DECL_CONTINUE): Likewise.
3197 * c-dump.c (dump_stmt): Copy from cp front end.
3198 (c_dump_tree): Move code to handle structured loop and switch
3199 tree nodes here from cp front end.
3200 * c-gimplify.c: Adjust includes.
3201 (enum bc_t, bc_label, begin_bc_block, finish_bc_block): Move from
3203 (save_bc_state, restore_bc_state): New functions using old code
3205 (get_bc_label, expr_loc_or_loc): Move from cp front end.
3206 (genericize_c_loop): Move from cp front end.
3207 (genericize_for_stmt, genericize_while_stmt): Likewise.
3208 (genericize_do_stmt, genericize_switch_stmt): Likewise.
3209 (genericize_continue_stmt, genericize_break_stmt): Likewise.
3210 (genericize_omp_for_stmt): Likewise.
3211 (c_genericize_control_stmt): New function using code split from
3213 (c_genericize_control_r): New.
3214 (c_genericize): Call walk_tree with c_genericize_control_r.
3215 * c-pretty-print.c (c_pretty_printer::statement): Move code to handle
3216 structured loop and switch tree nodes here from cp front end.
3218 2020-09-17 Patrick Palka <ppalka@redhat.com>
3221 * c-indentation.c (should_warn_for_misleading_indentation): Move
3222 declarations of local variables closer to their first use.
3223 Handle virtual token locations by resolving them to their
3224 respective macro expansion points. If all three tokens are
3225 produced from the same macro expansion, then instead use their
3226 loci within the macro definition.
3228 2020-09-16 Martin Sebor <msebor@redhat.com>
3232 * c-attribs.c (validate_attr_args): New function.
3233 (validate_attr_arg): Same.
3234 (handle_section_attribute): Call it. Introduce a local variable.
3235 (handle_alloc_size_attribute): Same.
3236 (handle_alloc_align_attribute): Same.
3238 2020-09-14 Jakub Jelinek <jakub@redhat.com>
3240 * c-attribs.c (handle_optimize_attribute): Adjust
3241 cl_optimization_save, cl_optimization_restore and
3242 build_optimization_node callers.
3243 * c-pragma.c (handle_pragma_optimize): Adjust
3244 build_optimization_node caller.
3245 (handle_pragma_push_options): Adjust
3246 build_optimization_node and build_target_option_node callers.
3247 (handle_pragma_pop_options, handle_pragma_reset_options):
3248 Adjust cl_optimization_restore callers.
3250 2020-08-28 Martin Sebor <msebor@redhat.com>
3252 * c.opt (Wstringop-overread): New option.
3254 2020-08-11 Jakub Jelinek <jakub@redhat.com>
3257 * c-common.c (get_atomic_generic_size): Require that first argument's
3258 type points to a complete type and use tree_fits_uhwi_p instead of
3259 just INTEGER_CST TREE_CODE check for the TYPE_SIZE_UNIT.
3261 2020-07-31 Martin Sebor <msebor@redhat.com>
3264 * c-common.c (check_function_arguments_recurse): Return early when
3265 no-warning bit is set.
3267 2020-07-31 Richard Biener <rguenther@suse.de>
3270 * c-common.h (c_common_finalize_early_debug): Declare.
3271 * c-common.c: Include debug.h.
3272 (c_common_finalize_early_debug): finalize_early_debug langhook
3273 implementation generating debug for extern declarations.
3275 2020-07-27 Nathan Sidwell <nathan@acm.org>
3277 * c-common.c (try_to_locate_new_include_insertion_point): Use
3278 strcmp, not pointer equality.
3280 2020-07-25 Martin Sebor <msebor@redhat.com>
3283 * c-common.c (check_nonnull_arg): Print note only when warning was
3286 2020-07-22 Tobias Burnus <tobias@codesourcery.com>
3288 * c-omp.c (c_finish_omp_critical): Check for no name but
3289 nonzero hint provided.
3291 2020-07-20 Jason Merrill <jason@redhat.com>
3293 * c-cppbuiltin.c (c_cpp_builtins): Update
3294 __cpp_nontype_template_args for C++20.
3296 2020-07-20 Martin Sebor <msebor@redhat.com>
3299 * c.opt: Remove stray text.
3301 2020-07-14 Lewis Hyatt <lhyatt@gmail.com>
3304 * c-indentation.c (should_warn_for_misleading_indentation): Get
3305 global tabstop from the new source.
3306 * c-opts.c (c_common_handle_option): Remove handling of -ftabstop, which
3307 is now a common option.
3310 2020-07-08 Eric Botcazou <ebotcazou@adacore.com>
3312 * c.opt (Wscalar-storage-order): Add explicit variable.
3314 2020-07-07 Nathan Sidwell <nathan@acm.org>
3316 * c-opts.c (c_common_post_options): Add 'injecting' arg to
3318 (c_finish_options): Add linemap_line_start calls for builtin and cmd
3319 maps. Force token position to line_table's highest line.
3320 * c-ppoutput.c (print_line_1): Refactor, print line zero.
3321 (cb_define): Always increment source line.
3323 2020-07-06 Martin Sebor <msebor@redhat.com>
3326 * c-common.c (check_function_nonnull): Avoid checking syntesized calls
3327 to stub lambda objects with null this pointer.
3328 (check_nonnull_arg): Handle C++ nullptr.
3330 2020-07-02 Jason Merrill <jason@redhat.com>
3331 Jakub Jelinek <jakub@redhat.com>
3333 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_consteval.
3335 2020-06-30 Jakub Jelinek <jakub@redhat.com>
3338 * c-common.c (check_function_arguments_recurse): Don't crash on
3339 calls to internal functions.
3341 2020-06-28 Martin Sebor <msebor@redhat.com>
3344 * c-common.c (struct nonnull_arg_ctx): Add members.
3345 (check_function_nonnull): Use nonnull_arg_ctx as argument. Handle
3346 C++ member functions specially. Consider the this pointer implicitly
3348 (check_nonnull_arg): Use location of argument when available.
3349 (check_function_arguments): Use nonnull_arg_ctx as argument.
3351 2020-06-27 Jakub Jelinek <jakub@redhat.com>
3354 * c-common.c (pointer_int_sum): Use TYPE_OVERFLOW_UNDEFINED instead of
3355 !TYPE_UNSIGNED check to see if we can apply distributive law and handle
3356 smaller precision intop operands separately.
3358 2020-06-26 Marek Polacek <polacek@redhat.com>
3360 * c-opts.c (c_common_init_options): Default to gnu++17.
3362 2020-06-17 Jonathan Wakely <jwakely@redhat.com>
3365 * c-common.c (get_atomic_generic_size): Check cv-qualifiers in
3368 2020-06-16 Jakub Jelinek <jakub@redhat.com>
3370 * c-common.h (c_omp_check_loop_iv_exprs): Add an int argument.
3371 * c-omp.c (struct c_omp_check_loop_iv_data): Add maybe_nonrect and
3373 (c_omp_is_loop_iterator): New function.
3374 (c_omp_check_loop_iv_r): Use it. Add support for silent scanning
3375 if outer loop iterator is present. Perform duplicate checking through
3376 hash_set in the function rather than expecting caller to do that.
3377 Pass NULL instead of d->ppset to walk_tree_1.
3378 (c_omp_check_nonrect_loop_iv): New function.
3379 (c_omp_check_loop_iv): Use it. Fill in new members, allow
3380 non-rectangular loop forms, diagnose multiple associated loops with
3381 the same iterator. Pass NULL instead of &pset to walk_tree_1.
3382 (c_omp_check_loop_iv_exprs): Likewise.
3384 2020-06-10 Martin Liska <mliska@suse.cz>
3386 PR tree-optimization/92860
3387 * c-attribs.c (handle_optimize_attribute):
3388 Save global options and compare it after parsing of function
3390 * c-pragma.c (opt_stack::saved_global_options): New field.
3391 (handle_pragma_push_options): Save global_options.
3392 (handle_pragma_pop_options): Compare them after pop.
3394 2020-06-09 Jakub Jelinek <jakub@redhat.com>
3397 * c-pretty-print.c (c_pretty_printer::unary_expression): Handle the
3398 case when MEM_REF's first argument has type pointer to incomplete type.
3400 2020-06-05 Jason Merrill <jason@redhat.com>
3402 * c-pretty-print.c (pp_c_additive_expression): Handle negative
3403 operand to POINTER_PLUS_EXPR.
3405 2020-06-04 Martin Sebor <msebor@redhat.com>
3409 * c-attribs.c (append_access_attrs): Handle attr_access::none.
3410 (handle_access_attribute): Same.
3412 2020-06-03 Mark Wielaard <mark@klomp.org>
3414 * known-headers.cc (get_cp_stdlib_header_for_string_macro_name):
3416 * known-headers.h (get_cp_stdlib_header_for_string_macro_name):
3417 New function declaration.
3419 2020-06-03 Mark Wielaard <mark@klomp.org>
3421 * known-headers.cc (get_string_macro_hint): New function.
3422 (get_stdlib_header_for_name): Use get_string_macro_hint.
3423 (get_c_stdlib_header_for_string_macro_name): New function.
3424 * known-headers.h (get_c_stdlib_header_for_string_macro_name):
3425 New function declaration.
3427 2020-06-03 Tobias Burnus <tobias@codesourcery.com>
3429 * c-common.h (c_omp_predetermined_mapping): Declare.
3430 * c-omp.c (c_omp_predetermined_mapping): New.
3432 2020-05-22 Mark Wielaard <mark@klomp.org>
3434 * known-headers.cc (get_stdlib_header_for_name): Add a new
3435 stdlib_hint array for stdbool and stdint.
3437 2020-05-22 Mark Wielaard <mark@klomp.org>
3439 * known-headers.cc (get_stdlib_header_for_name): Return
3440 "<stdbool.h>" for "bool", "true" or "false" when STDLIB_C and
3443 2020-05-20 Nathan Sidwell <nathan@acm.org>
3445 * c-common.c (try_to_locate_new_include_insertion_point): Revert change.
3447 * c-common.c (try_to_locate_new_include_insertion_point): Use
3448 strcmp to compare filenames.
3449 * c-lex.c (init_c_lex): Move declaration to initialization.
3450 * c-opts.c (handle_deferred_opts): Move cpp_get_deps call into
3451 deferred count loop.
3453 2020-05-15 Jason Merrill <jason@redhat.com>
3455 * c-opts.c (set_std_cxx20): Set flag_coroutines.
3457 2020-05-13 Jason Merrill <jason@redhat.com>
3459 * c.opt (std=c++20): Make c++2a the alias.
3460 (std=gnu++20): Likewise.
3461 * c-common.h (cxx_dialect): Change cxx2a to cxx20.
3463 * c-cppbuiltin.c: Adjust.
3464 * c-ubsan.c: Adjust.
3467 2020-05-12 Eric Botcazou <ebotcazou@adacore.com>
3469 * c-ada-spec.c (dump_ads): Output pragma Warnings ("U"); on entry.
3471 2020-05-08 Nathan Sidwell <nathan@acm.org>
3473 Reimplement directives only processing.
3474 * c-ppoutput.c (token_streamer): Ne.
3475 (directives_only_cb): New. Swallow ...
3476 (print_lines_directives_only): ... this.
3477 (scan_translation_unit_directives_only): Reimplment using the
3478 published interface.
3480 2020-05-07 Marek Polacek <polacek@redhat.com>
3482 * c-format.c (badwords): Add "nonstatic".
3484 202-05-07 Jakub Jelinek <jakub@redhat.com>
3487 * c-common.c (speculation_safe_value_resolve_params): Return false if
3488 error_operand_p (val2).
3489 (resolve_overloaded_builtin) <case BUILT_IN_SPECULATION_SAFE_VALUE_N>:
3490 Remove extraneous semicolon.
3492 2020-05-06 qing zhao <qing.zhao@oracle.com>
3495 * c-indentation.c (get_visual_column): Add a hint to use the new
3496 -flarge-source-files option.
3498 2020-05-05 Stefan Schulze Frielinghaus <stefansf@linux.ibm.com>
3500 * c-attribs.c (handle_vector_size_attribute): Add attribute
3501 nonnull for argument args in order to silence warning of
3502 uninitialized variable usage. Since this is local to the
3503 compilation unit and thus cannot be checked at call sides by the
3504 compiler, added an assert statement in order to verify this.
3506 2020-05-01 H.J. Lu <hongjiu.lu@intel.com>
3509 * c-attribs.c (handle_patchable_function_entry_attribute): Limit
3510 value to USHRT_MAX (65535).
3512 2020-04-29 Jakub Jelinek <jakub@redhat.com>
3514 * c-format.c (PP_FORMAT_CHAR_TABLE): Add %{ and %}.
3516 2020-04-27 Jakub Jelinek <jakub@redhat.com>
3519 * c-common.c (resolve_overloaded_builtin): Return error_mark_node for
3520 fncode == BUILT_IN_NONE before initialization of first_param.
3522 2020-04-23 Marek Polacek <polacek@redhat.com>
3525 * c-attribs.c (find_tm_attribute): Use get_attribute_name instead of
3528 2020-04-14 Patrick Palka <ppalka@redhat.com>
3531 * c-pretty-print.c (pp_c_pointer) <case REFERENCE_TYPE>: Print a double
3532 ampersand if it's an rvalue reference type.
3534 2020-04-13 Martin Sebor <msebor@redhat.com>
3537 * c-pretty-print.c (c_pretty_printer::direct_abstract_declarator): Avoid
3538 printing array bound for flexible array members.
3540 2020-04-13 Iain Sandoe <iain@sandoe.co.uk>
3542 * c-cppbuiltin.c (c_cpp_builtins): Update coroutines builtin
3545 2020-04-02 Richard Biener <rguenther@suse.de>
3548 * c-opts.c (c_common_post_options): Enable -ffinite-loops
3549 for -O2 and C++11 or newer.
3551 2020-03-28 Patrick Palka <ppalka@redhat.com>
3553 * c.opt: Add -fconcepts-diagnostics-depth.
3555 2020-03-27 Martin Sebor <msebor@redhat.com>
3558 * c-attribs.c (handle_copy_attribute): Avoid passing expressions
3559 to decl_attributes. Make handling of different kinds of entities
3562 2020-03-27 Martin Sebor <msebor@redhat.com>
3565 * c-attribs.c (handle_access_attribute): Avoid setting TYPE_ATTRIBUTES
3568 2020-03-23 Jakub Jelinek <jakub@redhat.com>
3571 * c-warn.c (warnings_for_convert_and_check): For expr and/or
3572 result being COMPOUND_EXPRs, skip to ultimate rhs.
3574 2020-03-20 Richard Sandiford <richard.sandiford@arm.com>
3577 * c-common.c (c_common_type_for_mode): Before using a registered
3578 built-in type, check that the vectorness of the type matches
3579 the vectorness of the mode.
3581 2020-03-17 Jakub Jelinek <jakub@redhat.com>
3583 * c-common.c (resolve_overloaded_builtin): Fix up duplicated word
3584 issue in a diagnostic message.
3586 2020-03-15 Lewis Hyatt <lhyatt@gmail.com>
3588 * c.opt: Avoid redundancy in the help text.
3590 2020-03-02 Marek Polacek <polacek@redhat.com>
3592 PR c++/93958 - add missing -std=gnu++20.
3593 * c.opt: Add -std=gnu++20.
3595 2020-03-01 Martin Sebor <msebor@redhat.com>
3598 * c-attribs.c (append_access_attrs): Correctly handle attribute.
3599 (handle_access_attribute): Same.
3601 2020-02-25 Jakub Jelinek <jakub@redhat.com>
3604 * c-pragma.c (handle_pragma_diagnostic): Add missing ? after
3605 "did you mean" hint in diagnostics.
3607 2020-02-15 Jason Merrill <jason@redhat.com>
3609 * c.opt: Add -std=c++20.
3611 2020-02-14 Eric Botcazou <ebotcazou@adacore.com>
3613 * c-ada-spec.c: Include bitmap.h.
3614 (dump_ada_double_name): Rename into...
3615 (dump_anonymous_type_name): ...this. Always use the TYPE_UID.
3616 (dump_ada_array_type): Adjust to above renaming. Robustify.
3617 (dump_nested_types_1): New function copied from... Add dumped_types
3618 parameter and pass it down to dump_nested_type.
3619 (dump_nested_types): ...this. Remove parent parameter. Just call
3620 dump_nested_types_1 on an automatic bitmap.
3621 (dump_nested_type): Add dumped_types parameter.
3622 <ARRAY_TYPE>: Do not dump it if already present in dumped_types.
3623 Adjust recursive calls and adjust to above renaming.
3624 (dump_ada_declaration): Adjust call to dump_nested_types.
3625 Tidy up and adjust to above renaming.
3626 (dump_ada_specs): Initialize and release bitmap obstack.
3628 2020-02-10 Martin Sebor <msebor@redhat.com>
3631 * c-attribs.c (handle_access_attribute): Correct off-by-one mistakes.
3633 2020-02-10 Jakub Jelinek <jakub@redhat.com>
3636 * c-format.c (check_plain): Fix up last argument of strncasecmp.
3637 Remove useless extra test.
3639 2020-02-03 Julian Brown <julian@codesourcery.com>
3640 Tobias Burnus <tobias@codesourcery.com>
3642 * c-cppbuiltin.c (c_cpp_builtins): Update _OPENACC define to 201711.
3644 2020-01-29 Jason Merrill <jason@redhat.com>
3647 * c-attribs.c (check_cxx_fundamental_alignment_constraints): Remove.
3649 2020-01-23 Jason Merrill <jason@redhat.com>
3651 * c-warn.c (conversion_warning): Change -Wsign-conversion handling.
3653 2020-01-23 Martin Sebor <msebor@redhat.com>
3656 * c-common.c (check_function_arguments): Avoid overlap checking
3657 of sprintf functions.
3659 2020-01-22 Jason Merrill <jason@redhat.com>
3661 PR testsuite/93391 - PR 40752 test fails with unsigned plain char.
3663 * c-warn.c (conversion_warning): Check operands only after checking
3664 the whole expression. Don't check second operand of + for sign.
3666 2020-01-21 Jason Merrill <jason@redhat.com>
3667 Manuel López-Ibáñez <manu@gcc.gnu.org>
3669 PR c++/40752 - useless -Wconversion with short +=.
3670 * c.opt (-Warith-conversion): New.
3671 * c-warn.c (conversion_warning): Recurse for operands of
3672 operators. Only warn about the whole expression with
3675 2020-01-21 Jason Merrill <jason@redhat.com>
3677 * c-common.c (unsafe_conversion_p): Don't warn, return UNSAFE_SIGN.
3678 * c-warn.c (conversion_warning): Warn about UNSAFE_SIGN.
3680 2020-01-20 Nathan Sidwell <nathan@acm.org>
3682 PR preprocessor/80005
3683 * c-cppbuiltins.c (c_cpp_builtins): Don't define __has_include{,_next}.
3685 2020-01-18 Iain Sandoe <iain@sandoe.co.uk>
3687 * c-common.c (co_await, co_yield, co_return): New.
3688 * c-common.h (RID_CO_AWAIT, RID_CO_YIELD,
3689 RID_CO_RETURN): New enumeration values.
3690 (D_CXX_COROUTINES): Bit to identify coroutines are active.
3691 (D_CXX_COROUTINES_FLAGS): Guard for coroutine keywords.
3692 * c-cppbuiltin.c (__cpp_coroutines): New cpp define.
3693 * c.opt (fcoroutines): New command-line switch.
3695 2020-01-10 David Malcolm <dmalcolm@redhat.com>
3697 * c-format.c (local_event_ptr_node): New.
3698 (PP_FORMAT_CHAR_TABLE): Add entry for "%@".
3699 (init_dynamic_diag_info): Initialize local_event_ptr_node.
3700 * c-format.h (T_EVENT_PTR): New define.
3702 2020-01-10 Martin Sebor <msebor@redhat.com>
3705 * c-attribs.c (append_access_attrs): Validate against the translated
3706 access string rather than the human-readable representation.
3708 2020-01-01 Jakub Jelinek <jakub@redhat.com>
3710 Update copyright years.
3712 2019-12-20 Eric Botcazou <ebotcazou@adacore.com>
3714 * c-ada-spec.h (decl_sloc): Delete.
3715 * c-ada-spec.c (decl_sloc): Make static.
3717 2019-12-19 Julian Brown <julian@codesourcery.com>
3719 * c-common.h (c_omp_map_clause_name): Add prototype.
3720 * c-omp.c (c_omp_map_clause_name): New function.
3721 * c-pragma.h (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ATTACH and
3722 PRAGMA_OACC_CLAUSE_DETACH.
3724 2019-12-19 Julian Brown <julian@codesourcery.com>
3725 Maciej W. Rozycki <macro@codesourcery.com>
3726 Tobias Burnus <tobias@codesourcery.com>
3727 Thomas Schwinge <thomas@codesourcery.com>
3729 * c-pragma.h (pragma_omp_clause): Add
3730 PRAGMA_OACC_CLAUSE_NO_CREATE.
3732 2019-12-17 Martin Sebor <msebor@redhat.com>
3735 * c.opt (-Wmismatched-tags, -Wredundant-tags): New options.
3737 2019-12-11 David Malcolm <dmalcolm@redhat.com>
3739 * c-pretty-print.c (c_pretty_printer::clone): New vfunc
3741 * c-pretty-print.h (c_pretty_printer::clone): New vfunc decl.
3743 2019-12-09 David Malcolm <dmalcolm@redhat.com>
3745 * c-format.c (range_label_for_format_type_mismatch::get_text):
3746 Replace label_text ctor called with true with label_text::take.
3748 2019-12-09 David Malcolm <dmalcolm@redhat.com>
3750 * c-format.c (selftest::test_type_mismatch_range_labels): Remove
3751 initial newline from expected outputs.
3752 * c-opts.c (c_diagnostic_finalizer): Add pp_newline call before
3753 call to diagnostic_show_locus.
3755 2019-12-06 Jakub Jelinek <jakub@redhat.com>
3757 * c-cppbuiltin.c (c_cpp_builtins): Don't define __cpp_consteval for
3760 2019-12-05 Marek Polacek <polacek@redhat.com>
3761 Jakub Jelinek <jakub@redhat.com>
3763 PR c++/91353 - P1331R2: Allow trivial default init in constexpr contexts.
3764 * c-cppbuiltin.c (c_cpp_builtins): Adjust the value of __cpp_constexpr.
3766 2019-12-05 Marek Polacek <polacek@redhat.com>
3768 PR c++/92271 - make __is_same alias for __is_same_as.
3769 * c-common.c: Add __is_same, an alias for __is_same_as.
3771 2019-12-03 Marek Polacek <polacek@redhat.com>
3773 PR c++/91363 - P0960R3: Parenthesized initialization of aggregates.
3774 * c-cppbuiltin.c (c_cpp_builtins): Predefine
3775 __cpp_aggregate_paren_init=201902 for -std=c++2a.
3777 2019-11-30 Jan Hubicka <hubicka@ucw.cz>
3779 * c-attribs.c (handle_symver_attribute): New function
3780 (c_common_attributes): Add symver.
3782 2019-11-30 Richard Sandiford <richard.sandiford@arm.com>
3784 * c-common.c (pointer_int_sum): Use verify_type_context to check
3785 whether the target allows pointer arithmetic for the types involved.
3786 (c_sizeof_or_alignof_type, c_alignof_expr): Use verify_type_context
3787 to check whether the target allows sizeof and alignof operations
3788 for the types involved.
3790 2019-11-27 Jason Merrill <jason@redhat.com>
3792 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_deduction_guides.
3794 2019-11-26 Jakub Jelinek <jakub@redhat.com>
3797 * c-attribs.c (handle_mode_attribute): Add mode attribute to
3800 2019-11-25 Joseph Myers <joseph@codesourcery.com>
3803 * c-common.c (c_common_type_for_mode): Handle decimal
3804 floating-point types being NULL_TREE.
3805 * c-format.c (get_format_for_type_1): Handle specified types being
3807 * c-lex.c (interpret_float): Give an error for decimal
3808 floating-point constants when decimal floating-point not
3811 2019-11-23 Jakub Jelinek <jakub@redhat.com>
3814 * c-attribs.c (append_access_attrs): Avoid buffer overflow. Avoid
3815 memory leak. Use XNEWVEC macro. Use auto_diagnostic_group to
3816 group warning with inform together.
3817 (handle_access_attribute): Formatting fix.
3819 2019-11-22 Jakub Jelinek <jakub@redhat.com>
3822 * c-common.h (identifier_global_tag): Declare.
3823 * c-format.c (get_pointer_to_named_type): Renamed to ...
3824 (get_named_type): ... this. Use identifier_global_tag instead of
3825 identifier_global_value, handle the return value being a TYPE_P.
3826 (init_dynamic_diag_info): Adjust get_pointer_to_named_type callers
3827 to call get_named_type instead. Formatting fixes.
3829 Implement P1902R1, Missing feature-test macros 2017-2019.
3830 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_init_captures
3831 and __cpp_generic_lambdas for -std=c++2a. Define
3832 __cpp_designated_initializers, __cpp_constexpr_in_decltype and
3833 __cpp_consteval for -std=c++2a. Remove a FIXME comment about
3834 __cpp_concepts for -std=c++2a.
3836 2019-11-22 Martin Sebor <msebor@redhat.com>
3839 * c-attribs.c (handle_access_attribute): New function.
3840 (c_common_attribute_table): Add new attribute.
3841 (get_argument_type): New function.
3842 (append_access_attrs): New function.
3843 (get_nonnull_operand): Rename...
3844 (get_attribute_operand): ...to this.
3845 * c-common.c (get_nonnull_operand): Rename...
3846 (get_attribute_operand): ...to this.
3848 2019-11-21 Joseph Myers <joseph@codesourcery.com>
3850 * c-attribs.c (handle_fallthrough_attribute): Use pedwarn instead
3853 2019-11-19 Joseph Myers <joseph@codesourcery.com>
3855 * c-common.c (attribute_fallthrough_p): In C, use pedwarn not
3856 warning for standard attributes mixed with fallthrough attributes.
3858 2019-11-15 Joseph Myers <joseph@codesourcery.com>
3860 * c-attribs.c (handle_fallthrough_attribute): Remove static.
3861 * c-common.h (handle_fallthrough_attribute): Declare.
3863 2019-11-15 Joseph Myers <joseph@codesourcery.com>
3865 * c-attribs.c (handle_deprecated_attribute): Remove static.
3866 * c-common.h (handle_deprecated_attribute): Declare.
3868 2019-11-14 Joseph Myers <joseph@codesourcery.com>
3870 * c-lex.c (lex_charconst): Make CPP_UTF8CHAR constants unsigned
3873 2019-11-14 Jakub Jelinek <jakub@redhat.com>
3875 * c-omp.c (c_omp_check_context_selector): Add nvidia to the list of
3878 * c-omp.c (c_omp_check_context_selector): Handle name lists
3879 containing string literals. Don't diagnose atomic_default_mem_order
3880 with multiple props.
3882 2019-11-13 Joseph Myers <joseph@codesourcery.com>
3884 * c-cppbuiltin.c (builtin_define_float_constants): Also define
3885 NORM_MAX constants. Update call to get_max_float.
3886 (LAZY_HEX_FP_VALUES_CNT): Update value to include NORM_MAX
3889 2019-11-13 Eric Botcazou <ebotcazou@adacore.com>
3891 * c-ada-spec.c (get_underlying_decl): Do not look through typedefs.
3892 (dump_forward_type): Do not generate a declaration for function types.
3893 (dump_nested_type) <ARRAY_TYPE>: Do not generate a nested declaration
3894 of the component type if it is declared in another file.
3896 2019-11-12 Martin Liska <mliska@suse.cz>
3898 * c-opts.c (c_common_post_options):
3899 Use SET_OPTION_IF_UNSET.
3901 2019-11-12 Maciej W. Rozycki <macro@codesourcery.com>
3902 Frederik Harwath <frederik@codesourcery.com>
3905 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_SERIAL enumeration
3907 * c-pragma.c (oacc_pragmas): Add "serial" entry.
3909 2019-11-08 Richard Sandiford <richard.sandiford@arm.com>
3911 * c-common.h (gnu_vector_type_p): New function.
3912 * c-common.c (c_build_vec_perm_expr): Require __builtin_shuffle
3913 vectors to satisfy gnu_vector_type_p.
3914 (c_build_vec_convert): Likewise __builtin_convertvector.
3915 (convert_vector_to_array_for_subscript): Likewise when applying
3916 implicit vector to array conversion.
3917 (scalar_to_vector): Likewise when converting vector-scalar
3918 operations to vector-vector operations.
3920 2019-11-08 Joseph Myers <joseph@codesourcery.com>
3922 * c.opt (Wold-style-definition): Initialize to -1.
3923 * c-opts.c (c_common_post_options): Set warn_old_style_definition
3924 to flag_isoc2x if not set explicitly.
3926 2019-11-07 Joseph Myers <joseph@codesourcery.com>
3928 * c-attribs.c (parse_tm_stmt_attr): Handle scoped attributes.
3930 2019-11-05 Jason Merrill <jason@redhat.com>
3932 * c-opts.c (c_common_post_options): -fconcepts-ts implies
3935 2019-11-04 Kamlesh Kumar <kamleshbhalui@gmail.com>
3937 * c-opts.c (c_common_post_options): Update
3940 2019-11-02 Jakub Jelinek <jakub@redhat.com>
3942 * c-common.h (c_omp_get_context_selector): Remove.
3943 * c-omp.c (c_omp_get_context_selector): Moved to omp-general.c
3944 and renamed to omp_get_context_selector.
3946 * c-omp.c (c_omp_mark_declare_variant): Use
3947 omp_context_selector_set_compare.
3949 PR c++/88335 - Implement P1073R3: Immediate functions
3950 * c-common.h (enum rid): Add RID_CONSTEVAL.
3951 * c-common.c (c_common_reswords): Add consteval.
3953 2019-11-01 Martin Sebor <msebor@redhat.com>
3959 * c-pretty-print.c (direct_abstract_declarator): Print
3960 bound in zero-length arrays.
3961 * c.opt (-Wzero-length-bounds): New option.
3963 2019-10-30 Nathan Sidwell <nathan@acm.org>
3965 * c-cppbuiltin.c (c_cpp_builtins): Add 'L' suffix to feature
3968 2019-10-28 Martin Sebor <msebor@redhat.com>
3971 * c-common.c (c_common_nodes_and_builtins): Call c_define_builtins
3972 even when only preprocessing.
3973 * c-common.h (names_builtin_p): Declare new function.
3974 * c-lex.c (init_c_lex): Set has_builtin.
3975 (c_common_has_builtin): Define a new function.
3976 * c-ppoutput.c (init_pp_output): Set has_builtin.
3978 2019-10-24 Jakub Jelinek <jakub@redhat.com>
3980 * c-common.h (c_omp_context_selector_matches): Remove.
3981 * c-omp.c (c_omp_context_selector_matches): Remove.
3982 * c-attribs.c (c_common_attribute_table): Add
3983 "omp declare target {host,nohost,block}" attributes.
3985 2019-10-17 JeanHeyd Meneide <phdofthehouse@gmail.com>
3987 * c-lex.c (c_common_has_attribute): Update nodiscard value.
3989 2019-10-14 Richard Sandiford <richard.sandiford@arm.com>
3991 * c-common.h (user_facing_original_type_p): Declare.
3992 * c-common.c: Include c-spellcheck.h.
3993 (user_facing_original_type_p): New function.
3995 2019-10-12 Jakub Jelinek <jakub@redhat.com>
3997 * c-common.h (c_omp_mark_declare_variant,
3998 c_omp_context_selector_matches): Declare.
3999 * c-omp.c: Include attribs.h, gimplify.h, cgraph.h, symbol-summary.h
4001 (c_omp_get_context_selector): Support second argument NULL.
4002 (c_omp_mark_declare_variant, c_omp_context_selector_matches): New
4004 * c-attribs.c (c_common_attribute_table): Remove "omp declare variant"
4005 attribute, add "omp declare variant base" and
4006 "omp declare variant variant" attributes.
4008 2019-10-11 Joseph Myers <joseph@codesourcery.com>
4010 * c.opt (Wc11-c2x-compat): Add CPP(cpp_warn_c11_c2x_compat)
4011 CppReason(CPP_W_C11_C2X_COMPAT).
4013 2019-10-11 Joseph Myers <joseph@codesourcery.com>
4015 * c-common.c (c_common_reswords): Do not use D_EXT for _Decimal32,
4016 _Decimal64 and _Decimal128.
4018 2019-10-10 Joseph Myers <joseph@codesourcery.com>
4020 * c-cppbuiltin.c (c_cpp_builtins): Do not define macros for DFP
4021 types if DFP not supported.
4023 2019-10-10 Jakub Jelinek <jakub@redhat.com>
4025 * c-common.h (c_omp_check_context_selector,
4026 c_omp_get_context_selector): Declare.
4027 * c-omp.c (c_omp_declare_simd_clauses_to_numbers): Fix spelling
4028 in diagnostic message.
4029 (c_omp_check_context_selector, c_omp_get_context_selector): New
4031 * c-attribs.c (c_common_attribute_table): Add "omp declare variant"
4033 (handle_omp_declare_variant_attribute): New function.
4035 2019-10-09 Martin Sebor <msebor@redhat.com>
4037 PR tree-optimization/90879
4038 * c.opt (-Wstring-compare): New option.
4040 2019-10-08 Andrew Sutton <asutton@lock3software.com>
4041 Jason Merrill <jason@redhat.com>
4043 Update the concepts implementation to conform to the C++20
4044 specification, improve compile times, and generally clean up
4047 * c-cppbuiltin.c (c_cpp_builtins): Use new feature test values for
4048 concepts when -std=c++2a. Bump __cpp_concepts to 201907.
4049 * c.opt: Add -Wconcepts-ts.
4050 * c-opts.c (c_common_post_options): Warn when -fconcepts is used
4051 with -std=c++2a. Disable warning for -fconcepts in C++20 mode.
4052 (set_std_cxx2a): Enable concepts by default.
4054 2019-10-08 Joseph Myers <joseph@codesourcery.com>
4056 * c-opts.c (c_common_post_options): Set
4057 -fno-fp-int-builtin-inexact for C2X.
4059 2019-10-05 Jakub Jelinek <jakub@redhat.com>
4061 PR c++/91369 - Implement P0784R7: constexpr new
4062 * c-cppbuiltin.c (c_cpp_builtins): Predefine
4063 __cpp_constexpr_dynamic_alloc=201907 for -std=c++2a.
4065 2019-10-04 Joseph Myers <joseph@codesourcery.com>
4068 * c-format.c (C_STD_VER): Handle C2x.
4069 (C_STD_NAME): Likewise.
4070 (strftime_flag_specs): Add 'O' modifier with 'p' flag.
4071 (time_char_table): Use separate entry for 'B' and 'b', with 'O'
4072 modifier allowed and 'p' flag.
4073 * c-format.h (enum format_std_version): Add STD_C2X.
4074 (struct format_char_info): Mention 'p' in comment on flags2.
4076 2019-10-01 David Malcolm <dmalcolm@redhat.com>
4078 * c-opts.c (c_diagnostic_finalizer): Temporarily clear prefix when
4079 calling diagnostic_show_locus, rather than destroying it afterwards.
4081 2019-10-01 Jakub Jelinek <jakub@redhat.com>
4084 * c-warn.c (check_alignment_of_packed_member): Ignore FIELD_DECLs
4085 with NULL DECL_FIELD_OFFSET.
4087 2019-10-01 Richard Sandiford <richard.sandiford@arm.com>
4089 * c-pretty-print.c (pp_c_specifier_qualifier_list): If a vector type
4090 has a type name, use it in preference to the __vector syntax.
4092 2019-09-30 Richard Sandiford <richard.sandiford@arm.com>
4094 * c-pretty-print.c (pp_c_parameter_type_list): Avoid printing
4095 two spaces between a comma and "...".
4097 2019-09-27 Jakub Jelinek <jakub@redhat.com>
4100 * c-common.h (c_omp_predefined_variable): Declare.
4101 * c-omp.c (c_omp_predefined_variable): New function.
4102 (c_omp_predetermined_sharing): Return OMP_CLAUSE_DEFAULT_SHARED
4103 for predefined variables.
4105 2019-09-27 Richard Sandiford <richard.sandiford@arm.com>
4107 * c-common.h (build_function_call_vec): Take the original
4108 function decl as an optional final parameter.
4109 (check_builtin_function_arguments): Take the original function decl.
4110 * c-common.c (check_builtin_function_arguments): Likewise.
4111 Handle all built-in functions, not just BUILT_IN_NORMAL ones.
4112 Use targetm.check_builtin_call to check BUILT_IN_MD functions.
4114 2019-09-15 Jason Merrill <jason@redhat.com>
4116 * c-warn.c (warn_logical_operator): Strip location wrappers. Don't
4117 fold_for_warn in "|| mask" warning.
4119 2019-09-10 Martin Liska <mliska@suse.cz>
4121 * c.opt: Use newly added WarnRemoved.
4123 2019-09-09 Martin Liska <mliska@suse.cz>
4125 * c.opt: Update comment of removed
4126 options that are preserved only for backward
4129 2019-09-06 Martin Liska <mliska@suse.cz>
4132 * c-common.c: Remove definition of flag_use_repository.
4133 * c-common.h: Likewise.
4134 * c-opts.c (c_common_handle_option):
4135 Do not handle OPT_frepo option.
4136 * c.opt: Mark the option with Deprecated.
4138 2019-09-04 Marek Polacek <polacek@redhat.com>
4140 * c.opt (fdeduce-init-list): Ignored.
4142 2019-09-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4145 * c.opt (Wenum-conversion): New option.
4147 2019-09-03 Jozef Lawrynowicz <jozef.l@mittosystems.com>
4149 * c-attribs.c (handle_section_attribute): Call the
4150 handle_generic_attribute target hook after performing target
4151 independent processing.
4152 (handle_noinit_attribute): Likewise.
4154 2019-09-03 Ian Lance Taylor <iant@golang.org>
4156 * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Always expand
4157 when using -fgo-dump-spec.
4159 2019-09-02 Martin Liska <mliska@suse.cz>
4162 * c-common.c (fname_as_string): Use cxx_printable_name for
4163 __PRETTY_FUNCTION__ same as was used before r265711.
4165 2019-08-28 Marek Polacek <polacek@redhat.com>
4167 Implement P1152R4: Deprecating some uses of volatile.
4169 * c-opts.c (c_common_post_options): Enable -Wvolatile by
4170 default for C++2a, unless -Wno-deprecated.
4171 * c.opt (Wvolatile): New warning.
4173 2019-08-28 Marek Polacek <polacek@redhat.com>
4175 PR c++/91360 - Implement C++20 P1143R2: constinit.
4176 * c-common.c (c_common_reswords): Add constinit and __constinit.
4177 (keyword_is_decl_specifier): Handle RID_CONSTINIT.
4178 * c-common.h (enum rid): Add RID_CONSTINIT, RID_FIRST_CXX20, and
4181 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_constinit.
4182 * c-format.c (cxx_keywords): Add "constinit".
4183 * c.opt (Wc++2a-compat, Wc++20-compat): New options.
4185 2019-08-27 Jakub Jelinek <jakub@redhat.com>
4188 * c-common.c (verify_tree): For LSHIFT_EXPR, RSHIFT_EXPR,
4189 COMPONENT_REF and ARRAY_REF in cxx_dialect >= cxx17 mode handle it
4190 like COMPOUND_EXPR rather than normal expression.
4192 2019-08-23 Iain Sandoe <iain@sandoe.co.uk>
4195 * c-lex.c (c_lex_with_flags): Don't call
4196 c_common_no_more_pch () from here.
4198 2019-08-23 Jakub Jelinek <jakub@redhat.com>
4201 * c-common.c (c_ts18661_flt_eval_method): Use flag_excess_precision
4202 instead of flag_excess_precision_cmdline.
4203 * c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): Likewise.
4204 * c-opts.c (c_common_post_options): Likewise.
4206 2019-08-22 Martin Sebor <msebor@redhat.com>
4209 * c-common.c (braced_list_to_string): Add argument and overload.
4210 Handle flexible length arrays and unions.
4212 2019-08-21 Eric Botcazou <ebotcazou@adacore.com>
4214 * c-ada-spec.c (dump_ada_function_declaration): Be prepared for broken
4215 function declarations where arguments are missing. Rename variables.
4217 2019-08-15 Richard Biener <rguenther@suse.de>
4219 * c-common.c (c_stddef_cpp_builtins): When the GIMPLE FE is
4220 enabled, define __SIZETYPE__.
4222 2019-08-14 Christophe Lyon <christophe.lyon@linaro.org>
4224 * c-attribs.c (c_common_attribute_table): Add "noinit" entry. Add
4225 exclusion with "section" attribute.
4226 (attr_noinit_exclusions): New table.
4227 (handle_noinit_attribute): New function.
4229 2019-08-13 Richard Sandiford <richard.sandiford@arm.com>
4232 * c-common.c (resolve_overloaded_builtin): Use
4233 copy_decl_built_in_function.
4235 2019-08-13 Martin Sebor <msebor@redhat.com>
4238 * c-format.c (printf_length_specs): Set FMT_LEN_w for "w".
4239 (asm_fprintf_length_spec): Same.
4240 * c-format.h (format_lengths): Add FMT_LEN_w.
4242 2019-08-10 Jakub Jelinek <jakub@redhat.com>
4244 * c-pragma.h (enum pragma_omp_clause): Add
4245 PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
4247 2019-08-07 Jakub Jelinek <jakub@redhat.com>
4249 * c-pragma.h (enum pragma_omp_clause): Add
4250 PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR. Set PRAGMA_OACC_CLAUSE_USE_DEVICE
4251 equal to PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR instead of being a separate
4254 2019-08-05 Marek Polacek <polacek@redhat.com>
4256 PR c++/91338 - Implement P1161R3: Deprecate a[b,c].
4257 * c-opts.c (c_common_post_options): Enable -Wcomma-subscript by
4258 default for C++2a, unless -Wno-deprecated.
4259 * c.opt (Wcomma-subscript): New warning.
4261 2019-07-20 Jakub Jelinek <jakub@redhat.com>
4263 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_LOOP.
4264 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_BIND.
4265 * c-pragma.c (omp_pragmas_simd): Add PRAGMA_OMP_LOOP entry.
4266 * c-common.h (enum c_omp_clause_split): Add C_OMP_CLAUSE_SPLIT_LOOP.
4267 * c-omp.c (c_omp_split_clauses): Add support for 4 new combined
4268 constructs with the loop construct.
4270 2019-07-13 Jakub Jelinek <jakub@redhat.com>
4273 * c-omp.c (c_omp_split_clauses): Fix a pasto in
4274 OMP_CLAUSE_REDUCTION_TASK handling.
4276 2019-07-12 Jakub Jelinek <jakub@redhat.com>
4278 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ORDER.
4279 * c-omp.c (c_omp_split_clauses): Handle splitting of OMP_CLAUSE_ORDER.
4281 2019-07-09 Martin Sebor <msebor@redhat.com>
4284 * c-opts.c (handle_deferred_opts): Change class-key of PODs to struct
4285 and others to class.
4286 * c-pretty-print.h: Same.
4288 2019-07-09 Martin Sebor <msebor@redhat.com>
4291 * c-format.c (check_argument_type): Change class-key from class to
4292 struct and vice versa to match convention and avoid -Wclass-is-pod
4293 and -Wstruct-no-pod.
4294 * c-pretty-print.h: Same.
4296 2019-07-03 Martin Liska <mliska@suse.cz>
4298 * c-common.c (try_to_locate_new_include_insertion_point): Remove
4301 2019-07-03 Jakub Jelinek <jakub@redhat.com>
4303 * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_REDUCTION_INSCAN
4304 clauses on OMP_FOR rather than OMP_PARALLEL when OMP_FOR is combined
4307 2019-07-02 qing zhao <qing.zhao@oracle.com>
4309 PR preprocessor/90581
4310 * c-opts.c (c_common_handle_option): Handle -fmax-include-depth.
4311 * c.opt: Add new option -fmax-include-depth.
4313 2019-06-26 Jason Merrill <jason@redhat.com>
4315 PR c++/55442 - memory-hog with highly recursive constexpr.
4316 * c.opt (fconstexpr-loop-limit): New.
4318 2019-06-25 Jakub Jelinek <jakub@redhat.com>
4321 * c-omp.c (c_finish_omp_atomic): Allow tree_invariant_p in addition
4322 to SAVE_EXPR in first operand of a COMPOUND_EXPR.
4324 2019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
4326 * c-common.c (c_common_nodes_and_builtins): Define
4327 alternate "__intN__" name for "__intN" types.
4329 2019-06-24 Jan Hubicka <jh@suse.cz>
4331 * c-common.c (braced_lists_to_strings): Check that
4332 type is array or integer prior checking string flag.
4334 2019-06-21 Matthew Beliveau <mbelivea@redhat.com>
4336 PR c++/90875 - added -Wswitch-outside-range option
4337 * c.opt (Wswitch-outside-range): Added new option.
4338 * c-warn.c (c_do_switch_warnings): Use OPT_Wswitch-outside-range.
4340 2019-06-21 Marek Polacek <polacek@redhat.com>
4342 PR c++/90953 - ICE with -Wmissing-format-attribute.
4343 * c-common.c (check_function_arguments_recurse): Use
4345 (check_missing_format_attribute): Likewise.
4347 2019-06-19 Marek Polacek <polacek@redhat.com>
4349 PR c++/60364 - noreturn after first decl not diagnosed.
4350 * c-attribs.c (handle_noreturn_attribute): No longer static.
4351 * c-common.h (handle_noreturn_attribute, attr_noreturn_exclusions):
4353 * c-format.c (check_function_format): Use get_attribute_name.
4355 2019-06-19 Martin Sebor <msebor@redhat.com>
4357 PR translation/90156
4358 * c-format.c (function_format_info::format_type): Adjust type.
4359 (function_format_info::is_raw): New member.
4360 (decode_format_type): Adjust signature. Handle "raw" diag attributes.
4361 (decode_format_attr): Adjust call to decode_format_type.
4362 Avoid a redundant call to convert_format_name_to_system_name.
4363 Avoid abbreviating the word "arguments" in a diagnostic.
4364 (format_warning_substr): New function.
4365 (avoid_dollar_number): Quote dollar sign in a diagnostic.
4366 (finish_dollar_format_checking): Same.
4367 (check_format_info): Same.
4368 (struct baltoks_t): New.
4369 (c_opers, c_keywords, cxx_keywords, badwords, contrs): New arrays.
4370 (maybe_diag_unbalanced_tokens, check_tokens, check_plain): New
4372 (check_format_info_main): Call check_plain. Use baltoks_t. Call
4373 maybe_diag_unbalanced_tokens.
4374 (handle_format_attribute): Spell out the word "arguments" in
4377 2019-06-11 Matthew Beliveau <mbelivea@redhat.com>
4379 PR c++/90449 - add -Winaccessible-base option.
4380 * c.opt (Winaccessible-base): New option.
4382 2019-06-10 Jakub Jelinek <jakub@redhat.com>
4384 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_SCAN.
4385 * c-pragma.c (omp_pragmas_simd): Add #pragma omp scan.
4386 * c-omp.c (c_omp_split_clauses): Diagnose inscan reductions on
4387 combined/composite constructs where it is not allowed. Copy over
4388 OMP_CLAUSE_REDUCTION_INSCAN.
4390 2019-06-05 Martin Sebor <msebor@redhat.com>
4392 * c-attribs.c (handle_mode_attribute): Adjust quoting and hyphenation.
4393 (handle_alias_ifunc_attribute): Same.
4394 (handle_copy_attribute): Same.
4395 (handle_weakref_attribute): Same.
4396 (handle_nonnull_attribute): Same.
4397 * c-warn.c (warn_for_sign_compare): Same.
4398 (warn_for_restrict): Same.
4401 2019-06-05 Martin Sebor <msebor@redhat.com>
4403 * c-pragma.c (handle_pragma_weak): Adjust quoting in a diagnostic.
4404 * c.opt (-Wformat-diag): Remove a spurious period.
4406 2019-05-29 Jakub Jelinek <jakub@redhat.com>
4409 * c-common.c (check_builtin_function_arguments)
4410 <case BUILTIN_*_OVERFLOW>: Diagnose pointer to const qualified integer
4413 2019-05-23 Eric Botcazou <ebotcazou@adacore.com>
4415 * c-ada-spec.c (compare_node): Compare the DECL_UIDs as a last resort.
4417 2019-05-22 Martin Liska <mliska@suse.cz>
4420 * c-attribs.c (handle_copy_attribute): Do not copy
4421 target_clones attribute.
4423 2019-05-21 Eric Botcazou <ebotcazou@adacore.com>
4425 * c-ada-spec.h (enum cpp_operation): Add IS_ASSIGNMENT_OPERATOR.
4426 * c-ada-spec.c (print_assignment_operator): New function.
4427 (dump_ada_declaration) <FUNCTION_DECL>: Call it do dump explicit copy
4428 assignment operators declared as methods and filter out the others.
4430 2019-05-17 Thomas Schwinge <thomas@codesourcery.com>
4433 * c-attribs.c (c_common_attribute_table): Set min_len to -1 for
4434 "omp declare target".
4436 2019-05-16 Martin Sebor <msebor@redhat.com>
4438 * c-attribs.c (handle_no_sanitize_attribute): Quote identifiers,
4439 keywords, operators, and types in diagnostics.
4440 (handle_scalar_storage_order_attribute): Same.
4441 (handle_mode_attribute): Same.
4442 (handle_visibility_attribute): Same.
4443 (handle_assume_aligned_attribute): Same.
4444 (handle_no_split_stack_attribute): Same.
4445 * c-common.c (shorten_compare): Same.
4446 (c_common_truthvalue_conversion): Same.
4447 (cb_get_source_date_epoch): Same.
4448 * c-lex.c (cb_def_pragma): Quote keywords, operators, and types
4450 (interpret_float): Same.
4451 * c-omp.c (c_finish_omp_for): Same.
4452 * c-opts.c (c_common_post_options): Same.
4453 * c-pch.c (c_common_pch_pragma): Same.
4454 * c-pragma.c (pop_alignment): Same.
4455 (handle_pragma_pack): Same.
4456 (apply_pragma_weak): Same.
4457 (handle_pragma_weak): Same.
4458 (handle_pragma_scalar_storage_order): Same.
4459 (handle_pragma_redefine_extname): Same.
4460 (add_to_renaming_pragma_list): Same.
4461 (maybe_apply_renaming_pragma): Same.
4462 (push_visibility): Same.
4463 (handle_pragma_visibility): Same.
4464 (handle_pragma_optimize): Same.
4465 (handle_pragma_message): Same.
4466 * c-warn.c (warn_for_omitted_condop): Same.
4467 (lvalue_error): Same.
4469 2019-05-15 Richard Biener <rguenther@suse.de>
4472 * c-common.c (c_common_mark_addressable_vec): Also mark
4473 a COMPOUND_LITERAL_EXPR_DECL addressable similar to
4476 2019-05-06 Nathan Sidwell <nathan@acm.org>
4478 * c-opts.c (handle_defered_opts): Rename struct deps to struc mkdeps.
4480 2019-04-30 Nathan Sidwell <nathan@acm.org>
4482 * c-common.c (c_common_init_ts): Use MARK_TS_EXP. Mark SIZEOF_EXPR.
4484 2019-04-30 Martin Liska <mliska@suse.cz>
4486 * c-pragma.c (handle_pragma_diagnostic): Provide hints
4487 for unknown options.
4489 2019-04-26 Richard Sandiford <richard.sandiford@arm.com>
4491 * c-warn.c (strict_aliasing_warning): Apply COMPLETE_TYPE_P to
4492 the pointer target rather than the pointer itself.
4494 2019-04-19 Jakub Jelinek <jakub@redhat.com>
4497 * c-common.h (c_add_case_label): Remove orig_type and outside_range_p
4499 (c_do_switch_warnings): Remove outside_range_p argument.
4500 * c-common.c (check_case_bounds): Removed.
4501 (c_add_case_label): Remove orig_type and outside_range_p arguments.
4502 Don't call check_case_bounds. Fold low_value as well as high_value.
4503 * c-warn.c (c_do_switch_warnings): Remove outside_range_p argument.
4504 Check for case labels outside of range of original type here and
4507 2019-04-12 Jakub Jelinek <jakub@redhat.com>
4509 PR translation/90041
4510 * c.opt (-fhandle-exceptions): Use %< and %> around option names
4511 in the Warn diagnostics.
4514 * c-attribs.c (handle_patchable_function_entry_attribute): Add
4515 function comment. Warn if arguments of the attribute are not positive
4518 2019-04-09 Eric Botcazou <ebotcazou@adacore.com>
4520 * c-ada-spec.c (print_destructor): Deal with deleting destructors.
4521 (dump_ada_declaration) <FUNCTION_DECL>: Likewise.
4523 2019-04-07 Eric Botcazou <ebotcazou@adacore.com>
4525 * c-ada-spec.c (is_float128): New predicate extracted from...
4526 (dump_ada_node) <COMPLEX_TYPE>: Use it to recognize __cfloat128.
4527 <REAL_TYPE>: ...here. Call it.
4529 2019-04-05 David Malcolm <dmalcolm@redhat.com>
4532 * c-warn.c (check_address_or_pointer_of_packed_member): Add
4533 auto_diagnostic_group. Guard inform calls by result of
4536 2019-04-05 Marek Polacek <polacek@redhat.com>
4538 PR c++/89973 - -Waddress-of-packed-member ICE with invalid conversion.
4539 * c-warn.c (check_address_or_pointer_of_packed_member): Check the type
4542 2019-04-03 Jason Merrill <jason@redhat.com>
4544 PR c++/86586 - -fcompare-debug=-Wsign-compare.
4545 * c-warn.c (warn_for_sign_compare): Call fold_for_warn.
4547 2019-04-01 Martin Sebor <msebor@redhat.com>
4550 * c-attribs.c (handle_copy_attribute): Handle references and
4551 non-constant expressions.
4553 2019-03-22 Jakub Jelinek <jakub@redhat.com>
4556 * c.opt (-fconstexpr-ops-limit=): New option.
4558 2019-03-21 Jakub Jelinek <jakub@redhat.com>
4560 * c-common.c (per_file_includes_t): Use false as Lazy in hash_set
4563 2019-03-19 Martin Sebor <msebor@redhat.com>
4565 PR tree-optimization/89688
4566 * c-common.c (braced_list_to_string): Make static.
4567 (braced_lists_to_strings): Define new function.
4568 * c-common.h (braced_list_to_string): Remove.
4569 (braced_lists_to_strings): Declare.
4571 2019-03-12 Martin Liska <mliska@suse.cz>
4573 * c-opts.c (c_common_handle_option): Wrap option with %< and %>.
4575 2019-03-11 Martin Liska <mliska@suse.cz>
4577 * c-opts.c (c_common_post_options): Wrap apostrophes
4578 in gcc internal format with %'.
4580 2019-03-11 Martin Liska <mliska@suse.cz>
4582 * c-attribs.c (handle_nocf_check_attribute): Wrap an option name
4583 in a string format message and fix GNU coding style.
4584 * c-common.c (vector_types_convertible_p): Likewise.
4585 (c_build_vec_perm_expr): Likewise.
4586 * c-indentation.c (get_visual_column): Likewise.
4587 * c-opts.c (c_common_handle_option): Likewise.
4588 (c_common_post_options): Likewise.
4589 (sanitize_cpp_opts): Likewise.
4590 * c-pch.c (c_common_pch_pragma): Likewise.
4591 * c-pragma.c (handle_pragma_pack): Likewise.
4593 2019-03-08 Jakub Jelinek <jakub@redhat.com>
4595 PR tree-optimization/89550
4596 * c-common.c (c_common_truthvalue_conversion): Only set
4597 TREE_NO_WARNING if warning_at returned true.
4598 * c-warn.c (overflow_warning, warn_logical_operator): Likewise.
4600 2019-02-25 Sandra Loosemore <sandra@codesourcery.com>
4601 Martin Sebor <msebor@gmail.com>
4603 * c.opt (Wmissing-attributes): Clean up doc string.
4605 2019-02-25 Jakub Jelinek <jakub@redhat.com>
4608 * c-format.c (maybe_read_dollar_number): Compute nargnum in
4609 HOST_WIDE_INT type to avoid overflows and change overflow_flag
4612 2019-02-22 Richard Biener <rguenther@suse.de>
4614 * c-pch.c (no_checksum): Remove.
4615 (pch_init): Remove assertion that executable_checksum is not
4617 (c_common_valid_pch): Likewise.
4619 2019-02-18 Martin Sebor <msebor@redhat.com>
4622 * c-common.c (invalid_array_size_error): Handle cst_size_not_constant.
4624 2019-02-16 David Malcolm <dmalcolm@redhat.com>
4627 * c-common.c (shorten_compare): Call fold_for_warn on op0 when
4628 implementing -Wtype-limits.
4630 2019-02-11 Martin Sebor <msebor@redhat.com>
4633 * c-common.c (invalid_array_size_error): New function.
4634 (valid_array_size_p): Call it. Handle size as well as type.
4635 * c-common.h (valid_constant_size_p): New function.
4636 (enum cst_size_error): New type.
4638 2019-01-31 David Malcolm <dmalcolm@redhat.com>
4641 * known-headers.cc (get_stdlib_header_for_name): Add
4642 {FLT|DBL|LDBL}_{MAX|MIN} to "hints" array.
4644 2019-01-31 Jakub Jelinek <jakub@redhat.com>
4647 * c-pretty-print.c (pp_c_enumeration_constant): Print always as
4648 a C cast in pp_c_flag_gnu_v3 mode.
4650 2019-01-29 Jakub Jelinek <jakub@redhat.com>
4653 * c-common.c (c_common_nodes_and_builtins): Build type variants for
4654 builtin_structptr_types types even for C.
4656 2019-01-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
4658 * c-warn.c (check_address_or_pointer_of_packed_member): Handle the case
4659 when rhs is of array type correctly. Fix handling of nested structures.
4660 Fix handling of indirect_ref together with nop_expr and/or addr_expr.
4661 (check_and_warn_address_or_pointer_of_packed_member): Fix handling of
4662 type casts within nested compound expressions.
4664 2019-01-22 Jakub Jelinek <jakub@redhat.com>
4667 * c-omp.c (c_finish_omp_atomic): For bitfield atomics, update type
4668 variable after using BIT_FIELD_REF.
4670 2019-01-18 H.J. Lu <hongjiu.lu@intel.com>
4674 * c-common.h (warn_for_address_or_pointer_of_packed_member):
4675 Remove the boolean argument.
4676 * c-warn.c (check_address_of_packed_member): Renamed to ...
4677 (check_address_or_pointer_of_packed_member): This. Also
4678 warn pointer conversion.
4679 (check_and_warn_address_of_packed_member): Renamed to ...
4680 (check_and_warn_address_or_pointer_of_packed_member): This.
4681 Also warn pointer conversion.
4682 (warn_for_address_or_pointer_of_packed_member): Remove the
4683 boolean argument. Don't check pointer conversion here.
4685 2019-01-15 Richard Sandiford <richard.sandiford@arm.com>
4688 * c.opt (Wdeprecated): Move documentation and variable to common.opt.
4690 2019-01-14 Jakub Jelinek <jakub@redhat.com>
4692 * c-cppbuiltin.c (c_cpp_builtin): Define __cpp_guaranteed_copy_elision
4693 and __cpp_nontype_template_parameter_auto. Add a comment that
4694 __cpp_template_auto is deprecated.
4696 2019-01-14 Tom Honermann <tom@honermann.net>
4698 Implement P0482R5, char8_t: A type for UTF-8 characters and strings
4699 * c-common.c (c_common_reswords): Add char8_t.
4700 (fix_string_type): Use char8_t for the type of u8 string literals.
4701 (c_common_get_alias_set): char8_t doesn't alias.
4702 (c_common_nodes_and_builtins): Define char8_t as a builtin type in
4704 (c_stddef_cpp_builtins): Add __CHAR8_TYPE__.
4705 (keyword_begins_type_specifier): Add RID_CHAR8.
4706 * c-common.h (rid): Add RID_CHAR8.
4707 (c_tree_index): Add CTI_CHAR8_TYPE and CTI_CHAR8_ARRAY_TYPE.
4708 Define D_CXX_CHAR8_T and D_CXX_CHAR8_T_FLAGS.
4709 Define char8_type_node and char8_array_type_node.
4710 * c-cppbuiltin.c (cpp_atomic_builtins): Predefine
4711 __GCC_ATOMIC_CHAR8_T_LOCK_FREE.
4712 (c_cpp_builtins): Predefine __cpp_char8_t.
4713 * c-lex.c (lex_string): Use char8_array_type_node as the type of
4715 (lex_charconst): Use char8_type_node as the type of CPP_UTF8CHAR.
4716 * c-opts.c: If not otherwise specified, enable -fchar8_t when
4718 * c.opt: Add the -fchar8_t command line option.
4720 2019-01-14 Martin Sebor <msebor@redhat.com>
4723 * c-attribs.c (positional_argument): Call valid_format_string_type_p
4724 and issue errors if it fails.
4725 * c-common.h (valid_format_string_type_p): Declare.
4726 * c-format.c (valid_stringptr_type_p): Rename...
4727 (valid_format_string_type_p): ...to this and make extern.
4728 (handle_format_arg_attribute): Adjust to new name.
4729 (check_format_string): Same.
4731 2019-01-13 H.J. Lu <hongjiu.lu@intel.com>
4733 * c-warn.c (warn_for_address_or_pointer_of_packed_member):
4734 Replace "may may" with "may" in warning message.
4736 2019-01-07 Jakub Jelinek <jakub@redhat.com>
4739 * c-common.h (enum rid): Add RID_BUILTIN_CONVERTVECTOR.
4740 (c_build_vec_convert): Declare.
4741 * c-common.c (c_build_vec_convert): New function.
4743 2019-01-04 Martin Sebor <msebor@redhat.com>
4746 * c-attribs.c (handle_copy_attribute): Avoid copying attribute leaf.
4747 Handle C++ empty throw specification and C11 _Noreturn.
4748 (has_attribute): Also handle C11 _Noreturn.
4750 2019-01-04 Martin Sebor <msebor@redhat.com>
4753 * c-attribs.c (positional_argument): Also accept enumerated types.
4755 2019-01-01 Jakub Jelinek <jakub@redhat.com>
4757 Update copyright years.
4759 2018-12-20 H.J. Lu <hongjiu.lu@intel.com>
4762 * c-common.h (warn_for_address_or_pointer_of_packed_member): New.
4763 * c-warn.c (check_alignment_of_packed_member): New function.
4764 (check_address_of_packed_member): Likewise.
4765 (check_and_warn_address_of_packed_member): Likewise.
4766 (warn_for_address_or_pointer_of_packed_member): Likewise.
4767 * c.opt: Add -Wno-address-of-packed-member.
4769 2018-12-20 David Malcolm <dmalcolm@redhat.com>
4772 * c-warn.c (get_outermost_macro_expansion): New function.
4773 (spelled_the_same_p): Use it to unwind the macro expansions, and
4774 compare the outermost macro in each nested expansion, rather than
4777 2018-12-19 David Malcolm <dmalcolm@redhat.com>
4780 * c-common.h (warn_tautological_cmp): Convert 1st param from
4781 location_t to const op_location_t &.
4782 * c-warn.c (find_array_ref_with_const_idx_r): Call fold_for_warn
4783 when testing for INTEGER_CST.
4784 (warn_tautological_bitwise_comparison): Convert 1st param from
4785 location_t to const op_location_t &; use it to build a
4786 binary_op_rich_location, and use this.
4787 (spelled_the_same_p): New function.
4788 (warn_tautological_cmp): Convert 1st param from location_t to
4789 const op_location_t &. Warn for macro expansions if
4790 spelled_the_same_p. Use binary_op_rich_location.
4792 2018-12-19 David Malcolm <dmalcolm@redhat.com>
4796 * c-common.c (unsafe_conversion_p): Fold any location wrapper.
4797 (verify_tree): Handle location wrappers.
4798 (c_common_truthvalue_conversion): Strip any location wrapper.
4800 (fold_offsetof): Strip any location wrapper.
4801 (complete_array_type): Likewise for initial_value.
4802 (convert_vector_to_array_for_subscript): Call fold_for_warn on the
4803 index before checking for INTEGER_CST.
4804 * c-pretty-print.c (c_pretty_printer::primary_expression): Don't
4805 print parentheses around location wrappers.
4806 * c-warn.c (warn_logical_operator): Call fold_for_warn on op_right
4807 before checking for INTEGER_CST.
4808 (warn_tautological_bitwise_comparison): Call
4809 tree_strip_any_location_wrapper on lhs, rhs, and bitop's operand
4810 before checking for INTEGER_CST.
4811 (readonly_error): Strip any location wrapper.
4812 (warn_array_subscript_with_type_char): Strip location wrappers
4813 before checking for INTEGER_CST. Use the location of the index if
4816 2018-12-06 Jason Merrill <jason@redhat.com>
4818 PR c++/88136 - -Wdeprecated-copy false positives
4819 * c.opt (Wdeprecated-copy-dtor): New.
4820 (Wdeprecated-copy): Move to -Wextra.
4822 2018-11-29 Martin Sebor <msebor@redhat.com>
4826 * c-attribs.c (common_handle_aligned_attribute): Silently avoid setting
4827 alignments to values less than the target requires.
4828 (has_attribute): For attribute aligned consider both the attribute
4829 and the alignment bits.
4830 * c-common.c (c_init_attributes): Optionally issue a warning for
4833 2018-11-28 Martin Sebor <msebor@redhat.com>
4837 * c-warn.c (sizeof_pointer_memaccess_warning): Bail if source
4838 or destination is an error.
4840 2018-11-28 Jakub Jelinek <jakub@redhat.com>
4843 * c-ubsan.c: Include langhooks.h.
4844 (ubsan_instrument_division): Change gcc_assert that main variants
4845 of op0 and op1 types are equal to gcc_checking_assert that the
4846 main variants are compatible types.
4848 2018-11-27 Eric Botcazou <ebotcazou@adacore.com>
4850 * c-ada-spec.c: Include stringpool.h.
4851 (has_static_fields): Return false for incomplete types.
4852 (is_tagged_type): Likewise.
4853 (has_nontrivial_methods): Likewise.
4854 (dump_ada_node) <INTEGER_TYPE>: Deal specifically with __int128.
4855 (struct overloaded_name_hash): New structure.
4856 (struct overloaded_name_hasher): Likewise.
4857 (overloaded_names): New global variable.
4858 (init_overloaded_names): New static function.
4859 (overloaded_name_p): New predicate.
4860 (dump_ada_declaration) <TYPE_DECL>: Tidy up and set TREE_VISITED
4861 on the TYPE_STUB_DECL of the original type of a typedef, if any.
4862 <FUNCTION_DECL>: Bail out for an unsupported overloaded name.
4863 Remove always-true condition and dump forward types.
4864 (dump_ada_specs): Delete overloaded_names.
4866 2018-11-20 Martin Sebor <msebor@redhat.com>
4868 * c-attribs.c (type_for_vector_size): New function.
4869 (type_valid_for_vector_size): Same.
4870 (handle_vector_size_attribute): Move code to the functions above
4872 (validate_attribute, has_attribute): New functions.
4873 * c-common.h (has_attribute): Declare.
4874 (rid): Add RID_HAS_ATTRIBUTE_EXPRESSION.
4875 * c-common.c (c_common_resword): Same.
4877 2018-11-16 Jason Merrill <jason@redhat.com>
4879 * c-lex.c (c_common_has_attribute): Handle likely/unlikely.
4880 * c-attribs.c (attr_cold_hot_exclusions): Make public.
4882 2018-11-16 Jakub Jelinek <jakub@redhat.com>
4885 * c-common.c (fix_string_type): Reject string literals larger than
4886 TYPE_MAX_VALUE (ssizetype) bytes.
4888 2018-11-15 Martin Sebor <msebor@redhat.com>
4892 * c-attribs.c (positional_argument): New function.
4893 (handle_alloc_size_attribute): Use it and simplify.
4894 (handle_alloc_align_attribute): Same.
4895 (handle_assume_aligned_attribute): Same.
4896 (handle_nonnull_attribute): Same.
4897 * c-common.c (check_function_arguments): Pass fntype to
4898 check_function_format.
4899 * c-common.h (check_function_format): Add an argument.
4900 (PosArgFlags, positional_argument): Declare new type and function.
4901 * c-format.c (decode_format_attr): Add arguments.
4902 (check_format_string, get_constant): Same.
4903 (convert_format_name_to_system_name): Adjust.
4905 2018-11-15 David Malcolm <dmalcolm@redhat.com>
4908 * c-opts.c (c_diagnostic_finalizer): Add diagnostic_t param.
4910 2018-11-14 Jakub Jelinek <jakub@redhat.com>
4912 P1236R1 - Signed integers are two's complement
4913 * c-warn.c (maybe_warn_shift_overflow): Don't warn for c++2a.
4914 * c-ubsan.c (ubsan_instrument_shift): Make signed shifts
4915 with in-range second operand well defined for -std=c++2a.
4918 * c-common.c (parse_optimize_options): Allocate option string from
4919 opts_obstack rather than as GC memory. Move the allocation after
4920 warning for invalid option.
4922 2018-11-13 David Malcolm <dmalcolm@redhat.com>
4924 * c-common.c (c_get_substring_location): Update for renaming of
4925 get_source_location_for_substring to get_location_within_string.
4926 * c-lex.c: Replace "source_location" with "location_t".
4927 * c-opts.c: Likewise.
4928 * c-ppoutput.c: Likewise.
4930 2018-11-13 Martin Sebor <msebor@redhat.com>
4933 * c-attribs.c (handle_copy_attribute): Exclude inlining attributes.
4934 (handle_tls_model_attribute): Improve diagnostics.
4936 2018-11-12 Jason Merrill <jason@redhat.com>
4938 * c-cppbuiltin.c (c_cpp_builtins): Define
4939 __cpp_impl_destroying_delete.
4941 * c-cppbuiltin.c (c_cpp_builtins): Change __cpp_explicit_bool to
4942 __cpp_conditional_explicit.
4944 2018-11-09 Martin Sebor <msebor@redhat.com>
4947 * c-attribs.c (handle_copy_attribute): New function.
4949 2018-11-09 Martin Sebor <msebor@redhat.com>
4952 * c-common.c (check_user_alignment): Use MAX_OFILE_ALIGNMENT.
4954 2018-11-08 Jakub Jelinek <jakub@redhat.com>
4956 * c-common.h (c_finish_omp_taskgroup): Add CLAUSES argument.
4957 (c_finish_omp_atomic): Replace bool SEQ_CST argument with
4958 enum omp_memory_order MEMORY_ORDER.
4959 (c_finish_omp_flush): Add MO argument.
4960 (c_omp_depend_t_p, c_finish_omp_depobj): Declare.
4961 (c_finish_omp_for): Add FINAL_P argument.
4962 * c-omp.c: Include memmodel.h.
4963 (c_finish_omp_taskgroup): Add CLAUSES argument. Set
4964 OMP_TASKGROUP_CLAUSES to it.
4965 (c_finish_omp_atomic): Replace bool SEQ_CST argument with
4966 enum omp_memory_order MEMORY_ORDER. Set OMP_ATOMIC_MEMORY_ORDER
4967 instead of OMP_ATOMIC_SEQ_CST.
4968 (c_omp_depend_t_p, c_finish_omp_depobj): New functions.
4969 (c_finish_omp_flush): Add MO argument, if not MEMMODEL_LAST, emit
4970 __atomic_thread_fence call with the given value.
4971 (check_omp_for_incr_expr): Formatting fixes.
4972 (c_finish_omp_for): Add FINAL_P argument. Allow NE_EXPR
4973 even in OpenMP loops, diagnose if NE_EXPR and incr expression
4974 is not constant expression 1 or -1. Transform NE_EXPR loops
4975 with iterators pointers to VLA into LT_EXPR or GT_EXPR loops.
4976 (c_omp_check_loop_iv_r): Look for orig decl of C++ range for
4978 (c_omp_split_clauses): Add support for combined
4979 #pragma omp parallel master and
4980 #pragma omp {,parallel }master taskloop{, simd} constructs.
4981 Handle OMP_CLAUSE_IN_REDUCTION. Handle OMP_CLAUSE_REDUCTION_TASK.
4982 Handle OMP_CLAUSE_NONTEMPORAL. Handle splitting OMP_CLAUSE_IF
4983 also to OMP_SIMD. Copy OMP_CLAUSE_LASTPRIVATE_CONDITIONAL.
4984 (c_omp_predetermined_sharing): Don't return
4985 OMP_CLAUSE_DEFAULT_SHARED for const qualified decls.
4986 * c-pragma.c (omp_pragmas): Add PRAGMA_OMP_DEPOBJ and
4987 PRAGMA_OMP_REQUIRES.
4988 * c-pragma.h (enum pragma_kind): Likewise.
4989 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_NONTEMPORAL
4990 and PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
4992 2018-11-08 David Malcolm <dmalcolm@redhat.com>
4994 * c-format.c (gcc_dump_printf_char_table): Add entry for %f.
4996 2018-11-08 David Malcolm <dmalcolm@redhat.com>
4998 * c-format.c (local_cgraph_node_ptr_node): New variable.
4999 (gcc_dump_printf_char_table): Add entry for %C.
5000 (get_pointer_to_named_type): New function, taken from the handling
5001 code for "gimple *" from...
5002 (init_dynamic_diag_info): ...here. Add handling for
5004 * c-format.h (T_CGRAPH_NODE): New.
5006 2018-10-19 Jason Merrill <jason@redhat.com>
5008 * c-cppbuiltin.c (c_cpp_builtins): Add
5009 __cpp_nontype_template_parameter_class.
5011 2018-10-31 Nathan Sidwell <nathan@acm.org>
5013 * c-opts.c (c_finish_options): Force command line macro
5014 location. Refactor to avoid repeating main debug hook.
5015 (push_command_line_include): Clarify comment.
5017 * c-opts.c (c_finish_options): Adjust cpp_force_token_locations call.
5019 2018-10-30 Martin Sebor <msebor@redhat.com>
5022 * c-format.c (check_format_types): Avoid diagnosing null pointer
5023 arguments to printf-family of functions.
5025 2018-10-30 Marek Polacek <polacek@redhat.com>
5027 Implement P0892R2, explicit(bool).
5028 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_explicit_bool.
5030 2018-10-29 David Malcolm <dmalcolm@redhat.com>
5032 * name-hint.h (name_hint::take_deferred): New member function.
5034 2018-10-29 David Malcolm <dmalcolm@redhat.com>
5037 * c-common.c (check_function_sentinel): Call fold_for_warn on the
5039 (check_function_restrict): Rename param "argarray" to
5040 "unfolded_argarray", and make a copy named "argarray", calling
5041 fold_for_warn on each argument.
5042 (check_function_arguments): Add note about responsibility for
5043 folding the arguments.
5045 2018-10-17 Joseph Myers <joseph@codesourcery.com>
5047 * c-common.c (flag_isoc2x): New variable.
5048 * c-common.h (clk_c): Update comment to reference C2X.
5049 (flag_isoc99, flag_isoc11): Update comments to reference future
5050 standard versions in general.
5051 (flag_isoc2x): Declare.
5052 * c-opts.c (set_std_c2x): New function.
5053 (c_common_handle_option): Handle -std=c2x and -std=gnu2x.
5054 (set_std_c89, set_std_c99, set_std_c11, set_std_c17): Set
5056 * c.opt (Wc11-c2x-compat, std=c2x, std=gnu2x): New options.
5058 2018-10-17 Joseph Myers <joseph@codesourcery.com>
5060 * c.opt (std=c17, std=c18, std=gnu17, std=gnu18, std=iso9899:2017)
5061 (std=iso9899:2018): Document C17 as published in 2018.
5063 2018-10-12 Christophe Lyon <christophe.lyon@linaro.org>
5066 * c-pretty-print.c (c_pretty_printer::constant): Fix typo.
5068 2018-10-11 Will Wray <wjwray@gmail.com>
5071 * c-pretty-print.h (pp_c_type_cast): Prototype.
5072 (pp_c_integer_constant): Likewise.
5073 * c-pretty-print.c (pp_c_type_cast): No longer static.
5074 (pp_c_integer_constant): Likewise.
5075 (pp_c_enumeration_constant): Fix loop termination when finding
5076 name of constant. No longer returns a value. Call
5077 pp_c_integer_constant.
5078 (c_pretty_printer::constant): Update for changes to
5079 pp_c_enumeration_constant.
5081 2018-10-11 Jakub Jelinek <jakub@redhat.com>
5083 * c-lex.c (c_common_has_attribute): Return 201803 instead of 20180312
5084 for no_unique_address.
5086 2018-10-09 David Malcolm <dmalcolm@redhat.com>
5088 * c-common.c (c_option_controlling_cpp_error): Rename to...
5089 (c_option_controlling_cpp_diagnostic): ...this, and convert
5090 "reason" from int to enum.
5091 (c_cpp_error): Rename to...
5092 (c_cpp_diagnostic): ...this, converting level and reason to enums.
5093 * c-common.h (c_cpp_error): Rename to...
5094 (c_cpp_diagnostic): ...this, converting level and reason to enums.
5095 * c-opts.c (c_common_init_options): Update for renaming.
5097 2018-10-08 Richard Sandiford <richard.sandiford@arm.com>
5100 * c-common.c (vector_types_compatible_elements_p): Use
5101 INTEGRAL_TYPE_P instead of checking only for INTEGER_TYPE.
5103 2018-10-04 Vinay Kumar <vinay.kumar@blackfigtech.com>
5105 * c-attribs.c (get_priority): Add a warning flag warn_prio_ctor_dtor
5106 to generate constructor destructor priority warning.
5107 * c.opt (-Wprio-ctor-dtor): New option.
5109 2018-10-01 Jason Merrill <jason@redhat.com>
5111 * c-lex.c (c_common_has_attribute): Add no_unique_address.
5113 2018-10-01 Eric Botcazou <ebotcazou@adacore.com>
5115 * c-ada-spec.c (get_underlying_decl): Get to the main type variant.
5116 (dump_ada_node): Add const keyword.
5118 2018-09-25 Martin Liska <mliska@suse.cz>
5120 * c-common.c (c_common_truthvalue_conversion):
5121 Remove Pascal from documentation.
5123 2018-09-21 Eric Botcazou <ebotcazou@adacore.com>
5125 * c-ada-spec.c: Include diagnostic.h.
5126 (dump_ada_declaration) <RECORD_TYPE>: Issue a warning on packed layout.
5128 2018-09-19 Marek Polacek <polacek@redhat.com>
5130 * c.opt (Wclass-conversion): New.
5132 2018-09-17 David Malcolm <dmalcolm@redhat.com>
5134 * c-format.c (range_label_for_format_type_mismatch::get_text):
5135 Update for new param.
5137 2018-09-17 David Malcolm <dmalcolm@redhat.com>
5139 * c-format.c (format_warning_at_char): Update for introduction of
5140 format_string_diagnostic_t.
5141 (format_type_warning): Likewise.
5143 2018-09-17 Martin Jambor <mjambor@suse.cz>
5146 * c.opt (Wabsolute-value): New.
5148 2018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
5150 * c-common.c (complete_flexible_array_elts): New helper function.
5151 * c-common.h (complete_flexible_array_elts): Declare.
5153 2018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
5155 * c-common.c (braced_list_to_string): Remove eval parameter.
5156 Add some more checks. Always create zero-terminated STRING_CST.
5157 * c-common.h (braced_list_to_string): Adjust prototype.
5159 2018-08-27 David Malcolm <dmalcolm@redhat.com>
5162 * c-common.c (c_cpp_error): Update for conversion of show_caret_p
5164 (maybe_suggest_missing_token_insertion): Likewise.
5165 (maybe_add_include_fixit): Add param "override_location". If set,
5166 and source-printing is enabled, then override the rich_location's
5167 primary location with that of the insertion point for the fix-it
5168 hint, marking it with SHOW_LINES_WITHOUT_RANGE.
5169 * c-common.h (extern void maybe_add_include_fixit): Add bool
5171 * c-format.c (selftest::test_type_mismatch_range_labels): Update
5172 for conversion of show_caret_p to a tri-state.
5173 * c-warn.c (warn_for_restrict): Likewise.
5175 (suggest_missing_header::~suggest_missing_header): Update call to
5176 maybe_add_include_fixit to suggest overriding the location, as it
5179 2018-08-27 Martin Liska <mliska@suse.cz>
5181 * c-common.c (check_function_restrict): Use new function
5182 fndecl_built_in_p and remove check for FUNCTION_DECL if
5184 (check_builtin_function_arguments): Likewise.
5185 (reject_gcc_builtin): Likewise.
5186 * c-warn.c (sizeof_pointer_memaccess_warning): Likewise.
5188 2018-08-26 Marek Polacek <polacek@redhat.com>
5190 PR c++/87029, Implement -Wredundant-move.
5191 * c.opt (Wredundant-move): New option.
5193 2018-08-21 Marek Polacek <polacek@redhat.com>
5195 PR c++/86981, Implement -Wpessimizing-move.
5196 * c.opt (Wpessimizing-move): New option.
5198 2018-08-20 David Malcolm <dmalcolm@redhat.com>
5201 * c-attribs.c (common_handle_aligned_attribute): Add
5202 auto_diagnostic_group instance.
5203 * c-indentation.c (warn_for_misleading_indentation): Likewise.
5204 * c-opts.c (c_common_post_options): Likewise.
5205 * c-warn.c (warn_logical_not_parentheses): Likewise.
5206 (warn_duplicated_cond_add_or_warn): Likewise.
5207 (warn_for_multistatement_macros): Likewise.
5209 2018-08-20 Nathan Sidwell <nathan@acm.org>
5211 * c-ada-spec.c (macro_length, dump_ada_macros): Adjust macro parm
5214 2018-08-17 Nathan Sidwell <nathan@acm.org>
5216 * c-cppbuiltin.c (struct lazy_hex_fp_value_struct): Remove macro
5218 (laxy_hex_fp_value_count): Make unsigned.
5219 (lazy_hex_fp_value): Provided with macro & lazy number. Directly
5220 manipulate the macro.
5221 (builtin_defin_with_hex_fp_value): Adjust callback name, use
5224 2018-08-17 David Malcolm <dmalcolm@redhat.com>
5226 * c-format.c (enum format_type): Add gcc_dump_printf_format_type.
5227 (gcc_dump_printf_length_specs): New.
5228 (gcc_dump_printf_flag_pairs): New.
5229 (gcc_dump_printf_flag_specs): New.
5230 (gcc_dump_printf_char_table): New.
5231 (format_types_orig): Add entry for "gcc_dump_printf".
5232 (init_dynamic_diag_info): Set up length_char_specs and
5233 conversion_specs for gcc_dump_printf_format_type.
5234 (handle_format_attribute): Handle gcc_dump_printf_format_type.
5236 2018-08-17 Nathan Sidwell <nathan@acm.org>
5238 * c-ada-spec.c (macro_length, dump_ada_macros): Constify.
5240 * c-ada-spec.c: Don't #include "cpp-id-data.h"
5241 * c-cppbuiltin.c: Likewise.
5243 2018-08-17 Martin Liska <mliska@suse.cz>
5245 * c.opt: Remove Warn, Init and Report for options with
5246 Ignore/Deprecated flag. Warning is done automatically for
5249 2018-08-16 David Malcolm <dmalcolm@redhat.com>
5252 * c-common.c (selftest::c_family_tests): Call
5253 selftest::c_indentation_c_tests.
5254 * c-common.h (selftest::c_indentation_c_tests): New decl.
5255 * c-indentation.c: Include "selftest.h".
5256 (next_tab_stop): Add "tab_width" param, rather than accessing
5258 (get_visual_column): Likewise. Clarify comment. Bulletproof
5259 against reading past the end of the line.
5260 (get_first_nws_vis_column): Add "tab_width" param.
5261 (detect_intervening_unindent): Likewise.
5262 (should_warn_for_misleading_indentation): Read tab width from
5263 cpp_opts and pass around.
5264 (selftest::test_next_tab_stop): New test.
5265 (selftest::assert_get_visual_column_succeeds): New function.
5266 (ASSERT_GET_VISUAL_COLUMN_SUCCEEDS): New macro.
5267 (selftest::assert_get_visual_column_fails): New function.
5268 (ASSERT_GET_VISUAL_COLUMN_FAILS): New macro.
5269 (selftest::test_get_visual_column): New test.
5270 (selftest::c_indentation_c_tests): New function.
5272 2018-08-16 Nathan Sidwell <nathan@acm.org>
5274 * c-ada-spec.c (count_ada_macro): Use cpp_user_macro_p.
5275 (store_ada_macro): Likewise.
5276 * c-ppoutput.c (cb_used_define, dump_macro): Likewise.
5277 * c-spellcheck.cc (should-suggest_as_macro_p): Likewise,
5279 2018-08-15 David Malcolm <dmalcolm@redhat.com>
5281 * c-format.c: Include "selftest-diagnostic.h" and
5282 "gcc-rich-location.h".
5283 (format_warning_at_char): Pass NULL for new label params of
5285 (class indirection_suffix): New class.
5286 (class range_label_for_format_type_mismatch): New class.
5287 (format_type_warning): Move logic for generating "*" suffix to
5288 class indirection_suffix. Create "fmt_label" and "param_label"
5289 to show their types, and pass them to the
5290 format_warning_at_substring calls.
5291 (selftest::test_type_mismatch_range_labels): New test.
5292 (selftest::c_format_c_tests): Call it.
5294 2018-08-13 Martin Sebor <msebor@redhat.com>
5296 PR tree-optimization/71625
5297 * c-common.c (braced_list_to_string): New function.
5298 * c-common.h (braced_list_to_string): Declare it.
5300 2018-08-08 Nathan Sidwell <nathan@acm.org>
5302 * c-common.c (try_to_locate_new_include_inertion_point): Use
5303 linemap_included_from_linemap.
5304 * c-lex.c (fe_file_change): Use linemap_included_from.
5305 * c-ppoutput.c (pp_file_change): Likewise.
5307 2018-08-01 Martin Sebor <msebor@redhat.com>
5309 PR tree-optimization/86650
5310 * c-format.c (gcc_tdiag_char_table): Update comment for "%G".
5311 (gcc_cdiag_char_table, gcc_cxxdiag_char_table): Same.
5312 (init_dynamic_diag_info): Update from "gcall *" to "gimple *".
5313 * c-format.h (T89_G): Update to be "gimple *" rather than
5315 (local_gcall_ptr_node): Rename...
5316 (local_gimple_ptr_node): ...to this.
5318 2018-07-31 David Malcolm <dmalcolm@redhat.com>
5320 * c-format.c (PP_FORMAT_CHAR_TABLE): New macro, based on existing
5321 table entries for gcc_diag_char_table, and the 'Z' entry from
5322 gcc_tdiag_char_table, changing the "chain" entry for 'Z' from
5323 &gcc_tdiag_char_table[0] to &gcc_diag_char_table[0].
5324 (gcc_diag_char_table): Use PP_FORMAT_CHAR_TABLE, implicitly
5325 adding missing "Z" for this table. Remove erroneous "G" and "K"
5327 (gcc_tdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
5328 (gcc_cdiag_char_table): Use PP_FORMAT_CHAR_TABLE.
5329 (gcc_cxxdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
5331 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
5333 * c-common.c (speculation_safe_resolve_call): New function.
5334 (speculation_safe_resolve_params): New function.
5335 (speculation_safe_resolve_return): New function.
5336 (resolve_overloaded_builtin): Handle __builtin_speculation_safe_value.
5337 * c-cppbuiltin.c (c_cpp_builtins): Add pre-define for
5338 __HAVE_SPECULATION_SAFE_VALUE.
5340 2018-07-20 David Malcolm <dmalcolm@redhat.com>
5342 * c-common.c (c_cpp_error): Remove redundant "line_table"
5343 parameter from call to rich_location::set_range.
5344 (maybe_suggest_missing_token_insertion): Likewise.
5346 2018-07-20 Martin Sebor <msebor@redhat.com>
5349 * c.opt (-Warray-bounds): Remove redundant -Wall.
5351 2018-07-20 Martin Sebor <msebor@redhat.com>
5354 * c-common.h (c_common_handle_option): Change function argument
5356 * c-opts.c (c_common_init_options): Same.
5357 (c_common_handle_option): Same. Remove special handling of
5358 OPT_Walloca_larger_than_ and OPT_Wvla_larger_than_.
5359 * c.opt (-Walloc-size-larger-than, -Walloca-larger-than): Change
5360 options to take a HOST_WIDE_INT argument and accept a byte-size
5362 (-Wvla-larger-than): Same.
5363 (-Wno-alloc-size-larger-than, -Wno-alloca-larger-than): New.
5364 (-Wno-vla-larger-than): Same.
5366 2018-07-12 Jakub Jelinek <jakub@redhat.com>
5368 * c-attribs.c (c_common_attribute_table): Add
5369 "omp declare target implicit" attribute.
5371 2018-07-12 Richard Biener <rguenther@suse.de>
5374 * c-attribs.c (handle_packed_attribute): Do not build a variant
5375 type with TYPE_PACKED, instead ignore the attribute if we may
5376 not apply to the original type.
5378 2018-07-10 Jakub Jelinek <jakub@redhat.com>
5381 * c-omp.c (c_omp_check_loop_iv_r, c_omp_check_loop_iv): Allow declv
5382 to contain TREE_LIST for both the original class iterator and the
5385 2018-07-07 Eric Botcazou <ebotcazou@adacore.com>
5387 * c-ada-spec.c (to_ada_name): Remove index parameter.
5388 (pp_ada_tree_identifier): Likewise.
5389 (dump_ada_macros): Adjust call to to_ada_name.
5390 (struct overloaded_name_hash): Delete.
5391 (struct overloaded_name_hasher): Likewise.
5392 (overloaded_names): Likewise.
5393 (compute_overloading_index): Likewise.
5394 (dump_ada_decl_name): Do not call compute_overloading_index and
5395 adjust calls to pp_ada_tree_identifier.
5396 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
5397 (dump_ada_import): Add spc parameter and switch to aspect syntax.
5398 (dump_ada_function_declaration): Adjust call to pp_ada_tree_identifier.
5399 (dump_ada_enum_type): Remove type and display_convention parameters.
5400 Adjust calls to pp_ada_tree_identifier.
5401 (dump_ada_node): Likewise and for dump_ada_structure.
5402 (dump_nested_type) <ENUMERAL_TYPE>: Adjust call to dump_ada_enum_type
5404 <RECORD_TYPE>: Adjust call to dump_ada_structure and switch to aspect
5406 (print_constructor): Adjust call to pp_ada_tree_identifier.
5407 (print_destructor): Likewise.
5408 (dump_ada_declaration): Switch to aspect syntax.
5409 (dump_ada_structure): Likewise and tidy up. Replace display_convention
5410 parameter with nested parameter.
5411 (dump_ads): Emit pragma Ada_2012 in lieu of pragma Ada_2005.
5412 (dump_ada_specs): Do not delete overloaded_names table.
5414 2018-07-06 Peter Bergner <bergner@linux.ibm.com>
5417 * c-attribs.c (handle_mode_attribute): Call translate_mode_attribute
5420 2018-07-05 Nathan Sidwell <nathan@acm.org>
5422 * c-lex.c (fe_file_change): Check SYSTEM_IMPLICIT_EXTERN_C not
5423 NO_IMPLICIT_EXTERN_C.
5425 2018-06-28 Martin Liska <mliska@suse.cz>
5427 * cppspec.c: Include opt-suggestions.h.
5429 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
5430 Thomas Schwinge <thomas@codesourcery.com>
5431 Cesar Philippidis <cesar@codesourcery.com>
5433 * c-pragma.h (enum pragma_omp_clause): Add
5434 PRAGMA_OACC_CLAUSE_{FINALIZE,IF_PRESENT}. Remove
5435 PRAGMA_OACC_CLAUSE_PRESENT_OR_{COPY,COPYIN,COPYOUT,CREATE}.
5437 2018-06-20 Jakub Jelinek <jakub@redhat.com>
5440 * c-common.c (check_nonnull_arg): Use fold_for_warn. Adjust obsolete
5443 2018-06-18 Martin Sebor <msebor@redhat.com>
5446 * c-warn.c (sizeof_pointer_memaccess_warning): Check for attribute
5449 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
5451 * c-common.c (c_common_truthvalue_conversion): Handle ABSU_EXPR.
5453 2018-06-13 Jason Merrill <jason@redhat.com>
5455 * c-opts.c (c_common_post_options): Warn about useless -Wabi.
5456 (c_common_handle_option) [OPT_Wabi_]: Remove flag_abi_compat_version
5459 PR c++/86094 - wrong code with defaulted move ctor.
5460 * c-opts.c (c_common_post_options): Bump the current ABI version to
5461 13. Set warn_abi_version and flag_abi_compat_version to the current
5462 version rather than 0. Fix defaulting flag_abi_compat_version from
5465 2018-06-12 Martin Sebor <msebor@redhat.com>
5468 * c-warn.c (sizeof_pointer_memaccess_warning): Avoid warning when
5469 sizeof source and destination yields the same value.
5471 2018-06-12 Martin Liska <mliska@suse.cz>
5473 * c.opt: Make MPX-related options as Deprecated.
5475 2018-06-08 David Malcolm <dmalcolm@redhat.com>
5477 * c-pretty-print.c (c_pretty_printer::statement): Use TDF_NONE
5480 2018-06-08 Martin Liska <mliska@suse.cz>
5482 * c-attribs.c (handle_bnd_variable_size_attribute): Remove support
5483 for MPX (macros, related functions, fields in cgraph_node, ...).
5484 (handle_bnd_legacy): Likewise.
5485 (handle_bnd_instrument): Likewise.
5488 2018-06-06 Jakub Jelinek <jakub@redhat.com>
5491 * c-cppbuiltin.c (c_cpp_builtins): Fix a typo, set
5492 __cpp_transactional_memory to 201500 instead of 210500.
5494 2018-06-06 Jason Merrill <jason@redhat.com>
5496 PR c++/85710 - ICE with -Wmemset-elt-size.
5497 * c-warn.c (warn_for_memset): Don't crash on incomplete element type.
5499 2018-06-01 Jason Merrill <jason@redhat.com>
5501 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_deduction_guides to
5504 2018-06-01 Eric Botcazou <ebotcazou@adacore.com>
5506 * c-ada-spec.c (dump_ada_declaration) <TYPE_DECL>: Generate a forward
5507 declaration for a typedef independently of whether the declaration of
5508 the subtype is generated.
5510 2018-05-31 Martin Sebor <msebor@redhat.com>
5513 * c.opt (-Wno-alloc-size-larger-than): New option.
5515 2018-04-22 David Pagan <dave.pagan@oracle.com>
5518 * c-opts.c (c_common_post_options): Set default for warn_return_type
5519 for C++/C++ with ObjC extensions only. For C, makes it possible to
5520 differentiate between default (no option), -Wreturn-type, and
5523 2018-05-29 Jason Merrill <jason@redhat.com>
5525 * c.opt (Winit-list-lifetime): New flag.
5527 2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
5529 * c-lex.c (get_fileinfo): Use splay_tree_compare_strings and
5530 splay_tree_delete_pointers.
5532 2018-05-26 Jakub Jelinek <jakub@redhat.com>
5535 * c-warn.c (diagnose_mismatched_attributes): Remove unnecessary
5536 noinline variable to workaround broken kernel headers.
5538 2018-05-18 Jason Merrill <jason@redhat.com>
5540 * c.opt (Wdeprecated-copy): New flag.
5542 2018-05-17 Martin Liska <mliska@suse.cz>
5544 * c-warn.c (overflow_warning): Do not use
5545 space in between 'G_' and '('.
5547 2018-05-09 Jason Merrill <jason@redhat.com>
5549 * c-common.c (valid_array_size_p): Add complain parameter.
5550 * c-common.h: ...which defaults to true.
5552 2018-05-11 Jakub Jelinek <jakub@redhat.com>
5555 * c-omp.c (c_omp_predetermined_sharing): Return
5556 OMP_CLAUSE_DEFAULT_SHARED for artificial vars with integral type.
5558 2018-05-11 Martin Liska <mliska@suse.cz>
5561 * c-attribs.c (handle_no_sanitize_attribute): Iterate all
5564 2018-05-10 Jakub Jelinek <jakub@redhat.com>
5567 * c-common.h (fold_offsetof_1): Removed.
5568 (fold_offsetof): Add TYPE argument defaulted to size_type_node and
5569 CTX argument defaulted to ERROR_MARK.
5570 * c-common.c (fold_offsetof_1): Renamed to ...
5571 (fold_offsetof): ... this. Remove wrapper function. Add TYPE
5572 argument, convert the pointer constant to TYPE and use size_binop
5573 with PLUS_EXPR instead of fold_build_pointer_plus if type is not
5574 a pointer type. Adjust recursive calls.
5576 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
5579 * c-attribs.c (handle_visibility_attribute): Do not set no_add_attrs.
5581 2018-05-07 Nathan Sidwell <nathan@acm.org>
5583 * c.opt (ffor-scope): Remove functionality, issue warning.
5585 2018-05-03 Nathan Sidwell <nathan@acm.org>
5587 * c.opt (ffriend-injection): Remove functionality, issue warning.
5589 2018-05-01 David Malcolm <dmalcolm@redhat.com>
5592 * c-format.c (struct format_check_results): Add field
5594 (check_format_info): Initialize it, and warn if encountered.
5595 (check_format_arg): Distinguish between wide char and
5596 everything else when detecting arrays of non-char.
5598 2018-04-30 David Malcolm <dmalcolm@redhat.com>
5600 * c-format.c (get_corrected_substring): Update for
5601 location_get_source_line returning a char_span. Use a char_span
5602 when handling the prefix of the correction.
5603 * c-indentation.c (get_visual_column): Update for
5604 location_get_source_line returning a char_span.
5605 (get_first_nws_vis_column): Likewise.
5607 2018-03-29 David Malcolm <dmalcolm@redhat.com>
5610 * known-headers.cc (get_stdlib_header_for_name): Add various names
5611 from <assert.h>, <string.h>, and <memory.h>; add more names from
5614 2018-03-27 Jakub Jelinek <jakub@redhat.com>
5617 * c-common.c (fold_offsetof_1) <case COMPOUND_EXPR>: Assert that
5618 get_base_address of the second operand is a VAR_P, rather than the
5619 operand itself, and use gcc_checking_assert instead of gcc_assert.
5621 2018-03-23 Marek Polacek <polacek@redhat.com>
5624 * c-pretty-print.c (c_pretty_printer::multiplicative_expression)
5625 <case RDIV_EXPR>: Tweak condition.
5627 2018-03-20 Eric Botcazou <ebotcazou@adacore.com>
5629 * c-ada-spec.c (pp_ada_tree_identifier): Deal specifically with _Bool.
5631 2018-03-16 Jakub Jelinek <jakub@redhat.com>
5634 * c-warn.c (conversion_warning): Replace "to to" with "to" in
5638 * c-warn.c (diagnose_mismatched_attributes): Remove trailing space from
5641 2018-03-16 Richard Biener <rguenther@suse.de>
5644 * c-gimplify.c (c_gimplify_expr): Revert previous change. Instead
5645 unshare the possibly folded expression.
5647 2018-03-15 Richard Biener <rguenther@suse.de>
5650 * c-gimplify.c (c_gimplify_expr): Do not fold expressions.
5652 2018-03-13 Martin Sebor <msebor@redhat.com>
5654 PR tree-optimization/84725
5655 * c-attribs.c (handle_nonstring_attribute): Allow attribute nonstring
5656 with all three narrow character types, including their qualified forms.
5658 2018-03-12 Martin Sebor <msebor@redhat.com>
5660 PR tree-optimization/83456
5661 * c-common.c (check_function_restrict): Return bool.
5662 Restore checking of bounded built-in functions.
5663 (check_function_arguments): Also return the result
5664 of warn_for_restrict.
5665 * c-common.c (check_function_restrict): Return bool.
5666 * c-warn.c (warn_for_restrict): Return bool.
5668 2018-03-02 Marek Polacek <polacek@redhat.com>
5671 * c-warn.c (warn_for_sign_compare): Bail out if any of the operands
5674 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
5676 * c-attribs.c (c_common_attribute_table): Remove "cilk simd
5679 2018-03-01 Marek Polacek <polacek@redhat.com>
5682 * c-attribs.c (common_handle_aligned_attribute): Don't use invalid
5683 alignment in computation.
5685 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
5687 * c-ada-spec.c (dump_ada_node) <NULLPTR_TYPE>: New case.
5688 <REAL_TYPE>: Deal specifically with _Float128/__float128.
5690 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
5692 * c-ada-spec.c (dump_ada_double_name) <ENUMERAL_TYPE>: New case.
5693 (is_char_array): Take a type instead of a declaration.
5694 (dump_ada_array_type): Likewise.
5695 (is_simple_enum): Minor tweak.
5696 (dump_ada_enum_type): New function extracted from...
5697 (dump_ada_node) <ENUMERAL_TYPE>: ...here. Invoke it.
5698 <INTEGER_TYPE>: Remove unreachable code.
5699 <RECORD_TYPE>: Likewise. Minor tweaks.
5700 (dump_nested_type) <ARRAY_TYPE>: Adjust to above changes.
5701 <ENUMERAL_TYPE>: New case.
5702 <RECORD_TYPE>: Factor out common code.
5703 (dump_ada_declaration) <ARRAY_TYPE>: Adjust to above changes.
5704 Minor tweaks. Deal with enumeral types.
5705 (dump_ada_structure): Minor tweaks.
5707 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
5709 * c-ada-spec.c (dump_ada_node) <POINTER_TYPE>: Do not use generic
5710 address for incomplete structures.
5711 (dump_forward_type): Do not bail out for incomplete structures.
5712 (dump_ada_declaration): Do not special-case incomplete structures
5713 for subtypes. Dump them as null records for types.
5715 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
5717 * c-ada-spec.c (dump_ada_import): Use boolean and fix formatting.
5718 (is_char_array): Fix formatting.
5719 (dump_template_types): Likewise.
5720 (dump_generic_ada_node): Rename into...
5721 (dump_ada_node): ...this.
5722 <POINTER_TYPE>: Remove superfluous space. Use generic address for
5723 incomplete structures and not for empty structures. Do not use it
5724 when forward declarations are needed.
5725 (dump_forward_type): New function.
5726 (dump_nested_types): Remove FORWARD parameter. Do not consider
5727 TREE_VISITED and do not generate a forward declaration. Only dump
5728 original nested types for nested declaration.
5729 (dump_nested_type) <POINTER_TYPE>: Call dump_forward_type.
5730 <ARRAY_TYPE>: Likewise if the component type is an anonymous pointer.
5731 <RECORD_TYPE>: Do not consider TREE_VISITED.
5732 (dump_ada_declaration): Use booleans and fix formatting throughout.
5733 <TYPE_DECL>: Skip incomplete structures and not empty structures.
5734 Call dump_forward_type instead of dump_nested_types for a typedef.
5735 Remove superfluous check and adjust call to dump_nested_types.
5736 <POINTER_TYPE>: Call dump_forward_type and fall through.
5737 (dump_ada_struct_decl): Rename into...
5738 (dump_ada_structure): ...this. Do not special-case empty structures.
5740 2018-02-27 Martin Sebor <msebor@redhat.com>
5743 * c.opt (-Wmissing-attributes): New option.
5745 2018-02-21 Martin Liska <mliska@suse.cz>
5747 * c.opt (Wcatch-value=): Add IntegerRange.
5749 2018-02-15 Jason Merrill <jason@redhat.com>
5751 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_deduction_guides.
5753 2018-02-09 Nathan Sidwell <nathan@acm.org>
5756 * c-common.h (strict_aliasing_warning): Drop OTYPE arg, insert LOC
5758 * c-warn.c (strict_aliasing_warning): Drop OTYPE arg, require LOC
5761 2018-02-09 Martin Sebor <msebor@redhat.com>
5764 * c.opt (-Wstringop-overflow, -Warray-bounds): Add LTO.
5765 (-Walloc-size-larger-than, -Wformat-truncation=): Same.
5766 (-Wmaybe-uninitialized, -Wnonnull, -Wrestrict): Same.
5767 (-Wstrict-overflow, -Wsuggest-attribute): Same.
5768 (-Wuninitialized): Same.
5770 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
5772 * c-ada-spec.c (dump_ada_declaration): Do not generate the 'constant'
5773 keyword for components.
5775 2018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
5777 * c-common.h (DECL_UNNAMED_BIT_FIELD): New.
5779 2018-02-02 Julia Koval <julia.koval@intel.com>
5781 * c-common.h (omp_clause_mask): Move to wide_int_bitmask.h.
5783 2018-01-29 Marek Polacek <polacek@redhat.com>
5786 * c-format.c (check_function_format): Check current_function_decl.
5788 2018-01-27 Jakub Jelinek <jakub@redhat.com>
5790 * c-cppbuiltin.c (c_cpp_builtins): Use ggc_strdup for the fp_suffix
5792 (LAZY_HEX_FP_VALUES_CNT): Define.
5793 (lazy_hex_fp_values): Allow up to LAZY_HEX_FP_VALUES_CNT lazy hex fp
5794 values rather than just 12.
5795 (builtin_define_with_hex_fp_value): Likewise.
5797 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
5800 * c.opt (-fmacro-prefix-map): New option.
5801 * c-opts.c (c_common_handle_option): Handle it.
5802 * c-lex.c (init_c_lex): Set remap_filename cpp callback.
5803 * c-ppoutput.c (init_pp_output): Likewise.
5805 2018-01-17 David Malcolm <dmalcolm@redhat.com>
5808 * c-common.c (fold_for_warn): Move to c/c-fold.c and cp/expr.c.
5810 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
5812 * c-ada-spec.c (dump_number): Add FLOAT_P parameter.
5813 Skip 'f' and 'F' characters if it is true.
5814 (store_ada_macro): Minor tweak.
5815 (dump_ada_macros) <CPP_COMMENT>: Likewise.
5816 <CPP_WSTRING>: Likewise.
5817 <CPP_STRING>: Output '&' in the buffer if not the first string.
5818 <CPP_NUMBER>: Adjust calls to dump_number.
5820 2018-01-10 David Malcolm <dmalcolm@redhat.com>
5823 * c-common.c: Include "selftest.h".
5824 (get_atomic_generic_size): Perform the test for integral type
5825 before the range test for any integer constant, fixing indentation
5826 of braces. Call fold_for_warn before testing for an INTEGER_CST.
5827 (reject_gcc_builtin): Strip any location wrapper from EXPR.
5828 (selftest::test_fold_for_warn): New function.
5829 (selftest::c_common_c_tests): New function.
5830 (selftest::c_family_tests): Call it, and
5831 selftest::c_pretty_print_c_tests.
5832 * c-common.h (selftest::c_pretty_print_c_tests): New decl.
5833 * c-format.c (check_format_arg): Convert VAR_P check to a
5835 * c-pretty-print.c: Include "selftest.h".
5836 (pp_c_cast_expression): Don't print casts for location wrappers.
5837 (selftest::assert_c_pretty_printer_output): New function.
5838 (ASSERT_C_PRETTY_PRINTER_OUTPUT): New macro.
5839 (selftest::test_location_wrappers): New function.
5840 (selftest::c_pretty_print_c_tests): New function.
5841 * c-warn.c (warn_for_memset): Call fold_for_warn on the arguments.
5843 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
5844 Alan Hayward <alan.hayward@arm.com>
5845 David Sherwood <david.sherwood@arm.com>
5847 * c-common.c (c_common_type_for_mode): Handle MODE_VECTOR_BOOL.
5849 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
5850 Alan Hayward <alan.hayward@arm.com>
5851 David Sherwood <david.sherwood@arm.com>
5853 * c-ubsan.c (ubsan_instrument_shift): Treat GET_MODE_BITSIZE
5856 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
5857 Alan Hayward <alan.hayward@arm.com>
5858 David Sherwood <david.sherwood@arm.com>
5860 * c-common.c (vector_types_convertible_p, c_build_vec_perm_expr)
5861 (convert_vector_to_array_for_subscript): Handle polynomial
5862 TYPE_VECTOR_SUBPARTS.
5863 (c_common_type_for_mode): Check valid_vector_subparts_p.
5864 * c-pretty-print.c (pp_c_initializer_list): Handle polynomial
5867 2018-01-03 Jakub Jelinek <jakub@redhat.com>
5869 Update copyright years.
5871 2017-12-22 Mike Stump <mikestump@comcast.net>
5872 Eric Botcazou <ebotcazou@adacore.com>
5874 * c-pragma.c (init_pragma): Register pragma GCC unroll.
5875 * c-pragma.h (enum pragma_kind): Add PRAGMA_UNROLL.
5877 2017-12-22 Alexandre Oliva <aoliva@redhat.com>
5881 * c-semantics.c (only_debug_stmts_after_p): New.
5882 (pop_stmt_list): Clear side effects in debug-only stmt list.
5883 Check for single nondebug stmt followed by debug stmts only.
5885 2017-12-21 Alexandre Oliva <aoliva@redhat.com>
5888 * c-semantics.c (pop_stmt_list): Propagate side effects from
5889 single nondebug stmt to container list.
5891 2017-12-19 Jakub Jelinek <jakub@redhat.com>
5893 * known-headers.cc (get_stdlib_header_for_name): Replace Yoda
5894 conditions with typical order conditions.
5896 2017-12-18 Marek Polacek <polacek@redhat.com>
5898 * c-warn.c (warn_logical_operator): Return early if -Wlogical-op is
5901 2017-12-17 Martin Sebor <msebor@redhat.com>
5903 * c-attribs.c (common_handle_aligned_attribute): Avoid issuing
5904 an error for attribute warn_if_not_aligned.
5906 2017-12-16 Martin Sebor <msebor@redhat.com>
5908 PR tree-optimization/78918
5909 * c-common.c (check_function_restrict): Avoid checking built-ins.
5910 * c.opt (-Wrestrict): Include in -Wall.
5912 2017-12-15 Jakub Jelinek <jakub@redhat.com>
5914 * c-attribs.c (c_common_attribute_table,
5915 c_common_format_attribute_table): Swap affects_type_identity
5916 and handler fields, adjust comments.
5918 2017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
5920 * c.opt (Wcast-function-type): New warning option.
5921 * c-lex.c (get_fileinfo): Avoid warning.
5922 * c-ppoutput.c (scan_translation_unit_directives_only): Remove cast.
5924 2017-12-14 Qing Zhao <qing.zhao@oracle.com>
5927 * c-cppbuiltin.c (builtin_define_with_hex_fp_value):
5928 Adjust the size of buf1 and buf2, add a new buf to avoid
5929 format-overflow warning.
5931 2017-12-12 Alexandre Oliva <aoliva@redhat.com>
5933 * c-semantics.c (pop_stmt_list): Move begin stmt marker into
5934 subsequent statement list.
5936 2017-12-07 Martin Sebor <msebor@redhat.com>
5940 * c-attribs.c (attr_aligned_exclusions): New array.
5941 (attr_alloc_exclusions, attr_cold_hot_exclusions): Same.
5942 (attr_common_exclusions, attr_const_pure_exclusions): Same.
5943 (attr_gnu_inline_exclusions, attr_inline_exclusions): Same.
5944 (attr_noreturn_exclusions, attr_returns_twice_exclusions): Same.
5945 (attr_warn_unused_result_exclusions): Same.
5946 (handle_hot_attribute, handle_cold_attribute): Simplify.
5947 (handle_const_attribute): Warn on function returning void.
5948 (handle_pure_attribute): Same.
5949 (handle_aligned_attribute): Diagnose conflicting attribute
5951 * c-warn.c (diagnose_mismatched_attributes): Simplify.
5953 2017-12-06 David Malcolm <dmalcolm@redhat.com>
5956 * c-common.c (selftest::c_family_tests): Call
5957 selftest::c_spellcheck_cc_tests.
5958 * c-common.h (selftest::c_spellcheck_cc_tests): New decl.
5959 * c-spellcheck.cc: Include "selftest.h".
5960 (name_reserved_for_implementation_p): New function.
5961 (should_suggest_as_macro_p): New function.
5962 (find_closest_macro_cpp_cb): Move the check for NT_MACRO to
5963 should_suggest_as_macro_p and call it.
5964 (selftest::test_name_reserved_for_implementation_p): New function.
5965 (selftest::c_spellcheck_cc_tests): New function.
5966 * c-spellcheck.h (name_reserved_for_implementation_p): New decl.
5968 2017-12-06 David Malcolm <dmalcolm@redhat.com>
5970 * c-spellcheck.cc: New file, taken from macro-handling code in
5972 * c-spellcheck.h: New file, taken from macro-handling code in
5975 2017-12-01 Jakub Jelinek <jakub@redhat.com>
5977 * c-attribs.c (c_common_attribute_table): Remove "cilk simd function"
5979 (handle_simd_attribute): Don't check for "cilk simd function"
5980 attribute. Reindent, formatting changes.
5982 2017-11-30 Julia Koval <julia.koval@intel.com>
5984 * c-common.h (inv_list): Remove.
5986 2017-11-28 Jakub Jelinek <jakub@redhat.com>
5989 * c-common.c (c_switch_covers_all_cases_p_1,
5990 c_switch_covers_all_cases_p): New functions.
5991 * c-common.h (c_switch_covers_all_cases_p): Declare.
5993 2017-11-28 Julia Koval <julia.koval@intel.com>
5994 Sebastian Peryt <sebastian.peryt@intel.com>
5996 * array-notation-common.c: Delete.
5997 * c-cilkplus.c: Ditto.
5998 * c-common.c (_Cilk_spawn, _Cilk_sync, _Cilk_for): Remove.
5999 * c-common.def (ARRAY_NOTATION_REF): Remove.
6000 * c-common.h (RID_CILK_SPAWN, build_array_notation_expr,
6001 build_array_notation_ref, C_ORT_CILK, c_check_cilk_loop,
6002 c_validate_cilk_plus_loop, cilkplus_an_parts,
6003 cilk_ignorable_spawn_rhs_op,
6004 cilk_recognize_spawn): Remove.
6005 * c-gimplify.c (CILK_SPAWN_STMT): Remove.
6006 * c-omp.c: Remove CILK_SIMD check.
6007 * c-pragma.c: Ditto.
6008 * c-pragma.h: Remove CILK related pragmas.
6009 * c-pretty-print.c (c_pretty_printer::postfix_expression): Remove
6010 ARRAY_NOTATION_REF condition.
6011 (c_pretty_printer::expression): Ditto.
6012 * c.opt (fcilkplus): Remove.
6015 2017-11-21 Marc Glisse <marc.glisse@inria.fr>
6017 * c-pretty-print.c (pp_c_additive_expression,
6018 c_pretty_printer::expression): Handle POINTER_DIFF_EXPR.
6020 2017-11-21 Jakub Jelinek <jakub@redhat.com>
6022 * c-common.c (get_nonnull_operand): Use tree_to_uhwi.
6025 * c-common.c (get_atomic_generic_size): Use TREE_INT_CST_LOW
6026 instead of tree_to_uhwi, formatting fix.
6028 2017-11-20 David Malcolm <dmalcolm@redhat.com>
6031 * known-headers.cc: New file, based on material from c/c-decl.c.
6032 (suggest_missing_header): Copied as-is.
6033 (get_stdlib_header_for_name): New, based on get_c_name_hint but
6034 heavily edited to add C++ support. Add some knowledge about
6035 <limits.h>, <stdint.h>, and <wchar.h>.
6036 * known-headers.h: Likewise.
6038 2017-11-20 David Malcolm <dmalcolm@redhat.com>
6040 * c-common.h (enum lookup_name_fuzzy_kind): Move to name-hint.h.
6041 (lookup_name_fuzzy): Likewise. Convert return type from
6042 const char * to name_hint. Add location_t param.
6043 * name-hint.h: New header.
6045 2017-11-19 Jakub Jelinek <jakub@redhat.com>
6049 * c-common.h (c_fully_fold): Add LVAL argument defaulted to false.
6051 2017-11-16 Joseph Myers <joseph@codesourcery.com>
6053 * c.opt (-std=c17, std=gnu17, -std=iso9899:2017): Refer to 2018
6054 expected publication date of C17.
6055 (-std=c18, -std=gnu18, -std=iso9899:2018): New option aliases.
6057 2017-11-15 Joseph Myers <joseph@codesourcery.com>
6060 * c-common.c (c_common_reswords): Add __builtin_tgmath.
6061 * c-common.h (enum rid): Add RID_BUILTIN_TGMATH.
6063 2017-11-10 Martin Sebor <msebor@redhat.com>
6066 * c-common.c (catenate_strings): Use memcpy instead of strncpy.
6067 * c-warn.c (sizeof_pointer_memaccess_warning): Handle arrays.
6068 * c.opt (-Wstringop-truncation): New option.
6070 2017-11-06 Martin Liska <mliska@suse.cz>
6073 * c-opts.c (c_common_post_options): Set -Wreturn-type for C++
6075 * c.opt: Set default value of warn_return_type.
6077 2017-10-31 David Malcolm <dmalcolm@redhat.com>
6079 * c-common.c (binary_op_error): Update for renaming of
6081 (c_parse_error): Likewise.
6082 * c-warn.c (warn_logical_not_parentheses): Likewise for
6083 renaming of inform_at_rich_loc.
6084 (warn_for_restrict): Likewise for renaming of
6085 warning_at_rich_loc_n.
6087 2017-10-30 Joseph Myers <joseph@codesourcery.com>
6089 * c.opt (std=c17, std=gnu17, std=iso9899:2017): New options.
6090 * c-opts.c (set_std_c17): New function.
6091 (c_common_init_options): Use gnu17 as default C version.
6092 (c_common_handle_option): Handle -std=c17 and -std=gnu17.
6094 2017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
6096 * c-cppbuiltin.c (mode_has_fma): Add support for PowerPC KFmode.
6097 (c_cpp_builtins): If a machine has a fast fma _Float<N> and
6098 _Float<N>X variant, define __FP_FAST_FMA<N> and/or
6101 2017-10-23 Marek Polacek <polacek@redhat.com>
6104 * c-warn.c (warnings_for_convert_and_check): Fix typos.
6106 2017-10-19 Eric Botcazou <ebotcazou@adacore.com>
6108 * c-common.c (check_builtin_function_arguments): Also check arguments
6109 of __builtin_alloca_with_align_and_max.
6111 2017-10-17 David Malcolm <dmalcolm@redhat.com>
6113 * c-format.c (format_warning_at_char): Pass UNKNOWN_LOCATION
6114 rather than NULL to format_warning_va.
6115 (check_format_types): Likewise when calling format_type_warning.
6116 Remove code to extract source_ranges and source_range * in favor
6117 of just a location_t.
6118 (format_type_warning): Convert source_range * param to a
6121 2017-10-13 Jakub Jelinek <jakub@redhat.com>
6123 * c-gimplify.c (c_gimplify_expr): Handle [LR]ROTATE_EXPR like
6126 2017-10-12 David Malcolm <dmalcolm@redhat.com>
6128 * c-common.c (enum missing_token_insertion_kind): New enum.
6129 (get_missing_token_insertion_kind): New function.
6130 (maybe_suggest_missing_token_insertion): New function.
6131 * c-common.h (maybe_suggest_missing_token_insertion): New decl.
6133 2017-10-11 Nathan Sidwell <nathan@acm.org>
6135 * c-opts.c (add_prefixed_path): Change chain to incpath_kind.
6136 (c_common_handle_option): Update incpath_kind names.
6138 2017-10-11 Martin Liska <mliska@suse.cz>
6141 * c-attribs.c (handle_no_sanitize_attribute): Report directly
6142 Wattributes warning.
6144 2017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
6146 * c-ada-spec.c (dump_generic_ada_node): Use wi::to_wide when
6147 operating on trees as wide_ints.
6148 * c-common.c (pointer_int_sum): Likewise.
6149 * c-pretty-print.c (pp_c_integer_constant): Likewise.
6150 * c-warn.c (match_case_to_enum_1): Likewise.
6151 (c_do_switch_warnings): Likewise.
6152 (maybe_warn_shift_overflow): Likewise.
6154 2017-10-10 Jakub Jelinek <jakub@redhat.com>
6157 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_wide
6158 instead of wide_int::from.
6160 2017-10-06 Jakub Jelinek <jakub@redhat.com>
6163 * c-warn.c (warn_tautological_bitwise_comparison): Instead of
6164 using to_widest use wide_int with the larger of the two precisions.
6166 2017-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
6168 * c-pretty-print.c (pp_c_parameter_type_list): Print ... for variadic
6171 2017-10-02 Richard Sandiford <richard.sandiford@linaro.org>
6173 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_widest
6174 when combining the original unconverted comparison operands.
6176 2017-09-29 Jakub Jelinek <jakub@redhat.com>
6178 * c-attribs.c (handle_noipa_attribute): Don't add "stack_protect"
6181 2017-09-29 Eric Botcazou <ebotcazou@adacore.com>
6183 * c-ada-spec.c (to_ada_name): Add index parameter.
6184 (pp_ada_tree_identifier): Likewise.
6185 (dump_ada_macros): Adjust call to to_ada_name.
6186 (struct overloaded_name_hash): New type.
6187 (struct overloaded_name_hasher): Likewise.
6188 (overloaded_names): New hash table.
6189 (compute_overloading_index): New function.
6190 (dump_ada_decl_name): Call it and pass the result to
6191 pp_ada_tree_identifier.
6192 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
6193 (dump_ada_function_declaration): Likewise.
6194 (dump_generic_ada_node): Likewise.
6195 (print_constructor): Likewise.
6196 (print_destructor): Likewise.
6197 (dump_ada_specs): Delete overloaded_names table.
6199 2017-09-29 Eric Botcazou <ebotcazou@adacore.com>
6201 * c-ada-spec.c (max_ada_macros): Move around.
6202 (store_ada_macro_index): Likewise.
6203 (source_file): Rename into...
6204 (macro_source_file): ...this.
6205 (count_ada_macro): Move around.
6206 (store_ada_macro): Likewise.
6207 (compare_macro): Likewise.
6208 (print_ada_macros): Merge in...
6209 (dump_ada_macros): ...this.
6210 (source_file_base): Rename into...
6211 (current_source_file): ...this.
6212 (print_comment): Move around.
6213 (dump_ada_nodes): Call dump_ada_declaration directly.
6214 (struct with): Change type of limited field to bool.
6215 (append_withs): Change type of limited_access parameter to bool.
6216 (pp_ada_tree_identifie): Likewise.
6217 (dump_ada_decl_nam): Likewise.
6218 (dump_generic_ada_node): Likewise. Do not print the return type.
6219 (to_ada_name): Change type of space_found parameter to bool.
6220 (dump_ada_function_declaration): Return void and change type of
6221 parameters to bool. Also print the return type for a function.
6222 (print_ada_methods): Rename into...
6223 (dump_ada_methods): ...this.
6224 (print_ada_declaration): Rename into ...
6225 (dump_ada_declaration): ...this. Do not print the return type.
6226 (print_ada_struct_decl): Rename into...
6227 (dump_ada_struct_decl): ...this.
6229 2017-09-29 Jakub Jelinek <jakub@redhat.com>
6231 * c-attribs.c (handle_packed_attribute): Test DECL_C_BIT_FIELD
6232 rather than DECL_INITIAL.
6233 (common_handle_aligned_attribute): Likewise.
6235 2017-09-20 Alexandre Oliva <aoliva@redhat.com>
6237 * c.opt (gen-decls): Add RejectNegative.
6239 2017-09-15 Andrew Sutton <andrew.n.sutton@gmail.com>
6240 Jakub Jelinek <jakub@redhat.com>
6242 Add support for -std=c++2a.
6243 * c-common.h (cxx_dialect): Add cxx2a as a dialect.
6244 * opt.c: Add options for -std=c++2a and -std=gnu++2a.
6245 * c-opts.c (set_std_cxx2a): New.
6246 (c_common_handle_option): Set options when -std=c++2a is enabled.
6247 (c_common_post_options): Adjust comments.
6248 (set_std_cxx14, set_std_cxx17): Likewise.
6250 2017-09-15 Eric Botcazou <ebotcazou@adacore.com>
6252 * c-pragma.c (handle_pragma_scalar_storage_order): Expand on error
6253 message for non-uniform endianness and issue a warning in C++.
6255 2017-09-15 Jakub Jelinek <jakub@redhat.com>
6257 * c.opt (Wc++1z-compat): Change from option to undocumented alias.
6258 (Wc++17-compat): Change from undocumented alias to option.
6259 (Wnoexcept-type): Enable by Wc++17-compat instead of Wc++1z-compat,
6260 change C++1z to C++17 in description.
6261 (std=c++1z, std=gnu++1z): Change from option to undocumented
6263 (std=c++17, std=gnu++17): Change from undocumented alias to option.
6265 * c-common.h (enum cxx_dialect): Rename cxx1z to cxx17.
6266 * c-opts.c (set_std_cxx1z): Rename to ...
6267 (set_std_cxx17): ... this.
6268 (c_common_handle_option): Rename OPT_std_c__1z to OPT_std_c__17
6269 and OPT_std_gnu__1z to OPT_std_gnu__17. Adjust set_std_cxx1z
6271 (c_common_post_options): Use cxx17 instead of cxx1z. Adjust
6274 2017-09-12 H.J. Lu <hongjiu.lu@intel.com>
6276 * c-attribs.c (common_handle_aligned_attribute): Don't warn
6277 function alignment if warn_if_not_aligned_p is true.
6279 2017-09-12 Nathan Sidwell <nathan@acm.org>
6281 * c-common.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
6282 resort_sorted_fields): Move to c/c-decl.c.
6283 * c-common.h (field_decl_cmp, resort_sorted_fields): Delete.
6284 (struct sorted_fields_type): Move to c/c-lang.h.
6286 2017-09-09 Jonathan Wakely <jwakely@redhat.com>
6289 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_threadsafe_static_init.
6291 2017-09-04 Marek Polacek <polacek@redhat.com>
6294 * c-warn.c (warn_tautological_bitwise_comparison): New function.
6295 (warn_tautological_cmp): Call it.
6297 2017-09-01 Boris Kolpackov <boris@codesynthesis.com>
6299 * c-opts.c (c_common_finish): Write dependency information even if
6302 2017-09-01 Jakub Jelinek <jakub@redhat.com>
6305 * c-pragma.c (omp_pragmas): Move "ordered" entry from here to ...
6306 (omp_pragmas_simd): ... here.
6307 * c-omp.c (c_finish_omp_ordered): If clauses isn't simd clause alone,
6308 create new clauses list containing just simd clause.
6310 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
6311 Alan Hayward <alan.hayward@arm.com>
6312 David Sherwood <david.sherwood@arm.com>
6314 * c-attribs.c (vector_mode_valid_p) Fold GET_MODE_INNER call
6315 into scalar_mode_supported_p call.
6316 (handle_mode_attribute): Update call to scalar_mode_supported_p.
6318 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
6319 Alan Hayward <alan.hayward@arm.com>
6320 David Sherwood <david.sherwood@arm.com>
6322 * c-common.c (c_common_fixed_point_type_for_size): Use opt_scalar_mode
6323 for the mode iterator.
6325 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
6326 Alan Hayward <alan.hayward@arm.com>
6327 David Sherwood <david.sherwood@arm.com>
6329 * c-lex.c (interpret_fixed): Use SCALAR_TYPE_MODE.
6330 * c-common.c (c_build_vec_perm_expr): Likewise.
6332 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
6333 Alan Hayward <alan.hayward@arm.com>
6334 David Sherwood <david.sherwood@arm.com>
6336 * c-common.c (c_common_type_for_mode): Use as_a <scalar_int_mode>.
6338 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
6339 Alan Hayward <alan.hayward@arm.com>
6340 David Sherwood <david.sherwood@arm.com>
6342 * c-attribs.c (handle_mode_attribute): Check for a scalar_int_mode
6343 before calling targetm.addr_space.valid_pointer_mode.
6345 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
6346 Alan Hayward <alan.hayward@arm.com>
6347 David Sherwood <david.sherwood@arm.com>
6349 * c-cppbuiltin.c (c_cpp_builtins): Use opt_scalar_float_mode.
6351 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
6352 Alan Hayward <alan.hayward@arm.com>
6353 David Sherwood <david.sherwood@arm.com>
6355 * c-common.c (c_common_fixed_point_type_for_size): Use new mode
6357 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
6359 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
6360 Alan Hayward <alan.hayward@arm.com>
6361 David Sherwood <david.sherwood@arm.com>
6363 * c-cppbuiltin.c (mode_has_fma): Prefix mode names with E_ in
6366 2017-08-29 Martin Liska <mliska@suse.cz>
6369 * c-common.c (parse_optimize_options): Add argument to function
6371 * c-pragma.c (handle_pragma_diagnostic): Likewise.
6373 2017-08-24 David Malcolm <dmalcolm@redhat.com>
6375 * c-lex.c (interpret_float): Use token location
6376 when building an EXCESS_PRECISION_EXPR.
6378 2017-08-21 David Malcolm <dmalcolm@redhat.com>
6380 * c-common.c (check_function_arguments): Add "arglogs" param; pass
6381 it to check_function_format.
6382 * c-common.h (check_function_arguments): Add vec<location_t> *
6384 (check_function_format): Likewise.
6385 * c-format.c (struct format_check_context): Add field "arglocs".
6386 (check_function_format): Add param "arglocs"; pass it to
6388 (check_format_info): Add param "arglocs"; use it to initialize
6389 new field of format_ctx.
6390 (check_format_arg): Pass format_ctx->arglocs to new param of
6391 check_format_info_main.
6392 (class argument_parser): New field "arglocs".
6393 (argument_parser::argument_parser): Add "arglocs_" param and use
6394 it to initialize new field.
6395 (argument_parser::check_argument_type): Pass new arglocs field to
6397 (check_format_info_main): Add param "arglocs", and use it when
6398 constructing arg_parser.
6399 (check_format_types): Add param "arglocs"; use it if non-NULL when
6400 !EXPR_HAS_LOCATION (cur_param) to get at location information.
6402 2017-08-18 H.J. Lu <hongjiu.lu@intel.com>
6405 * c-attribs.c (handle_warn_if_not_aligned_attribute): New.
6406 (c_common_attribute_table): Add warn_if_not_aligned.
6407 (handle_aligned_attribute): Renamed to ...
6408 (common_handle_aligned_attribute): Remove argument, name, and add
6409 argument, warn_if_not_aligned. Handle warn_if_not_aligned.
6410 (handle_aligned_attribute): New.
6411 * c.opt: Add -Wif-not-aligned and -Wpacked-not-aligned.
6413 2017-08-14 Martin Sebor <msebor@redhat.com>
6416 * c-attribs.c (c_common_attribute_table): Add nonstring entry.
6417 (handle_nonstring_attribute): New function.
6419 2017-08-14 Martin Sebor <msebor@redhat.com>
6422 * c-format.h (T89_G): New macro.
6423 * c-format.c (local_gcall_ptr_node): New variable.
6424 (init_dynamic_diag_info): Initialize it.
6426 2017-08-11 Martin Liska <mliska@suse.cz>
6428 * c-opts.c (c_common_post_options): Replace ASM_OUTPUT_DEF with
6429 TARGET_SUPPORTS_ALIASES.
6431 2017-08-10 David Malcolm <dmalcolm@redhat.com>
6433 * c-common.c (c_parse_error): Add rich_location * param, using it
6434 rather implicitly using input_location.
6435 * c-common.h (c_parse_error): Add rich_location * param.
6437 2017-08-09 Marek Polacek <polacek@redhat.com>
6439 * c-common.c (pointer_int_sum): Use true/false instead of 1/0.
6440 (c_common_truthvalue_conversion): Likewise.
6441 * c-omp.c (c_finish_omp_atomic): Likewise.
6442 * c-common.h (build_binary_op): Update declaration.
6444 2017-08-08 Martin Liska <mliska@suse.cz>
6446 * c-ada-spec.c: Include header files.
6447 * c-ubsan.c: Likewise.
6448 * c-warn.c: Likewise.
6450 2017-08-07 Jakub Jelinek <jakub@redhat.com>
6453 * c-omp.c (c_finish_omp_atomic): Handle atomics on bitfields.
6455 2017-08-07 Eric Botcazou <ebotcazou@adacore.com>
6457 * c-ada-spec.c (has_nontrivial_methods): Test for FUNCTION_DECL.
6458 (print_ada_methods): Likewise.
6459 (print_ada_declaration): Likewise.
6461 2017-08-07 Martin Liska <mliska@suse.cz>
6463 * array-notation-common.c: Add new includes.
6464 * c-format.c( handle_format_attribute): Canonicalize a format
6466 * c-lex.c (c_common_has_attribute): Canonicalize name of an
6468 * c-pretty-print.c: Add new include.
6470 2017-08-05 Eric Botcazou <ebotcazou@adacore.com>
6472 * c-ada-spec.c (has_static_fields): Look only into variables.
6473 (print_constructor): Add TYPE parameter and use it for the name.
6474 (print_destructor): Likewise.
6475 (print_ada_declaration): Adjust to new constructor/destructor names.
6476 Adjust calls to print_constructor and print_destructor.
6477 (print_ada_struct_decl): Do not test TREE_STATIC on FIELD_DECL.
6478 Look only into variables in the final loop.
6480 2017-08-01 Eric Botcazou <ebotcazou@adacore.com>
6482 * c-ada-spec.c (has_static_fields): Look only into fields.
6483 (dump_generic_ada_node): Small tweak.
6484 (dump_nested_types): Look only into fields.
6485 (print_ada_declaration): Look only into methods. Small tweak.
6486 (print_ada_struct_decl): Look only into fields. Use DECL_VIRTUAL_P.
6488 2017-08-01 Eric Botcazou <ebotcazou@adacore.com>
6490 * c-ada-spec.c (print_generic_ada_decl): Pass correctly-typed constant.
6491 (dump_ada_function_declaration): Likewise.
6492 (dump_generic_ada_node): Likewise.
6493 (print_ada_declaration): Add support for const-qualified variables.
6495 2017-07-31 Martin Liska <mliska@suse.cz>
6498 * c-ubsan.c (ubsan_maybe_instrument_array_ref):
6499 Guard condition with flag_sanitize_p also with current_function_decl
6501 (ubsan_maybe_instrument_reference_or_call): Likewise.
6503 2017-07-30 Uros Bizjak <ubizjak@gmail.com>
6505 * c-format.c (asm_fprintf_char_table): Add 'z' to format_chars.
6507 2017-07-29 Eric Botcazou <ebotcazou@adacore.com>
6509 * c-ada-spec.c (dump_generic_ada_node): Take into account signedness
6511 (print_ada_declaration): Add missing guard for record types.
6513 2017-07-27 Jakub Jelinek <jakub@redhat.com>
6516 * c-omp.c (c_finish_omp_for): If the condition is wrapped in
6517 rhs of COMPOUND_EXPR(s), skip them and readd their lhs into
6518 new COMPOUND_EXPRs around the rhs of the comparison.
6520 2017-07-27 Marek Polacek <polacek@redhat.com>
6523 * c-warn.c (warn_for_sign_compare): Tweak the warning message. Print
6526 2017-07-27 Jakub Jelinek <jakub@redhat.com>
6528 * c-attribs.c (c_common_attribute_table): Add noipa attribute.
6529 (handle_noipa_attribute): New function.
6531 2017-07-07 Torsten Duwe <duwe@suse.de>
6533 * c-attribs.c (c_common_attribute_table): Add entry for
6534 "patchable_function_entry".
6536 2017-07-20 Nathan Sidwell <nathan@acm.org>
6538 Remove TYPE_METHODS.
6539 * c-ada-spec.c (is_tagged_type, has_nontrivial_methods,
6540 dump_ada_template, print_ada_methods,
6541 print_ada_declaration): Member fns are on TYPE_FIELDS.
6543 2017-07-18 Nathan Sidwell <nathan@acm.org>
6545 * c-warn.c (warn_for_memset): Use TYPE_{MIN,MAX}_VALUE.
6547 2017-07-14 David Malcolm <dmalcolm@redhat.com>
6549 * c-common.c (try_to_locate_new_include_insertion_point): New
6551 (per_file_includes_t): New typedef.
6552 (added_includes_t): New typedef.
6553 (added_includes): New variable.
6554 (maybe_add_include_fixit): New function.
6555 * c-common.h (maybe_add_include_fixit): New decl.
6557 2017-07-10 Martin Sebor <msebor@redhat.com>
6560 * c.opt (-Wstringop-overflow): Set defaults in LangEnabledBy.
6562 2017-07-06 David Malcolm <dmalcolm@redhat.com>
6564 * c-common.c (selftest::c_family_tests): New.
6565 * c-common.h (selftest::run_c_tests): Move decl to c/c-lang.h.
6566 (selftest::c_family_tests): New decl.
6568 2017-07-04 Marek Polacek <polacek@redhat.com>
6571 * c-common.c (sync_resolve_size): Give error for pointers to incomplete
6574 2017-07-04 Marek Polacek <polacek@redhat.com>
6576 * c-warn.c (warn_if_unused_value): Remove WITH_CLEANUP_EXPR handling.
6578 2017-06-28 Martin Liska <mliska@suse.cz>
6581 * c-attribs.c (handle_alias_ifunc_attribute): Append ifunc alias
6582 to a function declaration.
6584 2017-06-28 Martin Liska <mliska@suse.cz>
6587 * c.opt: Add IntegerRange to various options.
6589 2017-06-26 Marek Polacek <polacek@redhat.com>
6592 * c-common.h (warn_for_multistatement_macros): Declare.
6593 * c-warn.c: Include "c-family/c-indentation.h".
6594 (warn_for_multistatement_macros): New function.
6595 * c.opt (Wmultistatement-macros): New option.
6596 * c-indentation.c (guard_tinfo_to_string): No longer static.
6597 Change the parameter type to "enum rid". Handle RID_SWITCH.
6598 * c-indentation.h (guard_tinfo_to_string): Declare.
6600 2017-06-23 Marc Glisse <marc.glisse@inria.fr>
6602 * c-common.c (c_common_nodes_and_builtins): Use builtin_structptr_types.
6604 2017-06-15 Martin Sebor <msebor@redhat.com>
6607 * c.opt (-Wclass-memaccess): New option.
6609 2017-06-14 Boris Kolpackov <boris@codesynthesis.com>
6611 * c-opts.c (c_common_finish): Handle '-' special value to -MF.
6613 2017-06-13 Marek Polacek <polacek@redhat.com>
6616 * c-warn.c (do_warn_duplicated_branches): Return if any of the
6619 2017-06-13 Martin Liska <mliska@suse.cz>
6622 * c-attribs.c (add_no_sanitize_value): New function.
6623 (handle_no_sanitize_attribute): Likewise.
6624 (handle_no_sanitize_address_attribute): Use the function.
6625 (handle_no_sanitize_thread_attribute): New function.
6626 (handle_no_address_safety_analysis_attribute): Use
6627 add_no_sanitize_value.
6628 (handle_no_sanitize_undefined_attribute): Likewise.
6629 * c-common.h: Declare new functions.
6630 * c-ubsan.c (ubsan_instrument_division): Use sanitize_flags_p.
6631 (ubsan_instrument_shift): Likewise.
6632 (ubsan_instrument_bounds): Likewise.
6633 (ubsan_maybe_instrument_array_ref): Likewise.
6634 (ubsan_maybe_instrument_reference_or_call): Likewise.
6636 2017-06-11 Jason Merrill <jason@redhat.com>
6638 * c-ada-spec.c, c-pragma.c: Use id_equal.
6640 2017-06-04 Marek Polacek <polacek@redhat.com>
6643 * c-format.c (matching_type_p): Return false if any of the types
6644 requires structural equality.
6646 2017-06-02 Martin Sebor <msebor@redhat.com>
6649 * c-warn.c (conversion_warning): Use -Wconversion for integer
6650 conversion and -Wfloat-conversion for floating one.
6652 2017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
6654 * c.opt (Wsizeof-pointer-div): New warning option.
6656 2017-06-01 Volker Reichelt <v.reichelt@netcologne.de>
6658 * c.opt (Wcatch-value): New shortcut for Wcatch-value=1.
6659 (Wcatch-value=1): Enable by -Wall.
6661 2017-05-30 David Malcolm <dmalcolm@redhat.com>
6663 * c-format.c (gcc_cxxdiag_char_table): Add 'H' and 'I' to
6665 * c.opt (fdiagnostics-show-template-tree): New option.
6666 (felide-type): New option.
6668 2017-05-25 Volker Reichelt <v.reichelt@netcologne.de>
6670 * c.opt (Wcatch-value=): New C++ warning flag.
6672 2017-05-24 Nathan Sidwell <nathan@acm.org>
6674 * c=common.c (field_decl_cmp, resort_field_decl_cmp): Adjust T
6675 const casts to avoid warning.
6677 2017-05-24 Martin Sebor <msebor@redhat.com>
6680 * c-common.h (unsafe_conversion_p): Add a function argument.
6681 * c-common.c (unsafe_conversion_p): Same.
6682 Add type names and values to diagnostics.
6683 (scalar_to_vector): Adjust.
6684 * c-warn.c (constant_expression_error): Add a function argument.
6685 Add type names and values to diagnostics.
6686 (conversion_warning): Add a function argument.
6687 Add type names and values to diagnostics.
6688 (warnings_for_convert_and_check): Same.
6690 2017-05-19 Jason Merrill <jason@redhat.com>
6692 * c-warn.c (match_case_to_enum_1): Don't warn about enums with no
6695 2017-05-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
6697 * c-format.c (locus): Move out of function scope,
6700 2017-05-19 Nathan Sidwell <nathan@acm.org>
6702 * c-opts.c (class_dump_file, class_dump_flags): Delete.
6703 (c_common_parse_file): Remove class dump handling.
6704 (get_dump_info): Likewise.
6706 2017-05-19 Richard Biener <rguenther@suse.de>
6709 * c-warn.c (strict_aliasing_warning): Do not warn for accesses
6710 to alias-set zero memory.
6712 2017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
6714 * c-format.c (local_tree_type_node): Add GTY attribute.
6716 2017-05-18 Marek Polacek <polacek@redhat.com>
6718 * c-common.c (c_common_type_for_size): Use NULL_TREE instead of 0.
6719 (c_common_fixed_point_type_for_size): Likewise.
6720 (c_common_type_for_mode): Likewise.
6721 (shorten_compare): Likewise.
6722 (c_promoting_integer_type_p): Use false/true instead of 0/1.
6723 * c-pragma.c (maybe_apply_renaming_pragma): Use NULL_TREE instead of 0.
6725 2017-05-18 Marek Polacek <polacek@redhat.com>
6727 * c-common.c (self_promoting_args_p): Change the return type to bool.
6728 Use false/true instead of 0/1.
6729 * c-common.h (self_promoting_args_p): Update.
6731 2017-05-17 Marek Polacek <polacek@redhat.com>
6733 * c-common.c: Use NULL_TREE instead of 0 where appropriate.
6734 * c-warn.c: Likewise.
6736 2017-05-17 Ville Voutilainen <ville.voutilainen@gmail.com>
6738 Implement new C++ intrinsics __is_assignable and __is_constructible.
6739 * c-common.c (__is_assignable, __is_constructible): New.
6740 * c-common.h (RID_IS_ASSIGNABLE, RID_IS_CONSTRUCTIBLE): Likewise.
6742 2017-05-17 Martin Liska <mliska@suse.cz>
6744 * c-common.h: Introduce dump_flags_t type and
6745 use it instead of int type.
6746 * c-gimplify.c (c_genericize): Likewise.
6747 * c-opts.c: Likewise.
6749 2017-05-17 Marek Polacek <polacek@redhat.com>
6751 * c-common.c (c_save_expr): Remove.
6752 (c_common_truthvalue_conversion): Remove a call to c_save_expr.
6753 * c-common.h (c_save_expr): Remove declaration.
6755 2017-05-09 Volker Reichelt <v.reichelt@netcologne.de>
6758 * c-pretty-print.c (c_pretty_printer::expression): Handle MAX_EXPR,
6759 MIN_EXPR, EXACT_DIV_EXPR, RDIV_EXPR, LROTATE_EXPR, RROTATE_EXPR.
6760 (c_pretty_printer::postfix_expression): Handle MAX_EXPR, MIN_EXPR.
6761 (c_pretty_printer::multiplicative_expression): Handle EXACT_DIV_EXPR,
6763 (pp_c_shift_expression): Handle LROTATE_EXPR, RROTATE_EXPR.
6765 2017-05-09 Marek Polacek <polacek@redhat.com>
6768 * c-warn.c (unwrap_c_maybe_const): New.
6769 (warn_logical_operator): Call it.
6771 2017-05-09 Nathan Sidwell <nathan@acm.org>
6773 * c-common.c (c_register_builtin_type): Use pushdecl lang_hook.
6774 * c-common.h (pushdecl_top_level, pushdecl): Don't declare here.
6776 2017-05-08 Martin Sebor <msebor@redhat.com>
6778 PR translation/80280
6779 * c-format.h (struct format_flag_spec): Add new member.
6781 * c-format.c (local_tree_type_node): New global.
6782 (printf_flag_specs, asm_fprintf_flag_spec): Initialize new data.
6783 (gcc_diag_flag_specs, scanf_flag_specs, strftime_flag_specs): Ditto.
6784 (strfmon_flag_specs): Likewise.
6785 (gcc_diag_char_table, gcc_cdiag_char_table): Split up specifiers
6786 with distinct quoting properties.
6787 (gcc_tdiag_char_table, gcc_cxxdiag_char_table): Same.
6788 (flag_chars_t::validate): Add argument and handle bad quoting.
6789 (check_format_info_main): Handle quoting problems.
6790 (init_dynamic_diag_info): Simplify.
6792 2017-05-08 Jason Merrill <jason@redhat.com>
6794 * c-opts.c (c_common_post_options): Update defaults for
6795 flag_abi_version and flag_abi_compat_version.
6797 2017-05-05 David Malcolm <dmalcolm@redhat.com>
6799 * c-common.c (c_cpp_error): Replace report_diagnostic
6800 with diagnostic_report_diagnostic.
6802 2017-05-04 Martin Sebor <msebor@redhat.com>
6804 PR translation/80280
6805 * c-attribs.c (handle_alias_ifunc_attribute): Quote a %D directive.
6806 (handle_weakref_attribute): Same.
6808 2017-05-03 Nathan Sidwell <nathan@acm.org>
6810 Canonicalize canonical type hashing
6811 * c-common.c (complete_array_type): Use type_hash_canon.
6813 2017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
6816 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): Remove
6818 (cilk_install_body_pedigree_operations): Likewise.
6819 * cilk.c (cilk_set_spawn_marker): Mark functions that should be
6821 (cilk_gimplify_call_params_in_spawned_fn): Remove.
6822 (cilk_install_body_pedigree_operations): Likewise.
6823 (gimplify_cilk_spawn): Add EXPR_STMT and CLEANUP_POINT_EXPR
6826 2017-04-27 Jakub Jelinek <jakub@redhat.com>
6829 * c-common.c (complete_array_type): Only hash TYPE_TYPELESS_STORAGE
6830 flag on non-aggregate element types.
6832 2017-04-25 Bernd Edlinger <bernd.edlinger@hotmail.de>
6834 * c-common.c (c_type_hasher, type_hash_table): Remove.
6835 (c_common_get_alias_set): Remove unreachable code.
6836 * c-opts.c (c_common_post_options): Make sure cc1 takes only one file.
6838 2017-04-20 Volker Reichelt <v.reichelt@netcologne.de>
6840 * c.opt (Wextra-semi): New C++ warning flag.
6842 2017-04-20 Jakub Jelinek <jakub@redhat.com>
6845 * c-common.c (complete_array_type): Preserve TYPE_TYPELESS_STORAGE.
6847 2017-04-18 Jakub Jelinek <jakub@redhat.com>
6851 * c-common.c (c_common_type_for_mode): Don't handle
6852 widest_*_literal_type_node here.
6853 c_common_signed_or_unsigned_type): Likewise.
6854 (c_common_nodes_and_builtins): Set widest_*_literal_type_node
6855 to *intTI_type_node or *intDI_type_node depending on whether
6856 TImode is supported by the target or not.
6858 2017-04-10 Martin Liska <mliska@suse.cz>
6861 * c-ubsan.c (ubsan_instrument_shift): Evaluate RHS before
6862 doing an UBSAN check.
6864 2017-04-03 Jonathan Wakely <jwakely@redhat.com>
6866 * c-warn.c (do_warn_double_promotion): Fix typo in comment.
6868 2017-03-31 Jakub Jelinek <jakub@redhat.com>
6871 * c-ubsan.h (ubsan_maybe_instrument_reference): Change argument to
6873 * c-ubsan.c (ubsan_maybe_instrument_reference): Likewise. Handle
6874 not just NOP_EXPR to REFERENCE_TYPE, but also INTEGER_CST with
6877 2017-03-31 David Malcolm <dmalcolm@redhat.com>
6879 PR documentation/78732
6880 * c.opt (Wendif-labels): Fix description to refer to
6881 #else rather than #elif.
6883 2017-03-31 Jakub Jelinek <jakub@redhat.com>
6886 * c-common.h (enum rid): Add RID_IS_AGGREGATE.
6887 * c-common.c (c_common_reswords): Add __is_aggregate trait.
6889 2017-03-27 Jakub Jelinek <jakub@redhat.com>
6892 * c-common.c (c_common_mark_addressable_vec): Don't set
6893 TREE_ADDRESSABLE on DECL_HARD_REGISTER.
6895 2017-03-21 Martin Sebor <msebor@redhat.com>
6898 * c-common.c (set_underlying_type): Mark type used only when
6899 original del is declared unused.
6901 2017-03-10 David Malcolm <dmalcolm@redhat.com>
6903 PR translation/79848
6904 * c-format.c (check_format_string): Simplify uses of "%<%s%>" to
6907 2017-03-10 David Malcolm <dmalcolm@redhat.com>
6910 * c-indentation.c (warn_for_misleading_indentation): Remove parens
6911 from inform's message, so that xgettext can locate it.
6913 2017-03-09 Marek Polacek <polacek@redhat.com>
6917 * c-attribs.c (handle_nonnull_attribute): Save the result of default
6918 conversion to the attribute list.
6920 2017-03-09 Martin Liska <mliska@suse.cz>
6922 * c-ada-spec.c (macro_length): Increment value instead of a pointer.
6924 2017-03-03 Jason Merrill <jason@redhat.com>
6926 * c.opt (Wnoexcept-type): New.
6928 2017-03-02 Richard Biener <rguenther@suse.de>
6931 * c-common.c (c_common_mark_addressable_vec): Look through
6934 2017-02-28 Martin Liska <mliska@suse.cz>
6936 * c.opt: Replace space with tabular for options of <number>
6939 2017-02-28 Martin Liska <mliska@suse.cz>
6941 * c.opt: Fix --help=option -Q for options which are of
6944 2017-02-24 Jakub Jelinek <jakub@redhat.com>
6947 * c-common.c (check_function_restrict): New function.
6948 (check_function_arguments): Add FNDECL argument. Call
6949 check_function_restrict if -Wrestrict.
6950 * c-warn.c (warn_for_restrict): Remove ARGS argument, add ARGARRAY
6951 and NARGS. Use auto_vec for ARG_POSITIONS, simplify.
6952 * c-common.h (check_function_arguments): Add FNDECL argument.
6953 (warn_for_restrict): Remove ARGS argument, add ARGARRAY and NARGS.
6955 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
6957 * c-ada-spec.c (dump_ada_function_declaration): Add comment about the
6958 treatment of parameters with pointer-to-tagged type and tidy up.
6959 (print_ada_methods): Remove the special treatment of C++ static member
6962 2017-02-22 Martin Liska <mliska@suse.cz>
6964 * c.opt: Replace inequality signs with square brackets
6967 2017-02-21 Jakub Jelinek <jakub@redhat.com>
6970 * c-attribs.c (handle_mode_attribute): Use build_qualified_type to
6973 2017-02-17 Joseph Myers <joseph@codesourcery.com>
6975 * c-cppbuiltin.c (builtin_define_float_constants): Define
6976 __DECIMAL_DIG__ to the value for long double.
6978 2017-02-15 Marek Polacek <polacek@redhat.com>
6981 * c-warn.c (do_warn_double_promotion): Don't warn if an invalid
6982 conversion has occured.
6984 2017-01-24 David Malcolm <dmalcolm@redhat.com>
6986 * c-common.c (c_common_reswords): Add "__RTL".
6987 * c-common.h (enum rid): Add RID_RTL.
6989 2017-01-20 Marek Polacek <polacek@redhat.com>
6992 * c-common.h (do_warn_duplicated_branches_r): Declare.
6993 * c-gimplify.c (c_genericize): Walk the function tree calling
6994 do_warn_duplicated_branches_r.
6995 * c-warn.c (expr_from_macro_expansion_r): New.
6996 (do_warn_duplicated_branches): New.
6997 (do_warn_duplicated_branches_r): New.
6998 * c.opt (Wduplicated-branches): New option.
7000 2017-01-17 David Malcolm <dmalcolm@redhat.com>
7003 * c-indentation.c (warn_for_misleading_indentation): Use the past
7004 subjunctive in the note.
7006 2017-01-17 Aldy Hernandez <aldyh@redhat.com>
7009 * array-notation-common.c (cilkplus_extract_an_triplets): Convert
7010 start type to integer_type.
7012 2017-01-16 Jakub Jelinek <jakub@redhat.com>
7015 * c.opt (gen-decls): Add Driver flag.
7017 2017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
7020 2017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
7023 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
7025 2017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
7028 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
7030 2017-01-12 Martin Sebor <msebor@redhat.com>
7032 (-Wformat-overflow): ...to this.
7034 2017-01-11 Martin Sebor <msebor@redhat.com>
7037 * c.opt (-Walloca-larger-than, -Wformat-length, -Wformat-truncation):
7038 Also enable for LTO.
7040 2017-01-10 Jason Merrill <jason@redhat.com>
7042 Implement P0195R2, C++17 variadic using.
7043 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_variadic_using.
7045 2017-01-09 Jakub Jelinek <jakub@redhat.com>
7047 PR translation/79019
7048 PR translation/79020
7049 * c.opt (Wnormalized=): Fix typo in description.
7051 2017-01-08 Martin Sebor <msebor@redhat.com>
7054 * c.opt (-Wformat-truncation): New option.
7056 2017-01-06 Alexandre Oliva <aoliva@redhat.com>
7058 * c-pretty-print.c (pp_c_tree_decl_identifier): Convert 16-bit
7059 value to unsigned short to fit in 4 hex digits without
7062 2017-01-05 Eric Botcazou <ebotcazou@adacore.com>
7064 * c.opt (fsso-struct): Add 'native' value.
7066 2017-01-05 Martin Liska <mliska@suse.cz>
7069 * c-opts.c (c_common_post_options): Reject '-' filename for a precompiled
7072 2017-01-04 Marek Polacek <polacek@redhat.com>
7075 * c.opt (Wpointer-compare): New option.
7077 2017-01-04 Jakub Jelinek <jakub@redhat.com>
7080 * c.opt (fsso-struct=): Add RejectNegative.
7082 2017-01-01 Jakub Jelinek <jakub@redhat.com>
7084 Update copyright years.
7086 2016-12-29 Martin Liska <mliska@suse.cz>
7089 * c.opt (strong-eval-order): Add RejectNegative keyword.
7091 2016-12-22 Jason Merrill <jason@redhat.com>
7093 Implement P0522R0, matching of template template arguments.
7094 * c-cppbuiltin.c (c_cpp_builtins): Define
7095 __cpp_template_template_args.
7097 2016-12-21 Jakub Jelinek <jakub@redhat.com>
7100 * c-common.c (struct nonnull_arg_ctx): New type.
7101 (check_function_nonnull): Return bool instead of void. Use
7102 nonnull_arg_ctx as context rather than just location_t.
7103 (check_nonnull_arg): Adjust for the new context type, set
7104 warned_p to true if a warning has been diagnosed.
7105 (check_function_arguments): Return bool instead of void.
7106 * c-common.h (check_function_arguments): Adjust prototype.
7108 2016-12-21 Jason Merrill <jason@redhat.com>
7110 * c.opt (-fnew-ttp-matching): New flag.
7111 * c-opts.c (c_common_post_options): Default on if -std=c++1z.
7113 2016-12-14 Martin Jambor <mjambor@suse.cz>
7115 * c-omp.c: Include omp-general.h instead of omp-low.h.
7116 (c_finish_oacc_wait): Adjusted call to find_omp_clause to use its new
7119 2016-12-14 Martin Sebor <msebor@redhat.com>
7122 * c-common.c (check_nonnull_arg): Disable when optimization
7125 2016-12-12 Marek Polacek <polacek@redhat.com>
7128 * c-common.c (attribute_fallthrough_p): Return false for
7131 2016-12-08 Martin Sebor <msebor@redhat.com>
7134 * c.opt (-Walloc-zero, -Walloc-size-larger-than): New options.
7136 2016-12-08 Martin Sebor <msebor@redhat.com>
7139 * c-pretty-print (pp_c_integer_constant): Avoid formatting type
7142 2016-12-07 Martin Sebor <msebor@redhat.com>
7148 * c.opt (-Wstringop-overflow): New option.
7150 2016-12-02 Maxim Ostapenko <m.ostapenko@samsung.com>
7152 * c-attribs.c (asan odr indicator): New attribute.
7153 (handle_asan_odr_indicator_attribute): New function.
7155 2016-11-26 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
7157 * c-common.c (c_common_nodes_and_builtins): Remove initialization of
7160 2016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
7162 * c-common.c (excess_precision_mode_join): New.
7163 (c_ts18661_flt_eval_method): New.
7164 (c_c11_flt_eval_method): Likewise.
7165 (c_flt_eval_method): Likewise.
7166 * c-common.h (excess_precision_mode_join): New.
7167 (c_flt_eval_method): Likewise.
7168 * c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): New.
7169 (cpp_iec_559_value): Call it.
7170 (c_cpp_builtins): Modify logic for __LIBGCC_*_EXCESS_PRECISION__,
7171 call c_flt_eval_method to set __FLT_EVAL_METHOD__ and
7172 __FLT_EVAL_METHOD_TS_18661_3__.
7174 2016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
7176 * c-opts.c (c_common_post_options): Add logic to handle the default
7177 case for -fpermitted-flt-eval-methods.
7179 2016-11-23 Paolo Bonzini <bonzini@gnu.org>
7181 * c.opt (Wexpansion-to-defined): New.
7183 2016-11-23 Jakub Jelinek <jakub@redhat.com>
7186 * c-pragma.c (handle_pragma_target): Don't replace
7187 current_target_pragma, but chainon the new args to the current one.
7189 2016-11-22 Nathan Sidwell <nathan@acm.org>
7191 * array-notation-common.c (cilkplus_extract_an_trplets): Fix
7192 indentation and formatting.
7194 2016-11-21 Martin Sebor <msebor@redhat.com>
7196 * c.opt (-fprintf-return-value): Enable by default.
7198 2016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
7201 * c.opt (-Wbuiltin-declaration-mismatch): New warning.
7202 * c-common.c (c_common_nodes_and_builtins): Initialize
7203 const_tm_ptr_type_node.
7205 2016-11-16 Marek Polacek <polacek@redhat.com>
7208 * c-common.c (c_add_case_label): Turn error_at calls into inform.
7210 2016-11-14 Jakub Jelinek <jakub@redhat.com>
7212 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_structured_bindings.
7214 2016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
7215 Richard Biener <rguenther@suse.de>
7217 * c-common.h (c_common_resword): Add RID_GIMPLE, RID_PHI types.
7218 * c-common.h (enum rid): Add RID_GIMPLE, RID_PHI.
7219 * c.opt (fgimple): New option.
7221 2016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
7224 * c-common.h (warn_for_restrict): Declare.
7225 * c-warn.c: Include gcc-rich-location.h.
7226 (warn_for_restrict): New function.
7227 * c-format.c (gcc_tdiag_char_table): Add entry for "Z" specifier.
7228 (gcc_cdiag_char_table): Likewise.
7229 (gcc_cxxdiag_char_table): Likewise.
7230 * c.opt (Wrestrict): New option.
7232 2016-11-13 Eric Botcazou <ebotcazou@adacore.com>
7234 * c-ada-spec.c (print_ada_declaration): For typedef declarations, look
7235 for nested types only if the type is a record or union and dump SLOC.
7237 2016-11-09 Jason Merrill <jason@redhat.com>
7239 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_template_auto.
7241 2016-11-09 Jakub Jelinek <jakub@redhat.com>
7243 * c-ubsan.c (ubsan_instrument_shift): Handle split
7244 -fsanitize=shift-base and -fsanitize=shift-exponent.
7246 2016-11-07 Jason Merrill <jason@redhat.com>
7248 * c.opt (Wc++1z-compat): New.
7249 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_noexcept_function_type.
7251 2016-11-07 Martin Liska <mliska@suse.cz>
7253 * c-warn.c (warn_for_unused_label): Save all labels used
7254 in goto or in &label.
7256 2016-11-03 Jason Merrill <jason@redhat.com>
7258 * c-cppbuiltin.c (c_cpp_builtins): Correct
7259 __cpp_inheriting_constructors.
7261 2016-11-01 Jason Merrill <jason@redhat.com>
7263 * c-cppbuiltin.c (c_cpp_builtins): Update
7264 __cpp_inheriting_constructors.
7266 * c.opt (-fnew-inheriting-ctors): New.
7267 * c-opts.c: Default to on for ABI 11+.
7269 2016-10-31 Jakub Jelinek <jakub@redhat.com>
7272 * c.opt (fext-numeric-literals): Add Var and Init.
7273 * c-opts.c (c_common_handle_option): Don't clear
7274 cpp_opts->ext_numeric_literals for -std=c++{11,14,1z}.
7275 (c_common_post_options): Clear it here if not set
7278 2016-10-28 Aldy Hernandez <aldyh@redhat.com>
7281 * c-pretty-print.c (simple_type_specifier): Do not dereference `t'
7284 2016-10-25 Jakub Jelinek <jakub@redhat.com>
7286 * c-common.h (enum rid): Add RID_BUILTIN_LAUNDER.
7287 * c-common.c (c_common_reswords): Add __builtin_launder.
7289 2016-10-24 Bernd Edlinger <bernd.edlinger@hotmail.de>
7291 * c-common.c (c_common_truthvalue_conversion): Warn for
7292 multiplications in boolean context. Fix the quoting of '<<' and '<'
7293 in the shift warning.
7295 2016-10-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
7297 * c-common.c (c_common_truthvalue_conversion): Fix the comment.
7299 2016-10-20 Jason Merrill <jason@redhat.com>
7301 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_concepts value.
7303 2016-10-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
7305 * c-common.c (c_common_truthvalue_conversion): Warn only for signed
7306 integer shift ops in boolean context.
7308 2016-10-18 Aldy Hernandez <aldyh@redhat.com>
7310 * c.opt (Walloca): New.
7311 (Walloca-larger-than=): New.
7312 (Wvla-larger-than=): New.
7314 2016-10-17 Marek Polacek <polacek@redhat.com>
7316 * c-warn.c (find_array_ref_with_const_idx_r): Remove parameter names.
7317 Return immediately when finding a match.
7318 (warn_tautological_cmp): Remove a boolean variable that is no longer
7321 2016-10-17 Marek Polacek <polacek@redhat.com>
7323 * c-attribs.c: New file.
7324 * c-common.c: Move attributes handling to c-attribs.c.
7325 (get_nonnull_operand): No longer static.
7326 * c-common.h: Move the declarations from c-attribs.c to its own section.
7328 2016-10-14 Jason Merrill <jason@redhat.com>
7330 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_aggregate_bases
7331 and __cpp_deduction_guides.
7333 2016-10-13 Jason Merrill <jason@redhat.com>
7335 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_inline_variables.
7337 2016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
7339 * c-cppbuiltin.c: Include memmodel.h.
7340 * c-opts.c: Likewise.
7341 * c-pragma.c: Likewise.
7342 * c-warn.c: Likewise.
7344 2016-10-12 Jakub Jelinek <jakub@redhat.com>
7346 * c.opt (Wextra): Add as C/C++/ObjC/ObjC++ option.
7347 (Wimplicit-fallthrough=): Enable for these languages by -Wextra.
7348 * c-opts.c (sanitize_cpp_opts): Initialize
7349 cpp_opts->cpp_warn_implicit_fallthrough.
7351 2016-10-11 Marek Polacek <polacek@redhat.com>
7353 * c-common.c (warning_candidate_p): Change the return type to bool
7354 and return true/false instead of 1/0.
7355 (vector_mode_valid_p): Likewise.
7357 2016-10-11 Marek Polacek <polacek@redhat.com>
7359 * c-common.c (fold_for_warn): No longer static.
7360 (bool_promoted_to_int_p): Likewise.
7361 (c_common_get_narrower): Likewise.
7362 (constant_expression_warning): Move to c-warn.c.
7363 (constant_expression_error): Likewise.
7364 (overflow_warning): Likewise.
7365 (warn_logical_operator): Likewise.
7366 (find_array_ref_with_const_idx_r): Likewise.
7367 (warn_tautological_cmp): Likewise.
7368 (expr_has_boolean_operands_p): Likewise.
7369 (warn_logical_not_parentheses): Likewise.
7370 (warn_if_unused_value): Likewise.
7371 (strict_aliasing_warning): Likewise.
7372 (sizeof_pointer_memaccess_warning): Likewise.
7373 (check_main_parameter_types): Likewise.
7374 (conversion_warning): Likewise.
7375 (warnings_for_convert_and_check): Likewise.
7376 (match_case_to_enum_1): Likewise.
7377 (match_case_to_enum): Likewise.
7378 (c_do_switch_warnings): Likewise.
7379 (warn_for_omitted_condop): Likewise.
7380 (readonly_error): Likewise.
7381 (lvalue_error): Likewise.
7382 (invalid_indirection_error): Likewise.
7383 (warn_array_subscript_with_type_char): Likewise.
7384 (warn_about_parentheses): Likewise.
7385 (warn_for_unused_label): Likewise.
7386 (warn_for_div_by_zero): Likewise.
7387 (warn_for_memset): Likewise.
7388 (warn_for_sign_compare): Likewise.
7389 (do_warn_double_promotion): Likewise.
7390 (do_warn_unused_parameter): Likewise.
7391 (record_locally_defined_typedef): Likewise.
7392 (maybe_record_typedef_use): Likewise.
7393 (maybe_warn_unused_local_typedefs): Likewise.
7394 (maybe_warn_bool_compare): Likewise.
7395 (maybe_warn_shift_overflow): Likewise.
7396 (warn_duplicated_cond_add_or_warn): Likewise.
7397 (diagnose_mismatched_attributes): Likewise.
7398 * c-common.h: Move the declarations from c-warn.c to its own section.
7399 * c-warn.c: New file.
7401 2016-10-08 Jason Merrill <jason@redhat.com>
7403 * c-common.c (c_common_truthvalue_conversion): Don't distribute
7404 into COND_EXPR in C++.
7406 2016-10-08 Jakub Jelinek <jakub@redhat.com>
7408 * c-lex.c (c_lex_with_flags) <case CPP_COMMENT>: For CPP_COMMENT
7409 token with PREV_FALLTHROUGH, skip all following CPP_PADDING and
7410 CPP_COMMENT tokens and set add_flags to PREV_FALLTHROUGH afterwards.
7412 2016-10-07 Jakub Jelinek <jakub@redhat.com>
7414 Implement LWG2296 helper intrinsic
7415 * c-common.h (enum rid): Add RID_ADDRESSOF.
7416 * c-common.c (c_common_reswords): Add __builtin_addressof.
7418 2016-10-07 Bernd Edlinger <bernd.edlinger@hotmail.de>
7421 * c-common.c (c_common_truthvalue_conversion): Warn also for
7422 suspicious enum values in boolean context.
7424 2016-10-06 Jakub Jelinek <jakub@redhat.com>
7426 Implement P0258R2 - helper for C++17
7427 std::has_unique_object_representations trait
7428 * c-common.h (enum rid): Add RID_HAS_UNIQUE_OBJ_REPRESENTATIONS.
7429 * c-common.c (c_common_reswords): Add
7430 __has_unique_object_representations.
7432 2016-10-05 Jakub Jelinek <jakub@redhat.com>
7435 * c-ubsan.c (ubsan_instrument_return): Don't call
7436 initialize_sanitizer_builtins here.
7438 2016-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
7440 * c-common.c (c_common_truthvalue_conversion): Warn also for suspicious
7441 conditional expression in boolean context when only one arm is
7444 2016-10-05 Jakub Jelinek <jakub@redhat.com>
7447 * c-ubsan.c (ubsan_instrument_shift): Return NULL_TREE if type0
7450 * c-common.c (c_common_reswords): Update comment for C++11.
7452 2016-10-04 Jason Merrill <jason@redhat.com>
7454 * c-common.c (make_tree_vector_from_ctor): New.
7455 * c-common.h: Declare it.
7457 2016-10-04 Jakub Jelinek <jakub@redhat.com>
7459 * c-cppbuiltin.c (c_cpp_builtins): Don't define
7460 __LIBGCC_JCR_SECTION_NAME__.
7462 2016-10-03 Bernd Edlinger <bernd.edlinger@hotmail.de>
7464 * c-common.c (c_common_truthvalue_conversion): Warn for suspicious
7465 left shift in boolean context.
7467 2016-09-29 Jakub Jelinek <jakub@redhat.com>
7469 Implement P0001R1 - C++17 removal of register storage class specifier
7470 * c.opt (Wregister): New warning.
7471 * c-opts.c (c_common_post_options): Enable -Wregister by
7474 2016-09-29 James Greenhalgh <james.greenhalgh@arm.com>
7476 * c-opts.c (c_common_post_options): Remove special case for
7477 TARGET_FLT_EVAL_METHOD_NON_DEFAULT with -fexcess-precision=standard
7480 2016-09-27 Jakub Jelinek <jakub@redhat.com>
7482 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_capture_star_this for
7485 * c-ada-spec.c (print_ada_declaration): Remove break after return.
7487 2016-09-26 Thomas Preud'homme <thomas.preudhomme@arm.com>
7489 * c-common.c: Include memmodel.h.
7491 2016-09-26 Marek Polacek <polacek@redhat.com>
7493 * c-lex.c (c_common_has_attribute): Handle attribute fallthrough.
7495 2016-09-26 Marek Polacek <polacek@redhat.com>
7498 * c-common.c (c_common_attribute_table): Add fallthrough attribute.
7499 (handle_fallthrough_attribute): New function.
7500 (attribute_fallthrough_p): New function.
7501 * c-common.h (attribute_fallthrough_p): Declare.
7503 2016-09-24 Marek Polacek <polacek@redhat.com>
7506 * c.opt (Wbool-operation): New.
7508 2016-09-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
7510 * c-common.c (c_common_truthvalue_conversion): Inhibit
7511 Wint-in-bool-context warning with from_macro_definition_at.
7512 Mention the expression will always evaluate to true.
7514 2016-09-21 Martin Sebor <msebor@redhat.com>
7517 * c.opt (fprintf-return-value): Temporarily initialize to zero
7518 to unblock bootstrap failures.
7520 2016-09-21 Jakub Jelinek <jakub@redhat.com>
7523 * c.opt (Waligned-new=): Add RejectNegative.
7524 (faligned-new=): Likewise. Spelling fix - change
7525 aligned_new_threshhold to aligned_new_threshold.
7526 * c-cppbuiltin.c (c_cpp_builtins): Change aligned_new_threshhold
7527 to aligned_new_threshold.
7529 2016-09-20 Martin Sebor <msebor@redhat.com>
7532 * c.opt: Add -Wformat-length and -fprintf-return-value.
7534 2016-09-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
7537 * c.opt (Wint-in-bool-context): New warning.
7538 * c-common.c (c_common_truthvalue_conversion): Warn on integer
7539 constants in boolean context.
7541 2016-09-19 Joseph Myers <joseph@codesourcery.com>
7543 * c-common.c (max_align_t_align): Also consider alignment of
7546 2016-09-15 Jason Merrill <jason@redhat.com>
7548 * c-common.c (check_cxx_fundamental_alignment_constraints): Check
7551 2016-09-14 Jason Merrill <jason@redhat.com>
7553 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
7554 limit FIELD_DECL, either.
7556 2016-09-14 Marek Polacek <polacek@redhat.com>
7558 * c-common.c (c_common_truthvalue_conversion): Use false instead of 0.
7559 * c-common.h (build_unary_op): Change nonconvert parameter type to bool.
7560 * c-omp.c (c_finish_omp_atomic): Use false instead of 0.
7562 2016-09-13 David Malcolm <dmalcolm@redhat.com>
7564 * c-common.c (warn_logical_not_parentheses): Replace
7565 rich_location::add_fixit_insert calls with add_fixit_insert_before
7566 and add_fixit_insert_after, eliminating the "next_loc" calculation.
7568 2016-09-13 Jason Merrill <jason@redhat.com>
7569 Tom de Vries <tom@codesourcery.com>
7572 * c-common.c (set_underlying_type): Don't treat array as builtin type.
7574 2016-09-13 Jason Merrill <jason@redhat.com>
7576 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
7579 2016-09-12 Jason Merrill <jason@redhat.com>
7581 * c-common.c (check_cxx_fundamental_alignment_constraints): Fix
7582 bit/byte confusion, allow large alignment for types.
7584 2016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
7587 * c-common.c (warn_for_omitted_condop): Also warn for boolean data.
7589 2016-09-12 David Malcolm <dmalcolm@redhat.com>
7592 * c-format.c (argument_parser::check_argument_type): Add params
7593 "type_start" and "conversion_char". Use the former to generate
7594 offset_to_type_start and pass it and conversion_char to
7596 (check_format_info_main): Capture the start of the type
7597 information as "type_start", and pass it an format_char
7598 to arg_parser.check_argument_type.
7599 (check_format_types): Provide an example in the leading comment.
7600 Add params "offset_to_type_start" and "conversion_char"; pass
7601 them to format_type_warning calls.
7602 (test_get_modifier_for_format_len): Likewise.
7603 (matching_type_p): New function.
7604 (get_format_for_type): Add param "conversion_char" and move
7605 implementation into...
7606 (get_format_for_type_1): ...new function, called twice.
7607 Use new function matching_type_p rather than checking for
7608 TYPE_CANONICAL equality.
7609 (get_corrected_substring): New function.
7610 (format_type_warning): Provide an example in the leading comment.
7611 Add params "offset_to_type_start" and "conversion_char". Replace
7612 call to get_format_for_type with call to get_corrected_substring
7613 and move rejection of hints for widths/precisions there.
7614 (assert_format_for_type_streq): Add param "conversion_char".
7615 (ASSERT_FORMAT_FOR_TYPE_STREQ): Add param CONVERSION_CHAR.
7616 (test_get_format_for_type_printf): Add conversion chars to the
7617 tests, adding coverage for various combinations of integer
7618 vs double conversions, and for preserving octal and hexadecimal
7620 (test_get_format_for_type_scanf): Add conversion chars to the
7623 2016-09-10 Tom de Vries <tom@codesourcery.com>
7626 * c-common.c (build_va_arg): Handle more strict
7627 targetm.canonical_va_list_type. Replace first argument type error with
7630 2016-09-09 Martin Sebor <msebor@redhat.com>
7634 * c-format.c (argument_parser::find_format_char_info): Use %qc
7635 format directive unconditionally.
7637 2016-09-09 Jason Merrill <jason@redhat.com>
7639 Implement C++17 new of over-aligned types.
7640 * c.opt: Add -faligned-new and -Waligned-new.
7641 * c-common.c (max_align_t_align): Split out from...
7642 (cxx_fundamental_alignment_p): ...here.
7643 * c-common.h: Declare it.
7644 * c-cppbuiltin.c (c_cpp_builtins): Handle aligned new.
7646 2016-09-09 Joseph Myers <joseph@codesourcery.com>
7648 * c-cppbuiltin.c (builtin_define_type_width): New function.
7649 (builtin_define_stdint_macros, c_cpp_builtins): Define type width
7652 2016-09-07 David Malcolm <dmalcolm@redhat.com>
7654 * c-common.c (get_cpp_ttype_from_string_type): Handle being passed
7656 (substring_loc::get_location): Move to substring-locations.c,
7657 keeping implementation as...
7658 (c_get_substring_location): New function, from the above, reworked
7659 to use accessors rather than member lookup.
7660 * c-common.h (class substring_loc): Move to substring-locations.h,
7661 replacing with a forward decl.
7662 (c_get_substring_location): New decl.
7663 * c-format.c: Include "substring-locations.h".
7664 (format_warning_va): Move to substring-locations.c.
7665 (format_warning_at_substring): Likewise.
7667 2016-09-06 Martin Sebor <msebor@redhat.com>
7670 * c-format.c (check_function_format): Avoid issuing warnings for
7671 functions unless they call format functions with non-constant
7674 2016-09-06 Richard Biener <rguenther@suse.de>
7677 * c-common.c (c_common_mark_addressable_vec): Handle
7678 COMPOUND_LITERAL_EXPR.
7680 2016-09-05 Marek Polacek <polacek@redhat.com>
7683 * c-common.c (bool_promoted_to_int_p): New function.
7684 (expr_has_boolean_operands_p): New function.
7685 (warn_logical_not_parentheses): Return if expr_has_boolean_operands_p.
7686 (maybe_warn_bool_compare): Use bool_promoted_to_int_p.
7688 2016-09-04 Tom de Vries <tom@codesourcery.com>
7691 2016-08-29 Tom de Vries <tom@codesourcery.com>
7693 * c-common.c (build_va_arg): Replace first argument type error
7696 2016-09-02 Jakub Jelinek <jakub@redhat.com>
7699 * c-omp.c (c_finish_omp_atomic): Reject _Atomic qualified expressions.
7700 (c_finish_omp_for): Reject _Atomic qualified iterators.
7702 2016-09-01 Martin Sebor <msebor@redhat.com>
7704 * c-ada-spec.c (dump_ada_function_declaration): Increase buffer
7705 size to guarantee it fits the output of the formatted function
7706 regardless of its arguments.
7708 2016-09-01 Marek Polacek <polacek@redhat.com>
7711 * c-common.c (resolve_overloaded_builtin): Fix formatting. Add
7714 2016-08-29 Marek Polacek <polacek@redhat.com>
7717 * c-common.c (warn_logical_not_parentheses): Don't warn for
7718 a comparison or a logical operator.
7720 2016-08-29 Tom de Vries <tom@codesourcery.com>
7722 * c-common.c (build_va_arg): Fix type comparison assert.
7724 2016-08-29 Tom de Vries <tom@codesourcery.com>
7726 * c-common.c (build_va_arg): Replace first argument type error
7729 2016-08-29 Tom de Vries <tom@codesourcery.com>
7732 * c-common.c (build_va_arg): Add first argument error. Build va_arg
7733 with error_mark_node as va_list instead of with illegal va_list.
7735 2016-08-25 Marek Polacek <polacek@redhat.com>
7736 David Malcolm <dmalcolm@redhat.com>
7738 * c-common.c (warn_logical_not_parentheses): Print fixit hints.
7739 * c-common.h (warn_logical_not_parentheses): Update declaration.
7741 2016-08-22 Marek Polacek <polacek@redhat.com>
7744 * c-common.c (warn_for_memset): Check type for null.
7746 2016-08-22 Joseph Myers <joseph@codesourcery.com>
7748 * c-cppbuiltin.c (c_cpp_builtins): Check _FloatN and
7749 _FloatNx types for suffixes for built-in functions.
7751 2016-08-19 Joseph Myers <joseph@codesourcery.com>
7754 * c-common.h (RID_FLOAT16, RID_FLOATN_NX_FIRST, RID_FLOAT32)
7755 (RID_FLOAT64, RID_FLOAT128, RID_FLOAT32X, RID_FLOAT64X)
7756 (RID_FLOAT128X): New enum rid values.
7757 (CASE_RID_FLOATN_NX): New macro.
7758 * c-common.c (c_common_reswords): Add _FloatN and _FloatNx
7760 (c_common_type_for_mode): Check for _FloatN and _FloatNx and
7761 corresponding complex types.
7762 (c_common_nodes_and_builtins): For non-C++, register _FloatN and
7763 _FloatNx and corresponding complex types.
7764 (keyword_begins_type_specifier): Use CASE_RID_FLOATN_NX.
7765 * c-cppbuiltin.c (builtin_define_float_constants): Check _FloatN
7766 and _FloatNx types for the widest type for determining
7767 DECIMAL_DIG. Define __LDBL_DECIMAL_DIG__ as well as
7768 __DECIMAL_DIG__ for long double. Handle FMA_SUFFIX being NULL.
7769 (c_cpp_builtins): Call builtin_define_float_constants for _FloatN
7771 * c-lex.c (interpret_float): Handle _FloatN and _FloatNx
7773 * c-pretty-print.c (pp_c_floating_constant): Handle _FloatN and
7776 2016-08-18 David Malcolm <dmalcolm@redhat.com>
7778 * c-opts.c (c_diagnostic_finalizer): Update for change to
7779 diagnostic_show_locus.
7781 2016-08-18 David Malcolm <dmalcolm@redhat.com>
7783 * c-common.c: Include "spellcheck.h".
7784 (cb_get_suggestion): New function.
7785 * c-common.h (cb_get_suggestion): New decl.
7786 * c-lex.c (init_c_lex): Initialize cb->get_suggestion to
7789 2016-08-18 Marek Polacek <polacek@redhat.com>
7792 * c-common.c (get_atomic_generic_size): Disallow pointer-to-function
7795 2016-08-16 David Malcolm <dmalcolm@redhat.com>
7798 * c-common.c (substring_loc::get_range): Rename to...
7799 (substring_loc::get_location): ...this, converting param from a
7800 source_range * to a location_t *. Call
7801 get_source_location_for_substring rather than
7802 get_source_range_for_substring, and pass in m_caret_idx.
7803 * c-common.h (substring_loc::substring_loc): Add param "caret_idx".
7804 (substring_loc::get_range): Replace with...
7805 (substring_loc::get_location): ...this.
7806 (substring_loc::set_caret_index): New method.
7807 (substring_loc): Add field m_caret_idx.
7808 * c-format.c (format_warning_va): Update for above changes.
7809 Rename local "substring_loc" to "fmt_substring_loc" to avoid
7810 clashing with type name.
7811 (format_warning_at_char): Add caret_idx param to substring_loc ctor.
7812 (check_argument_type): Likewise.
7813 (format_type_warning): Rename param "fmt_loc" to "whole_fmt_loc"
7814 Use a copy when emitting warnings, setting the caret index from TYPE.
7816 2016-08-16 Eric Botcazou <ebotcazou@adacore.com>
7817 Arnaud Charlet <charlet@adacore.com>
7819 * c-ada-spec.c (dump_number): New function.
7820 (handle_escape_character): Likewise.
7821 (print_ada_macros): Add handling of constant integers and strings.
7823 2016-08-12 Marek Polacek <polacek@redhat.com>
7826 * c-common.c (scalar_to_vector): Adjust fall through comment.
7827 * c-opts.c (c_common_handle_option): Likewise.
7828 * c-pragma.c (handle_pragma_pack): Add FALLTHRU.
7829 * c-pretty-print.c (c_pretty_printer::postfix_expression): Adjust
7830 fall through comment.
7831 * cilk.c (extract_free_variables): Add FALLTHRU.
7833 2016-08-10 Jason Merrill <jason@redhat.com>
7835 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_if_constexpr.
7837 2016-08-09 Jason Merrill <jason@redhat.com>
7839 * c-common.c (c_common_attribute_table): vector_size affects type
7842 2016-08-09 Marek Polacek <polacek@redhat.com>
7845 * c-ada-spec.c (dump_generic_ada_node): Add return.
7847 2016-08-09 Jason Merrill <jason@redhat.com>
7849 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_constexpr for
7850 C++17 constexpr lambdas.
7852 2016-08-08 David Malcolm <dmalcolm@redhat.com>
7855 * c-common.h (selftest::c_format_c_tests): New declaration.
7856 (selftest::run_c_tests): New declaration.
7857 * c-format.c: Include "selftest.h.
7858 (format_warning_va): Add param "corrected_substring" and use
7859 it to add a replacement fix-it hint.
7860 (format_warning_at_substring): Likewise.
7861 (format_warning_at_char): Update for new param of
7863 (argument_parser::check_argument_type): Pass "fki" to
7865 (check_format_types): Add param "fki" and pass it to
7866 format_type_warning.
7867 (deref_n_times): New function.
7868 (get_modifier_for_format_len): New function.
7869 (selftest::test_get_modifier_for_format_len): New function.
7870 (get_format_for_type): New function.
7871 (format_type_warning): Add param "fki" and use it to attempt
7872 to provide hints for argument types when calling
7873 format_warning_at_substring.
7874 (selftest::get_info): New function.
7875 (selftest::assert_format_for_type_streq): New function.
7876 (ASSERT_FORMAT_FOR_TYPE_STREQ): New macro.
7877 (selftest::test_get_format_for_type_printf): New function.
7878 (selftest::test_get_format_for_type_scanf): New function.
7879 (selftest::c_format_c_tests): New function.
7881 2016-08-08 David Malcolm <dmalcolm@redhat.com>
7884 * c-format.c: Include "diagnostic.h".
7885 (location_column_from_byte_offset): Delete.
7886 (location_from_offset): Delete.
7887 (format_warning_va): New function.
7888 (format_warning_at_substring): New function.
7889 (format_warning_at_char): New function.
7890 (check_format_arg): Capture location of format_tree and pass to
7891 check_format_info_main.
7892 (argument_parser): Add fields "start_of_this_format" and
7893 "format_string_cst".
7894 (flag_chars_t::validate): Add param "format_string_cst". Convert
7895 warning_at call using location_from_offset to call to
7896 format_warning_at_char.
7897 (argument_parser::argument_parser): Add param "format_string_cst_"
7898 and use use it to initialize field "format_string_cst".
7899 Initialize new field "start_of_this_format".
7900 (argument_parser::read_format_flags): Convert warning_at call
7901 using location_from_offset to a call to format_warning_at_char.
7902 (argument_parser::read_any_format_left_precision): Likewise.
7903 (argument_parser::read_any_format_precision): Likewise.
7904 (argument_parser::read_any_other_modifier): Likewise.
7905 (argument_parser::find_format_char_info): Likewise, in three places.
7906 (argument_parser::parse_any_scan_set): Likewise, in one place.
7907 (argument_parser::handle_conversions): Likewise, in two places.
7908 (argument_parser::check_argument_type): Add param "fmt_param_loc"
7909 and use it to make a substring_loc. Pass the latter to
7911 (check_format_info_main): Add params "fmt_param_loc" and
7912 "format_string_cst". Convert warning_at calls using
7913 location_from_offset to calls to format_warning_at_char. Pass the
7914 new params to the arg_parser ctor. Pass "format_string_cst" to
7915 flag_chars.validate. Pass "fmt_param_loc" to
7916 arg_parser.check_argument_type.
7917 (check_format_types): Convert first param from a location_t
7918 to a const substring_loc & and rename to "fmt_loc". Attempt
7919 to extract the range of the relevant parameter and pass it
7920 to format_type_warning.
7921 (format_type_warning): Convert first param from a location_t
7922 to a const substring_loc & and rename to "fmt_loc". Add
7923 params "param_range" and "type". Replace calls to warning_at
7924 with calls to format_warning_at_substring.
7926 2016-08-08 David Malcolm <dmalcolm@redhat.com>
7928 * c-format.c (class flag_chars_t): New class.
7929 (struct length_modifier): New struct.
7930 (class argument_parser): New class.
7931 (flag_chars_t::flag_chars_t): New ctor.
7932 (flag_chars_t::has_char_p): New method.
7933 (flag_chars_t::add_char): New method.
7934 (flag_chars_t::validate): New method.
7935 (flag_chars_t::get_alloc_flag): New method.
7936 (flag_chars_t::assignment_suppression_p): New method.
7937 (argument_parser::argument_parser): New ctor.
7938 (argument_parser::read_any_dollar): New method.
7939 (argument_parser::read_format_flags): New method.
7940 (argument_parser::read_any_format_width): New method.
7941 (argument_parser::read_any_format_left_precision): New method.
7942 (argument_parser::read_any_format_precision): New method.
7943 (argument_parser::handle_alloc_chars): New method.
7944 (argument_parser::read_any_length_modifier): New method.
7945 (argument_parser::read_any_other_modifier): New method.
7946 (argument_parser::find_format_char_info): New method.
7947 (argument_parser::validate_flag_pairs): New method.
7948 (argument_parser::give_y2k_warnings): New method.
7949 (argument_parser::parse_any_scan_set): New method.
7950 (argument_parser::handle_conversions): New method.
7951 (argument_parser::check_argument_type): New method.
7952 (check_format_info_main): Introduce classes argument_parser
7953 and flag_chars_t, moving the code within the loop into methods
7954 of these classes. Make various locals "const".
7956 2016-08-05 David Malcolm <dmalcolm@redhat.com>
7958 * c-common.c: Include "substring-locations.h".
7959 (get_cpp_ttype_from_string_type): New function.
7960 (g_string_concat_db): New global.
7961 (substring_loc::get_range): New method.
7962 * c-common.h (g_string_concat_db): New declaration.
7963 (class substring_loc): New class.
7964 * c-lex.c (lex_string): When concatenating strings, capture the
7965 locations of all tokens using a new obstack, and record the
7966 concatenation locations within g_string_concat_db.
7967 * c-opts.c (c_common_init_options): Construct g_string_concat_db
7970 2016-07-29 Marek Polacek <polacek@redhat.com>
7973 * c-common.c (c_common_truthvalue_conversion): Use LOCATION for the
7974 parentheses warning.
7977 * c-common.c (handle_alloc_align_attribute): Also check FUNCTION_DECL.
7979 2016-07-28 Martin Liska <mliska@suse.cz>
7981 PR gcov-profile/68025
7982 * c-common.c (handle_no_profile_instrument_function_attribute):
7984 2016-07-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
7986 * c-common.c (check_user_alignment): Use LOG2_BITS_PER_UNIT instead of
7989 2016-07-25 Jason Merrill <jason@redhat.com>
7992 * c.opt (fconstexpr-loop-limit): New.
7994 2016-07-22 Martin Sebor <msebor@redhat.com>
7997 * c-common.c (resolve_overloaded_builtin): Avoid converting
7998 __atomic_compare_exchange_n return type to that of what its
7999 first argument points to.
8001 2016-07-22 Uros Bizjak <ubizjak@gmail.com>
8003 * c-common.c: Use HOST_WIDE_INT_M1U instead of
8004 ~(unsigned HOST_WIDE_INT) 0.
8006 2016-07-22 Martin Liska <mliska@suse.cz>
8008 PR gcov-profile/69028
8009 PR gcov-profile/62047
8010 * cilk.c (create_cilk_helper_decl): Set location of a new decl
8011 to the current_function_decl.
8013 2016-07-21 Jason Merrill <jason@redhat.com>
8016 * c-common.c (c_common_truthvalue_conversion): Check
8017 c_inhibit_evaluation_warnings for warning about address of
8020 2016-07-20 David Malcolm <dmalcolm@redhat.com>
8022 * c-common.h (lookup_name_fuzzy): Convert return type from tree to
8025 2016-07-15 Jason Merrill <jason@redhat.com>
8027 * c-opts.c (c_common_post_options): Update -fabi-version default to 11.
8029 2016-07-15 Jakub Jelinek <jakub@redhat.com>
8032 * c-common.h (enum lookup_name_fuzzy_kind): Add
8033 FUZZY_LOOKUP_FUNCTION_NAME.
8035 2016-07-08 Jason Merrill <jason@redhat.com>
8037 P0145: Refining Expression Order for C++.
8038 * c.opts (-fargs-in-order): Rename to -fstrong-eval-order.
8041 2016-07-05 Markus Trippelsdorf <markus@trippelsdorf.de>
8044 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_rvalue_references.
8046 2016-06-29 Thomas Schwinge <thomas@codesourcery.com>
8048 * c-pragma.h (enum pragma_kind): Rename
8049 PRAGMA_OMP_DECLARE_REDUCTION to PRAGMA_OMP_DECLARE. Adjust all
8052 2016-06-29 Richard Biener <rguenther@suse.de>
8055 * c-common.c (c_common_get_alias_set): Remove union type punning case.
8057 2016-06-24 Jason Merrill <jason@redhat.com>
8059 P0145R2: Refining Expression Order for C++.
8060 * c-common.c (verify_tree) [COMPOUND_EXPR]: Fix handling on LHS of
8063 2016-06-24 Jakub Jelinek <jakub@redhat.com>
8065 * c-common.c (check_builtin_function_arguments): Require last
8066 argument of BUILT_IN_*_OVERFLOW_P to have INTEGER_TYPE type.
8067 Adjust wording of diagnostics for BUILT_IN_*_OVERLFLOW
8068 if the last argument is pointer to enumerated or boolean type.
8070 2016-06-22 David Malcolm <dmalcolm@redhat.com>
8073 * c-common.h (enum lookup_name_fuzzy_kind): New enum.
8074 (lookup_name_fuzzy): New prototype.
8076 2016-06-21 John David Anglin <danglin@gcc.gnu.org>
8078 * c-common.c (get_source_date_epoch): Use int64_t instead of long long.
8080 2016-06-14 Jason Merrill <jason@redhat.com>
8082 P0145R2: Refining Expression Order for C++.
8083 * c.opt (fargs-in-order): New.
8084 * c-opts.c (c_common_post_options): Adjust flag_args_in_order.
8086 2016-06-13 Jakub Jelinek <jakub@redhat.com>
8089 * c-gimplify.c (ubsan_walk_array_refs_r): Set *walk_subtrees = 0 on
8090 all BIND_EXPRs, and on all BIND_EXPRs recurse also on BIND_EXPR_BODY.
8092 PR preprocessor/71183
8093 * c-ppoutput.c (init_pp_output): Set cb->get_source_date_epoch
8094 to cb_get_source_date_epoch.
8096 2016-06-10 Jakub Jelinek <jakub@redhat.com>
8099 * c.opt (Wpsabi): Add Warning flag.
8101 2016-06-10 Martin Sebor <msebor@redhat.com>
8104 * c-common.c (handle_nonnull_attribute): Accept
8105 the nonnull attribute in type-generic builtins.
8107 2016-06-09 Martin Sebor <msebor@redhat.com>
8110 * c-common.c (builtin_function_validate_nargs): Make text of error
8111 message consistent with others like it.
8113 2016-06-08 Martin Sebor <msebor@redhat.com>
8114 Jakub Jelinek <jakub@redhat.com>
8118 * c-common.c (check_builtin_function_arguments): Handle
8119 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
8121 2016-06-08 Richard Biener <rguenther@suse.de>
8123 * c-common.c (parse_optimize_options): Improve diagnostic messages.
8125 2016-06-07 Richard Biener <rguenther@suse.de>
8128 * c-common.c (parse_optimize_options): Only apply CL_OPTIMIZATION
8129 options and warn about others.
8131 2016-06-01 Eduard Sanou <dhole@openmailbox.org>
8133 * c-common.c (get_source_date_epoch): Rename to
8134 cb_get_source_date_epoch.
8135 * c-common.c (cb_get_source_date_epoch): Use a single generic erorr
8136 message when the parsing fails. Use error_at instead of fatal_error.
8137 * c-common.h (get_source_date_epoch): Rename to
8138 cb_get_source_date_epoch.
8139 * c-common.h (cb_get_source_date_epoch): Prototype.
8140 * c-common.h (MAX_SOURCE_DATE_EPOCH): Define.
8141 * c-common.h (c_omp_region_type): Remove trailing comma.
8142 * c-lex.c (init_c_lex): Set cb->get_source_date_epoch callback.
8143 * c-lex.c (c_lex_with_flags): Remove initialization of
8144 pfile->source_date_epoch.
8146 2016-05-30 Jakub Jelinek <jakub@redhat.com>
8149 * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_DEPEND to
8150 C_OMP_CLAUSE_SPLIT_TARGET. Put OMP_CLAUSE_NOWAIT to
8151 C_OMP_CLAUSE_SPLIT_TARGET if combined with target construct,
8152 instead of C_OMP_CLAUSE_SPLIT_FOR.
8154 2016-05-24 Richard Biener <rguenther@suse.de>
8158 * c-common.h (convert_vector_to_pointer_for_subscript): Rename to ...
8159 (convert_vector_to_array_for_subscript): ... this.
8160 * c-common.c (convert_vector_to_pointer_for_subscript): Use a
8161 VIEW_CONVERT_EXPR to an array type. Rename to ...
8162 (convert_vector_to_array_for_subscript): ... this.
8164 2016-05-12 Marek Polacek <polacek@redhat.com>
8167 * c-common.c (pointer_int_sum): Call size_in_bytes_loc instead of
8168 size_in_bytes and pass LOC to it.
8170 2016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
8173 * c.opt (Wduplicate-decl-specifier): New option.
8175 2016-05-11 Marek Polacek <polacek@redhat.com>
8178 * c-common.c (diagnose_mismatched_attributes): New function.
8179 * c-common.h (diagnose_mismatched_attributes): Declare.
8181 2016-05-04 Marek Polacek <polacek@redhat.com>
8183 * c.opt (Wdangling-else): New option.
8185 2016-05-03 Marek Polacek <polacek@redhat.com>
8188 * c-common.c (builtin_function_validate_nargs): Add location
8190 (check_builtin_function_arguments): Add location and arguments
8191 parameters. Use them.
8192 * c-common.h (check_builtin_function_arguments): Update declaration.
8194 2016-05-03 Richard Biener <rguenther@suse.de>
8196 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Do not
8197 allow call args to gimplify to SSA names.
8199 2016-05-03 Marek Polacek <polacek@redhat.com>
8201 * c-common.h (enum c_omp_region_type): Remove stray comma.
8203 2016-05-02 Cesar Philippidis <cesar@codesourcery.com>
8205 * c-common.h (enum c_omp_region_type): Define.
8207 2016-05-02 Richard Sandiford <richard.sandiford@arm.com>
8209 * c-common.c (shorten_compare): Use wi::to_wide.
8211 2016-04-29 Cesar Philippidis <cesar@codesourcery.com>
8214 * c-common.h (c_oacc_split_loop_clauses): Add boolean argument.
8215 * c-omp.c (c_oacc_split_loop_clauses): Use it to duplicate
8216 reduction clauses in acc parallel loops.
8218 2016-04-29 Marek Polacek <polacek@redhat.com>
8221 * c-common.c (warn_for_memset): Check domain before accessing it.
8223 2016-04-29 Dominik Vogt <vogt@linux.vnet.ibm.com>
8226 * c-common.c (handle_aligned_attribute): Allow 0 as an argument to the
8227 "aligned" attribute.
8229 2016-04-28 Jason Merrill <jason@redhat.com>
8231 * c-lex.c (c_common_has_attribute): Handle nodiscard.
8233 2016-04-28 Eduard Sanou <dhole@openmailbox.org>
8234 Matthias Klose <doko@debian.org>
8236 * c-common.c (get_source_date_epoch): New function, gets the environment
8237 variable SOURCE_DATE_EPOCH and parses it as long long with error
8239 * c-common.h (get_source_date_epoch): Prototype.
8240 * c-lex.c (c_lex_with_flags): set parse_in->source_date_epoch.
8242 2015-04-27 Ryan Burn <contact@rnburn.com>
8246 * cilk.c (cilk_ignorable_spawn_rhs_op): Change to external linkage.
8247 (cilk_recognize_spawn): Renamed from recognize_spawn and change to
8249 (cilk_detect_and_unwrap): Corresponding changes.
8250 (extract_free_variables): Don't extract free variables from
8251 AGGR_INIT_EXPR slot.
8252 * c-common.h (cilk_ignorable_spawn_rhs_op): Prototype.
8253 (cilk_recognize_spawn): Likewise.
8255 2016-04-27 Bernd Schmidt <bschmidt@redhat.com>
8257 * c.opt (Wmemset-elt-size): New option.
8258 * c-common.c (warn_for_memset): New function.
8259 * c-common.h (warn_for_memset): Declare.
8261 2016-04-25 Jason Merrill <jason@redhat.com>
8263 * c-common.c (handle_unused_attribute): Accept CONST_DECL.
8265 * c-common.h: Declare it.
8266 * c-lex.c (c_common_has_attribute): Add maybe_unused.
8268 2016-04-22 Jason Merrill <jason@redhat.com>
8270 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_range_based_for.
8272 2016-04-20 Ilya Verbin <ilya.verbin@intel.com>
8275 * c-cilkplus.c (c_finish_cilk_clauses): Remove function.
8276 * c-common.h (c_finish_cilk_clauses): Remove declaration.
8278 2016-04-18 Michael Matz <matz@suse.de>
8280 * c-common.c (handle_aligned_attribute): Use SET_TYPE_ALIGN
8283 2016-04-17 Eric Botcazou <ebotcazou@adacore.com>
8285 * c-ada-spec.c (get_underlying_decl): Return the typedef, if any.
8286 (dump_generic_ada_node) <POINTER_TYPE>: Clean up handling of access
8287 to incomplete types.
8288 (dump_nested_type): Remove redundant tests and tidy up.
8289 (print_ada_declaration): Also set TREE_VISITED on the declaration of
8290 a type which is the typedef of an original type.
8292 2016-04-15 Marek Polacek <polacek@redhat.com>
8295 * c-common.c (build_va_arg): Change two asserts into errors and return
8298 2016-04-13 Marek Polacek <polacek@redhat.com>
8301 * c-indentation.c (should_warn_for_misleading_indentation): Bail out
8302 for switch statements, too.
8304 2016-03-28 Jason Merrill <jason@redhat.com>
8306 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_range_based_for.
8308 2016-03-23 Marek Polacek <polacek@redhat.com>
8311 * c.opt (Wignored-attributes): New option.
8313 2016-03-22 David Malcolm <dmalcolm@redhat.com>
8316 * c-indentation.c (warn_for_misleading_indentation): Rewrite the
8317 diagnostic text, reversing the order of the warning and note so
8318 that they appear in source order.
8320 2016-03-17 Marek Polacek <polacek@redhat.com>
8323 * c-common.c (resolve_overloaded_builtin): Set TREE_USED for the fetch
8326 2016-03-14 Jason Merrill <jason@redhat.com>
8328 * c-cppbuiltin.c (c_cpp_builtins): Set __cpp_hex_float.
8330 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_range_based_for.
8332 2016-03-09 Richard Biener <rguenther@suse.de>
8335 * c-common.c (strict_aliasing_warning): Add back
8336 alias_sets_conflict_p check.
8338 2016-03-08 Jason Merrill <jason@redhat.com>
8340 * c-opts.c (set_std_cxx1z): Don't enable concepts.
8342 2016-03-04 David Malcolm <dmalcolm@redhat.com>
8345 * c-indentation.c (get_visual_column): Move code to determine next
8347 (next_tab_stop): ...this new function.
8348 (line_contains_hash_if): Delete function.
8349 (detect_preprocessor_logic): Delete function.
8350 (get_first_nws_vis_column): New function.
8351 (detect_intervening_unindent): New function.
8352 (should_warn_for_misleading_indentation): Replace call to
8353 detect_preprocessor_logic with a call to
8354 detect_intervening_unindent.
8356 2016-03-04 David Malcolm <dmalcolm@redhat.com>
8359 * c-indentation.c (should_warn_for_misleading_indentation): When
8360 suppressing warnings about cases where the guard and body are on
8361 the same column, only use the first non-whitespace column in place
8362 of the guard token column when dealing with "else" clauses.
8363 When rejecting aligned BODY and NEXT, loosen the requirement
8364 from equality with the first non-whitespace of guard to simply
8365 that they not be indented relative to it.
8367 2016-03-04 Richard Biener <rguenther@suse.de>
8370 * c-common.c (strict_aliasing_warning): Use alias_set_subset_of
8371 instead of alias_sets_conflict_p.
8373 2016-03-01 Marek Polacek <polacek@redhat.com>
8376 * c-common.c (reject_gcc_builtin): Check for FUNCTION_DECL rather than
8379 2016-02-22 Martin Sebor <msebor@redhat.com>
8382 * c-common.c (check_builtin_function_arguments): Validate and
8383 reject invalid arguments to __builtin_alloca_with_align.
8385 2016-02-20 Mark Wielaard <mjw@redhat.com>
8388 * c.opt (Wunused-const-variable): Turn into Alias for...
8389 (Wunused-const-variable=): New option.
8391 2016-02-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
8394 * c-opts.c (c_common_post_options): Move call to set_std_cxx14 from
8396 (c_common_init_options): ...to here.
8397 (set_std_cxx98): Initialize flag_isoc94 and flag_isoc99.
8399 2016-02-19 Jakub Jelinek <jakub@redhat.com>
8402 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_GRAINSIZE.
8403 (init_pragma): Register PRAGMA_CILK_GRAINSIZE even for
8404 flag_preprocess_only.
8406 2016-02-16 Jakub Jelinek <jakub@redhat.com>
8409 * c.opt (Wnonnull-compare): Enable for -Wall.
8411 2016-02-15 Jakub Jelinek <jakub@redhat.com>
8414 * c-common.c (sync_resolve_size): Diagnose too few arguments
8415 even when params is non-NULL empty vector.
8417 2016-02-08 Bernd Schmidt <bschmidt@redhat.com>
8420 * c.opt (fshort-double): Remove.
8422 2016-02-05 Martin Sebor <msebor@redhat.com>
8425 * c.opt (Warning options): Update -Wplacement-new to take
8426 an optional argument.
8428 2016-02-01 Jakub Jelinek <jakub@redhat.com>
8430 PR preprocessor/69543
8432 * c-pragma.c (handle_pragma_diagnostic): Pass input_location
8433 instead of loc to control_warning_option.
8435 2016-02-01 Nathan Sidwell <nathan@codesourcery.com>
8437 * c.opt (fopenacc-dim=): New option.
8439 2016-01-27 Ryan Burn <contact@rnburn.com>
8442 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Change to use
8443 gimplify_arg. Removed superfluous post_p argument.
8444 * c-family.h (cilk_gimplify_call_params_in_spawned_fn): Removed
8445 superfluous post_p argument.
8446 * c-gimplify.c (c_gimplify_expr): Likewise.
8448 2016-01-26 David Malcolm <dmalcolm@redhat.com>
8451 * c-opts.c (c_diagnostic_finalizer): Replace invocation of
8452 pp_newline_and_flush with pp_flush.
8454 2016-01-20 Martin Sebor <msebor@redhat.com>
8457 * c-common.c (sync_resolve_size): Avoid printing diagnostic about
8458 an incompatible argument when the argument isn't a valid tree node.
8460 2016-01-18 Jason Merrill <jason@redhat.com>
8463 * c-common.c (check_function_arguments_recurse): Fold the whole
8464 COND_EXPR, not just the condition.
8466 2016-01-18 Tom de Vries <tom@codesourcery.com>
8468 * c-omp.c (c_oacc_split_loop_clauses): Don't copy OMP_CLAUSE_REDUCTION,
8469 classify as loop clause.
8471 2016-01-15 Jakub Jelinek <jakub@redhat.com>
8474 * c-pragma.c (c_register_pragma_1): Adjust comment to note that
8475 C++ FE no longer has limit on number of pragmas.
8477 2015-01-14 Ryan Burn <contact@rnburn.com>
8480 * cilk.c (create_cilk_wrapper_body): Call fold_build_cleanup_point_expr
8481 to add missing cleanup point.
8483 2016-01-14 David Malcolm <dmalcolm@redhat.com>
8486 * c-indentation.c (get_visual_column): Add location_t param.
8487 Handle the column number being zero by effectively disabling the
8488 warning, with an "inform".
8489 (should_warn_for_misleading_indentation): Add location_t argument
8490 for all uses of get_visual_column.
8492 2016-01-10 Patrick Palka <ppalka@gcc.gnu.org>
8495 * c-indentation.c (should_warn_for_misleading_indentation):
8496 Don't warn about do-while statements.
8498 2016-01-07 Martin Sebor <msebor@redhat.com>
8501 * c-common.c (sync_resolve_size): Reject first argument when it's
8504 2016-01-05 David Malcolm <dmalcolm@redhat.com>
8507 * c-indentation.c (get_visual_column): Remove default argument.
8508 (should_warn_for_misleading_indentation): For the multiline case,
8509 update call to get_visual_column for next_stmt_exploc so that it
8510 captures the location of the first non-whitespace character in the
8511 relevant line. Don't issue warnings if there is non-whitespace
8512 before the next statement.
8514 2016-01-04 Jakub Jelinek <jakub@redhat.com>
8516 Update copyright years.
8518 2015-12-21 David Malcolm <dmalcolm@redhat.com>
8520 * c-common.c (binary_op_error): Convert first param from
8521 location_t to rich_location * and use it when emitting an error.
8522 * c-common.h (binary_op_error): Convert first param from
8523 location_t to rich_location *.
8525 2015-12-16 David Malcolm <dmalcolm@redhat.com>
8527 * c-common.h (conflict_marker_get_final_tok_kind): New prototype.
8528 * c-lex.c (conflict_marker_get_final_tok_kind): New function.
8530 2015-12-15 Ilya Verbin <ilya.verbin@intel.com>
8532 * c-common.c (c_common_attribute_table): Handle "omp declare target
8535 2015-12-14 Jakub Jelinek <jakub@redhat.com>
8538 * c.opt (Wmissing-format-attribute, Wnormalized): Add Warning option.
8540 2014-12-12 Tobias Burnus <burnus@net-b.de>
8543 * c-format.c (gcc_gfc_char_table): Add 'q' flag to remaining
8544 specifiers (%d, %i,%u and %c).
8546 2015-12-10 David Malcolm <dmalcolm@redhat.com>
8548 * c.opt (Wmisleading-indentation): Add to -Wall for C and C++.
8550 2015-12-08 Jakub Jelinek <jakub@redhat.com>
8554 * c.opt (Wfloat-conversion, Wsign-conversion): Add Warning.
8555 * c-pragma.c (handle_pragma_diagnostic): Adjust
8556 control_warning_option caller.
8558 2015-12-07 David Malcolm <dmalcolm@redhat.com>
8560 * c-common.c (c_cpp_error): Update for change to
8561 rich_location::set_range.
8563 2015-12-04 Paolo Bonzini <bonzini@gnu.org>
8565 * c-common.c (maybe_warn_shift_overflow): Warn on all overflows if
8566 shifting 1 out of the sign bit.
8568 2015-12-04 Kirill Yukhin <kirill.yukhin@intel.com>
8570 * c-common.c (c_common_attribute_table[]): Update max arguments
8571 count for "simd" attribute.
8572 (handle_simd_attribute): Parse "notinbranch" and "inbranch" arguments.
8574 2015-12-03 Jakub Jelinek <jakub@redhat.com>
8576 PR preprocessor/57580
8577 * c-ppoutput.c (print): Change printed field to bool.
8578 Move src_file last for smaller padding.
8579 (init_pp_output): Set print.printed to false instead of 0.
8580 (scan_translation_unit): Fix up formatting. Set print.printed
8581 to true after printing something other than newline.
8582 (scan_translation_unit_trad): Set print.printed to true instead of 1.
8583 (maybe_print_line_1): Set print.printed to false instead of 0.
8584 (print_line_1): Likewise.
8585 (do_line_change): Set print.printed to true instead of 1.
8586 (cb_define, dump_queued_macros, cb_include, cb_def_pragma,
8587 dump_macro): Set print.printed to false after printing newline.
8589 2015-12-02 Jason Merrill <jason@redhat.com>
8591 * c-common.c (fold_for_warn): New.
8592 (warn_logical_operator, warn_tautological_cmp)
8593 (check_function_arguments_recurse, maybe_warn_bool_compare): Use it.
8595 * c-common.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
8596 (c_fully_fold_internal, decl_constant_value_for_optimization):
8598 * c-common.h: Don't declare decl_constant_value_for_optimization.
8600 2015-12-02 Joseph Myers <joseph@codesourcery.com>
8603 * c-common.h (c_build_qualified_type): Add extra default
8606 2015-12-01 Julian Brown <julian@codesourcery.com>
8607 Cesar Philippidis <cesar@codesourcery.com>
8608 James Norris <James_Norris@mentor.com>
8610 * c-pragma.c (oacc_pragmas): Add PRAGMA_OACC_HOST_DATA.
8611 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_HOST_DATA.
8612 (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_USE_DEVICE.
8614 2015-11-30 Eric Botcazou <ebotcazou@adacore.com>
8616 * c-ada-spec.c (print_ada_macros): Remove redundant blank line.
8617 (decl_sloc_common): Delete and move bulk of processing to...
8618 (decl_sloc): ...here.
8619 (pp_ada_tree_identifier): Remove reference to QUAL_UNION_TYPE.
8620 (dump_ada_double_name): Remove S parameter and compute the suffix.
8621 (dump_ada_array_type): Add PARENT parameter. Simplify computation of
8622 element type and deal with an anonymous one.
8623 (dump_ada_template): Use RECORD_OR_UNION_TYPE_P macro.
8624 (dump_generic_ada_node): Tweak. Adjust call to dump_ada_array_type
8625 and remove reference to QUAL_UNION_TYPE.
8626 (dump_nested_types): Make 2 passes on the fields and move bulk to...
8627 (dump_nested_type): ...here. New function extracted from above.
8628 Generate a full declaration for anonymous element type of arrays.
8629 (print_ada_declaration): Really skip anonymous declarations. Remove
8630 references to QUAL_UNION_TYPE. Adjust call to dump_ada_array_type.
8631 Clean up processing of declarations of array types and objects.
8632 (print_ada_struct_decl): Remove reference to QUAL_UNION_TYPE.
8633 Remove obsolete code and tidy up.
8635 2015-11-29 Jan Hubicka <hubicka@ucw.cz>
8638 * c-common.c (handle_transparent_union_attribute): Update
8641 2015-11-27 Martin Liska <mliska@suse.cz>
8644 * array-notation-common.c (cilkplus_extract_an_triplets):
8645 Release vector of vectors.
8646 * cilk.c (gimplify_cilk_spawn): Free allocated memory.
8648 2015-11-26 Eric Botcazou <ebotcazou@adacore.com>
8651 * c-ada-spec.c (dump_nested_types): Add guard for error_mark_node.
8652 (print_ada_struct_decl): Likewise.
8654 2015-11-23 Igor Zamyatin <igor.zamyatin@intel.com>
8657 * c-gimplify.c (c_gimplify_expr): Stop the process if see an error.
8658 * cilk.c (recognize_spawn): Determine location in a more precise
8661 2015-11-19 Jason Merrill <jason@redhat.com>
8663 * c-common.c (shorten_compare): But look through macros from
8666 2015-11-18 Jason Merrill <jason@redhat.com>
8668 * c-common.c (shorten_compare): Don't -Wtype-limits if the
8669 non-constant operand comes from a macro.
8671 2015-11-17 Jason Merrill <jason@redhat.com>
8674 * c-common.c (warn_tautological_cmp): Fold before checking for
8677 2015-11-16 Marek Polacek <polacek@redhat.com>
8680 * c-common.c (check_case_bounds): Fold low and high cases.
8682 2015-11-16 Marek Polacek <polacek@redhat.com>
8684 * c-ada-spec.c (dump_ada_template): Use RECORD_OR_UNION_TYPE_P.
8685 * c-common.c (c_common_get_alias_set): Likewise.
8686 (handle_visibility_attribute): Likewise.
8688 2015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
8690 * c-common.c (handle_simd_attribute): New.
8691 (struct attribute_spec): Add entry for "simd".
8692 (handle_simd_attribute): New.
8694 2015-11-13 Kai Tietz <ktietz70@googlemail.com>
8696 * c-lex.c (interpret_float): Use fold_convert.
8698 2015-11-13 David Malcolm <dmalcolm@redhat.com>
8700 * c-common.c (c_fully_fold_internal): Capture existing souce_range,
8701 and store it on the result.
8702 * c-opts.c (c_common_init_options): Set
8703 global_dc->colorize_source_p.
8705 2015-11-12 James Norris <jnorris@codesourcery.com>
8706 Joseph Myers <joseph@codesourcery.com>
8708 * c-pragma.c (oacc_pragmas): Add entry for declare directive.
8709 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_DECLARE.
8710 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT and
8711 PRAGMA_OACC_CLAUSE_LINK.
8713 2015-11-11 Marek Polacek <polacek@redhat.com>
8717 * c-common.c (valid_array_size_p): New function.
8718 * c-common.h (valid_array_size_p): Declare.
8720 2015-11-11 Dominique d'Humieres <dominiq@lps.ens.fr>
8723 * c-pragma.c (c_register_pragma_1): Update the gcc_assert to 256.
8725 2015-11-11 Andrew MacLeod <amacleod@redhat.com>
8727 * array-notation-common.c: Remove unused header files.
8728 * c-ada-spec.c: Likewise.
8729 * c-cilkplus.c: Likewise.
8730 * c-common.c: Likewise.
8731 * c-cppbuiltin.c: Likewise.
8732 * c-dump.c: Likewise.
8733 * c-format.c: Likewise.
8734 * c-gimplify.c: Likewise.
8735 * c-indentation.c: Likewise.
8736 * c-lex.c: Likewise.
8737 * c-omp.c: Likewise.
8738 * c-opts.c: Likewise.
8739 * c-pch.c: Likewise.
8740 * c-ppoutput.c: Likewise.
8741 * c-pragma.c: Likewise.
8742 * c-pretty-print.c: Likewise.
8743 * c-semantics.c: Likewise.
8744 * c-ubsan.c: Likewise.
8746 * stub-objc.c: Likewise.
8748 2015-11-09 Thomas Schwinge <thomas@codesourcery.com>
8749 Cesar Philippidis <cesar@codesourcery.com>
8750 James Norris <jnorris@codesourcery.com>
8751 Julian Brown <julian@codesourcery.com>
8752 Nathan Sidwell <nathan@codesourcery.com>
8754 * c-pragma.c (oacc_pragmas): Add "routine".
8755 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ROUTINE.
8757 2015-11-08 Eric Botcazou <ebotcazou@adacore.com>
8759 * c-common.c (c_common_attributes): Add scalar_storage_order.
8760 (handle_scalar_storage_order_attribute): New function.
8761 * c-pragma.c (global_sso): New variable.
8762 (maybe_apply_pragma_scalar_storage_order): New function.
8763 (handle_pragma_scalar_storage_order): Likewise.
8764 (init_pragma): Register scalar_storage_order.
8765 * c-pragma.h (maybe_apply_pragma_scalar_storage_order): Declare.
8766 * c.opt (Wscalar-storage-order): New warning.
8767 (fsso-struct=): New option.
8769 2015-11-08 Martin Sebor <msebor@redhat.com>
8771 * c.opt (Wplacement-new): Add a period to the end of a sentence.
8773 2015-11-07 Richard Sandiford <richard.sandiford@arm.com>
8775 * c-common.c: Don't undef DEF_BUILTIN.
8777 2015-11-06 David Malcolm <dmalcolm@redhat.com>
8779 * c-common.c (c_cpp_error): Convert parameter from location_t to
8780 rich_location *. Eliminate the "column_override" parameter and
8781 the call to diagnostic_override_column.
8782 Update the "done_lexing" clause to set range 0
8783 on the rich_location, rather than overwriting a location_t.
8784 * c-common.h (c_cpp_error): Convert parameter from location_t to
8785 rich_location *. Eliminate the "column_override" parameter.
8787 2015-11-05 Cesar Philippidis <cesar@codesourcery.com>
8788 Thomas Schwinge <thomas@codesourcery.com>
8789 James Norris <jnorris@codesourcery.com>
8791 * c-omp.c (c_oacc_split_loop_clauses): Make TILE, GANG, WORKER, VECTOR,
8792 AUTO, SEQ, INDEPENDENT and PRIVATE loop clauses. Associate REDUCTION
8793 clauses with parallel and kernels and loops.
8794 * c-pragma.h (enum pragma_omp_clause): Add entries for
8795 PRAGMA_OACC_CLAUSE_{INDEPENDENT,TILE,DEFAULT}.
8796 * pt.c (tsubst_omp_clauses): Add support for OMP_CLAUSE_{NUM_GANGS,
8797 NUM_WORKERS,VECTOR_LENGTH,GANG,WORKER,VECTOR,ASYNC,WAIT,TILE,AUTO,
8799 (tsubst_expr): Add support for OMP_CLAUSE_{KERNELS,PARALLEL,LOOP}.
8801 2015-11-05 Martin Sebor <msebor@redhat.com>
8804 * c.opt (-Wplacement-new): New option.
8806 2015-11-05 Jakub Jelinek <jakub@redhat.com>
8808 * c-common.h (c_finish_omp_atomic): Add TEST argument.
8809 (c_omp_check_loop_iv, c_omp_check_loop_iv_exprs): New prototypes.
8810 * c-omp.c (c_finish_omp_atomic): Add TEST argument. Don't call
8811 save_expr or create_tmp_var* if TEST is true.
8812 (c_finish_omp_for): Store OMP_FOR_ORIG_DECLS always.
8813 Don't call add_stmt here.
8814 (struct c_omp_check_loop_iv_data): New type.
8815 (c_omp_check_loop_iv_r, c_omp_check_loop_iv,
8816 c_omp_check_loop_iv_exprs): New functions.
8817 (c_omp_split_clauses): Adjust for lastprivate being allowed on
8819 (c_omp_declare_simd_clauses_to_numbers): Change
8820 OMP_CLAUSE_LINEAR_VARIABLE_STRIDE OMP_CLAUSE_LINEAR_STEP into numbers.
8821 (c_omp_declare_simd_clauses_to_decls): Similarly change those
8822 from numbers to PARM_DECLs.
8824 2015-11-04 Mikhail Maltsev <maltsevm@gmail.com>
8826 * c-omp.c (c_omp_split_clauses): Remove conditional compilation. Use
8829 2015-11-03 Bernd Schmidt <bschmidt@redhat.com>
8832 * c-common.h (fold_offsetof_1): Add argument.
8833 * c-common.c (fold_offsetof_1): Diagnose more invalid
8834 offsetof expressions that reference elements past the end of
8837 2015-11-03 Thomas Schwinge <thomas@codesourcery.com>
8838 Chung-Lin Tang <cltang@codesourcery.com>
8840 * c-pragma.c (oacc_pragmas): Add "atomic".
8841 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ATOMIC.
8843 2015-10-30 Evgeny Stupachenko <evstupac@gmail.com>
8845 * c-common.c (handle_target_clones_attribute): New.
8846 (c_common_attribute_table): Add handle_target_clones_attribute.
8847 (handle_always_inline_attribute): Add check on target_clones attribute.
8848 (handle_target_attribute): Ditto.
8850 2015-10-29 Andrew MacLeod <amacleod@redhat.com>
8852 * array-notation-common.c: Reorder #include's and remove duplicates.
8853 * c-ada-spec.c: Likewise.
8854 * c-cilkplus.c: Likewise.
8855 * c-common.c: Likewise.
8856 * c-cppbuiltin.c: Likewise.
8857 * c-dump.c: Likewise.
8858 * c-format.c: Likewise.
8859 * c-gimplify.c: Likewise.
8860 * c-indentation.c: Likewise.
8861 * c-lex.c: Likewise.
8862 * c-omp.c: Likewise.
8863 * c-opts.c: Likewise.
8864 * c-pch.c: Likewise.
8865 * c-ppoutput.c: Likewise.
8866 * c-pragma.c: Likewise.
8867 * c-pretty-print.c: Likewise.
8868 * c-semantics.c: Likewise.
8869 * c-ubsan.c: Likewise.
8871 * stub-objc.c: Likewise.
8873 2015-10-28 Jason Merrill <jason@redhat.com>
8875 * c-common.c (pointer_int_sum): Fold the MULT_EXPR.
8877 2015-10-27 Thomas Schwinge <thomas@codesourcery.com>
8878 James Norris <jnorris@codesourcery.com>
8879 Cesar Philippidis <cesar@codesourcery.com>
8883 * c-common.h (c_oacc_split_loop_clauses): Declare function.
8884 * c-omp.c (c_oacc_split_loop_clauses): New function.
8886 2015-10-21 Martin Sebor <msebor@redhat.com>
8889 * c.opt: End each sentence that describes an option with a period.
8891 2015-10-20 Marek Polacek <polacek@redhat.com>
8893 * array-notation-common.c (is_cilkplus_vector_p): Define.
8894 * c-common.h (is_cilkplus_vector_p): Declare.
8896 2015-10-20 Marek Polacek <polacek@redhat.com>
8898 * c.opt (std=gnu++11): Do not describe as experimental.
8899 (std=gnu++14): Likewise.
8901 2015-10-19 Jason Merrill <jason@redhat.com>
8903 * c-cppbuiltin.c (c_cpp_builtins): Define
8904 __cpp_nontype_template_args.
8906 2015-10-19 Jason Merrill <jason@redhat.com>
8908 * c-cppbuiltin.c (c_cpp_builtins): Define
8909 __cpp_enumerator_attributes, __cpp_fold_expressions,
8910 __cpp_unicode_characters.
8912 2015-10-13 Jakub Jelinek <jakub@redhat.com>
8913 Aldy Hernandez <aldyh@redhat.com>
8915 * c-common.c (enum c_builtin_type): Define DEF_FUNCTION_TYPE_9,
8916 DEF_FUNCTION_TYPE_10 and DEF_FUNCTION_TYPE_11.
8917 (c_define_builtins): Likewise.
8918 * c-common.h (enum c_omp_clause_split): Add
8919 C_OMP_CLAUSE_SPLIT_TASKLOOP.
8920 (c_finish_omp_critical, c_finish_omp_ordered): Add CLAUSES argument.
8921 (c_finish_omp_for): Add ORIG_DECLV argument.
8922 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP as
8923 201511 instead of 201307.
8924 * c-omp.c (c_finish_omp_critical): Add CLAUSES argument, set
8925 OMP_CRITICAL_CLAUSES to it.
8926 (c_finish_omp_ordered): Add CLAUSES argument, set
8927 OMP_ORDERED_CLAUSES to it.
8928 (c_finish_omp_for): Add ORIG_DECLV argument, set OMP_FOR_ORIG_DECLS
8929 to it if OMP_FOR. Clear DECL_INITIAL on the IVs.
8930 (c_omp_split_clauses): Handle OpenMP 4.5 combined/composite
8931 constructs and new OpenMP 4.5 clauses. Clear
8932 OMP_CLAUSE_SCHEDULE_SIMD if not combined with OMP_SIMD. Add
8934 * c-pragma.c (omp_pragmas_simd): Add taskloop.
8935 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKLOOP.
8936 (enum pragma_omp_clause): Add
8937 PRAGMA_OMP_CLAUSE_{DEFAULTMAP,GRAINSIZE,HINT,{IS,USE}_DEVICE_PTR}
8938 and PRAGMA_OMP_CLAUSE_{LINK,NOGROUP,NUM_TASKS,PRIORITY,SIMD,THREADS}.
8940 2015-10-05 Richard Sandiford <richard.sandiford@arm.com>
8942 * c-lex.c (interpret_float): Use real_equal instead of
8945 2015-10-04 Jason Merrill <jason@redhat.com>
8947 Implement N4514, C++ Extensions for Transactional Memory.
8948 * c-common.c (c_common_reswords): Add C++ TM TS keywords.
8949 (c_common_attribute_table): Add transaction_safe_dynamic.
8950 transaction_safe now affects type identity.
8951 (handle_tm_attribute): Handle transaction_safe_dynamic.
8952 * c-common.h (enum rid): Add RID_ATOMIC_NOEXCEPT,
8953 RID_ATOMIC_CANCEL, RID_SYNCHRONIZED.
8954 (OBJC_IS_CXX_KEYWORD): Add RID_SYNCHRONIZED.
8956 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_transactional_memory.
8957 * c-pretty-print.c (pp_c_attributes_display): Don't print
8958 transaction_safe in C++.
8960 2015-10-02 Marek Polacek <polacek@redhat.com>
8962 * c.opt (Wduplicated-cond): Don't enable by -Wall anymore.
8964 2015-10-02 Marek Polacek <polacek@redhat.com>
8967 * c-common.c (warn_duplicated_cond_add_or_warn): New function.
8968 * c-common.h (warn_duplicated_cond_add_or_warn): Declare.
8969 * c.opt (Wduplicated-cond): New option.
8971 2015-10-01 Joseph Myers <joseph@codesourcery.com>
8973 * c.opt (std=c11): Do not describe as experimental.
8974 (std=gnu11): Likewise.
8975 (std=iso9899:2011): Likewise.
8977 2015-09-28 Nathan Sidwell <nathan@codesourcery.com>
8979 * c-common.c (DEF_FUNCTION_TYPE_VAR_6): New.
8980 (DEF_FUNCTION_TYPE_VAR_11): Delete.
8982 2015-09-25 Marek Polacek <polacek@redhat.com>
8984 * c-ubsan.c (ubsan_instrument_division): Remove unnecessary code.
8985 (ubsan_instrument_shift): Likewise.
8987 2015-09-25 Marek Polacek <polacek@redhat.com>
8990 * c-ubsan.c (ubsan_instrument_division): Also pre-evaluate OP1.
8992 2015-09-24 Patrick Palka <ppalka@gcc.gnu.org>
8994 * c-indentation.c (should_warn_for_misleading_indentation):
8995 Compare next_stmt_vis_column with guard_line_first_nws instead
8996 of with guard_line_vis_column.
8998 2015-09-23 Manuel López-Ibáñez <manu@gcc.gnu.org>
9002 * c-pragma.c (handle_pragma_diagnostic): Detect non-warning
9003 options and options not valid for the current language.
9005 2015-09-22 Patrick Palka <ppalka@gcc.gnu.org>
9007 * c-indentation.c (should_warn_for_misleading_indentation):
9008 Float out and consolidate the calls to get_visual_column that
9009 are passed guard_exploc as an argument. Compare
9010 next_stmt_vis_column with guard_line_first_nws instead of with
9011 body_line_first_nws.
9013 2015-09-22 Nathan Sidwell <nathan@codesourcery.com>
9015 * c.opt (Wmultiple-inheritance, Wvirtual-inheritance, Wtemplates,
9016 Wnamespaces): New C++ warnings.
9018 2015-09-22 Jason Merrill <jason@redhat.com>
9020 * c-common.h (abi_compat_version_crosses): New.
9021 (warn_abi_version): Declare.
9022 * c-common.c: Define it.
9023 * c-opts.c (c_common_post_options): Handle it.
9024 flag_abi_compat_version defaults to 8.
9026 2015-09-21 Ville Voutilainen <ville.voutilainen@gmail.com>
9028 Complete the implementation of N4230, Nested namespace definition.
9029 * c-cppbuiltin.c: Add __cpp_namespace_attributes and
9030 __cpp_nested_namespace_definitions.
9032 2015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
9034 * c-pragma.c (handle_pragma_diagnostic): Fix wrong return.
9036 2015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
9038 * c-pragma.c (handle_pragma_diagnostic): Use explicit location
9040 * c-pragma.h (pragma_lex): Add optional loc argument.
9042 2015-09-16 Mikhail Maltsev <maltsevm@gmail.com>
9044 * c-format.c (check_format_arg): Adjust to use common block size in all
9047 2015-09-15 David Malcolm <dmalcolm@redhat.com>
9049 * c-format.c (location_from_offset): Update for change in
9050 signature of location_get_source_line.
9051 * c-indentation.c (get_visual_column): Likewise.
9052 (line_contains_hash_if): Likewise.
9054 2015-09-14 Marek Polacek <polacek@redhat.com>
9056 * c-opts.c (c_common_post_options): Set C++ standard earlier, before
9057 setting various warnings.
9059 2015-09-14 Marek Polacek <polacek@redhat.com>
9061 * c-common.c (warn_for_sign_compare): Cast to unsigned when shifting
9064 2015-09-11 Mark Wielaard <mjw@redhat.com>
9067 * c.opt (Wunused-variable): Option from common.opt.
9068 (Wunused-const-variable): New option.
9070 2015-09-09 Paolo Carlini <paolo.carlini@oracle.com>
9073 * c.opt ([Wsubobject-linkage]): Add.
9075 2015-09-03 Martin Sebor <msebor@redhat.com>
9078 * c-common.h (c_decl_implicit, reject_gcc_builtin): Declare new
9080 * c-common.c (reject_gcc_builtin): Define.
9082 2015-09-02 Balaji V. Iyer <balaji.v.iyer@intel.com>
9085 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): New
9087 * c-gimplify.c (c_gimplify_expr): Added a call to the function
9088 cilk_gimplify_call_params_in_spawned_fn.
9089 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): New function.
9090 (gimplify_cilk_spawn): Removed EXPR_STMT and CLEANUP_POINT_EXPR
9093 2015-08-25 Marek Polacek <polacek@redhat.com>
9096 * c-common.c (handle_weak_attribute): Don't check whether the
9097 visibility can be changed here.
9099 2015-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
9101 * c-lex.c (c_lex_with_flags): Use explicit locations.
9103 2015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
9105 * c-ada-spec.h, c-common.c, c-common.h, c-format.c, c-format.h,
9106 c-objc.h, c-ppoutput.c, c-pragma.c, c-pragma.h: Remove useless
9108 2015-08-18 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
9111 * c-common.c (check_builtin_function_arguments): Add check
9112 for BUILT_IN_SIGNBIT argument.
9114 2015-08-18 Paolo Carlini <paolo.carlini@oracle.com>
9117 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_static_assert value
9120 2015-08-17 Marek Polacek <polacek@redhat.com>
9122 * c-pretty-print.c (pp_c_cv_qualifiers): Remove code dealing
9123 with whitespaces before qualifier names.
9125 2015-08-12 Marek Polacek <polacek@redhat.com>
9128 * c-common.c (maybe_warn_shift_overflow): Properly handle
9129 left-shifting 1 into the sign bit.
9131 2015-08-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
9133 * c.opt (Wchkp): Use LangEnabledBy instead of EnabledBy.
9135 2015-08-06 Andrew Sutton <andrew.n.sutton@gmail.com>
9136 Braden Obrzut <admin@maniacsvault.net>
9137 Jason Merrill <jason@redhat.com>
9139 Add C++ Concepts TS support.
9140 * c-common.c (c_common_reswords): Add __is_same_as, concept, requires.
9141 * c-common.h (enum rid): Add RID_IS_SAME_AS, RID_CONCEPT, RID_REQUIRES.
9142 (D_CXX_CONCEPTS, D_CXX_CONCEPTS_FLAGS): New.
9143 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_concepts.
9144 * c-opts.c (set_std_cxx1z): Set flag_concepts.
9145 * c.opt (fconcepts): New.
9147 2015-08-02 Martin Sebor <msebor@redhat.com>
9149 * c.opt (-Wframe-address): New warning option.
9151 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
9153 * c-indentation.c (should_warn_for_misleading_indentation):
9156 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
9158 * c-indentation.c (get_visual_column): Add parameter first_nws,
9159 use it. Update comment documenting the function.
9160 (is_first_nonwhitespace_on_line): Remove.
9161 (should_warn_for_misleading_indentation): Replace usage of
9162 of is_first_nonwhitespace_on_line with get_visual_column.
9164 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
9166 * c-indentation.h (struct token_indent_info): Define.
9167 (get_token_indent_info): Define.
9168 (warn_for_misleading_information): Declare.
9169 * c-common.h (warn_for_misleading_information): Remove.
9170 * c-identation.c (warn_for_misleading_indentation):
9171 Change declaration to take three token_indent_infos. Adjust
9173 * c-identation.c (should_warn_for_misleading_indentation):
9174 Likewise. Bail out early if the body is a compound statement.
9175 (guard_tinfo_to_string): Define.
9177 2015-07-30 Jason Merrill <jason@redhat.com>
9179 * c-pretty-print.c (unary_expression) [INDIRECT_REF]: Don't print
9180 '*' for reference decay.
9182 2015-07-30 Marek Polacek <polacek@redhat.com>
9184 * c-common.c (warn_tautological_cmp): Bail for float types.
9186 2015-07-27 Marek Polacek <polacek@redhat.com>
9189 * c-common.c (warn_tautological_cmp): Don't warn for macro expansion.
9191 2015-07-27 Marek Polacek <polacek@redhat.com>
9195 * c-common.c (find_array_ref_with_const_idx_r): New function.
9196 (warn_tautological_cmp): New function.
9197 * c-common.h (warn_tautological_cmp): Declare.
9198 * c.opt (Wtautological-compare): New option.
9200 2015-07-23 Marek Polacek <polacek@redhat.com>
9202 * c-ubsan.c (ubsan_instrument_division): Use unshare_expr throughout.
9203 (ubsan_instrument_shift): Likewise.
9205 2015-07-23 Marek Polacek <polacek@redhat.com>
9208 * c-ubsan.c: Include gimplify.h.
9209 (ubsan_instrument_division): Unshare OP0 and OP1.
9210 (ubsan_instrument_shift): Likewise.
9212 2015-07-20 Marek Polacek <polacek@redhat.com>
9213 Richard Sandiford <richard.sandiford@arm.com>
9216 * c-common.c (c_fully_fold_internal): Warn about left shift overflows.
9217 Use EXPR_LOC_OR_LOC.
9218 (maybe_warn_shift_overflow): New function.
9219 * c-common.h (maybe_warn_shift_overflow): Declare.
9220 * c-opts.c (c_common_post_options): Set warn_shift_overflow.
9221 * c.opt (Wshift-overflow): New option.
9223 2015-07-16 Martin Liska <mliska@suse.cz>
9225 * c-format.c (static void check_format_info_main): Use
9226 object_allocator instead of pool_allocator.
9227 (check_format_arg): Likewise.
9228 (check_format_info_main): Likewise.
9230 2015-07-15 Andrew MacLeod <amacleod@redhat.com>
9232 * c-opts.c: Remove multiline #include comment.
9234 2015-07-12 Aldy Hernandez <aldyh@redhat.com>
9236 * c-common.c: Fix double word typos.
9238 2015-07-10 Eric Botcazou <ebotcazou@adacore.com>
9240 * c-ada-spec.h (cpp_operation): Revert latest change.
9241 * c-ada-spec.c (print_ada_declaration): Likewise. Skip implicit
9242 constructors and destructors.
9244 2015-07-09 Andrew MacLeod <amacleod@redhat.com>
9246 * c-common.h: Adjust includes for flags.h changes.
9247 * stub-objc.c: Likewise.
9249 2015-07-08 Eric Botcazou <ebotcazou@adacore.com>
9251 * c-ada-spec.h (cpp_operation): Add IS_CONSTEXPR.
9252 * c-ada-spec.c (print_ada_declaration): Skip constexpr constructors.
9254 2015-07-08 Jakub Jelinek <jakub@redhat.com>
9256 * c-omp.c (c_omp_declare_simd_clauses_to_numbers): If all clauses
9257 are to be removed, return NULL rather than original clauses list.
9259 2015-07-07 Andrew MacLeod <amacleod@redhat.com>
9261 * array-notation-common.c: Adjust includes.
9262 * c-ada-spec.c: Likewise.
9263 * c-cilkplus.c: Likewise.
9264 * c-common.h: Likewise.
9265 * c-cppbuiltin.c: Likewise.
9266 * c-dump.c: Likewise.
9267 * c-format.c: Likewise.
9268 * c-gimplify.c: Likewise.
9269 * c-indentation.c: Likewise.
9270 * c-lex.c: Likewise.
9271 * c-omp.c: Likewise.
9272 * c-opts.c: Likewise.
9273 * c-pch.c: Likewise.
9274 * c-ppoutput.c: Likewise.
9275 * c-pragma.c: Likewise.
9276 * c-pretty-print.c: Likewise.
9277 * c-semantics.c: Likewise.
9278 * c-ubsan.c: Likewise.
9280 * stub-objc.c: Likewise.
9282 2015-07-07 Eric Botcazou <ebotcazou@adacore.com>
9284 * c-ada-spec.h (cpp_operation): Add IS_MOVE_CONSTRUCTOR.
9285 * c-ada-spec.c (print_ada_declaration): Skip move constructors.
9287 2015-07-01 Jason Merrill <jason@redhat.com>
9289 * c-common.h (D_CXX11): Rename from D_CXX0X.
9290 (RID_FIRST_CXX11, RID_LAST_CXX11): Rename from *_CXX0X.
9291 * c-common.c: Adjust.
9293 * c-opts.c (c_common_post_options): Default to C++14.
9295 * c-opts.c (c_common_post_options): Highest ABI level is now 10.
9297 2015-06-30 Edward Smith-Rowland <3dw4rd@verizon.net>
9299 Implement N4197 - Adding u8 character literals
9300 * c-ada-spec.c (print_ada_macros): Treat CPP_UTF8CHAR like
9302 * c-common.c (c_parse_error): Print CPP_UTF8CHAR and
9303 CPP_UTF8CHAR_USERDEF tokens.
9304 * c-lex.c (c_lex_with_flags): Treat CPP_UTF8CHAR_USERDEF
9305 and CPP_UTF8CHAR tokens.
9306 (lex_charconst): Treat CPP_UTF8CHAR token.
9308 2015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
9311 * c-common.c (do_warn_unused_parameter): Move here.
9312 * c-common.h (do_warn_unused_parameter): Declare.
9314 2015-06-29 Marek Polacek <polacek@redhat.com>
9317 * c-common.c (check_case_bounds): Add bool * parameter. Set
9319 (c_add_case_label): Add bool * parameter. Pass it down to
9321 (c_do_switch_warnings): Add bool parameters. Implement -Wswitch-bool
9323 * c-common.h (c_add_case_label, c_do_switch_warnings): Update
9326 2015-06-27 Marek Polacek <polacek@redhat.com>
9328 * c-common.c (check_main_parameter_types): Use VECTOR_TYPE_P
9329 or VECTOR_INTEGER_TYPE_P throughout.
9330 * c-gimplify.c: Likewise.
9332 2015-06-26 Marek Polacek <polacek@redhat.com>
9334 * array-notation-common.c (find_rank): Use INDIRECT_REF_P.
9335 * c-common.c (c_fully_fold_internal): Likewise.
9336 (c_alignof_expr): Likewise.
9337 * c-pretty-print.c (c_pretty_printer::postfix_expression): Likewise.
9338 * c-ubsan.c (ubsan_instrument_bounds): Likewise.
9339 * cilk.c (create_parm_list): Likewise.
9341 2015-06-26 Marek Polacek <polacek@redhat.com>
9343 * c-common.c (handle_unused_attribute): Use VAR_OR_FUNCTION_DECL_P.
9345 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
9347 * c-common.c: Remove ipa-ref.h and plugin-api.h from include list.
9348 * c-gimplify.c: Likewise.
9349 * c-pragma.c: Likewise.
9350 * c-ubsan.c: Likewise.
9353 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
9355 * c-common.c (c_type_hasher): Inherit from ggc_ptr_hash rather than
9358 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
9360 * cilk.c: Move calls.h after tm.h in the include chain.
9362 2015-06-25 Marek Polacek <polacek@redhat.com>
9364 * array-notation-common.c: Use VAR_P throughout.
9365 * c-ada-spec.c: Likewise.
9366 * c-common.c: Likewise.
9367 * c-format.c: Likewise.
9368 * c-gimplify.c: Likewise.
9369 * c-omp.c: Likewise.
9370 * c-pragma.c: Likewise.
9371 * c-pretty-print.c: Likewise.
9374 2015-06-25 Marek Polacek <polacek@redhat.com>
9376 * cilk.c (extract_free_variables): Use is_global_var.
9378 2015-06-23 Richard Sandiford <richard.sandiford@arm.com>
9380 * c-common.c: Don't include target-def.h.
9382 2015-06-23 Marek Polacek <polacek@redhat.com>
9384 * c-common.c (warn_logical_operator): Use tree_int_cst_equal
9385 when comparing INTEGER_CSTs.
9387 2015-06-22 Pierre-Marie de Rodat <derodat@adacore.com>
9389 * c-ada-spec.h (cpp_operation): Add HAS_DEPENDENT_TEMPLATE_ARGS.
9390 * c-ada-spec.c (collect_ada_nodes): Skip NAMESPACE_DECL
9391 (dump_ada_template): Skip partially specialized types.
9393 2015-06-22 Mikhail Maltsev <maltsevm@gmail.com>
9395 * c-common.c (scalar_to_vector): Use std::swap instead of manually
9398 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
9400 * array-notation-common.c: Do not include input.h, line-map.h or is-a.h.
9401 * c-ada-spec.c: Likewise.
9402 * c-cilkplus.c: Likewise.
9403 * c-common.c: Likewise.
9404 * c-common.h: Likewise.
9405 * c-cppbuiltin.c: Likewise.
9406 * c-dump.c: Likewise.
9407 * c-format.c: Likewise.
9408 * c-gimplify.c: Likewise.
9409 * c-indentation.c: Likewise.
9410 * c-lex.c: Likewise.
9411 * c-omp.c: Likewise.
9412 * c-opts.c: Likewise.
9413 * c-pch.c: Likewise.
9414 * c-ppoutput.c: Likewise.
9415 * c-pragma.c: Likewise.
9416 * c-pretty-print.c: Likewise.
9417 * c-semantics.c: Likewise.
9418 * c-ubsan.c: Likewise.
9420 * stub-objc.c: Likewise.
9422 2015-06-13 Patrick Palka <ppalka@gcc.gnu.org>
9425 * c-common.c (c_common_truthvalue_conversion): Warn when
9426 converting an address of a reference to a truth value.
9428 2015-06-08 Andrew MacLeod <amacleod@redhat.com>
9430 * array-notation-common.c : Adjust include files.
9431 * c-ada-spec.c : Likewise.
9432 * c-cilkplus.c : Likewise.
9433 * c-common.c : Likewise.
9434 * c-common.h : Likewise.
9435 * c-cppbuiltin.c : Likewise.
9436 * c-dump.c : Likewise.
9437 * c-format.c : Likewise.
9438 * c-gimplify.c : Likewise.
9439 * c-indentation.c : Likewise.
9440 * c-lex.c : Likewise.
9441 * c-omp.c : Likewise.
9442 * c-opts.c : Likewise.
9443 * c-pch.c : Likewise.
9444 * c-ppoutput.c : Likewise.
9445 * c-pragma.c : Likewise.
9446 * c-pretty-print.c : Likewise.
9447 * c-semantics.c : Likewise.
9448 * c-ubsan.c : Likewise.
9449 * cilk.c : Likewise.
9450 * stub-objc.c : Likewise.
9452 2015-06-08 Marek Polacek <polacek@redhat.com>
9455 * c-format.c (location_from_offset): Return LOC if LINE is null.
9457 2015-06-05 Aldy Hernandez <aldyh@redhat.com>
9459 * c-common.h (c_parse_final_cleanups): New prototype.
9460 * c-opts.c (c_common_parse_file): Call c_parse_final_cleanups.
9462 2015-06-04 Sriraman Tallam <tmsriram@google.com>
9464 * c-common.c (noplt): New attribute.
9465 (handle_noplt_attribute): New handler.
9467 2015-06-04 Andrew MacLeod <amacleod@redhat.com>
9469 * array-notation-common.c: Adjust includes for restructured coretypes.h.
9470 * c-ada-spec.c: Likewise.
9471 * c-cilkplus.c: Likewise.
9472 * c-common.c: Likewise.
9473 * c-common.h: Likewise.
9474 * c-cppbuiltin.c: Likewise.
9475 * c-dump.c: Likewise.
9476 * c-format.c: Likewise.
9477 * c-gimplify.c: Likewise.
9478 * c-indentation.c: Likewise.
9479 * c-lex.c: Likewise.
9480 * c-omp.c: Likewise.
9481 * c-opts.c: Likewise.
9482 * c-pch.c: Likewise.
9483 * c-ppoutput.c: Likewise.
9484 * c-pragma.c: Likewise.
9485 * c-pretty-print.c: Likewise.
9486 * c-semantics.c: Likewise.
9487 * c-ubsan.c: Likewise.
9489 * stub-objc.c: Likewise.
9491 2015-06-02 David Malcolm <dmalcolm@redhat.com>
9494 * c-indentation.c (should_warn_for_misleading_indentation): Use
9495 expand_location rather than expand_location_to_spelling_point.
9496 Don't warn if the guarding statement is more indented than the
9499 2015-06-02 David Malcolm <dmalcolm@redhat.com>
9501 * c-indentation.c (warn_for_misleading_indentation): Bail out
9502 immediately if -Wmisleading-indentation isn't enabled.
9504 2015-06-01 Martin Liska <mliska@suse.cz>
9506 * c-format.c (check_format_arg):Use new type-based pool allocator.
9507 (check_format_info_main) Likewise.
9509 2015-05-31 Eric Botcazou <ebotcazou@adacore.com>
9511 * c-ada-spec.c (is_tagged_type): Test for TYPE_METHODS on main variant.
9512 (has_nontrivial_methods): Likewise.
9514 2015-05-25 Marek Polacek <polacek@redhat.com>
9516 * c-ubsan.c (ubsan_instrument_shift): Use type0.
9518 2015-05-22 Marek Polacek <polacek@redhat.com>
9521 * c-common.c (handle_deprecated_attribute): Allow CONST_DECL.
9523 2015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
9525 * c-cppbuiltin.c (c_cpp_builtins): Use if instead of #if with
9526 STACK_GROWS_DOWNWARD.
9528 2015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
9530 * c-cppbuiltin.c (c_cpp_builtins): Check the value of
9531 STACK_GROWS_DOWNWARD rather than if it is defined.
9533 2015-05-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
9536 * c-format.c (location_column_from_byte_offset): New.
9537 (location_from_offset): New.
9538 (struct format_wanted_type): Add offset_loc field.
9539 (check_format_info): Move handling of location for extra arguments
9540 closer to the point of warning.
9541 (check_format_info_main): Pass the result of location_from_offset
9543 (format_type_warning): Pass the result of location_from_offset
9546 2015-05-20 Marek Polacek <polacek@redhat.com>
9548 * c-omp.c (check_omp_for_incr_expr): Use BINARY_CLASS_P.
9550 2015-05-20 Marek Polacek <polacek@redhat.com>
9552 * c-ada-spec.c (dump_sloc): Use DECL_P.
9554 2015-05-20 Marek Polacek <polacek@redhat.com>
9556 * c-pragma.c: Use VAR_OR_FUNCTION_DECL_P throughout.
9557 * c-common.c: Likewise.
9559 2015-05-19 David Malcolm <dmalcolm@redhat.com>
9561 * c-common.h (fe_file_change): Strengthen param from
9562 const line_map * to const line_map_ordinary *.
9563 (pp_file_change): Likewise.
9564 * c-lex.c (fe_file_change): Likewise.
9565 (cb_define): Use linemap_check_ordinary when invoking
9567 (cb_undef): Likewise.
9568 * c-opts.c (c_finish_options): Use linemap_check_ordinary when
9569 invoking cb_file_change.
9570 (c_finish_options): Likewise.
9571 (push_command_line_include): Likewise.
9572 (cb_file_change): Strengthen param "new_map" from
9573 const line_map * to const line_map_ordinary *.
9574 * c-ppoutput.c (cb_define): Likewise for local "map".
9575 (pp_file_change): Likewise for param "map" and local "from".
9577 2015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
9579 * c-common.c (shorten_compare): Use std::swap instead of explicit swaps.
9581 2015-05-18 Tom de Vries <tom@codesourcery.com>
9583 * c-common.c (build_va_arg_1): New function.
9584 (build_va_arg): Add address operator to va_list operand if necessary.
9586 2015-05-15 Mikhail Maltsev <maltsevm@gmail.com>
9589 * c-common.c (int_safely_convertible_to_real_p): Define.
9590 (unsafe_conversion_p): Check conversions involving complex types.
9591 (conversion_warning): Add new warning message for conversions which
9592 discard imaginary component.
9593 * c-common.h: (enum conversion_safety): Add new enumerator for such
9596 2015-05-14 Marek Polacek <polacek@redhat.com>
9600 * c-common.c (c_fully_fold): Pass false down to c_fully_fold_internal.
9601 (c_fully_fold_internal): Fold C_MAYBE_CONST_EXPRs with
9602 C_MAYBE_CONST_EXPR_INT_OPERANDS set. Add FOR_INT_CONST argument and
9603 use it. If FOR_INT_CONST, require that all evaluated operands be
9606 2015-05-12 David Malcolm <dmalcolm@redhat.com>
9608 * c-common.h (warn_for_misleading_indentation): New prototype.
9609 * c-indentation.c: New file.
9610 * c.opt (Wmisleading-indentation): New option.
9612 2015-05-12 Tom de Vries <tom@codesourcery.com>
9614 PR tree-optimization/66010
9615 * c-common.c (build_va_arg): Don't mark ap addressable unless necessary.
9617 2015-05-09 Jason Merrill <jason@redhat.com>
9619 * c-opts.c (c_common_post_options): Also clear
9620 cpp_opts->cpp_warn_cxx11_compat.
9622 * c-common.h (enum cxx_dialect): Add cxx_unset.
9623 * c-common.c (cxx_dialect): Initialize to cxx_unset.
9624 * c-opts.c (c_common_post_options): Set C++ dialect to C++98 if unset.
9626 * c.opt (std=c++14): Remove Undocumented flag and experimental warning.
9627 (std=gnu++0x): Mark as Undocumented.
9628 (std=gnu++1y): Add deprecated message.
9630 2015-05-08 Jason Merrill <jason@redhat.com>
9632 * c.opt (Wc++11-compat): Make primary. Rename var warn_cxx11_compat.
9635 * c.opt (Wc++0x-compat): Also set cpp_warn_cxx11_compat.
9637 2015-05-08 Marek Polacek <polacek@redhat.com>
9640 * c.opt (Woverride-init-side-effects): New option.
9642 2015-05-07 Marek Polacek <polacek@redhat.com>
9645 * c-common.c (c_fully_fold_internal): Warn when left shifting a
9647 * c.opt (Wshift-negative-value): New option.
9648 * c-opts.c (c_common_post_options): Set warn_shift_negative_value
9649 when -Wextra and C99/C++11 mode.
9651 2015-05-07 Marek Polacek <polacek@redhat.com>
9652 Martin Uecker <uecker@eecs.berkeley.edu>
9654 * c-ubsan.c (ubsan_instrument_bounds): Don't skip instrumenting
9655 flexible member array-like members if SANITIZE_BOUNDS_STRICT.
9657 2015-05-05 Jason Merrill <jason@redhat.com>
9659 * c.opt (Wterminate): New.
9661 2015-04-30 Marek Polacek <polacek@redhat.com>
9663 * c-common.c (maybe_warn_bool_compare): When comparing with 0/1,
9664 require that the non-constant be of a boolean type.
9666 2015-04-29 Josh Triplett <josh@joshtriplett.org>
9668 * c-common.c (handle_section_attribute): Refactor to reduce
9669 nesting and distinguish between error cases.
9671 2015-04-29 Marek Polacek <polacek@redhat.com>
9674 * c-common.c (maybe_warn_bool_compare): Warn when comparing a boolean
9677 2015-04-29 Jakub Jelinek <jakub@redhat.com>
9679 * c-common.h (omp_clause_mask): Unconditionally define as a class.
9680 Use uint64_t instead of unsigned HOST_WIDE_INT and 64 instead of
9681 HOST_BITS_PER_WIDE_INT.
9683 2015-04-28 Tom de Vries <tom@codesourcery.com>
9685 PR tree-optimization/65887
9686 * c-common.c (build_va_arg): Mark va_arg ap argument as addressable.
9688 2015-04-28 Eric Botcazou <ebotcazou@adacore.com>
9689 Pierre-Marie de Rodat <derodat@adacore.com>
9691 * c-ada-spec.c (in_function): Delete.
9692 (dump_generic_ada_node): Do not change in_function and remove the
9693 redundant code dealing with it.
9694 (print_ada_declaration): Do not change in_function. Use INDENT_INCR.
9695 (print_ada_methods): Output the static member functions in a nested
9696 package after the regular methods as well as associated renamings.
9698 2015-04-24 Marek Polacek <polacek@redhat.com>
9701 * c-common.c (c_fully_fold_internal): Use OPT_Wshift_count_negative
9702 and OPT_Wshift_count_overflow.
9705 * c-common.c (warn_logical_operator): Warn if the operands have the
9708 2015-04-24 Marek Polacek <polacek@redhat.com>
9711 * c-common.c (warn_logical_operator): Bail if either operand comes
9712 from a macro expansion.
9714 2015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
9717 * c-common.c (c_default_pointer_mode): Add definition.
9718 * c-common.h (c_default_pointer_mode): Add declaration.
9720 2015-03-11 Jakub Jelinek <jakub@redhat.com>
9722 * c-common.c (c_common_nodes_and_builtins): Don't call xstrdup
9723 on record_builtin_type argument.
9725 2015-03-10 Jakub Jelinek <jakub@redhat.com>
9728 * c-common.c (warn_logical_not_parentheses): Don't warn for
9731 2015-03-07 Marek Polacek <polacek@redhat.com>
9734 * c-ubsan.c (ubsan_instrument_bounds): Check for COMPONENT_REF
9735 before trying to figure out whether we have a flexible array member.
9737 2015-03-06 Eric Botcazou <ebotcazou@adacore.com>
9738 Jonathan Wakely <jwakely.gcc@gmail.com>
9740 * c-ada-spec.c (dump_ada_double_name): Fix pasto.
9742 2015-03-05 Eric Botcazou <ebotcazou@adacore.com>
9745 * c-ada-spec.c (print_destructor): Remove obsolete code.
9747 2015-03-01 Eric Botcazou <ebotcazou@adacore.com>
9749 * c-ada-spec.c (is_tagged_type): Add guard for DECL_VINDEX.
9750 (dump_template_types): Adjust DECL_TEMPLATE_INSTANTIATIONS and
9751 DECL_TEMPLATE_RESULT emulations.
9752 (dump_ada_template)): Add guard for TYPE_METHODS.
9754 2015-02-27 Marek Polacek <polacek@redhat.com>
9757 * c.opt (Wformat-signedness): Don't enable by -Wformat=2.
9759 2015-02-27 Kai Tietz <ktietz@redhat.com>
9762 * c-pragma.c (handle_pragma_weak): Do not try to create
9763 weak/alias of declarations not being function, or variable
9766 2015-02-24 Thomas Schwinge <thomas@codesourcery.com>
9769 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
9771 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
9773 2015-02-16 Marek Polacek <polacek@redhat.com>
9776 * c-format.c (check_format_types): Handle null param.
9778 2015-02-13 Marek Polacek <polacek@redhat.com>
9781 * c-format.c (check_format_types): Don't warn about different
9782 signedness if the original value is in the range of WANTED_TYPE.
9784 2015-02-12 Jason Merrill <jason@redhat.com>
9787 * c-opts.c (c_common_post_options): Change flag_abi_version from 0
9788 to the current highest version.
9789 * c-cppbuiltin.c (c_cpp_builtins): Assert that it isn't 0.
9791 2015-02-04 Jakub Jelinek <jakub@redhat.com>
9795 * c-omp.c (c_finish_omp_atomic): Use TRUNC_DIV_EXPR
9796 instead of RDIV_EXPR. Use build_binary_op instead of
9799 2015-01-30 Joseph Myers <joseph@codesourcery.com>
9801 * c-opts.c, c-pch.c, cppspec.c: All callers of fatal_error changed
9802 to pass input_location as first argument.
9804 2015-01-23 Tom de Vries <tom@codesourcery.com>
9807 * c.opt (fopenacc): Mark as LTO option.
9809 2015-01-23 Tom de Vries <tom@codesourcery.com>
9812 * c.opt (fopenmp): Mark as LTO option.
9814 2015-01-21 Jakub Jelinek <jakub@redhat.com>
9817 * cilk.c (fill_decls_vec): Only put decls into vector v.
9818 (compare_decls): Fix up formatting.
9820 2015-01-21 Igor Zamyatin <igor.zamyatin@intel.com>
9823 * cilk.c: Include vec.h.
9824 (struct cilk_decls): New structure.
9825 (wrapper_parm_cb): Split this function to...
9826 (fill_decls_vec): ...this...
9827 (create_parm_list): ...and this.
9828 (compare_decls): New function.
9829 (for_local_cb): Remove.
9830 (wrapper_local_cb): Ditto.
9831 (build_wrapper_type): For now first traverse and fill vector of
9832 declarations then sort it and then deal with sorted vector.
9833 (cilk_outline): Ditto.
9834 (declare_one_free_variable): Ditto.
9836 2015-01-21 Jason Merrill <jason@redhat.com>
9839 * c-format.c (check_format_arg): Call decl_constant_value.
9841 2015-01-19 Martin Liska <mliska@suse.cz>
9843 * c-common.c (handle_noicf_attribute): New function.
9845 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
9846 Bernd Schmidt <bernds@codesourcery.com>
9847 James Norris <jnorris@codesourcery.com>
9848 Cesar Philippidis <cesar@codesourcery.com>
9849 Ilmir Usmanov <i.usmanov@samsung.com>
9850 Jakub Jelinek <jakub@redhat.com>
9852 * c.opt (fopenacc): New option.
9853 * c-cppbuiltin.c (c_cpp_builtins): Conditionally define _OPENACC.
9854 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
9856 * c-common.h (c_finish_oacc_wait): New prototype.
9857 * c-omp.c: Include "omp-low.h" and "gomp-constants.h".
9858 (c_finish_oacc_wait): New function.
9859 * c-pragma.c (oacc_pragmas): New variable.
9860 (c_pp_lookup_pragma, init_pragma): Handle it.
9861 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_CACHE,
9862 PRAGMA_OACC_DATA, PRAGMA_OACC_ENTER_DATA, PRAGMA_OACC_EXIT_DATA,
9863 PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP, PRAGMA_OACC_PARALLEL,
9864 PRAGMA_OACC_UPDATE, PRAGMA_OACC_WAIT.
9865 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ASYNC,
9866 PRAGMA_OACC_CLAUSE_AUTO, PRAGMA_OACC_CLAUSE_COLLAPSE,
9867 PRAGMA_OACC_CLAUSE_COPY, PRAGMA_OACC_CLAUSE_COPYIN,
9868 PRAGMA_OACC_CLAUSE_COPYOUT, PRAGMA_OACC_CLAUSE_CREATE,
9869 PRAGMA_OACC_CLAUSE_DELETE, PRAGMA_OACC_CLAUSE_DEVICE,
9870 PRAGMA_OACC_CLAUSE_DEVICEPTR, PRAGMA_OACC_CLAUSE_FIRSTPRIVATE,
9871 PRAGMA_OACC_CLAUSE_GANG, PRAGMA_OACC_CLAUSE_HOST,
9872 PRAGMA_OACC_CLAUSE_IF, PRAGMA_OACC_CLAUSE_NUM_GANGS,
9873 PRAGMA_OACC_CLAUSE_NUM_WORKERS, PRAGMA_OACC_CLAUSE_PRESENT,
9874 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPY,
9875 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYIN,
9876 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYOUT,
9877 PRAGMA_OACC_CLAUSE_PRESENT_OR_CREATE, PRAGMA_OACC_CLAUSE_PRIVATE,
9878 PRAGMA_OACC_CLAUSE_REDUCTION, PRAGMA_OACC_CLAUSE_SELF,
9879 PRAGMA_OACC_CLAUSE_SEQ, PRAGMA_OACC_CLAUSE_VECTOR,
9880 PRAGMA_OACC_CLAUSE_VECTOR_LENGTH, PRAGMA_OACC_CLAUSE_WAIT,
9881 PRAGMA_OACC_CLAUSE_WORKER.
9883 2015-01-14 Marcos Diaz <marcos.diaz@tallertechnologies.com>
9885 * c-cppbuiltin.c (c_cpp_builtins): New cpp define __SSP_EXPLICIT__
9886 for the new option fstack-protector_explicit.
9887 * c-common.c (c_common_attribute_table): Add stack_protect attribute.
9888 (handle_stack_protect_attribute): New function.
9890 2015-01-13 Martin Uecker <uecker@eecs.berkeley.edu>
9892 * c.opt: New option -Warray-bounds=.
9894 2015-01-09 Michael Collison <michael.collison@linaro.org>
9896 * array-notation-common.c: Include hash-set.h, machmode.h,
9897 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
9898 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
9899 * c-ada-spec.c: Ditto.
9900 * c-cilkplus.c: Ditto.
9901 * c-common.c: Include input.h due to flattening of tree.h.
9902 Define macro GCC_C_COMMON_C.
9903 * c-common.h: Flatten tree.h header files into c-common.h.
9904 Remove include of tree-core.h.
9905 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
9906 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
9907 fold-const.h, wide-int.h, and inchash.h due to
9908 flattening of tree.h.
9910 * c-format.c: Flatten tree.h header files into c-common.h.
9911 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
9912 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
9913 fold-const.h, wide-int.h, and inchash.h due to
9914 flattening of tree.h.
9915 * c-dump.c: Include hash-set.h, machmode.h,
9916 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
9917 fold-const.h, wide-int.h, and inchash.h due to
9918 flattening of tree.h.
9919 * c-format.c: Include hash-set.h, machmode.h,
9920 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
9921 fold-const.h, wide-int.h, inchash.h and real.h due to
9922 flattening of tree.h.
9923 * c-gimplify.c: Include hash-set.h, machmode.h,
9924 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
9925 fold-const.h, wide-int.h, and inchash.h due to
9926 flattening of tree.h.
9932 * c-ppoutput.c: Ditto.
9933 * c-pragma.c: Ditto.
9934 * c-pretty-print.c: Ditto.
9935 * c-semantics.c: Ditto.
9937 * stub-objc.c: Ditto.
9939 2015-01-08 Jason Merrill <jason@redhat.com>
9941 * c-ubsan.c (ubsan_maybe_instrument_array_ref): Use
9942 do_ubsan_in_current_function.
9943 (ubsan_maybe_instrument_reference_or_call): Likewise.
9944 * c-ubsan.h: Declare it.
9946 2015-01-08 Mike Stump <mikestump@comcast.net>
9948 * c-common.c (c_common_attribute_table): Add no_sanitize_thread.
9950 2015-01-07 Marek Polacek <polacek@redhat.com>
9953 * c-common.c (c_fully_fold_internal): Warn for division and modulo
9954 if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST and is zero.
9956 2015-01-05 Trevor Saunders <tsaunders@mozilla.com>
9959 * c.opt (Wsuggest-override): New option.
9961 2015-01-05 Jakub Jelinek <jakub@redhat.com>
9963 Update copyright years.
9965 2015-01-05 Marek Polacek <polacek@redhat.com>
9968 * c-common.c (warn_array_subscript_with_type_char): Add location_t
9970 * c-common.h (warn_array_subscript_with_type_char): Update
9973 2014-12-20 Edward Smith-Rowland <3dw4rd@verizon.net>
9975 * c-cppbuiltin.c (__cpp_sized_deallocation): Uncomment and move macro.
9976 Control macro with flag_sized_deallocation.
9978 2014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
9980 * c.opt (Wdiscarded-array-qualifiers): New option.
9982 2014-12-19 Jakub Jelinek <jakub@redhat.com>
9984 PR preprocessor/63831
9985 * c-cppbuiltin.c (c_cpp_builtins): Don't define __has_attribute
9986 and __has_cpp_attribute here.
9987 * c-ppoutput.c (init_pp_output): Set cb->has_attribute to
9988 c_common_has_attribute.
9989 * c-common.h (c_common_has_attribute): New prototype.
9990 * c-lex.c (init_c_lex): Set cb->has_attribute to
9991 c_common_has_attribute instead of cb_has_attribute.
9992 (get_token_no_padding): New function.
9993 (cb_has_attribute): Renamed to ...
9994 (c_common_has_attribute): ... this. No longer static. Use
9995 get_token_no_padding, require ()s, don't build TREE_LIST
9996 unnecessarily, fix up formatting, adjust diagnostics, call
9999 2014-12-15 Jason Merrill <jason@redhat.com>
10001 * c.opt (-fsized-deallocation, -Wc++14-compat): New.
10002 (-Wsized-deallocation): New.
10003 * c-opts.c (c_common_post_options): -fsized-deallocation defaults
10004 to on in C++14 and up.
10006 2014-12-11 Jason Merrill <jason@redhat.com>
10008 * c-cppbuiltin.c (c_cpp_builtins): Enable C++14 __cpp_constexpr.
10010 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_runtime_arrays if
10011 we aren't complaining about VLAs.
10013 2014-12-06 Marek Polacek <polacek@redhat.com>
10015 PR tree-optimization/64183
10016 * c-gimplify.c (c_gimplify_expr): Don't convert the RHS of a
10017 shift-expression if it is integer_type_node. Use types_compatible_p.
10019 2014-11-29 Jakub Jelinek <jakub@redhat.com>
10021 * c-common.c (convert_vector_to_pointer_for_subscript): Remove NULL
10022 last argument from create_tmp_var_raw and create_tmp_var calls.
10023 * cilk.c (gimplify_cilk_spawn): Likewise.
10024 * c-omp.c (c_finish_omp_atomic): Likewise.
10026 2014-11-28 Marek Polacek <polacek@redhat.com>
10028 * c-ubsan.c (ubsan_instrument_shift): Use op1_utype for MINUS_EXPR
10029 instead of unsigned_type_node.
10031 2014-11-28 Marek Polacek <polacek@redhat.com>
10034 * c-ubsan.c (ubsan_instrument_shift): Change the type of a MINUS_EXPR
10036 * c-gimplify.c (c_gimplify_expr): Convert right operand of a shift
10037 expression to unsigned_type_node.
10039 2014-11-20 Mark Wielaard <mjw@redhat.com>
10042 * c-opts.c (set_std_c89): Set lang_hooks.name.
10043 (set_std_c99): Likewise.
10044 (set_std_c11): Likewise.
10045 (set_std_cxx98): Likewise.
10046 (set_std_cxx11): Likewise.
10047 (set_std_cxx14): Likewise.
10048 (set_std_cxx1z): Likewise.
10050 2014-11-21 Jakub Jelinek <jakub@redhat.com>
10053 * c-common.h (convert_vector_to_pointer_for_subscript): Change
10054 return type to bool.
10055 * c-common.c: Include gimple-expr.h.
10056 (convert_vector_to_pointer_for_subscript): Change return type to
10057 bool. If *vecp is not lvalue_p and has VECTOR_TYPE, return true
10058 and copy it into a TARGET_EXPR and use that instead of *vecp
10061 2014-11-19 David Malcolm <dmalcolm@redhat.com>
10063 Merger of git branch "gimple-classes-v2-option-3".
10064 * ChangeLog.gimple-classes: New.
10065 * c-gimplify.c (add_block_to_enclosing): Strengthen local "stack"
10066 from being just a vec<gimple> to a vec<gbind *>.
10068 2014-11-18 Jakub Jelinek <jakub@redhat.com>
10071 * c-ubsan.c (ubsan_maybe_instrument_reference_or_call): Change type
10072 argument to ptype, set type to TREE_TYPE (ptype). Don't call
10073 get_pointer_alignment for non-pointers. Use ptype, or if it is
10074 reference type, corresponding pointer type, as type of kind
10076 (ubsan_maybe_instrument_reference,
10077 ubsan_maybe_instrument_member_call): Adjust callers.
10079 2014-11-15 Marek Polacek <polacek@redhat.com>
10081 PR middle-end/63884
10082 * array-notation-common.c (is_sec_implicit_index_fn): Return false
10084 (extract_array_notation_exprs): Return for NULL node.
10086 2014-11-12 Joseph Myers <joseph@codesourcery.com>
10088 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Define and
10089 undefine __NO_MATH_ERRNO__ based on changes to -fmath-errno state.
10091 2014-11-12 Jakub Jelinek <jakub@redhat.com>
10094 * c-common.c (check_builtin_function_arguments): Handle
10095 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW.
10097 2014-11-10 Andi Kleen <ak@linux.intel.com>
10100 * c-common.h (check_no_cilk): Declare.
10101 * cilk.c (get_error_location): New function.
10102 (check_no_cilk): Dito.
10104 2014-11-10 Andi Kleen <ak@linux.intel.com>
10106 * cilk.c (recognize_spawn): Use expression location
10109 2014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
10111 * c.opt ([Wshift-count-negative, Wshift-count-overflow]): Add.
10113 2014-11-10 Edward Smith-Rowland <3dw4rd@verizon.net>
10115 * c-cppbuiltin.c (__has_attribute, __has_cpp_attribute): New macros;
10116 (__cpp_rtti, __cpp_exceptions): New macros for C++98;
10117 (__cpp_range_based_for, __cpp_initializer_lists,
10118 __cpp_delegating_constructors, __cpp_nsdmi,
10119 __cpp_inheriting_constructors, __cpp_ref_qualifiers): New macros
10120 for C++11; (__cpp_attribute_deprecated): Remove in favor of
10121 __has_cpp_attribute.
10122 * c-lex.c (cb_has_attribute): New callback CPP function;
10123 (init_c_lex): Set has_attribute callback.
10125 2014-11-04 Richard Biener <rguenther@suse.de>
10127 * c-common.c (shorten_compare): Do not shorten mixed
10128 DFP and non-DFP compares.
10130 2014-11-01 Edward Smith-Rowland <3dw4rd@verizon.net>
10132 * g++.dg/cpp1y/feat-cxx11.C: Commentary and rearrangement of tests.
10133 * g++.dg/cpp1y/feat-cxx11-neg.C: Add aggregate NSDMI test.
10134 Commentary and rearrangement of tests.
10135 * g++.dg/cpp1y/feat-cxx14.C: Enable aggregate NSDMI test.
10136 Commentary and rearrangement of tests.
10137 * g++.dg/cpp1y/feat-cxx98-neg.C: Ditto.
10138 * g++.dg/cpp1y/feat-cxx98.C: Commentary.
10140 2014-10-29 Richard Sandiford <richard.sandiford@arm.com>
10142 * c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant
10143 enum from machine_mode.
10145 2014-10-28 Andrew MacLeod <amacleod@redhat.com>
10147 * c-common.c: Adjust include files.
10148 * c-gimplify.c: Ditto.
10150 * c-pragma.c: Ditto.
10151 * c-ubsan.c: Ditto.
10153 2014-10-27 Andrew MacLeod <amacleod@redhat.com>
10155 * c-gimplify.c: Adjust include files.
10157 2014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
10160 * c-opts.c (c_common_diagnostics_set_defaults): Renamed from
10161 c_common_initialize_diagnostics.
10162 * c-common.h: Likewise.
10164 2014-10-24 Marek Polacek <polacek@redhat.com>
10167 * c-pretty-print.c (c_pretty_printer::simple_type_specifier): Don't
10168 print "struct"/"union"/"enum" for typedefed names.
10170 2014-10-23 Marek Polacek <polacek@redhat.com>
10172 * c-ubsan.c (ubsan_instrument_shift): Perform the MINUS_EXPR
10175 2014-10-22 Jakub Jelinek <jakub@redhat.com>
10176 Yury Gribov <y.gribov@samsung.com>
10178 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
10179 ubsan_instrument_vla): Check bits in flag_sanitize_recover bitmask
10180 instead of flag_sanitize_recover as bool flag.
10182 2014-10-21 Kirill Yukhin <kirill.yukhin@intel.com>
10184 * cilk.c: Revert previous change.
10186 2014-10-20 Igor Zamyatin <igor.zamyatin@intel.com>
10189 * cilk.c: Include vec.h.
10190 (struct cilk_decls): New structure.
10191 (wrapper_parm_cb): Split this function to...
10192 (fill_decls_vec): ...this...
10193 (create_parm_list): ...and this.
10194 (compare_decls): New function.
10195 (for_local_cb): Remove.
10196 (wrapper_local_cb): Ditto.
10197 (build_wrapper_type): For now first traverse and fill vector of
10198 declarations then sort it and then deal with sorted vector.
10199 (cilk_outline): Ditto.
10200 (declare_one_free_variable): Ditto.
10202 2014-10-17 Marek Polacek <polacek@redhat.com>
10204 * c-opts.c (c_common_post_options): Set warn_implicit_int.
10205 * c.opt (Wimplicit-int): Initialize to -1.
10207 2014-10-16 Andrew MacLeod <amacleod@redhat.com>
10209 * c-pragma.c: Adjust include files.
10210 * c-semantics.c: Likewise.
10212 2014-10-16 DJ Delorie <dj@redhat.com>
10214 * c-cppbuiltin.c (cpp_atomic_builtins): Don't assume pointers are
10215 multiples of bytes.
10217 2014-10-14 Jason Merrill <jason@redhat.com>
10220 * c-common.h (CPP_PREPARSED_EXPR): New.
10221 (N_CP_TTYPES): Adjust.
10223 2014-10-15 Marek Polacek <polacek@redhat.com>
10225 * c-opts.c (c_common_init_options): Make -std=gnu11 the default for C.
10227 2014-10-14 DJ Delorie <dj@redhat.com>
10229 * c-pretty-print.c (pp_c_integer_constant): Check for all __intN
10230 types, not just __int128.
10231 * c-cppbuiltin.c (c_cpp_builtins): Add builtins for all __intN
10232 types, not just __int128.
10233 (cpp_atomic_builtins): Round pointer sizes up.
10234 (type_suffix): Use type precision, not specific types.
10235 * c-common.c (c_common_reswords): Remove __int128 special case.
10236 (c_common_type_for_size): Check for all __intN types, not just
10238 (c_common_type_for_mode): Likewise.
10239 (c_common_signed_or_unsigned_type): Likewise.
10240 (c_build_bitfield_integer_type): Likewise.
10241 (c_common_nodes_and_builtins): Likewise.
10242 (keyword_begins_type_specifier): Likewise.
10243 * c-common.h (rid): Remove RID_INT128 and add RID_INT_N_* for all
10246 2014-10-12 Trevor Saunders <tsaunders@mozilla.com>
10248 * c-common.c: Use hash_table instead of hashtab.
10250 2014-10-06 Edward Smith-Rowland <3dw4rd@verizon.net>
10252 * c-cppbuiltin.c: Move __cpp_attribute_deprecated to the
10255 2014-10-03 Marc Glisse <marc.glisse@inria.fr>
10260 * c-common.c (warn_logical_operator): Punt for vectors.
10262 2014-10-01 Edward Smith-Rowland <3dw4rd@verizon.net>
10264 Implement SD-6: SG10 Feature Test Recommendations
10265 * c-cppbuiltin.c (c_cpp_builtins()): Define language feature
10266 macros and the __has_header macro.
10268 2014-09-30 Jason Merrill <jason@redhat.com>
10270 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_ASSIGNABLE and
10271 RID_IS_TRIVIALLY_CONSTRUCTIBLE.
10272 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
10274 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_COPYABLE.
10275 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
10277 * c-common.h (enum rid): Remove RID_IS_CONVERTIBLE_TO.
10278 * c-common.c (c_common_reswords): Remove __is_convertible_to.
10280 2014-09-24 Marek Polacek <polacek@redhat.com>
10284 * c-common.h (struct c_common_resword): Don't define CPP_KEYWORD.
10286 2014-09-23 Andi Kleen <ak@linux.intel.com>
10288 * c-common.c (handle_no_reorder_attribute): New function.
10289 (c_common_attribute_table): Add no_reorder attribute.
10291 2014-09-22 Joseph Myers <joseph@codesourcery.com>
10293 * c-cppbuiltin.c (c_cpp_builtins): Define
10294 __LIBGCC_*_EXCESS_PRECISION__ macros for supported floating-point
10297 2014-09-18 Joseph Myers <joseph@codesourcery.com>
10299 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_*_FUNC_EXT__
10300 for supported floating-point modes.
10302 2014-09-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
10304 * c.opt (Wpsabi): Use LangEnabledBy.
10305 * c-opts.c (c_common_handle_option): Do not handle here.
10307 2014-09-12 Joseph Myers <joseph@codesourcery.com>
10309 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_HAS_%s_MODE__
10310 macros for floating-point modes.
10312 2014-09-11 Marc Glisse <marc.glisse@inria.fr>
10315 * c-cppbuiltin.c (builtin_define_float_constants): Correct
10316 __*_DENORM_MIN__ without denormals.
10318 2014-09-10 Jakub Jelinek <jakub@redhat.com>
10320 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
10321 ubsan_instrument_vla, ubsan_instrument_return): Adjust
10322 ubsan_create_data callers.
10323 (ubsan_instrument_bounds): Don't emit UBSAN_BOUNDS at all if
10324 index is constant or BIT_AND_EXPR with constant mask and is
10325 small enough for the bound.
10326 * c-gimplify.c (ubsan_walk_array_refs_r): For ADDR_EXPR of
10327 ARRAY_REF, make sure the inner ARRAY_REF is not walked again.
10329 2014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
10331 * c.opt: Add CppReason to various flags.
10332 (Wdate-time): Re-sort.
10333 * c-common.c: Include c-common.h earlier.
10334 (struct reason_option_codes_t): Delete.
10335 (c_option_controlling_cpp_error): Prefix global type and struct
10338 2014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
10340 * c.opt (Wnormalized): New.
10341 (Wnormalized=): Use Enum and Reject Negative.
10342 * c-opts.c (c_common_handle_option): Do not handle Wnormalized here.
10344 2014-09-08 Joseph Myers <joseph@codesourcery.com>
10346 * c-cppbuiltin.c (c_cpp_builtins): Define macros for mantissa
10347 digits of floating-point modes if -fbuilding-libgcc.
10349 2014-09-05 Joseph Myers <joseph@codesourcery.com>
10351 * c-cppbuiltin.c (c_cpp_builtins): Also define
10352 __LIBGCC_EH_TABLES_CAN_BE_READ_ONLY__,
10353 __LIBGCC_EH_FRAME_SECTION_NAME__, __LIBGCC_JCR_SECTION_NAME__,
10354 __LIBGCC_CTORS_SECTION_ASM_OP__, __LIBGCC_DTORS_SECTION_ASM_OP__,
10355 __LIBGCC_TEXT_SECTION_ASM_OP__, __LIBGCC_INIT_SECTION_ASM_OP__,
10356 __LIBGCC_INIT_ARRAY_SECTION_ASM_OP__,
10357 __LIBGCC_STACK_GROWS_DOWNWARD__,
10358 __LIBGCC_DONT_USE_BUILTIN_SETJMP__,
10359 __LIBGCC_DWARF_ALT_FRAME_RETURN_COLUMN__,
10360 __LIBGCC_DWARF_FRAME_REGISTERS__,
10361 __LIBGCC_EH_RETURN_STACKADJ_RTX__, __LIBGCC_JMP_BUF_SIZE__,
10362 __LIBGCC_STACK_POINTER_REGNUM__ and
10363 __LIBGCC_VTABLE_USES_DESCRIPTORS__ for -fbuilding-libgcc.
10364 (builtin_define_with_value): Handle backslash-escaping in string
10367 2014-09-05 Richard Biener <rguenther@suse.de>
10369 PR middle-end/63148
10370 * c-format.c (check_format_arg): Properly handle
10371 effectively signed POINTER_PLUS_EXPR offset.
10373 2014-09-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
10375 * c.opt (Wc90-c99-compat,Wc++-compat,Wcomment,Wendif-labels,
10376 Winvalid-pch,Wlong-long,Wmissing-include-dirs,Wmultichar,Wpedantic,
10377 (Wdate-time,Wtraditional,Wundef,Wvariadic-macros): Add CPP, Var
10379 * c-opts.c (c_common_handle_option): Do not handle here.
10380 (sanitize_cpp_opts): Likewise.
10381 * c-common.c (struct reason_option_codes_t): Handle
10382 CPP_W_C90_C99_COMPAT and CPP_W_PEDANTIC.
10384 2014-09-03 Marek Polacek <polacek@redhat.com>
10386 * c.opt (Wlogical-not-parentheses): Enable by -Wall.
10388 2014-09-02 Jakub Jelinek <jakub@redhat.com>
10389 Balaji V. Iyer <balaji.v.iyer@intel.com>
10390 Igor Zamyatin <igor.zamyatin@intel.com>
10392 * c-cilkplus.c (cilk_for_number_of_iterations): New function.
10393 * c-common.c (c_common_reswords): Added _Cilk_for.
10394 * c-common.h (enum rid): Added RID_CILK_FOR.
10395 (cilk_for_number_of_iterations): Add declaration.
10396 * c-omp.c (c_finish_omp_for): Added checks for CILK_SIMD and
10398 * c-pragma.c (init_pragma): Register "grainsize" pragma.
10399 * c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_GRAINSIZE.
10401 2014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
10403 * c.opt (Wbuiltin-macro-redefined,Wdeprecated,Wendif-labels,
10404 Winvalid-pch,Wliteral-suffix,Wmissing-include-dirs,Wtrigraphs,
10405 Wundef): Use CPP, Var and Init.
10406 * c-opts.c (c_common_handle_option): Do not handle the above flags here.
10408 2014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
10410 * c.opt (Wbuiltin-macro-redefined): Use CPP, Var and Init.
10411 * c-opts.c (c_common_handle_option): Do not handle here.
10413 2014-08-25 Jason Merrill <jason@redhat.com>
10415 * c.opt: Change -std=c++1y and -std=gnu++1y to be aliases for
10416 -std=c++14 and -std=gnu++14, rather than the reverse.
10417 * c-opts.c (c_common_handle_option): Change OPT_std_c__1y and
10418 OPT_std_gnu__1y to OPT_std_c__14 and OPT_std_gnu__14.
10419 * c-common.h (cxx_dialect): Remove cxx1y.
10421 2014-08-23 Edward Smith-Rowland <3dw4rd@verizon.net>
10423 * c-common.h (enum cxx_dialect): Add cxx14.
10424 * c-opts.c (set_std_cxx1y): Rename to set_std_cxx14; Use cxx14.
10425 * c-ubsan.c (ubsan_instrument_shift): Change comment and logic from
10426 cxx_dialect == cxx11 || cxx_dialect == cxx1y to cxx_dialect >= cxx11.
10428 2014-08-22 Jason Merrill <jason@redhat.com>
10430 * c.opt (std=gnu++17): Fix alias.
10432 2014-08-22 Marek Polacek <polacek@redhat.com>
10435 * c-common.c (warn_logical_not_parentheses): Don't check LHS. Don't
10436 check for vector types. Drop LHS argument.
10437 * c-common.h (warn_logical_not_parentheses): Adjust.
10439 2014-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
10441 * c.opt (Wcomment): Use CPP, Var and LangEnabledBy.
10442 (Wmultichar): Likewise.
10443 (Wdate-time): Use C-family languages instead of Common. Use CPP
10445 * c-opts.c (c_common_handle_option): Do not handle the above
10447 (sanitize_cpp_opts): Likewise.
10449 2014-08-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
10452 * c-opts.c: Include tree-diagnostics.h.
10453 (c_diagnostic_finalizer): New.
10454 (c_common_initialize_diagnostics): Use it.
10456 2014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
10458 PR preprocessor/51303
10459 * c-common.c (struct reason_option_codes_t option_codes):
10460 Add CPP_W_MISSING_INCLUDE_DIRS. Sort alphabetically.
10462 2014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
10466 * c.opt (Wvariadic-macros): Use CPP and LangEnabledBy.
10467 * c-opts.c (c_common_handle_option): Call cpp_handle_option_auto.
10468 (c_common_post_options): Call init_global_opts_from_cpp.
10469 (sanitize_cpp_opts): Do not handle Wvariadic-macros here.
10471 2014-08-19 Marek Polacek <polacek@redhat.com>
10474 * c-common.c (maybe_warn_bool_compare): New function.
10475 * c-common.h (maybe_warn_bool_compare): Declare.
10476 * c.opt (Wbool-compare): New option.
10478 2014-08-19 Marek Polacek <polacek@redhat.com>
10480 * c.opt (Wc99-c11-compat): New option.
10482 2014-08-19 Marek Polacek <polacek@redhat.com>
10484 * c-opts.c (sanitize_cpp_opts): Make warn_long_long be set according
10485 to warn_c90_c99_compat.
10486 * c.opt (Wc90-c99-compat, Wdeclaration-after-statement): Initialize
10489 2014-08-19 Manuel López-Ibáñez <manu@gcc.gnu.org>
10490 Steven Bosscher <steven@gcc.gnu.org>
10493 * c-format.c: Add extra_arg_loc and format_string_loc to struct
10494 format_check_results.
10495 (check_function_format): Use true and add comment for boolean
10497 (finish_dollar_format_checking): Use explicit location when warning.
10498 (check_format_info): Likewise.
10499 (check_format_arg): Set extra_arg_loc and format_string_loc.
10500 (check_format_info_main): Use explicit location when warning.
10501 (check_format_types): Pass explicit location.
10502 (format_type_warning): Likewise.
10504 2014-08-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
10507 * c-format.c: Handle Fortran flags.
10509 2014-08-12 Igor Zamyatin <igor.zamyatin@intel.com>
10512 * array-notation-common.c (find_rank): Added handling for other
10513 types of references.
10515 2014-08-10 Marek Polacek <polacek@redhat.com>
10518 * c-opts.c (sanitize_cpp_opts): Pass warn_c90_c99_compat to libcpp.
10519 * c.opt (Wc90-c99-compat): Add option.
10521 2014-08-07 Trevor Saunders <tsaunders@mozilla.com>
10523 * c-gimplify.c, cilk.c: Remove includes of pointer-set.h.
10525 2014-08-03 Marek Polacek <polacek@redhat.com>
10527 * c-common.c (check_case_value): Add location_t parameter. Use it.
10528 (c_add_case_label): Pass loc to check_case_value.
10530 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
10532 * cilk.c: Use hash_map instead of pointer_map.
10534 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
10536 * c-gimplify.c: Use hash_set instead of pointer_set.
10538 2014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
10540 PR middle-end/61455
10541 * array-notation-common.c (extract_array_notation_exprs): Handling
10542 of DECL_EXPR added.
10544 2014-08-01 Jakub Jelinek <jakub@redhat.com>
10546 * c-common.h (min_align_of_type): Removed prototype.
10547 * c-common.c (min_align_of_type): Removed.
10548 * c-ubsan.h (ubsan_maybe_instrument_reference,
10549 ubsan_maybe_instrument_member_call): New prototypes.
10550 * c-ubsan.c: Include stor-layout.h and builtins.h.
10551 (ubsan_maybe_instrument_reference_or_call,
10552 ubsan_maybe_instrument_reference, ubsan_maybe_instrument_call): New
10555 2014-07-31 Marc Glisse <marc.glisse@inria.fr>
10558 * c.opt (-Wreturn-local-addr): Move to common.opt.
10560 2014-07-30 Jason Merrill <jason@redhat.com>
10565 * c.opt (-fuse-all-virtuals): New.
10567 2014-07-30 Tom Tromey <tromey@redhat.com>
10570 * c.opt (Wdesignated-init): New option.
10571 * c-common.c (c_common_attribute_table): Add "designated_init".
10572 (handle_designated_init): New function.
10574 2014-07-24 Marek Polacek <polacek@redhat.com>
10577 * c-opts.c (c_finish_options): If -imacros is in effect, return.
10579 2014-07-16 Dodji Seketeli <dodji@redhat.com>
10581 PR preprocessor/60723 - missing system-ness marks for macro tokens
10582 * c-ppoutput.c (struct print::prev_was_system_token): New data
10584 (init_pp_output): Initialize it.
10585 (maybe_print_line_1, maybe_print_line, print_line_1, print_line)
10586 (do_line_change): Return a flag saying if a line marker was
10588 (scan_translation_unit): Detect if the system-ness of the token we
10589 are about to emit is different from the one of the previously
10590 emitted token. If so, emit a line marker. Avoid emitting useless
10591 adjacent line markers. Avoid emitting line markers for tokens
10592 originating from the expansion of built-in macros.
10593 (scan_translation_unit_directives_only): Adjust.
10595 2014-07-15 Marek Polacek <polacek@redhat.com>
10597 * c-ubsan.c (ubsan_instrument_bounds): Don't instrument if
10598 TYPE_MAX_VALUE is NULL.
10600 2014-07-14 Jakub Jelinek <jakub@redhat.com>
10602 PR middle-end/61294
10603 * c.opt (Wmemset-transposed-args): New warning.
10605 2014-07-10 Jason Merrill <jason@redhat.com>
10609 * c.opt (-fuse-all-virtuals): New.
10611 2014-07-09 Richard Biener <rguenther@suse.de>
10614 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
10615 using unsigned arithmetic if overflow does not wrap instead of
10616 if overflow is undefined.
10618 2014-07-06 Marek Polacek <polacek@redhat.com>
10621 * c.opt (Wsizeof-array-argument): New option.
10623 2014-07-03 Jakub Jelinek <jakub@redhat.com>
10625 * c-ada-spec.c (dump_ada_nodes): Don't call qsort if
10626 comments->count <= 1, as comments->entries might be NULL.
10628 2014-07-01 Marek Polacek <polacek@redhat.com>
10630 * c.opt (Wint-conversion): New option.
10632 2014-07-01 Marek Polacek <polacek@redhat.com>
10635 * c.opt (Wincompatible-pointer-types): New option.
10637 2014-06-30 Paolo Carlini <paolo.carlini@oracle.com>
10640 * c-common.c (handle_noreturn_attribute, handle_const_attribute):
10641 Do not discard TYPE_QUALS of type.
10643 2014-06-26 Jason Merrill <jason@redhat.com>
10645 * c-common.h (enum cxx_dialect): Add cxx1z.
10646 * c.opt (std=c++1z, std=c++17, std=gnu++1z, std=gnu++17): New.
10647 * c-opts.c (c_common_handle_option, set_std_cxx1z): Handle it.
10649 2014-06-26 Teresa Johnson <tejohnson@google.com>
10651 * c-common.h (get_dump_info): Declare.
10652 * c-gimplify.c (c_genericize): Use saved dump files.
10653 * c-opts.c (c_common_parse_file): Begin and end dumps
10654 once around parsing invocation.
10655 (get_dump_info): New function.
10657 2014-06-23 Marek Polacek <polacek@redhat.com>
10658 Andrew MacLeod <amacleod@redhat.com>
10661 * c-common.c (get_atomic_generic_size): Don't segfault if the
10662 type doesn't have a size.
10664 2014-06-20 Marek Polacek <polacek@redhat.com>
10666 * c-gimplify.c: Include "c-ubsan.h" and "pointer-set.h".
10667 (ubsan_walk_array_refs_r): New function.
10668 (c_genericize): Instrument array bounds.
10669 * c-ubsan.c: Include "internal-fn.h".
10670 (ubsan_instrument_division): Mark instrumented arrays as having
10671 side effects. Adjust ubsan_type_descriptor call.
10672 (ubsan_instrument_shift): Likewise.
10673 (ubsan_instrument_vla): Adjust ubsan_type_descriptor call.
10674 (ubsan_instrument_bounds): New function.
10675 (ubsan_array_ref_instrumented_p): New function.
10676 (ubsan_maybe_instrument_array_ref): New function.
10677 * c-ubsan.h (ubsan_instrument_bounds): Declare.
10678 (ubsan_array_ref_instrumented_p): Declare.
10679 (ubsan_maybe_instrument_array_ref): Declare.
10681 2014-06-20 Hale Wang <hale.wang@arm.com>
10684 * c.opt (fshort-enums): Add to LTO.
10685 * c.opt (fshort-wchar): Likewise.
10687 2014-06-16 Marek Polacek <polacek@redhat.com>
10690 * c.opt (Wswitch-bool): Add Var.
10692 2014-06-12 Jakub Jelinek <jakub@redhat.com>
10694 PR middle-end/61486
10695 * c-omp.c (c_omp_split_clauses): Don't crash on firstprivate in
10696 #pragma omp target teams or
10697 #pragma omp {,target }teams distribute simd.
10699 2014-06-12 Jason Merrill <jason@redhat.com>
10701 * c.opt (Wabi=, fabi-compat-version): New.
10702 * c-opts.c (c_common_handle_option): Handle -Wabi=.
10703 (c_common_post_options): Handle flag_abi_compat_version default.
10704 Disallow -fabi-compat-version=1.
10705 * c-common.h (abi_version_crosses): New.
10707 2014-06-11 Jan Hubicka <hubicka@ucw.cz>
10709 * c-common.c (handle_section_attribute): Update handling for
10710 section names that are no longer trees.
10712 2014-06-10 Jakub Jelinek <jakub@redhat.com>
10715 * c-pragma.c (omp_pragmas_simd): Move PRAGMA_OMP_TASK...
10716 (omp_pragmas): ... back here.
10718 2014-06-05 Marek Polacek <polacek@redhat.com>
10721 * c-common.c (warn_logical_not_parentheses): New function.
10722 * c-common.h (warn_logical_not_parentheses): Declare.
10723 * c.opt (Wlogical-not-parentheses): New option.
10725 2014-06-04 Marek Polacek <polacek@redhat.com>
10728 * c-common.c (check_case_bounds): Add location parameter.
10730 (c_add_case_label): Pass loc to check_case_bounds.
10732 2014-06-03 Marek Polacek <polacek@redhat.com>
10735 * c.opt (Wswitch-bool): New option.
10737 2014-05-22 Thomas Schwinge <thomas@codesourcery.com>
10739 * c-common.h (c_omp_sharing_predetermined, c_omp_remap_decl):
10741 (record_types_used_by_current_var_decl): Move prototype to where
10744 * c-common.c (DEF_FUNCTION_TYPE_0, DEF_FUNCTION_TYPE_6)
10745 (DEF_FUNCTION_TYPE_7, DEF_FUNCTION_TYPE_8)
10746 (DEF_FUNCTION_TYPE_VAR_5): Cosmetic fixes.
10748 2014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
10750 * c-common.h (CTI_VOID_ZERO, void_zero_node): Delete.
10751 * c-common.c (c_common_nodes_and_builtins): Don't initialize
10753 * c-pretty-print.c (pp_c_void_constant): New function.
10754 (c_pretty_printer::constant, c_pretty_printer::primary_expression)
10755 (c_pretty_printer::expression): Handle VOID_CST.
10756 * cilk.c (extract_free_variables): Likewise.
10757 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift)
10758 (ubsan_instrument_vla): Use void_node instead of void_zero_node.
10760 2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
10762 * c-common.h (sorted_fields_type): Remove variable_size GTY attribute.
10763 * c-pragma.c (push_alignment): Adjust.
10764 (handle_pragma_push_options): Likewise.
10766 2014-05-09 Marek Polacek <polacek@redhat.com>
10769 * c-common.c (check_user_alignment): Return -1 if alignment is error
10771 (handle_aligned_attribute): Don't call default_conversion on
10773 (handle_vector_size_attribute): Likewise.
10774 (handle_tm_wrap_attribute): Handle case when wrap_decl is error node.
10775 (handle_sentinel_attribute): Call default_conversion and allow even
10776 integral types as an argument.
10778 2014-05-08 Marek Polacek <polacek@redhat.com>
10781 * c-common.c (min_align_of_type): New function factored out from...
10782 (c_sizeof_or_alignof_type): ...here.
10783 * c-common.h (min_align_of_type): Declare.
10785 2014-05-08 Marek Polacek <polacek@redhat.com>
10788 * c-common.c (check_main_parameter_types): Warn for _Atomic-qualified
10789 parameter type of main.
10791 2014-05-07 DJ Delorie <dj@redhat.com>
10793 * c-cppbuiltin.c (print_bits_of_hex): New.
10794 (builtin_define_type_minmax): Print values using hex so as not to
10795 require a pre-computed list of string values.
10797 2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
10798 Mike Stump <mikestump@comcast.net>
10799 Richard Sandiford <rdsandiford@googlemail.com>
10801 * c-ada-spec.c: Include wide-int.h.
10802 (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Remove.
10803 (dump_generic_ada_node): Use wide-int interfaces.
10804 * c-common.c: Include wide-int-print.h.
10805 (shorten_compare): Use wide-int interfaces and tree_int_cst_lt.
10806 (pointer_int_sum): Use wide-int interfaces.
10807 (c_common_nodes_and_builtins): Use make_int_cst.
10808 (match_case_to_enum_1): Use tree_fits_uhwi_p and tree_fits_shwi_p.
10809 (handle_alloc_size_attribute): Use wide-int interfaces.
10810 (get_nonnull_operand): Likewise.
10811 * c-format.c (get_constant): Use tree_fits_uhwi_p.
10812 * c-lex.c: Include wide-int.h.
10813 (narrowest_unsigned_type): Take a widest_int rather than two
10815 (narrowest_signed_type): Likewise.
10816 (interpret_integer): Update accordingly. Use wide-int interfaces.
10817 (lex_charconst): Use wide-int interfaces.
10818 * c-pretty-print.c: Include wide-int.h.
10819 (pp_c_integer_constant): Use wide-int interfaces.
10820 * cilk.c (declare_one_free_variable): Use tree_int_cst_lt instead of
10821 INT_CST_LT_UNSIGNED.
10823 2014-05-06 Richard Biener <rguenther@suse.de>
10825 * c-opts.c (c_common_post_options): For -freestanding,
10826 -fno-hosted and -fno-builtin disable pattern recognition
10827 if not enabled explicitely.
10829 2014-05-02 Marek Polacek <polacek@redhat.com>
10831 * c.opt (Wsizeof-pointer-memaccess): Describe option.
10833 2014-05-01 Marek Polacek <polacek@redhat.com>
10836 * c.opt (Wdiscarded-qualifiers): Add.
10838 2014-04-30 Marek Polacek <polacek@redhat.com>
10840 * c-ubsan.c (ubsan_instrument_division): Handle REAL_TYPEs. Perform
10841 INT_MIN / -1 sanitization only for integer types.
10843 2014-04-25 Marek Polacek <polacek@redhat.com>
10846 * c-common.c (handle_noinline_attribute): Warn if the attribute
10847 conflicts with always_inline attribute.
10848 (handle_always_inline_attribute): Warn if the attribute conflicts
10849 with noinline attribute.
10851 2014-04-25 Marek Polacek <polacek@redhat.com>
10854 * c-common.c (check_main_parameter_types): Warn about variadic main.
10856 2014-04-24 Mike Stump <mikestump@comcast.net>
10858 * c.opt (Wshadow-ivar): Default to on.
10860 2014-04-24 Dimitris Papavasiliou <dpapavas@gmail.com>
10862 * c.opt (Wshadow-ivar, flocal-ivars, fivar-visibility): Add.
10864 2014-04-23 Marek Polacek <polacek@redhat.com>
10866 * c-common.c (handle_tm_wrap_attribute): Tweak error message.
10868 2014-04-22 Jakub Jelinek <jakub@redhat.com>
10871 * c-ubsan.c (ubsan_instrument_return): Return __builtin_trap ()
10872 if flag_sanitize_undefined_trap_on_error.
10873 (ubsan_instrument_division, ubsan_instrument_shift,
10874 ubsan_instrument_vla): Likewise. Use __ubsan_handle_*_abort ()
10875 if !flag_sanitize_recover.
10877 2014-04-22 Marc Glisse <marc.glisse@inria.fr>
10880 * c-common.c (registered_builtin_types): Make non-static.
10881 * c-common.h (registered_builtin_types): Declare.
10883 2014-04-14 Richard Biener <rguenther@suse.de>
10884 Marc Glisse <marc.glisse@inria.fr>
10887 * c-common.c (convert_vector_to_pointer_for_subscript): Properly
10888 apply may-alias the scalar pointer type when applicable.
10890 2014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
10892 PR middle-end/60467
10893 * cilk.c (cilk_set_spawn_marker): Remove FUNCTION_DECL
10894 as possible argument for Cilk_spawn.
10896 2014-04-11 Tobias Burnus <burnus@net-b.de>
10899 * c.opt (Wformat-signedness): Add
10900 * c-format.c(check_format_types): Use it.
10902 2014-04-11 Jason Merrill <jason@redhat.com>
10905 * c-common.c (sync_resolve_size, get_atomic_generic_size): Call
10906 default_conversion for an array argument.
10908 2014-04-08 Marek Polacek <polacek@redhat.com>
10911 * c-ubsan.c: Include asan.h.
10912 (ubsan_instrument_return): Call initialize_sanitizer_builtins.
10914 2014-04-03 Nathan Sidwell <nathan@codesourcery.com>
10916 * c.opt (Wnon-virtual-dtor): Auto set when Weffc++.
10918 2014-04-02 Marek Polacek <polacek@redhat.com>
10920 * c-common.h (c_expand_expr): Remove declaration.
10922 2014-03-28 Jakub Jelinek <jakub@redhat.com>
10925 * c-common.c (add_atomic_size_parameter): When creating new
10926 params vector, push the size argument first.
10928 2014-03-26 Jakub Jelinek <jakub@redhat.com>
10930 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
10931 ubsan_instrument_vla, ubsan_instrument_return): Adjust
10932 ubsan_create_data callers.
10934 2014-03-22 Jakub Jelinek <jakub@redhat.com>
10937 * c-opts.c (c_finish_options): Restore cb_file_change call to
10940 2014-03-13 Jakub Jelinek <jakub@redhat.com>
10942 PR middle-end/36282
10943 * c-pragma.c (apply_pragma_weak): Only look at
10944 TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl)) if
10945 DECL_ASSEMBLER_NAME_SET_P (decl).
10946 (maybe_apply_pending_pragma_weaks): Exit early if
10947 vec_safe_is_empty (pending_weaks) rather than only when
10949 (maybe_apply_pragma_weak): Likewise. If !DECL_ASSEMBLER_NAME_SET_P,
10950 set assembler name back to NULL afterwards.
10952 2014-03-11 Jason Merrill <jason@redhat.com>
10954 * c.opt: Add -std=gnu++14.
10956 2014-03-11 Ian Bolton <ian.bolton@arm.com>
10958 * c-opts.c (c_common_post_options): Don't override
10959 -ffp-contract=fast if unsafe-math-optimizations is on.
10961 2014-03-08 Paulo Matos <paulo@matos-sorge.com>
10963 * c.opt: Enable LTO FE for fshort-double.
10965 2014-03-07 Jason Merrill <jason@redhat.com>
10967 * c.opt: Add -std=c++14.
10969 2014-03-06 Marek Polacek <polacek@redhat.com>
10972 * cilk.c (contains_cilk_spawn_stmt): New function.
10973 (contains_cilk_spawn_stmt_walker): Likewise.
10974 (recognize_spawn): Give error on invalid use of _Cilk_spawn.
10975 * c-common.h (contains_cilk_spawn_stmt): Add declaration.
10977 2014-03-03 Jakub Jelinek <jakub@redhat.com>
10979 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_SIMD.
10980 (init_pragma): Call cpp_register_deferred_pragma for PRAGMA_CILK_SIMD
10981 even when flag_preprocess_only.
10983 2014-02-26 Jason Merrill <jason@redhat.com>
10987 * c-common.c (shorten_compare): Don't check
10988 c_inhibit_evaluation_warnings.
10990 2014-02-19 Jakub Jelinek <jakub@redhat.com>
10993 * c-common.c (c_common_nodes_and_builtins): When initializing
10994 c_uint{16,32,64}_type_node, also set corresponding
10995 uint{16,32,64}_type_node to the same value.
10998 * c-pragma.c (init_pragma): Don't call cpp_register_deferred_pragma
10999 for PRAGMA_IVDEP if flag_preprocess_only.
11001 2014-02-12 Jakub Jelinek <jakub@redhat.com>
11004 * c-common.c (merge_tlist): If copy is true, call new_tlist,
11005 if false, add ADD itself, rather than vice versa.
11006 (verify_tree): For COND_EXPR, don't call merge_tlist with non-zero
11007 copy. For SAVE_EXPR, only call merge_tlist once.
11009 2014-02-08 Jakub Jelinek <jakub@redhat.com>
11011 PR middle-end/60092
11012 * c-common.c (handle_alloc_size_attribute): Use tree_fits_uhwi_p
11014 (handle_alloc_align_attribute, handle_assume_aligned_attribute): New
11016 (c_common_attribute_table): Add alloc_align and assume_aligned
11019 2014-02-06 Marek Polacek <polacek@redhat.com>
11022 * c-common.c (warn_for_sign_compare): Call warning_at with location
11023 instead of warning.
11025 2014-02-05 Marek Polacek <polacek@redhat.com>
11028 * c-omp.c (c_finish_omp_atomic): Remove unreachable return
11031 2014-02-04 Marek Polacek <polacek@redhat.com>
11034 * c-common.c (conversion_warning): Unwrap C_MAYBE_CONST_EXPR and/or
11037 2014-02-03 Marc Glisse <marc.glisse@inria.fr>
11041 * c-common.c (handle_aligned_attribute, handle_alloc_size_attribute,
11042 handle_vector_size_attribute, handle_nonnull_attribute): Call
11043 default_conversion on the attribute argument.
11044 (handle_nonnull_attribute): Increment the argument number.
11046 2014-01-31 Marek Polacek <polacek@redhat.com>
11049 * c-common.c (add_atomic_size_parameter): Pass vNULL to
11050 build_function_call_vec.
11051 (resolve_overloaded_builtin): Likewise.
11052 * c-common.h (build_function_call_vec): Adjust declaration.
11054 2014-01-30 Marek Polacek <polacek@redhat.com>
11057 * c-common.h (unsafe_conversion_p): Adjust declaration.
11058 (warnings_for_convert_and_check): Likewise.
11059 (convert_and_check): Likewise.
11060 * c-common.c (unsafe_conversion_p): Add location parameter. Call
11061 expansion_point_location_if_in_system_header on it.
11062 (warnings_for_convert_and_check): Add location parameter. Call
11063 expansion_point_location_if_in_system_header on it. Use it.
11064 (convert_and_check): Add location parameter. Use it.
11065 (conversion_warning): Likewise.
11066 (c_add_case_label): Adjust convert_and_check calls.
11067 (scalar_to_vector): Adjust unsafe_conversion_p calls.
11069 2014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
11071 * c-common.c (c_define_builtins): Replaced flag_enable_cilkplus with
11073 * c-pragma.c (init_pragma): Likewise.
11076 2014-01-23 Marek Polacek <polacek@redhat.com>
11079 * c-common.c (shorten_compare): Add location_t parameter.
11080 * c-common.h (shorten_binary_op): Adjust declaration.
11082 2014-01-23 Marek Polacek <polacek@redhat.com>
11085 * c-common.c (pointer_to_zero_sized_aggr_p): New function.
11086 * c-common.h: Declare it.
11088 2014-01-20 Eric Botcazou <ebotcazou@adacore.com>
11090 * c-ada-spec.h (dump_ada_specs): Revert prototype change.
11091 * c-ada-spec.c (dump_ads): Likewise.
11092 (cpp_check): Likewise.
11093 (dump_ada_specs): Likewise.
11095 2014-01-15 Laurent Alfonsi <laurent.alfonsi@st.com>
11098 * c-common.c (handle_no_instrument_function_attribute): Allow
11099 no_instrument_function attribute in class member
11100 definition/declaration.
11102 2014-01-15 Jakub Jelinek <jakub@redhat.com>
11105 * c-omp.c (c_finish_omp_atomic): Set in_late_binary_op around
11106 build_modify_expr with non-NOP_EXPR opcode. Handle return from it
11107 being COMPOUND_EXPR.
11108 (c_finish_omp_for): Handle incr being COMPOUND_EXPR with first
11109 operand a SAVE_EXPR and second MODIFY_EXPR.
11111 2014-01-09 Jakub Jelinek <jakub@redhat.com>
11114 * c-pch.c (c_common_write_pch): Call
11115 prepare_target_option_nodes_for_pch.
11117 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
11119 Update copyright years
11121 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
11123 * array-notation-common.c, c-cilkplus.c: Use the standard form for
11124 the copyright notice.
11126 2013-12-28 Eric Botcazou <ebotcazou@adacore.com>
11128 * c-ada-spec.c (print_constructor): New function.
11129 (print_destructor): Retrieve the origin of the destructor.
11130 (print_ada_declaration): Revamp handling of constructors/destructors.
11132 2013-12-23 Stuart Hastings <stuart@apple.com>
11133 Bill Maddox <maddox@google.com>
11134 Jason Merrill <jason@redhat.com>
11136 * c.opt: Add -fdeclone-ctor-dtor.
11137 * c-opts.c (c_common_post_options): Default to on iff -Os.
11139 2013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
11141 * c-common.c (c_common_attribute_table): Added "cilk simd function"
11143 * c-pragma.h (enum pragma_cilk_clause): Remove.
11144 (enum pragma_omp_clause): Added the following fields:
11145 PRAGMA_CILK_CLAUSE_NOMASK, PRAGMA_CILK_CLAUSE_MASK,
11146 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_NONE,
11147 PRAGMA_CILK_CLAUSE_LINEAR, PRAGMA_CILK_CLAUSE_PRIVATE,
11148 PRAGMA_CILK_CLAUSE_FIRSTPRIVATE, PRAGMA_CILK_CLAUSE_LASTPRIVATE,
11149 PRAGMA_CILK_CLAUSE_UNIFORM.
11152 2013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
11154 * cilk.c (cilk_outline): Made this function non-static.
11155 (gimplify_cilk_spawn): Removed pre_p and post_p arguments.
11156 (create_cilk_wrapper): Added a new parameter: a function pointer.
11157 (c_install_body_w_frame_cleanup): Remove
11158 (extract_free_variables): Added VEC_INIT_EXPR and CONSTRUCTOR case.
11159 * c-common.h (cilk_outline): New prototype.
11160 (gimplify_cilk_spawn): Removed two parameters.
11161 (cilk_install_body_with_frame_cleanup): New prototype.
11162 * c-gimplify.c (c_gimplify_expr): Added MODIFY_EXPR, CALL_EXPR and
11163 CILK_SPAWN_STMT case.
11165 2013-12-11 Bernd Schmidt <bernds@codesourcery.com>
11167 * c-common.c (c_fully_fold_internal): Handle ADDR_SPACE_CONVERT_EXPR.
11169 * c-common.h (enum c_tree_index): Remove CTI_INT_ARRAY_TYPE.
11170 (int_array_type_node): Remove.
11171 * c-common.c (c_common_nodes_and_builtins): Don't build it.
11173 2013-12-05 Marek Polacek <polacek@redhat.com>
11176 * c-common.c (c_sizeof_or_alignof_type): Move a declaration into
11177 [ADJUST_FIELD_ALIGN].
11179 2013-12-04 Joseph Myers <joseph@codesourcery.com>
11182 * c-common.c (c_sizeof_or_alignof_type): Add parameter min_alignof
11183 and check field alignment if set.
11184 * c-common.h (c_sizeof_or_alignof_type): Update prototype.
11185 (c_sizeof, c_alignof): Update calls to c_sizeof_or_alignof_type.
11187 2013-12-04 Jakub Jelinek <jakub@redhat.com>
11188 Marek Polacek <polacek@redhat.com>
11190 * c-gimplify.c (c_gimplify_expr): If doing the integer-overflow
11191 sanitization, call unsigned_type_for only when !TYPE_OVERFLOW_WRAPS.
11193 2013-11-29 H.J. Lu <hongjiu.lu@intel.com>
11196 * cilk.c (gimplify_cilk_spawn): Properly handle function without
11199 2013-11-29 Jakub Jelinek <jakub@redhat.com>
11202 * c-common.c (get_priority): If TREE_VALUE (args) is IDENTIFIER_NODE,
11203 goto invalid. If it is error_mark_node, don't issue further
11206 2013-11-28 Sergey Ostanevich <sergos.gnu@gmail.com>
11208 * c.opt (Wopenmp-simd): New.
11210 2013-11-22 Jakub Jelinek <jakub@redhat.com>
11212 * c-ubsan.h (ubsan_instrument_return): New prototype.
11213 * c-ubsan.c (ubsan_instrument_return): New function.
11215 2013-11-22 Andrew MacLeod <amacleod@redhat.com>
11217 * c-common.c: Add required include files from gimple.h.
11218 * c-gimplify.c: Likewise.
11219 * cilk.c: Likewise.
11221 2013-11-22 David Malcolm <dmalcolm@redhat.com>
11223 * c-common.c (unsafe_conversion_p): Remove use of
11224 EXPR_LOC_OR_HERE macro.
11225 (conversion_warning): Likewise.
11226 (warnings_for_convert_and_check): Likewise.
11227 (warn_for_collisions_1): Likewise.
11228 (shorten_compare): Likewise, and remove use of in_system_header
11229 macro, using the location from the former.
11230 * c-lex.c (dump_one_header): Remove use of input_filename macro.
11231 (cb_def_pragma): Remove use of in_system_header macro.
11232 (lex_string): Likewise.
11233 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
11235 2013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
11236 Mike Stump <mikestump@comcast.net>
11237 Richard Sandiford <rdsandiford@googlemail.com>
11239 * c-ada-spec.c (is_simple_enum): Use tree_to_shwi and tree_to_uhwi
11240 instead of TREE_INT_CST_LOW, in cases where there is a protecting
11241 tree_fits_shwi_p or tree_fits_uhwi_p.
11242 (dump_generic_ada_node): Likewise.
11243 * c-format.c (check_format_arg): Likewise.
11244 * c-pretty-print.c (pp_c_integer_constant): Likewise.
11246 2013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
11248 * c-common.c (check_function_arguments_recurse): Use tree_to_uhwi.
11250 2013-11-19 Joshua J Cogliati <jrincayc@yahoo.com>
11253 * c-common.c (unsafe_conversion_p): Make this function
11254 return an enumeration with more detail.
11255 (conversion_warning): Use the new return type of
11256 unsafe_conversion_p to separately warn either about conversions
11257 that lower floating point number precision or about the other
11258 kinds of conversions.
11259 * c-common.h (enum conversion_safety): New enumeration.
11260 (unsafe_conversion_p): switching return type to
11261 conversion_safety enumeration.
11262 * c.opt: Adding new warning -Wfloat-conversion and
11263 enabling it with -Wconversion.
11265 2013-11-19 Basile Starynkevitch <basile@starynkevitch.net>
11267 * c-opts.c: Include plugin.h.
11268 (cb_file_change): Invoke plugin event PLUGIN_INCLUDE_FILE.
11270 2013-11-19 Marek Polacek <polacek@redhat.com>
11272 * c-ubsan.c (ubsan_instrument_division): Adjust ubsan_create_data
11274 (ubsan_instrument_shift): Likewise.
11275 (ubsan_instrument_vla): Likewise.
11277 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
11279 * c-common.c (convert_vector_to_pointer_for_subscript): Remove
11280 cast to unsigned type.
11282 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
11284 * c-common.c (fold_offsetof_1): Use tree_to_uhwi rather than
11286 (complete_array_type): Update comment to refer to tree_to_[su]hwi
11287 rather than tree_low_cst.
11289 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
11291 * c-common.c, c-cppbuiltin.c: Replace tree_low_cst (..., 1) with
11292 tree_to_uhwi throughout.
11294 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
11296 * c-common.c, c-format.c, c-omp.c, c-pretty-print.c: Replace
11297 tree_low_cst (..., 0) with tree_to_shwi throughout.
11299 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
11301 * c-ada-spec.c, c-common.c, c-pretty-print.c: Replace
11302 host_integerp (..., 1) with tree_fits_uhwi_p throughout.
11304 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
11306 * c-ada-spec.c, c-common.c, c-format.c, c-pretty-print.c: Replace
11307 host_integerp (..., 0) with tree_fits_shwi_p throughout.
11309 2013-11-15 Aldy Hernandez <aldyh@redhat.com>
11311 * c-cilkplus.c: New file.
11312 * c-common.c (readonly_error): Add location argument.
11313 * c-common.h (readonly_error): Same.
11314 (c_finish_cilk_clauses): Protoize.
11315 (c_check_cilk_loop): Same.
11316 c-omp.c (c_finish_omp_for): Handle CILK_SIMD nodes.
11317 Do not fail on error_mark_node.
11318 Abstract increment canonicalization to here...
11319 (c_omp_for_incr_canonicalize_ptr): New.
11320 c-pragma.c (init_pragma): Register "simd" pragma.
11321 c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_SIMD.
11322 (enum pragma_cilk_clause): New.
11324 2013-11-15 Richard Sandiford <rdsandiford@googlemail.com>
11326 * c-pretty-print.c (pp_c_character_constant): Remove unnecessary
11327 wchar_type and host_integerp checks.
11329 2013-11-14 Andrew MacLeod <amacleod@redhat.com>
11331 * c-common.c: Likewise.
11332 * c-gimplify.c: Likewise.
11333 * cilk.c: Likewise.
11335 2013-11-14 Diego Novillo <dnovillo@google.com>
11337 * c-common.c: Include fold-const.h.
11338 Include stor-layout.h.
11340 Include stringpool.h.
11343 Include trans-mem.h.
11344 * c-cppbuiltin.c: Include stor-layout.h.
11345 Include stringpool.h.
11346 * c-format.c: Include stringpool.h.
11347 * c-lex.c: Include stringpool.h.
11348 Include stor-layout.h.
11349 * c-pragma.c: Include stringpool.h.
11352 Include gcc-symtab.h.
11353 * c-pretty-print.c: Include stor-layout.h.
11355 * cilk.c: Include stringpool.h.
11358 2013-11-13 Joseph Myers <joseph@codesourcery.com>
11360 * c-common.h (enum rid): Add RID_AUTO_TYPE.
11361 * c-common.c (c_common_reswords): Add __auto_type.
11362 (keyword_begins_type_specifier): Handle RID_AUTO_TYPE.
11364 2013-11-12 Andrew MacLeod <amacleod@redhat.com>
11366 * c-common.c: Include gimplify.h.
11367 * c-gimplify.c: Likewise.
11368 * cilk.c: Likewise.
11369 * c-omp.c: Include gimple-expr.h instead of gimple.h.
11370 * c-ubsan.c: Don't include gimple.h.
11372 2013-11-12 Joseph Myers <joseph@codesourcery.com>
11374 * c-common.c (c_common_reswords): Add _Thread_local.
11376 2013-11-09 Joseph Myers <joseph@codesourcery.com>
11378 * c-common.c (atomic_size_supported_p): New function.
11379 (resolve_overloaded_atomic_exchange)
11380 (resolve_overloaded_atomic_compare_exchange)
11381 (resolve_overloaded_atomic_load, resolve_overloaded_atomic_store):
11382 Use it instead of comparing size with a local list of sizes.
11384 2013-11-07 Andrew MacLeod <amacleod@redhat.com>
11385 Joseph Myers <joseph@codesourcery.com>
11387 * c-common.h (enum rid): Add RID_ATOMIC.
11388 * c-common.c (c_common_reswords): Add _Atomic.
11389 (sync_resolve_params): Use TYPE_MAIN_VARIANT on pointer argument.
11390 (keyword_is_type_qualifier): Accept RID_ATOMIC.
11391 * c-format.c (check_format_types): Check for extra _Atomic
11392 qualifiers in format argument.
11393 * c-pretty-print.c (pp_c_cv_qualifiers): Handle atomic qualifier.
11394 (pp_c_type_qualifier_list): Mention _Atomic in comment.
11396 2013-11-06 Tobias Burnus <burnus@net-b.de>
11398 * c-common.c (reason_option_codes_t): Add CPP_W_DATE_TIME.
11400 2013-11-06 Joseph Myers <joseph@codesourcery.com>
11402 * c-opts.c (c_common_post_options): Set -ffp-contract=off in C
11404 * c-cppbuiltin.c (cpp_iec_559_value): Consider -ffp-contract=fast
11405 to mean lack of IEEE 754 support.
11407 2013-11-05 Tobias Burnus <burnus@net-b.de>
11409 * c.opt (-Wdate-time): New option
11410 * c-opts.c (sanitize_cpp_opts): Pass on to libcpp.
11412 2013-11-05 Joseph Myers <joseph@codesourcery.com>
11414 * c-cppbuiltin.c (cpp_iec_559_value): Test
11415 flag_excess_precision_cmdline not flag_excess_precision.
11417 2013-11-05 Tobias Burnus <burnus@net-b.de>
11419 * c.opt (fopenmp-simd): New option.
11420 * c-pragma.c (omp_pragmas): Move pragmas which can contain simd to ...
11421 (omp_pragmas): ... this new struct.
11422 (c_pp_lookup_pragma): Also walk omp_pragmas.
11423 (init_pragma): Init pragmas for -fopenmp-simd.
11425 2013-11-04 Marek Polacek <polacek@redhat.com>
11428 * c-common.c (invalid_indirection_error): Handle RO_ARROW_STAR case.
11430 2013-11-04 Joseph Myers <joseph@codesourcery.com>
11432 * c-cppbuiltin.c (cpp_iec_559_value, cpp_iec_559_complex_value):
11434 (c_cpp_builtins): Define __GCC_IEC_559 and __GCC_IEC_559_COMPLEX.
11436 2013-11-04 Eric Botcazou <ebotcazou@adacore.com>
11438 * c-ada-spec.h (cpp_operation): Add IS_TRIVIAL.
11439 (dump_ada_specs): Adjust prototype of second callback.
11440 * c-ada-spec.c (cpp_check): New global variable.
11441 (dump_ada_nodes): Remove cpp_check parameter and do not pass it down.
11442 (print_generic_ada_decl): Likewise.
11443 (has_static_fields): Change return type to bool and add guard.
11444 (has_nontrivial_methods): New predicate.
11445 (is_tagged_type): Change return type to bool.
11446 (separate_class_package): Call has_nontrivial_methods.
11447 (pp_ada_tree_identifier): Minor tweaks.
11448 (dump_ada_function_declaration): Adjust calls to dump_generic_ada_node.
11449 (dump_ada_array_domains): Likewise.
11450 (dump_ada_array_type): Likewise.
11451 (dump_template_types): Remove cpp_check parameter and do not pass it to
11452 dump_generic_ada_node.
11453 (dump_ada_template): Likewise.
11454 (dump_generic_ada_node): Remove cpp_check parameter and do not pass it
11456 (print_ada_methods): Change return type to integer. Remove cpp_check
11457 parameter and do not pass it down.
11458 (dump_nested_types): Remove cpp_check parameter and do not pass it to
11459 dump_generic_ada_node.
11460 (print_ada_declaration): Likewise. Test RECORD_OR_UNION_TYPE_P before
11462 (print_ada_struct_decl): Remove cpp_check parameter and do not pass it
11463 down. Use has_nontrivial_methods to recognize C++ classes. Use return
11464 value of print_ada_methods.
11465 (dump_ads): Rename cpp_check parameter to check and adjust prototype.
11466 Set cpp_check to it before invoking dump_ada_nodes.
11467 (dump_ada_specs): Likewise.
11469 2013-11-03 Marek Polacek <polacek@redhat.com>
11471 * c-ubsan.c: Don't include hash-table.h.
11472 (ubsan_instrument_vla): New function.
11473 * c-ubsan.h: Declare it.
11475 2013-10-31 David Malcolm <dmalcolm@redhat.com>
11477 Automated part of renaming of symtab_node_base to symtab_node.
11479 Patch autogenerated by rename_symtab.py from
11480 https://github.com/davidmalcolm/gcc-refactoring-scripts
11481 revision 58bb219cc090b2f4516a9297d868c245495ee622
11483 * c-pragma.c (maybe_apply_pending_pragma_weaks): Rename
11484 symtab_node_base to symtab_node.
11486 2013-10-31 Edward Smith-Rowland <3dw4rd@verizon.net>
11488 Implement C++14 digit separators.
11489 * c-lex.c (interpret_float): Remove digit separators from scratch string
11490 before building real literal.
11492 2013-10-30 Jakub Jelinek <jakub@redhat.com>
11494 * cilk.c (create_cilk_helper_decl): Use HOST_WIDE_INT_PRINT_DEC.
11496 2013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
11498 * c-common.c (c_common_reswords[]): Added _Cilk_spawn and _Cilk_sync
11500 (c_define_builtins): Called cilk_init_builtins if Cilk Plus is
11502 * c-common.h (enum rid): Added RID_CILK_SPAWN and RID_CILK_SYNC.
11503 (insert_cilk_frame): New prototype.
11504 (cilk_init_builtins): Likewise.
11505 (gimplify_cilk_spawn): Likewise.
11506 (c_cilk_install_body_w_frame_cleanup): Likewise.
11507 (cilk_detect_spawn_and_unwrap): Likewise.
11508 (cilk_set_spawn_marker): Likewise.
11509 (build_cilk_sync): Likewise.
11510 (build_cilk_spawn): Likewise.
11511 * cilk.c: New file.
11513 2013-10-29 David Malcolm <dmalcolm@redhat.com>
11515 Patch autogenerated by refactor_symtab.py from
11516 https://github.com/davidmalcolm/gcc-refactoring-scripts
11517 revision 58bb219cc090b2f4516a9297d868c245495ee622
11519 * c-gimplify.c (c_genericize): Update for conversion of symtab types
11520 to a true class hierarchy.
11521 * c-pragma.c (maybe_apply_pending_pragma_weaks): Likewise.
11523 2013-10-27 Richard Sandiford <rdsandiford@googlemail.com>
11525 * c-lex.c (interpret_integer): Remove call to cpp_num_sign_extend.
11527 2013-10-26 Jeff Law <law@redhat.com>
11529 * c-common.c (c_define_builtins): Remove mudflap support.
11530 * c.opt: Ignore and warn for mudflap options.
11532 2013-10-24 Tobias Burnus <burnus@net-b.de>
11535 * c-pragma.c (init_pragma) Add #pragma ivdep handling.
11536 * c-pragma.h (pragma_kind): Add PRAGMA_IVDEP.
11538 2013-10-23 Jason Merrill <jason@redhat.com>
11540 * c-format.c (gcc_cxxdiag_char_table): Add %X.
11542 2013-10-11 Jakub Jelinek <jakub@redhat.com>
11544 * c-common.h (omp_clause_mask::operator !=): New method.
11545 * c-omp.c (c_omp_split_clauses): Use if ((mask & something) != 0)
11546 instead of if (mask & something) tests everywhere.
11548 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP to
11549 201307 instead of 201107.
11550 * c-common.c (DEF_FUNCTION_TYPE_8): Define.
11551 (c_common_attribute_table): Add "omp declare target" and
11552 "omp declare simd" attributes.
11553 (handle_omp_declare_target_attribute,
11554 handle_omp_declare_simd_attribute): New functions.
11555 * c-omp.c: Include c-pragma.h.
11556 (c_finish_omp_taskgroup): New function.
11557 (c_finish_omp_atomic): Add swapped argument, if true,
11558 build the operation first with rhs, lhs arguments and use NOP_EXPR
11560 (c_finish_omp_for): Add code argument, pass it down to make_code.
11561 (c_omp_split_clauses): New function.
11562 (c_split_parallel_clauses): Removed.
11563 (c_omp_declare_simd_clause_cmp, c_omp_declare_simd_clauses_to_numbers,
11564 c_omp_declare_simd_clauses_to_decls): New functions.
11565 * c-common.h (omp_clause_mask): New type.
11566 (OMP_CLAUSE_MASK_1): Define.
11567 (omp_clause_mask::omp_clause_mask, omp_clause_mask::operator &=,
11568 omp_clause_mask::operator |=, omp_clause_mask::operator ~,
11569 omp_clause_mask::operator |, omp_clause_mask::operator &,
11570 omp_clause_mask::operator <<, omp_clause_mask::operator >>,
11571 omp_clause_mask::operator ==): New methods.
11572 (enum c_omp_clause_split): New.
11573 (c_finish_omp_taskgroup): New prototype.
11574 (c_finish_omp_atomic): Add swapped argument.
11575 (c_finish_omp_for): Add code argument.
11576 (c_omp_split_clauses): New prototype.
11577 (c_split_parallel_clauses): Removed.
11578 (c_omp_declare_simd_clauses_to_numbers,
11579 c_omp_declare_simd_clauses_to_decls): New prototypes.
11580 * c-pragma.c (omp_pragmas): Add new OpenMP 4.0 constructs.
11581 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_CANCEL,
11582 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_DECLARE_REDUCTION,
11583 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_SIMD,
11584 PRAGMA_OMP_TARGET, PRAGMA_OMP_TASKGROUP and PRAGMA_OMP_TEAMS.
11585 Remove PRAGMA_OMP_PARALLEL_FOR and PRAGMA_OMP_PARALLEL_SECTIONS.
11586 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ALIGNED,
11587 PRAGMA_OMP_CLAUSE_DEPEND, PRAGMA_OMP_CLAUSE_DEVICE,
11588 PRAGMA_OMP_CLAUSE_DIST_SCHEDULE, PRAGMA_OMP_CLAUSE_FOR,
11589 PRAGMA_OMP_CLAUSE_FROM, PRAGMA_OMP_CLAUSE_INBRANCH,
11590 PRAGMA_OMP_CLAUSE_LINEAR, PRAGMA_OMP_CLAUSE_MAP,
11591 PRAGMA_OMP_CLAUSE_NOTINBRANCH, PRAGMA_OMP_CLAUSE_NUM_TEAMS,
11592 PRAGMA_OMP_CLAUSE_PARALLEL, PRAGMA_OMP_CLAUSE_PROC_BIND,
11593 PRAGMA_OMP_CLAUSE_SAFELEN, PRAGMA_OMP_CLAUSE_SECTIONS,
11594 PRAGMA_OMP_CLAUSE_SIMDLEN, PRAGMA_OMP_CLAUSE_TASKGROUP,
11595 PRAGMA_OMP_CLAUSE_THREAD_LIMIT, PRAGMA_OMP_CLAUSE_TO and
11596 PRAGMA_OMP_CLAUSE_UNIFORM.
11598 2013-10-09 Marc Glisse <marc.glisse@inria.fr>
11600 PR tree-optimization/20318
11601 * c-common.c (handle_returns_nonnull_attribute): New function.
11602 (c_common_attribute_table): Add returns_nonnull.
11604 2013-10-03 Marc Glisse <marc.glisse@inria.fr>
11607 * c.opt (fcheck-new): Move to common.opt.
11609 2013-09-25 Marek Polacek <polacek@redhat.com>
11610 Jakub Jelinek <jakub@redhat.com>
11613 * c-ubsan.c (ubsan_instrument_shift): Don't instrument
11614 an expression if we can prove it is correct.
11615 (ubsan_instrument_division): Likewise. Remove unnecessary
11618 2013-09-18 Marek Polacek <polacek@redhat.com>
11621 * c-common.c (handle_no_sanitize_undefined_attribute): New function.
11623 (struct attribute_spec c_common_att): Add no_sanitize_undefined.
11625 2013-09-14 Iain Sandoe <iain@codesourcery.com>
11628 * c.opt (fgnu-runtime, fnext-runtime, fobjc-abi-version,
11629 fobjc-gc, freplace-objc-classes): Accept for LTO.
11631 2013-09-13 Jacek Caban <jacek@codeweavers.com>
11633 * c-target.def: New hook
11635 2013-09-09 Paolo Carlini <paolo.carlini@oracle.com>
11638 * c.opt (Wdelete-incomplete): Add.
11640 2013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
11642 * c-common.c (same_scalar_type_ignoring_signedness): Delete.
11643 (vector_types_compatible_elements_p): New function.
11644 * c-common.h: (same_scalar_type_ignoring_signedness): Delete
11646 (vector_types_compatible_elements_p): Declare.
11648 2013-09-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
11650 * c-pretty-print.h (c_pretty_printer::simple_type_specifier): Now
11651 a virtual member function.
11652 (pp_simple_type_specifier): Remove.
11653 (pp_c_type_specifier): Likewise.
11654 * c-pretty-print.c (c_pretty_printer::simple_type_specifier):
11655 Rename from pp_c_type_specifier. Adjust.
11656 (c_pretty_printer::c_pretty_printer): Do not assign to
11657 simple_type_specifier.
11659 2013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
11661 * c-pretty-print.h (c_pretty_printer::type_id): Now a virtual
11663 (c_pretty_printer::storage_class_specifier): Likewise.
11664 (c_pretty_printer::initializer): Likewise.
11665 (pp_declaration): Remove.
11666 (pp_declaration_specifiers): Likewise.
11667 (pp_abstract_declarator): Likewise.
11668 (pp_declarator): Likewise.
11669 (pp_type_id): Likewise.
11670 (pp_statement): Likewise.
11671 (pp_constant): Likewise.
11672 (pp_id_expression): Likewise.
11673 (pp_primary_expression): Likewise.
11674 (pp_unary_expression): Likewise.
11675 (pp_multiplicative_expression): Likewise.
11676 (pp_conditional_expression): Likewise.
11677 (pp_assignment_expression): Likewise.
11678 (pp_expression): Likewise.
11679 (pp_c_type_id): Likewise.
11680 (pp_c_storage_class_specifier): Likewise.
11681 * c-pretty-print.c (pp_c_type_cast): Tidy.
11682 (pp_c_pointer): Likewise.
11683 (pp_c_type_specifier): Likewise.
11684 (pp_c_parameter_type_list): Likewise.
11685 (pp_c_function_definition): Likewise.
11686 (pp_c_init_declarator): Likewise.
11687 (pp_c_initializer_list): Likewise.
11688 (pp_c_constructor_elts): Likewise.
11689 (c_pretty_printer::direct_abstract_declarator): Likewise.
11690 (c_pretty_printer::declaration_specifiers): Likewise.
11691 (c_pretty_printer::primary_expression): Likewise.
11692 (c_pretty_printer::postfix_expression): Likewise.
11693 (c_pretty_printer::type_id): Rename from pp_c_type_id.
11694 (c_pretty_printer::storage_class_specifier): Rename from
11695 pp_c_storage_class_specifier.
11696 (c_pretty_printer::initializer): Rename from pp_c_initializer.
11697 (c_pretty_printer::c_pretty_printer): Do not assign to type_id,
11698 storage_class_specifier, initializer, offset_list, flags.
11700 2013-08-30 Marek Polacek <polacek@redhat.com>
11702 * c-ubsan.c: New file.
11703 * c-ubsan.h: New file.
11705 2013-08-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
11707 * c-pretty-print.h (c_pretty_printer::declaration): Now a virtual
11709 (c_pretty_printer::declaration_specifiers): Likewise.
11710 (c_pretty_printer::declarator): Likewise.
11711 (c_pretty_printer::abstract_declarator): Likewise.
11712 (c_pretty_printer::direct_abstract_declarator): Likewise.
11713 (c_pretty_printer::direct_declarator): Likewise.
11714 (c_pretty_printer::function_specifier): Likewise.
11715 (pp_declaration): Adjust.
11716 (pp_declaration_specifiers): Likewise.
11717 (pp_abstract_declarator): Likewise.
11718 (pp_direct_declarator): Likewise.
11719 (pp_function_specifier): Likewise.
11720 (pp_direct_abstract_declarator): Remove as unused.
11721 (pp_c_declaration): Remove.
11722 (pp_c_declaration_specifiers): Likewise.
11723 (pp_c_declarator): Likewise.
11724 (pp_c_direct_declarator): Likewise.
11725 (pp_c_function_specifier): Likewise.
11726 (pp_c_direct_abstract_declarator): Likewise.
11727 * c-pretty-print.c (c_pretty_printer::abstract_declarator): Rename
11728 from pp_c_abstract_declarator. Adjust.
11729 (c_pretty_printer::direct_abstract_declarator): Rename from
11730 pp_c_direct_abstract_declarator. Adjust.
11731 (c_pretty_printer::function_specifier): Rename from
11732 pp_c_function_specifier. Adjust.
11733 (c_pretty_printer::declaration_specifiers): Rename from
11734 pp_c_declaration_specifiers. Adjust.
11735 (c_pretty_printer::direct_declarator): Rename from
11736 pp_c_direct_declarator. Adjust.
11737 (c_pretty_printer::declarator): Rename from pp_c_declarator. Adjust.
11738 (c_pretty_printer::declaration): Rename from pp_c_declaration. Adjust.
11739 (c_pretty_printer::c_pretty_printer): Do not assign to
11740 declaration, declaration_specifiers, declarator,
11741 direct_declarator, direct_abstract_declarator, function_specifier.
11743 2013-08-26 Gabriel Dos Reis <gdre@integrable-solutions.net>
11745 * c-pretty-print.h (c_pretty_printer::unary_expression): Now a
11746 virtual member function.
11747 (c_pretty_printer::multiplicative_expression): Likewise.
11748 (c_pretty_printer::conditional_expression): Likewise.
11749 (c_pretty_printer::assignment_expression): Likewise.
11750 (c_pretty_printer::expression): Likewise.
11751 (pp_unary_expression): Adjust.
11752 (pp_multiplicative_expression): Likewise.
11753 (pp_assignment_expression): Likewise.
11754 (pp_conditional_expression): Likewise.
11755 (pp_expression): Likewise.
11756 * c-pretty-print.c (c_pretty_printer::unary_expression): Rename
11757 from pp_c_unary_expression. Adjust.
11758 (c_pretty_printer::multiplicative_expression): Rename from
11759 pp_c_multiplicative_expression. Adjust.
11760 (c_pretty_printer::conditional_expression): Rename from
11761 pp_c_conditional_expression. Adjust.
11762 (c_pretty_printer::assignment_expression): Rename from
11763 pp_c_assignment_expression. Adjust.
11764 (c_pretty_printer::expression): Rename from pp_c_expression. Adjust.
11765 (c_pretty_printer::c_pretty_printer): Do not assign to
11766 unary_expression, multiplicative_expression,
11767 conditional_expression, expression.
11769 2013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
11771 * c-pretty-print.h (c_pretty_printer::postfix_expression): Now a
11772 virtual member function.
11773 (pp_postfix_expression): Adjust.
11774 (pp_c_postfix_expression): Remove.
11775 * c-pretty-print.c (c_pretty_printer::postfix_expression): Rename
11776 from pp_c_postfix_expression. Adjust.
11777 (c_pretty_printer::c_pretty_printer): Do not assign to
11778 postfix_expression.
11780 2013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
11782 * c-pretty-print.h (c_pretty_printer::primary_expression): Now a
11783 virtua member function.
11784 (pp_primary_expression): Adjust.
11785 (pp_c_primary_expression): Remove.
11786 * c-pretty-print.c (c_pretty_printer::primary_expression): Rename
11787 from pp_c_primary_expression. Adjust.
11788 (pp_c_initializer_list): Use pp_primary_expression.
11789 (c_pretty_printer::c_pretty_printer): Do not assign to
11790 primary_expression.
11792 2013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
11794 * c-pretty-print.h (c_pretty_printer::translate_string): Declare.
11795 * c-pretty-print.c (M_): Remove.
11796 (c_pretty_printer::translate_string): Define.
11797 (pp_c_type_specifier): Use it.
11798 (pp_c_primary_expression): Likewise.
11799 (pp_c_expression): Likewise.
11801 2013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
11803 * c-pretty-print.h (c_pretty_printer::id_expression): Now a
11805 (pp_c_id_expression): Remove.
11806 (pp_id_expression): Adjust.
11807 * c-pretty-print.c (c_pretty_printer::id_expression): Rename from
11808 pp_c_id_expression. Adjust.
11809 (pp_c_postfix_expression): Use pp_id_expression.
11810 (c_pretty_printer::c_pretty_printer): Do not assign to id_expression.
11812 2013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
11814 * c-pretty-print.h (c_pretty_printer::constant): Now a virtual
11816 (pp_constant): Adjust.
11817 (pp_c_constant): Remove.
11818 * c-pretty-print.c (c_pretty_printer::constant): Rename from
11819 pp_c_constant. Adjust.
11821 (pp_c_primary_expression): Call pp_constant in lieu of pp_c_constant.
11822 (c_pretty_printer::c_pretty_printer): Remove assignment to constant.
11824 2013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
11826 * c-pretty-print.h (pp_c_pretty_printer_init): Remove.
11827 (c_pretty_printer::c_pretty_printer): Declare.
11828 * c-pretty-print.c (pretty_printer::c_pretty_printer): Rename from
11829 c_pretty_printer_init. Adjust.
11830 (print_c_tree): Do not call c_pretty_printer_init.
11831 * c-ada-spec.c (dump_ads): Remove call to pp_construct.
11833 2013-08-09 Arnaud Charlet <charlet@adacore.com>
11835 * c-ada-spec.c (print_ada_declaration): Prevent accessing null asm name
11837 2013-08-05 Paolo Carlini <paolo.carlini@oracle.com>
11840 * c-common.c (pointer_int_sum): Add bool parameter.
11841 * c-common.h (pointer_int_sum): Adjust declaration.
11843 2013-08-05 Gabriel Dos Reis <gdr@integrable-solutions.net>
11845 * c-pretty-print.c (print_c_tree): Simplify. Use non-static local
11846 c_pretty_printer variable.
11848 2013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
11850 * c-pretty-print.h (c_pretty_printer): Derive from pretty_printer.
11852 (pp_c_base): Likewise. Adjust users.
11853 * c-pretty-print.c (pp_c_maybe_whitespace): Adjust.
11854 (pp_c_whitespace): Do not call pp_base.
11855 (pp_c_left_paren): Likewise.
11856 (pp_c_right_paren): Likewise.
11857 (pp_c_left_brace): Likewise.
11858 (pp_c_right_brace): Likewise.
11859 (pp_c_left_bracket): Likewise.
11860 (pp_c_right_bracket): Likewise.
11861 (pp_c_dot): Likewise.
11862 (pp_c_ampersand): Likewise.
11863 (pp_c_star): Likewise.
11864 (pp_c_arrow): Likewise.
11865 (pp_c_semicolon): Likewise.
11866 (pp_c_complement): Likewise.
11867 (pp_c_exclamation): Likewise.
11868 (pp_c_direct_declarator): Likewise.
11869 (pp_c_ws_string): Likewise.
11870 (pp_c_identifier): Likewise.
11871 (pp_c_statement): Likewise.
11872 (print_c_tree): Likewise.
11874 2013-08-04 Ed Smith-Rowland <3dw4rd@verizon.net>
11877 * c-common.c (c_parse_error): Catch user-defined literal tokens and
11878 provide useful error strings.
11880 2013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
11882 * c-ada-spec.c (pp_ada_tree_identifier): Use specialized pretty
11883 printer functions instead of pp_string or operators and punctuators.
11884 (dump_generic_ada_node): Likewise.
11885 * c-pretty-print.c (pp_c_type_specifier): Likewise.
11886 (pp_c_relational_expression): Likewise.
11887 (pp_c_logical_or_expression): Likewise.
11889 2013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
11891 * c-ada-spec.c (print_ada_macros): Use specialized pretty printer
11892 functions instead of pp_character.
11893 (pp_ada_tree_identifier): Likewise.
11894 (dump_ada_double_name): Likewise.
11895 (dump_ada_function_declaration): Likewise.
11896 (dump_ada_array_domains): Likewise.
11897 (dump_template_types): Likewise.
11898 (dump_generic_ada_node): Likewise.
11899 (print_ada_declaration): Likewise.
11900 (print_ada_struct_decl): Likewise.
11901 * c-pretty-print.c (pp_c_integer_constant): Likewise.
11903 2013-07-23 Tom Tromey <tromey@redhat.com>
11905 * c-common.h (enum rid) <RID_GENERIC>: New constant.
11906 * c-common.c (c_common_reswords): Add _Generic.
11908 2013-07-21 OndÅ
\99ej BÃlka <neleai@seznam.cz>
11910 * c-common.c: Fix typos.
11911 * c-common.h: Likewise.
11913 2013-07-13 Lubos Lunak <l.lunak@suse.cz>
11916 * c-common.c (c_common_attribute_table): Add warn_unused.
11917 (handle_warn_unused_attribute): New.
11919 2013-07-10 Jakub Jelinek <jakub@redhat.com>
11921 * c-ppoutput.c (scan_translation_unit): Call account_for_newlines
11922 for all CPP_TOKEN_FLD_STR tokens, not just CPP_COMMENT.
11924 2013-07-10 Paolo Carlini <paolo.carlini@oracle.com>
11927 * c.opt: Add Wconditionally-supported.
11929 2013-07-08 Graham Stott <graham.stott@btinternet.com>
11931 * array-notation-common.c (length_mismatch_in_expr_p): Delete
11932 unused variables l_length and l_node.
11934 2013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
11937 * c-common.c (complete_array_type): Delay folding first index
11938 like other indices. When folding, check for index overflow.
11940 2013-06-27 Marc Glisse <marc.glisse@inria.fr>
11943 * c-common.h (c_build_vec_perm_expr): New complain argument.
11944 * c-common.c (c_build_vec_perm_expr): Likewise.
11945 Use save_expr also in C++.
11947 2013-06-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
11949 * c-common.c (c_common_nodes_and_builtins): Use cxx11 in lieu of cxx0x.
11950 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
11951 * c-opts.c (c_common_post_options): Likewise.
11953 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
11955 * array-notation-common.c (length_mismatch_in_expr): Changed the
11956 parameter type's from a dynamic array to a vec_tree. Also removed
11957 the size parameters.
11958 * c-common.h (length_mismatch_in_expr_p): Fixed prototype's as per
11961 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
11963 * c-common.h (struct cilkplus_an_parts): New structure.
11964 (struct cilkplus_an_loop_parts): Likewise.
11965 (cilkplus_extract_an_triplets): New prototype.
11966 (fix_sec_implicit_args): Likewise.
11967 * array-notation-common.c (cilkplus_extract_an_triplets): New function.
11968 (fix_sec_implicit_args): Likewise.
11970 2013-06-20 Balaji V. Iyer <balaji.v.iyer@intel.com>
11972 * array-notation-common.c (find_inv_trees): Removed an unwanted
11974 * c-common.h (struct inv_list::additional_tcodes): Changed type from
11975 enum rid to enum tree_code.
11977 2013-06-11 Jan Hubicka <jh@suse.cz>
11979 * c-common.c (handle_alias_ifunc_attribute): Do not set
11980 DECL_EXTERNAL for weakref variables.
11981 * c-pragma.c (handle_pragma_weak): Make sure aliases
11982 are not declared as external.
11984 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
11986 * array-notation-common.c (length_mismatch_in_expr_p): Moved this
11987 function from c/c-array-notation.c.
11988 (is_cilkplus_reduce_builtin): Likewise.
11989 (find_rank): Likewise.
11990 (extract_array_notation_exprs): Likewise.
11991 (replace_array_notations): Likewise.
11992 (find_inv_trees): Likewise.
11993 (replace_inv_trees): Likewise.
11994 (contains_array_notation_expr): Likewise.
11995 (find_correct_array_notation_type): Likewise.
11996 * c-common.h (struct inv_list): Moved this struct from the file
11997 c/c-array-notation.c and added a new field called additional tcodes.
11998 (length_mismatch_in_expr_p): New prototype.
11999 (is_cilkplus_reduce_builtin): Likewise.
12000 (find_rank): Likewise.
12001 (extract_array_notation_exprs): Likewise.
12002 (replace_array_notation): Likewise.
12003 (find_inv_trees): Likewise.
12004 (replace_inv_trees): Likewise.
12005 (find_correct_array_notation_type): Likewise.
12007 2013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
12009 * c-common.c (c_define_builtins): When cilkplus is enabled, the
12010 function array_notation_init_builtins is called.
12011 (c_common_init_ts): Added ARRAY_NOTATION_REF as typed.
12012 * c-common.def (ARRAY_NOTATION_REF): New tree.
12013 * c-common.h (build_array_notation_expr): New function declaration.
12014 (build_array_notation_ref): Likewise.
12015 (extract_sec_implicit_index_arg): New extern declaration.
12016 (is_sec_implicit_index_fn): Likewise.
12017 (ARRAY_NOTATION_CHECK): New define.
12018 (ARRAY_NOTATION_ARRAY): Likewise.
12019 (ARRAY_NOTATION_START): Likewise.
12020 (ARRAY_NOTATION_LENGTH): Likewise.
12021 (ARRAY_NOTATION_STRIDE): Likewise.
12022 * c-pretty-print.c (pp_c_postifix_expression): Added a new case for
12023 ARRAY_NOTATION_REF.
12024 (pp_c_expression): Likewise.
12025 * c.opt (flag_enable_cilkplus): New flag.
12026 * array-notation-common.c: New file.
12028 2013-05-14 Jakub Jelinek <jakub@redhat.com>
12031 * c-common.c (verify_tree): Don't recurse into SIZEOF_EXPR.
12033 2013-05-10 Marc Glisse <marc.glisse@inria.fr>
12035 * c-common.c (vector_types_convertible_p): No TYPE_PRECISION for
12038 2013-05-07 Han Shen <shenhan@google.com>
12040 * c-cppbuiltin.c (c_cpp_builtins): Added "__SSP_STRONG__=3".
12042 2013-04-29 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
12044 * c-common.c (check_user_alignment): Emit error for negative values.
12046 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
12048 * c-opts.c (set_std_cxx11): Use CLK_CXX1Y and CLK_GNUCXX1Y.
12050 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
12052 * c-cppbuiltin.c (c_cpp_builtins): Do not define
12053 __GXX_EXPERIMENTAL_CXX1Y__.
12055 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
12056 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
12058 * c.opt ([Wpointer-arith]): Enabled by -Wpedantic, as documented.
12059 * c-common.c (pointer_int_sum): Change -Wpointer-arith pedwarns
12060 to simply use OPT_Wpointer_arith.
12061 (c_sizeof_or_alignof_type): Likewise.
12063 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
12065 * c-cppbuiltin.c (c_cpp_builtins): Define __GXX_EXPERIMENTAL_CXX1Y__.
12067 2013-04-12 Jakub Jelinek <jakub@redhat.com>
12069 * c-format.c (gcc_diag_char_table, gcc_tdiag_char_table,
12070 gcc_cdiag_char_table, gcc_cxxdiag_char_table): Add %r and %R format
12073 2013-04-07 Steven Bosscher <steven@gcc.gnu.org>
12075 * c-pragma.c (add_to_renaming_pragma_list): Fix leading comment.
12077 2013-04-03 Paolo Carlini <paolo.carlini@oracle.com>
12079 * c-common.c (pointer_int_sum): Remove dead code.
12081 2013-03-09 Richard Sandiford <rdsandiford@googlemail.com>
12083 PR middle-end/56524
12084 * c-common.c (handle_optimize_attribute): Don't call
12085 save_optabs_if_changed.
12087 2013-03-05 Jakub Jelinek <jakub@redhat.com>
12089 PR middle-end/56461
12090 * c-pch.c (pch_init): Free target_validity at the end.
12092 2013-03-04 Jakub Jelinek <jakub@redhat.com>
12094 * c-pretty-print.c (pp_c_pretty_printer_init): Clear pp->flags.
12096 2013-02-28 Konstantin Serebryany <konstantin.s.serebryany@gmail.com>
12097 Jakub Jelinek <jakub@redhat.com>
12100 * c-common.c (handle_no_sanitize_address_attribute): New function.
12101 (c_common_attribute_table): Add no_sanitize_address attribute.
12102 (handle_no_address_safety_analysis_attribute): Add
12103 no_sanitize_address attribute, not no_address_safety_analysis
12106 2013-02-18 Aldy Hernandez <aldyh@redhat.com>
12109 * c-common.c (handle_optimize_attribute): Call
12110 save_optabs_if_changed.
12112 2013-02-18 Jakub Jelinek <jakub@redhat.com>
12113 Steven Bosscher <steven@gcc.gnu.org>
12116 * c-opts.c (c_common_post_options): If debug info is enabled
12117 and non-dwarf*, refuse to load PCH files and when writing PCH
12120 2013-02-05 Jakub Jelinek <jakub@redhat.com>
12122 PR middle-end/56167
12123 * c-common.c (handle_error_attribute): Fix condition.
12125 2013-01-30 Jakub Jelinek <jakub@redhat.com>
12128 * c-common.c (handle_target_attribute): Revert 2012-12-26 change.
12130 2013-01-18 Jason Merrill <jason@redhat.com>
12133 * c.opt (-fextern-tls-init): New.
12134 * c-opts.c (c_common_post_options): Handle it.
12136 2013-01-09 Jakub Jelinek <jakub@redhat.com>
12139 * c-common.c (c_fully_fold_internal): Warn for LSHIFT_EXPR and
12140 RSHIFT_EXPR, if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST
12141 and is either negative or bigger or equal to type precision
12142 of the first operand.
12144 2012-12-03 Marek Polacek <polacek@redhat.com>
12147 * c-common.c (check_user_alignment): Swap order of tests,
12148 check TREE_CODE first.
12150 2012-11-29 Ed Smith-Rowland <3dw4rd@verizon.net>
12153 * c-common.h (overflow_type): New enum.
12154 (build_userdef_literal): Add overflow_type argument.
12155 (tree_userdef_literal): Add overflow_type.
12156 (USERDEF_LITERAL_OVERFLOW): New access macro.
12157 * c-common.c (build_userdef_literal): Add overflow_type
12159 * c-lex.c (c_lex_with_flags): Add overflow_type to
12160 build_userdef_literal calls.
12161 (interpret_integer, interpret_float): Add overflow_type argument.
12163 2012-11-28 Richard Biener <rguenther@suse.de>
12166 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
12167 here and use a type with proper overflow behavior for types that would
12168 need to be promoted for the arithmetic.
12170 2012-11-23 Jakub Jelinek <jakub@redhat.com>
12173 * c-common.c (handle_no_address_safety_analysis_attribute): New
12175 (c_common_attribute_table): Add no_address_safety_analysis.
12177 2012-11-16 Simon Baldwin <simonb@google.com>
12179 * c.opt: Add f[no-]canonical-system-headers.
12180 * c-opts.c (c_common_handle_option): Handle
12181 OPT_fcanonical_system_headers.
12183 2012-11-09 Ed Smith-Rowland <3dw4rd@verizon.net>
12186 * c-opts.c (c_common_handle_option): Set new flags.
12187 * c.opt: Describe new flags.
12189 2012-11-09 Jason Merrill <jason@redhat.com>
12191 * c.opt (Wabi-tag): New.
12193 2012-11-09 Andi Kleen <ak@linux.intel.com>
12196 * c-common.c (get_atomic_generic_size): Mask with
12199 2012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
12202 * c.opt (Wformat): Make it Alias Wformat=1.
12203 (Wformat-contains-nul,Wformat-extra-args,Wformat-nonliteral,
12204 Wformat-security,Wformat-y2k,Wformat-zero-length): Use
12206 (Wformat=): RejectNegative. Use LangEnabledBy.
12207 (Wnonnull): Use LangEnabledBy.
12208 * c-opts.c (c_common_handle_option): Do not handle Wformat here.
12209 * c-format.c (set_Wformat): Delete.
12210 (decode_format_attr): Replace OPT_Wformat with OPT_Wformat_.
12211 (maybe_read_dollar_number): Likewise.
12212 (avoid_dollar_number): Likewise.
12213 (finish_dollar_format_checking): Likewise.
12214 (check_format_info): Likewise.
12215 (check_format_info_main): Likewise.
12216 (check_format_types): Likewise.
12217 (format_type_warning): Likewise.
12218 * c-common.c (int): Likewise.
12219 (check_function_sentinel): Likewise.
12220 * c-common.h (warn_format,set_Wformat): Do not declare here.
12222 2012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
12225 * c.opt(Warray-bounds,Wdelete-non-virtual-dtor,Wenum-compare,
12226 Wmain,Woverlength-strings, Wunknown-pragmas,Wunused-macros):
12228 (Wswitch,Wswitch-default,Wswitch-enum): Likewise. Move here from
12230 (Wvariadic-macros): Init(1).
12231 * c-opts.c (c_common_handle_option): Do not handle them
12233 (c_common_post_options): Likewise.
12234 (sanitize_cpp_opts): warn_unused_macros is now
12235 cpp_warn_unused_macros.
12236 (push_command_line_include): Likewise.
12237 * c-common.c (warn_unknown_pragmas): Do not define.
12238 * c-common.h (warn_unknown_pragmas): Do not declare.
12240 2012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
12243 * c-common.c (conversion_warning): Handle conditional expressions.
12245 2012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
12248 * c.opt (Wreturn_local_addr): Define new option.
12250 2012-10-25 Jason Merrill <jason@redhat.com>
12252 * c.opt (Wvirtual-move-assign): New.
12254 * c.opt (Winherited-variadic-ctor): New.
12256 2012-10-25 Marc Glisse <marc.glisse@inria.fr>
12259 * c-common.c (scalar_to_vector): Handle VEC_COND_EXPR.
12261 2012-10-23 Joseph Myers <joseph@codesourcery.com>
12263 * c-common.h (pch_cpp_save_state): Declare.
12264 * c-target.def (c_preinclude): New hook.
12265 * c-opts.c (done_preinclude): New.
12266 (push_command_line_include): Handle default preincluded header.
12267 (cb_file_change): Call pch_cpp_save_state when calling
12268 push_command_line_include.
12269 * c-pch.c (pch_ready_to_save_cpp_state, pch_cpp_state_saved)
12270 (pch_cpp_save_state): New.
12271 (pch_init): Call pch_cpp_save_state conditionally, instead of
12272 calling cpp_save_state.
12274 2012-10-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
12278 * c.opt (Waddress,Wchar-subscripts,Wsign-conversion,Wimplicit,
12279 Wimplicit-function-declaration,Wimplicit-int,Wsizeof-pointer-memaccess,
12280 Wnarrowing,Wparentheses,Wpointer-sign,Wreturn-type,Wsequence-point,
12281 Wsign-compare,Wuninitialized,Wmaybe-uninitialized,Wunused,
12282 Wvolatile-register-var): Add LangEnabledBy or EnabledBy.
12283 * c-opts.c (c_common_handle_option): Remove explicit handling from
12285 (c_common_post_options): Likewise.
12287 2012-10-18 Eric Botcazou <ebotcazou@adacore.com>
12289 * c-ada-spec.c (LOCATION_COL): Delete.
12290 (compare_location): New function.
12291 (compare_node): Use it.
12292 (compare_comment): Likewise.
12294 2012-10-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
12298 * c.opt (Wstrict-aliasing=,Wstrict-overflow=): Use LangEnabledBy.
12299 * c-opts.c (c_common_handle_option): Do not set them here. Add
12301 (c_common_post_options): Likewise.
12303 2012-10-16 Eric Botcazou <ebotcazou@adacore.com>
12305 * c-ada-spec.c (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Define.
12306 (dump_generic_ada_node) <INTEGER_CST>: Deal with sizetype specially.
12307 Remove POINTER_TYPE handling, add large unsigned handling and use
12308 ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX for big numbers.
12310 2012-10-12 Jakub Jelinek <jakub@redhat.com>
12313 * c-common.h (sizeof_pointer_memaccess_warning): Adjust prototype.
12314 * c-common.c (sizeof_pointer_memaccess_warning): Take array of 3
12315 locs and array of 3 trees instead of just single loc and single
12316 sizeof_arg tree. Handle __builtin___*_chk builtins too, and
12317 also stpncpy, bcopy, bcmp, bzero, snprintf and vsnprintf builtins.
12318 For *cmp* builtins that take two sources strings report warnings
12319 about first and second source, not about destination and source.
12321 2012-10-12 Marc Glisse <marc.glisse@inria.fr>
12324 * c-common.h (enum ref_operator) [RO_ARROW_STAR]: New.
12326 2012-10-11 Eric Botcazou <ebotcazou@adacore.com>
12328 * c-ada-spec.c (dump_ada_template): Bail out for template declarations
12329 declaring something coming from another file.
12331 2012-10-10 Arnaud Charlet <charlet@adacore.com>
12334 * c-ada-spec.c (print_ada_struct_decl): Increase buf size.
12336 2012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
12339 * c-common.c (warn_about_parentheses): Add location_t parameter;
12340 use EXPR_LOC_OR_LOC.
12341 * c-common.h: Update declaration.
12343 2012-10-09 Marc Glisse <marc.glisse@inria.fr>
12346 * c-common.c (scalar_to_vector): Moved from c-typeck.c. Support
12347 more operations. Make error messages optional.
12348 * c-common.h (enum stv_conv): Moved from c-typeck.c.
12349 (scalar_to_vector): Declare.
12351 2012-10-08 Jason Merrill <jason@redhat.com>
12353 * c-common.c (c_common_reswords): Add thread_local.
12355 2012-10-08 Dodji Seketeli <dodji@redhat.com>
12357 PR c++/53528 C++11 attribute support
12358 * c-common.h (bitfield_p, cxx_fundamental_alignment_p): Declare
12360 * c-common.c (check_cxx_fundamental_alignment_constraints): New
12362 (handle_aligned_attribute): In choose strictest alignment
12363 among many. Use new check_cxx_fundamental_alignment_constraints.
12364 (handle_transparent_union_attribute): In c++11 attribute syntax,
12365 don't look through typedefs.
12367 2012-10-04 Arnaud Charlet <charlet@adacore.com>
12369 * c-ada-spec.c (print_ada_declaration): Remove handling of TDF_RAW.
12370 * c.opt (-fdump-ada-spec, -fdump-ada-spec-slim): Move switch definition
12373 2012-09-25 Dehao Chen <dehao@google.com>
12375 PR middle-end/54645
12376 * c-pch.c (c_common_read_pch): Rebuild the location_adhoc_data
12377 map when read in the pch.
12379 2012-09-18 Arnaud Charlet <charlet@adacore.com>
12381 * c-ada-spec.c: Style fixes.
12383 2012-09-18 Thomas Quinot <quinot@adacore.com>
12385 * c.opt (-fada-spec-parent): Define new command line switch.
12386 * c-ada-spec.c (get_ada_package): When -fada-spec-parent
12387 is specified, generate binding spec as a child of the specified unit.
12389 2012-09-13 Paolo Carlini <paolo.carlini@oracle.com>
12390 Manuel López-Ibáñez <manu@gcc.gnu.org>
12393 * c.opt ([Winit-self]): Enabled by -Wall in C++.
12395 2012-08-23 Arnaud Charlet <charlet@adacore.com>
12397 * c-ada-spec.c (dump_generic_ada_node): Fix handling of name_only
12398 for pointers, and add missing Convention C pragma.
12399 (print_ada_struct_decl): Add missing aliased keyword.
12400 (dump_ads): Add pragma Ada_2005 and Style_Checks (Off).
12402 2012-08-17 Jakub Jelinek <jakub@redhat.com>
12404 * c-common.c (sizeof_pointer_memaccess_warning): New function.
12405 * c.opt (-Wsizeof-pointer-memaccess): Add new option.
12406 * c-opts.c (c_common_handle_option): Enable it for -Wall.
12407 * c-common.h (sizeof_pointer_memaccess_warning): Add prototype.
12408 * c-common.def (SIZEOF_EXPR): Moved here from cp-tree.def.
12410 2012-08-10 Richard Guenther <rguenther@suse.de>
12412 * c-pretty-print.c (pp_c_expression): Handle anonymous SSA names.
12414 2012-08-07 Steven Bosscher <steven@gcc.gnu.org>
12416 * c-pretty-print.c (pp_c_function_definition): Use pp_newline_and_flush
12417 instead of separate pp_newline and pp_flush.
12418 (print_c_tree): Likewise.
12420 2012-07-26 Richard Henderson <rth@redhat.com>
12422 * c-common.c (handle_hot_attribute): Allow labels.
12423 (handle_cold_attribute): Likewise.
12425 2012-07-20 Jakub Jelinek <jakub@redhat.com>
12428 * c-common.c (check_function_nonnull): Handle multiple nonnull
12429 attributes properly.
12431 2012-07-16 Steven Bosscher <steven@gcc.gnu.org>
12433 * c-gimplify.c: Include dumpfile.h instead of tree-dump.h.
12434 * c-ada-spec.c: Likewise.
12435 * c-dump.c (dump_stmt): Move to cp/dump.c, the only user.
12437 2012-07-14 Steven Bosscher <steven@gcc.gnu.org>
12439 * c-pch.c (CHECK_NO_ASM_OUT_DURING_PCH): Do not define.
12440 Remove code conditional on it.
12442 2012-07-11 Steven Bosscher <steven@gcc.gnu.org>
12444 * c-gimplify.c: Do not include basic-block.h.
12445 * c-common.c: Do not include linfuncs.h.
12447 2012-07-08 Steven Bosscher <steven@gcc.gnu.org>
12449 * c-common.h: Include tree.h.
12451 2012-07-02 Jason Merrill <jason@redhat.com>
12454 * c-common.c (get_priority): Call default_conversion.
12456 2012-07-01 Uros Bizjak <ubizjak@gmail.com>
12458 * c-pch.c (c_common_write_pch): Remove unused variables.
12460 2012-06-29 Steven Bosscher <steven@gcc.gnu.org>
12462 * cppspec.c: Moved from gcc/ to here.
12464 2012-06-27 Kai Tietz <ktietz@redhat.com>
12466 PR preprocessor/37215
12467 * c-ppoutput.c (preprocess_file): Check for nonempty buffer.
12469 2012-06-21 Steven Bosscher <steven@gcc.gnu.org>
12471 * c-common.h (c_common_print_pch_checksum): Remove.
12472 * c-pch.c: Do not include output.h.
12473 (CHECK_NO_ASM_OUT_DURING_PCH): Define and add FIXME.
12474 (asm_out_file): Define iff CHECK_NO_ASM_OUT_DURING_PCH isdefined.
12475 (asm_file_startpos): Define iff CHECK_NO_ASM_OUT_DURING_PCH is defined.
12476 (struct c_pch_header): Remove.
12477 (get_ident): Update gpch version.
12478 (pch_init): Do not print executable_checksum to asm_out_file.
12479 Do not fail if there is no asm_out_file to read back from. Set
12480 asm_file_startpos only if CHECK_NO_ASM_OUT_DURING_PCH is defined.
12481 (c_common_write_pch): Verify that nothing was written to asm_out_file
12482 since pch_init was called. Do not write a c_pch_header, and do not
12483 copy from asm_out_file to the PCH.
12484 (c_common_read_pch): Do not read a c_pch_header, and do not restore
12485 the content of asm_out_file from the PCH.
12486 (c_common_print_pch_checksum): Remove.
12487 * c-opts.c (c_common_init): Print out executable_checksum directly.
12489 2012-06-19 Steven Bosscher <steven@gcc.gnu.org>
12491 * c-target.def (objc_declare_unresolved_class_reference,
12492 objc_declare_class_definition): Add new hooks.
12494 2012-06-19 Steven Bosscher <steven@gcc.gnu.org>
12496 * c-lex.c: Do not include output.h.
12497 (cb_ident): Try to put out .ident with targetm.asm_out.output_ident.
12498 Remove uses of ASM_OUTPUT_IDENT.
12500 2012-06-15 Marc Glisse <marc.glisse@inria.fr>
12503 * c-common.h (c_build_vec_perm_expr): Move decl here.
12504 * c-common.c (c_build_vec_perm_expr): Move definition
12507 2012-06-06 Steven Bosscher <steven@gcc.gnu.org>
12509 * c.opt (fconserve-space): Turn into a no-op.
12511 2012-06-04 Sterling Augustine <saugustine@google.com>
12513 * c-pretty-print.h (pp_c_flag_gnu_v3): New enumerator.
12514 * c-pretty-print.c (pp_c_specifier_qualifier_list): Check it at
12515 both the start and end of the function.
12517 2012-06-04 Steven Bosscher <steven@gcc.gnu.org>
12519 * c-common.c: Do not include output.h.
12520 * c-pragma.c: Likewise.
12522 2012-06-04 Steven Bosscher <steven@gcc.gnu.org>
12524 * error.c (dump_decl): Check pp_c_flag_gnu_v3.
12525 (decl_as_dwarf_string, lang_decl_dwarf_name): New functions.
12526 (lang_decl_name): Handle namespace decls.
12528 2012-05-31 Steven Bosscher <steven@gcc.gnu.org>
12530 * c-ada-spec.c: Do not include output.h.
12531 * c-semantics.c: Likewise.
12533 2012-05-29 Joseph Myers <joseph@codesourcery.com>
12535 * c-common.c: Fix typo.
12537 2012-05-29 Michael Matz <matz@suse.de>
12539 * c-common.h (c_expand_decl): Remove prototype.
12541 2012-05-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
12543 * c.opt (Wmissing-braces): Use LangEnabledBy(C ObjC,Wall).
12544 * c-opts.c (c_common_handle_option): Remove code handling
12545 warn_missing_braces.
12547 2012-05-28 Paolo Carlini <paolo.carlini@oracle.com>
12550 * c-opts.c (c_common_handle_option): For C++ -Wall doesn't enable
12553 2012-05-22 Dodji Seketeli <dodji@redhat.com>
12556 * c.opt (Wunused-local-typedefs): Use EnabledBy(Wunused).
12558 2012-05-17 Manuel López-Ibáñez <manu@gcc.gnu.org>
12560 * c.opt (--pedantic-errors,-pedantic-errors): Do not handle here.
12561 * c-opts.c (c_common_handle_option): Do not handle explicitly
12562 Wreturn-type, Wwrite-strings, warn_ecpp, and -pedantic-errors.
12564 2012-05-16 Dodji Seketeli <dodji@redhat.com>
12566 PR preprocessor/7263
12567 * c-lex.c (c_lex_with_flags): Pass a virtual location to the call
12568 to cpp_classify_number. For diagnostics, use the precise location
12569 instead of the global input_location.
12571 2012-05-15 Paolo Carlini <paolo.carlini@oracle.com>
12574 * c-common.c (shorten_compare): Check c_inhibit_evaluation_warnings.
12576 2012-05-14 Bernd Schmidt <bernds@codesourcery.com>
12578 * c-common.c (DEF_ATTR_STRING): Define and undefine as necessary.
12580 2012-05-14 Manuel López-Ibáñez <manu@gcc.gnu.org>
12583 * c.opt (Wc++0X-compat,Wdelete-non-virtual-dtor,Wjump-misses-init,
12584 Wreorder): Use LangEnabledBy.
12585 * c-opts.c (c_common_handle_option): Do not enable them
12586 explicitly. Call lang-specific generated functions.
12587 (c_common_post_options): Do not set them here.
12589 2012-05-13 Manuel López-Ibáñez <manu@gcc.gnu.org>
12591 * c.opt (Wclobbered,Wempty-body,Wignored-qualifiers,
12592 Wmissing-field-initializers,Wmissing-parameter-type,
12593 Wold-style-declaration,Woverride-init): Use EnabledBy.
12594 * c-opts.c (c_common_post_options): Do not set here explicitly.
12596 2012-05-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
12599 * c-opts.c (c_common_handle_option): Use handle_generated_option
12600 to enable sub-options.
12602 2012-05-10 Paolo Carlini <paolo.carlini@oracle.com>
12605 * c-common.c (warnings_for_convert_and_check): Use warning_at.
12607 2012-05-10 Richard Guenther <rguenther@suse.de>
12609 * c-common.c (c_sizeof_or_alignof_type): Remove assert and
12610 adjust commentary about TYPE_IS_SIZETYPE types.
12612 2012-05-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
12615 * c-common.c (warn_logical_operator): Check that argument of
12616 integer_zerop is not NULL.
12618 2012-05-05 Manuel López-Ibáñez <manu@gcc.gnu.org>
12621 * c-common.c (warn_logical_operator): Do not warn if either side
12622 is already true or false.
12624 2012-05-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
12627 * c-common.c (expr_original_type): New.
12628 (shorten_compare): Do not warn for enumeration types.
12630 2012-05-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
12632 * c.opt (fpermissive): Add Var(flag_permissive).
12634 2012-04-30 Marc Glisse <marc.glisse@inria.fr>
12637 * c-common.c (convert_vector_to_pointer_for_subscript): New function.
12638 * c-common.h (convert_vector_to_pointer_for_subscript): Declare it.
12640 2012-04-30 Dodji Seketeli <dodji@redhat.com>
12642 Add -Wvarargs option
12643 * c.opt (Wvarargs): Define new option.
12645 2012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
12647 * c-common.c (check_function_arguments): Replace
12648 Wmissing-format-attribute with Wsuggest-attribute=format.
12650 2012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
12652 * c.opt (Wsuggest-attribute=format): New. Alias of
12653 Wmissing-format-attribute.
12654 * c-format.c (decode_format_type): Replace
12655 Wmissing-format-attribute with Wsuggest-attribute=format.
12656 (check_function_format): Likewise.
12658 2012-04-27 Ollie Wild <aaw@google.com>
12660 * c-common.c: Add CPP_W_LITERAL_SUFFIX mapping.
12661 * c-opts.c (c_common_handle_option): Handle OPT_Wliteral_suffix.
12662 * c.opt: Add Wliteral-suffix.
12664 2012-04-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
12667 * c.opt (Wpedantic): New.
12668 (pedantic): Alias Wpedantic.
12669 * c-opts.c (c_common_handle_option): Replace -pedantic with -Wpedantic.
12670 (c_common_post_options): Likewise.
12671 (sanitize_cpp_opts): Likewise.
12672 * c-lex.c (interpret_float): Likewise.
12673 * c-format.c (check_format_types): Likewise.
12674 * c-common.c (pointer_int_sum): Likewise.
12675 (c_sizeof_or_alignof_type): Likewise.
12676 (c_add_case_label): Likewise.
12677 (c_do_switch_warnings): Likewise.
12678 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
12680 2012-04-15 Jason Merrill <jason@redhat.com>
12683 * c-format.c (CPLUSPLUS_STD_VER): C++11 inherits from C99.
12684 (C_STD_NAME): Distinguish between C++98 and C++11.
12686 2012-04-11 Eric Botcazou <ebotcazou@adacore.com>
12689 * c-common.h (uint16_type_node): Rename into...
12690 (c_uint16_type_node): ...this.
12691 * c-common.c (c_common_nodes_and_builtins): Adjust for above renaming.
12692 * c-cppbuiltin.c (builtin_define_stdint_macros): Likewise.
12694 2012-04-10 Manuel López-Ibáñez <manu@gcc.gnu.org>
12696 * c-common.c (warn_if_unused_value): Move definition to here.
12697 * c-common.h (warn_if_unused_value): Move declaration to here.
12699 2012-03-23 William Bader <williambader@hotmail.com>
12701 * c-lex.c (c_lex_with_flags): Avoid declarations after stmts.
12703 2012-03-20 Jason Merrill <jason@redhat.com>
12705 * c-common.h (enum cxx_dialect): Add cxx1y.
12706 * c-common.c (c_common_nodes_and_builtins): Use >= for cxx_dialect
12708 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
12709 * c-opts.c (c_common_post_options): Likewise.
12710 (set_std_cxx1y): New.
12711 (c_common_handle_option): Call it.
12712 * c.opt (-std=c++1y, -std=gnu++1y): New flags.
12714 2012-03-19 Paolo Carlini <paolo.carlini@oracle.com>
12717 * c.opt ([Wuseless-cast]): Add.
12719 2012-03-16 Richard Guenther <rguenther@suse.de>
12721 * c-pretty-print.c (pp_c_initializer_list): Adjust.
12723 2012-03-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
12726 * c.opt (ftemplate-backtrace-limit) Add.
12728 2012-03-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12730 * c-cppbuiltin.c (c_cpp_builtins): Remove #pragma extern_prefix
12732 * c-pragma.c (handle_pragma_extern_prefix): Remove.
12733 (init_pragma): Don't register extern_prefix.
12735 2012-03-12 Richard Guenther <rguenther@suse.de>
12737 * c-common.c (c_common_get_narrower): Use c_common_type_for_size.
12738 (builtin_type_for_size): Likewise.
12740 2012-02-13 Jakub Jelinek <jakub@redhat.com>
12743 * c-common.c (sync_resolve_params): Don't decide whether to convert
12744 or not based on TYPE_SIZE comparison, convert whenever arg_type
12745 is unsigned INTEGER_TYPE.
12747 2012-02-06 Paolo Carlini <paolo.carlini@oracle.com>
12750 * c.opt ([Wunused-local-typedefs]): Fix description.
12752 2012-01-24 Mike Stump <mikestump@comcast.net>
12754 * c-common.c (c_common_type_for_mode): Match signed/unsigned types
12757 2012-01-18 Richard Guenther <rguenther@suse.de>
12759 * c-opts.c (c_common_post_options): Reset LTO flags if
12760 we are about to generate a PCH.
12762 2012-01-17 Paolo Carlini <paolo.carlini@oracle.com>
12765 * c-pretty-print.c (pp_c_integer_constant): For unsigned constants
12766 use pp_unsigned_wide_integer.
12768 2012-01-10 Richard Guenther <rguenther@suse.de>
12770 PR middle-end/51806
12771 * c-opts.c (c_common_handle_option): Move -Werror handling
12772 to language independent code.
12774 2012-01-05 Richard Guenther <rguenther@suse.de>
12776 PR middle-end/51764
12777 * c.opt (Wmudflap, fmudflap, fmudflapth, fmudflapir): Move here
12780 2011-12-30 Paolo Carlini <paolo.carlini@oracle.com>
12783 * c-common.c (c_sizeof_or_alignof_type): In C++ allow for alignof
12784 of array types with an unknown bound.
12786 2011-12-20 Joseph Myers <joseph@codesourcery.com>
12788 * c-common.c (flag_isoc99): Update comment to refer to C11.
12789 (flag_isoc1x): Change to flag_isoc11.
12790 * c-common.h (flag_isoc99): Update comment to refer to C11.
12791 (flag_isoc1x): Change to flag_isoc11.
12792 * c-cppbuiltin.c (cpp_atomic_builtins): Change comment to refer to
12794 * c-opts.c (set_std_c1x): Change to set_std_c11.
12795 (c_common_handle_option): Handle OPT_std_c11 and OPT_std_gnu11.
12797 (set_std_c89, set_std_c99, set_std_c11): Use flag_isoc11.
12798 (set_std_c1): Use CLK_STDC11 and CLK_GNUC11.
12799 * c.opt (std=c1x): Change to std=c11. Document as non-draft
12801 (std=c1x, std=iso9899:2011): Add as aliases of std=c11.
12802 (std=gnu1x): Change to std=gnu11. Refer to non-draft standard.
12803 (std=gnu1x): Make alias of std=gnu11.
12805 2011-12-19 Jason Merrill <jason@redhat.com>
12808 * c-common.c (handle_transparent_union_attribute): Check the first
12809 field if the type is complete.
12811 2011-12-15 Jonathan Wakely <jwakely.gcc@gmail.com>
12814 * c-common.c (RID_IS_FINAL): Add.
12815 * c-common.h (RID_IS_FINAL): Add.
12817 2011-11-30 Iain Sandoe <iains@gcc.gnu.org>
12819 * c.opt (fgnu-runtime): Provide full description.
12820 (fnext-runtime): Likewise.
12821 * c-opts.c (OPT_fgnu_runtime, OPT_fnext_runtime) Remove.
12823 2011-11-28 Andrew MacLeod <amacleod@redhat.com>
12825 * c-cpp-builtin.c (cpp_atomic_builtins):New. Emit all atomic
12826 predefines in one place. Add LOCK_FREE predefines.
12827 (c_cpp_builtins): Move Legacy HAVE_SYNC predefines to
12830 2011-11-24 Andrew MacLeod <amacleod@redhat.com>
12833 * c-common.c (get_atomic_generic_size): Check for various error
12835 (resolve_overloaded_atomic_exchange,
12836 resolve_overloaded_atomic_compare_exchange,
12837 resolve_overloaded_atomic_load, resolve_overloaded_atomic_store): Return
12838 error_mark_node for error conditions.
12840 2011-11-08 Richard Guenther <rguenther@suse.de>
12842 PR middle-end/51010
12843 * c-pretty-print.c (pp_c_expression): Handle SSA_NAMEs.
12845 2011-11-07 Richard Henderson <rth@redhat.com>
12846 Aldy Hernandez <aldyh@redhat.com>
12847 Torvald Riegel <triegel@redhat.com>
12849 Merged from transactional-memory.
12851 * c-common.c (handle_tm_wrap_attribute,
12852 handle_tm_attribute, ignore_attribute, parse_tm_stmt_attr): New.
12853 (struct c_common_reswords): Added __transaction* keywords.
12854 (struct c_common_attribute_table): Added transaction* and tm_regparm
12856 * c-common.h: Added RID_TRANSACTION*. Added TM_ATTR* and TM_STMT*
12858 (parse_tm_stmt_attr, tm_attr_to_mask, tm_mask_to_attr,
12859 find_tm_attribute): Declare.
12861 2011-11-07 Jason Merrill <jason@redhat.com>
12864 * c-common.c, c-common.h: Revert yesterday's changes.
12866 2011-11-06 Jason Merrill <jason@redhat.com>
12869 * c-common.c (decl_has_visibility_attr): Split out from...
12870 (c_determine_visibility): ...here.
12871 * c-common.h: Declare it.
12873 2011-11-06 Joseph Myers <joseph@codesourcery.com>
12875 * c-common.c (c_common_reswords): Add _Alignas and _Alignof.
12876 (c_sizeof_or_alignof_type): Diagnose alignof applied to a function
12878 (check_user_alignment): New. Split out of
12879 handle_aligned_attribute. Disallow integer constants with
12880 noninteger types. Conditionally allow zero.
12881 (handle_aligned_attribute): Use check_user_alignment.
12882 * c-common.h (RID_ALIGNAS, check_user_alignment): New.
12884 2011-11-06 Andrew MacLeod <amacleod@redhat.com>
12885 Richard Henderson <rth@redhat.com>
12887 Merged from cxx-mem-model.
12889 * c-cppbuiltin.c (c_cpp_builtins): Test both atomic and sync patterns.
12890 * c-common.c (sync_resolve_params, sync_resolve_return): Only tweak
12891 parameters that are the same type size.
12892 (get_atomic_generic_size): New. Find size of generic
12893 atomic function parameters and do typechecking.
12894 (add_atomic_size_parameter): New. Insert size into parameter list.
12895 (resolve_overloaded_atomic_exchange): Restructure __atomic_exchange to
12896 either __atomic_exchange_n or external library call.
12897 (resolve_overloaded_atomic_compare_exchange): Restructure
12898 __atomic_compare_exchange to either _n variant or external library call.
12899 (resolve_overloaded_atomic_load): Restructure __atomic_load to either
12900 __atomic_load_n or an external library call.
12901 (resolve_overloaded_atomic_store): Restructure __atomic_store to either
12902 __atomic_store_n or an external library call.
12903 (resolve_overloaded_builtin): Handle new __atomic builtins.
12905 2011-11-04 Eric Botcazou <ebotcazou@adacore.com>
12908 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Call fold_offsetof_1.
12909 (fold_offsetof_1): Make global. Remove STOP_REF argument and adjust.
12910 <INDIRECT_REF>: Return the argument.
12911 <ARRAY_REF>: Remove special code for negative offset.
12912 Call fold_build_pointer_plus instead of size_binop.
12913 (fold_offsetof): Remove STOP_REF argument and adjust.
12914 * c-common.h (fold_offsetof_1): Declare.
12915 (fold_offsetof): Remove STOP_REF argument.
12917 2011-11-02 Paolo Carlini <paolo.carlini@oracle.com>
12920 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
12921 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
12922 Wnarrowing for C++0x and C++98.
12923 * c.opt ([Wnarrowing]): Update.
12925 2011-11-01 Paolo Carlini <paolo.carlini@oracle.com>
12928 * c.opt: Add Wzero-as-null-pointer-constant.
12930 2011-10-31 Jason Merrill <jason@redhat.com>
12932 * c.opt (-fdeduce-init-list): Off by default.
12935 * c-common.h (cxx_dialect): Add cxx11 and cxx03.
12936 * c.opt: Add -std=c++11, -std=gnu++11, -std=gnu++03,
12937 and -Wc++11-compat.
12938 * c-opts.c (set_std_cxx11): Rename from set_std_cxx0x.
12940 2011-10-27 Roberto Agostino Vitillo <ravitillo@lbl.gov>
12943 * c.opt (fvisibility-inlines-hidden): Description change.
12945 2011-10-26 Ed Smith-Rowland <3dw4rd@verizon.net>
12947 Implement C++11 user-defined literals.
12948 * c-common.c (build_userdef_literal): New.
12949 * c-common.def: New tree code.
12950 * c-common.h (tree_userdef_literal): New tree struct and accessors.
12951 * c-lex.c (interpret_float): Add suffix parm.
12952 (c_lex_with_flags): Build literal tokens.
12954 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
12958 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
12961 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
12962 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
12963 Wnarrowing for C++0x and C++98.
12964 * c.opt ([Wnarrowing]): Update.
12966 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
12969 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
12970 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
12971 Wnarrowing for C++0x and C++98.
12972 * c.opt ([Wnarrowing]): Update.
12974 2011-10-21 Paolo Carlini <paolo.carlini@oracle.com>
12977 * c-common.c (conversion_warning): Remove code looking for
12978 artificial operands.
12980 2011-10-18 Dodji Seketeli <dodji@redhat.com>
12983 * c-lex.c (fe_file_change): Use LINEMAP_SYSP when
12984 !NO_IMPLICIT_EXTERN_C.
12986 2011-10-17 Michael Spertus <mike_spertus@symantec.com>
12988 * c-common.c (c_common_reswords): Add __bases,
12990 * c-common.h: Add RID_BASES and RID_DIRECT_BASES.
12992 2011-10-17 Paolo Carlini <paolo.carlini@oracle.com>
12995 * c.opt ([Wnonnull]): Add C++ and Objective-C++.
12997 2011-10-15 Tom Tromey <tromey@redhat.com>
12998 Dodji Seketeli <dodji@redhat.com>
13000 * c.opt (fdebug-cpp): New option.
13001 * c-opts.c (c_common_handle_option): Handle the option.
13002 * c-ppoutput.c (maybe_print_line_1): New static function. Takes an
13003 output stream in parameter. Factorized from ...
13004 (maybe_print_line): ... this. Dump location debug information when
13005 -fdebug-cpp is in effect.
13006 (print_line_1): New static function. Takes an output stream in
13007 parameter. Factorized from ...
13008 (print_line): ... here. Dump location information when -fdebug-cpp
13010 (scan_translation_unit): Dump location information when
13011 -fdebug-cpp is in effect.
13013 2011-10-15 Tom Tromey <tromey@redhat.com>
13014 Dodji Seketeli <dodji@redhat.com>
13016 * c.opt (ftrack-macro-expansion): New option. Handle it with and
13018 * c-opts.c (c_common_handle_option)<case
13019 OPT_ftrack_macro_expansion_, case OPT_ftrack_macro_expansion>: New
13020 cases. Handle -ftrack-macro-expansion with and without argument.
13022 2011-10-15 Tom Tromey <tromey@redhat.com>
13023 Dodji Seketeli <dodji@redhat.com>
13025 * c-ppoutput.c (scan_translation_unit, maybe_print_line)
13026 (print_line, cb_define, do_line_change): Adjust to avoid touching
13027 the internals of struct line_map. Use the public API instead.
13028 * c-pch.c (c_common_read_pch): Likewise.
13029 * c-lex.c (fe_file_change): Likewise.
13031 2011-10-14 Paolo Carlini <paolo.carlini@oracle.com>
13034 * c.opt ([Wformat-zero-length]): Add C++ and Objective-C++.
13036 2011-10-11 Paolo Carlini <paolo.carlini@oracle.com>
13039 * c-pretty-print.c (pp_c_floating_constant): Output
13040 max_digits10 (in the ISO C++ WG N1822 sense) decimal digits.
13042 2011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
13044 * c-common.c (def_builtin_1): Delete old interface with two
13045 parallel arrays to hold standard builtin declarations, and replace
13046 it with a function based interface that can support creating
13047 builtins on the fly in the future. Change all uses, and poison
13048 the old names. Make sure 0 is not a legitimate builtin index.
13049 * c-omp.c (c_finish_omp_barrier): Ditto.
13050 (c_finish_omp_taskwait): Ditto.
13051 (c_finish_omp_flush): Ditto.
13053 2011-10-11 Tristan Gingold <gingold@adacore.com>
13055 * c.opt: (fallow-parameterless-variadic-functions): New.
13057 2011-09-08 Dodji Seketeli <dodji@redhat.com>
13059 PR c++/33255 - Support -Wunused-local-typedefs warning
13060 * c-common.h (struct c_language_function::local_typedefs): New
13062 (record_locally_defined_typedef, maybe_record_typedef_use)
13063 (maybe_warn_unused_local_typedefs): Declare new functions.
13064 * c-common.c (record_locally_defined_typedef)
13065 (maybe_record_typedef_use)
13066 (maybe_warn_unused_local_typedefs): Define new functions.
13067 * c.opt: Declare new -Wunused-local-typedefs flag.
13069 2011-09-06 Eric Botcazou <ebotcazou@adacore.com>
13071 PR middle-end/50266
13072 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Fold offsetof-like
13075 2011-09-05 Richard Guenther <rguenther@suse.de>
13077 * c-common.c (complete_array_type): Use ssize_int (-1) instead
13078 of integer_minus_one_node for empty array upper bounds.
13080 2011-08-28 Dodji Seketeli <dodji@redhat.com>
13082 * c-pch.c (c_common_read_pch): Call linemap_add with LC_ENTER as
13083 it's the first time it's being called on this main TU.
13085 2011-08-24 Richard Guenther <rguenther@suse.de>
13088 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Fix conditional.
13090 2011-08-22 Gabriel Charette <gchare@google.com>
13092 * c-opts.c (c_finish_options): Force BUILTINS_LOCATION for tokens
13093 defined in cpp_init_builtins and c_cpp_builtins.
13095 2011-08-19 Joseph Myers <joseph@codesourcery.com>
13097 * c-common.c (c_common_reswords): Add __builtin_complex.
13098 * c-common.h (RID_BUILTIN_COMPLEX): New.
13100 2011-08-18 Joseph Myers <joseph@codesourcery.com>
13102 * c-common.c (c_common_reswords): Add _Noreturn.
13103 (keyword_is_function_specifier): Handle RID_NORETURN.
13104 * c-common.h (RID_NORETURN): New.
13106 2011-08-10 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
13108 * c-common.c (unsafe_conversion_p): New function. Check if it is
13109 unsafe to convert an expression to the type.
13110 (conversion_warning): Adjust, use unsafe_conversion_p.
13111 * c-common.h (unsafe_conversion_p): New function declaration.
13113 2011-08-02 Jakub Jelinek <jakub@redhat.com>
13115 * c-common.h (c_finish_omp_atomic): Adjust prototype.
13116 (c_finish_omp_taskyield): New prototype.
13117 * c-omp.c (c_finish_omp_atomic): Add OPCODE, V, LHS1 and RHS1
13118 arguments. Handle OMP_ATOMIC_READ, OMP_ATOMIC_CAPTURE_OLD and
13119 OMP_ATOMIC_CAPTURE_NEW in addition to OMP_ATOMIC. If LHS1
13120 or RHS1 have side-effects, evaluate those too in the right spot,
13121 if it is a decl and LHS is also a decl, error out if they
13123 (c_finish_omp_taskyield): New function.
13124 * c-cppbuiltin.c (c_cpp_builtins): Change _OPENMP to 201107.
13125 * c-pragma.c (omp_pragmas): Add taskyield.
13126 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKYIELD.
13127 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_FINAL and
13128 PRAGMA_OMP_CLAUSE_MERGEABLE.
13130 2011-07-25 Dodji Seketeli <dodji@redhat.com>
13132 * c-common.h (set_underlying_type): Remove parm name from
13135 2011-07-25 Romain Geissler <romain.geissler@gmail.com>
13137 * c-pretty-print.h: Search c-common.h in c-family.
13139 2011-07-22 Jason Merrill <jason@redhat.com>
13142 * c.opt (Wnarrowing): New.
13145 * c-common.h: Declare c_linkage_bindings.
13146 * c-pragma.c (handle_pragma_redefine_extname): Use it.
13149 * c-opts.c (set_std_cxx0x): Set flag_isoc94 and flag_isoc99.
13150 * c-pretty-print.c (pp_c_cv_qualifiers): Check c_dialect_cxx as well
13151 as flag_isoc99 for 'restrict'.
13152 (pp_c_specifier_qualifier_list): Likewise for _Complex.
13154 2011-07-21 Ian Lance Taylor <iant@google.com>
13156 PR middle-end/49705
13157 * c-common.c (c_disable_warnings): New static function.
13158 (c_enable_warnings): New static function.
13159 (c_fully_fold_internal): Change local unused_p to bool. Call
13160 c_disable_warnings and c_enable_warnings rather than change
13161 c_inhibit_evaluation_warnings.
13163 2011-07-20 Jason Merrill <jason@redhat.com>
13165 PR c++/6709 (DR 743)
13166 PR c++/42603 (DR 950)
13167 * c-common.h (CPP_KEYWORD, CPP_TEMPLATE_ID): Move from cp/parser.h.
13168 (CPP_NESTED_NAME_SPECIFIER, N_CP_TTYPES): Likewise.
13169 (CPP_DECLTYPE): New.
13170 * c-common.c (c_parse_error): Handle CPP_DECLTYPE.
13172 2011-07-19 Richard Guenther <rguenther@suse.de>
13174 * c-common.c (pointer_int_sum): Use fold_build_pointer_plus.
13175 * c-omp.c (c_finish_omp_for): Likewise.
13177 2011-07-12 Eric Botcazou <ebotcazou@adacore.com>
13179 * c-ada-spec.c (dump_nested_types): Put semi-colon after empty loop
13180 body on the next line.
13182 2011-07-08 Jason Merrill <jason@redhat.com>
13185 * c-omp.c (check_omp_for_incr_expr): Handle preevaluation.
13188 * c-common.c (c_apply_type_quals_to_decl): Don't check
13189 TYPE_NEEDS_CONSTRUCTING.
13191 2011-07-06 Richard Guenther <rguenther@suse.de>
13193 * c-common.c (c_common_nodes_and_builtins):
13194 Merge calls to build_common_tree_nodes and build_common_tree_nodes_2.
13196 2011-07-05 Richard Guenther <rguenther@suse.de>
13198 * c-common.c (c_common_nodes_and_builtins): Build all common
13201 2011-06-27 Jakub Jelinek <jakub@redhat.com>
13203 * c-common.h (c_tree_chain_next): New static inline function.
13205 * c-common.c (check_builtin_function_arguments): Handle
13206 BUILT_IN_ASSUME_ALIGNED.
13208 2011-06-21 Andrew MacLeod <amacleod@redhat.com>
13210 * c-common.c: Add sync_ or SYNC__ to builtin names.
13211 * c-omp.c: Add sync_ or SYNC__ to builtin names.
13213 2011-06-20 Pierre Vittet <piervit@pvittet.com>
13215 * c-pragma.h (pragma_handler_1arg, pragma_handler_2arg): New
13217 (gen_pragma_handler): New union.
13218 (internal_pragma_handler): New type.
13219 (c_register_pragma_with_data)
13220 (c_register_pragma_with_expansion_and_data): New functions.
13222 * c-pragma.c (registered_pragmas, c_register_pragma_1)
13223 (c_register_pragma, c_register_pragma_with_expansion)
13224 (c_invoke_pragma_handler): Changed to work with
13225 internal_pragma_handler.
13226 (c_register_pragma_with_data)
13227 (c_register_pragma_with_expansion_and_data): New functions.
13229 2011-06-14 Joseph Myers <joseph@codesourcery.com>
13231 * c-common.c: Include common/common-target.h.
13232 (handle_section_attribute): Use
13233 targetm_common.have_named_sections.
13234 * c-cppbuiltin.c: Include common/common-target.h.
13235 (c_cpp_builtins): Use targetm_common.except_unwind_info.
13237 2011-06-10 Richard Guenther <rguenther@suse.de>
13239 * c-pretty-print.c (pp_c_type_specifier): Use pp_c_identifier
13240 to print a IDENTIFIER_NODE.
13242 2011-06-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
13243 Joseph Myers <joseph@codesourcery.com>
13245 * c.opt (fbuilding-libgcc): New option.
13246 * c-cppbuiltin.c (c_cpp_builtins): Define
13247 __LIBGCC_TRAMPOLINE_SIZE__ if flag_building_libgcc.
13249 2011-06-07 Jason Merrill <jason@redhat.com>
13251 * c-common.c (max_tinst_depth): Lower default to 900.
13253 * c-format.c (gcc_cxxdiag_char_table): Add 'S' format.
13255 2011-06-07 Richard Guenther <rguenther@suse.de>
13257 * c-common.c (c_common_nodes_and_builtins): Do not set
13258 size_type_node or call set_sizetype.
13260 2011-06-07 Dodji Seketeli <dodji@redhat.com>
13263 * c-pretty-print.c (pp_c_integer_constant): Consider the canonical
13264 type when using pointer comparison to compare types.
13266 2011-06-02 Jonathan Wakely <jwakely.gcc@gmail.com>
13268 * c.opt: Add -Wdelete-non-virtual-dtor.
13269 * c-opts.c (c_common_handle_option): Include it in -Wall.
13271 2011-05-30 Nathan Froyd <froydnj@gcc.gnu.org>
13276 2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
13278 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
13281 2011-05-27 Jakub Jelinek <jakub@redhat.com>
13284 * c-common.c (c_common_truthvalue_conversion) <case COND_EXPR>: For
13285 C++ don't call c_common_truthvalue_conversion on void type arms.
13287 2011-05-27 Nathan Froyd <froydnj@codesourcery.com>
13289 * c-common.h (struct stmt_tree_s) [x_cur_stmt_list]: Change to a VEC.
13290 (stmt_list_stack): Define.
13291 (cur_stmt_list): Adjust for new type of x_cur_stmt_list.
13292 * c-semantics.c (push_stmt_list, pop_stmt_list): Likewise.
13294 2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
13296 * c-common.c (warning_candidate_p): Check for BLOCKs.
13298 2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
13300 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
13303 2011-05-25 Jakub Jelinek <jakub@redhat.com>
13305 * c-common.c (def_fn_type): Remove extra va_end.
13307 2011-05-23 Jason Merrill <jason@redhat.com>
13310 * c-common.c (c_common_get_narrower): New.
13311 (shorten_binary_op, shorten_compare, warn_for_sign_compare): Use it.
13313 2011-05-23 Nathan Froyd <froydnj@codesourcery.com>
13315 * c-common.h (check_function_arguments): Tweak prototype of
13316 check_function_arguments.
13317 * c-common.c (check_function_arguments): Likewise. Adjust
13318 calls to check_function_nonnull, check_function_format, and
13319 check_function_sentinel.
13320 (check_function_sentinel): Take a FUNCTION_TYPE rather than
13321 separate attributes and typelist arguments. Use
13322 FOREACH_FUNCTION_ARGS to iterate over argument types.
13324 2011-05-15 Paolo Carlini <paolo.carlini@oracle.com>
13326 * c-common.c (c_common_reswords): Reorder.
13327 * c-common.h (rid): Likewise.
13329 2011-05-10 Nathan Froyd <froydnj@codesourcery.com>
13331 * c-common.c (def_fn_type): Don't call build_function_type, call
13332 build_function_type_array or build_varargs_function_type_array
13334 (c_common_nodes_and_builtins): Likewise.
13336 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
13338 * c-common.c (c_add_case_label): Omit the loc argument to
13340 * c-common.h (build_case_label): Remove.
13341 * c-semantics.c (build_case_label): Remove.
13343 2011-05-05 Joseph Myers <joseph@codesourcery.com>
13345 * c-objc.h (objc_start_method_definition): Update prototype.
13346 * stub-objc.c (objc_start_method_definition): Add extra parameter.
13348 2011-05-04 Nathan Froyd <froydnj@codesourcery.com>
13350 * c-common.c (check_main_parameter_types): Reindent. Don't use
13351 TYPE_ARG_TYPES directly.
13352 (handle_nonnull_attribute): Likewise.
13353 (sync_resolve_params): Likewise.
13354 * c-format.c (handle_format_arg_attribute): Likewise. Adjust call
13355 to check_format_string.
13356 (handle_format_attribute): Likewise.
13357 (check_format_string): Take a function type to examine instead of
13358 a type list. Use a function_arg_iterator to step through argument
13361 2011-05-04 Richard Guenther <rguenther@suse.de>
13363 * c-common.c (fix_string_type): Use size_int for index type bounds.
13364 (start_fname_decls): Do not pass NULL to build_int_cst.
13365 (c_init_attributes): Likewise.
13366 * c-lex.c (c_lex_with_flags): Likewise.
13368 2011-04-27 Jason Merrill <jason@redhat.com>
13370 * c-common.c (make_tree_vector_from_list): New.
13371 * c-common.h: Declare it.
13373 2011-04-26 Richard Guenther <rguenther@suse.de>
13375 PR preprocessor/48248
13376 * c-ppoutput.c (maybe_print_line): Always optimize newlines
13377 for output size with -P.
13379 2011-04-25 Paolo Carlini <paolo.carlini@oracle.com>
13381 * c-common.c (struct c_common_resword): Add __underlying_type.
13382 * c-common.h (enum rid): Add RID_UNDERLYING_TYPE.
13384 2011-04-20 Jim Meyering <meyering@redhat.com>
13386 * c-format.c (init_dollar_format_checking): Remove useless
13389 2011-04-15 Nicola Pero <nicola.pero@meta-innovation.com>
13391 * c-objc.h (objc_get_interface_ivars): Removed.
13392 (objc_detect_field_duplicates): New.
13393 * stub-objc.c: Likewise.
13395 2011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
13397 * stub-objc.c (objc_declare_protocols): Renamed to
13398 objc_declare_protocol.
13399 * c-objc.h: Likewise.
13401 2011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
13403 * stub-objc.c (objc_declare_class): Updated argument name.
13405 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
13407 * c-common.h (c_common_init_ts): Declare.
13408 * c-common.c (c_common_init_ts): Define.
13410 2011-04-12 Nicola Pero <nicola.pero@meta-innovation.com>
13412 * c-objc.h (objc_build_message_expr): Updated prototype.
13413 * stub-objc.c (objc_build_message_expr): Likewise.
13415 2011-04-12 Martin Jambor <mjambor@suse.cz>
13417 * c-gimplify.c (c_genericize): Call cgraph_get_create_node instead
13420 2011-04-11 Richard Guenther <rguenther@suse.de>
13422 * c-common.c (complete_array_type): Build a range type of
13425 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
13427 * c-common.c (handle_sentinel_attribute): Don't use TYPE_ARG_TYPES.
13428 (handle_type_generic_attribute): Likewise.
13430 2011-04-07 Jason Merrill <jason@redhat.com>
13433 * c-common.c (c_common_truthvalue_conversion): Don't ignore
13434 conversion from C++0x scoped enum.
13436 2011-04-06 Joseph Myers <joseph@codesourcery.com>
13438 * c-target-def.h: New file.
13439 * c-target.def: New file.
13440 * c-target.h: New file.
13441 * c-common.c (targetcm): Don't define here.
13442 * c-common.h (default_handle_c_option): Declare.
13443 * c-format.c: Include c-target.h instead of target.h.
13444 * c-opts.c: Include c-target.h instead of target.h. Explicitly
13446 (default_handle_c_option): Move from targhooks.c.
13448 2011-03-29 Jakub Jelinek <jakub@redhat.com>
13450 PR preprocessor/48248
13451 * c-ppoutput.c (print): Add src_file field.
13452 (init_pp_output): Initialize it.
13453 (maybe_print_line): Don't optimize by adding up to 8 newlines
13454 if map->to_file and print.src_file are different file.
13455 (print_line): Update print.src_file.
13457 2011-03-25 Kai Tietz <ktietz@redhat.com>
13459 * c-ada-spec.c (compare_comment): Use filename_cmp
13460 instead of strcmp for filename.
13462 2011-03-25 Jeff Law <law@redhat.com>
13464 * c-common.c (def_fn_type): Add missing va_end.
13466 2011-03-25 Jason Merrill <jason@redhat.com>
13468 * c.opt: Add -std=c++03.
13470 2011-03-22 Eric Botcazou <ebotcazou@adacore.com>
13472 * c-ada-spec.c (dump_ada_template): Skip non-class instances.
13474 2011-03-17 Kai Tietz <ktietz@redhat.com>
13477 * c-pretty-print.c (pp_c_specifier_qualifier_list):
13478 Display allowed attributes for function pointer types.
13479 (pp_c_attributes_display): New function to display
13480 attributes having affects_type_identity flag set to true.
13481 * c-pretty-print.h (pp_c_attributes_display): New prototype.
13483 * c-common.c (c_common_attribute_table):
13485 (c_common_format_attribute_table): Likewise.
13487 2011-03-18 Jason Merrill <jason@redhat.com>
13489 * c.opt (fconstexpr-depth): Add Var(max_constexpr_depth).
13490 * c-common.h: Don't declare it here.
13491 * c-common.c: Or define it here.
13492 * c-opts.c (c_common_handle_option): Or set it here.
13495 * c-common.c (handle_transparent_union_attribute): Don't
13496 make a duplicate type in C++.
13498 2011-03-15 Jason Merrill <jason@redhat.com>
13500 * c-common.c (max_constexpr_depth): New.
13501 * c-common.h: Declare it.
13502 * c-opts.c (c_common_handle_option): Set it.
13503 * c.opt (fconstexpr-depth): New option.
13505 2011-03-11 Jason Merrill <jason@redhat.com>
13507 * c-common.c (attribute_takes_identifier_p): Add missing const.
13510 * c-common.c (attribute_takes_identifier_p): Assume that an
13511 unknown attribute takes an identifier.
13513 2011-03-07 Nathan Froyd <froydnj@codesourcery.com>
13516 * c-common.c (c_type_hash): Call list_length instead of iterating
13517 through DECL_CHAIN. Rename 'i' to 'n_elements'.
13519 2011-02-19 Jakub Jelinek <jakub@redhat.com>
13522 * c-common.c (c_fully_fold_internal): Handle VIEW_CONVERT_EXPR.
13524 2011-02-17 Iain Sandoe <iains@gcc.gnu.org>
13526 * c.opt (fobjc-abi-version=) New.
13527 (fobjc-nilcheck): New.
13529 2011-02-03 Nathan Froyd <froydnj@codesourcery.com>
13532 * c-common.h (keyword_is_decl_specifier): Declare.
13533 * c-common.c (keyword_is_decl_specifier): Define.
13534 (keyword_is_function_specifier): New function.
13536 2011-01-26 Jakub Jelinek <jakub@redhat.com>
13539 * c-lex.c (interpret_float): If CPP_N_IMAGINARY, ensure
13540 EXCESS_PRECISION_EXPR is created with COMPLEX_TYPE instead of
13543 2011-01-26 Arnaud Charlet <charlet@adacore.com>
13545 * c-ada-spec.c (dump_generic_ada_node): Avoid dereferencing null type.
13547 2011-01-26 Jakub Jelinek <jakub@redhat.com>
13550 * c-opts.c (c_common_post_options): Call c_common_no_more_pch
13551 after init_c_lex if pch_file is set.
13553 2011-01-26 Dave Korn <dave.korn.cygwin@gmail.com>
13556 * c.opt (-fkeep-inline-dllexport): New switch.
13558 2011-01-12 Richard Guenther <rguenther@suse.de>
13560 PR middle-end/32511
13561 * c-common.c (handle_weak_attribute): Warn instead of error
13562 on declaring an inline function weak.
13564 2011-01-05 Tom Tromey <tromey@redhat.com>
13566 * c-common.h (lvalue_error): Update.
13567 * c-common.c (lvalue_error): Add 'loc' argument. Call error_at,
13570 2010-12-29 Nicola Pero <nicola.pero@meta-innovation.com>
13573 * c-objc.h (objc_finish_message_expr): Added argument to
13576 2010-12-22 Nathan Froyd <froydnj@codesourcery.com>
13578 * c-common.c (handle_nonnull_attribute, handle_sentinel_attribute):
13581 2010-12-18 Nicola Pero <nicola.pero@meta-innovation.com>
13583 * c-objc.h (objc_maybe_warn_exceptions): New.
13584 * stub-objc.c (objc_maybe_warn_exceptions): New.
13586 2010-12-10 Nathan Froyd <froydnj@codesourcery.com>
13588 * c-common.h (readonly_error): Declare.
13589 * c-common.c (readonly_error): Define.
13591 2010-12-09 Nathan Froyd <froydnj@codesourcery.com>
13593 * c-common.h (invalid_indirection_error): Declare.
13594 * c-common.c (invalid_indirection_error): Define.
13596 2010-12-03 Richard Guenther <rguenther@suse.de>
13599 * c-pretty-print.c (pp_c_postfix_expression): Handle MEM_REF.
13600 (pp_c_unary_expression): Likewise.
13601 (pp_c_expression): Likewise.
13603 2010-11-30 Nicola Pero <nicola.pero@meta-innovation.com>
13605 * c-common.h (objc_finish_function): New.
13606 (objc_non_volatilized_type): Removed.
13607 (objc_type_quals_match): Removed.
13608 * stub-objc.c (objc_finish_function): New.
13609 (objc_non_volatilized_type): Removed.
13610 (objc_type_quals_match): Removed.
13612 2010-11-30 Joseph Myers <joseph@codesourcery.com>
13614 * c-common.h (parse_optimize_options): Declare.
13615 * c-cppbuiltin.c, c-format.c, c-gimplify.c, c-lex.c, c-omp.c,
13616 c-pch.c, c-pragma.c, c-semantics.c: Don't include toplev.h.
13618 2010-11-29 Joseph Myers <joseph@codesourcery.com>
13620 * c-opts.c (check_deps_environment_vars): Use getenv instead of
13622 * c-pch.c (O_BINARY): Don't define here.
13623 * c-pragma.h: Include "cpplib.h" instead of <cpplib.h>.
13625 2010-11-25 Joseph Myers <joseph@codesourcery.com>
13627 * c-cppbuiltin.c (c_cpp_builtins): Pass &global_options to
13628 targetm.except_unwind_info.
13630 2010-11-23 Joseph Myers <joseph@codesourcery.com>
13632 * c-opts.c (c_common_handle_option): Pass location to
13633 set_struct_debug_option.
13635 2010-11-23 Joseph Myers <joseph@codesourcery.com>
13637 * c-common.c (visibility_options): Move from ../opts.c.
13638 * c-common.h (struct visibility_flags, visibility_options):
13640 * c-opts.c (finish_options): Rename to c_finish_options.
13641 (c_common_init): Update call to finish_options.
13643 2010-11-22 Nicola Pero <nicola.pero@meta-innovation.com>
13646 * c-lex.c (lex_string): Check that each string in an Objective-C
13647 string concat sequence starts with either one or zero '@', and
13648 that there are no spurious '@' signs at the end.
13650 2010-11-20 Joseph Myers <joseph@codesourcery.com>
13652 * c-pragma.c: Remove conditionals on HANDLE_PRAGMA_PACK,
13653 HANDLE_PRAGMA_PACK_PUSH_POP, HANDLE_PRAGMA_WEAK and
13654 HANDLE_PRAGMA_VISIBILITY.
13655 * c-pragma.h (HANDLE_PRAGMA_WEAK, HANDLE_PRAGMA_PACK,
13656 HANDLE_PRAGMA_VISIBILITY): Don't define.
13657 (HANDLE_SYSV_PRAGMA, HANDLE_PRAGMA_PACK_PUSH_POP): Don't test.
13659 2010-11-20 Nathan Froyd <froydnj@codesourcery.com>
13664 * c-common.h (keyword_begins_type_specifier): Declare.
13665 (keyword_is_storage_class_specifier): Declare.
13666 (keyword_is_type_qualifier): Declare.
13667 * c-common.c (keyword_begins_type_specifier): New function.
13668 (keyword_is_storage_class_specifier): New function.
13669 (keyword_is_type_qualifier): Declare.
13671 2010-11-19 Joseph Myers <joseph@codesourcery.com>
13674 * c-common.c (in_late_binary_op): Define.
13675 (c_common_truthvalue_conversion): Check in_late_binary_op before
13676 calling c_save_expr.
13677 * c-common.h (in_late_binary_op): Declare.
13679 2010-11-19 Joseph Myers <joseph@codesourcery.com>
13681 * c-opts.c (c_common_handle_option): Update calls to
13682 set_struct_debug_option.
13684 2010-11-19 Nicola Pero <nicola.pero@meta-innovation.com>
13686 * c-common.h (objc_declare_protocols): Added additional argument.
13687 * stub-objc.c (objc_declare_protocol): Same change.
13689 2010-11-18 Nathan Froyd <froydnj@codesourcery.com>
13692 * c-common.h (build_real_imag_expr): Declare.
13693 * c-semantics.c (build_real_imag_expr): Define.
13695 2010-11-17 Joseph Myers <joseph@codesourcery.com>
13697 * c-opts.c (c_common_parse_file): Take no arguments.
13698 * c-common.h (c_common_parse_file): Update prototype.
13700 2010-11-16 Jakub Jelinek <jakub@redhat.com>
13703 * c-common.c (warning_candidate_p): Don't track non-const calls
13706 2010-11-15 Ian Lance Taylor <iant@google.com>
13708 * c-lex.c (init_c_lex): Set macro debug callbacks if
13709 flag_dump_go_spec is set.
13711 2010-11-15 Nicola Pero <nicola.pero@meta-innovation.com>
13713 * c-common.h (objc_build_incr_expr_for_property_ref): New.
13714 * stub-objc.c (objc_build_incr_expr_for_property_ref): New.
13716 2010-11-15 Nathan Froyd <froydnj@codesourcery.com>
13718 PR preprocessor/45038
13719 * c-cppbuiltin.c (c_cpp_builtins): Use different format for C++
13722 2010-11-12 Joseph Myers <joseph@codesourcery.com>
13724 * c-common.h (c_family_lang_mask): Declare.
13725 * c-opts.c (c_family_lang_mask): Make extern.
13726 * c-pragma.c (handle_pragma_diagnostic): Use
13727 control_warning_option.
13729 2010-11-12 Joseph Myers <joseph@codesourcery.com>
13731 * c-common.c (parse_optimize_options): Update call to
13733 * c-common.h (c_common_handle_option): Update prototype.
13734 * c-opts.c (c_common_handle_option): Take location_t parameter and
13735 pass it to other functions.
13737 2010-11-11 Joseph Myers <joseph@codesourcery.com>
13739 * c-opts.c (warning_as_error_callback): Remove.
13740 (c_common_initialize_diagnostics): Don't call
13741 register_warning_as_error_callback.
13742 (c_common_handle_option): Handle -Werror=normalized= here.
13744 2010-11-10 Joseph Myers <joseph@codesourcery.com>
13746 * c-common.c (handle_mode_attribute): Use %' and word "signedness"
13748 * c-opts.c (c_common_parse_file): Start diagnostics with lowercase
13750 * c-pragma.c (handle_pragma_target, handle_pragma_optimize):
13751 Remove trailing '.' from diagnostics.
13752 * c.opt (Wwrite-strings_: Avoid '`' in help text.
13754 2010-11-10 Joseph Myers <joseph@codesourcery.com>
13756 * c-common.c (parse_optimize_options): Pass global_dc to
13758 * c-opts.c (c_common_handle_option): Pass &global_options to
13759 set_Wstrict_aliasing.
13760 * c.opt (v): Don't mark Common or document here.
13762 2010-11-06 Iain Sandoe <iains@gcc.gnu.org>
13765 * c-format.c (format_type): New type gcc_objc_string_format_type.
13766 (valid_stringptr_type_p): New.
13767 (handle_format_arg_attribute): Use valid_stringptr_type_p ().
13768 (check_format_string): Pass expected type, use
13769 valid_stringptr_type_p (), check that the format string types are
13770 consistent with the format specification.
13771 (decode_format_attr): Warn if NSString is used outside objective-c.
13772 (format_types_orig): Add NSString.
13773 (format_name): New.
13774 (format_flags): New.
13775 (check_format_arg): Handle format strings requiring an external parser.
13776 first_target_format_type: New variable.
13777 (handle_format_attribute): Set up first_target_format_type, pass the
13778 expected format arg string type to check_format_string().
13779 * c-common.h (FMT_FLAG_PARSE_ARG_CONVERT_EXTERNAL): New flag.
13780 * stub-objc.c (objc_string_ref_type_p): New.
13781 (objc_check_format_arg): New.
13783 2010-11-04 Nicola Pero <nicola.pero@meta-innovation.com>
13785 Fixed using the Objective-C 2.0 dot-syntax with class names.
13786 * c-common.h (objc_build_class_component_ref): New.
13787 * stub-objc.c (objc_build_class_component_ref): New.
13789 2010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
13791 * c.opt (Wproperty-assign-default): New option.
13793 2010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
13795 Implemented -fobjc-std=objc1 flag.
13796 * c.opt (fobjc-std=objc1): New option.
13798 2010-11-01 Nicola Pero <nicola.pero@meta-innovation.com>
13800 Implemented format and noreturn attributes for Objective-C methods.
13801 * c-common.c (handle_noreturn_attribute): Recognize 'noreturn'
13802 attribute for Objective-C methods.
13804 2010-10-31 Jason Merrill <jason@redhat.com>
13806 * c-common.c (conversion_warning, warn_for_collisions_1): Use
13809 2010-10-30 Nicola Pero <nicola.pero@meta-innovation.com>
13811 Implemented Objective-C 2.0 @property, @synthesize and @dynamic.
13812 * c-common.h (enum rid): Removed RID_COPIES and RID_IVAR.
13813 (objc_add_property_declaration): Removed arguments for copies and
13815 (objc_build_getter_call): Renamed to
13816 objc_maybe_build_component_ref.
13817 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
13818 (objc_is_property_ref): New.
13819 * c-common.c (c_common_reswords): Removed copies and ivar.
13820 * stub-objc.c (objc_add_property_declaration): Removed arguments
13821 for copies and ivar.
13822 (objc_build_getter_call): Renamed to
13823 objc_maybe_build_component_ref.
13824 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
13825 (objc_is_property_ref): New.
13827 2010-10-29 Arnaud Charlet <charlet@adacore.com>
13828 Matthew Gingell <gingell@adacore.com>
13830 * c-ada-spec.c (separate_class_package): New function.
13831 (pp_ada_tree_identifier): Prefix references to C++ classes with the
13832 name of their enclosing package.
13833 (print_ada_declaration): Use separate_class_package.
13835 2010-10-27 Jason Merrill <jason@redhat.com>
13837 * c-common.c (c_common_reswords): Add __is_literal_type.
13838 * c-common.h (enum rid): Add RID_IS_LITERAL_TYPE.
13840 * c-common.c (check_case_value): Remove special C++ code.
13842 2010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
13844 * c-common.h (enum rid): Added RID_READWRITE, RID_ASSIGN,
13845 RID_RETAIN, RID_COPY and RID_NONATOMIC. Updated RID_FIRST_PATTR
13846 and RID_LAST_PATTR.
13847 (objc_add_property_declaration): Added additional arguments.
13848 (objc_property_attribute_kind): Removed.
13849 (objc_set_property_attr): Removed.
13850 * c-common.c (c_common_reswords): Added readwrite, assign, retain,
13851 copy and nonatomic.
13852 * stub-objc.c (objc_add_property_declaration): Added additional
13854 (objc_set_property_attr): Removed.
13856 2010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
13858 * c-common.h (objc_add_property_variable): Renamed to
13859 objc_add_property_declaration. Added location argument.
13860 * stub-objc.c (objc_add_property_variable): Same change.
13862 2010-10-23 Nicola Pero <nicola.pero@meta-innovation.com>
13864 * c-common.h (objc_maybe_printable_name): New.
13865 * stub-objc.c (objc_maybe_printable_name): New.
13867 2010-10-22 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
13868 Andrew Pinski <pinskia@gmail.com>
13870 * c-common.h (c_common_mark_addressable_vec): Declare.
13871 * c-common.c (c_common_mark_addressable_vec): New function.
13873 2010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
13875 * c-common.h (objc_set_method_type): Removed.
13876 (objc_add_method_declaration): Added boolean argument.
13877 (objc_start_method_definition): Same change.
13878 (objc_build_method_signature): Same change.
13879 * stub-objc.c (objc_set_method_type): Removed.
13880 (objc_add_method_declaration): Added boolean argument.
13881 (objc_start_method_definition): Same change.
13882 (objc_build_method_signature): Same change.
13884 2010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
13886 * c-common.h (finish_file): Removed.
13887 (objc_write_global_declarations): New.
13888 * c-opts.c (c_common_parse_file): Do not call finish_file.
13889 * stub-objc.c (objc_write_global_declarations): New.
13891 2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
13893 Implemented parsing @synthesize and @dynamic for
13894 Objective-C/Objective-C++.
13895 * c-common.h (enum rid): Add RID_AT_SYNTHESIZE and RID_AT_DYNAMIC.
13896 (objc_add_synthesize_declaration): New.
13897 (objc_add_dynamic_declaration): New.
13898 * c-common.c (c_common_reswords): Add synthesize and dynamic.
13899 * stub-objc.c (objc_add_synthesize_declaration): New.
13900 (objc_add_dynamic_declaration): New.
13902 2010-10-18 Michael Meissner <meissner@linux.vnet.ibm.com>
13905 * c-cppbuiltin.c (mode_has_fma): Move function here from
13906 builtins.c. Don't use the fma optab, instead just use the
13907 HAVE_fma* macros, so that __FP_FAST_FMA* will be defined when
13910 2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
13912 Merge from 'apple/trunk' branch on FSF servers.
13914 2005-11-08 Fariborz Jahanian <fjahanian@apple.com>
13917 * c-common.h (objc_non_volatilized_type): New declaration
13918 * stub-objc.c (objc_non_volatilized_type): New stub.
13920 2010-10-17 Nicola Pero <nicola.pero@meta-innovation.com>
13922 Merge from 'apple/trunk' branch on FSF servers.
13924 2006-03-27 Fariborz Jahanian <fjahanian@apple.com>
13927 * c-common.h (objc_diagnose_private_ivar): New decl.
13928 * stub-objc.c (objc_diagnose_private_ivar): New stub.
13930 2010-10-17 Iain Sandoe <iains@gcc.gnu.org>
13932 * c-common.c (c_common_reswords): Add package, RID_AT_PACKAGE.
13933 * c-common.h (enum rid): Add RID_AT_PACKAGE.
13934 (objc_ivar_visibility_kind): New enum.
13935 (objc_set_visibility): Adjust prototype to use visibility enum.
13936 * stub-objc.c (objc_set_visibility): Adjust stub to use
13939 2010-10-14 Michael Meissner <meissner@linux.vnet.ibm.com>
13941 * c-cppbuiltin.c (builtin_define_float_constants): Emit
13942 __FP_FAST_FMA, __FP_FAST_FMAF, and __FP_FAST_FMAL if the machine
13943 has the appropriate fma builtins.
13944 (c_cpp_builtins): Adjust call to builtin_define_float_constants.
13946 2010-10-14 Iain Sandoe <iains@gcc.gnu.org>
13948 merge from FSF apple 'trunk' branch.
13949 2006 Fariborz Jahanian <fjahanian@apple.com>
13951 Radars 4436866, 4505126, 4506903, 4517826
13952 * c-common.c (c_common_resword): Define @property and its attributes.
13953 * c-common.h: Define property attribute enum entries.
13954 (OBJC_IS_PATTR_KEYWORD): New.
13955 (objc_property_attribute_kind): New enum.
13956 Declare objc_set_property_attr (), objc_add_property_variable (),
13957 objc_build_getter_call () and objc_build_setter_call ().
13958 * stub-objc.c (objc_set_property_attr): New stub.
13959 (objc_add_property_variable): Likewise.
13960 (objc_build_getter_call): Likewise.
13961 (objc_build_setter_call) Likewise.
13963 2010-10-13 Iain Sandoe <iains@gcc.gnu.org>
13965 merge from FSF apple 'trunk' branch.
13966 2006-04-26 Fariborz Jahanian <fjahanian@apple.com>
13968 Radar 3803157 (method attributes)
13969 * c-common.c (handle_deprecated_attribute): Recognize
13970 objc methods as valid declarations.
13971 * c-common.h: Declare objc_method_decl ().
13972 * stub-objc.c (objc_method_decl): New stub.
13974 2010-10-08 Joseph Myers <joseph@codesourcery.com>
13976 * c-common.c (parse_optimize_options): Call
13977 decode_cmdline_options_to_array_default_mask before
13978 decode_options. Update arguments to decode_options.
13979 * c-common.h (c_common_init_options_struct): Declare.
13980 * c-opts.c (c_common_init_options_struct): New. Split out from
13981 c_common_init_options.
13983 2010-10-06 Nicola Pero <nicola.pero@meta-innovation.com>
13985 Implemented fast enumeration for Objective-C.
13986 * c-common.h (objc_finish_foreach_loop): New.
13987 * stub-objc.c (objc_finish_foreach_loop): New.
13989 2010-10-05 Joseph Myers <joseph@codesourcery.com>
13991 * c-common.h (struct diagnostic_context): Don't declare here.
13992 (c_common_initialize_diagnostics): Declare using
13993 diagnostic_context typedef.
13994 * c-opts.c (c_common_handle_option): Pass global_dc to
13995 handle_generated_option.
13997 2010-10-04 Joseph Myers <joseph@codesourcery.com>
13999 * c-opts.c (c_common_handle_option): Pass &global_options_set to
14000 handle_generated_option.
14002 2010-10-03 Ian Lance Taylor <iant@google.com>
14004 * c.opt (-fplan9-extensions): New option.
14006 2010-10-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
14008 * c-cppbuiltin.c (define__GNUC__, builtin_define_type_precision):
14010 (c_cpp_builtins): Call functions from cppbuiltin.c instead
14011 of duplicating code.
14013 2010-09-30 Iain Sandoe <iains@gcc.gnu.org>
14015 * c-common.c: Add two new entries for @optional
14016 and @required keywords.
14018 merge from FSF 'apple/trunk' branch.
14019 2006-01-30 Fariborz Jahanian <fjahanian@apple.com>
14022 * c-common.h (RID_AT_OPTIONAL, RID_AT_REQUIRED): Two new
14023 objective-c keywords.
14024 (objc_set_method_opt): New declaration.
14025 * stub-objc.c (objc_set_method_opt): New stub.
14027 2010-09-30 Joseph Myers <joseph@codesourcery.com>
14029 * c-common.c (handle_optimize_attribute): Pass &global_options to
14030 cl_optimization_save and cl_optimization_restore.
14031 * c-opts.c (c_common_handle_option): Pass &global_options to
14032 handle_generated_option.
14033 * c-pragma.c (handle_pragma_diagnostic): Use option_flag_var.
14034 (handle_pragma_pop_options, handle_pragma_reset_options): Pass
14035 &global_options to cl_optimization_restore.
14037 2010-09-30 Nicola Pero <nicola.pero@meta-innovation.com>
14039 * c-lex.c (c_lex_with_flags): Updated comments for CPP_AT_NAME
14040 Objective-C/Objective-C++ keywords.
14042 2010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
14044 Merge from 'apple/trunk' branch on FSF servers.
14046 2005-10-04 Fariborz Jahanian <fjahanian@apple.com>
14049 * c-common.h (objc_check_global_decl): New declaration.
14050 * stub-objc.c (objc_check_global_decl): New stub.
14052 2010-09-29 Joseph Myers <joseph@codesourcery.com>
14054 * c.opt: Don't use VarExists.
14056 2010-09-29 Joseph Myers <joseph@codesourcery.com>
14058 * c-common.c (c_cpp_error): Update names of diagnostic_context
14060 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Update names of
14061 cl_optimization members.
14062 * c-opts.c (warning_as_error_callback, c_common_handle_option,
14063 sanitize_cpp_opts, finish_options): Update names of cpp_options
14066 2010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
14068 * c-common.h (OBJC_IS_CXX_KEYWORD): New macro. Updated comments.
14069 (objc_is_reserved_word): Removed.
14070 * c-common.c: Updated comments.
14071 * c-lex.c (c_lex_with_flags): Use OBJC_IS_CXX_KEYWORD instead of
14072 objc_is_reserved_word.
14073 * stub-objc.c (objc_is_reserved_word): Removed.
14075 2010-09-28 Iain Sandoe <iains@gcc.gnu.org>
14077 * c-common.h (objc_add_method_declaration): Adjust prototype to
14078 include attributes.
14079 (objc_start_method_definition): Likewise.
14080 (objc_build_keyword_decl): Likewise.
14081 * stub-objc.c:(objc_add_method_declaration): Handle attributes.
14082 (objc_start_method_definition): Likewise.
14083 (objc_build_keyword_decl): Likewise.
14085 2010-09-28 Iain Sandoe <iains@gcc.gnu.org>
14087 * c-common.h (objc_start_class_interface): Adjust prototype.
14088 (objc_start_category_interface): Likewise.
14089 (objc_start_protocol): Likewise.
14090 * stub-objc.c (objc_start_protocol): Adjust for extra argument.
14091 (objc_start_class_interface): Likewise.
14092 (objc_start_category_interface): Likewise.
14094 2010-09-27 Ian Lance Taylor <iant@google.com>
14096 * c-common.c (c_common_attribute_table): Add no_split_stack.
14097 (handle_no_split_stack_attribute): New static function.
14099 2010-09-27 Nicola Pero <nicola.pero@meta-innovation.com>
14101 Merge from 'apple/trunk' branch on FSF servers.
14103 2005-12-15 Fariborz Jahanian <fjahanian@apple.com>
14106 * c-common.h (objc_have_common_type): New declaration.
14107 * stub-objc.c (objc_have_common_type): New stub.
14109 2005-06-22 Ziemowit Laski <zlaski@apple.com>
14112 * c-common.h (objc_common_type): New prototype.
14113 * stub-objc.c (objc_common_type): New stub.
14115 2010-09-24 Jan Hubicka <jh@suse.cz>
14117 * c-common.c (handle_leaf_attribute): New function.
14118 (struct attribute_spec c_common_att): Add leaf.
14120 2010-09-22 Joseph Myers <joseph@codesourcery.com>
14122 * c.opt (-all-warnings, -ansi, -assert, -assert=, -comments,
14123 -comments-in-macros, -define-macro, -define-macro=, -dependencies,
14124 -dump, -dump=, -imacros, -imacros=, -include, -include=,
14125 -include-barrier, -include-directory, -include-directory=,
14126 -include-directory-after, -include-directory-after=,
14127 -include-prefix, -include-prefix=, -include-with-prefix,
14128 -include-with-prefix=, -include-with-prefix-after,
14129 -include-with-prefix-after=, -include-with-prefix-before,
14130 -include-with-prefix-before=, -no-integrated-cpp,
14131 -no-line-commands, -no-standard-includes, -no-warnings, -output,
14132 -output=, -pedantic, -pedantic-errors, -preprocess,
14133 -print-missing-file-dependencies, -trace-includes, -traditional,
14134 -traditional-cpp, -trigraphs, -undefine-macro, -undefine-macro=,
14135 -user-dependencies, -verbose, -write-dependencies,
14136 -write-user-dependencies, no-integrated-cpp, traditional): New.
14138 2010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
14141 * c-common.h (objc_start_method_definition): Return bool instead
14143 * stub-objc.c (objc_start_method_definition): Return bool instead
14146 2010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
14149 * c-common.h (objc_get_interface_ivars): New declaration.
14150 * stub-objc.c (objc_get_interface_ivars): New stub.
14152 2010-09-15 Ian Lance Taylor <iant@google.com>
14154 * c-common.c (parse_optimize_options): Do not capitalize warning
14155 messages. Remove period at end of warning message.
14157 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
14159 * c-common.c (handle_alias_ifunc_attribute): New, broken out of ...
14160 (handle_alias_attribute): ... here.
14161 (handle_ifunc_attribute): New.
14163 2010-09-06 Mark Mitchell <mark@codesourcery.com>
14165 * c-common.h (do_warn_double_promotion): Declare.
14166 * c-common.c (do_warn_double_promotion): Define.
14168 2010-09-05 Mark Mitchell <mark@codesourcery.com>
14170 * c.opt (Wdouble-promotion): New.
14172 2010-09-02 Joseph Myers <joseph@codesourcery.com>
14174 * c.opt (falt-external-templates, fhuge-objects, fvtable-gc,
14175 fvtable-thunks, fxref): Mark no longer supported in help text.
14177 2010-09-02 Joseph Myers <joseph@codesourcery.com>
14179 * c.opt (Wimport, fall-virtual, falt-external-templates,
14180 fdefault-inline, fenum-int-equiv, fexternal-templates,
14181 fguiding-decls, fhonor-std, fhuge-objects, flabels-ok,
14182 fname-mangling-version-, fnew-abi, fnonnull-objects,
14183 foptional-diags, fsquangle, fstrict-prototype, fthis-is-variable,
14184 fvtable-gc, fvtable-thunks, fxref): Mark with Ignore and Warn as
14186 (fhandle-exceptions): Mark with Alias and Warn.
14187 * c-opts.c (c_common_handle_option): Don't handle options marked
14190 2010-09-02 Joseph Myers <joseph@codesourcery.com>
14192 * c.opt (Wcomments, Werror-implicit-function-declaration,
14193 ftemplate-depth-, std=c89, std=c9x, std=gnu89, std=gnu9x,
14194 std=iso9899:1990, std=iso9899:1999, std=iso9899:199x): Mark as
14196 * c-common.c (option_codes): Use OPT_Wcomment instead of
14198 * c-opts.c (warning_as_error_callback, c_common_handle_option):
14199 Don't handle options marked as aliases.
14201 2010-08-25 Richard Guenther <rguenther@suse.de>
14203 * c-common.c (c_common_get_alias_set): Remove special
14204 handling for pointers.
14206 2010-08-20 Nathan Froyd <froydnj@codesourcery.com>
14208 * c-common.c: Use FOR_EACH_VEC_ELT.
14209 * c-gimplify.c: Likewise.
14210 * c-pragma.c: Likewise.
14212 2010-08-16 Joseph Myers <joseph@codesourcery.com>
14214 * c.opt (MDX): Change back to MD. Mark NoDriverArg instead of
14216 (MMDX): Change back to MMD. Mark NoDriverArg instead of
14218 * c-opts.c (c_common_handle_option): Use OPT_MD and OPT_MMD
14219 instead of OPT_MDX and OPT_MMDX.
14221 2010-08-16 Joseph Myers <joseph@codesourcery.com>
14223 * c.opt (MDX, MMDX, lang-asm): Mark RejectDriver.
14225 2010-08-12 Joseph Myers <joseph@codesourcery.com>
14227 * c.opt (MD, MMD): Change to MDX and MMDX.
14228 * c-opts.c (c_common_handle_option): Use OPT_MMD and OPT_MMDX.
14230 2010-08-11 Joseph Myers <joseph@codesourcery.com>
14232 * c-opts.c (c_common_handle_option): Call handle_generated_option
14233 instead of handle_option.
14235 2010-08-08 Nathan Froyd <froydnj@codesourcery.com>
14237 * c-pragma.c (add_to_renaming_pragma_list): Fix call to VEC_safe_push.
14238 (maybe_apply_renaming_pragma): Delete unneeded declarations.
14240 2010-08-08 Nathan Froyd <froydnj@codesourcery.com>
14242 * c-pragma.c (pending_redefinition): Declare. Declare a VEC of it.
14243 (pending_redefine_extname): Change type to a VEC.
14244 (add_to_renaming_pragma_list): Update for new type of
14245 pending_redefine_extname.
14246 (maybe_apply_renaming_pragma): Likewise.
14248 2010-08-04 Arnaud Charlet <charlet@adacore.com>
14250 * c-ada-spec.c (dump_ada_template): Mark underlying instance type as
14252 (dump_generic_ada_node): Code clean up. Use TREE_VISITED flag to
14253 decide whether a type has already been declared/seen.
14254 Do not go to the original type.
14255 (dump_nested_types): New parameter forward.
14256 Generate forward declaration if needed and mark type as visited.
14257 (print_ada_declaration): Call dump_nested_types if not already done.
14258 Mark types as visited.
14260 2010-08-03 Joseph Myers <joseph@codesourcery.com>
14262 * c.opt (-print-pch-checksum): Remove option.
14263 * c-opts.c (c_common_handle_option): Don't handle
14264 OPT_print_pch_checksum.
14266 2010-07-27 Joseph Myers <joseph@codesourcery.com>
14268 * c-common.h (c_common_handle_option): Update prototype and return
14270 * c-opts.c (c_common_handle_option): Update prototype and return
14271 value type. Update calls to handle_option and
14272 enable_warning_as_error.
14274 2010-07-27 Jakub Jelinek <jakub@redhat.com>
14277 * c-pretty-print.c (pp_c_expression): Handle C_MAYBE_CONST_EXPR.
14279 2010-07-27 Joseph Myers <joseph@codesourcery.com>
14281 * c-common.h (c_common_missing_argument): Remove.
14282 * c-opts.c (c_common_missing_argument): Remove.
14283 * c.opt (A, D, F, I, MD, MMD, MQ, MT, U, fconstant-string-class=,
14284 idirafter, imacros, include, isysroot, isystem, iquote): Add
14286 * c-objc-common.h (LANG_HOOKS_MISSING_ARGUMENT): Remove.
14288 2010-07-27 Joseph Myers <joseph@codesourcery.com>
14290 * c-common.h (c_common_option_lang_mask,
14291 c_common_initialize_diagnostics, c_common_complain_wrong_lang_p):
14293 (c_common_init_options): Update prototype.
14294 * c-opts.c (c_common_option_lang_mask): New.
14295 (c_common_initialize_diagnostics): Split out of
14296 c_common_init_options.
14297 (accept_all_c_family_options, c_common_complain_wrong_lang_p):
14299 (c_common_init_options): Update prototype. Use decoded options in
14300 search for -lang-asm.
14302 2010-07-15 Nathan Froyd <froydnj@codesourcery.com>
14304 * c-common.c: Carefully replace TREE_CHAIN with DECL_CHAIN.
14305 * c-format.c: Likewise.
14307 2010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
14309 * c-common.h: Include diagnostic-core.h. Error if already
14311 * c-semantics.c: Do not define GCC_DIAG_STYLE here.
14313 2010-07-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
14315 * c-common.c (IN_GCC_FRONTEND): Do not undef.
14316 Do not include expr.h
14317 (vector_mode_valid_p): Move here.
14319 2010-06-21 DJ Delorie <dj@redhat.com>
14321 * c-pragma.c (handle_pragma_diagnostic): Add push/pop,
14322 allow these pragmas anywhere.
14324 2010-06-14 Jakub Jelinek <jakub@redhat.com>
14327 * c-cppbuiltin.c: Include gt-c-family-c-cppbuiltin.h.
14328 (lazy_hex_fp_values, lazy_hex_fp_value_count): Add GTY(()) markers.
14329 (lazy_hex_fp_value, builtin_define_with_hex_fp_value): Use
14330 ggc_strdup instead of xstrdup.
14332 2010-06-10 Jakub Jelinek <jakub@redhat.com>
14334 * c-cppbuiltin.c: Include cpp-id-data.h.
14335 (lazy_hex_fp_values, lazy_hex_fp_value_count): New variables.
14336 (lazy_hex_fp_value): New function.
14337 (builtin_define_with_hex_fp_value): Provide definitions lazily.
14339 2010-06-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
14341 * c-gimplify.c: Do not include tree-flow.h
14343 2010-06-29 Joern Rennecke <joern.rennecke@embecosm.com>
14346 * c-common.c: Rename targetm member:
14347 targetm.enum_va_list -> targetm.enum_va_list_p
14349 2010-06-28 Anatoly Sokolov <aesok@post.ru>
14351 * c-common.c (shorten_compare): Adjust call to force_fit_type_double.
14353 2010-06-28 Steven Bosscher <steven@gcc.gnu.org>
14355 * c-cppbuiltin.c: Do not include except.h.
14357 2010-06-24 Andi Kleen <ak@linux.intel.com>
14359 * c-common.c (warn_for_omitted_condop): New.
14360 * c-common.h (warn_for_omitted_condop): Add prototype.
14362 2010-06-21 Joseph Myers <joseph@codesourcery.com>
14364 * c.opt (lang-objc): Remove.
14365 * c-opts.c (c_common_handle_option): Don't handle OPT_lang_objc.
14367 2010-06-21 Joern Rennecke <joern.rennecke@embecosm.com>
14369 * c-opts.c: Include "tm_p.h".
14371 2010-06-20 Joseph Myers <joseph@codesourcery.com>
14373 * c-common.c (parse_optimize_options): Update call to
14376 2010-06-18 Nathan Froyd <froydnj@codesourcery.com>
14378 * c-common.c (record_types_used_by_current_var_decl): Adjust for
14379 new type of types_used_by_cur_var_decl.
14381 2010-06-17 Joern Rennecke <joern.rennecke@embecosm.com>
14384 * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Add cast
14385 for C++ standard compliance.
14387 2010-06-16 Jason Merrill <jason@redhat.com>
14389 * c.opt: Add -Wnoexcept.
14391 2010-06-16 Richard Guenther <rguenther@suse.de>
14394 * c-common.c (c_common_truthvalue_conversion): Remove
14395 premature and wrong optimization concering ADDR_EXPRs.
14397 2010-06-15 Arnaud Charlet <charlet@adacore.com>
14399 * c-ada-spec.c (dump_sloc): Remove column info.
14400 (is_simple_enum): New function.
14401 (dump_generic_ada_node, print_ada_declaration): Map C enum types to Ada
14402 enum types when relevant.
14404 2010-06-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
14406 * c-common.c (conversion_warning): Warn at expression
14409 2010-06-10 Joseph Myers <joseph@codesourcery.com>
14411 * c-opts.c (c_common_handle_option): Don't handle
14414 2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
14416 * c-pragma.c (push_alignment): Use typed GC allocation.
14417 (handle_pragma_push_options): Likewise.
14419 * c-common.c (parse_optimize_options): Likewise.
14421 * c-common.h (struct sorted_fields_type): Add variable_size GTY
14424 2010-06-07 Joseph Myers <joseph@codesourcery.com>
14426 * c-common.c (flag_preprocess_only, flag_undef, flag_no_builtin,
14427 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
14428 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
14429 flag_signed_bitfields, warn_strict_null_sentinel,
14430 flag_nil_receivers, flag_zero_link, flag_replace_objc_classes,
14431 flag_gen_declaration, flag_no_gnu_keywords,
14432 flag_implement_inlines, flag_implicit_templates,
14433 flag_implicit_inline_templates, flag_optional_diags,
14434 flag_elide_constructors, flag_default_inline, flag_rtti,
14435 flag_conserve_space, flag_access_control, flag_check_new,
14436 flag_new_for_scope, flag_weak, flag_working_directory,
14437 flag_use_cxa_atexit, flag_use_cxa_get_exception_ptr,
14438 flag_enforce_eh_specs, flag_threadsafe_statics,
14439 flag_pretty_templates): Remove.
14440 * c-common.h (flag_preprocess_only, flag_nil_receivers,
14441 flag_objc_exceptions, flag_objc_sjlj_exceptions, flag_zero_link,
14442 flag_replace_objc_classes, flag_undef, flag_no_builtin,
14443 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
14444 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
14445 flag_const_strings, flag_signed_bitfields, flag_gen_declaration,
14446 flag_no_gnu_keywords, flag_implement_inlines,
14447 flag_implicit_templates, flag_implicit_inline_templates,
14448 flag_optional_diags, flag_elide_constructors, flag_default_inline,
14449 flag_rtti, flag_conserve_space, flag_access_control,
14450 flag_check_new, flag_new_for_scope, flag_weak,
14451 flag_working_directory, flag_use_cxa_atexit,
14452 flag_use_cxa_get_exception_ptr, flag_enforce_eh_specs,
14453 flag_threadsafe_statics, flag_pretty_templates,
14454 warn_strict_null_sentinel): Remove.
14455 * c.opt (E, Wstrict-null-sentinel, faccess-control, fasm,
14456 fbuiltin, fcheck-new, fconserve-space, felide-constructors,
14457 fenforce-eh-specs, ffor-scope, fgnu-keywords, fimplement-inlines,
14458 fimplicit-inline-templates, fimplicit-templates,
14459 flax-vector-conversions, fms-extensions, fnil-receivers,
14460 fnonansi-builtins, fpretty-templates, freplace-objc-classes,
14461 frtti, fshort-double, fshort-enums, fshort-wchar,
14462 fsigned-bitfields, fsigned-char, fstats, fthreadsafe-statics,
14463 funsigned-bitfields, funsigned-char, fuse-cxa-atexit,
14464 fuse-cxa-get-exception-ptr, fweak, fworking-directory, fzero-link,
14465 gen-decls, undef): Use Var.
14466 (fdefault-inline, foptional-diags): Document as doing nothing.
14467 * c-opts.c (c_common_handle_option): Remove cases for options now
14468 using Var. Mark ignored options as such.
14470 2010-06-05 Steven Bosscher <steven@gcc.gnu.org>
14472 * c-common.c: Moved to here from parent directory.
14473 * c-common.def: Likewise.
14474 * c-common.h: Likewise.
14475 * c-cppbuiltin.c: Likewise.
14476 * c-dump.c: Likewise.
14477 * c-format.c: Likewise.
14478 * c-format.h : Likewise.
14479 * c-gimplify.c: Likewise.
14480 * c-lex.c: Likewise.
14481 * c-omp.c: Likewise.
14483 * c-opts.c: Likewise.
14484 * c-pch.c: Likewise.
14485 * c-ppoutput.c: Likewise.
14486 * c-pragma.c: Likewise.
14487 * c-pragma.h: Likewise.
14488 * c-pretty-print.c: Likewise.
14489 * c-pretty-print.h: Likewise.
14490 * c-semantics.c: Likewise.
14491 * stub-objc.c: Likewise.
14493 * c-common.c: Include gt-c-family-c-common.h.
14494 * c-pragma.c: Include gt-c-family-c-pragma.h.
14496 Copyright (C) 2010-2023 Free Software Foundation, Inc.
14498 Copying and distribution of this file, with or without modification,
14499 are permitted in any medium without royalty provided the copyright
14500 notice and this notice are preserved.