1 2022-03-16 Christophe Lyon <christophe.lyon@arm.com>
2 Roger Sayle <roger@nextmovesoftware.com>
5 * c-attribs.cc (decl_or_type_attrs): Add error_mark_node check.
7 2022-03-16 Patrick Palka <ppalka@redhat.com>
10 * c.opt: Add -ffold-simple-inlines.
12 2022-03-13 Tobias Burnus <tobias@codesourcery.com>
14 * c-target.def (check_string_object_format_arg): Fix description typo.
16 2022-03-12 Thomas Schwinge <thomas@codesourcery.com>
19 * c-common.h (c_omp_map_clause_name): Remove.
20 * c-omp.cc (c_omp_map_clause_name): Remove.
22 2022-03-09 Jakub Jelinek <jakub@redhat.com>
25 * c-opts.cc (c_common_post_options): Don't enable
26 -Wshift-negative-value from -Wextra for C++20 or later.
27 * c-ubsan.cc (ubsan_instrument_shift): Adjust comments.
28 * c-warn.cc (maybe_warn_shift_overflow): Use TYPE_OVERFLOW_WRAPS
29 instead of TYPE_UNSIGNED.
31 2022-03-07 Jakub Jelinek <jakub@redhat.com>
33 * c-attribs.cc: Fix up duplicated word issue in a comment.
35 2022-03-01 Martin Liska <mliska@suse.cz>
38 * c-attribs.cc (handle_target_clones_attribute): Use
39 get_target_clone_attr_len and report warning soon.
41 2022-02-17 Jonathan Wakely <jwakely@redhat.com>
43 * c-pragma.cc (handle_pragma_pack): Remove parameter name.
44 (handle_pragma_weak): Likewise.
45 (handle_pragma_scalar_storage_order): Likewise.
46 (handle_pragma_redefine_extname): Likewise.
47 (handle_pragma_visibility): Likewise.
48 (handle_pragma_diagnostic): Likewise.
49 (handle_pragma_target): Likewise.
50 (handle_pragma_optimize): Likewise.
51 (handle_pragma_push_options): Likewise.
52 (handle_pragma_pop_options): Likewise.
53 (handle_pragma_reset_options): Likewise.
54 (handle_pragma_message): Likewise.
55 (handle_pragma_float_const_decimal64): Likewise.
57 2022-02-16 Jakub Jelinek <jakub@redhat.com>
60 * c-omp.cc (c_finish_omp_atomic): For MIN_EXPR/MAX_EXPR, try first
61 build_binary_op with LT_EXPR and only if that doesn't return
62 error_mark_node call build_modify_expr.
64 2022-02-16 Jakub Jelinek <jakub@redhat.com>
67 * c-common.cc (shorten_compare): Convert original arguments to
68 the original *restype_ptr when mixing binary and decimal float.
70 2022-02-14 Richard Biener <rguenther@suse.de>
73 * c-pretty-print.cc (c_pretty_printer::postfix_expression): Handle
74 internal function calls.
76 2022-02-11 Richard Biener <rguenther@suse.de>
78 * c-attribs.cc (c_common_attribute_table): Add entry for
80 (handle_vector_mask_attribute): New.
82 2022-02-10 Marcel Vollweiler <marcel@codesourcery.com>
84 * c-omp.cc (c_omp_split_clauses): Added OMP_CLAUSE_HAS_DEVICE_ADDR case.
85 * c-pragma.h (enum pragma_kind): Added 5.1 in comment.
86 (enum pragma_omp_clause): Added PRAGMA_OMP_CLAUSE_HAS_DEVICE_ADDR.
88 2022-02-09 Jason Merrill <jason@redhat.com>
90 * c-cppbuiltin.cc (c_cpp_builtins): Update values
91 of __cpp_constexpr and __cpp_concepts for C++20.
93 2022-01-24 Marek Polacek <polacek@redhat.com>
95 PR preprocessor/104030
96 * c.opt (Wbidi-chars): Mark as EnumSet. Also accept =ucn.
98 2022-01-21 Jakub Jelinek <jakub@redhat.com>
101 * c-common.h (check_function_arguments_recurse): Add for_format
103 * c-common.cc (check_function_nonnull): Pass false to
104 check_function_arguments_recurse's last argument.
105 (check_function_arguments_recurse): Add for_format argument,
106 if true, don't stop on warning_suppressed_p.
107 * c-format.cc (check_format_info): Pass true to
108 check_function_arguments_recurse's last argument.
110 2022-01-19 David Malcolm <dmalcolm@redhat.com>
112 * c-common.cc (c_common_c_tests): Rename to...
113 (c_common_cc_tests): ...this.
114 (c_family_tests): Update calls for .c to .cc renaming.
115 * c-common.h (c_format_c_tests): Rename to...
116 (c_format_cc_tests): ...this.
117 (c_indentation_c_tests): Rename to...
118 (c_indentation_cc_tests): ...this.
119 (c_pretty_print_c_tests): Rename to...
120 (c_pretty_print_cc_tests): ...this.
121 * c-format.cc (c_format_c_tests): Rename to...
122 (c_format_cc_tests): ...this.
123 * c-indentation.cc (c_indentation_c_tests): Rename to...
124 (c_indentation_cc_tests): ...this.
125 * c-pretty-print.cc (c_pretty_print_c_tests): Rename to...
126 (c_pretty_print_cc_tests): ...this.
128 2022-01-17 Martin Liska <mliska@suse.cz>
130 * c-ada-spec.cc: Rename .c names to .cc.
131 * c-ada-spec.h: Likewise.
132 * c-common.cc (c_build_vec_convert): Likewise.
133 (warning_candidate_p): Likewise.
134 * c-common.h (enum rid): Likewise.
135 (build_real_imag_expr): Likewise.
136 (finish_label_address_expr): Likewise.
137 (c_get_substring_location): Likewise.
138 (c_build_bind_expr): Likewise.
139 (conflict_marker_get_final_tok_kind): Likewise.
140 (c_parse_error): Likewise.
141 (check_missing_format_attribute): Likewise.
142 (invalid_array_size_error): Likewise.
143 (warn_for_multistatement_macros): Likewise.
144 (build_attr_access_from_parms): Likewise.
145 * c-cppbuiltin.cc (c_cpp_builtins): Likewise.
146 * c-format.cc: Likewise.
147 * c-gimplify.cc (c_gimplify_expr): Likewise.
148 * c-indentation.h: Likewise.
149 * c-objc.h (objc_prop_attr_kind_for_rid): Likewise.
150 * c-omp.cc (c_omp_predetermined_mapping): Likewise.
151 * c-opts.cc (c_common_post_options): Likewise.
152 (set_std_cxx23): Likewise.
153 * c-pragma.cc (handle_pragma_redefine_extname): Likewise.
154 * c-pretty-print.h: Likewise.
156 2022-01-17 Martin Liska <mliska@suse.cz>
158 * c-ada-spec.c: Moved to...
159 * c-ada-spec.cc: ...here.
160 * c-attribs.c: Moved to...
161 * c-attribs.cc: ...here.
162 * c-common.c: Moved to...
163 * c-common.cc: ...here.
164 * c-cppbuiltin.c: Moved to...
165 * c-cppbuiltin.cc: ...here.
166 * c-dump.c: Moved to...
167 * c-dump.cc: ...here.
168 * c-format.c: Moved to...
169 * c-format.cc: ...here.
170 * c-gimplify.c: Moved to...
171 * c-gimplify.cc: ...here.
172 * c-indentation.c: Moved to...
173 * c-indentation.cc: ...here.
174 * c-lex.c: Moved to...
176 * c-omp.c: Moved to...
178 * c-opts.c: Moved to...
179 * c-opts.cc: ...here.
180 * c-pch.c: Moved to...
182 * c-ppoutput.c: Moved to...
183 * c-ppoutput.cc: ...here.
184 * c-pragma.c: Moved to...
185 * c-pragma.cc: ...here.
186 * c-pretty-print.c: Moved to...
187 * c-pretty-print.cc: ...here.
188 * c-semantics.c: Moved to...
189 * c-semantics.cc: ...here.
190 * c-ubsan.c: Moved to...
191 * c-ubsan.cc: ...here.
192 * c-warn.c: Moved to...
193 * c-warn.cc: ...here.
194 * cppspec.c: Moved to...
195 * cppspec.cc: ...here.
196 * stub-objc.c: Moved to...
197 * stub-objc.cc: ...here.
199 2022-01-15 Martin Sebor <msebor@redhat.com>
202 * c.opt (-Wdangling-pointer): New option.
204 2022-01-15 Martin Sebor <msebor@redhat.com>
206 PR tree-optimization/80532
207 * c.opt (-Wuse-after-free): New options.
209 2022-01-14 David Malcolm <dmalcolm@redhat.com>
211 * c-attribs.c (c_common_attribute_table): Add "tainted_args".
212 (handle_tainted_args_attribute): New.
214 2022-01-13 Anthony Sharp <anthonysharp15@gmail.com>
215 Jason Merrill <jason@redhat.com>
218 * c.opt: Added -Wmissing-template-keyword.
220 2022-01-13 Richard Biener <rguenther@suse.de>
223 * c-common.c (c_common_mark_addressable_vec): Handle TARGET_EXPR.
225 2022-01-12 Martin Liska <mliska@suse.cz>
228 * c-attribs.c (handle_optimize_attribute): Do not call
229 cl_optimization_compare if we seen an error.
231 2022-01-11 Jakub Jelinek <jakub@redhat.com>
235 * c-warn.c (conversion_warning): Handle BIT_AND_EXPR, BIT_IOR_EXPR
238 2022-01-10 Richard Biener <rguenther@suse.de>
241 * c-common.c (c_build_shufflevector): Wrap the BIT_FIELD_REF
242 in a TARGET_EXPR to force a temporary.
244 2022-01-06 Marek Polacek <polacek@redhat.com>
247 * c-pragma.c (handle_pragma_scalar_storage_order): Use %< %> in
249 (handle_pragma_diagnostic): Likewise.
251 2022-01-03 Marek Polacek <polacek@redhat.com>
254 * c-format.c (check_tokens): Accept "decl-specifier*".
256 2022-01-03 Jakub Jelinek <jakub@redhat.com>
259 * c-attribs.c (handle_non_overlapping_attribute): New function.
260 (c_common_attribute_table): Add "non overlapping" attribute.
262 2021-12-30 Jakub Jelinek <jakub@redhat.com>
265 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Perform
266 cpp_define_unused/cpp_undef calls with forced token locations
269 2021-12-27 Patrick Palka <ppalka@redhat.com>
272 * c-common.c (pointer_int_sum): When quiet, return
273 error_mark_node for an incomplete pointed-to type and don't
274 call size_in_bytes_loc.
276 2021-12-17 Jason Merrill <jason@redhat.com>
279 * c-opts.c (c_common_post_options): Update defaults.
281 2021-12-16 Martin Liska <mliska@suse.cz>
284 * c-pragma.c (handle_pragma_pop_options): Do not check
285 global options modification when an error is seen in parsing
286 of options (pragmas or attributes).
288 2021-12-12 Jonathan Wakely <jwakely@redhat.com>
290 * known-headers.cc: Define INCLUDE_MEMORY instead of
292 * name-hint.h: Likewise.
293 (class name_hint): Use std::unique_ptr instead of gnu::unique_ptr.
295 2021-12-09 Jakub Jelinek <jakub@redhat.com>
298 * c-pch.c (c_common_no_more_pch): Pass a temporary void * var
299 with NULL value instead of NULL to host_hooks.gt_pch_use_address.
301 2021-12-03 Jakub Jelinek <jakub@redhat.com>
304 * c-pch.c (struct c_pch_validity): Remove pch_init member.
305 (pch_init): Don't initialize v.pch_init.
306 (c_common_valid_pch): Don't warn and punt if .text addresses change.
308 2021-12-01 Jason Merrill <jason@redhat.com>
311 * c.opt: Add -fconstexpr-fp-except.
313 2021-11-29 Richard Biener <rguenther@suse.de>
315 * c-format.c (check_format_string): Remove spurious
318 2021-11-29 Richard Biener <rguenther@suse.de>
320 * c-opts.c (c_common_post_options): Remove unreachable return.
321 * c-pragma.c (handle_pragma_target): Likewise.
322 (handle_pragma_optimize): Likewise.
324 2021-11-25 Jakub Jelinek <jakub@redhat.com>
327 * c-opts.c (c_common_post_options): Enable -Wcomma-subscript by
328 default for C++23 regardless of warn_deprecated.
329 * c-cppbuiltin.c (c_cpp_builtins): Predefine
330 __cpp_multidimensional_subscript=202110L for C++23.
332 2021-11-23 Martin Sebor <msebor@redhat.com>
335 * c.opt: Add -Winfinite-recursion.
337 2021-11-19 Martin Sebor <msebor@redhat.com>
341 * c-common.c (decl_with_nonnull_addr_p): Call maybe_nonzero_address
342 and improve handling tof defined symbols.
344 2021-11-19 Martin Liska <mliska@suse.cz>
347 2021-11-18 Martin Liska <mliska@suse.cz>
349 * c-gimplify.c (genericize_c_loop): Use option directly.
351 2021-11-18 Matthias Kretz <m.kretz@gsi.de>
353 * c-common.c (c_common_reswords): Add __builtin_assoc_barrier.
354 * c-common.h (enum rid): Add RID_BUILTIN_ASSOC_BARRIER.
356 2021-11-18 Martin Liska <mliska@suse.cz>
358 * c-gimplify.c (genericize_c_loop): Use option directly.
360 2021-11-17 Martin Uecker <uecker@gcc.gnu.org>
364 * c-common.c (pointer_int_sum): Make sure pointer expressions
365 are evaluated first when the size expression depends on for
366 variably-modified types.
368 2021-11-17 Marek Polacek <polacek@redhat.com>
370 PR preprocessor/103026
371 * c.opt (Wbidi-chars, Wbidi-chars=): New option.
373 2021-11-16 Jason Merrill <jason@redhat.com>
375 * c-common.c (release_tree_vector): Only cache vecs smaller than
378 2021-11-15 Jason Merrill <jason@redhat.com>
380 * c.opt: Add -fimplicit-constexpr.
381 * c-cppbuiltin.c: Define __cpp_implicit_constexpr.
382 * c-opts.c (c_common_post_options): Disable below C++14.
384 2021-11-15 Jakub Jelinek <jakub@redhat.com>
386 * c-omp.c (c_omp_split_clauses) <case OMP_CLAUSE_THREAD_LIMIT>:
387 Duplicate to both OMP_TARGET and OMP_TEAMS.
389 2021-11-10 Marek Polacek <polacek@redhat.com>
392 * c-pragma.c (handle_pragma_diagnostic): Handle #pragma GCC diagnostic
395 2021-11-09 David Malcolm <dmalcolm@redhat.com>
397 * c-pragma.c (GCC_BAD_AT): New macro.
398 (GCC_BAD2_AT): New macro.
399 (handle_pragma_pack): Use the location of the pertinent token when
400 issuing diagnostics about invalid constants/actions, and trailing
402 (handle_pragma_target): Likewise for non-string "GCC option".
403 (handle_pragma_message): Likewise for trailing junk.
405 2021-11-03 Joseph Myers <joseph@codesourcery.com>
408 * c-common.c (convert_and_check): Add argument init_const. Call
409 convert_init if init_const.
410 * c-common.h (convert_and_check): Update prototype.
411 (convert_init): New prototype.
413 2021-11-01 David Malcolm <dmalcolm@redhat.com>
415 * c-lex.c (c_lex_with_flags): When complaining about non-printable
416 CPP_OTHER tokens, set the "escape on output" flag.
418 2021-10-27 Jakub Jelinek <jakub@redhat.com>
420 * c-omp.c (c_omp_check_loop_iv_r): Don't clear 3rd bit for
422 (c_omp_check_nonrect_loop_iv): Handle POINTER_PLUS_EXPR.
423 (c_omp_check_loop_iv): Set kind even if the iterator is non-integral.
425 2021-10-27 Jakub Jelinek <jakub@redhat.com>
428 * c-common.h (c_omp_check_loop_iv_exprs): Add enum tree_code argument.
429 * c-omp.c (c_omp_check_loop_iv_r): For trees other than decls,
430 TREE_VEC, PLUS_EXPR, MINUS_EXPR, MULT_EXPR, POINTER_PLUS_EXPR or
431 conversions temporarily clear the 3rd bit from d->kind while walking
433 (c_omp_check_loop_iv_exprs): Add CODE argument. Or in 4 into data.kind
434 if possibly non-rectangular.
436 2021-10-21 Jakub Jelinek <jakub@redhat.com>
439 * c-omp.c (c_omp_predefined_variable): Return true also for
440 ubsan_create_data created artificial variables.
442 2021-10-14 Joseph Myers <joseph@codesourcery.com>
444 * c-format.c (printf_length_specs, scanf_length_specs)
445 (print_char_table, scan_char_table): Support DFP formats for C2X.
446 * c-format.h (TEX_D32, TEX_D64, TEX_D128): Remove.
447 (T2X_D32, T2X_D64, T2X_D128): New macros.
449 2021-10-14 Kwok Cheung Yeung <kcy@codesourcery.com>
451 * c-omp.c (c_omp_check_context_selector): Rename to
452 omp_check_context_selector and move to omp-general.c.
453 (c_omp_mark_declare_variant): Rename to omp_mark_declare_variant and
454 move to omp-general.c.
456 2021-10-12 Joseph Myers <joseph@codesourcery.com>
458 * c-format.c (print_char_table): Add %b and %B formats.
459 (scan_char_table): Add %b format.
460 * c-format.h (T2X_UI, T2X_UL, T2X_ULL, T2X_US, T2X_UC, T2X_ST)
461 (T2X_UPD, T2X_UIM): New macros.
463 2021-10-12 Jakub Jelinek <jakub@redhat.com>
465 * c-omp.c (c_finish_omp_atomic): Use
466 clear_padding_type_may_have_padding_p.
468 2021-10-08 Martin Liska <mliska@suse.cz>
470 * c-opts.c (c_common_post_options): Use new macro
473 2021-10-07 Martin Liska <mliska@suse.cz>
475 * c-common.c (parse_optimize_options): Make
476 save_opt_decoded_options a pointer type.
478 2021-10-06 Jakub Jelinek <jakub@redhat.com>
480 PR tree-optimization/102571
481 * c-omp.c (c_finish_omp_atomic): Optimize the case where type has
482 padding, but the non-padding bits are contiguous set of bytes
483 by adjusting the memcmp call arguments instead of emitting
484 __builtin_clear_padding and then comparing all the type's bytes.
486 2021-10-06 Jakub Jelinek <jakub@redhat.com>
489 * c-cppbuiltin.c (c_cpp_builtins): For -std=c++23 predefine
490 __cpp_constexpr to 202110L rather than 201907L.
492 2021-10-04 Marek Polacek <polacek@redhat.com>
495 * c-common.h (do_warn_array_compare): Declare.
496 * c-warn.c (do_warn_array_compare): New.
497 * c.opt (Warray-compare): New option.
499 2021-10-02 Iain Sandoe <iain@sandoe.co.uk>
501 * c-format.c: Remove a test of TARGET_FORMAT_TYPES with
502 NULL, this is not needed.
504 2021-10-01 Martin Sebor <msebor@redhat.com>
507 * c-common.c (decl_with_nonnull_addr_p): Handle members.
508 Check and perform warning suppression.
509 (c_common_truthvalue_conversion): Enhance warning suppression.
511 2021-10-01 Martin Liska <mliska@suse.cz>
514 * c-common.c (parse_optimize_options): decoded_options[0] is
515 used for program name, so merged_decoded_options should also
518 2021-10-01 Jakub Jelinek <jakub@redhat.com>
519 Richard Biener <rguenther@suse.de>
522 * c-ubsan.c (ubsan_instrument_division): Check the right
523 flag_sanitize_recover bit, depending on which sanitization
524 is done. Sanitize INT_MIN / -1 under SANITIZE_SI_OVERFLOW
525 rather than SANITIZE_DIVIDE. If both SANITIZE_SI_OVERFLOW
526 and SANITIZE_DIVIDE is enabled, neither check is known
527 to be false and flag_sanitize_recover bits for those two
528 aren't the same, emit both __ubsan_handle_divrem_overflow
529 and __ubsan_handle_divrem_overflow_abort calls.
531 2021-10-01 Martin Liska <mliska@suse.cz>
533 * c-common.c (parse_optimize_options): Combine optimize
534 options with what was provided on the command line.
536 2021-10-01 Jakub Jelinek <jakub@redhat.com>
538 * c-omp.c (c_omp_split_clauses): Also copy
539 OMP_CLAUSE_ORDER_REPRODUCIBLE.
541 2021-09-27 Martin Liska <mliska@suse.cz>
543 * c-opts.c (c_common_init_options_struct): Set also
544 x_flag_default_complex_method.
546 2021-09-22 Jakub Jelinek <jakub@redhat.com>
548 * c-omp.c (c_omp_split_clauses): Copy over OMP_CLAUSE_ALLOCATE_ALIGN.
550 2021-09-20 Matthias Kretz <m.kretz@gsi.de>
552 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Define or
553 undefine __RECIPROCAL_MATH__, __NO_SIGNED_ZEROS__,
554 __NO_TRAPPING_MATH__, __ASSOCIATIVE_MATH__, and
555 __ROUNDING_MATH__ according to the new optimization flags.
557 2021-09-18 Jakub Jelinek <jakub@redhat.com>
559 * c-omp.c (c_omp_split_clauses): Split order clause also to
560 distribute construct. Copy over OMP_CLAUSE_ORDER_UNCONSTRAINED.
562 2021-09-17 Jakub Jelinek <jakub@redhat.com>
564 * c-omp.c (c_finish_omp_atomic): Avoid creating
565 TARGET_EXPR if test is true, use create_tmp_var_raw instead of
566 create_tmp_var and add a zero initializer to TARGET_EXPRs that
567 had NULL initializer. When omitting operands after v = x,
568 use type of v rather than type of x. Fix type of vtmp
571 2021-09-13 Jason Merrill <jason@redhat.com>
573 * c.opt: Add -Winterference-size.
574 * c-cppbuiltin.c (cpp_atomic_builtins): Add __GCC_DESTRUCTIVE_SIZE
575 and __GCC_CONSTRUCTIVE_SIZE.
577 2021-09-10 Jakub Jelinek <jakub@redhat.com>
579 * c-common.h (c_finish_omp_atomic): Add r and weak arguments.
580 * c-omp.c: Include gimple-fold.h.
581 (c_finish_omp_atomic): Add r and weak arguments. Add support for
584 2021-09-09 qing zhao <qing.zhao@oracle.com>
586 * c-attribs.c (handle_uninitialized_attribute): New function.
587 (c_common_attribute_table): Add "uninitialized" attribute.
589 2021-09-08 liuhongt <hongtao.liu@intel.com>
591 * c-common.c (excess_precision_mode_join): Update below comments.
592 (c_ts18661_flt_eval_method): Set excess_precision_type to
593 EXCESS_PRECISION_TYPE_FLOAT16 when -fexcess-precision=16.
594 * c-cppbuiltin.c (cpp_atomic_builtins): Update below comments.
595 (c_cpp_flt_eval_method_iec_559): Set excess_precision_type to
596 EXCESS_PRECISION_TYPE_FLOAT16 when -fexcess-precision=16.
598 2021-09-07 Marcel Vollweiler <marcel@codesourcery.com>
600 * c-omp.c (c_finish_omp_flush): Handle MEMMODEL_SEQ_CST.
602 2021-09-03 Eric Botcazou <ebotcazou@adacore.com>
604 * c-ada-spec.c (dump_ads): Generate pragmas to disable style checks
605 and -gnatwu warning for the package specification.
607 2021-09-01 Iain Sandoe <iain@sandoe.co.uk>
609 * c-attribs.c (handle_unavailable_attribute): New.
611 2021-08-30 Jason Merrill <jason@redhat.com>
613 * c.opt: Add -Wmissing-requires.
615 2021-08-25 Lewis Hyatt <lhyatt@gmail.com>
618 * c-opts.c (c_common_input_charset_cb): New function.
619 (c_common_post_options): Call new function
620 diagnostic_initialize_input_context().
622 2021-08-20 Tobias Burnus <tobias@codesourcery.com>
624 * c-format.c (gcc_gfc_length_specs): Add 'll' and 'w'.
625 (gcc_gfc_char_table): Add T9L_LL and T9L_ULL to
626 "di" and "u", respecitively; fill with BADLEN to match
628 (get_init_dynamic_hwi): Split off from ...
629 (init_dynamic_diag_info): ... here. Call it.
630 (init_dynamic_gfc_info): Call it.
632 2021-08-20 Jakub Jelinek <jakub@redhat.com>
634 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_ERROR.
635 * c-pragma.c (omp_pragmas): Add error directive.
636 * c-omp.c (omp_directives): Uncomment error directive entry.
638 2021-08-18 Jakub Jelinek <jakub@redhat.com>
640 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_NOTHING.
641 * c-pragma.c (omp_pragmas): Add nothing directive.
642 * c-omp.c (omp_directives): Uncomment nothing directive entry.
644 2021-08-17 Jakub Jelinek <jakub@redhat.com>
647 * c-common.h (enum rid): Add RID_IS_LAYOUT_COMPATIBLE.
648 * c-common.c (c_common_reswords): Add __is_layout_compatible.
650 2021-08-17 Matt Jacobson <mhjacobson@me.com>
652 * c-opts.c (c_common_post_options): Default to
653 flag_objc_sjlj_exceptions = 1 only when flag_objc_abi < 2.
655 2021-08-17 Jakub Jelinek <jakub@redhat.com>
657 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_SCOPE.
658 * c-pragma.c (omp_pragmas): Add scope construct.
659 * c-omp.c (omp_directives): Uncomment scope directive entry.
661 2021-08-16 Sebastian Huber <sebastian.huber@embedded-brains.de>
663 * c-cppbuiltin.c (c_cpp_builtins): Define
664 __LIBGCC_GCOV_TYPE_SIZE if flag_building_libgcc is true.
666 2021-08-12 Jakub Jelinek <jakub@redhat.com>
668 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_MASKED.
669 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_FILTER.
670 * c-pragma.c (omp_pragmas_simd): Add masked construct.
671 * c-common.h (enum c_omp_clause_split): Add C_OMP_CLAUSE_SPLIT_MASKED
673 (c_finish_omp_masked): Declare.
674 * c-omp.c (c_finish_omp_masked): New function.
675 (c_omp_split_clauses): Handle combined masked constructs.
677 2021-07-30 Jakub Jelinek <jakub@redhat.com>
680 * c-common.h (enum rid): Add RID_IS_POINTER_INTERCONVERTIBLE_BASE_OF.
681 * c-common.c (c_common_reswords): Add
682 __is_pointer_interconvertible_base_of.
684 2021-07-29 Richard Biener <rguenther@suse.de>
687 * c-common.c (c_common_mark_addressable_vec): Look through
688 C_MAYBE_CONST_EXPR even if not at the toplevel.
690 2021-07-27 Martin Sebor <msebor@redhat.com>
693 * c-warn.c (warn_parm_ptrarray_mismatch): Use OEP_DECL_NAME.
695 2021-07-23 Jakub Jelinek <jakub@redhat.com>
697 * c-lex.c (c_common_has_attribute): Call canonicalize_attr_name also
698 on attr_id. Return 1 for omp::directive or omp::sequence in C++11
701 2021-07-23 Jakub Jelinek <jakub@redhat.com>
703 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP__START_ and
704 PRAGMA_OMP__LAST_ enumerators.
706 2021-07-21 Thomas Schwinge <thomas@codesourcery.com>
707 Joseph Myers <joseph@codesourcery.com>
708 Cesar Philippidis <cesar@codesourcery.com>
710 * c-pragma.h (pragma_omp_clause): Add 'PRAGMA_OACC_CLAUSE_NOHOST'.
712 2021-07-20 Martin Sebor <msebor@redhat.com>
714 * c-common.c (c_build_shufflevector): Adjust by-value argument to
716 * c-common.h (c_build_shufflevector): Same.
718 2021-07-16 Andrew Pinski <apinski@marvell.com>
721 * c-common.c (parse_optimize_options): Use the correct
724 2021-07-15 Martin Sebor <msebor@redhat.com>
728 * c-warn.c (warn_parm_array_mismatch): Use OEP_DECL_NAME.
730 2021-07-14 Jason Merrill <jason@redhat.com>
732 * c-opts.c (c_common_post_options): Set -fdelete-dead-exceptions.
734 2021-07-06 Martin Sebor <msebor@redhat.com>
736 * c-format.c (gcc_tdiag_char_table): Remove support for %G and %K.
737 (gcc_cdiag_char_table): Same.
738 (gcc_cxxdiag_char_table): Same.
740 2021-07-02 Jakub Jelinek <jakub@redhat.com>
742 * c-common.h (enum c_omp_directive_kind): New enum.
743 (struct c_omp_directive): New type.
744 (c_omp_categorize_directive): Declare.
745 * c-omp.c (omp_directives): New variable.
746 (c_omp_categorize_directive): New function.
748 2021-07-01 Eric Botcazou <ebotcazou@adacore.com>
750 * c-ada-spec.c (packed_layout): New global variable.
751 (dump_ada_declaration): Set it upon seeing a packed record type.
752 Do not put the "aliased" keyword if it is set.
753 (dump_ada_structure): Add Pack aspect if it is set and clear it.
755 2021-07-01 Eric Botcazou <ebotcazou@adacore.com>
757 * c-ada-spec.c (check_name): Rename into...
758 (check_type_name_conflict): ...this. Minor tweak.
759 (dump_ada_function_declaration): Adjust to above renaming.
760 (dump_ada_array_domains): Fix oversight.
761 (dump_ada_declaration): Call check_type_name_conflict for variables.
763 2021-06-25 Martin Sebor <msebor@redhat.com>
765 * c-common.c (c_wrap_maybe_const): Remove TREE_NO_WARNING.
766 (c_common_truthvalue_conversion): Replace direct uses of
767 TREE_NO_WARNING with warning_suppressed_p, suppress_warning, and
769 (check_function_arguments_recurse): Same.
770 * c-gimplify.c (c_gimplify_expr): Same.
771 * c-warn.c (overflow_warning): Same.
772 (warn_logical_operator): Same.
773 (warn_if_unused_value): Same.
774 (do_warn_unused_parameter): Same.
776 2021-06-24 Jakub Jelinek <jakub@redhat.com>
778 * c-common.h (enum c_omp_region_type): Add C_ORT_TARGET and
780 * c-omp.c (c_omp_split_clauses): For OMP_CLAUSE_IN_REDUCTION on
781 combined target constructs also add map (always, tofrom:) clause.
783 2021-06-15 Robin Dapp <rdapp@linux.ibm.com>
785 * c-attribs.c (common_handle_aligned_attribute): Remove short
786 circuit and dead code.
788 2021-06-14 Jonathan Wakely <jwakely@redhat.com>
791 * known-headers.cc (get_stdlib_header_for_name): Add known
792 headers for EXIT_FAILURE, EXIT_SUCCESS, abort, atexit, calloc,
795 2021-06-12 Jason Merrill <jason@redhat.com>
797 * c-attribs.c (handle_unused_attribute): Handle FIELD_DECL.
799 2021-06-11 Jakub Jelinek <jakub@redhat.com>
802 * c-cppbuiltin.c (c_cpp_builtins): Predefine __cpp_if_consteval for
803 -std=c++2b for P1938R3 consteval if support.
805 2021-06-09 Jason Merrill <jason@redhat.com>
808 * c-warn.c (warn_for_sign_compare): Remove C++ enum mismatch
811 2021-06-07 Martin Liska <mliska@suse.cz>
813 * c-target.def: Split long lines and replace them
816 2021-06-04 Martin Sebor <msebor@redhat.com>
819 * c-attribs.c (positional_argument): Bail on erroneous types.
821 2021-06-04 Martin Sebor <msebor@redhat.com>
823 * c-warn.c (warn_parm_array_mismatch): Check TREE_PURPOSE to test
824 for element presence.
826 2021-06-03 Eric Botcazou <ebotcazou@adacore.com>
828 * c-ada-spec.c (dump_ada_macros): Minor tweaks.
829 (dump_ada_decl_name): Likewise.
830 (dump_anonymous_type_name): Remove parent parameter and adjust.
831 (dump_sloc): Minor tweak.
832 (dump_ada_array_type): Remove type parameter and adjust.
833 (dump_ada_enum_type): Remove parent parameter and adjust.
834 (dump_ada_node): Adjust calls to above functions.
835 (dumped_anonymous_types): New global variable.
836 (dump_nested_types_1): Rename into...
837 (dump_nested_types): ...this.
838 (dump_nested_type): Remove parent and dumped_types parameters.
839 <ARRAY_TYPE>: Replace dumped_types with dumped_anonymous_types.
840 Adjust calls to dump_anonymous_type_name and dump_ada_array_type.
841 (dump_ada_specs): Initialize and free dumped_anonymous_types.
843 2021-06-03 Eric Botcazou <ebotcazou@adacore.com>
845 * c-ada-spec.c (pp_ada_tree_identifier): Tidy up.
846 (dump_ada_node) <POINTER_TYPE>: Deal specially with external subtypes.
848 2021-06-03 Eric Botcazou <ebotcazou@adacore.com>
850 * c-ada-spec.c (dump_ada_enum_type): Dump a prefix for constants.
851 (htable_t): New typedef.
852 (overloaded_names): Use it.
853 (add_name): New function.
854 (init_overloaded_names): Use add_name to populate the table and add
855 special cases for sigaction and stat.
856 (overloaded_name_p): Rename into...
857 (overloading_index): ...this. Do not initialize overloaded_names table
858 here. Return the index or zero.
859 (dump_ada_declaration): Minor tweaks. Do not skip overloaded functions
860 but add an overloading suffix instead.
861 (dump_ada_specs): Initialize overloaded_names tables here.
863 2021-06-01 Martin Liska <mliska@suse.cz>
866 * c-attribs.c (handle_optimize_attribute): Limit sanity check
867 to a situation where we are not in processing of an optimize
869 * c-pragma.c (handle_pragma_pop_options): Restore target
872 2021-05-31 Indu Bhagat <indu.bhagat@oracle.com>
875 * c-pch.c (c_common_valid_pch): Use xstrdup for debug format set names.
877 2021-05-31 Richard Biener <rguenther@suse.de>
880 * c-common.c: Include tree-vector-builder.h and
882 (c_common_reswords): Add __builtin_shufflevector.
883 (c_build_shufflevector): New funtion.
884 * c-common.h (enum rid): Add RID_BUILTIN_SHUFFLEVECTOR.
885 (c_build_shufflevector): Declare.
887 2021-05-28 Jakub Jelinek <jakub@redhat.com>
890 * c-omp.c (c_omp_split_clauses): For reduction clause if combined with
891 target add a map tofrom clause with OMP_CLAUSE_MAP_IMPLICIT.
893 2021-05-28 Tobias Burnus <tobias@codesourcery.com>
895 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_AFFINITY.
897 2021-05-25 Martin Liska <mliska@suse.cz>
899 PR tree-optimization/92860
901 * c-attribs.c (handle_optimize_attribute): Save target node
902 before calling parse_optimize_options and save it in case
904 * c-pragma.c (handle_pragma_target): Similarly for pragma.
905 (handle_pragma_pop_options): Likewise here.
907 2021-05-25 Martin Liska <mliska@suse.cz>
909 * c-attribs.c (handle_no_sanitize_coverage_attribute): New.
911 2021-05-25 Jakub Jelinek <jakub@redhat.com>
914 * c-omp.c (c_omp_split_clauses): Copy reduction to teams when teams is
915 combined with simd and not with taskloop or for.
917 2021-05-21 Jakub Jelinek <jakub@redhat.com>
920 * c-omp.c (c_omp_split_clauses): Set OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT
921 on firstprivate clause copy going to target construct, and for
922 target simd set also OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT_TARGET bit.
924 2021-05-20 Jonathan Wakely <jwakely@redhat.com>
926 * c.opt (Wc++11-extensions, Wc++14-extensions)
927 (Wc++17-extensions, Wc++20-extensions, Wc++23-extensions): New
930 2021-05-20 Indu Bhagat <indu.bhagat@oracle.com>
932 * c-lex.c (init_c_lex): Use dwarf_debuginfo_p.
934 2021-05-20 Indu Bhagat <indu.bhagat@oracle.com>
936 * c-opts.c (c_common_post_options): Adjust access to debug_type_names.
937 * c-pch.c (struct c_pch_validity): Use type uint32_t.
938 (pch_init): Renamed member.
939 (c_common_valid_pch): Adjust access to debug_type_names.
941 2021-05-19 Martin Sebor <msebor@redhat.com>
944 * c-attribs.c (build_attr_access_from_parms): Handle arbitrarily many
947 2021-05-18 Richard Biener <rguenther@suse.de>
950 * c-attribs.c (type_valid_for_vector_size): Reject too large nunits.
951 Reword existing nunit diagnostic.
953 2021-05-17 Joern Rennecke <joern.rennecke@embecosm.com>
955 * c-common.c (braced_list_to_string): Return CTOR unchanged
956 if host and target character sizes don't match.
958 2021-05-14 Martin Liska <mliska@suse.cz>
960 * c.opt: Add Warning keyword for 2 options.
962 2021-05-13 Martin Liska <mliska@suse.cz>
965 * c-attribs.c (handle_target_clones_attribute): Expect a string
966 argument to target_clone argument.
968 2021-05-11 Joseph Myers <joseph@codesourcery.com>
970 * c-lex.c (interpret_float): Handle digit separators for C2X.
972 2021-05-10 Martin Liska <mliska@suse.cz>
974 * c-ada-spec.c (print_destructor): Use startswith
975 function instead of strncmp.
976 (dump_ada_declaration): Likewise.
977 * c-common.c (disable_builtin_function): Likewise.
978 (def_builtin_1): Likewise.
979 * c-format.c (check_tokens): Likewise.
980 (check_plain): Likewise.
981 (convert_format_name_to_system_name): Likewise.
983 2021-04-28 Patrick McGehearty <patrick.mcgehearty@oracle.com>
985 * c-cppbuiltin.c (c_cpp_builtins): Add supporting macros for new
988 2021-04-26 Thomas Schwinge <thomas@codesourcery.com>
989 Nathan Sidwell <nathan@codesourcery.com>
990 Tom de Vries <vries@codesourcery.com>
991 Julian Brown <julian@codesourcery.com>
992 Kwok Cheung Yeung <kcy@codesourcery.com>
994 * c.opt (Wopenacc-parallelism): New.
996 2021-04-19 Thomas Schwinge <thomas@codesourcery.com>
998 * c.opt (fopenacc-kernels=): Remove.
1000 2021-04-08 Jakub Jelinek <jakub@redhat.com>
1002 * c-warn.c (do_warn_double_promotion): Fix comment typo,
1003 occured -> occurred.
1004 (check_alignment_of_packed_member): Fix a comment typo,
1006 (warn_parm_ptrarray_mismatch): Fix comment typos, os -> of
1007 and onless -> unless.
1008 (warn_parm_array_mismatch): Fix comment typos, declaratation
1009 -> declaration and woud -> would. Fix up comment indentation.
1011 2021-04-08 Martin Sebor <msebor@redhat.com>
1014 * c.opt (Wmismatched-new-delete): Correct spelling.
1016 2021-04-05 Eric Botcazou <ebotcazou@adacore.com>
1018 * c-ada-spec.c (is_simple_enum): Minor tweaks.
1019 (dump_ada_enum_type): Add TYPE and PARENT parameters. For non-simple
1020 enumeral types use again the type name for the enumeration constants.
1021 (dump_ada_node): Adjust call to dump_ada_enum_type.
1022 (dump_nested_type): Likewise.
1024 2021-04-01 Jason Merrill <jason@redhat.com>
1027 * c-opts.c (c_common_post_options): Bump latest_abi_version.
1029 2021-03-25 Jakub Jelinek <jakub@redhat.com>
1032 * c-warn.c (do_warn_duplicated_branches): Pass also
1033 OEP_ADDRESS_OF_SAME_FIELD to operand_equal_p.
1035 2021-03-20 Jakub Jelinek <jakub@redhat.com>
1038 * c-gimplify.c (c_genericize_control_stmt): Handle STATEMENT_LIST.
1040 2021-03-05 Eric Botcazou <ebotcazou@adacore.com>
1042 * c-ada-spec.c (dump_ada_declaration) <TYPE_DECL>: Dump nested types
1043 after entering the separate class package, if any.
1045 2021-03-04 Richard Biener <rguenther@suse.de>
1047 * c-pretty-print.c (c_pretty_printer::direct_abstract_declarator):
1050 2021-03-04 Jakub Jelinek <jakub@redhat.com>
1053 * c-ppoutput.c (print): Change src_line type from int to unsigned.
1054 (token_streamer::stream) Likewise.
1055 (maybe_print_line_1): Likewise. Don't strcmp src_file if src_loc is
1058 2021-03-03 Jakub Jelinek <jakub@redhat.com>
1061 * c-common.c (build_va_arg): Call c_common_mark_addressable_vec
1062 instead of mark_addressable. Fix a comment typo -
1063 neutrallly -> neutrally.
1065 2021-02-28 Jakub Jelinek <jakub@redhat.com>
1068 * c-attribs.c (handle_malloc_attribute): Fix a typo in inform
1069 message - refernced -> referenced. Remove superfluous space before
1070 closing paren of function calls.
1072 2021-02-25 Nathan Sidwell <nathan@acm.org>
1075 * c.opt (-flang-info-module-cmi): Renamed option.
1077 2021-02-19 Nathan Sidwell <nathan@acm.org>
1079 * c.opt (flang-info-module-read, flang-info-module-read=): New.
1081 2021-02-18 H.J. Lu <hjl.tools@gmail.com>
1084 * c-attribs.c (c_common_attribute_table): Add the "retain"
1086 (handle_retain_attribute): New function.
1088 2021-02-16 Marek Polacek <polacek@redhat.com>
1091 * c-attribs.c (handle_assume_aligned_attribute): Check that the
1092 alignment argument is non-negative. Tweak a warning message.
1094 2021-02-12 Martin Sebor <msebor@redhat.com>
1097 * c-warn.c (warn_parm_array_mismatch): Free strings returned from
1098 print_generic_expr_to_str.
1100 2021-02-10 Richard Biener <rguenther@suse.de>
1102 * c-common.c (parse_optimize_options): Free decoded_options.
1104 2021-02-04 emsr <3dw4rd@verizon.net>
1106 * c-cppbuiltin.c (c_cpp_builtins): __cpp_size_t_suffix=202011L.
1108 2021-02-03 Ed Smith-Rowland <3dw4rd@verizon.net>
1110 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_size_t_suffix.
1111 * c-lex.c (interpret_integer): Set node type for size literal.
1113 2021-01-28 Jakub Jelinek <jakub@redhat.com>
1115 * c.opt (-std=c++2a, -std=c++20, -std=gnu++2a, -std=gnu++20): Remove
1116 draft from description.
1117 (-std=c++2b): Fix a pasto, 2020 -> 2023.
1119 2021-01-26 Paul Fee <paul.f.fee@gmail.com>
1121 * c-common.h (cxx_dialect): Add cxx23 as a dialect.
1122 * c.opt: Add options for -std=c++23, std=c++2b, -std=gnu++23
1124 * c-opts.c (set_std_cxx23): New.
1125 (c_common_handle_option): Set options when -std=c++23 is enabled.
1126 (c_common_post_options): Adjust comments.
1127 (set_std_cxx20): Likewise.
1129 2021-01-25 Martin Sebor <msebor@redhat.com>
1132 * c-common.c (check_nonnull_arg): Adjust warning text.
1134 2021-01-17 Martin Sebor <msebor@redhat.com>
1136 * c-pretty-print.c (c_pretty_printer::primary_expression): Don't
1137 assume SSA_NAME_IDENTIFIER evaluates to nonzero.
1139 2021-01-16 Kwok Cheung Yeung <kcy@codesourcery.com>
1141 * c-pragma.h (pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_DETACH.
1142 Redefine PRAGMA_OACC_CLAUSE_DETACH.
1144 2021-01-15 Jakub Jelinek <jakub@redhat.com>
1146 PR tree-optimization/98597
1147 * c-pretty-print.c: Include options.h.
1148 (c_fold_indirect_ref_for_warn): New function.
1149 (print_mem_ref): Use it. If it returns something that has compatible
1150 type and is TBAA compatible with zero offset, print it and return,
1151 otherwise print it using offsetof syntax or array ref syntax. Fix up
1152 printing if MEM_REFs first operand is ADDR_EXPR, or when the first
1153 argument has pointer to array type. Print pointers using the standard
1156 2021-01-12 Martin Sebor <msebor@redhat.com>
1160 * c-pretty-print.c (print_mem_ref): Avoid assuming MEM_REF operand
1161 has pointer type. Remove redundant code. Avoid calling
1162 gimple_canonical_types_compatible_p.
1164 2021-01-07 Martin Sebor <msebor@redhat.com>
1167 * c-pretty-print.c (print_mem_ref): Strip array from access type.
1168 Avoid assuming acces type's size is constant. Correct condition
1169 guarding the printing of a parenthesis.
1171 2021-01-06 Martin Sebor <msebor@redhat.com>
1174 * c-pretty-print.c (c_pretty_printer::primary_expression): For
1175 SSA_NAMEs print VLA names and GIMPLE defining statements.
1176 (print_mem_ref): New function.
1177 (c_pretty_printer::unary_expression): Call it.
1179 2021-01-06 Richard Biener <rguenther@suse.de>
1181 PR tree-optimization/95582
1182 * c-attribs.c (c_common_attribute_table): Add entry for
1183 signed_bool_precision.
1184 (handle_signed_bool_precision_attribute): New.
1186 2020-12-24 Iain Sandoe <iain@sandoe.co.uk>
1188 * c.opt: Add -stdlib= option and enumerations for
1189 libstdc++ and libc++.
1191 2020-12-16 Martin Liska <mliska@suse.cz>
1193 * c.opt: Remove usage of Report.
1195 2020-12-14 Martin Sebor <msebor@redhat.com>
1200 * c-attribs.c (maybe_add_noinline): New function.
1201 (handle_malloc_attribute): Call it. Use ATTR_FLAG_INTERNAL.
1202 Implicitly add attribute noinline to functions not declared inline
1205 2020-12-09 Tobias Burnus <tobias@codesourcery.com>
1207 * c-pragma.c (omp_pragmas): Add 'allocate'.
1208 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_ALLOCATE.
1210 2020-12-08 Jakub Jelinek <jakub@redhat.com>
1213 * c-pragma.c (omp_pragmas): Remove "master".
1214 (omp_pragmas_simd): Add "master".
1216 2020-12-07 Marek Polacek <polacek@redhat.com>
1219 * c-common.c (verify_tree_lim_r): New function.
1220 (verify_sequence_points): Use it. Use nullptr instead of 0.
1222 2020-12-03 Martin Sebor <msebor@redhat.com>
1226 * c-attribs.c (handle_dealloc_attribute): New function.
1227 (handle_malloc_attribute): Handle argument forms of attribute.
1228 * c.opt (-Wmismatched-dealloc): New option.
1229 (-Wmismatched-new-delete): New option.
1231 2020-12-03 Jakub Jelinek <jakub@redhat.com>
1234 * c-common.h (enum rid): Add RID_BUILTIN_BIT_CAST.
1235 * c-common.c (c_common_reswords): Add __builtin_bit_cast.
1237 2020-12-01 JeanHeyd Meneide <phdofthehouse@gmail.com>
1239 * c-cppbuiltin.c (c_cpp_builtins): Add predefined
1240 {__GNUC_EXECUTION_CHARSET_NAME} and
1241 _WIDE_EXECUTION_CHARSET_NAME} macros.
1243 2020-12-01 Nathan Sidwell <nathan@acm.org>
1245 * c-common.c (module, import, export): New internal tokens (with
1247 * c-common.h (RID__MODULE, RID__IMPORT & RID__EXPORT): Enumerate
1249 (D_CXX_MODULES, D_CXX_MODULES_FLAGS): Enable them.
1250 * c-cppbuiltin.c (c_cpp_builtins): Feature macro.
1252 2020-12-01 Nathan Sidwell <nathan@acm.org>
1254 * c-opts.c (c_common_init_options): Ask for module dependencies.
1255 (c_common_handle_option): Handle -Mmodules -Mno-modules.
1256 * c-pch.c (c_common_valid_pch): ... does not play with C++
1258 * c.opt (Mmodules, Mno-modules): New preprocessor dependency
1260 (fmodules-ts, fmodule-header, fmodule-implicit-inline)
1261 (fmodule-only, fmodule-mapper, fmodule-lazy)
1262 (fmodule-version-ignore, Winvalid-imported-macros)
1263 (flang-info-include-translate, flang-info-include-translate-not):
1266 2020-11-28 Eric Botcazou <ebotcazou@adacore.com>
1268 * c-ada-spec.c (dump_nested_type) <RECORD_TYPE>: Remove obsolete code.
1269 (dump_ada_structure): Also deal with convention, unchecked union and
1270 bit-field for nested types. In the latter case, print an Alignment
1271 aspect along with the Pack aspect.
1273 2020-11-25 Martin Sebor <msebor@redhat.com>
1276 * c-attribs.c (handle_patchable_function_entry_attribute): Avoid
1279 2020-11-24 Martin Sebor <msebor@redhat.com>
1281 * c-warn.c (warn_parm_array_mismatch): Avoid invalid redeclarations.
1283 2020-11-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
1285 * c-attribs.c (handle_special_var_sec_attribute): New.
1286 (handle_noinit_attribute): Remove.
1287 (attr_noinit_exclusions): Rename to...
1288 (attr_section_exclusions): ...this, and add "persistent" attribute
1290 (c_common_attribute_table): Add "persistent" attribute.
1292 2020-11-21 Aaron Sawdey <acsawdey@linux.ibm.com>
1294 * c-pretty-print.c (c_pretty_printer::simple_type_specifier):
1295 Treat opaque types like other types.
1296 (c_pretty_printer::direct_abstract_declarator): Opaque types are
1299 2020-11-20 Martin Sebor <msebor@redhat.com>
1301 * c-warn.c (warn_parm_array_mismatch): Bail on invalid redeclarations
1302 with fewer arguments.
1304 2020-11-20 Martin Sebor <msebor@redhat.com>
1307 * c-attribs.c (handle_access_attribute): Handle ATTR_FLAG_INTERNAL.
1308 Error out on invalid modes.
1310 2020-11-20 Jakub Jelinek <jakub@redhat.com>
1313 * c-common.c (check_builtin_function_arguments): Handle
1314 BUILT_IN_CLEAR_PADDING.
1316 2020-11-18 Nathan Sidwell <nathan@acm.org>
1318 * c-lex.c (c_lex_with_flags): CPP_HEADER_NAMEs can now be seen.
1320 2020-11-17 Nathan Sidwell <nathan@acm.org>
1322 * c-common.h (enum c_tree_index): Reorder to place lazy fields
1323 after newly-added CTI_MODULE_HWM.
1325 2020-11-17 Joseph Myers <joseph@codesourcery.com>
1327 * c-cppbuiltin.c (builtin_define_float_constants): Define
1328 "*_IS_IEC_60559__" macros.
1330 2020-11-17 Nathan Sidwell <nathan@acm.org>
1332 * c-lex.c: #include "langhooks.h".
1333 (cb_undef): Maybe call preprocess_undef lang hook.
1334 * c-opts.c (c_common_post_options): Maybe call preprocess_options
1336 (push_command_line_include): Maybe call preprocess_main_file lang
1338 (cb_file_change): Likewise.
1339 * c-ppoutput.c: #include "langhooks.h.
1340 (scan_translation_unit): Maybe call preprocess_token lang hook.
1341 (class do_streamer): New, derive from token_streamer.
1342 (directives_only_cb): Data pointer is do_streamer, call
1343 preprocess_token lang hook.
1344 (scan_translation_unit_directives_only): Use do_streamer.
1345 (print_line_1): Move src_line recording to after string output.
1346 (cb_undef): Maybe call preprocess_undef lang hook.
1348 2020-11-17 Nathan Sidwell <nathan@acm.org>
1350 * c-ppoutput.c (scan_translation_unit): Use token_streamer, remove
1351 code duplicating that functionality.
1353 2020-11-17 Jakub Jelinek <jakub@redhat.com>
1356 * c-common.c (check_builtin_function_arguments)
1357 <case BUILT_IN_ADD_OVERFLOW>: Diagnose when last argument is pointer
1358 to _Atomic. For the TYPE_READONLY case, adjust message to be usable
1359 for more builtins and argument positions.
1361 2020-11-16 Iain Sandoe <iain@sandoe.co.uk>
1364 * stub-objc.c: Include c-common.h to declare enum rid.
1366 2020-11-13 Jakub Jelinek <jakub@redhat.com>
1369 * c-cppbuiltin.c: Include configargs.h.
1370 (c_cpp_builtins): For C++11 and later if THREAD_MODEL_SPEC is not
1371 defined, predefine __STDCPP_THREADS__ to 1 unless thread_model is
1374 2020-11-13 Gergö Barany <gergo@codesourcery.com>
1375 Thomas Schwinge <thomas@codesourcery.com>
1377 * c.opt (fopenacc-kernels): Add.
1379 2020-11-13 Jason Merrill <jason@redhat.com>
1381 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_using_enum.
1383 2020-11-13 Piotr H. Dabrowski <phd@phd.re>
1386 * c-cppbuiltin.c: c_cpp_builtins_optimize_pragma(): use cpp_define_unused()
1388 2020-11-13 Martin Liska <mliska@suse.cz>
1390 * c-attribs.c (build_attr_access_from_parms): Format properly.
1392 2020-11-13 Iain Sandoe <iain@sandoe.co.uk>
1395 * c-common.c (c_common_reswords): null_unspecified, nullable,
1396 nonnull, null_resettable: New keywords.
1397 * c-common.h (enum rid): RID_NULL_UNSPECIFIED, RID_NULLABLE,
1398 RID_NONNULL, RID_NULL_RESETTABLE: New.
1399 (OBJC_IS_PATTR_KEYWORD): Include nullability keywords in the
1400 ranges accepted for property attributes.
1401 * c-attribs.c (handle_objc_nullability_attribute): New.
1402 * c-objc.h (enum objc_property_attribute_group): Add
1403 OBJC_PROPATTR_GROUP_NULLABLE.
1404 (enum objc_property_attribute_kind):Add
1405 OBJC_PROPERTY_ATTR_NULL_UNSPECIFIED, OBJC_PROPERTY_ATTR_NULLABLE,
1406 OBJC_PROPERTY_ATTR_NONNULL, OBJC_PROPERTY_ATTR_NULL_RESETTABLE.
1408 2020-11-13 Iain Sandoe <iain@sandoe.co.uk>
1411 * c-attribs.c (handle_objc_root_class_attribute): New
1412 * c-objc.h (objc_start_class_interface): Add a location
1413 value for the position of the class name.
1414 * c.opt: Add Wobjc-root-class.
1415 * stub-objc.c (objc_start_class_interface): Add a location
1416 value for the position of the class name.
1418 2020-11-12 Joseph Myers <joseph@codesourcery.com>
1420 * c-lex.c (c_common_has_attribute): Take argument std_syntax.
1421 Allow scope for C. Handle standard attributes for C. Do not
1422 accept unscoped attributes if std_syntax and not handled as
1423 standard attributes.
1424 * c-common.h (c_common_has_attribute): Update prototype.
1426 2020-11-12 Nicholas Guriev <guriev-ns@ya.ru>
1429 * c-pch.c (c_common_valid_pch): Use cpp_warning with CPP_W_INVALID_PCH
1430 reason to fix -Werror=invalid-pch and -Wno-error=invalid-pch switches.
1432 2020-11-11 Patrick Palka <ppalka@redhat.com>
1435 * c-opts.c (c_common_post_options): Update latest_abi_version.
1437 2020-11-10 Jakub Jelinek <jakub@redhat.com>
1440 * c-common.h (warn_if_unused_value): Add quiet argument defaulted
1442 * c-warn.c (warn_if_unused_value): Likewise. Pass it down
1443 recursively and just return true instead of warning if it is true.
1444 Handle COMPLEX_EXPR.
1446 2020-11-10 Chung-Lin Tang <cltang@codesourcery.com>
1448 * c-common.h (c_omp_adjust_map_clauses): New declaration.
1449 * c-omp.c (struct map_clause): Helper type for c_omp_adjust_map_clauses.
1450 (c_omp_adjust_map_clauses): New function.
1452 2020-11-09 Marek Polacek <polacek@redhat.com>
1455 * c-common.c (attribute_fallthrough_p): Tweak the warning
1458 2020-11-09 Patrick Palka <ppalka@redhat.com>
1460 * c-pragma.c (handle_pragma_diagnostic): Split the
1461 unknown-option -Wpragmas diagnostic into a warning and a
1462 subsequent note containing a spelling suggestion. Avoid
1463 computing the suggestion if -Wpragmas warnings are being
1466 2020-11-09 Patrick Palka <ppalka@redhat.com>
1469 * c-indentation.c (get_visual_column): Remove location_t
1470 parameter. Move the column-tracking diagnostic code from here
1472 (should_warn_for_misleading_indentation): ... here, before the
1473 early exit for when the loci are not all distinct. Don't pass a
1474 location_t argument to get_visual_column.
1475 (assert_get_visual_column_succeeds): Don't pass a location_t
1476 argument to get_visual_column.
1477 (assert_get_visual_column_fails): Likewise.
1479 2020-11-08 Iain Sandoe <iain@sandoe.co.uk>
1481 * c-common.h (OBJC_IS_PATTR_KEYWORD): Add class to the list
1482 of keywords accepted in @property attribute contexts.
1483 * c-objc.h (enum objc_property_attribute_group): Add
1484 OBJC_PROPATTR_GROUP_CLASS.
1485 (enum objc_property_attribute_kind): Add
1486 OBJC_PROPERTY_ATTR_CLASS.
1488 2020-11-07 Iain Sandoe <iain@sandoe.co.uk>
1490 * c-common.c (c_common_reswords): Add 'atomic' property
1492 * c-common.h (enum rid): Add RID_PROPATOMIC for atomic
1493 property attributes.
1495 2020-11-07 Iain Sandoe <iain@sandoe.co.uk>
1497 * c-attribs.c (handle_nsobject_attribute): New.
1498 * c.opt: Add WNSObject-attribute.
1500 2020-11-06 Iain Sandoe <iain@sandoe.co.uk>
1502 * c-objc.h (enum objc_property_attribute_group): New
1503 (enum objc_property_attribute_kind): New.
1504 (OBJC_PROPATTR_GROUP_MASK): New.
1505 (struct property_attribute_info): Small class encapsulating
1506 parser output from property attributes.
1507 (objc_prop_attr_kind_for_rid): New
1508 (objc_add_property_declaration): Simplify interface.
1509 * stub-objc.c (enum rid): Dummy type.
1510 (objc_add_property_declaration): Simplify interface.
1511 (objc_prop_attr_kind_for_rid): New.
1513 2020-11-06 Nathan Sidwell <nathan@acm.org>
1515 * c-ada-spec.c (collect_ada_nodes): Rename
1516 DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
1517 (collect_ada_node): Likewise.
1518 (dump_forward_type): Likewise.
1519 * c-common.c (set_underlying_type): Rename
1520 DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
1521 (user_facing_original_type, c_common_finalize_early_debug): Likewise.
1523 2020-11-06 Jakub Jelinek <jakub@redhat.com>
1525 * c-common.c (verify_sequence_points): Remove DEBUG_FUNCTION.
1527 2020-11-05 Marek Polacek <polacek@redhat.com>
1530 * c.opt (Wexceptions): New option.
1532 2020-11-05 Marek Polacek <polacek@redhat.com>
1535 * c.opt (Wvexing-parse): New option.
1537 2020-11-04 Jakub Jelinek <jakub@redhat.com>
1540 * c-omp.c (c_omp_split_clauses): Look through array reductions to find
1541 underlying decl to clear in the allocate_head bitmap.
1543 2020-11-04 Iain Sandoe <iain@sandoe.co.uk>
1545 * c-objc.h (objc_non_constant_expr_p): New.
1546 * stub-objc.c (objc_non_constant_expr_p): New.
1548 2020-11-03 Nathan Sidwell <nathan@acm.org>
1550 * c.opt (MQ,MT): Reword description to be make-agnostic.
1552 2020-11-02 Nathan Sidwell <nathan@acm.org>
1554 * c-opts.c (c_common_post_options): Move var decl to its
1555 initialization point.
1557 2020-11-01 Iain Sandoe <iain@sandoe.co.uk>
1559 * c-lex.c (c_lex_with_flags): When combining '@' with a
1560 keyword for Objective-C, combine the location ranges too.
1562 2020-10-30 Qing Zhao <qing.zhao@oracle.com>
1563 H.J.Lu <hjl.tools@gmail.com>
1565 * c-attribs.c (c_common_attribute_table): Add new attribute
1566 zero_call_used_regs.
1567 (handle_zero_call_used_regs_attribute): New function.
1569 2020-10-28 Marek Polacek <polacek@redhat.com>
1572 * c-opts.c (c_common_post_options): In C++20, turn on
1573 -Wdeprecated-enum-enum-conversion and
1574 -Wdeprecated-enum-float-conversion.
1575 * c.opt (Wdeprecated-enum-enum-conversion,
1576 Wdeprecated-enum-float-conversion): New options.
1577 (Wenum-conversion): Allow for C++ too.
1579 2020-10-28 Jakub Jelinek <jakub@redhat.com>
1581 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ALLOCATE.
1582 * c-omp.c: Include bitmap.h.
1583 (c_omp_split_clauses): Handle OMP_CLAUSE_ALLOCATE.
1585 2020-10-26 Ville Voutilainen <ville.voutilainen@gmail.com>
1587 * c-common.c (__is_nothrow_assignable): New.
1588 (__is_nothrow_constructible): Likewise.
1589 * c-common.h (RID_IS_NOTHROW_ASSIGNABLE): New.
1590 (RID_IS_NOTHROW_CONSTRUCTIBLE): Likewise.
1592 2020-10-23 Jan Hubicka <hubicka@ucw.cz>
1594 * c-common.c (c_common_finalize_early_debug): Update for new thunk api.
1596 2020-10-23 Marek Polacek <polacek@redhat.com>
1599 * c-common.c (verify_tree): Handle PAREN_SIZEOF_EXPR.
1600 (c_common_init_ts): Likewise.
1601 * c-common.def (PAREN_SIZEOF_EXPR): New tree code.
1602 * c-common.h (maybe_warn_sizeof_array_div): Declare.
1603 * c-warn.c (sizeof_pointer_memaccess_warning): Unwrap NOP_EXPRs.
1604 (maybe_warn_sizeof_array_div): New function.
1605 * c.opt (Wsizeof-array-div): New option.
1607 2020-10-23 Martin Sebor <msebor@redhat.com>
1610 * c-warn.c (warn_parm_ptrarray_mismatch): Move null test earlier.
1612 2020-10-22 Martin Liska <mliska@suse.cz>
1615 * c-attribs.c (handle_no_stack_protect_function_attribute): New.
1616 (handle_stack_protect_attribute): Add error message for a
1617 no_stack_protector function.
1619 2020-10-22 Martin Liska <mliska@suse.cz>
1621 * c-cppbuiltin.c (c_cpp_builtins): Use the stack_protector enum.
1623 2020-10-22 Jan Hubicka <hubicka@ucw.cz>
1625 * c-gimplify.c: Include tree-nested.h
1626 (c_genericize): Update for new nested function info.
1628 2020-10-14 Martin Sebor <msebor@redhat.com>
1631 * c-attribs.c (build_attr_access_from_parms): Wrap chain of VLA
1632 bounds in an extra list.
1634 2020-10-05 Richard Biener <rguenther@suse.de>
1635 Jakub Jelinek <jakub@redhat.com>
1638 * c-pretty-print.c: Include langhooks.h.
1639 (c_pretty_printer::postfix_expression): Handle TARGET_MEM_REF as
1641 (c_pretty_printer::expression): Handle TARGET_MEM_REF as
1643 (c_pretty_printer::unary_expression): Handle TARGET_MEM_REF.
1645 2020-09-30 Martin Sebor <msebor@redhat.com>
1648 * c-attribs.c (append_access_attr): Use the function declaration
1649 location for a warning about an attribute access argument.
1651 2020-09-29 Marek Polacek <polacek@redhat.com>
1654 * c.opt (Wrange-loop-construct): New option.
1656 2020-09-23 Martin Sebor <msebor@redhat.com>
1659 * c-warn.c (warn_parm_ptrarray_mismatch): Handle more invalid input.
1661 2020-09-23 Marek Polacek <polacek@redhat.com>
1664 * c-gimplify.c (c_genericize): Only call do_warn_duplicated_branches_r
1665 after loops and other structured control constructs have been lowered.
1667 2020-09-22 Jakub Jelinek <jakub@redhat.com>
1669 * c.opt (Wbuiltin-declaration-mismatch): Fix typo in variable name:
1670 warn_builtin_declaraion_mismatch -> warn_builtin_declaration_mismatch.
1672 2020-09-21 Marek Polacek <polacek@redhat.com>
1674 * c.opt (Wctad-maybe-unsupported): New option.
1676 2020-09-19 Martin Sebor <msebor@redhat.com>
1679 * c-common.h (warn_parm_array_mismatch): Declare new function.
1680 (has_attribute): Move declaration of an existing function.
1681 (build_attr_access_from_parms): Declare new function.
1682 * c-warn.c (parm_array_as_string): Define new function.
1683 (plus_one): Define new function.
1684 (warn_parm_ptrarray_mismatch): Define new function.
1685 (warn_parm_array_mismatch): Define new function.
1686 (vla_bound_parm_decl): New function.
1687 * c.opt (-Warray-parameter, -Wvla-parameter): New options.
1688 * c-pretty-print.c (pp_c_type_qualifier_list): Don't print array type
1690 (c_pretty_printer::direct_abstract_declarator): ...but instead print
1691 them in brackets here. Also print [static]. Strip extraneous
1692 expressions from VLA bounds.
1694 2020-09-19 Martin Sebor <msebor@redhat.com>
1697 * c-attribs.c (c_common_attribute_table): Add "arg spec" attribute.
1698 (handle_argspec_attribute): New function.
1699 (get_argument, get_argument_type): New functions.
1700 (append_access_attrs): Add overload. Handle internal attribute
1701 representation in addition to external.
1702 (handle_access_attribute): Handle internal attribute representation
1703 in addition to external.
1704 (build_attr_access_from_parms): New function.
1706 2020-09-19 Sandra Loosemore <sandra@codesourcery.com>
1708 * c-gimplify.c (genericize_c_loop): Rewrite to match
1709 c_finish_loop in c-typeck.c.
1711 2020-09-19 Sandra Loosemore <sandra@codesourcery.com>
1713 * c-common.c (c_block_may_fallthrough): New, split from
1714 cxx_block_may_fallthrough in the cp front end.
1715 (c_common_init_ts): Move handling of loop and switch-related
1716 statements here from the cp front end.
1717 * c-common.def (FOR_STMT, WHILE_STMT, DO_STMT): Move here from
1719 (BREAK_STMT, CONTINUE_STMT, SWITCH_STMT): Likewise.
1720 * c-common.h (c_block_may_fallthru): Declare.
1721 (bc_state_t): Move here from cp front end.
1722 (save_bc_state, restore_bc_state): Declare.
1723 (c_genericize_control_stmt): Declare.
1724 (WHILE_COND, WHILE_BODY): Likewise.
1725 (DO_COND, DO_BODY): Likewise.
1726 (FOR_INIT_STMT, FOR_COND, FOR_EXPR, FOR_BODY, FOR_SCOPE): Likewise.
1727 (SWITCH_STMT_COND, SWITCH_STMT_BODY): Likewise.
1728 (SWITCH_STMT_TYPE, SWITCH_STMT_SCOPE): Likewise.
1729 (SWITCH_STMT_ALL_CASES_P, SWITCH_STMT_NO_BREAK_P): Likewise.
1730 (LABEL_DECL_BREAK, LABEL_DECL_CONTINUE): Likewise.
1731 * c-dump.c (dump_stmt): Copy from cp front end.
1732 (c_dump_tree): Move code to handle structured loop and switch
1733 tree nodes here from cp front end.
1734 * c-gimplify.c: Adjust includes.
1735 (enum bc_t, bc_label, begin_bc_block, finish_bc_block): Move from
1737 (save_bc_state, restore_bc_state): New functions using old code
1739 (get_bc_label, expr_loc_or_loc): Move from cp front end.
1740 (genericize_c_loop): Move from cp front end.
1741 (genericize_for_stmt, genericize_while_stmt): Likewise.
1742 (genericize_do_stmt, genericize_switch_stmt): Likewise.
1743 (genericize_continue_stmt, genericize_break_stmt): Likewise.
1744 (genericize_omp_for_stmt): Likewise.
1745 (c_genericize_control_stmt): New function using code split from
1747 (c_genericize_control_r): New.
1748 (c_genericize): Call walk_tree with c_genericize_control_r.
1749 * c-pretty-print.c (c_pretty_printer::statement): Move code to handle
1750 structured loop and switch tree nodes here from cp front end.
1752 2020-09-17 Patrick Palka <ppalka@redhat.com>
1755 * c-indentation.c (should_warn_for_misleading_indentation): Move
1756 declarations of local variables closer to their first use.
1757 Handle virtual token locations by resolving them to their
1758 respective macro expansion points. If all three tokens are
1759 produced from the same macro expansion, then instead use their
1760 loci within the macro definition.
1762 2020-09-16 Martin Sebor <msebor@redhat.com>
1766 * c-attribs.c (validate_attr_args): New function.
1767 (validate_attr_arg): Same.
1768 (handle_section_attribute): Call it. Introduce a local variable.
1769 (handle_alloc_size_attribute): Same.
1770 (handle_alloc_align_attribute): Same.
1772 2020-09-14 Jakub Jelinek <jakub@redhat.com>
1774 * c-attribs.c (handle_optimize_attribute): Adjust
1775 cl_optimization_save, cl_optimization_restore and
1776 build_optimization_node callers.
1777 * c-pragma.c (handle_pragma_optimize): Adjust
1778 build_optimization_node caller.
1779 (handle_pragma_push_options): Adjust
1780 build_optimization_node and build_target_option_node callers.
1781 (handle_pragma_pop_options, handle_pragma_reset_options):
1782 Adjust cl_optimization_restore callers.
1784 2020-08-28 Martin Sebor <msebor@redhat.com>
1786 * c.opt (Wstringop-overread): New option.
1788 2020-08-11 Jakub Jelinek <jakub@redhat.com>
1791 * c-common.c (get_atomic_generic_size): Require that first argument's
1792 type points to a complete type and use tree_fits_uhwi_p instead of
1793 just INTEGER_CST TREE_CODE check for the TYPE_SIZE_UNIT.
1795 2020-07-31 Martin Sebor <msebor@redhat.com>
1798 * c-common.c (check_function_arguments_recurse): Return early when
1799 no-warning bit is set.
1801 2020-07-31 Richard Biener <rguenther@suse.de>
1804 * c-common.h (c_common_finalize_early_debug): Declare.
1805 * c-common.c: Include debug.h.
1806 (c_common_finalize_early_debug): finalize_early_debug langhook
1807 implementation generating debug for extern declarations.
1809 2020-07-27 Nathan Sidwell <nathan@acm.org>
1811 * c-common.c (try_to_locate_new_include_insertion_point): Use
1812 strcmp, not pointer equality.
1814 2020-07-25 Martin Sebor <msebor@redhat.com>
1817 * c-common.c (check_nonnull_arg): Print note only when warning was
1820 2020-07-22 Tobias Burnus <tobias@codesourcery.com>
1822 * c-omp.c (c_finish_omp_critical): Check for no name but
1823 nonzero hint provided.
1825 2020-07-20 Jason Merrill <jason@redhat.com>
1827 * c-cppbuiltin.c (c_cpp_builtins): Update
1828 __cpp_nontype_template_args for C++20.
1830 2020-07-20 Martin Sebor <msebor@redhat.com>
1833 * c.opt: Remove stray text.
1835 2020-07-14 Lewis Hyatt <lhyatt@gmail.com>
1838 * c-indentation.c (should_warn_for_misleading_indentation): Get
1839 global tabstop from the new source.
1840 * c-opts.c (c_common_handle_option): Remove handling of -ftabstop, which
1841 is now a common option.
1844 2020-07-08 Eric Botcazou <ebotcazou@adacore.com>
1846 * c.opt (Wscalar-storage-order): Add explicit variable.
1848 2020-07-07 Nathan Sidwell <nathan@acm.org>
1850 * c-opts.c (c_common_post_options): Add 'injecting' arg to
1852 (c_finish_options): Add linemap_line_start calls for builtin and cmd
1853 maps. Force token position to line_table's highest line.
1854 * c-ppoutput.c (print_line_1): Refactor, print line zero.
1855 (cb_define): Always increment source line.
1857 2020-07-06 Martin Sebor <msebor@redhat.com>
1860 * c-common.c (check_function_nonnull): Avoid checking syntesized calls
1861 to stub lambda objects with null this pointer.
1862 (check_nonnull_arg): Handle C++ nullptr.
1864 2020-07-02 Jason Merrill <jason@redhat.com>
1865 Jakub Jelinek <jakub@redhat.com>
1867 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_consteval.
1869 2020-06-30 Jakub Jelinek <jakub@redhat.com>
1872 * c-common.c (check_function_arguments_recurse): Don't crash on
1873 calls to internal functions.
1875 2020-06-28 Martin Sebor <msebor@redhat.com>
1878 * c-common.c (struct nonnull_arg_ctx): Add members.
1879 (check_function_nonnull): Use nonnull_arg_ctx as argument. Handle
1880 C++ member functions specially. Consider the this pointer implicitly
1882 (check_nonnull_arg): Use location of argument when available.
1883 (check_function_arguments): Use nonnull_arg_ctx as argument.
1885 2020-06-27 Jakub Jelinek <jakub@redhat.com>
1888 * c-common.c (pointer_int_sum): Use TYPE_OVERFLOW_UNDEFINED instead of
1889 !TYPE_UNSIGNED check to see if we can apply distributive law and handle
1890 smaller precision intop operands separately.
1892 2020-06-26 Marek Polacek <polacek@redhat.com>
1894 * c-opts.c (c_common_init_options): Default to gnu++17.
1896 2020-06-17 Jonathan Wakely <jwakely@redhat.com>
1899 * c-common.c (get_atomic_generic_size): Check cv-qualifiers in
1902 2020-06-16 Jakub Jelinek <jakub@redhat.com>
1904 * c-common.h (c_omp_check_loop_iv_exprs): Add an int argument.
1905 * c-omp.c (struct c_omp_check_loop_iv_data): Add maybe_nonrect and
1907 (c_omp_is_loop_iterator): New function.
1908 (c_omp_check_loop_iv_r): Use it. Add support for silent scanning
1909 if outer loop iterator is present. Perform duplicate checking through
1910 hash_set in the function rather than expecting caller to do that.
1911 Pass NULL instead of d->ppset to walk_tree_1.
1912 (c_omp_check_nonrect_loop_iv): New function.
1913 (c_omp_check_loop_iv): Use it. Fill in new members, allow
1914 non-rectangular loop forms, diagnose multiple associated loops with
1915 the same iterator. Pass NULL instead of &pset to walk_tree_1.
1916 (c_omp_check_loop_iv_exprs): Likewise.
1918 2020-06-10 Martin Liska <mliska@suse.cz>
1920 PR tree-optimization/92860
1921 * c-attribs.c (handle_optimize_attribute):
1922 Save global options and compare it after parsing of function
1924 * c-pragma.c (opt_stack::saved_global_options): New field.
1925 (handle_pragma_push_options): Save global_options.
1926 (handle_pragma_pop_options): Compare them after pop.
1928 2020-06-09 Jakub Jelinek <jakub@redhat.com>
1931 * c-pretty-print.c (c_pretty_printer::unary_expression): Handle the
1932 case when MEM_REF's first argument has type pointer to incomplete type.
1934 2020-06-05 Jason Merrill <jason@redhat.com>
1936 * c-pretty-print.c (pp_c_additive_expression): Handle negative
1937 operand to POINTER_PLUS_EXPR.
1939 2020-06-04 Martin Sebor <msebor@redhat.com>
1943 * c-attribs.c (append_access_attrs): Handle attr_access::none.
1944 (handle_access_attribute): Same.
1946 2020-06-03 Mark Wielaard <mark@klomp.org>
1948 * known-headers.cc (get_cp_stdlib_header_for_string_macro_name):
1950 * known-headers.h (get_cp_stdlib_header_for_string_macro_name):
1951 New function declaration.
1953 2020-06-03 Mark Wielaard <mark@klomp.org>
1955 * known-headers.cc (get_string_macro_hint): New function.
1956 (get_stdlib_header_for_name): Use get_string_macro_hint.
1957 (get_c_stdlib_header_for_string_macro_name): New function.
1958 * known-headers.h (get_c_stdlib_header_for_string_macro_name):
1959 New function declaration.
1961 2020-06-03 Tobias Burnus <tobias@codesourcery.com>
1963 * c-common.h (c_omp_predetermined_mapping): Declare.
1964 * c-omp.c (c_omp_predetermined_mapping): New.
1966 2020-05-22 Mark Wielaard <mark@klomp.org>
1968 * known-headers.cc (get_stdlib_header_for_name): Add a new
1969 stdlib_hint array for stdbool and stdint.
1971 2020-05-22 Mark Wielaard <mark@klomp.org>
1973 * known-headers.cc (get_stdlib_header_for_name): Return
1974 "<stdbool.h>" for "bool", "true" or "false" when STDLIB_C and
1977 2020-05-20 Nathan Sidwell <nathan@acm.org>
1979 * c-common.c (try_to_locate_new_include_insertion_point): Revert change.
1981 * c-common.c (try_to_locate_new_include_insertion_point): Use
1982 strcmp to compare filenames.
1983 * c-lex.c (init_c_lex): Move declaration to initialization.
1984 * c-opts.c (handle_deferred_opts): Move cpp_get_deps call into
1985 deferred count loop.
1987 2020-05-15 Jason Merrill <jason@redhat.com>
1989 * c-opts.c (set_std_cxx20): Set flag_coroutines.
1991 2020-05-13 Jason Merrill <jason@redhat.com>
1993 * c.opt (std=c++20): Make c++2a the alias.
1994 (std=gnu++20): Likewise.
1995 * c-common.h (cxx_dialect): Change cxx2a to cxx20.
1997 * c-cppbuiltin.c: Adjust.
1998 * c-ubsan.c: Adjust.
2001 2020-05-12 Eric Botcazou <ebotcazou@adacore.com>
2003 * c-ada-spec.c (dump_ads): Output pragma Warnings ("U"); on entry.
2005 2020-05-08 Nathan Sidwell <nathan@acm.org>
2007 Reimplement directives only processing.
2008 * c-ppoutput.c (token_streamer): Ne.
2009 (directives_only_cb): New. Swallow ...
2010 (print_lines_directives_only): ... this.
2011 (scan_translation_unit_directives_only): Reimplment using the
2012 published interface.
2014 2020-05-07 Marek Polacek <polacek@redhat.com>
2016 * c-format.c (badwords): Add "nonstatic".
2018 202-05-07 Jakub Jelinek <jakub@redhat.com>
2021 * c-common.c (speculation_safe_value_resolve_params): Return false if
2022 error_operand_p (val2).
2023 (resolve_overloaded_builtin) <case BUILT_IN_SPECULATION_SAFE_VALUE_N>:
2024 Remove extraneous semicolon.
2026 2020-05-06 qing zhao <qing.zhao@oracle.com>
2029 * c-indentation.c (get_visual_column): Add a hint to use the new
2030 -flarge-source-files option.
2032 2020-05-05 Stefan Schulze Frielinghaus <stefansf@linux.ibm.com>
2034 * c-attribs.c (handle_vector_size_attribute): Add attribute
2035 nonnull for argument args in order to silence warning of
2036 uninitialized variable usage. Since this is local to the
2037 compilation unit and thus cannot be checked at call sides by the
2038 compiler, added an assert statement in order to verify this.
2040 2020-05-01 H.J. Lu <hongjiu.lu@intel.com>
2043 * c-attribs.c (handle_patchable_function_entry_attribute): Limit
2044 value to USHRT_MAX (65535).
2046 2020-04-29 Jakub Jelinek <jakub@redhat.com>
2048 * c-format.c (PP_FORMAT_CHAR_TABLE): Add %{ and %}.
2050 2020-04-27 Jakub Jelinek <jakub@redhat.com>
2053 * c-common.c (resolve_overloaded_builtin): Return error_mark_node for
2054 fncode == BUILT_IN_NONE before initialization of first_param.
2056 2020-04-23 Marek Polacek <polacek@redhat.com>
2059 * c-attribs.c (find_tm_attribute): Use get_attribute_name instead of
2062 2020-04-14 Patrick Palka <ppalka@redhat.com>
2065 * c-pretty-print.c (pp_c_pointer) <case REFERENCE_TYPE>: Print a double
2066 ampersand if it's an rvalue reference type.
2068 2020-04-13 Martin Sebor <msebor@redhat.com>
2071 * c-pretty-print.c (c_pretty_printer::direct_abstract_declarator): Avoid
2072 printing array bound for flexible array members.
2074 2020-04-13 Iain Sandoe <iain@sandoe.co.uk>
2076 * c-cppbuiltin.c (c_cpp_builtins): Update coroutines builtin
2079 2020-04-02 Richard Biener <rguenther@suse.de>
2082 * c-opts.c (c_common_post_options): Enable -ffinite-loops
2083 for -O2 and C++11 or newer.
2085 2020-03-28 Patrick Palka <ppalka@redhat.com>
2087 * c.opt: Add -fconcepts-diagnostics-depth.
2089 2020-03-27 Martin Sebor <msebor@redhat.com>
2092 * c-attribs.c (handle_copy_attribute): Avoid passing expressions
2093 to decl_attributes. Make handling of different kinds of entities
2096 2020-03-27 Martin Sebor <msebor@redhat.com>
2099 * c-attribs.c (handle_access_attribute): Avoid setting TYPE_ATTRIBUTES
2102 2020-03-23 Jakub Jelinek <jakub@redhat.com>
2105 * c-warn.c (warnings_for_convert_and_check): For expr and/or
2106 result being COMPOUND_EXPRs, skip to ultimate rhs.
2108 2020-03-20 Richard Sandiford <richard.sandiford@arm.com>
2111 * c-common.c (c_common_type_for_mode): Before using a registered
2112 built-in type, check that the vectorness of the type matches
2113 the vectorness of the mode.
2115 2020-03-17 Jakub Jelinek <jakub@redhat.com>
2117 * c-common.c (resolve_overloaded_builtin): Fix up duplicated word
2118 issue in a diagnostic message.
2120 2020-03-15 Lewis Hyatt <lhyatt@gmail.com>
2122 * c.opt: Avoid redundancy in the help text.
2124 2020-03-02 Marek Polacek <polacek@redhat.com>
2126 PR c++/93958 - add missing -std=gnu++20.
2127 * c.opt: Add -std=gnu++20.
2129 2020-03-01 Martin Sebor <msebor@redhat.com>
2132 * c-attribs.c (append_access_attrs): Correctly handle attribute.
2133 (handle_access_attribute): Same.
2135 2020-02-25 Jakub Jelinek <jakub@redhat.com>
2138 * c-pragma.c (handle_pragma_diagnostic): Add missing ? after
2139 "did you mean" hint in diagnostics.
2141 2020-02-15 Jason Merrill <jason@redhat.com>
2143 * c.opt: Add -std=c++20.
2145 2020-02-14 Eric Botcazou <ebotcazou@adacore.com>
2147 * c-ada-spec.c: Include bitmap.h.
2148 (dump_ada_double_name): Rename into...
2149 (dump_anonymous_type_name): ...this. Always use the TYPE_UID.
2150 (dump_ada_array_type): Adjust to above renaming. Robustify.
2151 (dump_nested_types_1): New function copied from... Add dumped_types
2152 parameter and pass it down to dump_nested_type.
2153 (dump_nested_types): ...this. Remove parent parameter. Just call
2154 dump_nested_types_1 on an automatic bitmap.
2155 (dump_nested_type): Add dumped_types parameter.
2156 <ARRAY_TYPE>: Do not dump it if already present in dumped_types.
2157 Adjust recursive calls and adjust to above renaming.
2158 (dump_ada_declaration): Adjust call to dump_nested_types.
2159 Tidy up and adjust to above renaming.
2160 (dump_ada_specs): Initialize and release bitmap obstack.
2162 2020-02-10 Martin Sebor <msebor@redhat.com>
2165 * c-attribs.c (handle_access_attribute): Correct off-by-one mistakes.
2167 2020-02-10 Jakub Jelinek <jakub@redhat.com>
2170 * c-format.c (check_plain): Fix up last argument of strncasecmp.
2171 Remove useless extra test.
2173 2020-02-03 Julian Brown <julian@codesourcery.com>
2174 Tobias Burnus <tobias@codesourcery.com>
2176 * c-cppbuiltin.c (c_cpp_builtins): Update _OPENACC define to 201711.
2178 2020-01-29 Jason Merrill <jason@redhat.com>
2181 * c-attribs.c (check_cxx_fundamental_alignment_constraints): Remove.
2183 2020-01-23 Jason Merrill <jason@redhat.com>
2185 * c-warn.c (conversion_warning): Change -Wsign-conversion handling.
2187 2020-01-23 Martin Sebor <msebor@redhat.com>
2190 * c-common.c (check_function_arguments): Avoid overlap checking
2191 of sprintf functions.
2193 2020-01-22 Jason Merrill <jason@redhat.com>
2195 PR testsuite/93391 - PR 40752 test fails with unsigned plain char.
2197 * c-warn.c (conversion_warning): Check operands only after checking
2198 the whole expression. Don't check second operand of + for sign.
2200 2020-01-21 Jason Merrill <jason@redhat.com>
2201 Manuel López-Ibáñez <manu@gcc.gnu.org>
2203 PR c++/40752 - useless -Wconversion with short +=.
2204 * c.opt (-Warith-conversion): New.
2205 * c-warn.c (conversion_warning): Recurse for operands of
2206 operators. Only warn about the whole expression with
2209 2020-01-21 Jason Merrill <jason@redhat.com>
2211 * c-common.c (unsafe_conversion_p): Don't warn, return UNSAFE_SIGN.
2212 * c-warn.c (conversion_warning): Warn about UNSAFE_SIGN.
2214 2020-01-20 Nathan Sidwell <nathan@acm.org>
2216 PR preprocessor/80005
2217 * c-cppbuiltins.c (c_cpp_builtins): Don't define __has_include{,_next}.
2219 2020-01-18 Iain Sandoe <iain@sandoe.co.uk>
2221 * c-common.c (co_await, co_yield, co_return): New.
2222 * c-common.h (RID_CO_AWAIT, RID_CO_YIELD,
2223 RID_CO_RETURN): New enumeration values.
2224 (D_CXX_COROUTINES): Bit to identify coroutines are active.
2225 (D_CXX_COROUTINES_FLAGS): Guard for coroutine keywords.
2226 * c-cppbuiltin.c (__cpp_coroutines): New cpp define.
2227 * c.opt (fcoroutines): New command-line switch.
2229 2020-01-10 David Malcolm <dmalcolm@redhat.com>
2231 * c-format.c (local_event_ptr_node): New.
2232 (PP_FORMAT_CHAR_TABLE): Add entry for "%@".
2233 (init_dynamic_diag_info): Initialize local_event_ptr_node.
2234 * c-format.h (T_EVENT_PTR): New define.
2236 2020-01-10 Martin Sebor <msebor@redhat.com>
2239 * c-attribs.c (append_access_attrs): Validate against the translated
2240 access string rather than the human-readable representation.
2242 2020-01-01 Jakub Jelinek <jakub@redhat.com>
2244 Update copyright years.
2246 2019-12-20 Eric Botcazou <ebotcazou@adacore.com>
2248 * c-ada-spec.h (decl_sloc): Delete.
2249 * c-ada-spec.c (decl_sloc): Make static.
2251 2019-12-19 Julian Brown <julian@codesourcery.com>
2253 * c-common.h (c_omp_map_clause_name): Add prototype.
2254 * c-omp.c (c_omp_map_clause_name): New function.
2255 * c-pragma.h (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ATTACH and
2256 PRAGMA_OACC_CLAUSE_DETACH.
2258 2019-12-19 Julian Brown <julian@codesourcery.com>
2259 Maciej W. Rozycki <macro@codesourcery.com>
2260 Tobias Burnus <tobias@codesourcery.com>
2261 Thomas Schwinge <thomas@codesourcery.com>
2263 * c-pragma.h (pragma_omp_clause): Add
2264 PRAGMA_OACC_CLAUSE_NO_CREATE.
2266 2019-12-17 Martin Sebor <msebor@redhat.com>
2269 * c.opt (-Wmismatched-tags, -Wredundant-tags): New options.
2271 2019-12-11 David Malcolm <dmalcolm@redhat.com>
2273 * c-pretty-print.c (c_pretty_printer::clone): New vfunc
2275 * c-pretty-print.h (c_pretty_printer::clone): New vfunc decl.
2277 2019-12-09 David Malcolm <dmalcolm@redhat.com>
2279 * c-format.c (range_label_for_format_type_mismatch::get_text):
2280 Replace label_text ctor called with true with label_text::take.
2282 2019-12-09 David Malcolm <dmalcolm@redhat.com>
2284 * c-format.c (selftest::test_type_mismatch_range_labels): Remove
2285 initial newline from expected outputs.
2286 * c-opts.c (c_diagnostic_finalizer): Add pp_newline call before
2287 call to diagnostic_show_locus.
2289 2019-12-06 Jakub Jelinek <jakub@redhat.com>
2291 * c-cppbuiltin.c (c_cpp_builtins): Don't define __cpp_consteval for
2294 2019-12-05 Marek Polacek <polacek@redhat.com>
2295 Jakub Jelinek <jakub@redhat.com>
2297 PR c++/91353 - P1331R2: Allow trivial default init in constexpr contexts.
2298 * c-cppbuiltin.c (c_cpp_builtins): Adjust the value of __cpp_constexpr.
2300 2019-12-05 Marek Polacek <polacek@redhat.com>
2302 PR c++/92271 - make __is_same alias for __is_same_as.
2303 * c-common.c: Add __is_same, an alias for __is_same_as.
2305 2019-12-03 Marek Polacek <polacek@redhat.com>
2307 PR c++/91363 - P0960R3: Parenthesized initialization of aggregates.
2308 * c-cppbuiltin.c (c_cpp_builtins): Predefine
2309 __cpp_aggregate_paren_init=201902 for -std=c++2a.
2311 2019-11-30 Jan Hubicka <hubicka@ucw.cz>
2313 * c-attribs.c (handle_symver_attribute): New function
2314 (c_common_attributes): Add symver.
2316 2019-11-30 Richard Sandiford <richard.sandiford@arm.com>
2318 * c-common.c (pointer_int_sum): Use verify_type_context to check
2319 whether the target allows pointer arithmetic for the types involved.
2320 (c_sizeof_or_alignof_type, c_alignof_expr): Use verify_type_context
2321 to check whether the target allows sizeof and alignof operations
2322 for the types involved.
2324 2019-11-27 Jason Merrill <jason@redhat.com>
2326 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_deduction_guides.
2328 2019-11-26 Jakub Jelinek <jakub@redhat.com>
2331 * c-attribs.c (handle_mode_attribute): Add mode attribute to
2334 2019-11-25 Joseph Myers <joseph@codesourcery.com>
2337 * c-common.c (c_common_type_for_mode): Handle decimal
2338 floating-point types being NULL_TREE.
2339 * c-format.c (get_format_for_type_1): Handle specified types being
2341 * c-lex.c (interpret_float): Give an error for decimal
2342 floating-point constants when decimal floating-point not
2345 2019-11-23 Jakub Jelinek <jakub@redhat.com>
2348 * c-attribs.c (append_access_attrs): Avoid buffer overflow. Avoid
2349 memory leak. Use XNEWVEC macro. Use auto_diagnostic_group to
2350 group warning with inform together.
2351 (handle_access_attribute): Formatting fix.
2353 2019-11-22 Jakub Jelinek <jakub@redhat.com>
2356 * c-common.h (identifier_global_tag): Declare.
2357 * c-format.c (get_pointer_to_named_type): Renamed to ...
2358 (get_named_type): ... this. Use identifier_global_tag instead of
2359 identifier_global_value, handle the return value being a TYPE_P.
2360 (init_dynamic_diag_info): Adjust get_pointer_to_named_type callers
2361 to call get_named_type instead. Formatting fixes.
2363 Implement P1902R1, Missing feature-test macros 2017-2019.
2364 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_init_captures
2365 and __cpp_generic_lambdas for -std=c++2a. Define
2366 __cpp_designated_initializers, __cpp_constexpr_in_decltype and
2367 __cpp_consteval for -std=c++2a. Remove a FIXME comment about
2368 __cpp_concepts for -std=c++2a.
2370 2019-11-22 Martin Sebor <msebor@redhat.com>
2373 * c-attribs.c (handle_access_attribute): New function.
2374 (c_common_attribute_table): Add new attribute.
2375 (get_argument_type): New function.
2376 (append_access_attrs): New function.
2377 (get_nonnull_operand): Rename...
2378 (get_attribute_operand): ...to this.
2379 * c-common.c (get_nonnull_operand): Rename...
2380 (get_attribute_operand): ...to this.
2382 2019-11-21 Joseph Myers <joseph@codesourcery.com>
2384 * c-attribs.c (handle_fallthrough_attribute): Use pedwarn instead
2387 2019-11-19 Joseph Myers <joseph@codesourcery.com>
2389 * c-common.c (attribute_fallthrough_p): In C, use pedwarn not
2390 warning for standard attributes mixed with fallthrough attributes.
2392 2019-11-15 Joseph Myers <joseph@codesourcery.com>
2394 * c-attribs.c (handle_fallthrough_attribute): Remove static.
2395 * c-common.h (handle_fallthrough_attribute): Declare.
2397 2019-11-15 Joseph Myers <joseph@codesourcery.com>
2399 * c-attribs.c (handle_deprecated_attribute): Remove static.
2400 * c-common.h (handle_deprecated_attribute): Declare.
2402 2019-11-14 Joseph Myers <joseph@codesourcery.com>
2404 * c-lex.c (lex_charconst): Make CPP_UTF8CHAR constants unsigned
2407 2019-11-14 Jakub Jelinek <jakub@redhat.com>
2409 * c-omp.c (c_omp_check_context_selector): Add nvidia to the list of
2412 * c-omp.c (c_omp_check_context_selector): Handle name lists
2413 containing string literals. Don't diagnose atomic_default_mem_order
2414 with multiple props.
2416 2019-11-13 Joseph Myers <joseph@codesourcery.com>
2418 * c-cppbuiltin.c (builtin_define_float_constants): Also define
2419 NORM_MAX constants. Update call to get_max_float.
2420 (LAZY_HEX_FP_VALUES_CNT): Update value to include NORM_MAX
2423 2019-11-13 Eric Botcazou <ebotcazou@adacore.com>
2425 * c-ada-spec.c (get_underlying_decl): Do not look through typedefs.
2426 (dump_forward_type): Do not generate a declaration for function types.
2427 (dump_nested_type) <ARRAY_TYPE>: Do not generate a nested declaration
2428 of the component type if it is declared in another file.
2430 2019-11-12 Martin Liska <mliska@suse.cz>
2432 * c-opts.c (c_common_post_options):
2433 Use SET_OPTION_IF_UNSET.
2435 2019-11-12 Maciej W. Rozycki <macro@codesourcery.com>
2436 Frederik Harwath <frederik@codesourcery.com>
2439 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_SERIAL enumeration
2441 * c-pragma.c (oacc_pragmas): Add "serial" entry.
2443 2019-11-08 Richard Sandiford <richard.sandiford@arm.com>
2445 * c-common.h (gnu_vector_type_p): New function.
2446 * c-common.c (c_build_vec_perm_expr): Require __builtin_shuffle
2447 vectors to satisfy gnu_vector_type_p.
2448 (c_build_vec_convert): Likewise __builtin_convertvector.
2449 (convert_vector_to_array_for_subscript): Likewise when applying
2450 implicit vector to array conversion.
2451 (scalar_to_vector): Likewise when converting vector-scalar
2452 operations to vector-vector operations.
2454 2019-11-08 Joseph Myers <joseph@codesourcery.com>
2456 * c.opt (Wold-style-definition): Initialize to -1.
2457 * c-opts.c (c_common_post_options): Set warn_old_style_definition
2458 to flag_isoc2x if not set explicitly.
2460 2019-11-07 Joseph Myers <joseph@codesourcery.com>
2462 * c-attribs.c (parse_tm_stmt_attr): Handle scoped attributes.
2464 2019-11-05 Jason Merrill <jason@redhat.com>
2466 * c-opts.c (c_common_post_options): -fconcepts-ts implies
2469 2019-11-04 Kamlesh Kumar <kamleshbhalui@gmail.com>
2471 * c-opts.c (c_common_post_options): Update
2474 2019-11-02 Jakub Jelinek <jakub@redhat.com>
2476 * c-common.h (c_omp_get_context_selector): Remove.
2477 * c-omp.c (c_omp_get_context_selector): Moved to omp-general.c
2478 and renamed to omp_get_context_selector.
2480 * c-omp.c (c_omp_mark_declare_variant): Use
2481 omp_context_selector_set_compare.
2483 PR c++/88335 - Implement P1073R3: Immediate functions
2484 * c-common.h (enum rid): Add RID_CONSTEVAL.
2485 * c-common.c (c_common_reswords): Add consteval.
2487 2019-11-01 Martin Sebor <msebor@redhat.com>
2493 * c-pretty-print.c (direct_abstract_declarator): Print
2494 bound in zero-length arrays.
2495 * c.opt (-Wzero-length-bounds): New option.
2497 2019-10-30 Nathan Sidwell <nathan@acm.org>
2499 * c-cppbuiltin.c (c_cpp_builtins): Add 'L' suffix to feature
2502 2019-10-28 Martin Sebor <msebor@redhat.com>
2505 * c-common.c (c_common_nodes_and_builtins): Call c_define_builtins
2506 even when only preprocessing.
2507 * c-common.h (names_builtin_p): Declare new function.
2508 * c-lex.c (init_c_lex): Set has_builtin.
2509 (c_common_has_builtin): Define a new function.
2510 * c-ppoutput.c (init_pp_output): Set has_builtin.
2512 2019-10-24 Jakub Jelinek <jakub@redhat.com>
2514 * c-common.h (c_omp_context_selector_matches): Remove.
2515 * c-omp.c (c_omp_context_selector_matches): Remove.
2516 * c-attribs.c (c_common_attribute_table): Add
2517 "omp declare target {host,nohost,block}" attributes.
2519 2019-10-17 JeanHeyd Meneide <phdofthehouse@gmail.com>
2521 * c-lex.c (c_common_has_attribute): Update nodiscard value.
2523 2019-10-14 Richard Sandiford <richard.sandiford@arm.com>
2525 * c-common.h (user_facing_original_type_p): Declare.
2526 * c-common.c: Include c-spellcheck.h.
2527 (user_facing_original_type_p): New function.
2529 2019-10-12 Jakub Jelinek <jakub@redhat.com>
2531 * c-common.h (c_omp_mark_declare_variant,
2532 c_omp_context_selector_matches): Declare.
2533 * c-omp.c: Include attribs.h, gimplify.h, cgraph.h, symbol-summary.h
2535 (c_omp_get_context_selector): Support second argument NULL.
2536 (c_omp_mark_declare_variant, c_omp_context_selector_matches): New
2538 * c-attribs.c (c_common_attribute_table): Remove "omp declare variant"
2539 attribute, add "omp declare variant base" and
2540 "omp declare variant variant" attributes.
2542 2019-10-11 Joseph Myers <joseph@codesourcery.com>
2544 * c.opt (Wc11-c2x-compat): Add CPP(cpp_warn_c11_c2x_compat)
2545 CppReason(CPP_W_C11_C2X_COMPAT).
2547 2019-10-11 Joseph Myers <joseph@codesourcery.com>
2549 * c-common.c (c_common_reswords): Do not use D_EXT for _Decimal32,
2550 _Decimal64 and _Decimal128.
2552 2019-10-10 Joseph Myers <joseph@codesourcery.com>
2554 * c-cppbuiltin.c (c_cpp_builtins): Do not define macros for DFP
2555 types if DFP not supported.
2557 2019-10-10 Jakub Jelinek <jakub@redhat.com>
2559 * c-common.h (c_omp_check_context_selector,
2560 c_omp_get_context_selector): Declare.
2561 * c-omp.c (c_omp_declare_simd_clauses_to_numbers): Fix spelling
2562 in diagnostic message.
2563 (c_omp_check_context_selector, c_omp_get_context_selector): New
2565 * c-attribs.c (c_common_attribute_table): Add "omp declare variant"
2567 (handle_omp_declare_variant_attribute): New function.
2569 2019-10-09 Martin Sebor <msebor@redhat.com>
2571 PR tree-optimization/90879
2572 * c.opt (-Wstring-compare): New option.
2574 2019-10-08 Andrew Sutton <asutton@lock3software.com>
2575 Jason Merrill <jason@redhat.com>
2577 Update the concepts implementation to conform to the C++20
2578 specification, improve compile times, and generally clean up
2581 * c-cppbuiltin.c (c_cpp_builtins): Use new feature test values for
2582 concepts when -std=c++2a. Bump __cpp_concepts to 201907.
2583 * c.opt: Add -Wconcepts-ts.
2584 * c-opts.c (c_common_post_options): Warn when -fconcepts is used
2585 with -std=c++2a. Disable warning for -fconcepts in C++20 mode.
2586 (set_std_cxx2a): Enable concepts by default.
2588 2019-10-08 Joseph Myers <joseph@codesourcery.com>
2590 * c-opts.c (c_common_post_options): Set
2591 -fno-fp-int-builtin-inexact for C2X.
2593 2019-10-05 Jakub Jelinek <jakub@redhat.com>
2595 PR c++/91369 - Implement P0784R7: constexpr new
2596 * c-cppbuiltin.c (c_cpp_builtins): Predefine
2597 __cpp_constexpr_dynamic_alloc=201907 for -std=c++2a.
2599 2019-10-04 Joseph Myers <joseph@codesourcery.com>
2602 * c-format.c (C_STD_VER): Handle C2x.
2603 (C_STD_NAME): Likewise.
2604 (strftime_flag_specs): Add 'O' modifier with 'p' flag.
2605 (time_char_table): Use separate entry for 'B' and 'b', with 'O'
2606 modifier allowed and 'p' flag.
2607 * c-format.h (enum format_std_version): Add STD_C2X.
2608 (struct format_char_info): Mention 'p' in comment on flags2.
2610 2019-10-01 David Malcolm <dmalcolm@redhat.com>
2612 * c-opts.c (c_diagnostic_finalizer): Temporarily clear prefix when
2613 calling diagnostic_show_locus, rather than destroying it afterwards.
2615 2019-10-01 Jakub Jelinek <jakub@redhat.com>
2618 * c-warn.c (check_alignment_of_packed_member): Ignore FIELD_DECLs
2619 with NULL DECL_FIELD_OFFSET.
2621 2019-10-01 Richard Sandiford <richard.sandiford@arm.com>
2623 * c-pretty-print.c (pp_c_specifier_qualifier_list): If a vector type
2624 has a type name, use it in preference to the __vector syntax.
2626 2019-09-30 Richard Sandiford <richard.sandiford@arm.com>
2628 * c-pretty-print.c (pp_c_parameter_type_list): Avoid printing
2629 two spaces between a comma and "...".
2631 2019-09-27 Jakub Jelinek <jakub@redhat.com>
2634 * c-common.h (c_omp_predefined_variable): Declare.
2635 * c-omp.c (c_omp_predefined_variable): New function.
2636 (c_omp_predetermined_sharing): Return OMP_CLAUSE_DEFAULT_SHARED
2637 for predefined variables.
2639 2019-09-27 Richard Sandiford <richard.sandiford@arm.com>
2641 * c-common.h (build_function_call_vec): Take the original
2642 function decl as an optional final parameter.
2643 (check_builtin_function_arguments): Take the original function decl.
2644 * c-common.c (check_builtin_function_arguments): Likewise.
2645 Handle all built-in functions, not just BUILT_IN_NORMAL ones.
2646 Use targetm.check_builtin_call to check BUILT_IN_MD functions.
2648 2019-09-15 Jason Merrill <jason@redhat.com>
2650 * c-warn.c (warn_logical_operator): Strip location wrappers. Don't
2651 fold_for_warn in "|| mask" warning.
2653 2019-09-10 Martin Liska <mliska@suse.cz>
2655 * c.opt: Use newly added WarnRemoved.
2657 2019-09-09 Martin Liska <mliska@suse.cz>
2659 * c.opt: Update comment of removed
2660 options that are preserved only for backward
2663 2019-09-06 Martin Liska <mliska@suse.cz>
2666 * c-common.c: Remove definition of flag_use_repository.
2667 * c-common.h: Likewise.
2668 * c-opts.c (c_common_handle_option):
2669 Do not handle OPT_frepo option.
2670 * c.opt: Mark the option with Deprecated.
2672 2019-09-04 Marek Polacek <polacek@redhat.com>
2674 * c.opt (fdeduce-init-list): Ignored.
2676 2019-09-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2679 * c.opt (Wenum-conversion): New option.
2681 2019-09-03 Jozef Lawrynowicz <jozef.l@mittosystems.com>
2683 * c-attribs.c (handle_section_attribute): Call the
2684 handle_generic_attribute target hook after performing target
2685 independent processing.
2686 (handle_noinit_attribute): Likewise.
2688 2019-09-03 Ian Lance Taylor <iant@golang.org>
2690 * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Always expand
2691 when using -fgo-dump-spec.
2693 2019-09-02 Martin Liska <mliska@suse.cz>
2696 * c-common.c (fname_as_string): Use cxx_printable_name for
2697 __PRETTY_FUNCTION__ same as was used before r265711.
2699 2019-08-28 Marek Polacek <polacek@redhat.com>
2701 Implement P1152R4: Deprecating some uses of volatile.
2703 * c-opts.c (c_common_post_options): Enable -Wvolatile by
2704 default for C++2a, unless -Wno-deprecated.
2705 * c.opt (Wvolatile): New warning.
2707 2019-08-28 Marek Polacek <polacek@redhat.com>
2709 PR c++/91360 - Implement C++20 P1143R2: constinit.
2710 * c-common.c (c_common_reswords): Add constinit and __constinit.
2711 (keyword_is_decl_specifier): Handle RID_CONSTINIT.
2712 * c-common.h (enum rid): Add RID_CONSTINIT, RID_FIRST_CXX20, and
2715 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_constinit.
2716 * c-format.c (cxx_keywords): Add "constinit".
2717 * c.opt (Wc++2a-compat, Wc++20-compat): New options.
2719 2019-08-27 Jakub Jelinek <jakub@redhat.com>
2722 * c-common.c (verify_tree): For LSHIFT_EXPR, RSHIFT_EXPR,
2723 COMPONENT_REF and ARRAY_REF in cxx_dialect >= cxx17 mode handle it
2724 like COMPOUND_EXPR rather than normal expression.
2726 2019-08-23 Iain Sandoe <iain@sandoe.co.uk>
2729 * c-lex.c (c_lex_with_flags): Don't call
2730 c_common_no_more_pch () from here.
2732 2019-08-23 Jakub Jelinek <jakub@redhat.com>
2735 * c-common.c (c_ts18661_flt_eval_method): Use flag_excess_precision
2736 instead of flag_excess_precision_cmdline.
2737 * c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): Likewise.
2738 * c-opts.c (c_common_post_options): Likewise.
2740 2019-08-22 Martin Sebor <msebor@redhat.com>
2743 * c-common.c (braced_list_to_string): Add argument and overload.
2744 Handle flexible length arrays and unions.
2746 2019-08-21 Eric Botcazou <ebotcazou@adacore.com>
2748 * c-ada-spec.c (dump_ada_function_declaration): Be prepared for broken
2749 function declarations where arguments are missing. Rename variables.
2751 2019-08-15 Richard Biener <rguenther@suse.de>
2753 * c-common.c (c_stddef_cpp_builtins): When the GIMPLE FE is
2754 enabled, define __SIZETYPE__.
2756 2019-08-14 Christophe Lyon <christophe.lyon@linaro.org>
2758 * c-attribs.c (c_common_attribute_table): Add "noinit" entry. Add
2759 exclusion with "section" attribute.
2760 (attr_noinit_exclusions): New table.
2761 (handle_noinit_attribute): New function.
2763 2019-08-13 Richard Sandiford <richard.sandiford@arm.com>
2766 * c-common.c (resolve_overloaded_builtin): Use
2767 copy_decl_built_in_function.
2769 2019-08-13 Martin Sebor <msebor@redhat.com>
2772 * c-format.c (printf_length_specs): Set FMT_LEN_w for "w".
2773 (asm_fprintf_length_spec): Same.
2774 * c-format.h (format_lengths): Add FMT_LEN_w.
2776 2019-08-10 Jakub Jelinek <jakub@redhat.com>
2778 * c-pragma.h (enum pragma_omp_clause): Add
2779 PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
2781 2019-08-07 Jakub Jelinek <jakub@redhat.com>
2783 * c-pragma.h (enum pragma_omp_clause): Add
2784 PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR. Set PRAGMA_OACC_CLAUSE_USE_DEVICE
2785 equal to PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR instead of being a separate
2788 2019-08-05 Marek Polacek <polacek@redhat.com>
2790 PR c++/91338 - Implement P1161R3: Deprecate a[b,c].
2791 * c-opts.c (c_common_post_options): Enable -Wcomma-subscript by
2792 default for C++2a, unless -Wno-deprecated.
2793 * c.opt (Wcomma-subscript): New warning.
2795 2019-07-20 Jakub Jelinek <jakub@redhat.com>
2797 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_LOOP.
2798 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_BIND.
2799 * c-pragma.c (omp_pragmas_simd): Add PRAGMA_OMP_LOOP entry.
2800 * c-common.h (enum c_omp_clause_split): Add C_OMP_CLAUSE_SPLIT_LOOP.
2801 * c-omp.c (c_omp_split_clauses): Add support for 4 new combined
2802 constructs with the loop construct.
2804 2019-07-13 Jakub Jelinek <jakub@redhat.com>
2807 * c-omp.c (c_omp_split_clauses): Fix a pasto in
2808 OMP_CLAUSE_REDUCTION_TASK handling.
2810 2019-07-12 Jakub Jelinek <jakub@redhat.com>
2812 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ORDER.
2813 * c-omp.c (c_omp_split_clauses): Handle splitting of OMP_CLAUSE_ORDER.
2815 2019-07-09 Martin Sebor <msebor@redhat.com>
2818 * c-opts.c (handle_deferred_opts): Change class-key of PODs to struct
2819 and others to class.
2820 * c-pretty-print.h: Same.
2822 2019-07-09 Martin Sebor <msebor@redhat.com>
2825 * c-format.c (check_argument_type): Change class-key from class to
2826 struct and vice versa to match convention and avoid -Wclass-is-pod
2827 and -Wstruct-no-pod.
2828 * c-pretty-print.h: Same.
2830 2019-07-03 Martin Liska <mliska@suse.cz>
2832 * c-common.c (try_to_locate_new_include_insertion_point): Remove
2835 2019-07-03 Jakub Jelinek <jakub@redhat.com>
2837 * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_REDUCTION_INSCAN
2838 clauses on OMP_FOR rather than OMP_PARALLEL when OMP_FOR is combined
2841 2019-07-02 qing zhao <qing.zhao@oracle.com>
2843 PR preprocessor/90581
2844 * c-opts.c (c_common_handle_option): Handle -fmax-include-depth.
2845 * c.opt: Add new option -fmax-include-depth.
2847 2019-06-26 Jason Merrill <jason@redhat.com>
2849 PR c++/55442 - memory-hog with highly recursive constexpr.
2850 * c.opt (fconstexpr-loop-limit): New.
2852 2019-06-25 Jakub Jelinek <jakub@redhat.com>
2855 * c-omp.c (c_finish_omp_atomic): Allow tree_invariant_p in addition
2856 to SAVE_EXPR in first operand of a COMPOUND_EXPR.
2858 2019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
2860 * c-common.c (c_common_nodes_and_builtins): Define
2861 alternate "__intN__" name for "__intN" types.
2863 2019-06-24 Jan Hubicka <jh@suse.cz>
2865 * c-common.c (braced_lists_to_strings): Check that
2866 type is array or integer prior checking string flag.
2868 2019-06-21 Matthew Beliveau <mbelivea@redhat.com>
2870 PR c++/90875 - added -Wswitch-outside-range option
2871 * c.opt (Wswitch-outside-range): Added new option.
2872 * c-warn.c (c_do_switch_warnings): Use OPT_Wswitch-outside-range.
2874 2019-06-21 Marek Polacek <polacek@redhat.com>
2876 PR c++/90953 - ICE with -Wmissing-format-attribute.
2877 * c-common.c (check_function_arguments_recurse): Use
2879 (check_missing_format_attribute): Likewise.
2881 2019-06-19 Marek Polacek <polacek@redhat.com>
2883 PR c++/60364 - noreturn after first decl not diagnosed.
2884 * c-attribs.c (handle_noreturn_attribute): No longer static.
2885 * c-common.h (handle_noreturn_attribute, attr_noreturn_exclusions):
2887 * c-format.c (check_function_format): Use get_attribute_name.
2889 2019-06-19 Martin Sebor <msebor@redhat.com>
2891 PR translation/90156
2892 * c-format.c (function_format_info::format_type): Adjust type.
2893 (function_format_info::is_raw): New member.
2894 (decode_format_type): Adjust signature. Handle "raw" diag attributes.
2895 (decode_format_attr): Adjust call to decode_format_type.
2896 Avoid a redundant call to convert_format_name_to_system_name.
2897 Avoid abbreviating the word "arguments" in a diagnostic.
2898 (format_warning_substr): New function.
2899 (avoid_dollar_number): Quote dollar sign in a diagnostic.
2900 (finish_dollar_format_checking): Same.
2901 (check_format_info): Same.
2902 (struct baltoks_t): New.
2903 (c_opers, c_keywords, cxx_keywords, badwords, contrs): New arrays.
2904 (maybe_diag_unbalanced_tokens, check_tokens, check_plain): New
2906 (check_format_info_main): Call check_plain. Use baltoks_t. Call
2907 maybe_diag_unbalanced_tokens.
2908 (handle_format_attribute): Spell out the word "arguments" in
2911 2019-06-11 Matthew Beliveau <mbelivea@redhat.com>
2913 PR c++/90449 - add -Winaccessible-base option.
2914 * c.opt (Winaccessible-base): New option.
2916 2019-06-10 Jakub Jelinek <jakub@redhat.com>
2918 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_SCAN.
2919 * c-pragma.c (omp_pragmas_simd): Add #pragma omp scan.
2920 * c-omp.c (c_omp_split_clauses): Diagnose inscan reductions on
2921 combined/composite constructs where it is not allowed. Copy over
2922 OMP_CLAUSE_REDUCTION_INSCAN.
2924 2019-06-05 Martin Sebor <msebor@redhat.com>
2926 * c-attribs.c (handle_mode_attribute): Adjust quoting and hyphenation.
2927 (handle_alias_ifunc_attribute): Same.
2928 (handle_copy_attribute): Same.
2929 (handle_weakref_attribute): Same.
2930 (handle_nonnull_attribute): Same.
2931 * c-warn.c (warn_for_sign_compare): Same.
2932 (warn_for_restrict): Same.
2935 2019-06-05 Martin Sebor <msebor@redhat.com>
2937 * c-pragma.c (handle_pragma_weak): Adjust quoting in a diagnostic.
2938 * c.opt (-Wformat-diag): Remove a spurious period.
2940 2019-05-29 Jakub Jelinek <jakub@redhat.com>
2943 * c-common.c (check_builtin_function_arguments)
2944 <case BUILTIN_*_OVERFLOW>: Diagnose pointer to const qualified integer
2947 2019-05-23 Eric Botcazou <ebotcazou@adacore.com>
2949 * c-ada-spec.c (compare_node): Compare the DECL_UIDs as a last resort.
2951 2019-05-22 Martin Liska <mliska@suse.cz>
2954 * c-attribs.c (handle_copy_attribute): Do not copy
2955 target_clones attribute.
2957 2019-05-21 Eric Botcazou <ebotcazou@adacore.com>
2959 * c-ada-spec.h (enum cpp_operation): Add IS_ASSIGNMENT_OPERATOR.
2960 * c-ada-spec.c (print_assignment_operator): New function.
2961 (dump_ada_declaration) <FUNCTION_DECL>: Call it do dump explicit copy
2962 assignment operators declared as methods and filter out the others.
2964 2019-05-17 Thomas Schwinge <thomas@codesourcery.com>
2967 * c-attribs.c (c_common_attribute_table): Set min_len to -1 for
2968 "omp declare target".
2970 2019-05-16 Martin Sebor <msebor@redhat.com>
2972 * c-attribs.c (handle_no_sanitize_attribute): Quote identifiers,
2973 keywords, operators, and types in diagnostics.
2974 (handle_scalar_storage_order_attribute): Same.
2975 (handle_mode_attribute): Same.
2976 (handle_visibility_attribute): Same.
2977 (handle_assume_aligned_attribute): Same.
2978 (handle_no_split_stack_attribute): Same.
2979 * c-common.c (shorten_compare): Same.
2980 (c_common_truthvalue_conversion): Same.
2981 (cb_get_source_date_epoch): Same.
2982 * c-lex.c (cb_def_pragma): Quote keywords, operators, and types
2984 (interpret_float): Same.
2985 * c-omp.c (c_finish_omp_for): Same.
2986 * c-opts.c (c_common_post_options): Same.
2987 * c-pch.c (c_common_pch_pragma): Same.
2988 * c-pragma.c (pop_alignment): Same.
2989 (handle_pragma_pack): Same.
2990 (apply_pragma_weak): Same.
2991 (handle_pragma_weak): Same.
2992 (handle_pragma_scalar_storage_order): Same.
2993 (handle_pragma_redefine_extname): Same.
2994 (add_to_renaming_pragma_list): Same.
2995 (maybe_apply_renaming_pragma): Same.
2996 (push_visibility): Same.
2997 (handle_pragma_visibility): Same.
2998 (handle_pragma_optimize): Same.
2999 (handle_pragma_message): Same.
3000 * c-warn.c (warn_for_omitted_condop): Same.
3001 (lvalue_error): Same.
3003 2019-05-15 Richard Biener <rguenther@suse.de>
3006 * c-common.c (c_common_mark_addressable_vec): Also mark
3007 a COMPOUND_LITERAL_EXPR_DECL addressable similar to
3010 2019-05-06 Nathan Sidwell <nathan@acm.org>
3012 * c-opts.c (handle_defered_opts): Rename struct deps to struc mkdeps.
3014 2019-04-30 Nathan Sidwell <nathan@acm.org>
3016 * c-common.c (c_common_init_ts): Use MARK_TS_EXP. Mark SIZEOF_EXPR.
3018 2019-04-30 Martin Liska <mliska@suse.cz>
3020 * c-pragma.c (handle_pragma_diagnostic): Provide hints
3021 for unknown options.
3023 2019-04-26 Richard Sandiford <richard.sandiford@arm.com>
3025 * c-warn.c (strict_aliasing_warning): Apply COMPLETE_TYPE_P to
3026 the pointer target rather than the pointer itself.
3028 2019-04-19 Jakub Jelinek <jakub@redhat.com>
3031 * c-common.h (c_add_case_label): Remove orig_type and outside_range_p
3033 (c_do_switch_warnings): Remove outside_range_p argument.
3034 * c-common.c (check_case_bounds): Removed.
3035 (c_add_case_label): Remove orig_type and outside_range_p arguments.
3036 Don't call check_case_bounds. Fold low_value as well as high_value.
3037 * c-warn.c (c_do_switch_warnings): Remove outside_range_p argument.
3038 Check for case labels outside of range of original type here and
3041 2019-04-12 Jakub Jelinek <jakub@redhat.com>
3043 PR translation/90041
3044 * c.opt (-fhandle-exceptions): Use %< and %> around option names
3045 in the Warn diagnostics.
3048 * c-attribs.c (handle_patchable_function_entry_attribute): Add
3049 function comment. Warn if arguments of the attribute are not positive
3052 2019-04-09 Eric Botcazou <ebotcazou@adacore.com>
3054 * c-ada-spec.c (print_destructor): Deal with deleting destructors.
3055 (dump_ada_declaration) <FUNCTION_DECL>: Likewise.
3057 2019-04-07 Eric Botcazou <ebotcazou@adacore.com>
3059 * c-ada-spec.c (is_float128): New predicate extracted from...
3060 (dump_ada_node) <COMPLEX_TYPE>: Use it to recognize __cfloat128.
3061 <REAL_TYPE>: ...here. Call it.
3063 2019-04-05 David Malcolm <dmalcolm@redhat.com>
3066 * c-warn.c (check_address_or_pointer_of_packed_member): Add
3067 auto_diagnostic_group. Guard inform calls by result of
3070 2019-04-05 Marek Polacek <polacek@redhat.com>
3072 PR c++/89973 - -Waddress-of-packed-member ICE with invalid conversion.
3073 * c-warn.c (check_address_or_pointer_of_packed_member): Check the type
3076 2019-04-03 Jason Merrill <jason@redhat.com>
3078 PR c++/86586 - -fcompare-debug=-Wsign-compare.
3079 * c-warn.c (warn_for_sign_compare): Call fold_for_warn.
3081 2019-04-01 Martin Sebor <msebor@redhat.com>
3084 * c-attribs.c (handle_copy_attribute): Handle references and
3085 non-constant expressions.
3087 2019-03-22 Jakub Jelinek <jakub@redhat.com>
3090 * c.opt (-fconstexpr-ops-limit=): New option.
3092 2019-03-21 Jakub Jelinek <jakub@redhat.com>
3094 * c-common.c (per_file_includes_t): Use false as Lazy in hash_set
3097 2019-03-19 Martin Sebor <msebor@redhat.com>
3099 PR tree-optimization/89688
3100 * c-common.c (braced_list_to_string): Make static.
3101 (braced_lists_to_strings): Define new function.
3102 * c-common.h (braced_list_to_string): Remove.
3103 (braced_lists_to_strings): Declare.
3105 2019-03-12 Martin Liska <mliska@suse.cz>
3107 * c-opts.c (c_common_handle_option): Wrap option with %< and %>.
3109 2019-03-11 Martin Liska <mliska@suse.cz>
3111 * c-opts.c (c_common_post_options): Wrap apostrophes
3112 in gcc internal format with %'.
3114 2019-03-11 Martin Liska <mliska@suse.cz>
3116 * c-attribs.c (handle_nocf_check_attribute): Wrap an option name
3117 in a string format message and fix GNU coding style.
3118 * c-common.c (vector_types_convertible_p): Likewise.
3119 (c_build_vec_perm_expr): Likewise.
3120 * c-indentation.c (get_visual_column): Likewise.
3121 * c-opts.c (c_common_handle_option): Likewise.
3122 (c_common_post_options): Likewise.
3123 (sanitize_cpp_opts): Likewise.
3124 * c-pch.c (c_common_pch_pragma): Likewise.
3125 * c-pragma.c (handle_pragma_pack): Likewise.
3127 2019-03-08 Jakub Jelinek <jakub@redhat.com>
3129 PR tree-optimization/89550
3130 * c-common.c (c_common_truthvalue_conversion): Only set
3131 TREE_NO_WARNING if warning_at returned true.
3132 * c-warn.c (overflow_warning, warn_logical_operator): Likewise.
3134 2019-02-25 Sandra Loosemore <sandra@codesourcery.com>
3135 Martin Sebor <msebor@gmail.com>
3137 * c.opt (Wmissing-attributes): Clean up doc string.
3139 2019-02-25 Jakub Jelinek <jakub@redhat.com>
3142 * c-format.c (maybe_read_dollar_number): Compute nargnum in
3143 HOST_WIDE_INT type to avoid overflows and change overflow_flag
3146 2019-02-22 Richard Biener <rguenther@suse.de>
3148 * c-pch.c (no_checksum): Remove.
3149 (pch_init): Remove assertion that executable_checksum is not
3151 (c_common_valid_pch): Likewise.
3153 2019-02-18 Martin Sebor <msebor@redhat.com>
3156 * c-common.c (invalid_array_size_error): Handle cst_size_not_constant.
3158 2019-02-16 David Malcolm <dmalcolm@redhat.com>
3161 * c-common.c (shorten_compare): Call fold_for_warn on op0 when
3162 implementing -Wtype-limits.
3164 2019-02-11 Martin Sebor <msebor@redhat.com>
3167 * c-common.c (invalid_array_size_error): New function.
3168 (valid_array_size_p): Call it. Handle size as well as type.
3169 * c-common.h (valid_constant_size_p): New function.
3170 (enum cst_size_error): New type.
3172 2019-01-31 David Malcolm <dmalcolm@redhat.com>
3175 * known-headers.cc (get_stdlib_header_for_name): Add
3176 {FLT|DBL|LDBL}_{MAX|MIN} to "hints" array.
3178 2019-01-31 Jakub Jelinek <jakub@redhat.com>
3181 * c-pretty-print.c (pp_c_enumeration_constant): Print always as
3182 a C cast in pp_c_flag_gnu_v3 mode.
3184 2019-01-29 Jakub Jelinek <jakub@redhat.com>
3187 * c-common.c (c_common_nodes_and_builtins): Build type variants for
3188 builtin_structptr_types types even for C.
3190 2019-01-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
3192 * c-warn.c (check_address_or_pointer_of_packed_member): Handle the case
3193 when rhs is of array type correctly. Fix handling of nested structures.
3194 Fix handling of indirect_ref together with nop_expr and/or addr_expr.
3195 (check_and_warn_address_or_pointer_of_packed_member): Fix handling of
3196 type casts within nested compound expressions.
3198 2019-01-22 Jakub Jelinek <jakub@redhat.com>
3201 * c-omp.c (c_finish_omp_atomic): For bitfield atomics, update type
3202 variable after using BIT_FIELD_REF.
3204 2019-01-18 H.J. Lu <hongjiu.lu@intel.com>
3208 * c-common.h (warn_for_address_or_pointer_of_packed_member):
3209 Remove the boolean argument.
3210 * c-warn.c (check_address_of_packed_member): Renamed to ...
3211 (check_address_or_pointer_of_packed_member): This. Also
3212 warn pointer conversion.
3213 (check_and_warn_address_of_packed_member): Renamed to ...
3214 (check_and_warn_address_or_pointer_of_packed_member): This.
3215 Also warn pointer conversion.
3216 (warn_for_address_or_pointer_of_packed_member): Remove the
3217 boolean argument. Don't check pointer conversion here.
3219 2019-01-15 Richard Sandiford <richard.sandiford@arm.com>
3222 * c.opt (Wdeprecated): Move documentation and variable to common.opt.
3224 2019-01-14 Jakub Jelinek <jakub@redhat.com>
3226 * c-cppbuiltin.c (c_cpp_builtin): Define __cpp_guaranteed_copy_elision
3227 and __cpp_nontype_template_parameter_auto. Add a comment that
3228 __cpp_template_auto is deprecated.
3230 2019-01-14 Tom Honermann <tom@honermann.net>
3232 Implement P0482R5, char8_t: A type for UTF-8 characters and strings
3233 * c-common.c (c_common_reswords): Add char8_t.
3234 (fix_string_type): Use char8_t for the type of u8 string literals.
3235 (c_common_get_alias_set): char8_t doesn't alias.
3236 (c_common_nodes_and_builtins): Define char8_t as a builtin type in
3238 (c_stddef_cpp_builtins): Add __CHAR8_TYPE__.
3239 (keyword_begins_type_specifier): Add RID_CHAR8.
3240 * c-common.h (rid): Add RID_CHAR8.
3241 (c_tree_index): Add CTI_CHAR8_TYPE and CTI_CHAR8_ARRAY_TYPE.
3242 Define D_CXX_CHAR8_T and D_CXX_CHAR8_T_FLAGS.
3243 Define char8_type_node and char8_array_type_node.
3244 * c-cppbuiltin.c (cpp_atomic_builtins): Predefine
3245 __GCC_ATOMIC_CHAR8_T_LOCK_FREE.
3246 (c_cpp_builtins): Predefine __cpp_char8_t.
3247 * c-lex.c (lex_string): Use char8_array_type_node as the type of
3249 (lex_charconst): Use char8_type_node as the type of CPP_UTF8CHAR.
3250 * c-opts.c: If not otherwise specified, enable -fchar8_t when
3252 * c.opt: Add the -fchar8_t command line option.
3254 2019-01-14 Martin Sebor <msebor@redhat.com>
3257 * c-attribs.c (positional_argument): Call valid_format_string_type_p
3258 and issue errors if it fails.
3259 * c-common.h (valid_format_string_type_p): Declare.
3260 * c-format.c (valid_stringptr_type_p): Rename...
3261 (valid_format_string_type_p): ...to this and make extern.
3262 (handle_format_arg_attribute): Adjust to new name.
3263 (check_format_string): Same.
3265 2019-01-13 H.J. Lu <hongjiu.lu@intel.com>
3267 * c-warn.c (warn_for_address_or_pointer_of_packed_member):
3268 Replace "may may" with "may" in warning message.
3270 2019-01-07 Jakub Jelinek <jakub@redhat.com>
3273 * c-common.h (enum rid): Add RID_BUILTIN_CONVERTVECTOR.
3274 (c_build_vec_convert): Declare.
3275 * c-common.c (c_build_vec_convert): New function.
3277 2019-01-04 Martin Sebor <msebor@redhat.com>
3280 * c-attribs.c (handle_copy_attribute): Avoid copying attribute leaf.
3281 Handle C++ empty throw specification and C11 _Noreturn.
3282 (has_attribute): Also handle C11 _Noreturn.
3284 2019-01-04 Martin Sebor <msebor@redhat.com>
3287 * c-attribs.c (positional_argument): Also accept enumerated types.
3289 2019-01-01 Jakub Jelinek <jakub@redhat.com>
3291 Update copyright years.
3293 2018-12-20 H.J. Lu <hongjiu.lu@intel.com>
3296 * c-common.h (warn_for_address_or_pointer_of_packed_member): New.
3297 * c-warn.c (check_alignment_of_packed_member): New function.
3298 (check_address_of_packed_member): Likewise.
3299 (check_and_warn_address_of_packed_member): Likewise.
3300 (warn_for_address_or_pointer_of_packed_member): Likewise.
3301 * c.opt: Add -Wno-address-of-packed-member.
3303 2018-12-20 David Malcolm <dmalcolm@redhat.com>
3306 * c-warn.c (get_outermost_macro_expansion): New function.
3307 (spelled_the_same_p): Use it to unwind the macro expansions, and
3308 compare the outermost macro in each nested expansion, rather than
3311 2018-12-19 David Malcolm <dmalcolm@redhat.com>
3314 * c-common.h (warn_tautological_cmp): Convert 1st param from
3315 location_t to const op_location_t &.
3316 * c-warn.c (find_array_ref_with_const_idx_r): Call fold_for_warn
3317 when testing for INTEGER_CST.
3318 (warn_tautological_bitwise_comparison): Convert 1st param from
3319 location_t to const op_location_t &; use it to build a
3320 binary_op_rich_location, and use this.
3321 (spelled_the_same_p): New function.
3322 (warn_tautological_cmp): Convert 1st param from location_t to
3323 const op_location_t &. Warn for macro expansions if
3324 spelled_the_same_p. Use binary_op_rich_location.
3326 2018-12-19 David Malcolm <dmalcolm@redhat.com>
3330 * c-common.c (unsafe_conversion_p): Fold any location wrapper.
3331 (verify_tree): Handle location wrappers.
3332 (c_common_truthvalue_conversion): Strip any location wrapper.
3334 (fold_offsetof): Strip any location wrapper.
3335 (complete_array_type): Likewise for initial_value.
3336 (convert_vector_to_array_for_subscript): Call fold_for_warn on the
3337 index before checking for INTEGER_CST.
3338 * c-pretty-print.c (c_pretty_printer::primary_expression): Don't
3339 print parentheses around location wrappers.
3340 * c-warn.c (warn_logical_operator): Call fold_for_warn on op_right
3341 before checking for INTEGER_CST.
3342 (warn_tautological_bitwise_comparison): Call
3343 tree_strip_any_location_wrapper on lhs, rhs, and bitop's operand
3344 before checking for INTEGER_CST.
3345 (readonly_error): Strip any location wrapper.
3346 (warn_array_subscript_with_type_char): Strip location wrappers
3347 before checking for INTEGER_CST. Use the location of the index if
3350 2018-12-06 Jason Merrill <jason@redhat.com>
3352 PR c++/88136 - -Wdeprecated-copy false positives
3353 * c.opt (Wdeprecated-copy-dtor): New.
3354 (Wdeprecated-copy): Move to -Wextra.
3356 2018-11-29 Martin Sebor <msebor@redhat.com>
3360 * c-attribs.c (common_handle_aligned_attribute): Silently avoid setting
3361 alignments to values less than the target requires.
3362 (has_attribute): For attribute aligned consider both the attribute
3363 and the alignment bits.
3364 * c-common.c (c_init_attributes): Optionally issue a warning for
3367 2018-11-28 Martin Sebor <msebor@redhat.com>
3371 * c-warn.c (sizeof_pointer_memaccess_warning): Bail if source
3372 or destination is an error.
3374 2018-11-28 Jakub Jelinek <jakub@redhat.com>
3377 * c-ubsan.c: Include langhooks.h.
3378 (ubsan_instrument_division): Change gcc_assert that main variants
3379 of op0 and op1 types are equal to gcc_checking_assert that the
3380 main variants are compatible types.
3382 2018-11-27 Eric Botcazou <ebotcazou@adacore.com>
3384 * c-ada-spec.c: Include stringpool.h.
3385 (has_static_fields): Return false for incomplete types.
3386 (is_tagged_type): Likewise.
3387 (has_nontrivial_methods): Likewise.
3388 (dump_ada_node) <INTEGER_TYPE>: Deal specifically with __int128.
3389 (struct overloaded_name_hash): New structure.
3390 (struct overloaded_name_hasher): Likewise.
3391 (overloaded_names): New global variable.
3392 (init_overloaded_names): New static function.
3393 (overloaded_name_p): New predicate.
3394 (dump_ada_declaration) <TYPE_DECL>: Tidy up and set TREE_VISITED
3395 on the TYPE_STUB_DECL of the original type of a typedef, if any.
3396 <FUNCTION_DECL>: Bail out for an unsupported overloaded name.
3397 Remove always-true condition and dump forward types.
3398 (dump_ada_specs): Delete overloaded_names.
3400 2018-11-20 Martin Sebor <msebor@redhat.com>
3402 * c-attribs.c (type_for_vector_size): New function.
3403 (type_valid_for_vector_size): Same.
3404 (handle_vector_size_attribute): Move code to the functions above
3406 (validate_attribute, has_attribute): New functions.
3407 * c-common.h (has_attribute): Declare.
3408 (rid): Add RID_HAS_ATTRIBUTE_EXPRESSION.
3409 * c-common.c (c_common_resword): Same.
3411 2018-11-16 Jason Merrill <jason@redhat.com>
3413 * c-lex.c (c_common_has_attribute): Handle likely/unlikely.
3414 * c-attribs.c (attr_cold_hot_exclusions): Make public.
3416 2018-11-16 Jakub Jelinek <jakub@redhat.com>
3419 * c-common.c (fix_string_type): Reject string literals larger than
3420 TYPE_MAX_VALUE (ssizetype) bytes.
3422 2018-11-15 Martin Sebor <msebor@redhat.com>
3426 * c-attribs.c (positional_argument): New function.
3427 (handle_alloc_size_attribute): Use it and simplify.
3428 (handle_alloc_align_attribute): Same.
3429 (handle_assume_aligned_attribute): Same.
3430 (handle_nonnull_attribute): Same.
3431 * c-common.c (check_function_arguments): Pass fntype to
3432 check_function_format.
3433 * c-common.h (check_function_format): Add an argument.
3434 (PosArgFlags, positional_argument): Declare new type and function.
3435 * c-format.c (decode_format_attr): Add arguments.
3436 (check_format_string, get_constant): Same.
3437 (convert_format_name_to_system_name): Adjust.
3439 2018-11-15 David Malcolm <dmalcolm@redhat.com>
3442 * c-opts.c (c_diagnostic_finalizer): Add diagnostic_t param.
3444 2018-11-14 Jakub Jelinek <jakub@redhat.com>
3446 P1236R1 - Signed integers are two's complement
3447 * c-warn.c (maybe_warn_shift_overflow): Don't warn for c++2a.
3448 * c-ubsan.c (ubsan_instrument_shift): Make signed shifts
3449 with in-range second operand well defined for -std=c++2a.
3452 * c-common.c (parse_optimize_options): Allocate option string from
3453 opts_obstack rather than as GC memory. Move the allocation after
3454 warning for invalid option.
3456 2018-11-13 David Malcolm <dmalcolm@redhat.com>
3458 * c-common.c (c_get_substring_location): Update for renaming of
3459 get_source_location_for_substring to get_location_within_string.
3460 * c-lex.c: Replace "source_location" with "location_t".
3461 * c-opts.c: Likewise.
3462 * c-ppoutput.c: Likewise.
3464 2018-11-13 Martin Sebor <msebor@redhat.com>
3467 * c-attribs.c (handle_copy_attribute): Exclude inlining attributes.
3468 (handle_tls_model_attribute): Improve diagnostics.
3470 2018-11-12 Jason Merrill <jason@redhat.com>
3472 * c-cppbuiltin.c (c_cpp_builtins): Define
3473 __cpp_impl_destroying_delete.
3475 * c-cppbuiltin.c (c_cpp_builtins): Change __cpp_explicit_bool to
3476 __cpp_conditional_explicit.
3478 2018-11-09 Martin Sebor <msebor@redhat.com>
3481 * c-attribs.c (handle_copy_attribute): New function.
3483 2018-11-09 Martin Sebor <msebor@redhat.com>
3486 * c-common.c (check_user_alignment): Use MAX_OFILE_ALIGNMENT.
3488 2018-11-08 Jakub Jelinek <jakub@redhat.com>
3490 * c-common.h (c_finish_omp_taskgroup): Add CLAUSES argument.
3491 (c_finish_omp_atomic): Replace bool SEQ_CST argument with
3492 enum omp_memory_order MEMORY_ORDER.
3493 (c_finish_omp_flush): Add MO argument.
3494 (c_omp_depend_t_p, c_finish_omp_depobj): Declare.
3495 (c_finish_omp_for): Add FINAL_P argument.
3496 * c-omp.c: Include memmodel.h.
3497 (c_finish_omp_taskgroup): Add CLAUSES argument. Set
3498 OMP_TASKGROUP_CLAUSES to it.
3499 (c_finish_omp_atomic): Replace bool SEQ_CST argument with
3500 enum omp_memory_order MEMORY_ORDER. Set OMP_ATOMIC_MEMORY_ORDER
3501 instead of OMP_ATOMIC_SEQ_CST.
3502 (c_omp_depend_t_p, c_finish_omp_depobj): New functions.
3503 (c_finish_omp_flush): Add MO argument, if not MEMMODEL_LAST, emit
3504 __atomic_thread_fence call with the given value.
3505 (check_omp_for_incr_expr): Formatting fixes.
3506 (c_finish_omp_for): Add FINAL_P argument. Allow NE_EXPR
3507 even in OpenMP loops, diagnose if NE_EXPR and incr expression
3508 is not constant expression 1 or -1. Transform NE_EXPR loops
3509 with iterators pointers to VLA into LT_EXPR or GT_EXPR loops.
3510 (c_omp_check_loop_iv_r): Look for orig decl of C++ range for
3512 (c_omp_split_clauses): Add support for combined
3513 #pragma omp parallel master and
3514 #pragma omp {,parallel }master taskloop{, simd} constructs.
3515 Handle OMP_CLAUSE_IN_REDUCTION. Handle OMP_CLAUSE_REDUCTION_TASK.
3516 Handle OMP_CLAUSE_NONTEMPORAL. Handle splitting OMP_CLAUSE_IF
3517 also to OMP_SIMD. Copy OMP_CLAUSE_LASTPRIVATE_CONDITIONAL.
3518 (c_omp_predetermined_sharing): Don't return
3519 OMP_CLAUSE_DEFAULT_SHARED for const qualified decls.
3520 * c-pragma.c (omp_pragmas): Add PRAGMA_OMP_DEPOBJ and
3521 PRAGMA_OMP_REQUIRES.
3522 * c-pragma.h (enum pragma_kind): Likewise.
3523 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_NONTEMPORAL
3524 and PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
3526 2018-11-08 David Malcolm <dmalcolm@redhat.com>
3528 * c-format.c (gcc_dump_printf_char_table): Add entry for %f.
3530 2018-11-08 David Malcolm <dmalcolm@redhat.com>
3532 * c-format.c (local_cgraph_node_ptr_node): New variable.
3533 (gcc_dump_printf_char_table): Add entry for %C.
3534 (get_pointer_to_named_type): New function, taken from the handling
3535 code for "gimple *" from...
3536 (init_dynamic_diag_info): ...here. Add handling for
3538 * c-format.h (T_CGRAPH_NODE): New.
3540 2018-10-19 Jason Merrill <jason@redhat.com>
3542 * c-cppbuiltin.c (c_cpp_builtins): Add
3543 __cpp_nontype_template_parameter_class.
3545 2018-10-31 Nathan Sidwell <nathan@acm.org>
3547 * c-opts.c (c_finish_options): Force command line macro
3548 location. Refactor to avoid repeating main debug hook.
3549 (push_command_line_include): Clarify comment.
3551 * c-opts.c (c_finish_options): Adjust cpp_force_token_locations call.
3553 2018-10-30 Martin Sebor <msebor@redhat.com>
3556 * c-format.c (check_format_types): Avoid diagnosing null pointer
3557 arguments to printf-family of functions.
3559 2018-10-30 Marek Polacek <polacek@redhat.com>
3561 Implement P0892R2, explicit(bool).
3562 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_explicit_bool.
3564 2018-10-29 David Malcolm <dmalcolm@redhat.com>
3566 * name-hint.h (name_hint::take_deferred): New member function.
3568 2018-10-29 David Malcolm <dmalcolm@redhat.com>
3571 * c-common.c (check_function_sentinel): Call fold_for_warn on the
3573 (check_function_restrict): Rename param "argarray" to
3574 "unfolded_argarray", and make a copy named "argarray", calling
3575 fold_for_warn on each argument.
3576 (check_function_arguments): Add note about responsibility for
3577 folding the arguments.
3579 2018-10-17 Joseph Myers <joseph@codesourcery.com>
3581 * c-common.c (flag_isoc2x): New variable.
3582 * c-common.h (clk_c): Update comment to reference C2X.
3583 (flag_isoc99, flag_isoc11): Update comments to reference future
3584 standard versions in general.
3585 (flag_isoc2x): Declare.
3586 * c-opts.c (set_std_c2x): New function.
3587 (c_common_handle_option): Handle -std=c2x and -std=gnu2x.
3588 (set_std_c89, set_std_c99, set_std_c11, set_std_c17): Set
3590 * c.opt (Wc11-c2x-compat, std=c2x, std=gnu2x): New options.
3592 2018-10-17 Joseph Myers <joseph@codesourcery.com>
3594 * c.opt (std=c17, std=c18, std=gnu17, std=gnu18, std=iso9899:2017)
3595 (std=iso9899:2018): Document C17 as published in 2018.
3597 2018-10-12 Christophe Lyon <christophe.lyon@linaro.org>
3600 * c-pretty-print.c (c_pretty_printer::constant): Fix typo.
3602 2018-10-11 Will Wray <wjwray@gmail.com>
3605 * c-pretty-print.h (pp_c_type_cast): Prototype.
3606 (pp_c_integer_constant): Likewise.
3607 * c-pretty-print.c (pp_c_type_cast): No longer static.
3608 (pp_c_integer_constant): Likewise.
3609 (pp_c_enumeration_constant): Fix loop termination when finding
3610 name of constant. No longer returns a value. Call
3611 pp_c_integer_constant.
3612 (c_pretty_printer::constant): Update for changes to
3613 pp_c_enumeration_constant.
3615 2018-10-11 Jakub Jelinek <jakub@redhat.com>
3617 * c-lex.c (c_common_has_attribute): Return 201803 instead of 20180312
3618 for no_unique_address.
3620 2018-10-09 David Malcolm <dmalcolm@redhat.com>
3622 * c-common.c (c_option_controlling_cpp_error): Rename to...
3623 (c_option_controlling_cpp_diagnostic): ...this, and convert
3624 "reason" from int to enum.
3625 (c_cpp_error): Rename to...
3626 (c_cpp_diagnostic): ...this, converting level and reason to enums.
3627 * c-common.h (c_cpp_error): Rename to...
3628 (c_cpp_diagnostic): ...this, converting level and reason to enums.
3629 * c-opts.c (c_common_init_options): Update for renaming.
3631 2018-10-08 Richard Sandiford <richard.sandiford@arm.com>
3634 * c-common.c (vector_types_compatible_elements_p): Use
3635 INTEGRAL_TYPE_P instead of checking only for INTEGER_TYPE.
3637 2018-10-04 Vinay Kumar <vinay.kumar@blackfigtech.com>
3639 * c-attribs.c (get_priority): Add a warning flag warn_prio_ctor_dtor
3640 to generate constructor destructor priority warning.
3641 * c.opt (-Wprio-ctor-dtor): New option.
3643 2018-10-01 Jason Merrill <jason@redhat.com>
3645 * c-lex.c (c_common_has_attribute): Add no_unique_address.
3647 2018-10-01 Eric Botcazou <ebotcazou@adacore.com>
3649 * c-ada-spec.c (get_underlying_decl): Get to the main type variant.
3650 (dump_ada_node): Add const keyword.
3652 2018-09-25 Martin Liska <mliska@suse.cz>
3654 * c-common.c (c_common_truthvalue_conversion):
3655 Remove Pascal from documentation.
3657 2018-09-21 Eric Botcazou <ebotcazou@adacore.com>
3659 * c-ada-spec.c: Include diagnostic.h.
3660 (dump_ada_declaration) <RECORD_TYPE>: Issue a warning on packed layout.
3662 2018-09-19 Marek Polacek <polacek@redhat.com>
3664 * c.opt (Wclass-conversion): New.
3666 2018-09-17 David Malcolm <dmalcolm@redhat.com>
3668 * c-format.c (range_label_for_format_type_mismatch::get_text):
3669 Update for new param.
3671 2018-09-17 David Malcolm <dmalcolm@redhat.com>
3673 * c-format.c (format_warning_at_char): Update for introduction of
3674 format_string_diagnostic_t.
3675 (format_type_warning): Likewise.
3677 2018-09-17 Martin Jambor <mjambor@suse.cz>
3680 * c.opt (Wabsolute-value): New.
3682 2018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
3684 * c-common.c (complete_flexible_array_elts): New helper function.
3685 * c-common.h (complete_flexible_array_elts): Declare.
3687 2018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
3689 * c-common.c (braced_list_to_string): Remove eval parameter.
3690 Add some more checks. Always create zero-terminated STRING_CST.
3691 * c-common.h (braced_list_to_string): Adjust prototype.
3693 2018-08-27 David Malcolm <dmalcolm@redhat.com>
3696 * c-common.c (c_cpp_error): Update for conversion of show_caret_p
3698 (maybe_suggest_missing_token_insertion): Likewise.
3699 (maybe_add_include_fixit): Add param "override_location". If set,
3700 and source-printing is enabled, then override the rich_location's
3701 primary location with that of the insertion point for the fix-it
3702 hint, marking it with SHOW_LINES_WITHOUT_RANGE.
3703 * c-common.h (extern void maybe_add_include_fixit): Add bool
3705 * c-format.c (selftest::test_type_mismatch_range_labels): Update
3706 for conversion of show_caret_p to a tri-state.
3707 * c-warn.c (warn_for_restrict): Likewise.
3709 (suggest_missing_header::~suggest_missing_header): Update call to
3710 maybe_add_include_fixit to suggest overriding the location, as it
3713 2018-08-27 Martin Liska <mliska@suse.cz>
3715 * c-common.c (check_function_restrict): Use new function
3716 fndecl_built_in_p and remove check for FUNCTION_DECL if
3718 (check_builtin_function_arguments): Likewise.
3719 (reject_gcc_builtin): Likewise.
3720 * c-warn.c (sizeof_pointer_memaccess_warning): Likewise.
3722 2018-08-26 Marek Polacek <polacek@redhat.com>
3724 PR c++/87029, Implement -Wredundant-move.
3725 * c.opt (Wredundant-move): New option.
3727 2018-08-21 Marek Polacek <polacek@redhat.com>
3729 PR c++/86981, Implement -Wpessimizing-move.
3730 * c.opt (Wpessimizing-move): New option.
3732 2018-08-20 David Malcolm <dmalcolm@redhat.com>
3735 * c-attribs.c (common_handle_aligned_attribute): Add
3736 auto_diagnostic_group instance.
3737 * c-indentation.c (warn_for_misleading_indentation): Likewise.
3738 * c-opts.c (c_common_post_options): Likewise.
3739 * c-warn.c (warn_logical_not_parentheses): Likewise.
3740 (warn_duplicated_cond_add_or_warn): Likewise.
3741 (warn_for_multistatement_macros): Likewise.
3743 2018-08-20 Nathan Sidwell <nathan@acm.org>
3745 * c-ada-spec.c (macro_length, dump_ada_macros): Adjust macro parm
3748 2018-08-17 Nathan Sidwell <nathan@acm.org>
3750 * c-cppbuiltin.c (struct lazy_hex_fp_value_struct): Remove macro
3752 (laxy_hex_fp_value_count): Make unsigned.
3753 (lazy_hex_fp_value): Provided with macro & lazy number. Directly
3754 manipulate the macro.
3755 (builtin_defin_with_hex_fp_value): Adjust callback name, use
3758 2018-08-17 David Malcolm <dmalcolm@redhat.com>
3760 * c-format.c (enum format_type): Add gcc_dump_printf_format_type.
3761 (gcc_dump_printf_length_specs): New.
3762 (gcc_dump_printf_flag_pairs): New.
3763 (gcc_dump_printf_flag_specs): New.
3764 (gcc_dump_printf_char_table): New.
3765 (format_types_orig): Add entry for "gcc_dump_printf".
3766 (init_dynamic_diag_info): Set up length_char_specs and
3767 conversion_specs for gcc_dump_printf_format_type.
3768 (handle_format_attribute): Handle gcc_dump_printf_format_type.
3770 2018-08-17 Nathan Sidwell <nathan@acm.org>
3772 * c-ada-spec.c (macro_length, dump_ada_macros): Constify.
3774 * c-ada-spec.c: Don't #include "cpp-id-data.h"
3775 * c-cppbuiltin.c: Likewise.
3777 2018-08-17 Martin Liska <mliska@suse.cz>
3779 * c.opt: Remove Warn, Init and Report for options with
3780 Ignore/Deprecated flag. Warning is done automatically for
3783 2018-08-16 David Malcolm <dmalcolm@redhat.com>
3786 * c-common.c (selftest::c_family_tests): Call
3787 selftest::c_indentation_c_tests.
3788 * c-common.h (selftest::c_indentation_c_tests): New decl.
3789 * c-indentation.c: Include "selftest.h".
3790 (next_tab_stop): Add "tab_width" param, rather than accessing
3792 (get_visual_column): Likewise. Clarify comment. Bulletproof
3793 against reading past the end of the line.
3794 (get_first_nws_vis_column): Add "tab_width" param.
3795 (detect_intervening_unindent): Likewise.
3796 (should_warn_for_misleading_indentation): Read tab width from
3797 cpp_opts and pass around.
3798 (selftest::test_next_tab_stop): New test.
3799 (selftest::assert_get_visual_column_succeeds): New function.
3800 (ASSERT_GET_VISUAL_COLUMN_SUCCEEDS): New macro.
3801 (selftest::assert_get_visual_column_fails): New function.
3802 (ASSERT_GET_VISUAL_COLUMN_FAILS): New macro.
3803 (selftest::test_get_visual_column): New test.
3804 (selftest::c_indentation_c_tests): New function.
3806 2018-08-16 Nathan Sidwell <nathan@acm.org>
3808 * c-ada-spec.c (count_ada_macro): Use cpp_user_macro_p.
3809 (store_ada_macro): Likewise.
3810 * c-ppoutput.c (cb_used_define, dump_macro): Likewise.
3811 * c-spellcheck.cc (should-suggest_as_macro_p): Likewise,
3813 2018-08-15 David Malcolm <dmalcolm@redhat.com>
3815 * c-format.c: Include "selftest-diagnostic.h" and
3816 "gcc-rich-location.h".
3817 (format_warning_at_char): Pass NULL for new label params of
3819 (class indirection_suffix): New class.
3820 (class range_label_for_format_type_mismatch): New class.
3821 (format_type_warning): Move logic for generating "*" suffix to
3822 class indirection_suffix. Create "fmt_label" and "param_label"
3823 to show their types, and pass them to the
3824 format_warning_at_substring calls.
3825 (selftest::test_type_mismatch_range_labels): New test.
3826 (selftest::c_format_c_tests): Call it.
3828 2018-08-13 Martin Sebor <msebor@redhat.com>
3830 PR tree-optimization/71625
3831 * c-common.c (braced_list_to_string): New function.
3832 * c-common.h (braced_list_to_string): Declare it.
3834 2018-08-08 Nathan Sidwell <nathan@acm.org>
3836 * c-common.c (try_to_locate_new_include_inertion_point): Use
3837 linemap_included_from_linemap.
3838 * c-lex.c (fe_file_change): Use linemap_included_from.
3839 * c-ppoutput.c (pp_file_change): Likewise.
3841 2018-08-01 Martin Sebor <msebor@redhat.com>
3843 PR tree-optimization/86650
3844 * c-format.c (gcc_tdiag_char_table): Update comment for "%G".
3845 (gcc_cdiag_char_table, gcc_cxxdiag_char_table): Same.
3846 (init_dynamic_diag_info): Update from "gcall *" to "gimple *".
3847 * c-format.h (T89_G): Update to be "gimple *" rather than
3849 (local_gcall_ptr_node): Rename...
3850 (local_gimple_ptr_node): ...to this.
3852 2018-07-31 David Malcolm <dmalcolm@redhat.com>
3854 * c-format.c (PP_FORMAT_CHAR_TABLE): New macro, based on existing
3855 table entries for gcc_diag_char_table, and the 'Z' entry from
3856 gcc_tdiag_char_table, changing the "chain" entry for 'Z' from
3857 &gcc_tdiag_char_table[0] to &gcc_diag_char_table[0].
3858 (gcc_diag_char_table): Use PP_FORMAT_CHAR_TABLE, implicitly
3859 adding missing "Z" for this table. Remove erroneous "G" and "K"
3861 (gcc_tdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
3862 (gcc_cdiag_char_table): Use PP_FORMAT_CHAR_TABLE.
3863 (gcc_cxxdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
3865 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3867 * c-common.c (speculation_safe_resolve_call): New function.
3868 (speculation_safe_resolve_params): New function.
3869 (speculation_safe_resolve_return): New function.
3870 (resolve_overloaded_builtin): Handle __builtin_speculation_safe_value.
3871 * c-cppbuiltin.c (c_cpp_builtins): Add pre-define for
3872 __HAVE_SPECULATION_SAFE_VALUE.
3874 2018-07-20 David Malcolm <dmalcolm@redhat.com>
3876 * c-common.c (c_cpp_error): Remove redundant "line_table"
3877 parameter from call to rich_location::set_range.
3878 (maybe_suggest_missing_token_insertion): Likewise.
3880 2018-07-20 Martin Sebor <msebor@redhat.com>
3883 * c.opt (-Warray-bounds): Remove redundant -Wall.
3885 2018-07-20 Martin Sebor <msebor@redhat.com>
3888 * c-common.h (c_common_handle_option): Change function argument
3890 * c-opts.c (c_common_init_options): Same.
3891 (c_common_handle_option): Same. Remove special handling of
3892 OPT_Walloca_larger_than_ and OPT_Wvla_larger_than_.
3893 * c.opt (-Walloc-size-larger-than, -Walloca-larger-than): Change
3894 options to take a HOST_WIDE_INT argument and accept a byte-size
3896 (-Wvla-larger-than): Same.
3897 (-Wno-alloc-size-larger-than, -Wno-alloca-larger-than): New.
3898 (-Wno-vla-larger-than): Same.
3900 2018-07-12 Jakub Jelinek <jakub@redhat.com>
3902 * c-attribs.c (c_common_attribute_table): Add
3903 "omp declare target implicit" attribute.
3905 2018-07-12 Richard Biener <rguenther@suse.de>
3908 * c-attribs.c (handle_packed_attribute): Do not build a variant
3909 type with TYPE_PACKED, instead ignore the attribute if we may
3910 not apply to the original type.
3912 2018-07-10 Jakub Jelinek <jakub@redhat.com>
3915 * c-omp.c (c_omp_check_loop_iv_r, c_omp_check_loop_iv): Allow declv
3916 to contain TREE_LIST for both the original class iterator and the
3919 2018-07-07 Eric Botcazou <ebotcazou@adacore.com>
3921 * c-ada-spec.c (to_ada_name): Remove index parameter.
3922 (pp_ada_tree_identifier): Likewise.
3923 (dump_ada_macros): Adjust call to to_ada_name.
3924 (struct overloaded_name_hash): Delete.
3925 (struct overloaded_name_hasher): Likewise.
3926 (overloaded_names): Likewise.
3927 (compute_overloading_index): Likewise.
3928 (dump_ada_decl_name): Do not call compute_overloading_index and
3929 adjust calls to pp_ada_tree_identifier.
3930 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
3931 (dump_ada_import): Add spc parameter and switch to aspect syntax.
3932 (dump_ada_function_declaration): Adjust call to pp_ada_tree_identifier.
3933 (dump_ada_enum_type): Remove type and display_convention parameters.
3934 Adjust calls to pp_ada_tree_identifier.
3935 (dump_ada_node): Likewise and for dump_ada_structure.
3936 (dump_nested_type) <ENUMERAL_TYPE>: Adjust call to dump_ada_enum_type
3938 <RECORD_TYPE>: Adjust call to dump_ada_structure and switch to aspect
3940 (print_constructor): Adjust call to pp_ada_tree_identifier.
3941 (print_destructor): Likewise.
3942 (dump_ada_declaration): Switch to aspect syntax.
3943 (dump_ada_structure): Likewise and tidy up. Replace display_convention
3944 parameter with nested parameter.
3945 (dump_ads): Emit pragma Ada_2012 in lieu of pragma Ada_2005.
3946 (dump_ada_specs): Do not delete overloaded_names table.
3948 2018-07-06 Peter Bergner <bergner@linux.ibm.com>
3951 * c-attribs.c (handle_mode_attribute): Call translate_mode_attribute
3954 2018-07-05 Nathan Sidwell <nathan@acm.org>
3956 * c-lex.c (fe_file_change): Check SYSTEM_IMPLICIT_EXTERN_C not
3957 NO_IMPLICIT_EXTERN_C.
3959 2018-06-28 Martin Liska <mliska@suse.cz>
3961 * cppspec.c: Include opt-suggestions.h.
3963 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
3964 Thomas Schwinge <thomas@codesourcery.com>
3965 Cesar Philippidis <cesar@codesourcery.com>
3967 * c-pragma.h (enum pragma_omp_clause): Add
3968 PRAGMA_OACC_CLAUSE_{FINALIZE,IF_PRESENT}. Remove
3969 PRAGMA_OACC_CLAUSE_PRESENT_OR_{COPY,COPYIN,COPYOUT,CREATE}.
3971 2018-06-20 Jakub Jelinek <jakub@redhat.com>
3974 * c-common.c (check_nonnull_arg): Use fold_for_warn. Adjust obsolete
3977 2018-06-18 Martin Sebor <msebor@redhat.com>
3980 * c-warn.c (sizeof_pointer_memaccess_warning): Check for attribute
3983 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
3985 * c-common.c (c_common_truthvalue_conversion): Handle ABSU_EXPR.
3987 2018-06-13 Jason Merrill <jason@redhat.com>
3989 * c-opts.c (c_common_post_options): Warn about useless -Wabi.
3990 (c_common_handle_option) [OPT_Wabi_]: Remove flag_abi_compat_version
3993 PR c++/86094 - wrong code with defaulted move ctor.
3994 * c-opts.c (c_common_post_options): Bump the current ABI version to
3995 13. Set warn_abi_version and flag_abi_compat_version to the current
3996 version rather than 0. Fix defaulting flag_abi_compat_version from
3999 2018-06-12 Martin Sebor <msebor@redhat.com>
4002 * c-warn.c (sizeof_pointer_memaccess_warning): Avoid warning when
4003 sizeof source and destination yields the same value.
4005 2018-06-12 Martin Liska <mliska@suse.cz>
4007 * c.opt: Make MPX-related options as Deprecated.
4009 2018-06-08 David Malcolm <dmalcolm@redhat.com>
4011 * c-pretty-print.c (c_pretty_printer::statement): Use TDF_NONE
4014 2018-06-08 Martin Liska <mliska@suse.cz>
4016 * c-attribs.c (handle_bnd_variable_size_attribute): Remove support
4017 for MPX (macros, related functions, fields in cgraph_node, ...).
4018 (handle_bnd_legacy): Likewise.
4019 (handle_bnd_instrument): Likewise.
4022 2018-06-06 Jakub Jelinek <jakub@redhat.com>
4025 * c-cppbuiltin.c (c_cpp_builtins): Fix a typo, set
4026 __cpp_transactional_memory to 201500 instead of 210500.
4028 2018-06-06 Jason Merrill <jason@redhat.com>
4030 PR c++/85710 - ICE with -Wmemset-elt-size.
4031 * c-warn.c (warn_for_memset): Don't crash on incomplete element type.
4033 2018-06-01 Jason Merrill <jason@redhat.com>
4035 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_deduction_guides to
4038 2018-06-01 Eric Botcazou <ebotcazou@adacore.com>
4040 * c-ada-spec.c (dump_ada_declaration) <TYPE_DECL>: Generate a forward
4041 declaration for a typedef independently of whether the declaration of
4042 the subtype is generated.
4044 2018-05-31 Martin Sebor <msebor@redhat.com>
4047 * c.opt (-Wno-alloc-size-larger-than): New option.
4049 2018-04-22 David Pagan <dave.pagan@oracle.com>
4052 * c-opts.c (c_common_post_options): Set default for warn_return_type
4053 for C++/C++ with ObjC extensions only. For C, makes it possible to
4054 differentiate between default (no option), -Wreturn-type, and
4057 2018-05-29 Jason Merrill <jason@redhat.com>
4059 * c.opt (Winit-list-lifetime): New flag.
4061 2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
4063 * c-lex.c (get_fileinfo): Use splay_tree_compare_strings and
4064 splay_tree_delete_pointers.
4066 2018-05-26 Jakub Jelinek <jakub@redhat.com>
4069 * c-warn.c (diagnose_mismatched_attributes): Remove unnecessary
4070 noinline variable to workaround broken kernel headers.
4072 2018-05-18 Jason Merrill <jason@redhat.com>
4074 * c.opt (Wdeprecated-copy): New flag.
4076 2018-05-17 Martin Liska <mliska@suse.cz>
4078 * c-warn.c (overflow_warning): Do not use
4079 space in between 'G_' and '('.
4081 2018-05-09 Jason Merrill <jason@redhat.com>
4083 * c-common.c (valid_array_size_p): Add complain parameter.
4084 * c-common.h: ...which defaults to true.
4086 2018-05-11 Jakub Jelinek <jakub@redhat.com>
4089 * c-omp.c (c_omp_predetermined_sharing): Return
4090 OMP_CLAUSE_DEFAULT_SHARED for artificial vars with integral type.
4092 2018-05-11 Martin Liska <mliska@suse.cz>
4095 * c-attribs.c (handle_no_sanitize_attribute): Iterate all
4098 2018-05-10 Jakub Jelinek <jakub@redhat.com>
4101 * c-common.h (fold_offsetof_1): Removed.
4102 (fold_offsetof): Add TYPE argument defaulted to size_type_node and
4103 CTX argument defaulted to ERROR_MARK.
4104 * c-common.c (fold_offsetof_1): Renamed to ...
4105 (fold_offsetof): ... this. Remove wrapper function. Add TYPE
4106 argument, convert the pointer constant to TYPE and use size_binop
4107 with PLUS_EXPR instead of fold_build_pointer_plus if type is not
4108 a pointer type. Adjust recursive calls.
4110 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
4113 * c-attribs.c (handle_visibility_attribute): Do not set no_add_attrs.
4115 2018-05-07 Nathan Sidwell <nathan@acm.org>
4117 * c.opt (ffor-scope): Remove functionality, issue warning.
4119 2018-05-03 Nathan Sidwell <nathan@acm.org>
4121 * c.opt (ffriend-injection): Remove functionality, issue warning.
4123 2018-05-01 David Malcolm <dmalcolm@redhat.com>
4126 * c-format.c (struct format_check_results): Add field
4128 (check_format_info): Initialize it, and warn if encountered.
4129 (check_format_arg): Distinguish between wide char and
4130 everything else when detecting arrays of non-char.
4132 2018-04-30 David Malcolm <dmalcolm@redhat.com>
4134 * c-format.c (get_corrected_substring): Update for
4135 location_get_source_line returning a char_span. Use a char_span
4136 when handling the prefix of the correction.
4137 * c-indentation.c (get_visual_column): Update for
4138 location_get_source_line returning a char_span.
4139 (get_first_nws_vis_column): Likewise.
4141 2018-03-29 David Malcolm <dmalcolm@redhat.com>
4144 * known-headers.cc (get_stdlib_header_for_name): Add various names
4145 from <assert.h>, <string.h>, and <memory.h>; add more names from
4148 2018-03-27 Jakub Jelinek <jakub@redhat.com>
4151 * c-common.c (fold_offsetof_1) <case COMPOUND_EXPR>: Assert that
4152 get_base_address of the second operand is a VAR_P, rather than the
4153 operand itself, and use gcc_checking_assert instead of gcc_assert.
4155 2018-03-23 Marek Polacek <polacek@redhat.com>
4158 * c-pretty-print.c (c_pretty_printer::multiplicative_expression)
4159 <case RDIV_EXPR>: Tweak condition.
4161 2018-03-20 Eric Botcazou <ebotcazou@adacore.com>
4163 * c-ada-spec.c (pp_ada_tree_identifier): Deal specifically with _Bool.
4165 2018-03-16 Jakub Jelinek <jakub@redhat.com>
4168 * c-warn.c (conversion_warning): Replace "to to" with "to" in
4172 * c-warn.c (diagnose_mismatched_attributes): Remove trailing space from
4175 2018-03-16 Richard Biener <rguenther@suse.de>
4178 * c-gimplify.c (c_gimplify_expr): Revert previous change. Instead
4179 unshare the possibly folded expression.
4181 2018-03-15 Richard Biener <rguenther@suse.de>
4184 * c-gimplify.c (c_gimplify_expr): Do not fold expressions.
4186 2018-03-13 Martin Sebor <msebor@redhat.com>
4188 PR tree-optimization/84725
4189 * c-attribs.c (handle_nonstring_attribute): Allow attribute nonstring
4190 with all three narrow character types, including their qualified forms.
4192 2018-03-12 Martin Sebor <msebor@redhat.com>
4194 PR tree-optimization/83456
4195 * c-common.c (check_function_restrict): Return bool.
4196 Restore checking of bounded built-in functions.
4197 (check_function_arguments): Also return the result
4198 of warn_for_restrict.
4199 * c-common.c (check_function_restrict): Return bool.
4200 * c-warn.c (warn_for_restrict): Return bool.
4202 2018-03-02 Marek Polacek <polacek@redhat.com>
4205 * c-warn.c (warn_for_sign_compare): Bail out if any of the operands
4208 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
4210 * c-attribs.c (c_common_attribute_table): Remove "cilk simd
4213 2018-03-01 Marek Polacek <polacek@redhat.com>
4216 * c-attribs.c (common_handle_aligned_attribute): Don't use invalid
4217 alignment in computation.
4219 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
4221 * c-ada-spec.c (dump_ada_node) <NULLPTR_TYPE>: New case.
4222 <REAL_TYPE>: Deal specifically with _Float128/__float128.
4224 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
4226 * c-ada-spec.c (dump_ada_double_name) <ENUMERAL_TYPE>: New case.
4227 (is_char_array): Take a type instead of a declaration.
4228 (dump_ada_array_type): Likewise.
4229 (is_simple_enum): Minor tweak.
4230 (dump_ada_enum_type): New function extracted from...
4231 (dump_ada_node) <ENUMERAL_TYPE>: ...here. Invoke it.
4232 <INTEGER_TYPE>: Remove unreachable code.
4233 <RECORD_TYPE>: Likewise. Minor tweaks.
4234 (dump_nested_type) <ARRAY_TYPE>: Adjust to above changes.
4235 <ENUMERAL_TYPE>: New case.
4236 <RECORD_TYPE>: Factor out common code.
4237 (dump_ada_declaration) <ARRAY_TYPE>: Adjust to above changes.
4238 Minor tweaks. Deal with enumeral types.
4239 (dump_ada_structure): Minor tweaks.
4241 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
4243 * c-ada-spec.c (dump_ada_node) <POINTER_TYPE>: Do not use generic
4244 address for incomplete structures.
4245 (dump_forward_type): Do not bail out for incomplete structures.
4246 (dump_ada_declaration): Do not special-case incomplete structures
4247 for subtypes. Dump them as null records for types.
4249 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
4251 * c-ada-spec.c (dump_ada_import): Use boolean and fix formatting.
4252 (is_char_array): Fix formatting.
4253 (dump_template_types): Likewise.
4254 (dump_generic_ada_node): Rename into...
4255 (dump_ada_node): ...this.
4256 <POINTER_TYPE>: Remove superfluous space. Use generic address for
4257 incomplete structures and not for empty structures. Do not use it
4258 when forward declarations are needed.
4259 (dump_forward_type): New function.
4260 (dump_nested_types): Remove FORWARD parameter. Do not consider
4261 TREE_VISITED and do not generate a forward declaration. Only dump
4262 original nested types for nested declaration.
4263 (dump_nested_type) <POINTER_TYPE>: Call dump_forward_type.
4264 <ARRAY_TYPE>: Likewise if the component type is an anonymous pointer.
4265 <RECORD_TYPE>: Do not consider TREE_VISITED.
4266 (dump_ada_declaration): Use booleans and fix formatting throughout.
4267 <TYPE_DECL>: Skip incomplete structures and not empty structures.
4268 Call dump_forward_type instead of dump_nested_types for a typedef.
4269 Remove superfluous check and adjust call to dump_nested_types.
4270 <POINTER_TYPE>: Call dump_forward_type and fall through.
4271 (dump_ada_struct_decl): Rename into...
4272 (dump_ada_structure): ...this. Do not special-case empty structures.
4274 2018-02-27 Martin Sebor <msebor@redhat.com>
4277 * c.opt (-Wmissing-attributes): New option.
4279 2018-02-21 Martin Liska <mliska@suse.cz>
4281 * c.opt (Wcatch-value=): Add IntegerRange.
4283 2018-02-15 Jason Merrill <jason@redhat.com>
4285 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_deduction_guides.
4287 2018-02-09 Nathan Sidwell <nathan@acm.org>
4290 * c-common.h (strict_aliasing_warning): Drop OTYPE arg, insert LOC
4292 * c-warn.c (strict_aliasing_warning): Drop OTYPE arg, require LOC
4295 2018-02-09 Martin Sebor <msebor@redhat.com>
4298 * c.opt (-Wstringop-overflow, -Warray-bounds): Add LTO.
4299 (-Walloc-size-larger-than, -Wformat-truncation=): Same.
4300 (-Wmaybe-uninitialized, -Wnonnull, -Wrestrict): Same.
4301 (-Wstrict-overflow, -Wsuggest-attribute): Same.
4302 (-Wuninitialized): Same.
4304 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
4306 * c-ada-spec.c (dump_ada_declaration): Do not generate the 'constant'
4307 keyword for components.
4309 2018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
4311 * c-common.h (DECL_UNNAMED_BIT_FIELD): New.
4313 2018-02-02 Julia Koval <julia.koval@intel.com>
4315 * c-common.h (omp_clause_mask): Move to wide_int_bitmask.h.
4317 2018-01-29 Marek Polacek <polacek@redhat.com>
4320 * c-format.c (check_function_format): Check current_function_decl.
4322 2018-01-27 Jakub Jelinek <jakub@redhat.com>
4324 * c-cppbuiltin.c (c_cpp_builtins): Use ggc_strdup for the fp_suffix
4326 (LAZY_HEX_FP_VALUES_CNT): Define.
4327 (lazy_hex_fp_values): Allow up to LAZY_HEX_FP_VALUES_CNT lazy hex fp
4328 values rather than just 12.
4329 (builtin_define_with_hex_fp_value): Likewise.
4331 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
4334 * c.opt (-fmacro-prefix-map): New option.
4335 * c-opts.c (c_common_handle_option): Handle it.
4336 * c-lex.c (init_c_lex): Set remap_filename cpp callback.
4337 * c-ppoutput.c (init_pp_output): Likewise.
4339 2018-01-17 David Malcolm <dmalcolm@redhat.com>
4342 * c-common.c (fold_for_warn): Move to c/c-fold.c and cp/expr.c.
4344 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
4346 * c-ada-spec.c (dump_number): Add FLOAT_P parameter.
4347 Skip 'f' and 'F' characters if it is true.
4348 (store_ada_macro): Minor tweak.
4349 (dump_ada_macros) <CPP_COMMENT>: Likewise.
4350 <CPP_WSTRING>: Likewise.
4351 <CPP_STRING>: Output '&' in the buffer if not the first string.
4352 <CPP_NUMBER>: Adjust calls to dump_number.
4354 2018-01-10 David Malcolm <dmalcolm@redhat.com>
4357 * c-common.c: Include "selftest.h".
4358 (get_atomic_generic_size): Perform the test for integral type
4359 before the range test for any integer constant, fixing indentation
4360 of braces. Call fold_for_warn before testing for an INTEGER_CST.
4361 (reject_gcc_builtin): Strip any location wrapper from EXPR.
4362 (selftest::test_fold_for_warn): New function.
4363 (selftest::c_common_c_tests): New function.
4364 (selftest::c_family_tests): Call it, and
4365 selftest::c_pretty_print_c_tests.
4366 * c-common.h (selftest::c_pretty_print_c_tests): New decl.
4367 * c-format.c (check_format_arg): Convert VAR_P check to a
4369 * c-pretty-print.c: Include "selftest.h".
4370 (pp_c_cast_expression): Don't print casts for location wrappers.
4371 (selftest::assert_c_pretty_printer_output): New function.
4372 (ASSERT_C_PRETTY_PRINTER_OUTPUT): New macro.
4373 (selftest::test_location_wrappers): New function.
4374 (selftest::c_pretty_print_c_tests): New function.
4375 * c-warn.c (warn_for_memset): Call fold_for_warn on the arguments.
4377 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
4378 Alan Hayward <alan.hayward@arm.com>
4379 David Sherwood <david.sherwood@arm.com>
4381 * c-common.c (c_common_type_for_mode): Handle MODE_VECTOR_BOOL.
4383 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
4384 Alan Hayward <alan.hayward@arm.com>
4385 David Sherwood <david.sherwood@arm.com>
4387 * c-ubsan.c (ubsan_instrument_shift): Treat GET_MODE_BITSIZE
4390 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
4391 Alan Hayward <alan.hayward@arm.com>
4392 David Sherwood <david.sherwood@arm.com>
4394 * c-common.c (vector_types_convertible_p, c_build_vec_perm_expr)
4395 (convert_vector_to_array_for_subscript): Handle polynomial
4396 TYPE_VECTOR_SUBPARTS.
4397 (c_common_type_for_mode): Check valid_vector_subparts_p.
4398 * c-pretty-print.c (pp_c_initializer_list): Handle polynomial
4401 2018-01-03 Jakub Jelinek <jakub@redhat.com>
4403 Update copyright years.
4405 2017-12-22 Mike Stump <mikestump@comcast.net>
4406 Eric Botcazou <ebotcazou@adacore.com>
4408 * c-pragma.c (init_pragma): Register pragma GCC unroll.
4409 * c-pragma.h (enum pragma_kind): Add PRAGMA_UNROLL.
4411 2017-12-22 Alexandre Oliva <aoliva@redhat.com>
4415 * c-semantics.c (only_debug_stmts_after_p): New.
4416 (pop_stmt_list): Clear side effects in debug-only stmt list.
4417 Check for single nondebug stmt followed by debug stmts only.
4419 2017-12-21 Alexandre Oliva <aoliva@redhat.com>
4422 * c-semantics.c (pop_stmt_list): Propagate side effects from
4423 single nondebug stmt to container list.
4425 2017-12-19 Jakub Jelinek <jakub@redhat.com>
4427 * known-headers.cc (get_stdlib_header_for_name): Replace Yoda
4428 conditions with typical order conditions.
4430 2017-12-18 Marek Polacek <polacek@redhat.com>
4432 * c-warn.c (warn_logical_operator): Return early if -Wlogical-op is
4435 2017-12-17 Martin Sebor <msebor@redhat.com>
4437 * c-attribs.c (common_handle_aligned_attribute): Avoid issuing
4438 an error for attribute warn_if_not_aligned.
4440 2017-12-16 Martin Sebor <msebor@redhat.com>
4442 PR tree-optimization/78918
4443 * c-common.c (check_function_restrict): Avoid checking built-ins.
4444 * c.opt (-Wrestrict): Include in -Wall.
4446 2017-12-15 Jakub Jelinek <jakub@redhat.com>
4448 * c-attribs.c (c_common_attribute_table,
4449 c_common_format_attribute_table): Swap affects_type_identity
4450 and handler fields, adjust comments.
4452 2017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
4454 * c.opt (Wcast-function-type): New warning option.
4455 * c-lex.c (get_fileinfo): Avoid warning.
4456 * c-ppoutput.c (scan_translation_unit_directives_only): Remove cast.
4458 2017-12-14 Qing Zhao <qing.zhao@oracle.com>
4461 * c-cppbuiltin.c (builtin_define_with_hex_fp_value):
4462 Adjust the size of buf1 and buf2, add a new buf to avoid
4463 format-overflow warning.
4465 2017-12-12 Alexandre Oliva <aoliva@redhat.com>
4467 * c-semantics.c (pop_stmt_list): Move begin stmt marker into
4468 subsequent statement list.
4470 2017-12-07 Martin Sebor <msebor@redhat.com>
4474 * c-attribs.c (attr_aligned_exclusions): New array.
4475 (attr_alloc_exclusions, attr_cold_hot_exclusions): Same.
4476 (attr_common_exclusions, attr_const_pure_exclusions): Same.
4477 (attr_gnu_inline_exclusions, attr_inline_exclusions): Same.
4478 (attr_noreturn_exclusions, attr_returns_twice_exclusions): Same.
4479 (attr_warn_unused_result_exclusions): Same.
4480 (handle_hot_attribute, handle_cold_attribute): Simplify.
4481 (handle_const_attribute): Warn on function returning void.
4482 (handle_pure_attribute): Same.
4483 (handle_aligned_attribute): Diagnose conflicting attribute
4485 * c-warn.c (diagnose_mismatched_attributes): Simplify.
4487 2017-12-06 David Malcolm <dmalcolm@redhat.com>
4490 * c-common.c (selftest::c_family_tests): Call
4491 selftest::c_spellcheck_cc_tests.
4492 * c-common.h (selftest::c_spellcheck_cc_tests): New decl.
4493 * c-spellcheck.cc: Include "selftest.h".
4494 (name_reserved_for_implementation_p): New function.
4495 (should_suggest_as_macro_p): New function.
4496 (find_closest_macro_cpp_cb): Move the check for NT_MACRO to
4497 should_suggest_as_macro_p and call it.
4498 (selftest::test_name_reserved_for_implementation_p): New function.
4499 (selftest::c_spellcheck_cc_tests): New function.
4500 * c-spellcheck.h (name_reserved_for_implementation_p): New decl.
4502 2017-12-06 David Malcolm <dmalcolm@redhat.com>
4504 * c-spellcheck.cc: New file, taken from macro-handling code in
4506 * c-spellcheck.h: New file, taken from macro-handling code in
4509 2017-12-01 Jakub Jelinek <jakub@redhat.com>
4511 * c-attribs.c (c_common_attribute_table): Remove "cilk simd function"
4513 (handle_simd_attribute): Don't check for "cilk simd function"
4514 attribute. Reindent, formatting changes.
4516 2017-11-30 Julia Koval <julia.koval@intel.com>
4518 * c-common.h (inv_list): Remove.
4520 2017-11-28 Jakub Jelinek <jakub@redhat.com>
4523 * c-common.c (c_switch_covers_all_cases_p_1,
4524 c_switch_covers_all_cases_p): New functions.
4525 * c-common.h (c_switch_covers_all_cases_p): Declare.
4527 2017-11-28 Julia Koval <julia.koval@intel.com>
4528 Sebastian Peryt <sebastian.peryt@intel.com>
4530 * array-notation-common.c: Delete.
4531 * c-cilkplus.c: Ditto.
4532 * c-common.c (_Cilk_spawn, _Cilk_sync, _Cilk_for): Remove.
4533 * c-common.def (ARRAY_NOTATION_REF): Remove.
4534 * c-common.h (RID_CILK_SPAWN, build_array_notation_expr,
4535 build_array_notation_ref, C_ORT_CILK, c_check_cilk_loop,
4536 c_validate_cilk_plus_loop, cilkplus_an_parts,
4537 cilk_ignorable_spawn_rhs_op,
4538 cilk_recognize_spawn): Remove.
4539 * c-gimplify.c (CILK_SPAWN_STMT): Remove.
4540 * c-omp.c: Remove CILK_SIMD check.
4541 * c-pragma.c: Ditto.
4542 * c-pragma.h: Remove CILK related pragmas.
4543 * c-pretty-print.c (c_pretty_printer::postfix_expression): Remove
4544 ARRAY_NOTATION_REF condition.
4545 (c_pretty_printer::expression): Ditto.
4546 * c.opt (fcilkplus): Remove.
4549 2017-11-21 Marc Glisse <marc.glisse@inria.fr>
4551 * c-pretty-print.c (pp_c_additive_expression,
4552 c_pretty_printer::expression): Handle POINTER_DIFF_EXPR.
4554 2017-11-21 Jakub Jelinek <jakub@redhat.com>
4556 * c-common.c (get_nonnull_operand): Use tree_to_uhwi.
4559 * c-common.c (get_atomic_generic_size): Use TREE_INT_CST_LOW
4560 instead of tree_to_uhwi, formatting fix.
4562 2017-11-20 David Malcolm <dmalcolm@redhat.com>
4565 * known-headers.cc: New file, based on material from c/c-decl.c.
4566 (suggest_missing_header): Copied as-is.
4567 (get_stdlib_header_for_name): New, based on get_c_name_hint but
4568 heavily edited to add C++ support. Add some knowledge about
4569 <limits.h>, <stdint.h>, and <wchar.h>.
4570 * known-headers.h: Likewise.
4572 2017-11-20 David Malcolm <dmalcolm@redhat.com>
4574 * c-common.h (enum lookup_name_fuzzy_kind): Move to name-hint.h.
4575 (lookup_name_fuzzy): Likewise. Convert return type from
4576 const char * to name_hint. Add location_t param.
4577 * name-hint.h: New header.
4579 2017-11-19 Jakub Jelinek <jakub@redhat.com>
4583 * c-common.h (c_fully_fold): Add LVAL argument defaulted to false.
4585 2017-11-16 Joseph Myers <joseph@codesourcery.com>
4587 * c.opt (-std=c17, std=gnu17, -std=iso9899:2017): Refer to 2018
4588 expected publication date of C17.
4589 (-std=c18, -std=gnu18, -std=iso9899:2018): New option aliases.
4591 2017-11-15 Joseph Myers <joseph@codesourcery.com>
4594 * c-common.c (c_common_reswords): Add __builtin_tgmath.
4595 * c-common.h (enum rid): Add RID_BUILTIN_TGMATH.
4597 2017-11-10 Martin Sebor <msebor@redhat.com>
4600 * c-common.c (catenate_strings): Use memcpy instead of strncpy.
4601 * c-warn.c (sizeof_pointer_memaccess_warning): Handle arrays.
4602 * c.opt (-Wstringop-truncation): New option.
4604 2017-11-06 Martin Liska <mliska@suse.cz>
4607 * c-opts.c (c_common_post_options): Set -Wreturn-type for C++
4609 * c.opt: Set default value of warn_return_type.
4611 2017-10-31 David Malcolm <dmalcolm@redhat.com>
4613 * c-common.c (binary_op_error): Update for renaming of
4615 (c_parse_error): Likewise.
4616 * c-warn.c (warn_logical_not_parentheses): Likewise for
4617 renaming of inform_at_rich_loc.
4618 (warn_for_restrict): Likewise for renaming of
4619 warning_at_rich_loc_n.
4621 2017-10-30 Joseph Myers <joseph@codesourcery.com>
4623 * c.opt (std=c17, std=gnu17, std=iso9899:2017): New options.
4624 * c-opts.c (set_std_c17): New function.
4625 (c_common_init_options): Use gnu17 as default C version.
4626 (c_common_handle_option): Handle -std=c17 and -std=gnu17.
4628 2017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
4630 * c-cppbuiltin.c (mode_has_fma): Add support for PowerPC KFmode.
4631 (c_cpp_builtins): If a machine has a fast fma _Float<N> and
4632 _Float<N>X variant, define __FP_FAST_FMA<N> and/or
4635 2017-10-23 Marek Polacek <polacek@redhat.com>
4638 * c-warn.c (warnings_for_convert_and_check): Fix typos.
4640 2017-10-19 Eric Botcazou <ebotcazou@adacore.com>
4642 * c-common.c (check_builtin_function_arguments): Also check arguments
4643 of __builtin_alloca_with_align_and_max.
4645 2017-10-17 David Malcolm <dmalcolm@redhat.com>
4647 * c-format.c (format_warning_at_char): Pass UNKNOWN_LOCATION
4648 rather than NULL to format_warning_va.
4649 (check_format_types): Likewise when calling format_type_warning.
4650 Remove code to extract source_ranges and source_range * in favor
4651 of just a location_t.
4652 (format_type_warning): Convert source_range * param to a
4655 2017-10-13 Jakub Jelinek <jakub@redhat.com>
4657 * c-gimplify.c (c_gimplify_expr): Handle [LR]ROTATE_EXPR like
4660 2017-10-12 David Malcolm <dmalcolm@redhat.com>
4662 * c-common.c (enum missing_token_insertion_kind): New enum.
4663 (get_missing_token_insertion_kind): New function.
4664 (maybe_suggest_missing_token_insertion): New function.
4665 * c-common.h (maybe_suggest_missing_token_insertion): New decl.
4667 2017-10-11 Nathan Sidwell <nathan@acm.org>
4669 * c-opts.c (add_prefixed_path): Change chain to incpath_kind.
4670 (c_common_handle_option): Update incpath_kind names.
4672 2017-10-11 Martin Liska <mliska@suse.cz>
4675 * c-attribs.c (handle_no_sanitize_attribute): Report directly
4676 Wattributes warning.
4678 2017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
4680 * c-ada-spec.c (dump_generic_ada_node): Use wi::to_wide when
4681 operating on trees as wide_ints.
4682 * c-common.c (pointer_int_sum): Likewise.
4683 * c-pretty-print.c (pp_c_integer_constant): Likewise.
4684 * c-warn.c (match_case_to_enum_1): Likewise.
4685 (c_do_switch_warnings): Likewise.
4686 (maybe_warn_shift_overflow): Likewise.
4688 2017-10-10 Jakub Jelinek <jakub@redhat.com>
4691 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_wide
4692 instead of wide_int::from.
4694 2017-10-06 Jakub Jelinek <jakub@redhat.com>
4697 * c-warn.c (warn_tautological_bitwise_comparison): Instead of
4698 using to_widest use wide_int with the larger of the two precisions.
4700 2017-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
4702 * c-pretty-print.c (pp_c_parameter_type_list): Print ... for variadic
4705 2017-10-02 Richard Sandiford <richard.sandiford@linaro.org>
4707 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_widest
4708 when combining the original unconverted comparison operands.
4710 2017-09-29 Jakub Jelinek <jakub@redhat.com>
4712 * c-attribs.c (handle_noipa_attribute): Don't add "stack_protect"
4715 2017-09-29 Eric Botcazou <ebotcazou@adacore.com>
4717 * c-ada-spec.c (to_ada_name): Add index parameter.
4718 (pp_ada_tree_identifier): Likewise.
4719 (dump_ada_macros): Adjust call to to_ada_name.
4720 (struct overloaded_name_hash): New type.
4721 (struct overloaded_name_hasher): Likewise.
4722 (overloaded_names): New hash table.
4723 (compute_overloading_index): New function.
4724 (dump_ada_decl_name): Call it and pass the result to
4725 pp_ada_tree_identifier.
4726 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
4727 (dump_ada_function_declaration): Likewise.
4728 (dump_generic_ada_node): Likewise.
4729 (print_constructor): Likewise.
4730 (print_destructor): Likewise.
4731 (dump_ada_specs): Delete overloaded_names table.
4733 2017-09-29 Eric Botcazou <ebotcazou@adacore.com>
4735 * c-ada-spec.c (max_ada_macros): Move around.
4736 (store_ada_macro_index): Likewise.
4737 (source_file): Rename into...
4738 (macro_source_file): ...this.
4739 (count_ada_macro): Move around.
4740 (store_ada_macro): Likewise.
4741 (compare_macro): Likewise.
4742 (print_ada_macros): Merge in...
4743 (dump_ada_macros): ...this.
4744 (source_file_base): Rename into...
4745 (current_source_file): ...this.
4746 (print_comment): Move around.
4747 (dump_ada_nodes): Call dump_ada_declaration directly.
4748 (struct with): Change type of limited field to bool.
4749 (append_withs): Change type of limited_access parameter to bool.
4750 (pp_ada_tree_identifie): Likewise.
4751 (dump_ada_decl_nam): Likewise.
4752 (dump_generic_ada_node): Likewise. Do not print the return type.
4753 (to_ada_name): Change type of space_found parameter to bool.
4754 (dump_ada_function_declaration): Return void and change type of
4755 parameters to bool. Also print the return type for a function.
4756 (print_ada_methods): Rename into...
4757 (dump_ada_methods): ...this.
4758 (print_ada_declaration): Rename into ...
4759 (dump_ada_declaration): ...this. Do not print the return type.
4760 (print_ada_struct_decl): Rename into...
4761 (dump_ada_struct_decl): ...this.
4763 2017-09-29 Jakub Jelinek <jakub@redhat.com>
4765 * c-attribs.c (handle_packed_attribute): Test DECL_C_BIT_FIELD
4766 rather than DECL_INITIAL.
4767 (common_handle_aligned_attribute): Likewise.
4769 2017-09-20 Alexandre Oliva <aoliva@redhat.com>
4771 * c.opt (gen-decls): Add RejectNegative.
4773 2017-09-15 Andrew Sutton <andrew.n.sutton@gmail.com>
4774 Jakub Jelinek <jakub@redhat.com>
4776 Add support for -std=c++2a.
4777 * c-common.h (cxx_dialect): Add cxx2a as a dialect.
4778 * opt.c: Add options for -std=c++2a and -std=gnu++2a.
4779 * c-opts.c (set_std_cxx2a): New.
4780 (c_common_handle_option): Set options when -std=c++2a is enabled.
4781 (c_common_post_options): Adjust comments.
4782 (set_std_cxx14, set_std_cxx17): Likewise.
4784 2017-09-15 Eric Botcazou <ebotcazou@adacore.com>
4786 * c-pragma.c (handle_pragma_scalar_storage_order): Expand on error
4787 message for non-uniform endianness and issue a warning in C++.
4789 2017-09-15 Jakub Jelinek <jakub@redhat.com>
4791 * c.opt (Wc++1z-compat): Change from option to undocumented alias.
4792 (Wc++17-compat): Change from undocumented alias to option.
4793 (Wnoexcept-type): Enable by Wc++17-compat instead of Wc++1z-compat,
4794 change C++1z to C++17 in description.
4795 (std=c++1z, std=gnu++1z): Change from option to undocumented
4797 (std=c++17, std=gnu++17): Change from undocumented alias to option.
4799 * c-common.h (enum cxx_dialect): Rename cxx1z to cxx17.
4800 * c-opts.c (set_std_cxx1z): Rename to ...
4801 (set_std_cxx17): ... this.
4802 (c_common_handle_option): Rename OPT_std_c__1z to OPT_std_c__17
4803 and OPT_std_gnu__1z to OPT_std_gnu__17. Adjust set_std_cxx1z
4805 (c_common_post_options): Use cxx17 instead of cxx1z. Adjust
4808 2017-09-12 H.J. Lu <hongjiu.lu@intel.com>
4810 * c-attribs.c (common_handle_aligned_attribute): Don't warn
4811 function alignment if warn_if_not_aligned_p is true.
4813 2017-09-12 Nathan Sidwell <nathan@acm.org>
4815 * c-common.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
4816 resort_sorted_fields): Move to c/c-decl.c.
4817 * c-common.h (field_decl_cmp, resort_sorted_fields): Delete.
4818 (struct sorted_fields_type): Move to c/c-lang.h.
4820 2017-09-09 Jonathan Wakely <jwakely@redhat.com>
4823 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_threadsafe_static_init.
4825 2017-09-04 Marek Polacek <polacek@redhat.com>
4828 * c-warn.c (warn_tautological_bitwise_comparison): New function.
4829 (warn_tautological_cmp): Call it.
4831 2017-09-01 Boris Kolpackov <boris@codesynthesis.com>
4833 * c-opts.c (c_common_finish): Write dependency information even if
4836 2017-09-01 Jakub Jelinek <jakub@redhat.com>
4839 * c-pragma.c (omp_pragmas): Move "ordered" entry from here to ...
4840 (omp_pragmas_simd): ... here.
4841 * c-omp.c (c_finish_omp_ordered): If clauses isn't simd clause alone,
4842 create new clauses list containing just simd clause.
4844 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
4845 Alan Hayward <alan.hayward@arm.com>
4846 David Sherwood <david.sherwood@arm.com>
4848 * c-attribs.c (vector_mode_valid_p) Fold GET_MODE_INNER call
4849 into scalar_mode_supported_p call.
4850 (handle_mode_attribute): Update call to scalar_mode_supported_p.
4852 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
4853 Alan Hayward <alan.hayward@arm.com>
4854 David Sherwood <david.sherwood@arm.com>
4856 * c-common.c (c_common_fixed_point_type_for_size): Use opt_scalar_mode
4857 for the mode iterator.
4859 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
4860 Alan Hayward <alan.hayward@arm.com>
4861 David Sherwood <david.sherwood@arm.com>
4863 * c-lex.c (interpret_fixed): Use SCALAR_TYPE_MODE.
4864 * c-common.c (c_build_vec_perm_expr): Likewise.
4866 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
4867 Alan Hayward <alan.hayward@arm.com>
4868 David Sherwood <david.sherwood@arm.com>
4870 * c-common.c (c_common_type_for_mode): Use as_a <scalar_int_mode>.
4872 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
4873 Alan Hayward <alan.hayward@arm.com>
4874 David Sherwood <david.sherwood@arm.com>
4876 * c-attribs.c (handle_mode_attribute): Check for a scalar_int_mode
4877 before calling targetm.addr_space.valid_pointer_mode.
4879 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
4880 Alan Hayward <alan.hayward@arm.com>
4881 David Sherwood <david.sherwood@arm.com>
4883 * c-cppbuiltin.c (c_cpp_builtins): Use opt_scalar_float_mode.
4885 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
4886 Alan Hayward <alan.hayward@arm.com>
4887 David Sherwood <david.sherwood@arm.com>
4889 * c-common.c (c_common_fixed_point_type_for_size): Use new mode
4891 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
4893 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
4894 Alan Hayward <alan.hayward@arm.com>
4895 David Sherwood <david.sherwood@arm.com>
4897 * c-cppbuiltin.c (mode_has_fma): Prefix mode names with E_ in
4900 2017-08-29 Martin Liska <mliska@suse.cz>
4903 * c-common.c (parse_optimize_options): Add argument to function
4905 * c-pragma.c (handle_pragma_diagnostic): Likewise.
4907 2017-08-24 David Malcolm <dmalcolm@redhat.com>
4909 * c-lex.c (interpret_float): Use token location
4910 when building an EXCESS_PRECISION_EXPR.
4912 2017-08-21 David Malcolm <dmalcolm@redhat.com>
4914 * c-common.c (check_function_arguments): Add "arglogs" param; pass
4915 it to check_function_format.
4916 * c-common.h (check_function_arguments): Add vec<location_t> *
4918 (check_function_format): Likewise.
4919 * c-format.c (struct format_check_context): Add field "arglocs".
4920 (check_function_format): Add param "arglocs"; pass it to
4922 (check_format_info): Add param "arglocs"; use it to initialize
4923 new field of format_ctx.
4924 (check_format_arg): Pass format_ctx->arglocs to new param of
4925 check_format_info_main.
4926 (class argument_parser): New field "arglocs".
4927 (argument_parser::argument_parser): Add "arglocs_" param and use
4928 it to initialize new field.
4929 (argument_parser::check_argument_type): Pass new arglocs field to
4931 (check_format_info_main): Add param "arglocs", and use it when
4932 constructing arg_parser.
4933 (check_format_types): Add param "arglocs"; use it if non-NULL when
4934 !EXPR_HAS_LOCATION (cur_param) to get at location information.
4936 2017-08-18 H.J. Lu <hongjiu.lu@intel.com>
4939 * c-attribs.c (handle_warn_if_not_aligned_attribute): New.
4940 (c_common_attribute_table): Add warn_if_not_aligned.
4941 (handle_aligned_attribute): Renamed to ...
4942 (common_handle_aligned_attribute): Remove argument, name, and add
4943 argument, warn_if_not_aligned. Handle warn_if_not_aligned.
4944 (handle_aligned_attribute): New.
4945 * c.opt: Add -Wif-not-aligned and -Wpacked-not-aligned.
4947 2017-08-14 Martin Sebor <msebor@redhat.com>
4950 * c-attribs.c (c_common_attribute_table): Add nonstring entry.
4951 (handle_nonstring_attribute): New function.
4953 2017-08-14 Martin Sebor <msebor@redhat.com>
4956 * c-format.h (T89_G): New macro.
4957 * c-format.c (local_gcall_ptr_node): New variable.
4958 (init_dynamic_diag_info): Initialize it.
4960 2017-08-11 Martin Liska <mliska@suse.cz>
4962 * c-opts.c (c_common_post_options): Replace ASM_OUTPUT_DEF with
4963 TARGET_SUPPORTS_ALIASES.
4965 2017-08-10 David Malcolm <dmalcolm@redhat.com>
4967 * c-common.c (c_parse_error): Add rich_location * param, using it
4968 rather implicitly using input_location.
4969 * c-common.h (c_parse_error): Add rich_location * param.
4971 2017-08-09 Marek Polacek <polacek@redhat.com>
4973 * c-common.c (pointer_int_sum): Use true/false instead of 1/0.
4974 (c_common_truthvalue_conversion): Likewise.
4975 * c-omp.c (c_finish_omp_atomic): Likewise.
4976 * c-common.h (build_binary_op): Update declaration.
4978 2017-08-08 Martin Liska <mliska@suse.cz>
4980 * c-ada-spec.c: Include header files.
4981 * c-ubsan.c: Likewise.
4982 * c-warn.c: Likewise.
4984 2017-08-07 Jakub Jelinek <jakub@redhat.com>
4987 * c-omp.c (c_finish_omp_atomic): Handle atomics on bitfields.
4989 2017-08-07 Eric Botcazou <ebotcazou@adacore.com>
4991 * c-ada-spec.c (has_nontrivial_methods): Test for FUNCTION_DECL.
4992 (print_ada_methods): Likewise.
4993 (print_ada_declaration): Likewise.
4995 2017-08-07 Martin Liska <mliska@suse.cz>
4997 * array-notation-common.c: Add new includes.
4998 * c-format.c( handle_format_attribute): Canonicalize a format
5000 * c-lex.c (c_common_has_attribute): Canonicalize name of an
5002 * c-pretty-print.c: Add new include.
5004 2017-08-05 Eric Botcazou <ebotcazou@adacore.com>
5006 * c-ada-spec.c (has_static_fields): Look only into variables.
5007 (print_constructor): Add TYPE parameter and use it for the name.
5008 (print_destructor): Likewise.
5009 (print_ada_declaration): Adjust to new constructor/destructor names.
5010 Adjust calls to print_constructor and print_destructor.
5011 (print_ada_struct_decl): Do not test TREE_STATIC on FIELD_DECL.
5012 Look only into variables in the final loop.
5014 2017-08-01 Eric Botcazou <ebotcazou@adacore.com>
5016 * c-ada-spec.c (has_static_fields): Look only into fields.
5017 (dump_generic_ada_node): Small tweak.
5018 (dump_nested_types): Look only into fields.
5019 (print_ada_declaration): Look only into methods. Small tweak.
5020 (print_ada_struct_decl): Look only into fields. Use DECL_VIRTUAL_P.
5022 2017-08-01 Eric Botcazou <ebotcazou@adacore.com>
5024 * c-ada-spec.c (print_generic_ada_decl): Pass correctly-typed constant.
5025 (dump_ada_function_declaration): Likewise.
5026 (dump_generic_ada_node): Likewise.
5027 (print_ada_declaration): Add support for const-qualified variables.
5029 2017-07-31 Martin Liska <mliska@suse.cz>
5032 * c-ubsan.c (ubsan_maybe_instrument_array_ref):
5033 Guard condition with flag_sanitize_p also with current_function_decl
5035 (ubsan_maybe_instrument_reference_or_call): Likewise.
5037 2017-07-30 Uros Bizjak <ubizjak@gmail.com>
5039 * c-format.c (asm_fprintf_char_table): Add 'z' to format_chars.
5041 2017-07-29 Eric Botcazou <ebotcazou@adacore.com>
5043 * c-ada-spec.c (dump_generic_ada_node): Take into account signedness
5045 (print_ada_declaration): Add missing guard for record types.
5047 2017-07-27 Jakub Jelinek <jakub@redhat.com>
5050 * c-omp.c (c_finish_omp_for): If the condition is wrapped in
5051 rhs of COMPOUND_EXPR(s), skip them and readd their lhs into
5052 new COMPOUND_EXPRs around the rhs of the comparison.
5054 2017-07-27 Marek Polacek <polacek@redhat.com>
5057 * c-warn.c (warn_for_sign_compare): Tweak the warning message. Print
5060 2017-07-27 Jakub Jelinek <jakub@redhat.com>
5062 * c-attribs.c (c_common_attribute_table): Add noipa attribute.
5063 (handle_noipa_attribute): New function.
5065 2017-07-07 Torsten Duwe <duwe@suse.de>
5067 * c-attribs.c (c_common_attribute_table): Add entry for
5068 "patchable_function_entry".
5070 2017-07-20 Nathan Sidwell <nathan@acm.org>
5072 Remove TYPE_METHODS.
5073 * c-ada-spec.c (is_tagged_type, has_nontrivial_methods,
5074 dump_ada_template, print_ada_methods,
5075 print_ada_declaration): Member fns are on TYPE_FIELDS.
5077 2017-07-18 Nathan Sidwell <nathan@acm.org>
5079 * c-warn.c (warn_for_memset): Use TYPE_{MIN,MAX}_VALUE.
5081 2017-07-14 David Malcolm <dmalcolm@redhat.com>
5083 * c-common.c (try_to_locate_new_include_insertion_point): New
5085 (per_file_includes_t): New typedef.
5086 (added_includes_t): New typedef.
5087 (added_includes): New variable.
5088 (maybe_add_include_fixit): New function.
5089 * c-common.h (maybe_add_include_fixit): New decl.
5091 2017-07-10 Martin Sebor <msebor@redhat.com>
5094 * c.opt (-Wstringop-overflow): Set defaults in LangEnabledBy.
5096 2017-07-06 David Malcolm <dmalcolm@redhat.com>
5098 * c-common.c (selftest::c_family_tests): New.
5099 * c-common.h (selftest::run_c_tests): Move decl to c/c-lang.h.
5100 (selftest::c_family_tests): New decl.
5102 2017-07-04 Marek Polacek <polacek@redhat.com>
5105 * c-common.c (sync_resolve_size): Give error for pointers to incomplete
5108 2017-07-04 Marek Polacek <polacek@redhat.com>
5110 * c-warn.c (warn_if_unused_value): Remove WITH_CLEANUP_EXPR handling.
5112 2017-06-28 Martin Liska <mliska@suse.cz>
5115 * c-attribs.c (handle_alias_ifunc_attribute): Append ifunc alias
5116 to a function declaration.
5118 2017-06-28 Martin Liska <mliska@suse.cz>
5121 * c.opt: Add IntegerRange to various options.
5123 2017-06-26 Marek Polacek <polacek@redhat.com>
5126 * c-common.h (warn_for_multistatement_macros): Declare.
5127 * c-warn.c: Include "c-family/c-indentation.h".
5128 (warn_for_multistatement_macros): New function.
5129 * c.opt (Wmultistatement-macros): New option.
5130 * c-indentation.c (guard_tinfo_to_string): No longer static.
5131 Change the parameter type to "enum rid". Handle RID_SWITCH.
5132 * c-indentation.h (guard_tinfo_to_string): Declare.
5134 2017-06-23 Marc Glisse <marc.glisse@inria.fr>
5136 * c-common.c (c_common_nodes_and_builtins): Use builtin_structptr_types.
5138 2017-06-15 Martin Sebor <msebor@redhat.com>
5141 * c.opt (-Wclass-memaccess): New option.
5143 2017-06-14 Boris Kolpackov <boris@codesynthesis.com>
5145 * c-opts.c (c_common_finish): Handle '-' special value to -MF.
5147 2017-06-13 Marek Polacek <polacek@redhat.com>
5150 * c-warn.c (do_warn_duplicated_branches): Return if any of the
5153 2017-06-13 Martin Liska <mliska@suse.cz>
5156 * c-attribs.c (add_no_sanitize_value): New function.
5157 (handle_no_sanitize_attribute): Likewise.
5158 (handle_no_sanitize_address_attribute): Use the function.
5159 (handle_no_sanitize_thread_attribute): New function.
5160 (handle_no_address_safety_analysis_attribute): Use
5161 add_no_sanitize_value.
5162 (handle_no_sanitize_undefined_attribute): Likewise.
5163 * c-common.h: Declare new functions.
5164 * c-ubsan.c (ubsan_instrument_division): Use sanitize_flags_p.
5165 (ubsan_instrument_shift): Likewise.
5166 (ubsan_instrument_bounds): Likewise.
5167 (ubsan_maybe_instrument_array_ref): Likewise.
5168 (ubsan_maybe_instrument_reference_or_call): Likewise.
5170 2017-06-11 Jason Merrill <jason@redhat.com>
5172 * c-ada-spec.c, c-pragma.c: Use id_equal.
5174 2017-06-04 Marek Polacek <polacek@redhat.com>
5177 * c-format.c (matching_type_p): Return false if any of the types
5178 requires structural equality.
5180 2017-06-02 Martin Sebor <msebor@redhat.com>
5183 * c-warn.c (conversion_warning): Use -Wconversion for integer
5184 conversion and -Wfloat-conversion for floating one.
5186 2017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
5188 * c.opt (Wsizeof-pointer-div): New warning option.
5190 2017-06-01 Volker Reichelt <v.reichelt@netcologne.de>
5192 * c.opt (Wcatch-value): New shortcut for Wcatch-value=1.
5193 (Wcatch-value=1): Enable by -Wall.
5195 2017-05-30 David Malcolm <dmalcolm@redhat.com>
5197 * c-format.c (gcc_cxxdiag_char_table): Add 'H' and 'I' to
5199 * c.opt (fdiagnostics-show-template-tree): New option.
5200 (felide-type): New option.
5202 2017-05-25 Volker Reichelt <v.reichelt@netcologne.de>
5204 * c.opt (Wcatch-value=): New C++ warning flag.
5206 2017-05-24 Nathan Sidwell <nathan@acm.org>
5208 * c=common.c (field_decl_cmp, resort_field_decl_cmp): Adjust T
5209 const casts to avoid warning.
5211 2017-05-24 Martin Sebor <msebor@redhat.com>
5214 * c-common.h (unsafe_conversion_p): Add a function argument.
5215 * c-common.c (unsafe_conversion_p): Same.
5216 Add type names and values to diagnostics.
5217 (scalar_to_vector): Adjust.
5218 * c-warn.c (constant_expression_error): Add a function argument.
5219 Add type names and values to diagnostics.
5220 (conversion_warning): Add a function argument.
5221 Add type names and values to diagnostics.
5222 (warnings_for_convert_and_check): Same.
5224 2017-05-19 Jason Merrill <jason@redhat.com>
5226 * c-warn.c (match_case_to_enum_1): Don't warn about enums with no
5229 2017-05-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
5231 * c-format.c (locus): Move out of function scope,
5234 2017-05-19 Nathan Sidwell <nathan@acm.org>
5236 * c-opts.c (class_dump_file, class_dump_flags): Delete.
5237 (c_common_parse_file): Remove class dump handling.
5238 (get_dump_info): Likewise.
5240 2017-05-19 Richard Biener <rguenther@suse.de>
5243 * c-warn.c (strict_aliasing_warning): Do not warn for accesses
5244 to alias-set zero memory.
5246 2017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
5248 * c-format.c (local_tree_type_node): Add GTY attribute.
5250 2017-05-18 Marek Polacek <polacek@redhat.com>
5252 * c-common.c (c_common_type_for_size): Use NULL_TREE instead of 0.
5253 (c_common_fixed_point_type_for_size): Likewise.
5254 (c_common_type_for_mode): Likewise.
5255 (shorten_compare): Likewise.
5256 (c_promoting_integer_type_p): Use false/true instead of 0/1.
5257 * c-pragma.c (maybe_apply_renaming_pragma): Use NULL_TREE instead of 0.
5259 2017-05-18 Marek Polacek <polacek@redhat.com>
5261 * c-common.c (self_promoting_args_p): Change the return type to bool.
5262 Use false/true instead of 0/1.
5263 * c-common.h (self_promoting_args_p): Update.
5265 2017-05-17 Marek Polacek <polacek@redhat.com>
5267 * c-common.c: Use NULL_TREE instead of 0 where appropriate.
5268 * c-warn.c: Likewise.
5270 2017-05-17 Ville Voutilainen <ville.voutilainen@gmail.com>
5272 Implement new C++ intrinsics __is_assignable and __is_constructible.
5273 * c-common.c (__is_assignable, __is_constructible): New.
5274 * c-common.h (RID_IS_ASSIGNABLE, RID_IS_CONSTRUCTIBLE): Likewise.
5276 2017-05-17 Martin Liska <mliska@suse.cz>
5278 * c-common.h: Introduce dump_flags_t type and
5279 use it instead of int type.
5280 * c-gimplify.c (c_genericize): Likewise.
5281 * c-opts.c: Likewise.
5283 2017-05-17 Marek Polacek <polacek@redhat.com>
5285 * c-common.c (c_save_expr): Remove.
5286 (c_common_truthvalue_conversion): Remove a call to c_save_expr.
5287 * c-common.h (c_save_expr): Remove declaration.
5289 2017-05-09 Volker Reichelt <v.reichelt@netcologne.de>
5292 * c-pretty-print.c (c_pretty_printer::expression): Handle MAX_EXPR,
5293 MIN_EXPR, EXACT_DIV_EXPR, RDIV_EXPR, LROTATE_EXPR, RROTATE_EXPR.
5294 (c_pretty_printer::postfix_expression): Handle MAX_EXPR, MIN_EXPR.
5295 (c_pretty_printer::multiplicative_expression): Handle EXACT_DIV_EXPR,
5297 (pp_c_shift_expression): Handle LROTATE_EXPR, RROTATE_EXPR.
5299 2017-05-09 Marek Polacek <polacek@redhat.com>
5302 * c-warn.c (unwrap_c_maybe_const): New.
5303 (warn_logical_operator): Call it.
5305 2017-05-09 Nathan Sidwell <nathan@acm.org>
5307 * c-common.c (c_register_builtin_type): Use pushdecl lang_hook.
5308 * c-common.h (pushdecl_top_level, pushdecl): Don't declare here.
5310 2017-05-08 Martin Sebor <msebor@redhat.com>
5312 PR translation/80280
5313 * c-format.h (struct format_flag_spec): Add new member.
5315 * c-format.c (local_tree_type_node): New global.
5316 (printf_flag_specs, asm_fprintf_flag_spec): Initialize new data.
5317 (gcc_diag_flag_specs, scanf_flag_specs, strftime_flag_specs): Ditto.
5318 (strfmon_flag_specs): Likewise.
5319 (gcc_diag_char_table, gcc_cdiag_char_table): Split up specifiers
5320 with distinct quoting properties.
5321 (gcc_tdiag_char_table, gcc_cxxdiag_char_table): Same.
5322 (flag_chars_t::validate): Add argument and handle bad quoting.
5323 (check_format_info_main): Handle quoting problems.
5324 (init_dynamic_diag_info): Simplify.
5326 2017-05-08 Jason Merrill <jason@redhat.com>
5328 * c-opts.c (c_common_post_options): Update defaults for
5329 flag_abi_version and flag_abi_compat_version.
5331 2017-05-05 David Malcolm <dmalcolm@redhat.com>
5333 * c-common.c (c_cpp_error): Replace report_diagnostic
5334 with diagnostic_report_diagnostic.
5336 2017-05-04 Martin Sebor <msebor@redhat.com>
5338 PR translation/80280
5339 * c-attribs.c (handle_alias_ifunc_attribute): Quote a %D directive.
5340 (handle_weakref_attribute): Same.
5342 2017-05-03 Nathan Sidwell <nathan@acm.org>
5344 Canonicalize canonical type hashing
5345 * c-common.c (complete_array_type): Use type_hash_canon.
5347 2017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
5350 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): Remove
5352 (cilk_install_body_pedigree_operations): Likewise.
5353 * cilk.c (cilk_set_spawn_marker): Mark functions that should be
5355 (cilk_gimplify_call_params_in_spawned_fn): Remove.
5356 (cilk_install_body_pedigree_operations): Likewise.
5357 (gimplify_cilk_spawn): Add EXPR_STMT and CLEANUP_POINT_EXPR
5360 2017-04-27 Jakub Jelinek <jakub@redhat.com>
5363 * c-common.c (complete_array_type): Only hash TYPE_TYPELESS_STORAGE
5364 flag on non-aggregate element types.
5366 2017-04-25 Bernd Edlinger <bernd.edlinger@hotmail.de>
5368 * c-common.c (c_type_hasher, type_hash_table): Remove.
5369 (c_common_get_alias_set): Remove unreachable code.
5370 * c-opts.c (c_common_post_options): Make sure cc1 takes only one file.
5372 2017-04-20 Volker Reichelt <v.reichelt@netcologne.de>
5374 * c.opt (Wextra-semi): New C++ warning flag.
5376 2017-04-20 Jakub Jelinek <jakub@redhat.com>
5379 * c-common.c (complete_array_type): Preserve TYPE_TYPELESS_STORAGE.
5381 2017-04-18 Jakub Jelinek <jakub@redhat.com>
5385 * c-common.c (c_common_type_for_mode): Don't handle
5386 widest_*_literal_type_node here.
5387 c_common_signed_or_unsigned_type): Likewise.
5388 (c_common_nodes_and_builtins): Set widest_*_literal_type_node
5389 to *intTI_type_node or *intDI_type_node depending on whether
5390 TImode is supported by the target or not.
5392 2017-04-10 Martin Liska <mliska@suse.cz>
5395 * c-ubsan.c (ubsan_instrument_shift): Evaluate RHS before
5396 doing an UBSAN check.
5398 2017-04-03 Jonathan Wakely <jwakely@redhat.com>
5400 * c-warn.c (do_warn_double_promotion): Fix typo in comment.
5402 2017-03-31 Jakub Jelinek <jakub@redhat.com>
5405 * c-ubsan.h (ubsan_maybe_instrument_reference): Change argument to
5407 * c-ubsan.c (ubsan_maybe_instrument_reference): Likewise. Handle
5408 not just NOP_EXPR to REFERENCE_TYPE, but also INTEGER_CST with
5411 2017-03-31 David Malcolm <dmalcolm@redhat.com>
5413 PR documentation/78732
5414 * c.opt (Wendif-labels): Fix description to refer to
5415 #else rather than #elif.
5417 2017-03-31 Jakub Jelinek <jakub@redhat.com>
5420 * c-common.h (enum rid): Add RID_IS_AGGREGATE.
5421 * c-common.c (c_common_reswords): Add __is_aggregate trait.
5423 2017-03-27 Jakub Jelinek <jakub@redhat.com>
5426 * c-common.c (c_common_mark_addressable_vec): Don't set
5427 TREE_ADDRESSABLE on DECL_HARD_REGISTER.
5429 2017-03-21 Martin Sebor <msebor@redhat.com>
5432 * c-common.c (set_underlying_type): Mark type used only when
5433 original del is declared unused.
5435 2017-03-10 David Malcolm <dmalcolm@redhat.com>
5437 PR translation/79848
5438 * c-format.c (check_format_string): Simplify uses of "%<%s%>" to
5441 2017-03-10 David Malcolm <dmalcolm@redhat.com>
5444 * c-indentation.c (warn_for_misleading_indentation): Remove parens
5445 from inform's message, so that xgettext can locate it.
5447 2017-03-09 Marek Polacek <polacek@redhat.com>
5451 * c-attribs.c (handle_nonnull_attribute): Save the result of default
5452 conversion to the attribute list.
5454 2017-03-09 Martin Liska <mliska@suse.cz>
5456 * c-ada-spec.c (macro_length): Increment value instead of a pointer.
5458 2017-03-03 Jason Merrill <jason@redhat.com>
5460 * c.opt (Wnoexcept-type): New.
5462 2017-03-02 Richard Biener <rguenther@suse.de>
5465 * c-common.c (c_common_mark_addressable_vec): Look through
5468 2017-02-28 Martin Liska <mliska@suse.cz>
5470 * c.opt: Replace space with tabular for options of <number>
5473 2017-02-28 Martin Liska <mliska@suse.cz>
5475 * c.opt: Fix --help=option -Q for options which are of
5478 2017-02-24 Jakub Jelinek <jakub@redhat.com>
5481 * c-common.c (check_function_restrict): New function.
5482 (check_function_arguments): Add FNDECL argument. Call
5483 check_function_restrict if -Wrestrict.
5484 * c-warn.c (warn_for_restrict): Remove ARGS argument, add ARGARRAY
5485 and NARGS. Use auto_vec for ARG_POSITIONS, simplify.
5486 * c-common.h (check_function_arguments): Add FNDECL argument.
5487 (warn_for_restrict): Remove ARGS argument, add ARGARRAY and NARGS.
5489 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
5491 * c-ada-spec.c (dump_ada_function_declaration): Add comment about the
5492 treatment of parameters with pointer-to-tagged type and tidy up.
5493 (print_ada_methods): Remove the special treatment of C++ static member
5496 2017-02-22 Martin Liska <mliska@suse.cz>
5498 * c.opt: Replace inequality signs with square brackets
5501 2017-02-21 Jakub Jelinek <jakub@redhat.com>
5504 * c-attribs.c (handle_mode_attribute): Use build_qualified_type to
5507 2017-02-17 Joseph Myers <joseph@codesourcery.com>
5509 * c-cppbuiltin.c (builtin_define_float_constants): Define
5510 __DECIMAL_DIG__ to the value for long double.
5512 2017-02-15 Marek Polacek <polacek@redhat.com>
5515 * c-warn.c (do_warn_double_promotion): Don't warn if an invalid
5516 conversion has occured.
5518 2017-01-24 David Malcolm <dmalcolm@redhat.com>
5520 * c-common.c (c_common_reswords): Add "__RTL".
5521 * c-common.h (enum rid): Add RID_RTL.
5523 2017-01-20 Marek Polacek <polacek@redhat.com>
5526 * c-common.h (do_warn_duplicated_branches_r): Declare.
5527 * c-gimplify.c (c_genericize): Walk the function tree calling
5528 do_warn_duplicated_branches_r.
5529 * c-warn.c (expr_from_macro_expansion_r): New.
5530 (do_warn_duplicated_branches): New.
5531 (do_warn_duplicated_branches_r): New.
5532 * c.opt (Wduplicated-branches): New option.
5534 2017-01-17 David Malcolm <dmalcolm@redhat.com>
5537 * c-indentation.c (warn_for_misleading_indentation): Use the past
5538 subjunctive in the note.
5540 2017-01-17 Aldy Hernandez <aldyh@redhat.com>
5543 * array-notation-common.c (cilkplus_extract_an_triplets): Convert
5544 start type to integer_type.
5546 2017-01-16 Jakub Jelinek <jakub@redhat.com>
5549 * c.opt (gen-decls): Add Driver flag.
5551 2017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
5554 2017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
5557 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
5559 2017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
5562 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
5564 2017-01-12 Martin Sebor <msebor@redhat.com>
5566 (-Wformat-overflow): ...to this.
5568 2017-01-11 Martin Sebor <msebor@redhat.com>
5571 * c.opt (-Walloca-larger-than, -Wformat-length, -Wformat-truncation):
5572 Also enable for LTO.
5574 2017-01-10 Jason Merrill <jason@redhat.com>
5576 Implement P0195R2, C++17 variadic using.
5577 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_variadic_using.
5579 2017-01-09 Jakub Jelinek <jakub@redhat.com>
5581 PR translation/79019
5582 PR translation/79020
5583 * c.opt (Wnormalized=): Fix typo in description.
5585 2017-01-08 Martin Sebor <msebor@redhat.com>
5588 * c.opt (-Wformat-truncation): New option.
5590 2017-01-06 Alexandre Oliva <aoliva@redhat.com>
5592 * c-pretty-print.c (pp_c_tree_decl_identifier): Convert 16-bit
5593 value to unsigned short to fit in 4 hex digits without
5596 2017-01-05 Eric Botcazou <ebotcazou@adacore.com>
5598 * c.opt (fsso-struct): Add 'native' value.
5600 2017-01-05 Martin Liska <mliska@suse.cz>
5603 * c-opts.c (c_common_post_options): Reject '-' filename for a precompiled
5606 2017-01-04 Marek Polacek <polacek@redhat.com>
5609 * c.opt (Wpointer-compare): New option.
5611 2017-01-04 Jakub Jelinek <jakub@redhat.com>
5614 * c.opt (fsso-struct=): Add RejectNegative.
5616 2017-01-01 Jakub Jelinek <jakub@redhat.com>
5618 Update copyright years.
5620 2016-12-29 Martin Liska <mliska@suse.cz>
5623 * c.opt (strong-eval-order): Add RejectNegative keyword.
5625 2016-12-22 Jason Merrill <jason@redhat.com>
5627 Implement P0522R0, matching of template template arguments.
5628 * c-cppbuiltin.c (c_cpp_builtins): Define
5629 __cpp_template_template_args.
5631 2016-12-21 Jakub Jelinek <jakub@redhat.com>
5634 * c-common.c (struct nonnull_arg_ctx): New type.
5635 (check_function_nonnull): Return bool instead of void. Use
5636 nonnull_arg_ctx as context rather than just location_t.
5637 (check_nonnull_arg): Adjust for the new context type, set
5638 warned_p to true if a warning has been diagnosed.
5639 (check_function_arguments): Return bool instead of void.
5640 * c-common.h (check_function_arguments): Adjust prototype.
5642 2016-12-21 Jason Merrill <jason@redhat.com>
5644 * c.opt (-fnew-ttp-matching): New flag.
5645 * c-opts.c (c_common_post_options): Default on if -std=c++1z.
5647 2016-12-14 Martin Jambor <mjambor@suse.cz>
5649 * c-omp.c: Include omp-general.h instead of omp-low.h.
5650 (c_finish_oacc_wait): Adjusted call to find_omp_clause to use its new
5653 2016-12-14 Martin Sebor <msebor@redhat.com>
5656 * c-common.c (check_nonnull_arg): Disable when optimization
5659 2016-12-12 Marek Polacek <polacek@redhat.com>
5662 * c-common.c (attribute_fallthrough_p): Return false for
5665 2016-12-08 Martin Sebor <msebor@redhat.com>
5668 * c.opt (-Walloc-zero, -Walloc-size-larger-than): New options.
5670 2016-12-08 Martin Sebor <msebor@redhat.com>
5673 * c-pretty-print (pp_c_integer_constant): Avoid formatting type
5676 2016-12-07 Martin Sebor <msebor@redhat.com>
5682 * c.opt (-Wstringop-overflow): New option.
5684 2016-12-02 Maxim Ostapenko <m.ostapenko@samsung.com>
5686 * c-attribs.c (asan odr indicator): New attribute.
5687 (handle_asan_odr_indicator_attribute): New function.
5689 2016-11-26 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5691 * c-common.c (c_common_nodes_and_builtins): Remove initialization of
5694 2016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
5696 * c-common.c (excess_precision_mode_join): New.
5697 (c_ts18661_flt_eval_method): New.
5698 (c_c11_flt_eval_method): Likewise.
5699 (c_flt_eval_method): Likewise.
5700 * c-common.h (excess_precision_mode_join): New.
5701 (c_flt_eval_method): Likewise.
5702 * c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): New.
5703 (cpp_iec_559_value): Call it.
5704 (c_cpp_builtins): Modify logic for __LIBGCC_*_EXCESS_PRECISION__,
5705 call c_flt_eval_method to set __FLT_EVAL_METHOD__ and
5706 __FLT_EVAL_METHOD_TS_18661_3__.
5708 2016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
5710 * c-opts.c (c_common_post_options): Add logic to handle the default
5711 case for -fpermitted-flt-eval-methods.
5713 2016-11-23 Paolo Bonzini <bonzini@gnu.org>
5715 * c.opt (Wexpansion-to-defined): New.
5717 2016-11-23 Jakub Jelinek <jakub@redhat.com>
5720 * c-pragma.c (handle_pragma_target): Don't replace
5721 current_target_pragma, but chainon the new args to the current one.
5723 2016-11-22 Nathan Sidwell <nathan@acm.org>
5725 * array-notation-common.c (cilkplus_extract_an_trplets): Fix
5726 indentation and formatting.
5728 2016-11-21 Martin Sebor <msebor@redhat.com>
5730 * c.opt (-fprintf-return-value): Enable by default.
5732 2016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
5735 * c.opt (-Wbuiltin-declaration-mismatch): New warning.
5736 * c-common.c (c_common_nodes_and_builtins): Initialize
5737 const_tm_ptr_type_node.
5739 2016-11-16 Marek Polacek <polacek@redhat.com>
5742 * c-common.c (c_add_case_label): Turn error_at calls into inform.
5744 2016-11-14 Jakub Jelinek <jakub@redhat.com>
5746 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_structured_bindings.
5748 2016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
5749 Richard Biener <rguenther@suse.de>
5751 * c-common.h (c_common_resword): Add RID_GIMPLE, RID_PHI types.
5752 * c-common.h (enum rid): Add RID_GIMPLE, RID_PHI.
5753 * c.opt (fgimple): New option.
5755 2016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5758 * c-common.h (warn_for_restrict): Declare.
5759 * c-warn.c: Include gcc-rich-location.h.
5760 (warn_for_restrict): New function.
5761 * c-format.c (gcc_tdiag_char_table): Add entry for "Z" specifier.
5762 (gcc_cdiag_char_table): Likewise.
5763 (gcc_cxxdiag_char_table): Likewise.
5764 * c.opt (Wrestrict): New option.
5766 2016-11-13 Eric Botcazou <ebotcazou@adacore.com>
5768 * c-ada-spec.c (print_ada_declaration): For typedef declarations, look
5769 for nested types only if the type is a record or union and dump SLOC.
5771 2016-11-09 Jason Merrill <jason@redhat.com>
5773 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_template_auto.
5775 2016-11-09 Jakub Jelinek <jakub@redhat.com>
5777 * c-ubsan.c (ubsan_instrument_shift): Handle split
5778 -fsanitize=shift-base and -fsanitize=shift-exponent.
5780 2016-11-07 Jason Merrill <jason@redhat.com>
5782 * c.opt (Wc++1z-compat): New.
5783 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_noexcept_function_type.
5785 2016-11-07 Martin Liska <mliska@suse.cz>
5787 * c-warn.c (warn_for_unused_label): Save all labels used
5788 in goto or in &label.
5790 2016-11-03 Jason Merrill <jason@redhat.com>
5792 * c-cppbuiltin.c (c_cpp_builtins): Correct
5793 __cpp_inheriting_constructors.
5795 2016-11-01 Jason Merrill <jason@redhat.com>
5797 * c-cppbuiltin.c (c_cpp_builtins): Update
5798 __cpp_inheriting_constructors.
5800 * c.opt (-fnew-inheriting-ctors): New.
5801 * c-opts.c: Default to on for ABI 11+.
5803 2016-10-31 Jakub Jelinek <jakub@redhat.com>
5806 * c.opt (fext-numeric-literals): Add Var and Init.
5807 * c-opts.c (c_common_handle_option): Don't clear
5808 cpp_opts->ext_numeric_literals for -std=c++{11,14,1z}.
5809 (c_common_post_options): Clear it here if not set
5812 2016-10-28 Aldy Hernandez <aldyh@redhat.com>
5815 * c-pretty-print.c (simple_type_specifier): Do not dereference `t'
5818 2016-10-25 Jakub Jelinek <jakub@redhat.com>
5820 * c-common.h (enum rid): Add RID_BUILTIN_LAUNDER.
5821 * c-common.c (c_common_reswords): Add __builtin_launder.
5823 2016-10-24 Bernd Edlinger <bernd.edlinger@hotmail.de>
5825 * c-common.c (c_common_truthvalue_conversion): Warn for
5826 multiplications in boolean context. Fix the quoting of '<<' and '<'
5827 in the shift warning.
5829 2016-10-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
5831 * c-common.c (c_common_truthvalue_conversion): Fix the comment.
5833 2016-10-20 Jason Merrill <jason@redhat.com>
5835 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_concepts value.
5837 2016-10-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
5839 * c-common.c (c_common_truthvalue_conversion): Warn only for signed
5840 integer shift ops in boolean context.
5842 2016-10-18 Aldy Hernandez <aldyh@redhat.com>
5844 * c.opt (Walloca): New.
5845 (Walloca-larger-than=): New.
5846 (Wvla-larger-than=): New.
5848 2016-10-17 Marek Polacek <polacek@redhat.com>
5850 * c-warn.c (find_array_ref_with_const_idx_r): Remove parameter names.
5851 Return immediately when finding a match.
5852 (warn_tautological_cmp): Remove a boolean variable that is no longer
5855 2016-10-17 Marek Polacek <polacek@redhat.com>
5857 * c-attribs.c: New file.
5858 * c-common.c: Move attributes handling to c-attribs.c.
5859 (get_nonnull_operand): No longer static.
5860 * c-common.h: Move the declarations from c-attribs.c to its own section.
5862 2016-10-14 Jason Merrill <jason@redhat.com>
5864 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_aggregate_bases
5865 and __cpp_deduction_guides.
5867 2016-10-13 Jason Merrill <jason@redhat.com>
5869 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_inline_variables.
5871 2016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
5873 * c-cppbuiltin.c: Include memmodel.h.
5874 * c-opts.c: Likewise.
5875 * c-pragma.c: Likewise.
5876 * c-warn.c: Likewise.
5878 2016-10-12 Jakub Jelinek <jakub@redhat.com>
5880 * c.opt (Wextra): Add as C/C++/ObjC/ObjC++ option.
5881 (Wimplicit-fallthrough=): Enable for these languages by -Wextra.
5882 * c-opts.c (sanitize_cpp_opts): Initialize
5883 cpp_opts->cpp_warn_implicit_fallthrough.
5885 2016-10-11 Marek Polacek <polacek@redhat.com>
5887 * c-common.c (warning_candidate_p): Change the return type to bool
5888 and return true/false instead of 1/0.
5889 (vector_mode_valid_p): Likewise.
5891 2016-10-11 Marek Polacek <polacek@redhat.com>
5893 * c-common.c (fold_for_warn): No longer static.
5894 (bool_promoted_to_int_p): Likewise.
5895 (c_common_get_narrower): Likewise.
5896 (constant_expression_warning): Move to c-warn.c.
5897 (constant_expression_error): Likewise.
5898 (overflow_warning): Likewise.
5899 (warn_logical_operator): Likewise.
5900 (find_array_ref_with_const_idx_r): Likewise.
5901 (warn_tautological_cmp): Likewise.
5902 (expr_has_boolean_operands_p): Likewise.
5903 (warn_logical_not_parentheses): Likewise.
5904 (warn_if_unused_value): Likewise.
5905 (strict_aliasing_warning): Likewise.
5906 (sizeof_pointer_memaccess_warning): Likewise.
5907 (check_main_parameter_types): Likewise.
5908 (conversion_warning): Likewise.
5909 (warnings_for_convert_and_check): Likewise.
5910 (match_case_to_enum_1): Likewise.
5911 (match_case_to_enum): Likewise.
5912 (c_do_switch_warnings): Likewise.
5913 (warn_for_omitted_condop): Likewise.
5914 (readonly_error): Likewise.
5915 (lvalue_error): Likewise.
5916 (invalid_indirection_error): Likewise.
5917 (warn_array_subscript_with_type_char): Likewise.
5918 (warn_about_parentheses): Likewise.
5919 (warn_for_unused_label): Likewise.
5920 (warn_for_div_by_zero): Likewise.
5921 (warn_for_memset): Likewise.
5922 (warn_for_sign_compare): Likewise.
5923 (do_warn_double_promotion): Likewise.
5924 (do_warn_unused_parameter): Likewise.
5925 (record_locally_defined_typedef): Likewise.
5926 (maybe_record_typedef_use): Likewise.
5927 (maybe_warn_unused_local_typedefs): Likewise.
5928 (maybe_warn_bool_compare): Likewise.
5929 (maybe_warn_shift_overflow): Likewise.
5930 (warn_duplicated_cond_add_or_warn): Likewise.
5931 (diagnose_mismatched_attributes): Likewise.
5932 * c-common.h: Move the declarations from c-warn.c to its own section.
5933 * c-warn.c: New file.
5935 2016-10-08 Jason Merrill <jason@redhat.com>
5937 * c-common.c (c_common_truthvalue_conversion): Don't distribute
5938 into COND_EXPR in C++.
5940 2016-10-08 Jakub Jelinek <jakub@redhat.com>
5942 * c-lex.c (c_lex_with_flags) <case CPP_COMMENT>: For CPP_COMMENT
5943 token with PREV_FALLTHROUGH, skip all following CPP_PADDING and
5944 CPP_COMMENT tokens and set add_flags to PREV_FALLTHROUGH afterwards.
5946 2016-10-07 Jakub Jelinek <jakub@redhat.com>
5948 Implement LWG2296 helper intrinsic
5949 * c-common.h (enum rid): Add RID_ADDRESSOF.
5950 * c-common.c (c_common_reswords): Add __builtin_addressof.
5952 2016-10-07 Bernd Edlinger <bernd.edlinger@hotmail.de>
5955 * c-common.c (c_common_truthvalue_conversion): Warn also for
5956 suspicious enum values in boolean context.
5958 2016-10-06 Jakub Jelinek <jakub@redhat.com>
5960 Implement P0258R2 - helper for C++17
5961 std::has_unique_object_representations trait
5962 * c-common.h (enum rid): Add RID_HAS_UNIQUE_OBJ_REPRESENTATIONS.
5963 * c-common.c (c_common_reswords): Add
5964 __has_unique_object_representations.
5966 2016-10-05 Jakub Jelinek <jakub@redhat.com>
5969 * c-ubsan.c (ubsan_instrument_return): Don't call
5970 initialize_sanitizer_builtins here.
5972 2016-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
5974 * c-common.c (c_common_truthvalue_conversion): Warn also for suspicious
5975 conditional expression in boolean context when only one arm is
5978 2016-10-05 Jakub Jelinek <jakub@redhat.com>
5981 * c-ubsan.c (ubsan_instrument_shift): Return NULL_TREE if type0
5984 * c-common.c (c_common_reswords): Update comment for C++11.
5986 2016-10-04 Jason Merrill <jason@redhat.com>
5988 * c-common.c (make_tree_vector_from_ctor): New.
5989 * c-common.h: Declare it.
5991 2016-10-04 Jakub Jelinek <jakub@redhat.com>
5993 * c-cppbuiltin.c (c_cpp_builtins): Don't define
5994 __LIBGCC_JCR_SECTION_NAME__.
5996 2016-10-03 Bernd Edlinger <bernd.edlinger@hotmail.de>
5998 * c-common.c (c_common_truthvalue_conversion): Warn for suspicious
5999 left shift in boolean context.
6001 2016-09-29 Jakub Jelinek <jakub@redhat.com>
6003 Implement P0001R1 - C++17 removal of register storage class specifier
6004 * c.opt (Wregister): New warning.
6005 * c-opts.c (c_common_post_options): Enable -Wregister by
6008 2016-09-29 James Greenhalgh <james.greenhalgh@arm.com>
6010 * c-opts.c (c_common_post_options): Remove special case for
6011 TARGET_FLT_EVAL_METHOD_NON_DEFAULT with -fexcess-precision=standard
6014 2016-09-27 Jakub Jelinek <jakub@redhat.com>
6016 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_capture_star_this for
6019 * c-ada-spec.c (print_ada_declaration): Remove break after return.
6021 2016-09-26 Thomas Preud'homme <thomas.preudhomme@arm.com>
6023 * c-common.c: Include memmodel.h.
6025 2016-09-26 Marek Polacek <polacek@redhat.com>
6027 * c-lex.c (c_common_has_attribute): Handle attribute fallthrough.
6029 2016-09-26 Marek Polacek <polacek@redhat.com>
6032 * c-common.c (c_common_attribute_table): Add fallthrough attribute.
6033 (handle_fallthrough_attribute): New function.
6034 (attribute_fallthrough_p): New function.
6035 * c-common.h (attribute_fallthrough_p): Declare.
6037 2016-09-24 Marek Polacek <polacek@redhat.com>
6040 * c.opt (Wbool-operation): New.
6042 2016-09-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
6044 * c-common.c (c_common_truthvalue_conversion): Inhibit
6045 Wint-in-bool-context warning with from_macro_definition_at.
6046 Mention the expression will always evaluate to true.
6048 2016-09-21 Martin Sebor <msebor@redhat.com>
6051 * c.opt (fprintf-return-value): Temporarily initialize to zero
6052 to unblock bootstrap failures.
6054 2016-09-21 Jakub Jelinek <jakub@redhat.com>
6057 * c.opt (Waligned-new=): Add RejectNegative.
6058 (faligned-new=): Likewise. Spelling fix - change
6059 aligned_new_threshhold to aligned_new_threshold.
6060 * c-cppbuiltin.c (c_cpp_builtins): Change aligned_new_threshhold
6061 to aligned_new_threshold.
6063 2016-09-20 Martin Sebor <msebor@redhat.com>
6066 * c.opt: Add -Wformat-length and -fprintf-return-value.
6068 2016-09-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
6071 * c.opt (Wint-in-bool-context): New warning.
6072 * c-common.c (c_common_truthvalue_conversion): Warn on integer
6073 constants in boolean context.
6075 2016-09-19 Joseph Myers <joseph@codesourcery.com>
6077 * c-common.c (max_align_t_align): Also consider alignment of
6080 2016-09-15 Jason Merrill <jason@redhat.com>
6082 * c-common.c (check_cxx_fundamental_alignment_constraints): Check
6085 2016-09-14 Jason Merrill <jason@redhat.com>
6087 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
6088 limit FIELD_DECL, either.
6090 2016-09-14 Marek Polacek <polacek@redhat.com>
6092 * c-common.c (c_common_truthvalue_conversion): Use false instead of 0.
6093 * c-common.h (build_unary_op): Change nonconvert parameter type to bool.
6094 * c-omp.c (c_finish_omp_atomic): Use false instead of 0.
6096 2016-09-13 David Malcolm <dmalcolm@redhat.com>
6098 * c-common.c (warn_logical_not_parentheses): Replace
6099 rich_location::add_fixit_insert calls with add_fixit_insert_before
6100 and add_fixit_insert_after, eliminating the "next_loc" calculation.
6102 2016-09-13 Jason Merrill <jason@redhat.com>
6103 Tom de Vries <tom@codesourcery.com>
6106 * c-common.c (set_underlying_type): Don't treat array as builtin type.
6108 2016-09-13 Jason Merrill <jason@redhat.com>
6110 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
6113 2016-09-12 Jason Merrill <jason@redhat.com>
6115 * c-common.c (check_cxx_fundamental_alignment_constraints): Fix
6116 bit/byte confusion, allow large alignment for types.
6118 2016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
6121 * c-common.c (warn_for_omitted_condop): Also warn for boolean data.
6123 2016-09-12 David Malcolm <dmalcolm@redhat.com>
6126 * c-format.c (argument_parser::check_argument_type): Add params
6127 "type_start" and "conversion_char". Use the former to generate
6128 offset_to_type_start and pass it and conversion_char to
6130 (check_format_info_main): Capture the start of the type
6131 information as "type_start", and pass it an format_char
6132 to arg_parser.check_argument_type.
6133 (check_format_types): Provide an example in the leading comment.
6134 Add params "offset_to_type_start" and "conversion_char"; pass
6135 them to format_type_warning calls.
6136 (test_get_modifier_for_format_len): Likewise.
6137 (matching_type_p): New function.
6138 (get_format_for_type): Add param "conversion_char" and move
6139 implementation into...
6140 (get_format_for_type_1): ...new function, called twice.
6141 Use new function matching_type_p rather than checking for
6142 TYPE_CANONICAL equality.
6143 (get_corrected_substring): New function.
6144 (format_type_warning): Provide an example in the leading comment.
6145 Add params "offset_to_type_start" and "conversion_char". Replace
6146 call to get_format_for_type with call to get_corrected_substring
6147 and move rejection of hints for widths/precisions there.
6148 (assert_format_for_type_streq): Add param "conversion_char".
6149 (ASSERT_FORMAT_FOR_TYPE_STREQ): Add param CONVERSION_CHAR.
6150 (test_get_format_for_type_printf): Add conversion chars to the
6151 tests, adding coverage for various combinations of integer
6152 vs double conversions, and for preserving octal and hexadecimal
6154 (test_get_format_for_type_scanf): Add conversion chars to the
6157 2016-09-10 Tom de Vries <tom@codesourcery.com>
6160 * c-common.c (build_va_arg): Handle more strict
6161 targetm.canonical_va_list_type. Replace first argument type error with
6164 2016-09-09 Martin Sebor <msebor@redhat.com>
6168 * c-format.c (argument_parser::find_format_char_info): Use %qc
6169 format directive unconditionally.
6171 2016-09-09 Jason Merrill <jason@redhat.com>
6173 Implement C++17 new of over-aligned types.
6174 * c.opt: Add -faligned-new and -Waligned-new.
6175 * c-common.c (max_align_t_align): Split out from...
6176 (cxx_fundamental_alignment_p): ...here.
6177 * c-common.h: Declare it.
6178 * c-cppbuiltin.c (c_cpp_builtins): Handle aligned new.
6180 2016-09-09 Joseph Myers <joseph@codesourcery.com>
6182 * c-cppbuiltin.c (builtin_define_type_width): New function.
6183 (builtin_define_stdint_macros, c_cpp_builtins): Define type width
6186 2016-09-07 David Malcolm <dmalcolm@redhat.com>
6188 * c-common.c (get_cpp_ttype_from_string_type): Handle being passed
6190 (substring_loc::get_location): Move to substring-locations.c,
6191 keeping implementation as...
6192 (c_get_substring_location): New function, from the above, reworked
6193 to use accessors rather than member lookup.
6194 * c-common.h (class substring_loc): Move to substring-locations.h,
6195 replacing with a forward decl.
6196 (c_get_substring_location): New decl.
6197 * c-format.c: Include "substring-locations.h".
6198 (format_warning_va): Move to substring-locations.c.
6199 (format_warning_at_substring): Likewise.
6201 2016-09-06 Martin Sebor <msebor@redhat.com>
6204 * c-format.c (check_function_format): Avoid issuing warnings for
6205 functions unless they call format functions with non-constant
6208 2016-09-06 Richard Biener <rguenther@suse.de>
6211 * c-common.c (c_common_mark_addressable_vec): Handle
6212 COMPOUND_LITERAL_EXPR.
6214 2016-09-05 Marek Polacek <polacek@redhat.com>
6217 * c-common.c (bool_promoted_to_int_p): New function.
6218 (expr_has_boolean_operands_p): New function.
6219 (warn_logical_not_parentheses): Return if expr_has_boolean_operands_p.
6220 (maybe_warn_bool_compare): Use bool_promoted_to_int_p.
6222 2016-09-04 Tom de Vries <tom@codesourcery.com>
6225 2016-08-29 Tom de Vries <tom@codesourcery.com>
6227 * c-common.c (build_va_arg): Replace first argument type error
6230 2016-09-02 Jakub Jelinek <jakub@redhat.com>
6233 * c-omp.c (c_finish_omp_atomic): Reject _Atomic qualified expressions.
6234 (c_finish_omp_for): Reject _Atomic qualified iterators.
6236 2016-09-01 Martin Sebor <msebor@redhat.com>
6238 * c-ada-spec.c (dump_ada_function_declaration): Increase buffer
6239 size to guarantee it fits the output of the formatted function
6240 regardless of its arguments.
6242 2016-09-01 Marek Polacek <polacek@redhat.com>
6245 * c-common.c (resolve_overloaded_builtin): Fix formatting. Add
6248 2016-08-29 Marek Polacek <polacek@redhat.com>
6251 * c-common.c (warn_logical_not_parentheses): Don't warn for
6252 a comparison or a logical operator.
6254 2016-08-29 Tom de Vries <tom@codesourcery.com>
6256 * c-common.c (build_va_arg): Fix type comparison assert.
6258 2016-08-29 Tom de Vries <tom@codesourcery.com>
6260 * c-common.c (build_va_arg): Replace first argument type error
6263 2016-08-29 Tom de Vries <tom@codesourcery.com>
6266 * c-common.c (build_va_arg): Add first argument error. Build va_arg
6267 with error_mark_node as va_list instead of with illegal va_list.
6269 2016-08-25 Marek Polacek <polacek@redhat.com>
6270 David Malcolm <dmalcolm@redhat.com>
6272 * c-common.c (warn_logical_not_parentheses): Print fixit hints.
6273 * c-common.h (warn_logical_not_parentheses): Update declaration.
6275 2016-08-22 Marek Polacek <polacek@redhat.com>
6278 * c-common.c (warn_for_memset): Check type for null.
6280 2016-08-22 Joseph Myers <joseph@codesourcery.com>
6282 * c-cppbuiltin.c (c_cpp_builtins): Check _FloatN and
6283 _FloatNx types for suffixes for built-in functions.
6285 2016-08-19 Joseph Myers <joseph@codesourcery.com>
6288 * c-common.h (RID_FLOAT16, RID_FLOATN_NX_FIRST, RID_FLOAT32)
6289 (RID_FLOAT64, RID_FLOAT128, RID_FLOAT32X, RID_FLOAT64X)
6290 (RID_FLOAT128X): New enum rid values.
6291 (CASE_RID_FLOATN_NX): New macro.
6292 * c-common.c (c_common_reswords): Add _FloatN and _FloatNx
6294 (c_common_type_for_mode): Check for _FloatN and _FloatNx and
6295 corresponding complex types.
6296 (c_common_nodes_and_builtins): For non-C++, register _FloatN and
6297 _FloatNx and corresponding complex types.
6298 (keyword_begins_type_specifier): Use CASE_RID_FLOATN_NX.
6299 * c-cppbuiltin.c (builtin_define_float_constants): Check _FloatN
6300 and _FloatNx types for the widest type for determining
6301 DECIMAL_DIG. Define __LDBL_DECIMAL_DIG__ as well as
6302 __DECIMAL_DIG__ for long double. Handle FMA_SUFFIX being NULL.
6303 (c_cpp_builtins): Call builtin_define_float_constants for _FloatN
6305 * c-lex.c (interpret_float): Handle _FloatN and _FloatNx
6307 * c-pretty-print.c (pp_c_floating_constant): Handle _FloatN and
6310 2016-08-18 David Malcolm <dmalcolm@redhat.com>
6312 * c-opts.c (c_diagnostic_finalizer): Update for change to
6313 diagnostic_show_locus.
6315 2016-08-18 David Malcolm <dmalcolm@redhat.com>
6317 * c-common.c: Include "spellcheck.h".
6318 (cb_get_suggestion): New function.
6319 * c-common.h (cb_get_suggestion): New decl.
6320 * c-lex.c (init_c_lex): Initialize cb->get_suggestion to
6323 2016-08-18 Marek Polacek <polacek@redhat.com>
6326 * c-common.c (get_atomic_generic_size): Disallow pointer-to-function
6329 2016-08-16 David Malcolm <dmalcolm@redhat.com>
6332 * c-common.c (substring_loc::get_range): Rename to...
6333 (substring_loc::get_location): ...this, converting param from a
6334 source_range * to a location_t *. Call
6335 get_source_location_for_substring rather than
6336 get_source_range_for_substring, and pass in m_caret_idx.
6337 * c-common.h (substring_loc::substring_loc): Add param "caret_idx".
6338 (substring_loc::get_range): Replace with...
6339 (substring_loc::get_location): ...this.
6340 (substring_loc::set_caret_index): New method.
6341 (substring_loc): Add field m_caret_idx.
6342 * c-format.c (format_warning_va): Update for above changes.
6343 Rename local "substring_loc" to "fmt_substring_loc" to avoid
6344 clashing with type name.
6345 (format_warning_at_char): Add caret_idx param to substring_loc ctor.
6346 (check_argument_type): Likewise.
6347 (format_type_warning): Rename param "fmt_loc" to "whole_fmt_loc"
6348 Use a copy when emitting warnings, setting the caret index from TYPE.
6350 2016-08-16 Eric Botcazou <ebotcazou@adacore.com>
6351 Arnaud Charlet <charlet@adacore.com>
6353 * c-ada-spec.c (dump_number): New function.
6354 (handle_escape_character): Likewise.
6355 (print_ada_macros): Add handling of constant integers and strings.
6357 2016-08-12 Marek Polacek <polacek@redhat.com>
6360 * c-common.c (scalar_to_vector): Adjust fall through comment.
6361 * c-opts.c (c_common_handle_option): Likewise.
6362 * c-pragma.c (handle_pragma_pack): Add FALLTHRU.
6363 * c-pretty-print.c (c_pretty_printer::postfix_expression): Adjust
6364 fall through comment.
6365 * cilk.c (extract_free_variables): Add FALLTHRU.
6367 2016-08-10 Jason Merrill <jason@redhat.com>
6369 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_if_constexpr.
6371 2016-08-09 Jason Merrill <jason@redhat.com>
6373 * c-common.c (c_common_attribute_table): vector_size affects type
6376 2016-08-09 Marek Polacek <polacek@redhat.com>
6379 * c-ada-spec.c (dump_generic_ada_node): Add return.
6381 2016-08-09 Jason Merrill <jason@redhat.com>
6383 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_constexpr for
6384 C++17 constexpr lambdas.
6386 2016-08-08 David Malcolm <dmalcolm@redhat.com>
6389 * c-common.h (selftest::c_format_c_tests): New declaration.
6390 (selftest::run_c_tests): New declaration.
6391 * c-format.c: Include "selftest.h.
6392 (format_warning_va): Add param "corrected_substring" and use
6393 it to add a replacement fix-it hint.
6394 (format_warning_at_substring): Likewise.
6395 (format_warning_at_char): Update for new param of
6397 (argument_parser::check_argument_type): Pass "fki" to
6399 (check_format_types): Add param "fki" and pass it to
6400 format_type_warning.
6401 (deref_n_times): New function.
6402 (get_modifier_for_format_len): New function.
6403 (selftest::test_get_modifier_for_format_len): New function.
6404 (get_format_for_type): New function.
6405 (format_type_warning): Add param "fki" and use it to attempt
6406 to provide hints for argument types when calling
6407 format_warning_at_substring.
6408 (selftest::get_info): New function.
6409 (selftest::assert_format_for_type_streq): New function.
6410 (ASSERT_FORMAT_FOR_TYPE_STREQ): New macro.
6411 (selftest::test_get_format_for_type_printf): New function.
6412 (selftest::test_get_format_for_type_scanf): New function.
6413 (selftest::c_format_c_tests): New function.
6415 2016-08-08 David Malcolm <dmalcolm@redhat.com>
6418 * c-format.c: Include "diagnostic.h".
6419 (location_column_from_byte_offset): Delete.
6420 (location_from_offset): Delete.
6421 (format_warning_va): New function.
6422 (format_warning_at_substring): New function.
6423 (format_warning_at_char): New function.
6424 (check_format_arg): Capture location of format_tree and pass to
6425 check_format_info_main.
6426 (argument_parser): Add fields "start_of_this_format" and
6427 "format_string_cst".
6428 (flag_chars_t::validate): Add param "format_string_cst". Convert
6429 warning_at call using location_from_offset to call to
6430 format_warning_at_char.
6431 (argument_parser::argument_parser): Add param "format_string_cst_"
6432 and use use it to initialize field "format_string_cst".
6433 Initialize new field "start_of_this_format".
6434 (argument_parser::read_format_flags): Convert warning_at call
6435 using location_from_offset to a call to format_warning_at_char.
6436 (argument_parser::read_any_format_left_precision): Likewise.
6437 (argument_parser::read_any_format_precision): Likewise.
6438 (argument_parser::read_any_other_modifier): Likewise.
6439 (argument_parser::find_format_char_info): Likewise, in three places.
6440 (argument_parser::parse_any_scan_set): Likewise, in one place.
6441 (argument_parser::handle_conversions): Likewise, in two places.
6442 (argument_parser::check_argument_type): Add param "fmt_param_loc"
6443 and use it to make a substring_loc. Pass the latter to
6445 (check_format_info_main): Add params "fmt_param_loc" and
6446 "format_string_cst". Convert warning_at calls using
6447 location_from_offset to calls to format_warning_at_char. Pass the
6448 new params to the arg_parser ctor. Pass "format_string_cst" to
6449 flag_chars.validate. Pass "fmt_param_loc" to
6450 arg_parser.check_argument_type.
6451 (check_format_types): Convert first param from a location_t
6452 to a const substring_loc & and rename to "fmt_loc". Attempt
6453 to extract the range of the relevant parameter and pass it
6454 to format_type_warning.
6455 (format_type_warning): Convert first param from a location_t
6456 to a const substring_loc & and rename to "fmt_loc". Add
6457 params "param_range" and "type". Replace calls to warning_at
6458 with calls to format_warning_at_substring.
6460 2016-08-08 David Malcolm <dmalcolm@redhat.com>
6462 * c-format.c (class flag_chars_t): New class.
6463 (struct length_modifier): New struct.
6464 (class argument_parser): New class.
6465 (flag_chars_t::flag_chars_t): New ctor.
6466 (flag_chars_t::has_char_p): New method.
6467 (flag_chars_t::add_char): New method.
6468 (flag_chars_t::validate): New method.
6469 (flag_chars_t::get_alloc_flag): New method.
6470 (flag_chars_t::assignment_suppression_p): New method.
6471 (argument_parser::argument_parser): New ctor.
6472 (argument_parser::read_any_dollar): New method.
6473 (argument_parser::read_format_flags): New method.
6474 (argument_parser::read_any_format_width): New method.
6475 (argument_parser::read_any_format_left_precision): New method.
6476 (argument_parser::read_any_format_precision): New method.
6477 (argument_parser::handle_alloc_chars): New method.
6478 (argument_parser::read_any_length_modifier): New method.
6479 (argument_parser::read_any_other_modifier): New method.
6480 (argument_parser::find_format_char_info): New method.
6481 (argument_parser::validate_flag_pairs): New method.
6482 (argument_parser::give_y2k_warnings): New method.
6483 (argument_parser::parse_any_scan_set): New method.
6484 (argument_parser::handle_conversions): New method.
6485 (argument_parser::check_argument_type): New method.
6486 (check_format_info_main): Introduce classes argument_parser
6487 and flag_chars_t, moving the code within the loop into methods
6488 of these classes. Make various locals "const".
6490 2016-08-05 David Malcolm <dmalcolm@redhat.com>
6492 * c-common.c: Include "substring-locations.h".
6493 (get_cpp_ttype_from_string_type): New function.
6494 (g_string_concat_db): New global.
6495 (substring_loc::get_range): New method.
6496 * c-common.h (g_string_concat_db): New declaration.
6497 (class substring_loc): New class.
6498 * c-lex.c (lex_string): When concatenating strings, capture the
6499 locations of all tokens using a new obstack, and record the
6500 concatenation locations within g_string_concat_db.
6501 * c-opts.c (c_common_init_options): Construct g_string_concat_db
6504 2016-07-29 Marek Polacek <polacek@redhat.com>
6507 * c-common.c (c_common_truthvalue_conversion): Use LOCATION for the
6508 parentheses warning.
6511 * c-common.c (handle_alloc_align_attribute): Also check FUNCTION_DECL.
6513 2016-07-28 Martin Liska <mliska@suse.cz>
6515 PR gcov-profile/68025
6516 * c-common.c (handle_no_profile_instrument_function_attribute):
6518 2016-07-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
6520 * c-common.c (check_user_alignment): Use LOG2_BITS_PER_UNIT instead of
6523 2016-07-25 Jason Merrill <jason@redhat.com>
6526 * c.opt (fconstexpr-loop-limit): New.
6528 2016-07-22 Martin Sebor <msebor@redhat.com>
6531 * c-common.c (resolve_overloaded_builtin): Avoid converting
6532 __atomic_compare_exchange_n return type to that of what its
6533 first argument points to.
6535 2016-07-22 Uros Bizjak <ubizjak@gmail.com>
6537 * c-common.c: Use HOST_WIDE_INT_M1U instead of
6538 ~(unsigned HOST_WIDE_INT) 0.
6540 2016-07-22 Martin Liska <mliska@suse.cz>
6542 PR gcov-profile/69028
6543 PR gcov-profile/62047
6544 * cilk.c (create_cilk_helper_decl): Set location of a new decl
6545 to the current_function_decl.
6547 2016-07-21 Jason Merrill <jason@redhat.com>
6550 * c-common.c (c_common_truthvalue_conversion): Check
6551 c_inhibit_evaluation_warnings for warning about address of
6554 2016-07-20 David Malcolm <dmalcolm@redhat.com>
6556 * c-common.h (lookup_name_fuzzy): Convert return type from tree to
6559 2016-07-15 Jason Merrill <jason@redhat.com>
6561 * c-opts.c (c_common_post_options): Update -fabi-version default to 11.
6563 2016-07-15 Jakub Jelinek <jakub@redhat.com>
6566 * c-common.h (enum lookup_name_fuzzy_kind): Add
6567 FUZZY_LOOKUP_FUNCTION_NAME.
6569 2016-07-08 Jason Merrill <jason@redhat.com>
6571 P0145: Refining Expression Order for C++.
6572 * c.opts (-fargs-in-order): Rename to -fstrong-eval-order.
6575 2016-07-05 Markus Trippelsdorf <markus@trippelsdorf.de>
6578 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_rvalue_references.
6580 2016-06-29 Thomas Schwinge <thomas@codesourcery.com>
6582 * c-pragma.h (enum pragma_kind): Rename
6583 PRAGMA_OMP_DECLARE_REDUCTION to PRAGMA_OMP_DECLARE. Adjust all
6586 2016-06-29 Richard Biener <rguenther@suse.de>
6589 * c-common.c (c_common_get_alias_set): Remove union type punning case.
6591 2016-06-24 Jason Merrill <jason@redhat.com>
6593 P0145R2: Refining Expression Order for C++.
6594 * c-common.c (verify_tree) [COMPOUND_EXPR]: Fix handling on LHS of
6597 2016-06-24 Jakub Jelinek <jakub@redhat.com>
6599 * c-common.c (check_builtin_function_arguments): Require last
6600 argument of BUILT_IN_*_OVERFLOW_P to have INTEGER_TYPE type.
6601 Adjust wording of diagnostics for BUILT_IN_*_OVERLFLOW
6602 if the last argument is pointer to enumerated or boolean type.
6604 2016-06-22 David Malcolm <dmalcolm@redhat.com>
6607 * c-common.h (enum lookup_name_fuzzy_kind): New enum.
6608 (lookup_name_fuzzy): New prototype.
6610 2016-06-21 John David Anglin <danglin@gcc.gnu.org>
6612 * c-common.c (get_source_date_epoch): Use int64_t instead of long long.
6614 2016-06-14 Jason Merrill <jason@redhat.com>
6616 P0145R2: Refining Expression Order for C++.
6617 * c.opt (fargs-in-order): New.
6618 * c-opts.c (c_common_post_options): Adjust flag_args_in_order.
6620 2016-06-13 Jakub Jelinek <jakub@redhat.com>
6623 * c-gimplify.c (ubsan_walk_array_refs_r): Set *walk_subtrees = 0 on
6624 all BIND_EXPRs, and on all BIND_EXPRs recurse also on BIND_EXPR_BODY.
6626 PR preprocessor/71183
6627 * c-ppoutput.c (init_pp_output): Set cb->get_source_date_epoch
6628 to cb_get_source_date_epoch.
6630 2016-06-10 Jakub Jelinek <jakub@redhat.com>
6633 * c.opt (Wpsabi): Add Warning flag.
6635 2016-06-10 Martin Sebor <msebor@redhat.com>
6638 * c-common.c (handle_nonnull_attribute): Accept
6639 the nonnull attribute in type-generic builtins.
6641 2016-06-09 Martin Sebor <msebor@redhat.com>
6644 * c-common.c (builtin_function_validate_nargs): Make text of error
6645 message consistent with others like it.
6647 2016-06-08 Martin Sebor <msebor@redhat.com>
6648 Jakub Jelinek <jakub@redhat.com>
6652 * c-common.c (check_builtin_function_arguments): Handle
6653 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
6655 2016-06-08 Richard Biener <rguenther@suse.de>
6657 * c-common.c (parse_optimize_options): Improve diagnostic messages.
6659 2016-06-07 Richard Biener <rguenther@suse.de>
6662 * c-common.c (parse_optimize_options): Only apply CL_OPTIMIZATION
6663 options and warn about others.
6665 2016-06-01 Eduard Sanou <dhole@openmailbox.org>
6667 * c-common.c (get_source_date_epoch): Rename to
6668 cb_get_source_date_epoch.
6669 * c-common.c (cb_get_source_date_epoch): Use a single generic erorr
6670 message when the parsing fails. Use error_at instead of fatal_error.
6671 * c-common.h (get_source_date_epoch): Rename to
6672 cb_get_source_date_epoch.
6673 * c-common.h (cb_get_source_date_epoch): Prototype.
6674 * c-common.h (MAX_SOURCE_DATE_EPOCH): Define.
6675 * c-common.h (c_omp_region_type): Remove trailing comma.
6676 * c-lex.c (init_c_lex): Set cb->get_source_date_epoch callback.
6677 * c-lex.c (c_lex_with_flags): Remove initialization of
6678 pfile->source_date_epoch.
6680 2016-05-30 Jakub Jelinek <jakub@redhat.com>
6683 * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_DEPEND to
6684 C_OMP_CLAUSE_SPLIT_TARGET. Put OMP_CLAUSE_NOWAIT to
6685 C_OMP_CLAUSE_SPLIT_TARGET if combined with target construct,
6686 instead of C_OMP_CLAUSE_SPLIT_FOR.
6688 2016-05-24 Richard Biener <rguenther@suse.de>
6692 * c-common.h (convert_vector_to_pointer_for_subscript): Rename to ...
6693 (convert_vector_to_array_for_subscript): ... this.
6694 * c-common.c (convert_vector_to_pointer_for_subscript): Use a
6695 VIEW_CONVERT_EXPR to an array type. Rename to ...
6696 (convert_vector_to_array_for_subscript): ... this.
6698 2016-05-12 Marek Polacek <polacek@redhat.com>
6701 * c-common.c (pointer_int_sum): Call size_in_bytes_loc instead of
6702 size_in_bytes and pass LOC to it.
6704 2016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
6707 * c.opt (Wduplicate-decl-specifier): New option.
6709 2016-05-11 Marek Polacek <polacek@redhat.com>
6712 * c-common.c (diagnose_mismatched_attributes): New function.
6713 * c-common.h (diagnose_mismatched_attributes): Declare.
6715 2016-05-04 Marek Polacek <polacek@redhat.com>
6717 * c.opt (Wdangling-else): New option.
6719 2016-05-03 Marek Polacek <polacek@redhat.com>
6722 * c-common.c (builtin_function_validate_nargs): Add location
6724 (check_builtin_function_arguments): Add location and arguments
6725 parameters. Use them.
6726 * c-common.h (check_builtin_function_arguments): Update declaration.
6728 2016-05-03 Richard Biener <rguenther@suse.de>
6730 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Do not
6731 allow call args to gimplify to SSA names.
6733 2016-05-03 Marek Polacek <polacek@redhat.com>
6735 * c-common.h (enum c_omp_region_type): Remove stray comma.
6737 2016-05-02 Cesar Philippidis <cesar@codesourcery.com>
6739 * c-common.h (enum c_omp_region_type): Define.
6741 2016-05-02 Richard Sandiford <richard.sandiford@arm.com>
6743 * c-common.c (shorten_compare): Use wi::to_wide.
6745 2016-04-29 Cesar Philippidis <cesar@codesourcery.com>
6748 * c-common.h (c_oacc_split_loop_clauses): Add boolean argument.
6749 * c-omp.c (c_oacc_split_loop_clauses): Use it to duplicate
6750 reduction clauses in acc parallel loops.
6752 2016-04-29 Marek Polacek <polacek@redhat.com>
6755 * c-common.c (warn_for_memset): Check domain before accessing it.
6757 2016-04-29 Dominik Vogt <vogt@linux.vnet.ibm.com>
6760 * c-common.c (handle_aligned_attribute): Allow 0 as an argument to the
6761 "aligned" attribute.
6763 2016-04-28 Jason Merrill <jason@redhat.com>
6765 * c-lex.c (c_common_has_attribute): Handle nodiscard.
6767 2016-04-28 Eduard Sanou <dhole@openmailbox.org>
6768 Matthias Klose <doko@debian.org>
6770 * c-common.c (get_source_date_epoch): New function, gets the environment
6771 variable SOURCE_DATE_EPOCH and parses it as long long with error
6773 * c-common.h (get_source_date_epoch): Prototype.
6774 * c-lex.c (c_lex_with_flags): set parse_in->source_date_epoch.
6776 2015-04-27 Ryan Burn <contact@rnburn.com>
6780 * cilk.c (cilk_ignorable_spawn_rhs_op): Change to external linkage.
6781 (cilk_recognize_spawn): Renamed from recognize_spawn and change to
6783 (cilk_detect_and_unwrap): Corresponding changes.
6784 (extract_free_variables): Don't extract free variables from
6785 AGGR_INIT_EXPR slot.
6786 * c-common.h (cilk_ignorable_spawn_rhs_op): Prototype.
6787 (cilk_recognize_spawn): Likewise.
6789 2016-04-27 Bernd Schmidt <bschmidt@redhat.com>
6791 * c.opt (Wmemset-elt-size): New option.
6792 * c-common.c (warn_for_memset): New function.
6793 * c-common.h (warn_for_memset): Declare.
6795 2016-04-25 Jason Merrill <jason@redhat.com>
6797 * c-common.c (handle_unused_attribute): Accept CONST_DECL.
6799 * c-common.h: Declare it.
6800 * c-lex.c (c_common_has_attribute): Add maybe_unused.
6802 2016-04-22 Jason Merrill <jason@redhat.com>
6804 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_range_based_for.
6806 2016-04-20 Ilya Verbin <ilya.verbin@intel.com>
6809 * c-cilkplus.c (c_finish_cilk_clauses): Remove function.
6810 * c-common.h (c_finish_cilk_clauses): Remove declaration.
6812 2016-04-18 Michael Matz <matz@suse.de>
6814 * c-common.c (handle_aligned_attribute): Use SET_TYPE_ALIGN
6817 2016-04-17 Eric Botcazou <ebotcazou@adacore.com>
6819 * c-ada-spec.c (get_underlying_decl): Return the typedef, if any.
6820 (dump_generic_ada_node) <POINTER_TYPE>: Clean up handling of access
6821 to incomplete types.
6822 (dump_nested_type): Remove redundant tests and tidy up.
6823 (print_ada_declaration): Also set TREE_VISITED on the declaration of
6824 a type which is the typedef of an original type.
6826 2016-04-15 Marek Polacek <polacek@redhat.com>
6829 * c-common.c (build_va_arg): Change two asserts into errors and return
6832 2016-04-13 Marek Polacek <polacek@redhat.com>
6835 * c-indentation.c (should_warn_for_misleading_indentation): Bail out
6836 for switch statements, too.
6838 2016-03-28 Jason Merrill <jason@redhat.com>
6840 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_range_based_for.
6842 2016-03-23 Marek Polacek <polacek@redhat.com>
6845 * c.opt (Wignored-attributes): New option.
6847 2016-03-22 David Malcolm <dmalcolm@redhat.com>
6850 * c-indentation.c (warn_for_misleading_indentation): Rewrite the
6851 diagnostic text, reversing the order of the warning and note so
6852 that they appear in source order.
6854 2016-03-17 Marek Polacek <polacek@redhat.com>
6857 * c-common.c (resolve_overloaded_builtin): Set TREE_USED for the fetch
6860 2016-03-14 Jason Merrill <jason@redhat.com>
6862 * c-cppbuiltin.c (c_cpp_builtins): Set __cpp_hex_float.
6864 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_range_based_for.
6866 2016-03-09 Richard Biener <rguenther@suse.de>
6869 * c-common.c (strict_aliasing_warning): Add back
6870 alias_sets_conflict_p check.
6872 2016-03-08 Jason Merrill <jason@redhat.com>
6874 * c-opts.c (set_std_cxx1z): Don't enable concepts.
6876 2016-03-04 David Malcolm <dmalcolm@redhat.com>
6879 * c-indentation.c (get_visual_column): Move code to determine next
6881 (next_tab_stop): ...this new function.
6882 (line_contains_hash_if): Delete function.
6883 (detect_preprocessor_logic): Delete function.
6884 (get_first_nws_vis_column): New function.
6885 (detect_intervening_unindent): New function.
6886 (should_warn_for_misleading_indentation): Replace call to
6887 detect_preprocessor_logic with a call to
6888 detect_intervening_unindent.
6890 2016-03-04 David Malcolm <dmalcolm@redhat.com>
6893 * c-indentation.c (should_warn_for_misleading_indentation): When
6894 suppressing warnings about cases where the guard and body are on
6895 the same column, only use the first non-whitespace column in place
6896 of the guard token column when dealing with "else" clauses.
6897 When rejecting aligned BODY and NEXT, loosen the requirement
6898 from equality with the first non-whitespace of guard to simply
6899 that they not be indented relative to it.
6901 2016-03-04 Richard Biener <rguenther@suse.de>
6904 * c-common.c (strict_aliasing_warning): Use alias_set_subset_of
6905 instead of alias_sets_conflict_p.
6907 2016-03-01 Marek Polacek <polacek@redhat.com>
6910 * c-common.c (reject_gcc_builtin): Check for FUNCTION_DECL rather than
6913 2016-02-22 Martin Sebor <msebor@redhat.com>
6916 * c-common.c (check_builtin_function_arguments): Validate and
6917 reject invalid arguments to __builtin_alloca_with_align.
6919 2016-02-20 Mark Wielaard <mjw@redhat.com>
6922 * c.opt (Wunused-const-variable): Turn into Alias for...
6923 (Wunused-const-variable=): New option.
6925 2016-02-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
6928 * c-opts.c (c_common_post_options): Move call to set_std_cxx14 from
6930 (c_common_init_options): ...to here.
6931 (set_std_cxx98): Initialize flag_isoc94 and flag_isoc99.
6933 2016-02-19 Jakub Jelinek <jakub@redhat.com>
6936 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_GRAINSIZE.
6937 (init_pragma): Register PRAGMA_CILK_GRAINSIZE even for
6938 flag_preprocess_only.
6940 2016-02-16 Jakub Jelinek <jakub@redhat.com>
6943 * c.opt (Wnonnull-compare): Enable for -Wall.
6945 2016-02-15 Jakub Jelinek <jakub@redhat.com>
6948 * c-common.c (sync_resolve_size): Diagnose too few arguments
6949 even when params is non-NULL empty vector.
6951 2016-02-08 Bernd Schmidt <bschmidt@redhat.com>
6954 * c.opt (fshort-double): Remove.
6956 2016-02-05 Martin Sebor <msebor@redhat.com>
6959 * c.opt (Warning options): Update -Wplacement-new to take
6960 an optional argument.
6962 2016-02-01 Jakub Jelinek <jakub@redhat.com>
6964 PR preprocessor/69543
6966 * c-pragma.c (handle_pragma_diagnostic): Pass input_location
6967 instead of loc to control_warning_option.
6969 2016-02-01 Nathan Sidwell <nathan@codesourcery.com>
6971 * c.opt (fopenacc-dim=): New option.
6973 2016-01-27 Ryan Burn <contact@rnburn.com>
6976 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Change to use
6977 gimplify_arg. Removed superfluous post_p argument.
6978 * c-family.h (cilk_gimplify_call_params_in_spawned_fn): Removed
6979 superfluous post_p argument.
6980 * c-gimplify.c (c_gimplify_expr): Likewise.
6982 2016-01-26 David Malcolm <dmalcolm@redhat.com>
6985 * c-opts.c (c_diagnostic_finalizer): Replace invocation of
6986 pp_newline_and_flush with pp_flush.
6988 2016-01-20 Martin Sebor <msebor@redhat.com>
6991 * c-common.c (sync_resolve_size): Avoid printing diagnostic about
6992 an incompatible argument when the argument isn't a valid tree node.
6994 2016-01-18 Jason Merrill <jason@redhat.com>
6997 * c-common.c (check_function_arguments_recurse): Fold the whole
6998 COND_EXPR, not just the condition.
7000 2016-01-18 Tom de Vries <tom@codesourcery.com>
7002 * c-omp.c (c_oacc_split_loop_clauses): Don't copy OMP_CLAUSE_REDUCTION,
7003 classify as loop clause.
7005 2016-01-15 Jakub Jelinek <jakub@redhat.com>
7008 * c-pragma.c (c_register_pragma_1): Adjust comment to note that
7009 C++ FE no longer has limit on number of pragmas.
7011 2015-01-14 Ryan Burn <contact@rnburn.com>
7014 * cilk.c (create_cilk_wrapper_body): Call fold_build_cleanup_point_expr
7015 to add missing cleanup point.
7017 2016-01-14 David Malcolm <dmalcolm@redhat.com>
7020 * c-indentation.c (get_visual_column): Add location_t param.
7021 Handle the column number being zero by effectively disabling the
7022 warning, with an "inform".
7023 (should_warn_for_misleading_indentation): Add location_t argument
7024 for all uses of get_visual_column.
7026 2016-01-10 Patrick Palka <ppalka@gcc.gnu.org>
7029 * c-indentation.c (should_warn_for_misleading_indentation):
7030 Don't warn about do-while statements.
7032 2016-01-07 Martin Sebor <msebor@redhat.com>
7035 * c-common.c (sync_resolve_size): Reject first argument when it's
7038 2016-01-05 David Malcolm <dmalcolm@redhat.com>
7041 * c-indentation.c (get_visual_column): Remove default argument.
7042 (should_warn_for_misleading_indentation): For the multiline case,
7043 update call to get_visual_column for next_stmt_exploc so that it
7044 captures the location of the first non-whitespace character in the
7045 relevant line. Don't issue warnings if there is non-whitespace
7046 before the next statement.
7048 2016-01-04 Jakub Jelinek <jakub@redhat.com>
7050 Update copyright years.
7052 2015-12-21 David Malcolm <dmalcolm@redhat.com>
7054 * c-common.c (binary_op_error): Convert first param from
7055 location_t to rich_location * and use it when emitting an error.
7056 * c-common.h (binary_op_error): Convert first param from
7057 location_t to rich_location *.
7059 2015-12-16 David Malcolm <dmalcolm@redhat.com>
7061 * c-common.h (conflict_marker_get_final_tok_kind): New prototype.
7062 * c-lex.c (conflict_marker_get_final_tok_kind): New function.
7064 2015-12-15 Ilya Verbin <ilya.verbin@intel.com>
7066 * c-common.c (c_common_attribute_table): Handle "omp declare target
7069 2015-12-14 Jakub Jelinek <jakub@redhat.com>
7072 * c.opt (Wmissing-format-attribute, Wnormalized): Add Warning option.
7074 2014-12-12 Tobias Burnus <burnus@net-b.de>
7077 * c-format.c (gcc_gfc_char_table): Add 'q' flag to remaining
7078 specifiers (%d, %i,%u and %c).
7080 2015-12-10 David Malcolm <dmalcolm@redhat.com>
7082 * c.opt (Wmisleading-indentation): Add to -Wall for C and C++.
7084 2015-12-08 Jakub Jelinek <jakub@redhat.com>
7088 * c.opt (Wfloat-conversion, Wsign-conversion): Add Warning.
7089 * c-pragma.c (handle_pragma_diagnostic): Adjust
7090 control_warning_option caller.
7092 2015-12-07 David Malcolm <dmalcolm@redhat.com>
7094 * c-common.c (c_cpp_error): Update for change to
7095 rich_location::set_range.
7097 2015-12-04 Paolo Bonzini <bonzini@gnu.org>
7099 * c-common.c (maybe_warn_shift_overflow): Warn on all overflows if
7100 shifting 1 out of the sign bit.
7102 2015-12-04 Kirill Yukhin <kirill.yukhin@intel.com>
7104 * c-common.c (c_common_attribute_table[]): Update max arguments
7105 count for "simd" attribute.
7106 (handle_simd_attribute): Parse "notinbranch" and "inbranch" arguments.
7108 2015-12-03 Jakub Jelinek <jakub@redhat.com>
7110 PR preprocessor/57580
7111 * c-ppoutput.c (print): Change printed field to bool.
7112 Move src_file last for smaller padding.
7113 (init_pp_output): Set print.printed to false instead of 0.
7114 (scan_translation_unit): Fix up formatting. Set print.printed
7115 to true after printing something other than newline.
7116 (scan_translation_unit_trad): Set print.printed to true instead of 1.
7117 (maybe_print_line_1): Set print.printed to false instead of 0.
7118 (print_line_1): Likewise.
7119 (do_line_change): Set print.printed to true instead of 1.
7120 (cb_define, dump_queued_macros, cb_include, cb_def_pragma,
7121 dump_macro): Set print.printed to false after printing newline.
7123 2015-12-02 Jason Merrill <jason@redhat.com>
7125 * c-common.c (fold_for_warn): New.
7126 (warn_logical_operator, warn_tautological_cmp)
7127 (check_function_arguments_recurse, maybe_warn_bool_compare): Use it.
7129 * c-common.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
7130 (c_fully_fold_internal, decl_constant_value_for_optimization):
7132 * c-common.h: Don't declare decl_constant_value_for_optimization.
7134 2015-12-02 Joseph Myers <joseph@codesourcery.com>
7137 * c-common.h (c_build_qualified_type): Add extra default
7140 2015-12-01 Julian Brown <julian@codesourcery.com>
7141 Cesar Philippidis <cesar@codesourcery.com>
7142 James Norris <James_Norris@mentor.com>
7144 * c-pragma.c (oacc_pragmas): Add PRAGMA_OACC_HOST_DATA.
7145 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_HOST_DATA.
7146 (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_USE_DEVICE.
7148 2015-11-30 Eric Botcazou <ebotcazou@adacore.com>
7150 * c-ada-spec.c (print_ada_macros): Remove redundant blank line.
7151 (decl_sloc_common): Delete and move bulk of processing to...
7152 (decl_sloc): ...here.
7153 (pp_ada_tree_identifier): Remove reference to QUAL_UNION_TYPE.
7154 (dump_ada_double_name): Remove S parameter and compute the suffix.
7155 (dump_ada_array_type): Add PARENT parameter. Simplify computation of
7156 element type and deal with an anonymous one.
7157 (dump_ada_template): Use RECORD_OR_UNION_TYPE_P macro.
7158 (dump_generic_ada_node): Tweak. Adjust call to dump_ada_array_type
7159 and remove reference to QUAL_UNION_TYPE.
7160 (dump_nested_types): Make 2 passes on the fields and move bulk to...
7161 (dump_nested_type): ...here. New function extracted from above.
7162 Generate a full declaration for anonymous element type of arrays.
7163 (print_ada_declaration): Really skip anonymous declarations. Remove
7164 references to QUAL_UNION_TYPE. Adjust call to dump_ada_array_type.
7165 Clean up processing of declarations of array types and objects.
7166 (print_ada_struct_decl): Remove reference to QUAL_UNION_TYPE.
7167 Remove obsolete code and tidy up.
7169 2015-11-29 Jan Hubicka <hubicka@ucw.cz>
7172 * c-common.c (handle_transparent_union_attribute): Update
7175 2015-11-27 Martin Liska <mliska@suse.cz>
7178 * array-notation-common.c (cilkplus_extract_an_triplets):
7179 Release vector of vectors.
7180 * cilk.c (gimplify_cilk_spawn): Free allocated memory.
7182 2015-11-26 Eric Botcazou <ebotcazou@adacore.com>
7185 * c-ada-spec.c (dump_nested_types): Add guard for error_mark_node.
7186 (print_ada_struct_decl): Likewise.
7188 2015-11-23 Igor Zamyatin <igor.zamyatin@intel.com>
7191 * c-gimplify.c (c_gimplify_expr): Stop the process if see an error.
7192 * cilk.c (recognize_spawn): Determine location in a more precise
7195 2015-11-19 Jason Merrill <jason@redhat.com>
7197 * c-common.c (shorten_compare): But look through macros from
7200 2015-11-18 Jason Merrill <jason@redhat.com>
7202 * c-common.c (shorten_compare): Don't -Wtype-limits if the
7203 non-constant operand comes from a macro.
7205 2015-11-17 Jason Merrill <jason@redhat.com>
7208 * c-common.c (warn_tautological_cmp): Fold before checking for
7211 2015-11-16 Marek Polacek <polacek@redhat.com>
7214 * c-common.c (check_case_bounds): Fold low and high cases.
7216 2015-11-16 Marek Polacek <polacek@redhat.com>
7218 * c-ada-spec.c (dump_ada_template): Use RECORD_OR_UNION_TYPE_P.
7219 * c-common.c (c_common_get_alias_set): Likewise.
7220 (handle_visibility_attribute): Likewise.
7222 2015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
7224 * c-common.c (handle_simd_attribute): New.
7225 (struct attribute_spec): Add entry for "simd".
7226 (handle_simd_attribute): New.
7228 2015-11-13 Kai Tietz <ktietz70@googlemail.com>
7230 * c-lex.c (interpret_float): Use fold_convert.
7232 2015-11-13 David Malcolm <dmalcolm@redhat.com>
7234 * c-common.c (c_fully_fold_internal): Capture existing souce_range,
7235 and store it on the result.
7236 * c-opts.c (c_common_init_options): Set
7237 global_dc->colorize_source_p.
7239 2015-11-12 James Norris <jnorris@codesourcery.com>
7240 Joseph Myers <joseph@codesourcery.com>
7242 * c-pragma.c (oacc_pragmas): Add entry for declare directive.
7243 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_DECLARE.
7244 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT and
7245 PRAGMA_OACC_CLAUSE_LINK.
7247 2015-11-11 Marek Polacek <polacek@redhat.com>
7251 * c-common.c (valid_array_size_p): New function.
7252 * c-common.h (valid_array_size_p): Declare.
7254 2015-11-11 Dominique d'Humieres <dominiq@lps.ens.fr>
7257 * c-pragma.c (c_register_pragma_1): Update the gcc_assert to 256.
7259 2015-11-11 Andrew MacLeod <amacleod@redhat.com>
7261 * array-notation-common.c: Remove unused header files.
7262 * c-ada-spec.c: Likewise.
7263 * c-cilkplus.c: Likewise.
7264 * c-common.c: Likewise.
7265 * c-cppbuiltin.c: Likewise.
7266 * c-dump.c: Likewise.
7267 * c-format.c: Likewise.
7268 * c-gimplify.c: Likewise.
7269 * c-indentation.c: Likewise.
7270 * c-lex.c: Likewise.
7271 * c-omp.c: Likewise.
7272 * c-opts.c: Likewise.
7273 * c-pch.c: Likewise.
7274 * c-ppoutput.c: Likewise.
7275 * c-pragma.c: Likewise.
7276 * c-pretty-print.c: Likewise.
7277 * c-semantics.c: Likewise.
7278 * c-ubsan.c: Likewise.
7280 * stub-objc.c: Likewise.
7282 2015-11-09 Thomas Schwinge <thomas@codesourcery.com>
7283 Cesar Philippidis <cesar@codesourcery.com>
7284 James Norris <jnorris@codesourcery.com>
7285 Julian Brown <julian@codesourcery.com>
7286 Nathan Sidwell <nathan@codesourcery.com>
7288 * c-pragma.c (oacc_pragmas): Add "routine".
7289 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ROUTINE.
7291 2015-11-08 Eric Botcazou <ebotcazou@adacore.com>
7293 * c-common.c (c_common_attributes): Add scalar_storage_order.
7294 (handle_scalar_storage_order_attribute): New function.
7295 * c-pragma.c (global_sso): New variable.
7296 (maybe_apply_pragma_scalar_storage_order): New function.
7297 (handle_pragma_scalar_storage_order): Likewise.
7298 (init_pragma): Register scalar_storage_order.
7299 * c-pragma.h (maybe_apply_pragma_scalar_storage_order): Declare.
7300 * c.opt (Wscalar-storage-order): New warning.
7301 (fsso-struct=): New option.
7303 2015-11-08 Martin Sebor <msebor@redhat.com>
7305 * c.opt (Wplacement-new): Add a period to the end of a sentence.
7307 2015-11-07 Richard Sandiford <richard.sandiford@arm.com>
7309 * c-common.c: Don't undef DEF_BUILTIN.
7311 2015-11-06 David Malcolm <dmalcolm@redhat.com>
7313 * c-common.c (c_cpp_error): Convert parameter from location_t to
7314 rich_location *. Eliminate the "column_override" parameter and
7315 the call to diagnostic_override_column.
7316 Update the "done_lexing" clause to set range 0
7317 on the rich_location, rather than overwriting a location_t.
7318 * c-common.h (c_cpp_error): Convert parameter from location_t to
7319 rich_location *. Eliminate the "column_override" parameter.
7321 2015-11-05 Cesar Philippidis <cesar@codesourcery.com>
7322 Thomas Schwinge <thomas@codesourcery.com>
7323 James Norris <jnorris@codesourcery.com>
7325 * c-omp.c (c_oacc_split_loop_clauses): Make TILE, GANG, WORKER, VECTOR,
7326 AUTO, SEQ, INDEPENDENT and PRIVATE loop clauses. Associate REDUCTION
7327 clauses with parallel and kernels and loops.
7328 * c-pragma.h (enum pragma_omp_clause): Add entries for
7329 PRAGMA_OACC_CLAUSE_{INDEPENDENT,TILE,DEFAULT}.
7330 * pt.c (tsubst_omp_clauses): Add support for OMP_CLAUSE_{NUM_GANGS,
7331 NUM_WORKERS,VECTOR_LENGTH,GANG,WORKER,VECTOR,ASYNC,WAIT,TILE,AUTO,
7333 (tsubst_expr): Add support for OMP_CLAUSE_{KERNELS,PARALLEL,LOOP}.
7335 2015-11-05 Martin Sebor <msebor@redhat.com>
7338 * c.opt (-Wplacement-new): New option.
7340 2015-11-05 Jakub Jelinek <jakub@redhat.com>
7342 * c-common.h (c_finish_omp_atomic): Add TEST argument.
7343 (c_omp_check_loop_iv, c_omp_check_loop_iv_exprs): New prototypes.
7344 * c-omp.c (c_finish_omp_atomic): Add TEST argument. Don't call
7345 save_expr or create_tmp_var* if TEST is true.
7346 (c_finish_omp_for): Store OMP_FOR_ORIG_DECLS always.
7347 Don't call add_stmt here.
7348 (struct c_omp_check_loop_iv_data): New type.
7349 (c_omp_check_loop_iv_r, c_omp_check_loop_iv,
7350 c_omp_check_loop_iv_exprs): New functions.
7351 (c_omp_split_clauses): Adjust for lastprivate being allowed on
7353 (c_omp_declare_simd_clauses_to_numbers): Change
7354 OMP_CLAUSE_LINEAR_VARIABLE_STRIDE OMP_CLAUSE_LINEAR_STEP into numbers.
7355 (c_omp_declare_simd_clauses_to_decls): Similarly change those
7356 from numbers to PARM_DECLs.
7358 2015-11-04 Mikhail Maltsev <maltsevm@gmail.com>
7360 * c-omp.c (c_omp_split_clauses): Remove conditional compilation. Use
7363 2015-11-03 Bernd Schmidt <bschmidt@redhat.com>
7366 * c-common.h (fold_offsetof_1): Add argument.
7367 * c-common.c (fold_offsetof_1): Diagnose more invalid
7368 offsetof expressions that reference elements past the end of
7371 2015-11-03 Thomas Schwinge <thomas@codesourcery.com>
7372 Chung-Lin Tang <cltang@codesourcery.com>
7374 * c-pragma.c (oacc_pragmas): Add "atomic".
7375 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ATOMIC.
7377 2015-10-30 Evgeny Stupachenko <evstupac@gmail.com>
7379 * c-common.c (handle_target_clones_attribute): New.
7380 (c_common_attribute_table): Add handle_target_clones_attribute.
7381 (handle_always_inline_attribute): Add check on target_clones attribute.
7382 (handle_target_attribute): Ditto.
7384 2015-10-29 Andrew MacLeod <amacleod@redhat.com>
7386 * array-notation-common.c: Reorder #include's and remove duplicates.
7387 * c-ada-spec.c: Likewise.
7388 * c-cilkplus.c: Likewise.
7389 * c-common.c: Likewise.
7390 * c-cppbuiltin.c: Likewise.
7391 * c-dump.c: Likewise.
7392 * c-format.c: Likewise.
7393 * c-gimplify.c: Likewise.
7394 * c-indentation.c: Likewise.
7395 * c-lex.c: Likewise.
7396 * c-omp.c: Likewise.
7397 * c-opts.c: Likewise.
7398 * c-pch.c: Likewise.
7399 * c-ppoutput.c: Likewise.
7400 * c-pragma.c: Likewise.
7401 * c-pretty-print.c: Likewise.
7402 * c-semantics.c: Likewise.
7403 * c-ubsan.c: Likewise.
7405 * stub-objc.c: Likewise.
7407 2015-10-28 Jason Merrill <jason@redhat.com>
7409 * c-common.c (pointer_int_sum): Fold the MULT_EXPR.
7411 2015-10-27 Thomas Schwinge <thomas@codesourcery.com>
7412 James Norris <jnorris@codesourcery.com>
7413 Cesar Philippidis <cesar@codesourcery.com>
7417 * c-common.h (c_oacc_split_loop_clauses): Declare function.
7418 * c-omp.c (c_oacc_split_loop_clauses): New function.
7420 2015-10-21 Martin Sebor <msebor@redhat.com>
7423 * c.opt: End each sentence that describes an option with a period.
7425 2015-10-20 Marek Polacek <polacek@redhat.com>
7427 * array-notation-common.c (is_cilkplus_vector_p): Define.
7428 * c-common.h (is_cilkplus_vector_p): Declare.
7430 2015-10-20 Marek Polacek <polacek@redhat.com>
7432 * c.opt (std=gnu++11): Do not describe as experimental.
7433 (std=gnu++14): Likewise.
7435 2015-10-19 Jason Merrill <jason@redhat.com>
7437 * c-cppbuiltin.c (c_cpp_builtins): Define
7438 __cpp_nontype_template_args.
7440 2015-10-19 Jason Merrill <jason@redhat.com>
7442 * c-cppbuiltin.c (c_cpp_builtins): Define
7443 __cpp_enumerator_attributes, __cpp_fold_expressions,
7444 __cpp_unicode_characters.
7446 2015-10-13 Jakub Jelinek <jakub@redhat.com>
7447 Aldy Hernandez <aldyh@redhat.com>
7449 * c-common.c (enum c_builtin_type): Define DEF_FUNCTION_TYPE_9,
7450 DEF_FUNCTION_TYPE_10 and DEF_FUNCTION_TYPE_11.
7451 (c_define_builtins): Likewise.
7452 * c-common.h (enum c_omp_clause_split): Add
7453 C_OMP_CLAUSE_SPLIT_TASKLOOP.
7454 (c_finish_omp_critical, c_finish_omp_ordered): Add CLAUSES argument.
7455 (c_finish_omp_for): Add ORIG_DECLV argument.
7456 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP as
7457 201511 instead of 201307.
7458 * c-omp.c (c_finish_omp_critical): Add CLAUSES argument, set
7459 OMP_CRITICAL_CLAUSES to it.
7460 (c_finish_omp_ordered): Add CLAUSES argument, set
7461 OMP_ORDERED_CLAUSES to it.
7462 (c_finish_omp_for): Add ORIG_DECLV argument, set OMP_FOR_ORIG_DECLS
7463 to it if OMP_FOR. Clear DECL_INITIAL on the IVs.
7464 (c_omp_split_clauses): Handle OpenMP 4.5 combined/composite
7465 constructs and new OpenMP 4.5 clauses. Clear
7466 OMP_CLAUSE_SCHEDULE_SIMD if not combined with OMP_SIMD. Add
7468 * c-pragma.c (omp_pragmas_simd): Add taskloop.
7469 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKLOOP.
7470 (enum pragma_omp_clause): Add
7471 PRAGMA_OMP_CLAUSE_{DEFAULTMAP,GRAINSIZE,HINT,{IS,USE}_DEVICE_PTR}
7472 and PRAGMA_OMP_CLAUSE_{LINK,NOGROUP,NUM_TASKS,PRIORITY,SIMD,THREADS}.
7474 2015-10-05 Richard Sandiford <richard.sandiford@arm.com>
7476 * c-lex.c (interpret_float): Use real_equal instead of
7479 2015-10-04 Jason Merrill <jason@redhat.com>
7481 Implement N4514, C++ Extensions for Transactional Memory.
7482 * c-common.c (c_common_reswords): Add C++ TM TS keywords.
7483 (c_common_attribute_table): Add transaction_safe_dynamic.
7484 transaction_safe now affects type identity.
7485 (handle_tm_attribute): Handle transaction_safe_dynamic.
7486 * c-common.h (enum rid): Add RID_ATOMIC_NOEXCEPT,
7487 RID_ATOMIC_CANCEL, RID_SYNCHRONIZED.
7488 (OBJC_IS_CXX_KEYWORD): Add RID_SYNCHRONIZED.
7490 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_transactional_memory.
7491 * c-pretty-print.c (pp_c_attributes_display): Don't print
7492 transaction_safe in C++.
7494 2015-10-02 Marek Polacek <polacek@redhat.com>
7496 * c.opt (Wduplicated-cond): Don't enable by -Wall anymore.
7498 2015-10-02 Marek Polacek <polacek@redhat.com>
7501 * c-common.c (warn_duplicated_cond_add_or_warn): New function.
7502 * c-common.h (warn_duplicated_cond_add_or_warn): Declare.
7503 * c.opt (Wduplicated-cond): New option.
7505 2015-10-01 Joseph Myers <joseph@codesourcery.com>
7507 * c.opt (std=c11): Do not describe as experimental.
7508 (std=gnu11): Likewise.
7509 (std=iso9899:2011): Likewise.
7511 2015-09-28 Nathan Sidwell <nathan@codesourcery.com>
7513 * c-common.c (DEF_FUNCTION_TYPE_VAR_6): New.
7514 (DEF_FUNCTION_TYPE_VAR_11): Delete.
7516 2015-09-25 Marek Polacek <polacek@redhat.com>
7518 * c-ubsan.c (ubsan_instrument_division): Remove unnecessary code.
7519 (ubsan_instrument_shift): Likewise.
7521 2015-09-25 Marek Polacek <polacek@redhat.com>
7524 * c-ubsan.c (ubsan_instrument_division): Also pre-evaluate OP1.
7526 2015-09-24 Patrick Palka <ppalka@gcc.gnu.org>
7528 * c-indentation.c (should_warn_for_misleading_indentation):
7529 Compare next_stmt_vis_column with guard_line_first_nws instead
7530 of with guard_line_vis_column.
7532 2015-09-23 Manuel López-Ibáñez <manu@gcc.gnu.org>
7536 * c-pragma.c (handle_pragma_diagnostic): Detect non-warning
7537 options and options not valid for the current language.
7539 2015-09-22 Patrick Palka <ppalka@gcc.gnu.org>
7541 * c-indentation.c (should_warn_for_misleading_indentation):
7542 Float out and consolidate the calls to get_visual_column that
7543 are passed guard_exploc as an argument. Compare
7544 next_stmt_vis_column with guard_line_first_nws instead of with
7545 body_line_first_nws.
7547 2015-09-22 Nathan Sidwell <nathan@codesourcery.com>
7549 * c.opt (Wmultiple-inheritance, Wvirtual-inheritance, Wtemplates,
7550 Wnamespaces): New C++ warnings.
7552 2015-09-22 Jason Merrill <jason@redhat.com>
7554 * c-common.h (abi_compat_version_crosses): New.
7555 (warn_abi_version): Declare.
7556 * c-common.c: Define it.
7557 * c-opts.c (c_common_post_options): Handle it.
7558 flag_abi_compat_version defaults to 8.
7560 2015-09-21 Ville Voutilainen <ville.voutilainen@gmail.com>
7562 Complete the implementation of N4230, Nested namespace definition.
7563 * c-cppbuiltin.c: Add __cpp_namespace_attributes and
7564 __cpp_nested_namespace_definitions.
7566 2015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
7568 * c-pragma.c (handle_pragma_diagnostic): Fix wrong return.
7570 2015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
7572 * c-pragma.c (handle_pragma_diagnostic): Use explicit location
7574 * c-pragma.h (pragma_lex): Add optional loc argument.
7576 2015-09-16 Mikhail Maltsev <maltsevm@gmail.com>
7578 * c-format.c (check_format_arg): Adjust to use common block size in all
7581 2015-09-15 David Malcolm <dmalcolm@redhat.com>
7583 * c-format.c (location_from_offset): Update for change in
7584 signature of location_get_source_line.
7585 * c-indentation.c (get_visual_column): Likewise.
7586 (line_contains_hash_if): Likewise.
7588 2015-09-14 Marek Polacek <polacek@redhat.com>
7590 * c-opts.c (c_common_post_options): Set C++ standard earlier, before
7591 setting various warnings.
7593 2015-09-14 Marek Polacek <polacek@redhat.com>
7595 * c-common.c (warn_for_sign_compare): Cast to unsigned when shifting
7598 2015-09-11 Mark Wielaard <mjw@redhat.com>
7601 * c.opt (Wunused-variable): Option from common.opt.
7602 (Wunused-const-variable): New option.
7604 2015-09-09 Paolo Carlini <paolo.carlini@oracle.com>
7607 * c.opt ([Wsubobject-linkage]): Add.
7609 2015-09-03 Martin Sebor <msebor@redhat.com>
7612 * c-common.h (c_decl_implicit, reject_gcc_builtin): Declare new
7614 * c-common.c (reject_gcc_builtin): Define.
7616 2015-09-02 Balaji V. Iyer <balaji.v.iyer@intel.com>
7619 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): New
7621 * c-gimplify.c (c_gimplify_expr): Added a call to the function
7622 cilk_gimplify_call_params_in_spawned_fn.
7623 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): New function.
7624 (gimplify_cilk_spawn): Removed EXPR_STMT and CLEANUP_POINT_EXPR
7627 2015-08-25 Marek Polacek <polacek@redhat.com>
7630 * c-common.c (handle_weak_attribute): Don't check whether the
7631 visibility can be changed here.
7633 2015-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
7635 * c-lex.c (c_lex_with_flags): Use explicit locations.
7637 2015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
7639 * c-ada-spec.h, c-common.c, c-common.h, c-format.c, c-format.h,
7640 c-objc.h, c-ppoutput.c, c-pragma.c, c-pragma.h: Remove useless
7642 2015-08-18 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
7645 * c-common.c (check_builtin_function_arguments): Add check
7646 for BUILT_IN_SIGNBIT argument.
7648 2015-08-18 Paolo Carlini <paolo.carlini@oracle.com>
7651 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_static_assert value
7654 2015-08-17 Marek Polacek <polacek@redhat.com>
7656 * c-pretty-print.c (pp_c_cv_qualifiers): Remove code dealing
7657 with whitespaces before qualifier names.
7659 2015-08-12 Marek Polacek <polacek@redhat.com>
7662 * c-common.c (maybe_warn_shift_overflow): Properly handle
7663 left-shifting 1 into the sign bit.
7665 2015-08-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
7667 * c.opt (Wchkp): Use LangEnabledBy instead of EnabledBy.
7669 2015-08-06 Andrew Sutton <andrew.n.sutton@gmail.com>
7670 Braden Obrzut <admin@maniacsvault.net>
7671 Jason Merrill <jason@redhat.com>
7673 Add C++ Concepts TS support.
7674 * c-common.c (c_common_reswords): Add __is_same_as, concept, requires.
7675 * c-common.h (enum rid): Add RID_IS_SAME_AS, RID_CONCEPT, RID_REQUIRES.
7676 (D_CXX_CONCEPTS, D_CXX_CONCEPTS_FLAGS): New.
7677 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_concepts.
7678 * c-opts.c (set_std_cxx1z): Set flag_concepts.
7679 * c.opt (fconcepts): New.
7681 2015-08-02 Martin Sebor <msebor@redhat.com>
7683 * c.opt (-Wframe-address): New warning option.
7685 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
7687 * c-indentation.c (should_warn_for_misleading_indentation):
7690 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
7692 * c-indentation.c (get_visual_column): Add parameter first_nws,
7693 use it. Update comment documenting the function.
7694 (is_first_nonwhitespace_on_line): Remove.
7695 (should_warn_for_misleading_indentation): Replace usage of
7696 of is_first_nonwhitespace_on_line with get_visual_column.
7698 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
7700 * c-indentation.h (struct token_indent_info): Define.
7701 (get_token_indent_info): Define.
7702 (warn_for_misleading_information): Declare.
7703 * c-common.h (warn_for_misleading_information): Remove.
7704 * c-identation.c (warn_for_misleading_indentation):
7705 Change declaration to take three token_indent_infos. Adjust
7707 * c-identation.c (should_warn_for_misleading_indentation):
7708 Likewise. Bail out early if the body is a compound statement.
7709 (guard_tinfo_to_string): Define.
7711 2015-07-30 Jason Merrill <jason@redhat.com>
7713 * c-pretty-print.c (unary_expression) [INDIRECT_REF]: Don't print
7714 '*' for reference decay.
7716 2015-07-30 Marek Polacek <polacek@redhat.com>
7718 * c-common.c (warn_tautological_cmp): Bail for float types.
7720 2015-07-27 Marek Polacek <polacek@redhat.com>
7723 * c-common.c (warn_tautological_cmp): Don't warn for macro expansion.
7725 2015-07-27 Marek Polacek <polacek@redhat.com>
7729 * c-common.c (find_array_ref_with_const_idx_r): New function.
7730 (warn_tautological_cmp): New function.
7731 * c-common.h (warn_tautological_cmp): Declare.
7732 * c.opt (Wtautological-compare): New option.
7734 2015-07-23 Marek Polacek <polacek@redhat.com>
7736 * c-ubsan.c (ubsan_instrument_division): Use unshare_expr throughout.
7737 (ubsan_instrument_shift): Likewise.
7739 2015-07-23 Marek Polacek <polacek@redhat.com>
7742 * c-ubsan.c: Include gimplify.h.
7743 (ubsan_instrument_division): Unshare OP0 and OP1.
7744 (ubsan_instrument_shift): Likewise.
7746 2015-07-20 Marek Polacek <polacek@redhat.com>
7747 Richard Sandiford <richard.sandiford@arm.com>
7750 * c-common.c (c_fully_fold_internal): Warn about left shift overflows.
7751 Use EXPR_LOC_OR_LOC.
7752 (maybe_warn_shift_overflow): New function.
7753 * c-common.h (maybe_warn_shift_overflow): Declare.
7754 * c-opts.c (c_common_post_options): Set warn_shift_overflow.
7755 * c.opt (Wshift-overflow): New option.
7757 2015-07-16 Martin Liska <mliska@suse.cz>
7759 * c-format.c (static void check_format_info_main): Use
7760 object_allocator instead of pool_allocator.
7761 (check_format_arg): Likewise.
7762 (check_format_info_main): Likewise.
7764 2015-07-15 Andrew MacLeod <amacleod@redhat.com>
7766 * c-opts.c: Remove multiline #include comment.
7768 2015-07-12 Aldy Hernandez <aldyh@redhat.com>
7770 * c-common.c: Fix double word typos.
7772 2015-07-10 Eric Botcazou <ebotcazou@adacore.com>
7774 * c-ada-spec.h (cpp_operation): Revert latest change.
7775 * c-ada-spec.c (print_ada_declaration): Likewise. Skip implicit
7776 constructors and destructors.
7778 2015-07-09 Andrew MacLeod <amacleod@redhat.com>
7780 * c-common.h: Adjust includes for flags.h changes.
7781 * stub-objc.c: Likewise.
7783 2015-07-08 Eric Botcazou <ebotcazou@adacore.com>
7785 * c-ada-spec.h (cpp_operation): Add IS_CONSTEXPR.
7786 * c-ada-spec.c (print_ada_declaration): Skip constexpr constructors.
7788 2015-07-08 Jakub Jelinek <jakub@redhat.com>
7790 * c-omp.c (c_omp_declare_simd_clauses_to_numbers): If all clauses
7791 are to be removed, return NULL rather than original clauses list.
7793 2015-07-07 Andrew MacLeod <amacleod@redhat.com>
7795 * array-notation-common.c: Adjust includes.
7796 * c-ada-spec.c: Likewise.
7797 * c-cilkplus.c: Likewise.
7798 * c-common.h: Likewise.
7799 * c-cppbuiltin.c: Likewise.
7800 * c-dump.c: Likewise.
7801 * c-format.c: Likewise.
7802 * c-gimplify.c: Likewise.
7803 * c-indentation.c: Likewise.
7804 * c-lex.c: Likewise.
7805 * c-omp.c: Likewise.
7806 * c-opts.c: Likewise.
7807 * c-pch.c: Likewise.
7808 * c-ppoutput.c: Likewise.
7809 * c-pragma.c: Likewise.
7810 * c-pretty-print.c: Likewise.
7811 * c-semantics.c: Likewise.
7812 * c-ubsan.c: Likewise.
7814 * stub-objc.c: Likewise.
7816 2015-07-07 Eric Botcazou <ebotcazou@adacore.com>
7818 * c-ada-spec.h (cpp_operation): Add IS_MOVE_CONSTRUCTOR.
7819 * c-ada-spec.c (print_ada_declaration): Skip move constructors.
7821 2015-07-01 Jason Merrill <jason@redhat.com>
7823 * c-common.h (D_CXX11): Rename from D_CXX0X.
7824 (RID_FIRST_CXX11, RID_LAST_CXX11): Rename from *_CXX0X.
7825 * c-common.c: Adjust.
7827 * c-opts.c (c_common_post_options): Default to C++14.
7829 * c-opts.c (c_common_post_options): Highest ABI level is now 10.
7831 2015-06-30 Edward Smith-Rowland <3dw4rd@verizon.net>
7833 Implement N4197 - Adding u8 character literals
7834 * c-ada-spec.c (print_ada_macros): Treat CPP_UTF8CHAR like
7836 * c-common.c (c_parse_error): Print CPP_UTF8CHAR and
7837 CPP_UTF8CHAR_USERDEF tokens.
7838 * c-lex.c (c_lex_with_flags): Treat CPP_UTF8CHAR_USERDEF
7839 and CPP_UTF8CHAR tokens.
7840 (lex_charconst): Treat CPP_UTF8CHAR token.
7842 2015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
7845 * c-common.c (do_warn_unused_parameter): Move here.
7846 * c-common.h (do_warn_unused_parameter): Declare.
7848 2015-06-29 Marek Polacek <polacek@redhat.com>
7851 * c-common.c (check_case_bounds): Add bool * parameter. Set
7853 (c_add_case_label): Add bool * parameter. Pass it down to
7855 (c_do_switch_warnings): Add bool parameters. Implement -Wswitch-bool
7857 * c-common.h (c_add_case_label, c_do_switch_warnings): Update
7860 2015-06-27 Marek Polacek <polacek@redhat.com>
7862 * c-common.c (check_main_parameter_types): Use VECTOR_TYPE_P
7863 or VECTOR_INTEGER_TYPE_P throughout.
7864 * c-gimplify.c: Likewise.
7866 2015-06-26 Marek Polacek <polacek@redhat.com>
7868 * array-notation-common.c (find_rank): Use INDIRECT_REF_P.
7869 * c-common.c (c_fully_fold_internal): Likewise.
7870 (c_alignof_expr): Likewise.
7871 * c-pretty-print.c (c_pretty_printer::postfix_expression): Likewise.
7872 * c-ubsan.c (ubsan_instrument_bounds): Likewise.
7873 * cilk.c (create_parm_list): Likewise.
7875 2015-06-26 Marek Polacek <polacek@redhat.com>
7877 * c-common.c (handle_unused_attribute): Use VAR_OR_FUNCTION_DECL_P.
7879 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
7881 * c-common.c: Remove ipa-ref.h and plugin-api.h from include list.
7882 * c-gimplify.c: Likewise.
7883 * c-pragma.c: Likewise.
7884 * c-ubsan.c: Likewise.
7887 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
7889 * c-common.c (c_type_hasher): Inherit from ggc_ptr_hash rather than
7892 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
7894 * cilk.c: Move calls.h after tm.h in the include chain.
7896 2015-06-25 Marek Polacek <polacek@redhat.com>
7898 * array-notation-common.c: Use VAR_P throughout.
7899 * c-ada-spec.c: Likewise.
7900 * c-common.c: Likewise.
7901 * c-format.c: Likewise.
7902 * c-gimplify.c: Likewise.
7903 * c-omp.c: Likewise.
7904 * c-pragma.c: Likewise.
7905 * c-pretty-print.c: Likewise.
7908 2015-06-25 Marek Polacek <polacek@redhat.com>
7910 * cilk.c (extract_free_variables): Use is_global_var.
7912 2015-06-23 Richard Sandiford <richard.sandiford@arm.com>
7914 * c-common.c: Don't include target-def.h.
7916 2015-06-23 Marek Polacek <polacek@redhat.com>
7918 * c-common.c (warn_logical_operator): Use tree_int_cst_equal
7919 when comparing INTEGER_CSTs.
7921 2015-06-22 Pierre-Marie de Rodat <derodat@adacore.com>
7923 * c-ada-spec.h (cpp_operation): Add HAS_DEPENDENT_TEMPLATE_ARGS.
7924 * c-ada-spec.c (collect_ada_nodes): Skip NAMESPACE_DECL
7925 (dump_ada_template): Skip partially specialized types.
7927 2015-06-22 Mikhail Maltsev <maltsevm@gmail.com>
7929 * c-common.c (scalar_to_vector): Use std::swap instead of manually
7932 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
7934 * array-notation-common.c: Do not include input.h, line-map.h or is-a.h.
7935 * c-ada-spec.c: Likewise.
7936 * c-cilkplus.c: Likewise.
7937 * c-common.c: Likewise.
7938 * c-common.h: Likewise.
7939 * c-cppbuiltin.c: Likewise.
7940 * c-dump.c: Likewise.
7941 * c-format.c: Likewise.
7942 * c-gimplify.c: Likewise.
7943 * c-indentation.c: Likewise.
7944 * c-lex.c: Likewise.
7945 * c-omp.c: Likewise.
7946 * c-opts.c: Likewise.
7947 * c-pch.c: Likewise.
7948 * c-ppoutput.c: Likewise.
7949 * c-pragma.c: Likewise.
7950 * c-pretty-print.c: Likewise.
7951 * c-semantics.c: Likewise.
7952 * c-ubsan.c: Likewise.
7954 * stub-objc.c: Likewise.
7956 2015-06-13 Patrick Palka <ppalka@gcc.gnu.org>
7959 * c-common.c (c_common_truthvalue_conversion): Warn when
7960 converting an address of a reference to a truth value.
7962 2015-06-08 Andrew MacLeod <amacleod@redhat.com>
7964 * array-notation-common.c : Adjust include files.
7965 * c-ada-spec.c : Likewise.
7966 * c-cilkplus.c : Likewise.
7967 * c-common.c : Likewise.
7968 * c-common.h : Likewise.
7969 * c-cppbuiltin.c : Likewise.
7970 * c-dump.c : Likewise.
7971 * c-format.c : Likewise.
7972 * c-gimplify.c : Likewise.
7973 * c-indentation.c : Likewise.
7974 * c-lex.c : Likewise.
7975 * c-omp.c : Likewise.
7976 * c-opts.c : Likewise.
7977 * c-pch.c : Likewise.
7978 * c-ppoutput.c : Likewise.
7979 * c-pragma.c : Likewise.
7980 * c-pretty-print.c : Likewise.
7981 * c-semantics.c : Likewise.
7982 * c-ubsan.c : Likewise.
7983 * cilk.c : Likewise.
7984 * stub-objc.c : Likewise.
7986 2015-06-08 Marek Polacek <polacek@redhat.com>
7989 * c-format.c (location_from_offset): Return LOC if LINE is null.
7991 2015-06-05 Aldy Hernandez <aldyh@redhat.com>
7993 * c-common.h (c_parse_final_cleanups): New prototype.
7994 * c-opts.c (c_common_parse_file): Call c_parse_final_cleanups.
7996 2015-06-04 Sriraman Tallam <tmsriram@google.com>
7998 * c-common.c (noplt): New attribute.
7999 (handle_noplt_attribute): New handler.
8001 2015-06-04 Andrew MacLeod <amacleod@redhat.com>
8003 * array-notation-common.c: Adjust includes for restructured coretypes.h.
8004 * c-ada-spec.c: Likewise.
8005 * c-cilkplus.c: Likewise.
8006 * c-common.c: Likewise.
8007 * c-common.h: Likewise.
8008 * c-cppbuiltin.c: Likewise.
8009 * c-dump.c: Likewise.
8010 * c-format.c: Likewise.
8011 * c-gimplify.c: Likewise.
8012 * c-indentation.c: Likewise.
8013 * c-lex.c: Likewise.
8014 * c-omp.c: Likewise.
8015 * c-opts.c: Likewise.
8016 * c-pch.c: Likewise.
8017 * c-ppoutput.c: Likewise.
8018 * c-pragma.c: Likewise.
8019 * c-pretty-print.c: Likewise.
8020 * c-semantics.c: Likewise.
8021 * c-ubsan.c: Likewise.
8023 * stub-objc.c: Likewise.
8025 2015-06-02 David Malcolm <dmalcolm@redhat.com>
8028 * c-indentation.c (should_warn_for_misleading_indentation): Use
8029 expand_location rather than expand_location_to_spelling_point.
8030 Don't warn if the guarding statement is more indented than the
8033 2015-06-02 David Malcolm <dmalcolm@redhat.com>
8035 * c-indentation.c (warn_for_misleading_indentation): Bail out
8036 immediately if -Wmisleading-indentation isn't enabled.
8038 2015-06-01 Martin Liska <mliska@suse.cz>
8040 * c-format.c (check_format_arg):Use new type-based pool allocator.
8041 (check_format_info_main) Likewise.
8043 2015-05-31 Eric Botcazou <ebotcazou@adacore.com>
8045 * c-ada-spec.c (is_tagged_type): Test for TYPE_METHODS on main variant.
8046 (has_nontrivial_methods): Likewise.
8048 2015-05-25 Marek Polacek <polacek@redhat.com>
8050 * c-ubsan.c (ubsan_instrument_shift): Use type0.
8052 2015-05-22 Marek Polacek <polacek@redhat.com>
8055 * c-common.c (handle_deprecated_attribute): Allow CONST_DECL.
8057 2015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
8059 * c-cppbuiltin.c (c_cpp_builtins): Use if instead of #if with
8060 STACK_GROWS_DOWNWARD.
8062 2015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
8064 * c-cppbuiltin.c (c_cpp_builtins): Check the value of
8065 STACK_GROWS_DOWNWARD rather than if it is defined.
8067 2015-05-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
8070 * c-format.c (location_column_from_byte_offset): New.
8071 (location_from_offset): New.
8072 (struct format_wanted_type): Add offset_loc field.
8073 (check_format_info): Move handling of location for extra arguments
8074 closer to the point of warning.
8075 (check_format_info_main): Pass the result of location_from_offset
8077 (format_type_warning): Pass the result of location_from_offset
8080 2015-05-20 Marek Polacek <polacek@redhat.com>
8082 * c-omp.c (check_omp_for_incr_expr): Use BINARY_CLASS_P.
8084 2015-05-20 Marek Polacek <polacek@redhat.com>
8086 * c-ada-spec.c (dump_sloc): Use DECL_P.
8088 2015-05-20 Marek Polacek <polacek@redhat.com>
8090 * c-pragma.c: Use VAR_OR_FUNCTION_DECL_P throughout.
8091 * c-common.c: Likewise.
8093 2015-05-19 David Malcolm <dmalcolm@redhat.com>
8095 * c-common.h (fe_file_change): Strengthen param from
8096 const line_map * to const line_map_ordinary *.
8097 (pp_file_change): Likewise.
8098 * c-lex.c (fe_file_change): Likewise.
8099 (cb_define): Use linemap_check_ordinary when invoking
8101 (cb_undef): Likewise.
8102 * c-opts.c (c_finish_options): Use linemap_check_ordinary when
8103 invoking cb_file_change.
8104 (c_finish_options): Likewise.
8105 (push_command_line_include): Likewise.
8106 (cb_file_change): Strengthen param "new_map" from
8107 const line_map * to const line_map_ordinary *.
8108 * c-ppoutput.c (cb_define): Likewise for local "map".
8109 (pp_file_change): Likewise for param "map" and local "from".
8111 2015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
8113 * c-common.c (shorten_compare): Use std::swap instead of explicit swaps.
8115 2015-05-18 Tom de Vries <tom@codesourcery.com>
8117 * c-common.c (build_va_arg_1): New function.
8118 (build_va_arg): Add address operator to va_list operand if necessary.
8120 2015-05-15 Mikhail Maltsev <maltsevm@gmail.com>
8123 * c-common.c (int_safely_convertible_to_real_p): Define.
8124 (unsafe_conversion_p): Check conversions involving complex types.
8125 (conversion_warning): Add new warning message for conversions which
8126 discard imaginary component.
8127 * c-common.h: (enum conversion_safety): Add new enumerator for such
8130 2015-05-14 Marek Polacek <polacek@redhat.com>
8134 * c-common.c (c_fully_fold): Pass false down to c_fully_fold_internal.
8135 (c_fully_fold_internal): Fold C_MAYBE_CONST_EXPRs with
8136 C_MAYBE_CONST_EXPR_INT_OPERANDS set. Add FOR_INT_CONST argument and
8137 use it. If FOR_INT_CONST, require that all evaluated operands be
8140 2015-05-12 David Malcolm <dmalcolm@redhat.com>
8142 * c-common.h (warn_for_misleading_indentation): New prototype.
8143 * c-indentation.c: New file.
8144 * c.opt (Wmisleading-indentation): New option.
8146 2015-05-12 Tom de Vries <tom@codesourcery.com>
8148 PR tree-optimization/66010
8149 * c-common.c (build_va_arg): Don't mark ap addressable unless necessary.
8151 2015-05-09 Jason Merrill <jason@redhat.com>
8153 * c-opts.c (c_common_post_options): Also clear
8154 cpp_opts->cpp_warn_cxx11_compat.
8156 * c-common.h (enum cxx_dialect): Add cxx_unset.
8157 * c-common.c (cxx_dialect): Initialize to cxx_unset.
8158 * c-opts.c (c_common_post_options): Set C++ dialect to C++98 if unset.
8160 * c.opt (std=c++14): Remove Undocumented flag and experimental warning.
8161 (std=gnu++0x): Mark as Undocumented.
8162 (std=gnu++1y): Add deprecated message.
8164 2015-05-08 Jason Merrill <jason@redhat.com>
8166 * c.opt (Wc++11-compat): Make primary. Rename var warn_cxx11_compat.
8169 * c.opt (Wc++0x-compat): Also set cpp_warn_cxx11_compat.
8171 2015-05-08 Marek Polacek <polacek@redhat.com>
8174 * c.opt (Woverride-init-side-effects): New option.
8176 2015-05-07 Marek Polacek <polacek@redhat.com>
8179 * c-common.c (c_fully_fold_internal): Warn when left shifting a
8181 * c.opt (Wshift-negative-value): New option.
8182 * c-opts.c (c_common_post_options): Set warn_shift_negative_value
8183 when -Wextra and C99/C++11 mode.
8185 2015-05-07 Marek Polacek <polacek@redhat.com>
8186 Martin Uecker <uecker@eecs.berkeley.edu>
8188 * c-ubsan.c (ubsan_instrument_bounds): Don't skip instrumenting
8189 flexible member array-like members if SANITIZE_BOUNDS_STRICT.
8191 2015-05-05 Jason Merrill <jason@redhat.com>
8193 * c.opt (Wterminate): New.
8195 2015-04-30 Marek Polacek <polacek@redhat.com>
8197 * c-common.c (maybe_warn_bool_compare): When comparing with 0/1,
8198 require that the non-constant be of a boolean type.
8200 2015-04-29 Josh Triplett <josh@joshtriplett.org>
8202 * c-common.c (handle_section_attribute): Refactor to reduce
8203 nesting and distinguish between error cases.
8205 2015-04-29 Marek Polacek <polacek@redhat.com>
8208 * c-common.c (maybe_warn_bool_compare): Warn when comparing a boolean
8211 2015-04-29 Jakub Jelinek <jakub@redhat.com>
8213 * c-common.h (omp_clause_mask): Unconditionally define as a class.
8214 Use uint64_t instead of unsigned HOST_WIDE_INT and 64 instead of
8215 HOST_BITS_PER_WIDE_INT.
8217 2015-04-28 Tom de Vries <tom@codesourcery.com>
8219 PR tree-optimization/65887
8220 * c-common.c (build_va_arg): Mark va_arg ap argument as addressable.
8222 2015-04-28 Eric Botcazou <ebotcazou@adacore.com>
8223 Pierre-Marie de Rodat <derodat@adacore.com>
8225 * c-ada-spec.c (in_function): Delete.
8226 (dump_generic_ada_node): Do not change in_function and remove the
8227 redundant code dealing with it.
8228 (print_ada_declaration): Do not change in_function. Use INDENT_INCR.
8229 (print_ada_methods): Output the static member functions in a nested
8230 package after the regular methods as well as associated renamings.
8232 2015-04-24 Marek Polacek <polacek@redhat.com>
8235 * c-common.c (c_fully_fold_internal): Use OPT_Wshift_count_negative
8236 and OPT_Wshift_count_overflow.
8239 * c-common.c (warn_logical_operator): Warn if the operands have the
8242 2015-04-24 Marek Polacek <polacek@redhat.com>
8245 * c-common.c (warn_logical_operator): Bail if either operand comes
8246 from a macro expansion.
8248 2015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
8251 * c-common.c (c_default_pointer_mode): Add definition.
8252 * c-common.h (c_default_pointer_mode): Add declaration.
8254 2015-03-11 Jakub Jelinek <jakub@redhat.com>
8256 * c-common.c (c_common_nodes_and_builtins): Don't call xstrdup
8257 on record_builtin_type argument.
8259 2015-03-10 Jakub Jelinek <jakub@redhat.com>
8262 * c-common.c (warn_logical_not_parentheses): Don't warn for
8265 2015-03-07 Marek Polacek <polacek@redhat.com>
8268 * c-ubsan.c (ubsan_instrument_bounds): Check for COMPONENT_REF
8269 before trying to figure out whether we have a flexible array member.
8271 2015-03-06 Eric Botcazou <ebotcazou@adacore.com>
8272 Jonathan Wakely <jwakely.gcc@gmail.com>
8274 * c-ada-spec.c (dump_ada_double_name): Fix pasto.
8276 2015-03-05 Eric Botcazou <ebotcazou@adacore.com>
8279 * c-ada-spec.c (print_destructor): Remove obsolete code.
8281 2015-03-01 Eric Botcazou <ebotcazou@adacore.com>
8283 * c-ada-spec.c (is_tagged_type): Add guard for DECL_VINDEX.
8284 (dump_template_types): Adjust DECL_TEMPLATE_INSTANTIATIONS and
8285 DECL_TEMPLATE_RESULT emulations.
8286 (dump_ada_template)): Add guard for TYPE_METHODS.
8288 2015-02-27 Marek Polacek <polacek@redhat.com>
8291 * c.opt (Wformat-signedness): Don't enable by -Wformat=2.
8293 2015-02-27 Kai Tietz <ktietz@redhat.com>
8296 * c-pragma.c (handle_pragma_weak): Do not try to create
8297 weak/alias of declarations not being function, or variable
8300 2015-02-24 Thomas Schwinge <thomas@codesourcery.com>
8303 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
8305 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
8307 2015-02-16 Marek Polacek <polacek@redhat.com>
8310 * c-format.c (check_format_types): Handle null param.
8312 2015-02-13 Marek Polacek <polacek@redhat.com>
8315 * c-format.c (check_format_types): Don't warn about different
8316 signedness if the original value is in the range of WANTED_TYPE.
8318 2015-02-12 Jason Merrill <jason@redhat.com>
8321 * c-opts.c (c_common_post_options): Change flag_abi_version from 0
8322 to the current highest version.
8323 * c-cppbuiltin.c (c_cpp_builtins): Assert that it isn't 0.
8325 2015-02-04 Jakub Jelinek <jakub@redhat.com>
8329 * c-omp.c (c_finish_omp_atomic): Use TRUNC_DIV_EXPR
8330 instead of RDIV_EXPR. Use build_binary_op instead of
8333 2015-01-30 Joseph Myers <joseph@codesourcery.com>
8335 * c-opts.c, c-pch.c, cppspec.c: All callers of fatal_error changed
8336 to pass input_location as first argument.
8338 2015-01-23 Tom de Vries <tom@codesourcery.com>
8341 * c.opt (fopenacc): Mark as LTO option.
8343 2015-01-23 Tom de Vries <tom@codesourcery.com>
8346 * c.opt (fopenmp): Mark as LTO option.
8348 2015-01-21 Jakub Jelinek <jakub@redhat.com>
8351 * cilk.c (fill_decls_vec): Only put decls into vector v.
8352 (compare_decls): Fix up formatting.
8354 2015-01-21 Igor Zamyatin <igor.zamyatin@intel.com>
8357 * cilk.c: Include vec.h.
8358 (struct cilk_decls): New structure.
8359 (wrapper_parm_cb): Split this function to...
8360 (fill_decls_vec): ...this...
8361 (create_parm_list): ...and this.
8362 (compare_decls): New function.
8363 (for_local_cb): Remove.
8364 (wrapper_local_cb): Ditto.
8365 (build_wrapper_type): For now first traverse and fill vector of
8366 declarations then sort it and then deal with sorted vector.
8367 (cilk_outline): Ditto.
8368 (declare_one_free_variable): Ditto.
8370 2015-01-21 Jason Merrill <jason@redhat.com>
8373 * c-format.c (check_format_arg): Call decl_constant_value.
8375 2015-01-19 Martin Liska <mliska@suse.cz>
8377 * c-common.c (handle_noicf_attribute): New function.
8379 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
8380 Bernd Schmidt <bernds@codesourcery.com>
8381 James Norris <jnorris@codesourcery.com>
8382 Cesar Philippidis <cesar@codesourcery.com>
8383 Ilmir Usmanov <i.usmanov@samsung.com>
8384 Jakub Jelinek <jakub@redhat.com>
8386 * c.opt (fopenacc): New option.
8387 * c-cppbuiltin.c (c_cpp_builtins): Conditionally define _OPENACC.
8388 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
8390 * c-common.h (c_finish_oacc_wait): New prototype.
8391 * c-omp.c: Include "omp-low.h" and "gomp-constants.h".
8392 (c_finish_oacc_wait): New function.
8393 * c-pragma.c (oacc_pragmas): New variable.
8394 (c_pp_lookup_pragma, init_pragma): Handle it.
8395 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_CACHE,
8396 PRAGMA_OACC_DATA, PRAGMA_OACC_ENTER_DATA, PRAGMA_OACC_EXIT_DATA,
8397 PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP, PRAGMA_OACC_PARALLEL,
8398 PRAGMA_OACC_UPDATE, PRAGMA_OACC_WAIT.
8399 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ASYNC,
8400 PRAGMA_OACC_CLAUSE_AUTO, PRAGMA_OACC_CLAUSE_COLLAPSE,
8401 PRAGMA_OACC_CLAUSE_COPY, PRAGMA_OACC_CLAUSE_COPYIN,
8402 PRAGMA_OACC_CLAUSE_COPYOUT, PRAGMA_OACC_CLAUSE_CREATE,
8403 PRAGMA_OACC_CLAUSE_DELETE, PRAGMA_OACC_CLAUSE_DEVICE,
8404 PRAGMA_OACC_CLAUSE_DEVICEPTR, PRAGMA_OACC_CLAUSE_FIRSTPRIVATE,
8405 PRAGMA_OACC_CLAUSE_GANG, PRAGMA_OACC_CLAUSE_HOST,
8406 PRAGMA_OACC_CLAUSE_IF, PRAGMA_OACC_CLAUSE_NUM_GANGS,
8407 PRAGMA_OACC_CLAUSE_NUM_WORKERS, PRAGMA_OACC_CLAUSE_PRESENT,
8408 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPY,
8409 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYIN,
8410 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYOUT,
8411 PRAGMA_OACC_CLAUSE_PRESENT_OR_CREATE, PRAGMA_OACC_CLAUSE_PRIVATE,
8412 PRAGMA_OACC_CLAUSE_REDUCTION, PRAGMA_OACC_CLAUSE_SELF,
8413 PRAGMA_OACC_CLAUSE_SEQ, PRAGMA_OACC_CLAUSE_VECTOR,
8414 PRAGMA_OACC_CLAUSE_VECTOR_LENGTH, PRAGMA_OACC_CLAUSE_WAIT,
8415 PRAGMA_OACC_CLAUSE_WORKER.
8417 2015-01-14 Marcos Diaz <marcos.diaz@tallertechnologies.com>
8419 * c-cppbuiltin.c (c_cpp_builtins): New cpp define __SSP_EXPLICIT__
8420 for the new option fstack-protector_explicit.
8421 * c-common.c (c_common_attribute_table): Add stack_protect attribute.
8422 (handle_stack_protect_attribute): New function.
8424 2015-01-13 Martin Uecker <uecker@eecs.berkeley.edu>
8426 * c.opt: New option -Warray-bounds=.
8428 2015-01-09 Michael Collison <michael.collison@linaro.org>
8430 * array-notation-common.c: Include hash-set.h, machmode.h,
8431 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
8432 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
8433 * c-ada-spec.c: Ditto.
8434 * c-cilkplus.c: Ditto.
8435 * c-common.c: Include input.h due to flattening of tree.h.
8436 Define macro GCC_C_COMMON_C.
8437 * c-common.h: Flatten tree.h header files into c-common.h.
8438 Remove include of tree-core.h.
8439 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
8440 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
8441 fold-const.h, wide-int.h, and inchash.h due to
8442 flattening of tree.h.
8444 * c-format.c: Flatten tree.h header files into c-common.h.
8445 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
8446 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
8447 fold-const.h, wide-int.h, and inchash.h due to
8448 flattening of tree.h.
8449 * c-dump.c: Include hash-set.h, machmode.h,
8450 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
8451 fold-const.h, wide-int.h, and inchash.h due to
8452 flattening of tree.h.
8453 * c-format.c: Include hash-set.h, machmode.h,
8454 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
8455 fold-const.h, wide-int.h, inchash.h and real.h due to
8456 flattening of tree.h.
8457 * c-gimplify.c: Include hash-set.h, machmode.h,
8458 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
8459 fold-const.h, wide-int.h, and inchash.h due to
8460 flattening of tree.h.
8466 * c-ppoutput.c: Ditto.
8467 * c-pragma.c: Ditto.
8468 * c-pretty-print.c: Ditto.
8469 * c-semantics.c: Ditto.
8471 * stub-objc.c: Ditto.
8473 2015-01-08 Jason Merrill <jason@redhat.com>
8475 * c-ubsan.c (ubsan_maybe_instrument_array_ref): Use
8476 do_ubsan_in_current_function.
8477 (ubsan_maybe_instrument_reference_or_call): Likewise.
8478 * c-ubsan.h: Declare it.
8480 2015-01-08 Mike Stump <mikestump@comcast.net>
8482 * c-common.c (c_common_attribute_table): Add no_sanitize_thread.
8484 2015-01-07 Marek Polacek <polacek@redhat.com>
8487 * c-common.c (c_fully_fold_internal): Warn for division and modulo
8488 if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST and is zero.
8490 2015-01-05 Trevor Saunders <tsaunders@mozilla.com>
8493 * c.opt (Wsuggest-override): New option.
8495 2015-01-05 Jakub Jelinek <jakub@redhat.com>
8497 Update copyright years.
8499 2015-01-05 Marek Polacek <polacek@redhat.com>
8502 * c-common.c (warn_array_subscript_with_type_char): Add location_t
8504 * c-common.h (warn_array_subscript_with_type_char): Update
8507 2014-12-20 Edward Smith-Rowland <3dw4rd@verizon.net>
8509 * c-cppbuiltin.c (__cpp_sized_deallocation): Uncomment and move macro.
8510 Control macro with flag_sized_deallocation.
8512 2014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
8514 * c.opt (Wdiscarded-array-qualifiers): New option.
8516 2014-12-19 Jakub Jelinek <jakub@redhat.com>
8518 PR preprocessor/63831
8519 * c-cppbuiltin.c (c_cpp_builtins): Don't define __has_attribute
8520 and __has_cpp_attribute here.
8521 * c-ppoutput.c (init_pp_output): Set cb->has_attribute to
8522 c_common_has_attribute.
8523 * c-common.h (c_common_has_attribute): New prototype.
8524 * c-lex.c (init_c_lex): Set cb->has_attribute to
8525 c_common_has_attribute instead of cb_has_attribute.
8526 (get_token_no_padding): New function.
8527 (cb_has_attribute): Renamed to ...
8528 (c_common_has_attribute): ... this. No longer static. Use
8529 get_token_no_padding, require ()s, don't build TREE_LIST
8530 unnecessarily, fix up formatting, adjust diagnostics, call
8533 2014-12-15 Jason Merrill <jason@redhat.com>
8535 * c.opt (-fsized-deallocation, -Wc++14-compat): New.
8536 (-Wsized-deallocation): New.
8537 * c-opts.c (c_common_post_options): -fsized-deallocation defaults
8538 to on in C++14 and up.
8540 2014-12-11 Jason Merrill <jason@redhat.com>
8542 * c-cppbuiltin.c (c_cpp_builtins): Enable C++14 __cpp_constexpr.
8544 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_runtime_arrays if
8545 we aren't complaining about VLAs.
8547 2014-12-06 Marek Polacek <polacek@redhat.com>
8549 PR tree-optimization/64183
8550 * c-gimplify.c (c_gimplify_expr): Don't convert the RHS of a
8551 shift-expression if it is integer_type_node. Use types_compatible_p.
8553 2014-11-29 Jakub Jelinek <jakub@redhat.com>
8555 * c-common.c (convert_vector_to_pointer_for_subscript): Remove NULL
8556 last argument from create_tmp_var_raw and create_tmp_var calls.
8557 * cilk.c (gimplify_cilk_spawn): Likewise.
8558 * c-omp.c (c_finish_omp_atomic): Likewise.
8560 2014-11-28 Marek Polacek <polacek@redhat.com>
8562 * c-ubsan.c (ubsan_instrument_shift): Use op1_utype for MINUS_EXPR
8563 instead of unsigned_type_node.
8565 2014-11-28 Marek Polacek <polacek@redhat.com>
8568 * c-ubsan.c (ubsan_instrument_shift): Change the type of a MINUS_EXPR
8570 * c-gimplify.c (c_gimplify_expr): Convert right operand of a shift
8571 expression to unsigned_type_node.
8573 2014-11-20 Mark Wielaard <mjw@redhat.com>
8576 * c-opts.c (set_std_c89): Set lang_hooks.name.
8577 (set_std_c99): Likewise.
8578 (set_std_c11): Likewise.
8579 (set_std_cxx98): Likewise.
8580 (set_std_cxx11): Likewise.
8581 (set_std_cxx14): Likewise.
8582 (set_std_cxx1z): Likewise.
8584 2014-11-21 Jakub Jelinek <jakub@redhat.com>
8587 * c-common.h (convert_vector_to_pointer_for_subscript): Change
8588 return type to bool.
8589 * c-common.c: Include gimple-expr.h.
8590 (convert_vector_to_pointer_for_subscript): Change return type to
8591 bool. If *vecp is not lvalue_p and has VECTOR_TYPE, return true
8592 and copy it into a TARGET_EXPR and use that instead of *vecp
8595 2014-11-19 David Malcolm <dmalcolm@redhat.com>
8597 Merger of git branch "gimple-classes-v2-option-3".
8598 * ChangeLog.gimple-classes: New.
8599 * c-gimplify.c (add_block_to_enclosing): Strengthen local "stack"
8600 from being just a vec<gimple> to a vec<gbind *>.
8602 2014-11-18 Jakub Jelinek <jakub@redhat.com>
8605 * c-ubsan.c (ubsan_maybe_instrument_reference_or_call): Change type
8606 argument to ptype, set type to TREE_TYPE (ptype). Don't call
8607 get_pointer_alignment for non-pointers. Use ptype, or if it is
8608 reference type, corresponding pointer type, as type of kind
8610 (ubsan_maybe_instrument_reference,
8611 ubsan_maybe_instrument_member_call): Adjust callers.
8613 2014-11-15 Marek Polacek <polacek@redhat.com>
8616 * array-notation-common.c (is_sec_implicit_index_fn): Return false
8618 (extract_array_notation_exprs): Return for NULL node.
8620 2014-11-12 Joseph Myers <joseph@codesourcery.com>
8622 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Define and
8623 undefine __NO_MATH_ERRNO__ based on changes to -fmath-errno state.
8625 2014-11-12 Jakub Jelinek <jakub@redhat.com>
8628 * c-common.c (check_builtin_function_arguments): Handle
8629 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW.
8631 2014-11-10 Andi Kleen <ak@linux.intel.com>
8634 * c-common.h (check_no_cilk): Declare.
8635 * cilk.c (get_error_location): New function.
8636 (check_no_cilk): Dito.
8638 2014-11-10 Andi Kleen <ak@linux.intel.com>
8640 * cilk.c (recognize_spawn): Use expression location
8643 2014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
8645 * c.opt ([Wshift-count-negative, Wshift-count-overflow]): Add.
8647 2014-11-10 Edward Smith-Rowland <3dw4rd@verizon.net>
8649 * c-cppbuiltin.c (__has_attribute, __has_cpp_attribute): New macros;
8650 (__cpp_rtti, __cpp_exceptions): New macros for C++98;
8651 (__cpp_range_based_for, __cpp_initializer_lists,
8652 __cpp_delegating_constructors, __cpp_nsdmi,
8653 __cpp_inheriting_constructors, __cpp_ref_qualifiers): New macros
8654 for C++11; (__cpp_attribute_deprecated): Remove in favor of
8655 __has_cpp_attribute.
8656 * c-lex.c (cb_has_attribute): New callback CPP function;
8657 (init_c_lex): Set has_attribute callback.
8659 2014-11-04 Richard Biener <rguenther@suse.de>
8661 * c-common.c (shorten_compare): Do not shorten mixed
8662 DFP and non-DFP compares.
8664 2014-11-01 Edward Smith-Rowland <3dw4rd@verizon.net>
8666 * g++.dg/cpp1y/feat-cxx11.C: Commentary and rearrangement of tests.
8667 * g++.dg/cpp1y/feat-cxx11-neg.C: Add aggregate NSDMI test.
8668 Commentary and rearrangement of tests.
8669 * g++.dg/cpp1y/feat-cxx14.C: Enable aggregate NSDMI test.
8670 Commentary and rearrangement of tests.
8671 * g++.dg/cpp1y/feat-cxx98-neg.C: Ditto.
8672 * g++.dg/cpp1y/feat-cxx98.C: Commentary.
8674 2014-10-29 Richard Sandiford <richard.sandiford@arm.com>
8676 * c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant
8677 enum from machine_mode.
8679 2014-10-28 Andrew MacLeod <amacleod@redhat.com>
8681 * c-common.c: Adjust include files.
8682 * c-gimplify.c: Ditto.
8684 * c-pragma.c: Ditto.
8687 2014-10-27 Andrew MacLeod <amacleod@redhat.com>
8689 * c-gimplify.c: Adjust include files.
8691 2014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
8694 * c-opts.c (c_common_diagnostics_set_defaults): Renamed from
8695 c_common_initialize_diagnostics.
8696 * c-common.h: Likewise.
8698 2014-10-24 Marek Polacek <polacek@redhat.com>
8701 * c-pretty-print.c (c_pretty_printer::simple_type_specifier): Don't
8702 print "struct"/"union"/"enum" for typedefed names.
8704 2014-10-23 Marek Polacek <polacek@redhat.com>
8706 * c-ubsan.c (ubsan_instrument_shift): Perform the MINUS_EXPR
8709 2014-10-22 Jakub Jelinek <jakub@redhat.com>
8710 Yury Gribov <y.gribov@samsung.com>
8712 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
8713 ubsan_instrument_vla): Check bits in flag_sanitize_recover bitmask
8714 instead of flag_sanitize_recover as bool flag.
8716 2014-10-21 Kirill Yukhin <kirill.yukhin@intel.com>
8718 * cilk.c: Revert previous change.
8720 2014-10-20 Igor Zamyatin <igor.zamyatin@intel.com>
8723 * cilk.c: Include vec.h.
8724 (struct cilk_decls): New structure.
8725 (wrapper_parm_cb): Split this function to...
8726 (fill_decls_vec): ...this...
8727 (create_parm_list): ...and this.
8728 (compare_decls): New function.
8729 (for_local_cb): Remove.
8730 (wrapper_local_cb): Ditto.
8731 (build_wrapper_type): For now first traverse and fill vector of
8732 declarations then sort it and then deal with sorted vector.
8733 (cilk_outline): Ditto.
8734 (declare_one_free_variable): Ditto.
8736 2014-10-17 Marek Polacek <polacek@redhat.com>
8738 * c-opts.c (c_common_post_options): Set warn_implicit_int.
8739 * c.opt (Wimplicit-int): Initialize to -1.
8741 2014-10-16 Andrew MacLeod <amacleod@redhat.com>
8743 * c-pragma.c: Adjust include files.
8744 * c-semantics.c: Likewise.
8746 2014-10-16 DJ Delorie <dj@redhat.com>
8748 * c-cppbuiltin.c (cpp_atomic_builtins): Don't assume pointers are
8751 2014-10-14 Jason Merrill <jason@redhat.com>
8754 * c-common.h (CPP_PREPARSED_EXPR): New.
8755 (N_CP_TTYPES): Adjust.
8757 2014-10-15 Marek Polacek <polacek@redhat.com>
8759 * c-opts.c (c_common_init_options): Make -std=gnu11 the default for C.
8761 2014-10-14 DJ Delorie <dj@redhat.com>
8763 * c-pretty-print.c (pp_c_integer_constant): Check for all __intN
8764 types, not just __int128.
8765 * c-cppbuiltin.c (c_cpp_builtins): Add builtins for all __intN
8766 types, not just __int128.
8767 (cpp_atomic_builtins): Round pointer sizes up.
8768 (type_suffix): Use type precision, not specific types.
8769 * c-common.c (c_common_reswords): Remove __int128 special case.
8770 (c_common_type_for_size): Check for all __intN types, not just
8772 (c_common_type_for_mode): Likewise.
8773 (c_common_signed_or_unsigned_type): Likewise.
8774 (c_build_bitfield_integer_type): Likewise.
8775 (c_common_nodes_and_builtins): Likewise.
8776 (keyword_begins_type_specifier): Likewise.
8777 * c-common.h (rid): Remove RID_INT128 and add RID_INT_N_* for all
8780 2014-10-12 Trevor Saunders <tsaunders@mozilla.com>
8782 * c-common.c: Use hash_table instead of hashtab.
8784 2014-10-06 Edward Smith-Rowland <3dw4rd@verizon.net>
8786 * c-cppbuiltin.c: Move __cpp_attribute_deprecated to the
8789 2014-10-03 Marc Glisse <marc.glisse@inria.fr>
8794 * c-common.c (warn_logical_operator): Punt for vectors.
8796 2014-10-01 Edward Smith-Rowland <3dw4rd@verizon.net>
8798 Implement SD-6: SG10 Feature Test Recommendations
8799 * c-cppbuiltin.c (c_cpp_builtins()): Define language feature
8800 macros and the __has_header macro.
8802 2014-09-30 Jason Merrill <jason@redhat.com>
8804 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_ASSIGNABLE and
8805 RID_IS_TRIVIALLY_CONSTRUCTIBLE.
8806 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
8808 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_COPYABLE.
8809 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
8811 * c-common.h (enum rid): Remove RID_IS_CONVERTIBLE_TO.
8812 * c-common.c (c_common_reswords): Remove __is_convertible_to.
8814 2014-09-24 Marek Polacek <polacek@redhat.com>
8818 * c-common.h (struct c_common_resword): Don't define CPP_KEYWORD.
8820 2014-09-23 Andi Kleen <ak@linux.intel.com>
8822 * c-common.c (handle_no_reorder_attribute): New function.
8823 (c_common_attribute_table): Add no_reorder attribute.
8825 2014-09-22 Joseph Myers <joseph@codesourcery.com>
8827 * c-cppbuiltin.c (c_cpp_builtins): Define
8828 __LIBGCC_*_EXCESS_PRECISION__ macros for supported floating-point
8831 2014-09-18 Joseph Myers <joseph@codesourcery.com>
8833 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_*_FUNC_EXT__
8834 for supported floating-point modes.
8836 2014-09-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
8838 * c.opt (Wpsabi): Use LangEnabledBy.
8839 * c-opts.c (c_common_handle_option): Do not handle here.
8841 2014-09-12 Joseph Myers <joseph@codesourcery.com>
8843 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_HAS_%s_MODE__
8844 macros for floating-point modes.
8846 2014-09-11 Marc Glisse <marc.glisse@inria.fr>
8849 * c-cppbuiltin.c (builtin_define_float_constants): Correct
8850 __*_DENORM_MIN__ without denormals.
8852 2014-09-10 Jakub Jelinek <jakub@redhat.com>
8854 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
8855 ubsan_instrument_vla, ubsan_instrument_return): Adjust
8856 ubsan_create_data callers.
8857 (ubsan_instrument_bounds): Don't emit UBSAN_BOUNDS at all if
8858 index is constant or BIT_AND_EXPR with constant mask and is
8859 small enough for the bound.
8860 * c-gimplify.c (ubsan_walk_array_refs_r): For ADDR_EXPR of
8861 ARRAY_REF, make sure the inner ARRAY_REF is not walked again.
8863 2014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
8865 * c.opt: Add CppReason to various flags.
8866 (Wdate-time): Re-sort.
8867 * c-common.c: Include c-common.h earlier.
8868 (struct reason_option_codes_t): Delete.
8869 (c_option_controlling_cpp_error): Prefix global type and struct
8872 2014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
8874 * c.opt (Wnormalized): New.
8875 (Wnormalized=): Use Enum and Reject Negative.
8876 * c-opts.c (c_common_handle_option): Do not handle Wnormalized here.
8878 2014-09-08 Joseph Myers <joseph@codesourcery.com>
8880 * c-cppbuiltin.c (c_cpp_builtins): Define macros for mantissa
8881 digits of floating-point modes if -fbuilding-libgcc.
8883 2014-09-05 Joseph Myers <joseph@codesourcery.com>
8885 * c-cppbuiltin.c (c_cpp_builtins): Also define
8886 __LIBGCC_EH_TABLES_CAN_BE_READ_ONLY__,
8887 __LIBGCC_EH_FRAME_SECTION_NAME__, __LIBGCC_JCR_SECTION_NAME__,
8888 __LIBGCC_CTORS_SECTION_ASM_OP__, __LIBGCC_DTORS_SECTION_ASM_OP__,
8889 __LIBGCC_TEXT_SECTION_ASM_OP__, __LIBGCC_INIT_SECTION_ASM_OP__,
8890 __LIBGCC_INIT_ARRAY_SECTION_ASM_OP__,
8891 __LIBGCC_STACK_GROWS_DOWNWARD__,
8892 __LIBGCC_DONT_USE_BUILTIN_SETJMP__,
8893 __LIBGCC_DWARF_ALT_FRAME_RETURN_COLUMN__,
8894 __LIBGCC_DWARF_FRAME_REGISTERS__,
8895 __LIBGCC_EH_RETURN_STACKADJ_RTX__, __LIBGCC_JMP_BUF_SIZE__,
8896 __LIBGCC_STACK_POINTER_REGNUM__ and
8897 __LIBGCC_VTABLE_USES_DESCRIPTORS__ for -fbuilding-libgcc.
8898 (builtin_define_with_value): Handle backslash-escaping in string
8901 2014-09-05 Richard Biener <rguenther@suse.de>
8904 * c-format.c (check_format_arg): Properly handle
8905 effectively signed POINTER_PLUS_EXPR offset.
8907 2014-09-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
8909 * c.opt (Wc90-c99-compat,Wc++-compat,Wcomment,Wendif-labels,
8910 Winvalid-pch,Wlong-long,Wmissing-include-dirs,Wmultichar,Wpedantic,
8911 (Wdate-time,Wtraditional,Wundef,Wvariadic-macros): Add CPP, Var
8913 * c-opts.c (c_common_handle_option): Do not handle here.
8914 (sanitize_cpp_opts): Likewise.
8915 * c-common.c (struct reason_option_codes_t): Handle
8916 CPP_W_C90_C99_COMPAT and CPP_W_PEDANTIC.
8918 2014-09-03 Marek Polacek <polacek@redhat.com>
8920 * c.opt (Wlogical-not-parentheses): Enable by -Wall.
8922 2014-09-02 Jakub Jelinek <jakub@redhat.com>
8923 Balaji V. Iyer <balaji.v.iyer@intel.com>
8924 Igor Zamyatin <igor.zamyatin@intel.com>
8926 * c-cilkplus.c (cilk_for_number_of_iterations): New function.
8927 * c-common.c (c_common_reswords): Added _Cilk_for.
8928 * c-common.h (enum rid): Added RID_CILK_FOR.
8929 (cilk_for_number_of_iterations): Add declaration.
8930 * c-omp.c (c_finish_omp_for): Added checks for CILK_SIMD and
8932 * c-pragma.c (init_pragma): Register "grainsize" pragma.
8933 * c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_GRAINSIZE.
8935 2014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
8937 * c.opt (Wbuiltin-macro-redefined,Wdeprecated,Wendif-labels,
8938 Winvalid-pch,Wliteral-suffix,Wmissing-include-dirs,Wtrigraphs,
8939 Wundef): Use CPP, Var and Init.
8940 * c-opts.c (c_common_handle_option): Do not handle the above flags here.
8942 2014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
8944 * c.opt (Wbuiltin-macro-redefined): Use CPP, Var and Init.
8945 * c-opts.c (c_common_handle_option): Do not handle here.
8947 2014-08-25 Jason Merrill <jason@redhat.com>
8949 * c.opt: Change -std=c++1y and -std=gnu++1y to be aliases for
8950 -std=c++14 and -std=gnu++14, rather than the reverse.
8951 * c-opts.c (c_common_handle_option): Change OPT_std_c__1y and
8952 OPT_std_gnu__1y to OPT_std_c__14 and OPT_std_gnu__14.
8953 * c-common.h (cxx_dialect): Remove cxx1y.
8955 2014-08-23 Edward Smith-Rowland <3dw4rd@verizon.net>
8957 * c-common.h (enum cxx_dialect): Add cxx14.
8958 * c-opts.c (set_std_cxx1y): Rename to set_std_cxx14; Use cxx14.
8959 * c-ubsan.c (ubsan_instrument_shift): Change comment and logic from
8960 cxx_dialect == cxx11 || cxx_dialect == cxx1y to cxx_dialect >= cxx11.
8962 2014-08-22 Jason Merrill <jason@redhat.com>
8964 * c.opt (std=gnu++17): Fix alias.
8966 2014-08-22 Marek Polacek <polacek@redhat.com>
8969 * c-common.c (warn_logical_not_parentheses): Don't check LHS. Don't
8970 check for vector types. Drop LHS argument.
8971 * c-common.h (warn_logical_not_parentheses): Adjust.
8973 2014-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
8975 * c.opt (Wcomment): Use CPP, Var and LangEnabledBy.
8976 (Wmultichar): Likewise.
8977 (Wdate-time): Use C-family languages instead of Common. Use CPP
8979 * c-opts.c (c_common_handle_option): Do not handle the above
8981 (sanitize_cpp_opts): Likewise.
8983 2014-08-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
8986 * c-opts.c: Include tree-diagnostics.h.
8987 (c_diagnostic_finalizer): New.
8988 (c_common_initialize_diagnostics): Use it.
8990 2014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
8992 PR preprocessor/51303
8993 * c-common.c (struct reason_option_codes_t option_codes):
8994 Add CPP_W_MISSING_INCLUDE_DIRS. Sort alphabetically.
8996 2014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
9000 * c.opt (Wvariadic-macros): Use CPP and LangEnabledBy.
9001 * c-opts.c (c_common_handle_option): Call cpp_handle_option_auto.
9002 (c_common_post_options): Call init_global_opts_from_cpp.
9003 (sanitize_cpp_opts): Do not handle Wvariadic-macros here.
9005 2014-08-19 Marek Polacek <polacek@redhat.com>
9008 * c-common.c (maybe_warn_bool_compare): New function.
9009 * c-common.h (maybe_warn_bool_compare): Declare.
9010 * c.opt (Wbool-compare): New option.
9012 2014-08-19 Marek Polacek <polacek@redhat.com>
9014 * c.opt (Wc99-c11-compat): New option.
9016 2014-08-19 Marek Polacek <polacek@redhat.com>
9018 * c-opts.c (sanitize_cpp_opts): Make warn_long_long be set according
9019 to warn_c90_c99_compat.
9020 * c.opt (Wc90-c99-compat, Wdeclaration-after-statement): Initialize
9023 2014-08-19 Manuel López-Ibáñez <manu@gcc.gnu.org>
9024 Steven Bosscher <steven@gcc.gnu.org>
9027 * c-format.c: Add extra_arg_loc and format_string_loc to struct
9028 format_check_results.
9029 (check_function_format): Use true and add comment for boolean
9031 (finish_dollar_format_checking): Use explicit location when warning.
9032 (check_format_info): Likewise.
9033 (check_format_arg): Set extra_arg_loc and format_string_loc.
9034 (check_format_info_main): Use explicit location when warning.
9035 (check_format_types): Pass explicit location.
9036 (format_type_warning): Likewise.
9038 2014-08-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
9041 * c-format.c: Handle Fortran flags.
9043 2014-08-12 Igor Zamyatin <igor.zamyatin@intel.com>
9046 * array-notation-common.c (find_rank): Added handling for other
9047 types of references.
9049 2014-08-10 Marek Polacek <polacek@redhat.com>
9052 * c-opts.c (sanitize_cpp_opts): Pass warn_c90_c99_compat to libcpp.
9053 * c.opt (Wc90-c99-compat): Add option.
9055 2014-08-07 Trevor Saunders <tsaunders@mozilla.com>
9057 * c-gimplify.c, cilk.c: Remove includes of pointer-set.h.
9059 2014-08-03 Marek Polacek <polacek@redhat.com>
9061 * c-common.c (check_case_value): Add location_t parameter. Use it.
9062 (c_add_case_label): Pass loc to check_case_value.
9064 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
9066 * cilk.c: Use hash_map instead of pointer_map.
9068 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
9070 * c-gimplify.c: Use hash_set instead of pointer_set.
9072 2014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
9075 * array-notation-common.c (extract_array_notation_exprs): Handling
9078 2014-08-01 Jakub Jelinek <jakub@redhat.com>
9080 * c-common.h (min_align_of_type): Removed prototype.
9081 * c-common.c (min_align_of_type): Removed.
9082 * c-ubsan.h (ubsan_maybe_instrument_reference,
9083 ubsan_maybe_instrument_member_call): New prototypes.
9084 * c-ubsan.c: Include stor-layout.h and builtins.h.
9085 (ubsan_maybe_instrument_reference_or_call,
9086 ubsan_maybe_instrument_reference, ubsan_maybe_instrument_call): New
9089 2014-07-31 Marc Glisse <marc.glisse@inria.fr>
9092 * c.opt (-Wreturn-local-addr): Move to common.opt.
9094 2014-07-30 Jason Merrill <jason@redhat.com>
9099 * c.opt (-fuse-all-virtuals): New.
9101 2014-07-30 Tom Tromey <tromey@redhat.com>
9104 * c.opt (Wdesignated-init): New option.
9105 * c-common.c (c_common_attribute_table): Add "designated_init".
9106 (handle_designated_init): New function.
9108 2014-07-24 Marek Polacek <polacek@redhat.com>
9111 * c-opts.c (c_finish_options): If -imacros is in effect, return.
9113 2014-07-16 Dodji Seketeli <dodji@redhat.com>
9115 PR preprocessor/60723 - missing system-ness marks for macro tokens
9116 * c-ppoutput.c (struct print::prev_was_system_token): New data
9118 (init_pp_output): Initialize it.
9119 (maybe_print_line_1, maybe_print_line, print_line_1, print_line)
9120 (do_line_change): Return a flag saying if a line marker was
9122 (scan_translation_unit): Detect if the system-ness of the token we
9123 are about to emit is different from the one of the previously
9124 emitted token. If so, emit a line marker. Avoid emitting useless
9125 adjacent line markers. Avoid emitting line markers for tokens
9126 originating from the expansion of built-in macros.
9127 (scan_translation_unit_directives_only): Adjust.
9129 2014-07-15 Marek Polacek <polacek@redhat.com>
9131 * c-ubsan.c (ubsan_instrument_bounds): Don't instrument if
9132 TYPE_MAX_VALUE is NULL.
9134 2014-07-14 Jakub Jelinek <jakub@redhat.com>
9137 * c.opt (Wmemset-transposed-args): New warning.
9139 2014-07-10 Jason Merrill <jason@redhat.com>
9143 * c.opt (-fuse-all-virtuals): New.
9145 2014-07-09 Richard Biener <rguenther@suse.de>
9148 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
9149 using unsigned arithmetic if overflow does not wrap instead of
9150 if overflow is undefined.
9152 2014-07-06 Marek Polacek <polacek@redhat.com>
9155 * c.opt (Wsizeof-array-argument): New option.
9157 2014-07-03 Jakub Jelinek <jakub@redhat.com>
9159 * c-ada-spec.c (dump_ada_nodes): Don't call qsort if
9160 comments->count <= 1, as comments->entries might be NULL.
9162 2014-07-01 Marek Polacek <polacek@redhat.com>
9164 * c.opt (Wint-conversion): New option.
9166 2014-07-01 Marek Polacek <polacek@redhat.com>
9169 * c.opt (Wincompatible-pointer-types): New option.
9171 2014-06-30 Paolo Carlini <paolo.carlini@oracle.com>
9174 * c-common.c (handle_noreturn_attribute, handle_const_attribute):
9175 Do not discard TYPE_QUALS of type.
9177 2014-06-26 Jason Merrill <jason@redhat.com>
9179 * c-common.h (enum cxx_dialect): Add cxx1z.
9180 * c.opt (std=c++1z, std=c++17, std=gnu++1z, std=gnu++17): New.
9181 * c-opts.c (c_common_handle_option, set_std_cxx1z): Handle it.
9183 2014-06-26 Teresa Johnson <tejohnson@google.com>
9185 * c-common.h (get_dump_info): Declare.
9186 * c-gimplify.c (c_genericize): Use saved dump files.
9187 * c-opts.c (c_common_parse_file): Begin and end dumps
9188 once around parsing invocation.
9189 (get_dump_info): New function.
9191 2014-06-23 Marek Polacek <polacek@redhat.com>
9192 Andrew MacLeod <amacleod@redhat.com>
9195 * c-common.c (get_atomic_generic_size): Don't segfault if the
9196 type doesn't have a size.
9198 2014-06-20 Marek Polacek <polacek@redhat.com>
9200 * c-gimplify.c: Include "c-ubsan.h" and "pointer-set.h".
9201 (ubsan_walk_array_refs_r): New function.
9202 (c_genericize): Instrument array bounds.
9203 * c-ubsan.c: Include "internal-fn.h".
9204 (ubsan_instrument_division): Mark instrumented arrays as having
9205 side effects. Adjust ubsan_type_descriptor call.
9206 (ubsan_instrument_shift): Likewise.
9207 (ubsan_instrument_vla): Adjust ubsan_type_descriptor call.
9208 (ubsan_instrument_bounds): New function.
9209 (ubsan_array_ref_instrumented_p): New function.
9210 (ubsan_maybe_instrument_array_ref): New function.
9211 * c-ubsan.h (ubsan_instrument_bounds): Declare.
9212 (ubsan_array_ref_instrumented_p): Declare.
9213 (ubsan_maybe_instrument_array_ref): Declare.
9215 2014-06-20 Hale Wang <hale.wang@arm.com>
9218 * c.opt (fshort-enums): Add to LTO.
9219 * c.opt (fshort-wchar): Likewise.
9221 2014-06-16 Marek Polacek <polacek@redhat.com>
9224 * c.opt (Wswitch-bool): Add Var.
9226 2014-06-12 Jakub Jelinek <jakub@redhat.com>
9229 * c-omp.c (c_omp_split_clauses): Don't crash on firstprivate in
9230 #pragma omp target teams or
9231 #pragma omp {,target }teams distribute simd.
9233 2014-06-12 Jason Merrill <jason@redhat.com>
9235 * c.opt (Wabi=, fabi-compat-version): New.
9236 * c-opts.c (c_common_handle_option): Handle -Wabi=.
9237 (c_common_post_options): Handle flag_abi_compat_version default.
9238 Disallow -fabi-compat-version=1.
9239 * c-common.h (abi_version_crosses): New.
9241 2014-06-11 Jan Hubicka <hubicka@ucw.cz>
9243 * c-common.c (handle_section_attribute): Update handling for
9244 section names that are no longer trees.
9246 2014-06-10 Jakub Jelinek <jakub@redhat.com>
9249 * c-pragma.c (omp_pragmas_simd): Move PRAGMA_OMP_TASK...
9250 (omp_pragmas): ... back here.
9252 2014-06-05 Marek Polacek <polacek@redhat.com>
9255 * c-common.c (warn_logical_not_parentheses): New function.
9256 * c-common.h (warn_logical_not_parentheses): Declare.
9257 * c.opt (Wlogical-not-parentheses): New option.
9259 2014-06-04 Marek Polacek <polacek@redhat.com>
9262 * c-common.c (check_case_bounds): Add location parameter.
9264 (c_add_case_label): Pass loc to check_case_bounds.
9266 2014-06-03 Marek Polacek <polacek@redhat.com>
9269 * c.opt (Wswitch-bool): New option.
9271 2014-05-22 Thomas Schwinge <thomas@codesourcery.com>
9273 * c-common.h (c_omp_sharing_predetermined, c_omp_remap_decl):
9275 (record_types_used_by_current_var_decl): Move prototype to where
9278 * c-common.c (DEF_FUNCTION_TYPE_0, DEF_FUNCTION_TYPE_6)
9279 (DEF_FUNCTION_TYPE_7, DEF_FUNCTION_TYPE_8)
9280 (DEF_FUNCTION_TYPE_VAR_5): Cosmetic fixes.
9282 2014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
9284 * c-common.h (CTI_VOID_ZERO, void_zero_node): Delete.
9285 * c-common.c (c_common_nodes_and_builtins): Don't initialize
9287 * c-pretty-print.c (pp_c_void_constant): New function.
9288 (c_pretty_printer::constant, c_pretty_printer::primary_expression)
9289 (c_pretty_printer::expression): Handle VOID_CST.
9290 * cilk.c (extract_free_variables): Likewise.
9291 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift)
9292 (ubsan_instrument_vla): Use void_node instead of void_zero_node.
9294 2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
9296 * c-common.h (sorted_fields_type): Remove variable_size GTY attribute.
9297 * c-pragma.c (push_alignment): Adjust.
9298 (handle_pragma_push_options): Likewise.
9300 2014-05-09 Marek Polacek <polacek@redhat.com>
9303 * c-common.c (check_user_alignment): Return -1 if alignment is error
9305 (handle_aligned_attribute): Don't call default_conversion on
9307 (handle_vector_size_attribute): Likewise.
9308 (handle_tm_wrap_attribute): Handle case when wrap_decl is error node.
9309 (handle_sentinel_attribute): Call default_conversion and allow even
9310 integral types as an argument.
9312 2014-05-08 Marek Polacek <polacek@redhat.com>
9315 * c-common.c (min_align_of_type): New function factored out from...
9316 (c_sizeof_or_alignof_type): ...here.
9317 * c-common.h (min_align_of_type): Declare.
9319 2014-05-08 Marek Polacek <polacek@redhat.com>
9322 * c-common.c (check_main_parameter_types): Warn for _Atomic-qualified
9323 parameter type of main.
9325 2014-05-07 DJ Delorie <dj@redhat.com>
9327 * c-cppbuiltin.c (print_bits_of_hex): New.
9328 (builtin_define_type_minmax): Print values using hex so as not to
9329 require a pre-computed list of string values.
9331 2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
9332 Mike Stump <mikestump@comcast.net>
9333 Richard Sandiford <rdsandiford@googlemail.com>
9335 * c-ada-spec.c: Include wide-int.h.
9336 (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Remove.
9337 (dump_generic_ada_node): Use wide-int interfaces.
9338 * c-common.c: Include wide-int-print.h.
9339 (shorten_compare): Use wide-int interfaces and tree_int_cst_lt.
9340 (pointer_int_sum): Use wide-int interfaces.
9341 (c_common_nodes_and_builtins): Use make_int_cst.
9342 (match_case_to_enum_1): Use tree_fits_uhwi_p and tree_fits_shwi_p.
9343 (handle_alloc_size_attribute): Use wide-int interfaces.
9344 (get_nonnull_operand): Likewise.
9345 * c-format.c (get_constant): Use tree_fits_uhwi_p.
9346 * c-lex.c: Include wide-int.h.
9347 (narrowest_unsigned_type): Take a widest_int rather than two
9349 (narrowest_signed_type): Likewise.
9350 (interpret_integer): Update accordingly. Use wide-int interfaces.
9351 (lex_charconst): Use wide-int interfaces.
9352 * c-pretty-print.c: Include wide-int.h.
9353 (pp_c_integer_constant): Use wide-int interfaces.
9354 * cilk.c (declare_one_free_variable): Use tree_int_cst_lt instead of
9355 INT_CST_LT_UNSIGNED.
9357 2014-05-06 Richard Biener <rguenther@suse.de>
9359 * c-opts.c (c_common_post_options): For -freestanding,
9360 -fno-hosted and -fno-builtin disable pattern recognition
9361 if not enabled explicitely.
9363 2014-05-02 Marek Polacek <polacek@redhat.com>
9365 * c.opt (Wsizeof-pointer-memaccess): Describe option.
9367 2014-05-01 Marek Polacek <polacek@redhat.com>
9370 * c.opt (Wdiscarded-qualifiers): Add.
9372 2014-04-30 Marek Polacek <polacek@redhat.com>
9374 * c-ubsan.c (ubsan_instrument_division): Handle REAL_TYPEs. Perform
9375 INT_MIN / -1 sanitization only for integer types.
9377 2014-04-25 Marek Polacek <polacek@redhat.com>
9380 * c-common.c (handle_noinline_attribute): Warn if the attribute
9381 conflicts with always_inline attribute.
9382 (handle_always_inline_attribute): Warn if the attribute conflicts
9383 with noinline attribute.
9385 2014-04-25 Marek Polacek <polacek@redhat.com>
9388 * c-common.c (check_main_parameter_types): Warn about variadic main.
9390 2014-04-24 Mike Stump <mikestump@comcast.net>
9392 * c.opt (Wshadow-ivar): Default to on.
9394 2014-04-24 Dimitris Papavasiliou <dpapavas@gmail.com>
9396 * c.opt (Wshadow-ivar, flocal-ivars, fivar-visibility): Add.
9398 2014-04-23 Marek Polacek <polacek@redhat.com>
9400 * c-common.c (handle_tm_wrap_attribute): Tweak error message.
9402 2014-04-22 Jakub Jelinek <jakub@redhat.com>
9405 * c-ubsan.c (ubsan_instrument_return): Return __builtin_trap ()
9406 if flag_sanitize_undefined_trap_on_error.
9407 (ubsan_instrument_division, ubsan_instrument_shift,
9408 ubsan_instrument_vla): Likewise. Use __ubsan_handle_*_abort ()
9409 if !flag_sanitize_recover.
9411 2014-04-22 Marc Glisse <marc.glisse@inria.fr>
9414 * c-common.c (registered_builtin_types): Make non-static.
9415 * c-common.h (registered_builtin_types): Declare.
9417 2014-04-14 Richard Biener <rguenther@suse.de>
9418 Marc Glisse <marc.glisse@inria.fr>
9421 * c-common.c (convert_vector_to_pointer_for_subscript): Properly
9422 apply may-alias the scalar pointer type when applicable.
9424 2014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
9427 * cilk.c (cilk_set_spawn_marker): Remove FUNCTION_DECL
9428 as possible argument for Cilk_spawn.
9430 2014-04-11 Tobias Burnus <burnus@net-b.de>
9433 * c.opt (Wformat-signedness): Add
9434 * c-format.c(check_format_types): Use it.
9436 2014-04-11 Jason Merrill <jason@redhat.com>
9439 * c-common.c (sync_resolve_size, get_atomic_generic_size): Call
9440 default_conversion for an array argument.
9442 2014-04-08 Marek Polacek <polacek@redhat.com>
9445 * c-ubsan.c: Include asan.h.
9446 (ubsan_instrument_return): Call initialize_sanitizer_builtins.
9448 2014-04-03 Nathan Sidwell <nathan@codesourcery.com>
9450 * c.opt (Wnon-virtual-dtor): Auto set when Weffc++.
9452 2014-04-02 Marek Polacek <polacek@redhat.com>
9454 * c-common.h (c_expand_expr): Remove declaration.
9456 2014-03-28 Jakub Jelinek <jakub@redhat.com>
9459 * c-common.c (add_atomic_size_parameter): When creating new
9460 params vector, push the size argument first.
9462 2014-03-26 Jakub Jelinek <jakub@redhat.com>
9464 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
9465 ubsan_instrument_vla, ubsan_instrument_return): Adjust
9466 ubsan_create_data callers.
9468 2014-03-22 Jakub Jelinek <jakub@redhat.com>
9471 * c-opts.c (c_finish_options): Restore cb_file_change call to
9474 2014-03-13 Jakub Jelinek <jakub@redhat.com>
9477 * c-pragma.c (apply_pragma_weak): Only look at
9478 TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl)) if
9479 DECL_ASSEMBLER_NAME_SET_P (decl).
9480 (maybe_apply_pending_pragma_weaks): Exit early if
9481 vec_safe_is_empty (pending_weaks) rather than only when
9483 (maybe_apply_pragma_weak): Likewise. If !DECL_ASSEMBLER_NAME_SET_P,
9484 set assembler name back to NULL afterwards.
9486 2014-03-11 Jason Merrill <jason@redhat.com>
9488 * c.opt: Add -std=gnu++14.
9490 2014-03-11 Ian Bolton <ian.bolton@arm.com>
9492 * c-opts.c (c_common_post_options): Don't override
9493 -ffp-contract=fast if unsafe-math-optimizations is on.
9495 2014-03-08 Paulo Matos <paulo@matos-sorge.com>
9497 * c.opt: Enable LTO FE for fshort-double.
9499 2014-03-07 Jason Merrill <jason@redhat.com>
9501 * c.opt: Add -std=c++14.
9503 2014-03-06 Marek Polacek <polacek@redhat.com>
9506 * cilk.c (contains_cilk_spawn_stmt): New function.
9507 (contains_cilk_spawn_stmt_walker): Likewise.
9508 (recognize_spawn): Give error on invalid use of _Cilk_spawn.
9509 * c-common.h (contains_cilk_spawn_stmt): Add declaration.
9511 2014-03-03 Jakub Jelinek <jakub@redhat.com>
9513 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_SIMD.
9514 (init_pragma): Call cpp_register_deferred_pragma for PRAGMA_CILK_SIMD
9515 even when flag_preprocess_only.
9517 2014-02-26 Jason Merrill <jason@redhat.com>
9521 * c-common.c (shorten_compare): Don't check
9522 c_inhibit_evaluation_warnings.
9524 2014-02-19 Jakub Jelinek <jakub@redhat.com>
9527 * c-common.c (c_common_nodes_and_builtins): When initializing
9528 c_uint{16,32,64}_type_node, also set corresponding
9529 uint{16,32,64}_type_node to the same value.
9532 * c-pragma.c (init_pragma): Don't call cpp_register_deferred_pragma
9533 for PRAGMA_IVDEP if flag_preprocess_only.
9535 2014-02-12 Jakub Jelinek <jakub@redhat.com>
9538 * c-common.c (merge_tlist): If copy is true, call new_tlist,
9539 if false, add ADD itself, rather than vice versa.
9540 (verify_tree): For COND_EXPR, don't call merge_tlist with non-zero
9541 copy. For SAVE_EXPR, only call merge_tlist once.
9543 2014-02-08 Jakub Jelinek <jakub@redhat.com>
9546 * c-common.c (handle_alloc_size_attribute): Use tree_fits_uhwi_p
9548 (handle_alloc_align_attribute, handle_assume_aligned_attribute): New
9550 (c_common_attribute_table): Add alloc_align and assume_aligned
9553 2014-02-06 Marek Polacek <polacek@redhat.com>
9556 * c-common.c (warn_for_sign_compare): Call warning_at with location
9559 2014-02-05 Marek Polacek <polacek@redhat.com>
9562 * c-omp.c (c_finish_omp_atomic): Remove unreachable return
9565 2014-02-04 Marek Polacek <polacek@redhat.com>
9568 * c-common.c (conversion_warning): Unwrap C_MAYBE_CONST_EXPR and/or
9571 2014-02-03 Marc Glisse <marc.glisse@inria.fr>
9575 * c-common.c (handle_aligned_attribute, handle_alloc_size_attribute,
9576 handle_vector_size_attribute, handle_nonnull_attribute): Call
9577 default_conversion on the attribute argument.
9578 (handle_nonnull_attribute): Increment the argument number.
9580 2014-01-31 Marek Polacek <polacek@redhat.com>
9583 * c-common.c (add_atomic_size_parameter): Pass vNULL to
9584 build_function_call_vec.
9585 (resolve_overloaded_builtin): Likewise.
9586 * c-common.h (build_function_call_vec): Adjust declaration.
9588 2014-01-30 Marek Polacek <polacek@redhat.com>
9591 * c-common.h (unsafe_conversion_p): Adjust declaration.
9592 (warnings_for_convert_and_check): Likewise.
9593 (convert_and_check): Likewise.
9594 * c-common.c (unsafe_conversion_p): Add location parameter. Call
9595 expansion_point_location_if_in_system_header on it.
9596 (warnings_for_convert_and_check): Add location parameter. Call
9597 expansion_point_location_if_in_system_header on it. Use it.
9598 (convert_and_check): Add location parameter. Use it.
9599 (conversion_warning): Likewise.
9600 (c_add_case_label): Adjust convert_and_check calls.
9601 (scalar_to_vector): Adjust unsafe_conversion_p calls.
9603 2014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
9605 * c-common.c (c_define_builtins): Replaced flag_enable_cilkplus with
9607 * c-pragma.c (init_pragma): Likewise.
9610 2014-01-23 Marek Polacek <polacek@redhat.com>
9613 * c-common.c (shorten_compare): Add location_t parameter.
9614 * c-common.h (shorten_binary_op): Adjust declaration.
9616 2014-01-23 Marek Polacek <polacek@redhat.com>
9619 * c-common.c (pointer_to_zero_sized_aggr_p): New function.
9620 * c-common.h: Declare it.
9622 2014-01-20 Eric Botcazou <ebotcazou@adacore.com>
9624 * c-ada-spec.h (dump_ada_specs): Revert prototype change.
9625 * c-ada-spec.c (dump_ads): Likewise.
9626 (cpp_check): Likewise.
9627 (dump_ada_specs): Likewise.
9629 2014-01-15 Laurent Alfonsi <laurent.alfonsi@st.com>
9632 * c-common.c (handle_no_instrument_function_attribute): Allow
9633 no_instrument_function attribute in class member
9634 definition/declaration.
9636 2014-01-15 Jakub Jelinek <jakub@redhat.com>
9639 * c-omp.c (c_finish_omp_atomic): Set in_late_binary_op around
9640 build_modify_expr with non-NOP_EXPR opcode. Handle return from it
9641 being COMPOUND_EXPR.
9642 (c_finish_omp_for): Handle incr being COMPOUND_EXPR with first
9643 operand a SAVE_EXPR and second MODIFY_EXPR.
9645 2014-01-09 Jakub Jelinek <jakub@redhat.com>
9648 * c-pch.c (c_common_write_pch): Call
9649 prepare_target_option_nodes_for_pch.
9651 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
9653 Update copyright years
9655 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
9657 * array-notation-common.c, c-cilkplus.c: Use the standard form for
9658 the copyright notice.
9660 2013-12-28 Eric Botcazou <ebotcazou@adacore.com>
9662 * c-ada-spec.c (print_constructor): New function.
9663 (print_destructor): Retrieve the origin of the destructor.
9664 (print_ada_declaration): Revamp handling of constructors/destructors.
9666 2013-12-23 Stuart Hastings <stuart@apple.com>
9667 Bill Maddox <maddox@google.com>
9668 Jason Merrill <jason@redhat.com>
9670 * c.opt: Add -fdeclone-ctor-dtor.
9671 * c-opts.c (c_common_post_options): Default to on iff -Os.
9673 2013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
9675 * c-common.c (c_common_attribute_table): Added "cilk simd function"
9677 * c-pragma.h (enum pragma_cilk_clause): Remove.
9678 (enum pragma_omp_clause): Added the following fields:
9679 PRAGMA_CILK_CLAUSE_NOMASK, PRAGMA_CILK_CLAUSE_MASK,
9680 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_NONE,
9681 PRAGMA_CILK_CLAUSE_LINEAR, PRAGMA_CILK_CLAUSE_PRIVATE,
9682 PRAGMA_CILK_CLAUSE_FIRSTPRIVATE, PRAGMA_CILK_CLAUSE_LASTPRIVATE,
9683 PRAGMA_CILK_CLAUSE_UNIFORM.
9686 2013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
9688 * cilk.c (cilk_outline): Made this function non-static.
9689 (gimplify_cilk_spawn): Removed pre_p and post_p arguments.
9690 (create_cilk_wrapper): Added a new parameter: a function pointer.
9691 (c_install_body_w_frame_cleanup): Remove
9692 (extract_free_variables): Added VEC_INIT_EXPR and CONSTRUCTOR case.
9693 * c-common.h (cilk_outline): New prototype.
9694 (gimplify_cilk_spawn): Removed two parameters.
9695 (cilk_install_body_with_frame_cleanup): New prototype.
9696 * c-gimplify.c (c_gimplify_expr): Added MODIFY_EXPR, CALL_EXPR and
9697 CILK_SPAWN_STMT case.
9699 2013-12-11 Bernd Schmidt <bernds@codesourcery.com>
9701 * c-common.c (c_fully_fold_internal): Handle ADDR_SPACE_CONVERT_EXPR.
9703 * c-common.h (enum c_tree_index): Remove CTI_INT_ARRAY_TYPE.
9704 (int_array_type_node): Remove.
9705 * c-common.c (c_common_nodes_and_builtins): Don't build it.
9707 2013-12-05 Marek Polacek <polacek@redhat.com>
9710 * c-common.c (c_sizeof_or_alignof_type): Move a declaration into
9711 [ADJUST_FIELD_ALIGN].
9713 2013-12-04 Joseph Myers <joseph@codesourcery.com>
9716 * c-common.c (c_sizeof_or_alignof_type): Add parameter min_alignof
9717 and check field alignment if set.
9718 * c-common.h (c_sizeof_or_alignof_type): Update prototype.
9719 (c_sizeof, c_alignof): Update calls to c_sizeof_or_alignof_type.
9721 2013-12-04 Jakub Jelinek <jakub@redhat.com>
9722 Marek Polacek <polacek@redhat.com>
9724 * c-gimplify.c (c_gimplify_expr): If doing the integer-overflow
9725 sanitization, call unsigned_type_for only when !TYPE_OVERFLOW_WRAPS.
9727 2013-11-29 H.J. Lu <hongjiu.lu@intel.com>
9730 * cilk.c (gimplify_cilk_spawn): Properly handle function without
9733 2013-11-29 Jakub Jelinek <jakub@redhat.com>
9736 * c-common.c (get_priority): If TREE_VALUE (args) is IDENTIFIER_NODE,
9737 goto invalid. If it is error_mark_node, don't issue further
9740 2013-11-28 Sergey Ostanevich <sergos.gnu@gmail.com>
9742 * c.opt (Wopenmp-simd): New.
9744 2013-11-22 Jakub Jelinek <jakub@redhat.com>
9746 * c-ubsan.h (ubsan_instrument_return): New prototype.
9747 * c-ubsan.c (ubsan_instrument_return): New function.
9749 2013-11-22 Andrew MacLeod <amacleod@redhat.com>
9751 * c-common.c: Add required include files from gimple.h.
9752 * c-gimplify.c: Likewise.
9755 2013-11-22 David Malcolm <dmalcolm@redhat.com>
9757 * c-common.c (unsafe_conversion_p): Remove use of
9758 EXPR_LOC_OR_HERE macro.
9759 (conversion_warning): Likewise.
9760 (warnings_for_convert_and_check): Likewise.
9761 (warn_for_collisions_1): Likewise.
9762 (shorten_compare): Likewise, and remove use of in_system_header
9763 macro, using the location from the former.
9764 * c-lex.c (dump_one_header): Remove use of input_filename macro.
9765 (cb_def_pragma): Remove use of in_system_header macro.
9766 (lex_string): Likewise.
9767 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
9769 2013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
9770 Mike Stump <mikestump@comcast.net>
9771 Richard Sandiford <rdsandiford@googlemail.com>
9773 * c-ada-spec.c (is_simple_enum): Use tree_to_shwi and tree_to_uhwi
9774 instead of TREE_INT_CST_LOW, in cases where there is a protecting
9775 tree_fits_shwi_p or tree_fits_uhwi_p.
9776 (dump_generic_ada_node): Likewise.
9777 * c-format.c (check_format_arg): Likewise.
9778 * c-pretty-print.c (pp_c_integer_constant): Likewise.
9780 2013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
9782 * c-common.c (check_function_arguments_recurse): Use tree_to_uhwi.
9784 2013-11-19 Joshua J Cogliati <jrincayc@yahoo.com>
9787 * c-common.c (unsafe_conversion_p): Make this function
9788 return an enumeration with more detail.
9789 (conversion_warning): Use the new return type of
9790 unsafe_conversion_p to separately warn either about conversions
9791 that lower floating point number precision or about the other
9792 kinds of conversions.
9793 * c-common.h (enum conversion_safety): New enumeration.
9794 (unsafe_conversion_p): switching return type to
9795 conversion_safety enumeration.
9796 * c.opt: Adding new warning -Wfloat-conversion and
9797 enabling it with -Wconversion.
9799 2013-11-19 Basile Starynkevitch <basile@starynkevitch.net>
9801 * c-opts.c: Include plugin.h.
9802 (cb_file_change): Invoke plugin event PLUGIN_INCLUDE_FILE.
9804 2013-11-19 Marek Polacek <polacek@redhat.com>
9806 * c-ubsan.c (ubsan_instrument_division): Adjust ubsan_create_data
9808 (ubsan_instrument_shift): Likewise.
9809 (ubsan_instrument_vla): Likewise.
9811 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
9813 * c-common.c (convert_vector_to_pointer_for_subscript): Remove
9814 cast to unsigned type.
9816 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
9818 * c-common.c (fold_offsetof_1): Use tree_to_uhwi rather than
9820 (complete_array_type): Update comment to refer to tree_to_[su]hwi
9821 rather than tree_low_cst.
9823 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
9825 * c-common.c, c-cppbuiltin.c: Replace tree_low_cst (..., 1) with
9826 tree_to_uhwi throughout.
9828 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
9830 * c-common.c, c-format.c, c-omp.c, c-pretty-print.c: Replace
9831 tree_low_cst (..., 0) with tree_to_shwi throughout.
9833 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
9835 * c-ada-spec.c, c-common.c, c-pretty-print.c: Replace
9836 host_integerp (..., 1) with tree_fits_uhwi_p throughout.
9838 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
9840 * c-ada-spec.c, c-common.c, c-format.c, c-pretty-print.c: Replace
9841 host_integerp (..., 0) with tree_fits_shwi_p throughout.
9843 2013-11-15 Aldy Hernandez <aldyh@redhat.com>
9845 * c-cilkplus.c: New file.
9846 * c-common.c (readonly_error): Add location argument.
9847 * c-common.h (readonly_error): Same.
9848 (c_finish_cilk_clauses): Protoize.
9849 (c_check_cilk_loop): Same.
9850 c-omp.c (c_finish_omp_for): Handle CILK_SIMD nodes.
9851 Do not fail on error_mark_node.
9852 Abstract increment canonicalization to here...
9853 (c_omp_for_incr_canonicalize_ptr): New.
9854 c-pragma.c (init_pragma): Register "simd" pragma.
9855 c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_SIMD.
9856 (enum pragma_cilk_clause): New.
9858 2013-11-15 Richard Sandiford <rdsandiford@googlemail.com>
9860 * c-pretty-print.c (pp_c_character_constant): Remove unnecessary
9861 wchar_type and host_integerp checks.
9863 2013-11-14 Andrew MacLeod <amacleod@redhat.com>
9865 * c-common.c: Likewise.
9866 * c-gimplify.c: Likewise.
9869 2013-11-14 Diego Novillo <dnovillo@google.com>
9871 * c-common.c: Include fold-const.h.
9872 Include stor-layout.h.
9874 Include stringpool.h.
9877 Include trans-mem.h.
9878 * c-cppbuiltin.c: Include stor-layout.h.
9879 Include stringpool.h.
9880 * c-format.c: Include stringpool.h.
9881 * c-lex.c: Include stringpool.h.
9882 Include stor-layout.h.
9883 * c-pragma.c: Include stringpool.h.
9886 Include gcc-symtab.h.
9887 * c-pretty-print.c: Include stor-layout.h.
9889 * cilk.c: Include stringpool.h.
9892 2013-11-13 Joseph Myers <joseph@codesourcery.com>
9894 * c-common.h (enum rid): Add RID_AUTO_TYPE.
9895 * c-common.c (c_common_reswords): Add __auto_type.
9896 (keyword_begins_type_specifier): Handle RID_AUTO_TYPE.
9898 2013-11-12 Andrew MacLeod <amacleod@redhat.com>
9900 * c-common.c: Include gimplify.h.
9901 * c-gimplify.c: Likewise.
9903 * c-omp.c: Include gimple-expr.h instead of gimple.h.
9904 * c-ubsan.c: Don't include gimple.h.
9906 2013-11-12 Joseph Myers <joseph@codesourcery.com>
9908 * c-common.c (c_common_reswords): Add _Thread_local.
9910 2013-11-09 Joseph Myers <joseph@codesourcery.com>
9912 * c-common.c (atomic_size_supported_p): New function.
9913 (resolve_overloaded_atomic_exchange)
9914 (resolve_overloaded_atomic_compare_exchange)
9915 (resolve_overloaded_atomic_load, resolve_overloaded_atomic_store):
9916 Use it instead of comparing size with a local list of sizes.
9918 2013-11-07 Andrew MacLeod <amacleod@redhat.com>
9919 Joseph Myers <joseph@codesourcery.com>
9921 * c-common.h (enum rid): Add RID_ATOMIC.
9922 * c-common.c (c_common_reswords): Add _Atomic.
9923 (sync_resolve_params): Use TYPE_MAIN_VARIANT on pointer argument.
9924 (keyword_is_type_qualifier): Accept RID_ATOMIC.
9925 * c-format.c (check_format_types): Check for extra _Atomic
9926 qualifiers in format argument.
9927 * c-pretty-print.c (pp_c_cv_qualifiers): Handle atomic qualifier.
9928 (pp_c_type_qualifier_list): Mention _Atomic in comment.
9930 2013-11-06 Tobias Burnus <burnus@net-b.de>
9932 * c-common.c (reason_option_codes_t): Add CPP_W_DATE_TIME.
9934 2013-11-06 Joseph Myers <joseph@codesourcery.com>
9936 * c-opts.c (c_common_post_options): Set -ffp-contract=off in C
9938 * c-cppbuiltin.c (cpp_iec_559_value): Consider -ffp-contract=fast
9939 to mean lack of IEEE 754 support.
9941 2013-11-05 Tobias Burnus <burnus@net-b.de>
9943 * c.opt (-Wdate-time): New option
9944 * c-opts.c (sanitize_cpp_opts): Pass on to libcpp.
9946 2013-11-05 Joseph Myers <joseph@codesourcery.com>
9948 * c-cppbuiltin.c (cpp_iec_559_value): Test
9949 flag_excess_precision_cmdline not flag_excess_precision.
9951 2013-11-05 Tobias Burnus <burnus@net-b.de>
9953 * c.opt (fopenmp-simd): New option.
9954 * c-pragma.c (omp_pragmas): Move pragmas which can contain simd to ...
9955 (omp_pragmas): ... this new struct.
9956 (c_pp_lookup_pragma): Also walk omp_pragmas.
9957 (init_pragma): Init pragmas for -fopenmp-simd.
9959 2013-11-04 Marek Polacek <polacek@redhat.com>
9962 * c-common.c (invalid_indirection_error): Handle RO_ARROW_STAR case.
9964 2013-11-04 Joseph Myers <joseph@codesourcery.com>
9966 * c-cppbuiltin.c (cpp_iec_559_value, cpp_iec_559_complex_value):
9968 (c_cpp_builtins): Define __GCC_IEC_559 and __GCC_IEC_559_COMPLEX.
9970 2013-11-04 Eric Botcazou <ebotcazou@adacore.com>
9972 * c-ada-spec.h (cpp_operation): Add IS_TRIVIAL.
9973 (dump_ada_specs): Adjust prototype of second callback.
9974 * c-ada-spec.c (cpp_check): New global variable.
9975 (dump_ada_nodes): Remove cpp_check parameter and do not pass it down.
9976 (print_generic_ada_decl): Likewise.
9977 (has_static_fields): Change return type to bool and add guard.
9978 (has_nontrivial_methods): New predicate.
9979 (is_tagged_type): Change return type to bool.
9980 (separate_class_package): Call has_nontrivial_methods.
9981 (pp_ada_tree_identifier): Minor tweaks.
9982 (dump_ada_function_declaration): Adjust calls to dump_generic_ada_node.
9983 (dump_ada_array_domains): Likewise.
9984 (dump_ada_array_type): Likewise.
9985 (dump_template_types): Remove cpp_check parameter and do not pass it to
9986 dump_generic_ada_node.
9987 (dump_ada_template): Likewise.
9988 (dump_generic_ada_node): Remove cpp_check parameter and do not pass it
9990 (print_ada_methods): Change return type to integer. Remove cpp_check
9991 parameter and do not pass it down.
9992 (dump_nested_types): Remove cpp_check parameter and do not pass it to
9993 dump_generic_ada_node.
9994 (print_ada_declaration): Likewise. Test RECORD_OR_UNION_TYPE_P before
9996 (print_ada_struct_decl): Remove cpp_check parameter and do not pass it
9997 down. Use has_nontrivial_methods to recognize C++ classes. Use return
9998 value of print_ada_methods.
9999 (dump_ads): Rename cpp_check parameter to check and adjust prototype.
10000 Set cpp_check to it before invoking dump_ada_nodes.
10001 (dump_ada_specs): Likewise.
10003 2013-11-03 Marek Polacek <polacek@redhat.com>
10005 * c-ubsan.c: Don't include hash-table.h.
10006 (ubsan_instrument_vla): New function.
10007 * c-ubsan.h: Declare it.
10009 2013-10-31 David Malcolm <dmalcolm@redhat.com>
10011 Automated part of renaming of symtab_node_base to symtab_node.
10013 Patch autogenerated by rename_symtab.py from
10014 https://github.com/davidmalcolm/gcc-refactoring-scripts
10015 revision 58bb219cc090b2f4516a9297d868c245495ee622
10017 * c-pragma.c (maybe_apply_pending_pragma_weaks): Rename
10018 symtab_node_base to symtab_node.
10020 2013-10-31 Edward Smith-Rowland <3dw4rd@verizon.net>
10022 Implement C++14 digit separators.
10023 * c-lex.c (interpret_float): Remove digit separators from scratch string
10024 before building real literal.
10026 2013-10-30 Jakub Jelinek <jakub@redhat.com>
10028 * cilk.c (create_cilk_helper_decl): Use HOST_WIDE_INT_PRINT_DEC.
10030 2013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
10032 * c-common.c (c_common_reswords[]): Added _Cilk_spawn and _Cilk_sync
10034 (c_define_builtins): Called cilk_init_builtins if Cilk Plus is
10036 * c-common.h (enum rid): Added RID_CILK_SPAWN and RID_CILK_SYNC.
10037 (insert_cilk_frame): New prototype.
10038 (cilk_init_builtins): Likewise.
10039 (gimplify_cilk_spawn): Likewise.
10040 (c_cilk_install_body_w_frame_cleanup): Likewise.
10041 (cilk_detect_spawn_and_unwrap): Likewise.
10042 (cilk_set_spawn_marker): Likewise.
10043 (build_cilk_sync): Likewise.
10044 (build_cilk_spawn): Likewise.
10045 * cilk.c: New file.
10047 2013-10-29 David Malcolm <dmalcolm@redhat.com>
10049 Patch autogenerated by refactor_symtab.py from
10050 https://github.com/davidmalcolm/gcc-refactoring-scripts
10051 revision 58bb219cc090b2f4516a9297d868c245495ee622
10053 * c-gimplify.c (c_genericize): Update for conversion of symtab types
10054 to a true class hierarchy.
10055 * c-pragma.c (maybe_apply_pending_pragma_weaks): Likewise.
10057 2013-10-27 Richard Sandiford <rdsandiford@googlemail.com>
10059 * c-lex.c (interpret_integer): Remove call to cpp_num_sign_extend.
10061 2013-10-26 Jeff Law <law@redhat.com>
10063 * c-common.c (c_define_builtins): Remove mudflap support.
10064 * c.opt: Ignore and warn for mudflap options.
10066 2013-10-24 Tobias Burnus <burnus@net-b.de>
10069 * c-pragma.c (init_pragma) Add #pragma ivdep handling.
10070 * c-pragma.h (pragma_kind): Add PRAGMA_IVDEP.
10072 2013-10-23 Jason Merrill <jason@redhat.com>
10074 * c-format.c (gcc_cxxdiag_char_table): Add %X.
10076 2013-10-11 Jakub Jelinek <jakub@redhat.com>
10078 * c-common.h (omp_clause_mask::operator !=): New method.
10079 * c-omp.c (c_omp_split_clauses): Use if ((mask & something) != 0)
10080 instead of if (mask & something) tests everywhere.
10082 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP to
10083 201307 instead of 201107.
10084 * c-common.c (DEF_FUNCTION_TYPE_8): Define.
10085 (c_common_attribute_table): Add "omp declare target" and
10086 "omp declare simd" attributes.
10087 (handle_omp_declare_target_attribute,
10088 handle_omp_declare_simd_attribute): New functions.
10089 * c-omp.c: Include c-pragma.h.
10090 (c_finish_omp_taskgroup): New function.
10091 (c_finish_omp_atomic): Add swapped argument, if true,
10092 build the operation first with rhs, lhs arguments and use NOP_EXPR
10094 (c_finish_omp_for): Add code argument, pass it down to make_code.
10095 (c_omp_split_clauses): New function.
10096 (c_split_parallel_clauses): Removed.
10097 (c_omp_declare_simd_clause_cmp, c_omp_declare_simd_clauses_to_numbers,
10098 c_omp_declare_simd_clauses_to_decls): New functions.
10099 * c-common.h (omp_clause_mask): New type.
10100 (OMP_CLAUSE_MASK_1): Define.
10101 (omp_clause_mask::omp_clause_mask, omp_clause_mask::operator &=,
10102 omp_clause_mask::operator |=, omp_clause_mask::operator ~,
10103 omp_clause_mask::operator |, omp_clause_mask::operator &,
10104 omp_clause_mask::operator <<, omp_clause_mask::operator >>,
10105 omp_clause_mask::operator ==): New methods.
10106 (enum c_omp_clause_split): New.
10107 (c_finish_omp_taskgroup): New prototype.
10108 (c_finish_omp_atomic): Add swapped argument.
10109 (c_finish_omp_for): Add code argument.
10110 (c_omp_split_clauses): New prototype.
10111 (c_split_parallel_clauses): Removed.
10112 (c_omp_declare_simd_clauses_to_numbers,
10113 c_omp_declare_simd_clauses_to_decls): New prototypes.
10114 * c-pragma.c (omp_pragmas): Add new OpenMP 4.0 constructs.
10115 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_CANCEL,
10116 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_DECLARE_REDUCTION,
10117 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_SIMD,
10118 PRAGMA_OMP_TARGET, PRAGMA_OMP_TASKGROUP and PRAGMA_OMP_TEAMS.
10119 Remove PRAGMA_OMP_PARALLEL_FOR and PRAGMA_OMP_PARALLEL_SECTIONS.
10120 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ALIGNED,
10121 PRAGMA_OMP_CLAUSE_DEPEND, PRAGMA_OMP_CLAUSE_DEVICE,
10122 PRAGMA_OMP_CLAUSE_DIST_SCHEDULE, PRAGMA_OMP_CLAUSE_FOR,
10123 PRAGMA_OMP_CLAUSE_FROM, PRAGMA_OMP_CLAUSE_INBRANCH,
10124 PRAGMA_OMP_CLAUSE_LINEAR, PRAGMA_OMP_CLAUSE_MAP,
10125 PRAGMA_OMP_CLAUSE_NOTINBRANCH, PRAGMA_OMP_CLAUSE_NUM_TEAMS,
10126 PRAGMA_OMP_CLAUSE_PARALLEL, PRAGMA_OMP_CLAUSE_PROC_BIND,
10127 PRAGMA_OMP_CLAUSE_SAFELEN, PRAGMA_OMP_CLAUSE_SECTIONS,
10128 PRAGMA_OMP_CLAUSE_SIMDLEN, PRAGMA_OMP_CLAUSE_TASKGROUP,
10129 PRAGMA_OMP_CLAUSE_THREAD_LIMIT, PRAGMA_OMP_CLAUSE_TO and
10130 PRAGMA_OMP_CLAUSE_UNIFORM.
10132 2013-10-09 Marc Glisse <marc.glisse@inria.fr>
10134 PR tree-optimization/20318
10135 * c-common.c (handle_returns_nonnull_attribute): New function.
10136 (c_common_attribute_table): Add returns_nonnull.
10138 2013-10-03 Marc Glisse <marc.glisse@inria.fr>
10141 * c.opt (fcheck-new): Move to common.opt.
10143 2013-09-25 Marek Polacek <polacek@redhat.com>
10144 Jakub Jelinek <jakub@redhat.com>
10147 * c-ubsan.c (ubsan_instrument_shift): Don't instrument
10148 an expression if we can prove it is correct.
10149 (ubsan_instrument_division): Likewise. Remove unnecessary
10152 2013-09-18 Marek Polacek <polacek@redhat.com>
10155 * c-common.c (handle_no_sanitize_undefined_attribute): New function.
10157 (struct attribute_spec c_common_att): Add no_sanitize_undefined.
10159 2013-09-14 Iain Sandoe <iain@codesourcery.com>
10162 * c.opt (fgnu-runtime, fnext-runtime, fobjc-abi-version,
10163 fobjc-gc, freplace-objc-classes): Accept for LTO.
10165 2013-09-13 Jacek Caban <jacek@codeweavers.com>
10167 * c-target.def: New hook
10169 2013-09-09 Paolo Carlini <paolo.carlini@oracle.com>
10172 * c.opt (Wdelete-incomplete): Add.
10174 2013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
10176 * c-common.c (same_scalar_type_ignoring_signedness): Delete.
10177 (vector_types_compatible_elements_p): New function.
10178 * c-common.h: (same_scalar_type_ignoring_signedness): Delete
10180 (vector_types_compatible_elements_p): Declare.
10182 2013-09-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
10184 * c-pretty-print.h (c_pretty_printer::simple_type_specifier): Now
10185 a virtual member function.
10186 (pp_simple_type_specifier): Remove.
10187 (pp_c_type_specifier): Likewise.
10188 * c-pretty-print.c (c_pretty_printer::simple_type_specifier):
10189 Rename from pp_c_type_specifier. Adjust.
10190 (c_pretty_printer::c_pretty_printer): Do not assign to
10191 simple_type_specifier.
10193 2013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
10195 * c-pretty-print.h (c_pretty_printer::type_id): Now a virtual
10197 (c_pretty_printer::storage_class_specifier): Likewise.
10198 (c_pretty_printer::initializer): Likewise.
10199 (pp_declaration): Remove.
10200 (pp_declaration_specifiers): Likewise.
10201 (pp_abstract_declarator): Likewise.
10202 (pp_declarator): Likewise.
10203 (pp_type_id): Likewise.
10204 (pp_statement): Likewise.
10205 (pp_constant): Likewise.
10206 (pp_id_expression): Likewise.
10207 (pp_primary_expression): Likewise.
10208 (pp_unary_expression): Likewise.
10209 (pp_multiplicative_expression): Likewise.
10210 (pp_conditional_expression): Likewise.
10211 (pp_assignment_expression): Likewise.
10212 (pp_expression): Likewise.
10213 (pp_c_type_id): Likewise.
10214 (pp_c_storage_class_specifier): Likewise.
10215 * c-pretty-print.c (pp_c_type_cast): Tidy.
10216 (pp_c_pointer): Likewise.
10217 (pp_c_type_specifier): Likewise.
10218 (pp_c_parameter_type_list): Likewise.
10219 (pp_c_function_definition): Likewise.
10220 (pp_c_init_declarator): Likewise.
10221 (pp_c_initializer_list): Likewise.
10222 (pp_c_constructor_elts): Likewise.
10223 (c_pretty_printer::direct_abstract_declarator): Likewise.
10224 (c_pretty_printer::declaration_specifiers): Likewise.
10225 (c_pretty_printer::primary_expression): Likewise.
10226 (c_pretty_printer::postfix_expression): Likewise.
10227 (c_pretty_printer::type_id): Rename from pp_c_type_id.
10228 (c_pretty_printer::storage_class_specifier): Rename from
10229 pp_c_storage_class_specifier.
10230 (c_pretty_printer::initializer): Rename from pp_c_initializer.
10231 (c_pretty_printer::c_pretty_printer): Do not assign to type_id,
10232 storage_class_specifier, initializer, offset_list, flags.
10234 2013-08-30 Marek Polacek <polacek@redhat.com>
10236 * c-ubsan.c: New file.
10237 * c-ubsan.h: New file.
10239 2013-08-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
10241 * c-pretty-print.h (c_pretty_printer::declaration): Now a virtual
10243 (c_pretty_printer::declaration_specifiers): Likewise.
10244 (c_pretty_printer::declarator): Likewise.
10245 (c_pretty_printer::abstract_declarator): Likewise.
10246 (c_pretty_printer::direct_abstract_declarator): Likewise.
10247 (c_pretty_printer::direct_declarator): Likewise.
10248 (c_pretty_printer::function_specifier): Likewise.
10249 (pp_declaration): Adjust.
10250 (pp_declaration_specifiers): Likewise.
10251 (pp_abstract_declarator): Likewise.
10252 (pp_direct_declarator): Likewise.
10253 (pp_function_specifier): Likewise.
10254 (pp_direct_abstract_declarator): Remove as unused.
10255 (pp_c_declaration): Remove.
10256 (pp_c_declaration_specifiers): Likewise.
10257 (pp_c_declarator): Likewise.
10258 (pp_c_direct_declarator): Likewise.
10259 (pp_c_function_specifier): Likewise.
10260 (pp_c_direct_abstract_declarator): Likewise.
10261 * c-pretty-print.c (c_pretty_printer::abstract_declarator): Rename
10262 from pp_c_abstract_declarator. Adjust.
10263 (c_pretty_printer::direct_abstract_declarator): Rename from
10264 pp_c_direct_abstract_declarator. Adjust.
10265 (c_pretty_printer::function_specifier): Rename from
10266 pp_c_function_specifier. Adjust.
10267 (c_pretty_printer::declaration_specifiers): Rename from
10268 pp_c_declaration_specifiers. Adjust.
10269 (c_pretty_printer::direct_declarator): Rename from
10270 pp_c_direct_declarator. Adjust.
10271 (c_pretty_printer::declarator): Rename from pp_c_declarator. Adjust.
10272 (c_pretty_printer::declaration): Rename from pp_c_declaration. Adjust.
10273 (c_pretty_printer::c_pretty_printer): Do not assign to
10274 declaration, declaration_specifiers, declarator,
10275 direct_declarator, direct_abstract_declarator, function_specifier.
10277 2013-08-26 Gabriel Dos Reis <gdre@integrable-solutions.net>
10279 * c-pretty-print.h (c_pretty_printer::unary_expression): Now a
10280 virtual member function.
10281 (c_pretty_printer::multiplicative_expression): Likewise.
10282 (c_pretty_printer::conditional_expression): Likewise.
10283 (c_pretty_printer::assignment_expression): Likewise.
10284 (c_pretty_printer::expression): Likewise.
10285 (pp_unary_expression): Adjust.
10286 (pp_multiplicative_expression): Likewise.
10287 (pp_assignment_expression): Likewise.
10288 (pp_conditional_expression): Likewise.
10289 (pp_expression): Likewise.
10290 * c-pretty-print.c (c_pretty_printer::unary_expression): Rename
10291 from pp_c_unary_expression. Adjust.
10292 (c_pretty_printer::multiplicative_expression): Rename from
10293 pp_c_multiplicative_expression. Adjust.
10294 (c_pretty_printer::conditional_expression): Rename from
10295 pp_c_conditional_expression. Adjust.
10296 (c_pretty_printer::assignment_expression): Rename from
10297 pp_c_assignment_expression. Adjust.
10298 (c_pretty_printer::expression): Rename from pp_c_expression. Adjust.
10299 (c_pretty_printer::c_pretty_printer): Do not assign to
10300 unary_expression, multiplicative_expression,
10301 conditional_expression, expression.
10303 2013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
10305 * c-pretty-print.h (c_pretty_printer::postfix_expression): Now a
10306 virtual member function.
10307 (pp_postfix_expression): Adjust.
10308 (pp_c_postfix_expression): Remove.
10309 * c-pretty-print.c (c_pretty_printer::postfix_expression): Rename
10310 from pp_c_postfix_expression. Adjust.
10311 (c_pretty_printer::c_pretty_printer): Do not assign to
10312 postfix_expression.
10314 2013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
10316 * c-pretty-print.h (c_pretty_printer::primary_expression): Now a
10317 virtua member function.
10318 (pp_primary_expression): Adjust.
10319 (pp_c_primary_expression): Remove.
10320 * c-pretty-print.c (c_pretty_printer::primary_expression): Rename
10321 from pp_c_primary_expression. Adjust.
10322 (pp_c_initializer_list): Use pp_primary_expression.
10323 (c_pretty_printer::c_pretty_printer): Do not assign to
10324 primary_expression.
10326 2013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
10328 * c-pretty-print.h (c_pretty_printer::translate_string): Declare.
10329 * c-pretty-print.c (M_): Remove.
10330 (c_pretty_printer::translate_string): Define.
10331 (pp_c_type_specifier): Use it.
10332 (pp_c_primary_expression): Likewise.
10333 (pp_c_expression): Likewise.
10335 2013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
10337 * c-pretty-print.h (c_pretty_printer::id_expression): Now a
10339 (pp_c_id_expression): Remove.
10340 (pp_id_expression): Adjust.
10341 * c-pretty-print.c (c_pretty_printer::id_expression): Rename from
10342 pp_c_id_expression. Adjust.
10343 (pp_c_postfix_expression): Use pp_id_expression.
10344 (c_pretty_printer::c_pretty_printer): Do not assign to id_expression.
10346 2013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
10348 * c-pretty-print.h (c_pretty_printer::constant): Now a virtual
10350 (pp_constant): Adjust.
10351 (pp_c_constant): Remove.
10352 * c-pretty-print.c (c_pretty_printer::constant): Rename from
10353 pp_c_constant. Adjust.
10355 (pp_c_primary_expression): Call pp_constant in lieu of pp_c_constant.
10356 (c_pretty_printer::c_pretty_printer): Remove assignment to constant.
10358 2013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
10360 * c-pretty-print.h (pp_c_pretty_printer_init): Remove.
10361 (c_pretty_printer::c_pretty_printer): Declare.
10362 * c-pretty-print.c (pretty_printer::c_pretty_printer): Rename from
10363 c_pretty_printer_init. Adjust.
10364 (print_c_tree): Do not call c_pretty_printer_init.
10365 * c-ada-spec.c (dump_ads): Remove call to pp_construct.
10367 2013-08-09 Arnaud Charlet <charlet@adacore.com>
10369 * c-ada-spec.c (print_ada_declaration): Prevent accessing null asm name
10371 2013-08-05 Paolo Carlini <paolo.carlini@oracle.com>
10374 * c-common.c (pointer_int_sum): Add bool parameter.
10375 * c-common.h (pointer_int_sum): Adjust declaration.
10377 2013-08-05 Gabriel Dos Reis <gdr@integrable-solutions.net>
10379 * c-pretty-print.c (print_c_tree): Simplify. Use non-static local
10380 c_pretty_printer variable.
10382 2013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
10384 * c-pretty-print.h (c_pretty_printer): Derive from pretty_printer.
10386 (pp_c_base): Likewise. Adjust users.
10387 * c-pretty-print.c (pp_c_maybe_whitespace): Adjust.
10388 (pp_c_whitespace): Do not call pp_base.
10389 (pp_c_left_paren): Likewise.
10390 (pp_c_right_paren): Likewise.
10391 (pp_c_left_brace): Likewise.
10392 (pp_c_right_brace): Likewise.
10393 (pp_c_left_bracket): Likewise.
10394 (pp_c_right_bracket): Likewise.
10395 (pp_c_dot): Likewise.
10396 (pp_c_ampersand): Likewise.
10397 (pp_c_star): Likewise.
10398 (pp_c_arrow): Likewise.
10399 (pp_c_semicolon): Likewise.
10400 (pp_c_complement): Likewise.
10401 (pp_c_exclamation): Likewise.
10402 (pp_c_direct_declarator): Likewise.
10403 (pp_c_ws_string): Likewise.
10404 (pp_c_identifier): Likewise.
10405 (pp_c_statement): Likewise.
10406 (print_c_tree): Likewise.
10408 2013-08-04 Ed Smith-Rowland <3dw4rd@verizon.net>
10411 * c-common.c (c_parse_error): Catch user-defined literal tokens and
10412 provide useful error strings.
10414 2013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
10416 * c-ada-spec.c (pp_ada_tree_identifier): Use specialized pretty
10417 printer functions instead of pp_string or operators and punctuators.
10418 (dump_generic_ada_node): Likewise.
10419 * c-pretty-print.c (pp_c_type_specifier): Likewise.
10420 (pp_c_relational_expression): Likewise.
10421 (pp_c_logical_or_expression): Likewise.
10423 2013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
10425 * c-ada-spec.c (print_ada_macros): Use specialized pretty printer
10426 functions instead of pp_character.
10427 (pp_ada_tree_identifier): Likewise.
10428 (dump_ada_double_name): Likewise.
10429 (dump_ada_function_declaration): Likewise.
10430 (dump_ada_array_domains): Likewise.
10431 (dump_template_types): Likewise.
10432 (dump_generic_ada_node): Likewise.
10433 (print_ada_declaration): Likewise.
10434 (print_ada_struct_decl): Likewise.
10435 * c-pretty-print.c (pp_c_integer_constant): Likewise.
10437 2013-07-23 Tom Tromey <tromey@redhat.com>
10439 * c-common.h (enum rid) <RID_GENERIC>: New constant.
10440 * c-common.c (c_common_reswords): Add _Generic.
10442 2013-07-21 OndÅ
\99ej BÃlka <neleai@seznam.cz>
10444 * c-common.c: Fix typos.
10445 * c-common.h: Likewise.
10447 2013-07-13 Lubos Lunak <l.lunak@suse.cz>
10450 * c-common.c (c_common_attribute_table): Add warn_unused.
10451 (handle_warn_unused_attribute): New.
10453 2013-07-10 Jakub Jelinek <jakub@redhat.com>
10455 * c-ppoutput.c (scan_translation_unit): Call account_for_newlines
10456 for all CPP_TOKEN_FLD_STR tokens, not just CPP_COMMENT.
10458 2013-07-10 Paolo Carlini <paolo.carlini@oracle.com>
10461 * c.opt: Add Wconditionally-supported.
10463 2013-07-08 Graham Stott <graham.stott@btinternet.com>
10465 * array-notation-common.c (length_mismatch_in_expr_p): Delete
10466 unused variables l_length and l_node.
10468 2013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
10471 * c-common.c (complete_array_type): Delay folding first index
10472 like other indices. When folding, check for index overflow.
10474 2013-06-27 Marc Glisse <marc.glisse@inria.fr>
10477 * c-common.h (c_build_vec_perm_expr): New complain argument.
10478 * c-common.c (c_build_vec_perm_expr): Likewise.
10479 Use save_expr also in C++.
10481 2013-06-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
10483 * c-common.c (c_common_nodes_and_builtins): Use cxx11 in lieu of cxx0x.
10484 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
10485 * c-opts.c (c_common_post_options): Likewise.
10487 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
10489 * array-notation-common.c (length_mismatch_in_expr): Changed the
10490 parameter type's from a dynamic array to a vec_tree. Also removed
10491 the size parameters.
10492 * c-common.h (length_mismatch_in_expr_p): Fixed prototype's as per
10495 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
10497 * c-common.h (struct cilkplus_an_parts): New structure.
10498 (struct cilkplus_an_loop_parts): Likewise.
10499 (cilkplus_extract_an_triplets): New prototype.
10500 (fix_sec_implicit_args): Likewise.
10501 * array-notation-common.c (cilkplus_extract_an_triplets): New function.
10502 (fix_sec_implicit_args): Likewise.
10504 2013-06-20 Balaji V. Iyer <balaji.v.iyer@intel.com>
10506 * array-notation-common.c (find_inv_trees): Removed an unwanted
10508 * c-common.h (struct inv_list::additional_tcodes): Changed type from
10509 enum rid to enum tree_code.
10511 2013-06-11 Jan Hubicka <jh@suse.cz>
10513 * c-common.c (handle_alias_ifunc_attribute): Do not set
10514 DECL_EXTERNAL for weakref variables.
10515 * c-pragma.c (handle_pragma_weak): Make sure aliases
10516 are not declared as external.
10518 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
10520 * array-notation-common.c (length_mismatch_in_expr_p): Moved this
10521 function from c/c-array-notation.c.
10522 (is_cilkplus_reduce_builtin): Likewise.
10523 (find_rank): Likewise.
10524 (extract_array_notation_exprs): Likewise.
10525 (replace_array_notations): Likewise.
10526 (find_inv_trees): Likewise.
10527 (replace_inv_trees): Likewise.
10528 (contains_array_notation_expr): Likewise.
10529 (find_correct_array_notation_type): Likewise.
10530 * c-common.h (struct inv_list): Moved this struct from the file
10531 c/c-array-notation.c and added a new field called additional tcodes.
10532 (length_mismatch_in_expr_p): New prototype.
10533 (is_cilkplus_reduce_builtin): Likewise.
10534 (find_rank): Likewise.
10535 (extract_array_notation_exprs): Likewise.
10536 (replace_array_notation): Likewise.
10537 (find_inv_trees): Likewise.
10538 (replace_inv_trees): Likewise.
10539 (find_correct_array_notation_type): Likewise.
10541 2013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
10543 * c-common.c (c_define_builtins): When cilkplus is enabled, the
10544 function array_notation_init_builtins is called.
10545 (c_common_init_ts): Added ARRAY_NOTATION_REF as typed.
10546 * c-common.def (ARRAY_NOTATION_REF): New tree.
10547 * c-common.h (build_array_notation_expr): New function declaration.
10548 (build_array_notation_ref): Likewise.
10549 (extract_sec_implicit_index_arg): New extern declaration.
10550 (is_sec_implicit_index_fn): Likewise.
10551 (ARRAY_NOTATION_CHECK): New define.
10552 (ARRAY_NOTATION_ARRAY): Likewise.
10553 (ARRAY_NOTATION_START): Likewise.
10554 (ARRAY_NOTATION_LENGTH): Likewise.
10555 (ARRAY_NOTATION_STRIDE): Likewise.
10556 * c-pretty-print.c (pp_c_postifix_expression): Added a new case for
10557 ARRAY_NOTATION_REF.
10558 (pp_c_expression): Likewise.
10559 * c.opt (flag_enable_cilkplus): New flag.
10560 * array-notation-common.c: New file.
10562 2013-05-14 Jakub Jelinek <jakub@redhat.com>
10565 * c-common.c (verify_tree): Don't recurse into SIZEOF_EXPR.
10567 2013-05-10 Marc Glisse <marc.glisse@inria.fr>
10569 * c-common.c (vector_types_convertible_p): No TYPE_PRECISION for
10572 2013-05-07 Han Shen <shenhan@google.com>
10574 * c-cppbuiltin.c (c_cpp_builtins): Added "__SSP_STRONG__=3".
10576 2013-04-29 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
10578 * c-common.c (check_user_alignment): Emit error for negative values.
10580 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
10582 * c-opts.c (set_std_cxx11): Use CLK_CXX1Y and CLK_GNUCXX1Y.
10584 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
10586 * c-cppbuiltin.c (c_cpp_builtins): Do not define
10587 __GXX_EXPERIMENTAL_CXX1Y__.
10589 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
10590 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
10592 * c.opt ([Wpointer-arith]): Enabled by -Wpedantic, as documented.
10593 * c-common.c (pointer_int_sum): Change -Wpointer-arith pedwarns
10594 to simply use OPT_Wpointer_arith.
10595 (c_sizeof_or_alignof_type): Likewise.
10597 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
10599 * c-cppbuiltin.c (c_cpp_builtins): Define __GXX_EXPERIMENTAL_CXX1Y__.
10601 2013-04-12 Jakub Jelinek <jakub@redhat.com>
10603 * c-format.c (gcc_diag_char_table, gcc_tdiag_char_table,
10604 gcc_cdiag_char_table, gcc_cxxdiag_char_table): Add %r and %R format
10607 2013-04-07 Steven Bosscher <steven@gcc.gnu.org>
10609 * c-pragma.c (add_to_renaming_pragma_list): Fix leading comment.
10611 2013-04-03 Paolo Carlini <paolo.carlini@oracle.com>
10613 * c-common.c (pointer_int_sum): Remove dead code.
10615 2013-03-09 Richard Sandiford <rdsandiford@googlemail.com>
10617 PR middle-end/56524
10618 * c-common.c (handle_optimize_attribute): Don't call
10619 save_optabs_if_changed.
10621 2013-03-05 Jakub Jelinek <jakub@redhat.com>
10623 PR middle-end/56461
10624 * c-pch.c (pch_init): Free target_validity at the end.
10626 2013-03-04 Jakub Jelinek <jakub@redhat.com>
10628 * c-pretty-print.c (pp_c_pretty_printer_init): Clear pp->flags.
10630 2013-02-28 Konstantin Serebryany <konstantin.s.serebryany@gmail.com>
10631 Jakub Jelinek <jakub@redhat.com>
10634 * c-common.c (handle_no_sanitize_address_attribute): New function.
10635 (c_common_attribute_table): Add no_sanitize_address attribute.
10636 (handle_no_address_safety_analysis_attribute): Add
10637 no_sanitize_address attribute, not no_address_safety_analysis
10640 2013-02-18 Aldy Hernandez <aldyh@redhat.com>
10643 * c-common.c (handle_optimize_attribute): Call
10644 save_optabs_if_changed.
10646 2013-02-18 Jakub Jelinek <jakub@redhat.com>
10647 Steven Bosscher <steven@gcc.gnu.org>
10650 * c-opts.c (c_common_post_options): If debug info is enabled
10651 and non-dwarf*, refuse to load PCH files and when writing PCH
10654 2013-02-05 Jakub Jelinek <jakub@redhat.com>
10656 PR middle-end/56167
10657 * c-common.c (handle_error_attribute): Fix condition.
10659 2013-01-30 Jakub Jelinek <jakub@redhat.com>
10662 * c-common.c (handle_target_attribute): Revert 2012-12-26 change.
10664 2013-01-18 Jason Merrill <jason@redhat.com>
10667 * c.opt (-fextern-tls-init): New.
10668 * c-opts.c (c_common_post_options): Handle it.
10670 2013-01-09 Jakub Jelinek <jakub@redhat.com>
10673 * c-common.c (c_fully_fold_internal): Warn for LSHIFT_EXPR and
10674 RSHIFT_EXPR, if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST
10675 and is either negative or bigger or equal to type precision
10676 of the first operand.
10678 2012-12-03 Marek Polacek <polacek@redhat.com>
10681 * c-common.c (check_user_alignment): Swap order of tests,
10682 check TREE_CODE first.
10684 2012-11-29 Ed Smith-Rowland <3dw4rd@verizon.net>
10687 * c-common.h (overflow_type): New enum.
10688 (build_userdef_literal): Add overflow_type argument.
10689 (tree_userdef_literal): Add overflow_type.
10690 (USERDEF_LITERAL_OVERFLOW): New access macro.
10691 * c-common.c (build_userdef_literal): Add overflow_type
10693 * c-lex.c (c_lex_with_flags): Add overflow_type to
10694 build_userdef_literal calls.
10695 (interpret_integer, interpret_float): Add overflow_type argument.
10697 2012-11-28 Richard Biener <rguenther@suse.de>
10700 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
10701 here and use a type with proper overflow behavior for types that would
10702 need to be promoted for the arithmetic.
10704 2012-11-23 Jakub Jelinek <jakub@redhat.com>
10707 * c-common.c (handle_no_address_safety_analysis_attribute): New
10709 (c_common_attribute_table): Add no_address_safety_analysis.
10711 2012-11-16 Simon Baldwin <simonb@google.com>
10713 * c.opt: Add f[no-]canonical-system-headers.
10714 * c-opts.c (c_common_handle_option): Handle
10715 OPT_fcanonical_system_headers.
10717 2012-11-09 Ed Smith-Rowland <3dw4rd@verizon.net>
10720 * c-opts.c (c_common_handle_option): Set new flags.
10721 * c.opt: Describe new flags.
10723 2012-11-09 Jason Merrill <jason@redhat.com>
10725 * c.opt (Wabi-tag): New.
10727 2012-11-09 Andi Kleen <ak@linux.intel.com>
10730 * c-common.c (get_atomic_generic_size): Mask with
10733 2012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
10736 * c.opt (Wformat): Make it Alias Wformat=1.
10737 (Wformat-contains-nul,Wformat-extra-args,Wformat-nonliteral,
10738 Wformat-security,Wformat-y2k,Wformat-zero-length): Use
10740 (Wformat=): RejectNegative. Use LangEnabledBy.
10741 (Wnonnull): Use LangEnabledBy.
10742 * c-opts.c (c_common_handle_option): Do not handle Wformat here.
10743 * c-format.c (set_Wformat): Delete.
10744 (decode_format_attr): Replace OPT_Wformat with OPT_Wformat_.
10745 (maybe_read_dollar_number): Likewise.
10746 (avoid_dollar_number): Likewise.
10747 (finish_dollar_format_checking): Likewise.
10748 (check_format_info): Likewise.
10749 (check_format_info_main): Likewise.
10750 (check_format_types): Likewise.
10751 (format_type_warning): Likewise.
10752 * c-common.c (int): Likewise.
10753 (check_function_sentinel): Likewise.
10754 * c-common.h (warn_format,set_Wformat): Do not declare here.
10756 2012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
10759 * c.opt(Warray-bounds,Wdelete-non-virtual-dtor,Wenum-compare,
10760 Wmain,Woverlength-strings, Wunknown-pragmas,Wunused-macros):
10762 (Wswitch,Wswitch-default,Wswitch-enum): Likewise. Move here from
10764 (Wvariadic-macros): Init(1).
10765 * c-opts.c (c_common_handle_option): Do not handle them
10767 (c_common_post_options): Likewise.
10768 (sanitize_cpp_opts): warn_unused_macros is now
10769 cpp_warn_unused_macros.
10770 (push_command_line_include): Likewise.
10771 * c-common.c (warn_unknown_pragmas): Do not define.
10772 * c-common.h (warn_unknown_pragmas): Do not declare.
10774 2012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
10777 * c-common.c (conversion_warning): Handle conditional expressions.
10779 2012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
10782 * c.opt (Wreturn_local_addr): Define new option.
10784 2012-10-25 Jason Merrill <jason@redhat.com>
10786 * c.opt (Wvirtual-move-assign): New.
10788 * c.opt (Winherited-variadic-ctor): New.
10790 2012-10-25 Marc Glisse <marc.glisse@inria.fr>
10793 * c-common.c (scalar_to_vector): Handle VEC_COND_EXPR.
10795 2012-10-23 Joseph Myers <joseph@codesourcery.com>
10797 * c-common.h (pch_cpp_save_state): Declare.
10798 * c-target.def (c_preinclude): New hook.
10799 * c-opts.c (done_preinclude): New.
10800 (push_command_line_include): Handle default preincluded header.
10801 (cb_file_change): Call pch_cpp_save_state when calling
10802 push_command_line_include.
10803 * c-pch.c (pch_ready_to_save_cpp_state, pch_cpp_state_saved)
10804 (pch_cpp_save_state): New.
10805 (pch_init): Call pch_cpp_save_state conditionally, instead of
10806 calling cpp_save_state.
10808 2012-10-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
10812 * c.opt (Waddress,Wchar-subscripts,Wsign-conversion,Wimplicit,
10813 Wimplicit-function-declaration,Wimplicit-int,Wsizeof-pointer-memaccess,
10814 Wnarrowing,Wparentheses,Wpointer-sign,Wreturn-type,Wsequence-point,
10815 Wsign-compare,Wuninitialized,Wmaybe-uninitialized,Wunused,
10816 Wvolatile-register-var): Add LangEnabledBy or EnabledBy.
10817 * c-opts.c (c_common_handle_option): Remove explicit handling from
10819 (c_common_post_options): Likewise.
10821 2012-10-18 Eric Botcazou <ebotcazou@adacore.com>
10823 * c-ada-spec.c (LOCATION_COL): Delete.
10824 (compare_location): New function.
10825 (compare_node): Use it.
10826 (compare_comment): Likewise.
10828 2012-10-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
10832 * c.opt (Wstrict-aliasing=,Wstrict-overflow=): Use LangEnabledBy.
10833 * c-opts.c (c_common_handle_option): Do not set them here. Add
10835 (c_common_post_options): Likewise.
10837 2012-10-16 Eric Botcazou <ebotcazou@adacore.com>
10839 * c-ada-spec.c (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Define.
10840 (dump_generic_ada_node) <INTEGER_CST>: Deal with sizetype specially.
10841 Remove POINTER_TYPE handling, add large unsigned handling and use
10842 ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX for big numbers.
10844 2012-10-12 Jakub Jelinek <jakub@redhat.com>
10847 * c-common.h (sizeof_pointer_memaccess_warning): Adjust prototype.
10848 * c-common.c (sizeof_pointer_memaccess_warning): Take array of 3
10849 locs and array of 3 trees instead of just single loc and single
10850 sizeof_arg tree. Handle __builtin___*_chk builtins too, and
10851 also stpncpy, bcopy, bcmp, bzero, snprintf and vsnprintf builtins.
10852 For *cmp* builtins that take two sources strings report warnings
10853 about first and second source, not about destination and source.
10855 2012-10-12 Marc Glisse <marc.glisse@inria.fr>
10858 * c-common.h (enum ref_operator) [RO_ARROW_STAR]: New.
10860 2012-10-11 Eric Botcazou <ebotcazou@adacore.com>
10862 * c-ada-spec.c (dump_ada_template): Bail out for template declarations
10863 declaring something coming from another file.
10865 2012-10-10 Arnaud Charlet <charlet@adacore.com>
10868 * c-ada-spec.c (print_ada_struct_decl): Increase buf size.
10870 2012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
10873 * c-common.c (warn_about_parentheses): Add location_t parameter;
10874 use EXPR_LOC_OR_LOC.
10875 * c-common.h: Update declaration.
10877 2012-10-09 Marc Glisse <marc.glisse@inria.fr>
10880 * c-common.c (scalar_to_vector): Moved from c-typeck.c. Support
10881 more operations. Make error messages optional.
10882 * c-common.h (enum stv_conv): Moved from c-typeck.c.
10883 (scalar_to_vector): Declare.
10885 2012-10-08 Jason Merrill <jason@redhat.com>
10887 * c-common.c (c_common_reswords): Add thread_local.
10889 2012-10-08 Dodji Seketeli <dodji@redhat.com>
10891 PR c++/53528 C++11 attribute support
10892 * c-common.h (bitfield_p, cxx_fundamental_alignment_p): Declare
10894 * c-common.c (check_cxx_fundamental_alignment_constraints): New
10896 (handle_aligned_attribute): In choose strictest alignment
10897 among many. Use new check_cxx_fundamental_alignment_constraints.
10898 (handle_transparent_union_attribute): In c++11 attribute syntax,
10899 don't look through typedefs.
10901 2012-10-04 Arnaud Charlet <charlet@adacore.com>
10903 * c-ada-spec.c (print_ada_declaration): Remove handling of TDF_RAW.
10904 * c.opt (-fdump-ada-spec, -fdump-ada-spec-slim): Move switch definition
10907 2012-09-25 Dehao Chen <dehao@google.com>
10909 PR middle-end/54645
10910 * c-pch.c (c_common_read_pch): Rebuild the location_adhoc_data
10911 map when read in the pch.
10913 2012-09-18 Arnaud Charlet <charlet@adacore.com>
10915 * c-ada-spec.c: Style fixes.
10917 2012-09-18 Thomas Quinot <quinot@adacore.com>
10919 * c.opt (-fada-spec-parent): Define new command line switch.
10920 * c-ada-spec.c (get_ada_package): When -fada-spec-parent
10921 is specified, generate binding spec as a child of the specified unit.
10923 2012-09-13 Paolo Carlini <paolo.carlini@oracle.com>
10924 Manuel López-Ibáñez <manu@gcc.gnu.org>
10927 * c.opt ([Winit-self]): Enabled by -Wall in C++.
10929 2012-08-23 Arnaud Charlet <charlet@adacore.com>
10931 * c-ada-spec.c (dump_generic_ada_node): Fix handling of name_only
10932 for pointers, and add missing Convention C pragma.
10933 (print_ada_struct_decl): Add missing aliased keyword.
10934 (dump_ads): Add pragma Ada_2005 and Style_Checks (Off).
10936 2012-08-17 Jakub Jelinek <jakub@redhat.com>
10938 * c-common.c (sizeof_pointer_memaccess_warning): New function.
10939 * c.opt (-Wsizeof-pointer-memaccess): Add new option.
10940 * c-opts.c (c_common_handle_option): Enable it for -Wall.
10941 * c-common.h (sizeof_pointer_memaccess_warning): Add prototype.
10942 * c-common.def (SIZEOF_EXPR): Moved here from cp-tree.def.
10944 2012-08-10 Richard Guenther <rguenther@suse.de>
10946 * c-pretty-print.c (pp_c_expression): Handle anonymous SSA names.
10948 2012-08-07 Steven Bosscher <steven@gcc.gnu.org>
10950 * c-pretty-print.c (pp_c_function_definition): Use pp_newline_and_flush
10951 instead of separate pp_newline and pp_flush.
10952 (print_c_tree): Likewise.
10954 2012-07-26 Richard Henderson <rth@redhat.com>
10956 * c-common.c (handle_hot_attribute): Allow labels.
10957 (handle_cold_attribute): Likewise.
10959 2012-07-20 Jakub Jelinek <jakub@redhat.com>
10962 * c-common.c (check_function_nonnull): Handle multiple nonnull
10963 attributes properly.
10965 2012-07-16 Steven Bosscher <steven@gcc.gnu.org>
10967 * c-gimplify.c: Include dumpfile.h instead of tree-dump.h.
10968 * c-ada-spec.c: Likewise.
10969 * c-dump.c (dump_stmt): Move to cp/dump.c, the only user.
10971 2012-07-14 Steven Bosscher <steven@gcc.gnu.org>
10973 * c-pch.c (CHECK_NO_ASM_OUT_DURING_PCH): Do not define.
10974 Remove code conditional on it.
10976 2012-07-11 Steven Bosscher <steven@gcc.gnu.org>
10978 * c-gimplify.c: Do not include basic-block.h.
10979 * c-common.c: Do not include linfuncs.h.
10981 2012-07-08 Steven Bosscher <steven@gcc.gnu.org>
10983 * c-common.h: Include tree.h.
10985 2012-07-02 Jason Merrill <jason@redhat.com>
10988 * c-common.c (get_priority): Call default_conversion.
10990 2012-07-01 Uros Bizjak <ubizjak@gmail.com>
10992 * c-pch.c (c_common_write_pch): Remove unused variables.
10994 2012-06-29 Steven Bosscher <steven@gcc.gnu.org>
10996 * cppspec.c: Moved from gcc/ to here.
10998 2012-06-27 Kai Tietz <ktietz@redhat.com>
11000 PR preprocessor/37215
11001 * c-ppoutput.c (preprocess_file): Check for nonempty buffer.
11003 2012-06-21 Steven Bosscher <steven@gcc.gnu.org>
11005 * c-common.h (c_common_print_pch_checksum): Remove.
11006 * c-pch.c: Do not include output.h.
11007 (CHECK_NO_ASM_OUT_DURING_PCH): Define and add FIXME.
11008 (asm_out_file): Define iff CHECK_NO_ASM_OUT_DURING_PCH isdefined.
11009 (asm_file_startpos): Define iff CHECK_NO_ASM_OUT_DURING_PCH is defined.
11010 (struct c_pch_header): Remove.
11011 (get_ident): Update gpch version.
11012 (pch_init): Do not print executable_checksum to asm_out_file.
11013 Do not fail if there is no asm_out_file to read back from. Set
11014 asm_file_startpos only if CHECK_NO_ASM_OUT_DURING_PCH is defined.
11015 (c_common_write_pch): Verify that nothing was written to asm_out_file
11016 since pch_init was called. Do not write a c_pch_header, and do not
11017 copy from asm_out_file to the PCH.
11018 (c_common_read_pch): Do not read a c_pch_header, and do not restore
11019 the content of asm_out_file from the PCH.
11020 (c_common_print_pch_checksum): Remove.
11021 * c-opts.c (c_common_init): Print out executable_checksum directly.
11023 2012-06-19 Steven Bosscher <steven@gcc.gnu.org>
11025 * c-target.def (objc_declare_unresolved_class_reference,
11026 objc_declare_class_definition): Add new hooks.
11028 2012-06-19 Steven Bosscher <steven@gcc.gnu.org>
11030 * c-lex.c: Do not include output.h.
11031 (cb_ident): Try to put out .ident with targetm.asm_out.output_ident.
11032 Remove uses of ASM_OUTPUT_IDENT.
11034 2012-06-15 Marc Glisse <marc.glisse@inria.fr>
11037 * c-common.h (c_build_vec_perm_expr): Move decl here.
11038 * c-common.c (c_build_vec_perm_expr): Move definition
11041 2012-06-06 Steven Bosscher <steven@gcc.gnu.org>
11043 * c.opt (fconserve-space): Turn into a no-op.
11045 2012-06-04 Sterling Augustine <saugustine@google.com>
11047 * c-pretty-print.h (pp_c_flag_gnu_v3): New enumerator.
11048 * c-pretty-print.c (pp_c_specifier_qualifier_list): Check it at
11049 both the start and end of the function.
11051 2012-06-04 Steven Bosscher <steven@gcc.gnu.org>
11053 * c-common.c: Do not include output.h.
11054 * c-pragma.c: Likewise.
11056 2012-06-04 Steven Bosscher <steven@gcc.gnu.org>
11058 * error.c (dump_decl): Check pp_c_flag_gnu_v3.
11059 (decl_as_dwarf_string, lang_decl_dwarf_name): New functions.
11060 (lang_decl_name): Handle namespace decls.
11062 2012-05-31 Steven Bosscher <steven@gcc.gnu.org>
11064 * c-ada-spec.c: Do not include output.h.
11065 * c-semantics.c: Likewise.
11067 2012-05-29 Joseph Myers <joseph@codesourcery.com>
11069 * c-common.c: Fix typo.
11071 2012-05-29 Michael Matz <matz@suse.de>
11073 * c-common.h (c_expand_decl): Remove prototype.
11075 2012-05-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
11077 * c.opt (Wmissing-braces): Use LangEnabledBy(C ObjC,Wall).
11078 * c-opts.c (c_common_handle_option): Remove code handling
11079 warn_missing_braces.
11081 2012-05-28 Paolo Carlini <paolo.carlini@oracle.com>
11084 * c-opts.c (c_common_handle_option): For C++ -Wall doesn't enable
11087 2012-05-22 Dodji Seketeli <dodji@redhat.com>
11090 * c.opt (Wunused-local-typedefs): Use EnabledBy(Wunused).
11092 2012-05-17 Manuel López-Ibáñez <manu@gcc.gnu.org>
11094 * c.opt (--pedantic-errors,-pedantic-errors): Do not handle here.
11095 * c-opts.c (c_common_handle_option): Do not handle explicitly
11096 Wreturn-type, Wwrite-strings, warn_ecpp, and -pedantic-errors.
11098 2012-05-16 Dodji Seketeli <dodji@redhat.com>
11100 PR preprocessor/7263
11101 * c-lex.c (c_lex_with_flags): Pass a virtual location to the call
11102 to cpp_classify_number. For diagnostics, use the precise location
11103 instead of the global input_location.
11105 2012-05-15 Paolo Carlini <paolo.carlini@oracle.com>
11108 * c-common.c (shorten_compare): Check c_inhibit_evaluation_warnings.
11110 2012-05-14 Bernd Schmidt <bernds@codesourcery.com>
11112 * c-common.c (DEF_ATTR_STRING): Define and undefine as necessary.
11114 2012-05-14 Manuel López-Ibáñez <manu@gcc.gnu.org>
11117 * c.opt (Wc++0X-compat,Wdelete-non-virtual-dtor,Wjump-misses-init,
11118 Wreorder): Use LangEnabledBy.
11119 * c-opts.c (c_common_handle_option): Do not enable them
11120 explicitly. Call lang-specific generated functions.
11121 (c_common_post_options): Do not set them here.
11123 2012-05-13 Manuel López-Ibáñez <manu@gcc.gnu.org>
11125 * c.opt (Wclobbered,Wempty-body,Wignored-qualifiers,
11126 Wmissing-field-initializers,Wmissing-parameter-type,
11127 Wold-style-declaration,Woverride-init): Use EnabledBy.
11128 * c-opts.c (c_common_post_options): Do not set here explicitly.
11130 2012-05-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
11133 * c-opts.c (c_common_handle_option): Use handle_generated_option
11134 to enable sub-options.
11136 2012-05-10 Paolo Carlini <paolo.carlini@oracle.com>
11139 * c-common.c (warnings_for_convert_and_check): Use warning_at.
11141 2012-05-10 Richard Guenther <rguenther@suse.de>
11143 * c-common.c (c_sizeof_or_alignof_type): Remove assert and
11144 adjust commentary about TYPE_IS_SIZETYPE types.
11146 2012-05-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
11149 * c-common.c (warn_logical_operator): Check that argument of
11150 integer_zerop is not NULL.
11152 2012-05-05 Manuel López-Ibáñez <manu@gcc.gnu.org>
11155 * c-common.c (warn_logical_operator): Do not warn if either side
11156 is already true or false.
11158 2012-05-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
11161 * c-common.c (expr_original_type): New.
11162 (shorten_compare): Do not warn for enumeration types.
11164 2012-05-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
11166 * c.opt (fpermissive): Add Var(flag_permissive).
11168 2012-04-30 Marc Glisse <marc.glisse@inria.fr>
11171 * c-common.c (convert_vector_to_pointer_for_subscript): New function.
11172 * c-common.h (convert_vector_to_pointer_for_subscript): Declare it.
11174 2012-04-30 Dodji Seketeli <dodji@redhat.com>
11176 Add -Wvarargs option
11177 * c.opt (Wvarargs): Define new option.
11179 2012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
11181 * c-common.c (check_function_arguments): Replace
11182 Wmissing-format-attribute with Wsuggest-attribute=format.
11184 2012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
11186 * c.opt (Wsuggest-attribute=format): New. Alias of
11187 Wmissing-format-attribute.
11188 * c-format.c (decode_format_type): Replace
11189 Wmissing-format-attribute with Wsuggest-attribute=format.
11190 (check_function_format): Likewise.
11192 2012-04-27 Ollie Wild <aaw@google.com>
11194 * c-common.c: Add CPP_W_LITERAL_SUFFIX mapping.
11195 * c-opts.c (c_common_handle_option): Handle OPT_Wliteral_suffix.
11196 * c.opt: Add Wliteral-suffix.
11198 2012-04-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
11201 * c.opt (Wpedantic): New.
11202 (pedantic): Alias Wpedantic.
11203 * c-opts.c (c_common_handle_option): Replace -pedantic with -Wpedantic.
11204 (c_common_post_options): Likewise.
11205 (sanitize_cpp_opts): Likewise.
11206 * c-lex.c (interpret_float): Likewise.
11207 * c-format.c (check_format_types): Likewise.
11208 * c-common.c (pointer_int_sum): Likewise.
11209 (c_sizeof_or_alignof_type): Likewise.
11210 (c_add_case_label): Likewise.
11211 (c_do_switch_warnings): Likewise.
11212 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
11214 2012-04-15 Jason Merrill <jason@redhat.com>
11217 * c-format.c (CPLUSPLUS_STD_VER): C++11 inherits from C99.
11218 (C_STD_NAME): Distinguish between C++98 and C++11.
11220 2012-04-11 Eric Botcazou <ebotcazou@adacore.com>
11223 * c-common.h (uint16_type_node): Rename into...
11224 (c_uint16_type_node): ...this.
11225 * c-common.c (c_common_nodes_and_builtins): Adjust for above renaming.
11226 * c-cppbuiltin.c (builtin_define_stdint_macros): Likewise.
11228 2012-04-10 Manuel López-Ibáñez <manu@gcc.gnu.org>
11230 * c-common.c (warn_if_unused_value): Move definition to here.
11231 * c-common.h (warn_if_unused_value): Move declaration to here.
11233 2012-03-23 William Bader <williambader@hotmail.com>
11235 * c-lex.c (c_lex_with_flags): Avoid declarations after stmts.
11237 2012-03-20 Jason Merrill <jason@redhat.com>
11239 * c-common.h (enum cxx_dialect): Add cxx1y.
11240 * c-common.c (c_common_nodes_and_builtins): Use >= for cxx_dialect
11242 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
11243 * c-opts.c (c_common_post_options): Likewise.
11244 (set_std_cxx1y): New.
11245 (c_common_handle_option): Call it.
11246 * c.opt (-std=c++1y, -std=gnu++1y): New flags.
11248 2012-03-19 Paolo Carlini <paolo.carlini@oracle.com>
11251 * c.opt ([Wuseless-cast]): Add.
11253 2012-03-16 Richard Guenther <rguenther@suse.de>
11255 * c-pretty-print.c (pp_c_initializer_list): Adjust.
11257 2012-03-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
11260 * c.opt (ftemplate-backtrace-limit) Add.
11262 2012-03-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11264 * c-cppbuiltin.c (c_cpp_builtins): Remove #pragma extern_prefix
11266 * c-pragma.c (handle_pragma_extern_prefix): Remove.
11267 (init_pragma): Don't register extern_prefix.
11269 2012-03-12 Richard Guenther <rguenther@suse.de>
11271 * c-common.c (c_common_get_narrower): Use c_common_type_for_size.
11272 (builtin_type_for_size): Likewise.
11274 2012-02-13 Jakub Jelinek <jakub@redhat.com>
11277 * c-common.c (sync_resolve_params): Don't decide whether to convert
11278 or not based on TYPE_SIZE comparison, convert whenever arg_type
11279 is unsigned INTEGER_TYPE.
11281 2012-02-06 Paolo Carlini <paolo.carlini@oracle.com>
11284 * c.opt ([Wunused-local-typedefs]): Fix description.
11286 2012-01-24 Mike Stump <mikestump@comcast.net>
11288 * c-common.c (c_common_type_for_mode): Match signed/unsigned types
11291 2012-01-18 Richard Guenther <rguenther@suse.de>
11293 * c-opts.c (c_common_post_options): Reset LTO flags if
11294 we are about to generate a PCH.
11296 2012-01-17 Paolo Carlini <paolo.carlini@oracle.com>
11299 * c-pretty-print.c (pp_c_integer_constant): For unsigned constants
11300 use pp_unsigned_wide_integer.
11302 2012-01-10 Richard Guenther <rguenther@suse.de>
11304 PR middle-end/51806
11305 * c-opts.c (c_common_handle_option): Move -Werror handling
11306 to language independent code.
11308 2012-01-05 Richard Guenther <rguenther@suse.de>
11310 PR middle-end/51764
11311 * c.opt (Wmudflap, fmudflap, fmudflapth, fmudflapir): Move here
11314 2011-12-30 Paolo Carlini <paolo.carlini@oracle.com>
11317 * c-common.c (c_sizeof_or_alignof_type): In C++ allow for alignof
11318 of array types with an unknown bound.
11320 2011-12-20 Joseph Myers <joseph@codesourcery.com>
11322 * c-common.c (flag_isoc99): Update comment to refer to C11.
11323 (flag_isoc1x): Change to flag_isoc11.
11324 * c-common.h (flag_isoc99): Update comment to refer to C11.
11325 (flag_isoc1x): Change to flag_isoc11.
11326 * c-cppbuiltin.c (cpp_atomic_builtins): Change comment to refer to
11328 * c-opts.c (set_std_c1x): Change to set_std_c11.
11329 (c_common_handle_option): Handle OPT_std_c11 and OPT_std_gnu11.
11331 (set_std_c89, set_std_c99, set_std_c11): Use flag_isoc11.
11332 (set_std_c1): Use CLK_STDC11 and CLK_GNUC11.
11333 * c.opt (std=c1x): Change to std=c11. Document as non-draft
11335 (std=c1x, std=iso9899:2011): Add as aliases of std=c11.
11336 (std=gnu1x): Change to std=gnu11. Refer to non-draft standard.
11337 (std=gnu1x): Make alias of std=gnu11.
11339 2011-12-19 Jason Merrill <jason@redhat.com>
11342 * c-common.c (handle_transparent_union_attribute): Check the first
11343 field if the type is complete.
11345 2011-12-15 Jonathan Wakely <jwakely.gcc@gmail.com>
11348 * c-common.c (RID_IS_FINAL): Add.
11349 * c-common.h (RID_IS_FINAL): Add.
11351 2011-11-30 Iain Sandoe <iains@gcc.gnu.org>
11353 * c.opt (fgnu-runtime): Provide full description.
11354 (fnext-runtime): Likewise.
11355 * c-opts.c (OPT_fgnu_runtime, OPT_fnext_runtime) Remove.
11357 2011-11-28 Andrew MacLeod <amacleod@redhat.com>
11359 * c-cpp-builtin.c (cpp_atomic_builtins):New. Emit all atomic
11360 predefines in one place. Add LOCK_FREE predefines.
11361 (c_cpp_builtins): Move Legacy HAVE_SYNC predefines to
11364 2011-11-24 Andrew MacLeod <amacleod@redhat.com>
11367 * c-common.c (get_atomic_generic_size): Check for various error
11369 (resolve_overloaded_atomic_exchange,
11370 resolve_overloaded_atomic_compare_exchange,
11371 resolve_overloaded_atomic_load, resolve_overloaded_atomic_store): Return
11372 error_mark_node for error conditions.
11374 2011-11-08 Richard Guenther <rguenther@suse.de>
11376 PR middle-end/51010
11377 * c-pretty-print.c (pp_c_expression): Handle SSA_NAMEs.
11379 2011-11-07 Richard Henderson <rth@redhat.com>
11380 Aldy Hernandez <aldyh@redhat.com>
11381 Torvald Riegel <triegel@redhat.com>
11383 Merged from transactional-memory.
11385 * c-common.c (handle_tm_wrap_attribute,
11386 handle_tm_attribute, ignore_attribute, parse_tm_stmt_attr): New.
11387 (struct c_common_reswords): Added __transaction* keywords.
11388 (struct c_common_attribute_table): Added transaction* and tm_regparm
11390 * c-common.h: Added RID_TRANSACTION*. Added TM_ATTR* and TM_STMT*
11392 (parse_tm_stmt_attr, tm_attr_to_mask, tm_mask_to_attr,
11393 find_tm_attribute): Declare.
11395 2011-11-07 Jason Merrill <jason@redhat.com>
11398 * c-common.c, c-common.h: Revert yesterday's changes.
11400 2011-11-06 Jason Merrill <jason@redhat.com>
11403 * c-common.c (decl_has_visibility_attr): Split out from...
11404 (c_determine_visibility): ...here.
11405 * c-common.h: Declare it.
11407 2011-11-06 Joseph Myers <joseph@codesourcery.com>
11409 * c-common.c (c_common_reswords): Add _Alignas and _Alignof.
11410 (c_sizeof_or_alignof_type): Diagnose alignof applied to a function
11412 (check_user_alignment): New. Split out of
11413 handle_aligned_attribute. Disallow integer constants with
11414 noninteger types. Conditionally allow zero.
11415 (handle_aligned_attribute): Use check_user_alignment.
11416 * c-common.h (RID_ALIGNAS, check_user_alignment): New.
11418 2011-11-06 Andrew MacLeod <amacleod@redhat.com>
11419 Richard Henderson <rth@redhat.com>
11421 Merged from cxx-mem-model.
11423 * c-cppbuiltin.c (c_cpp_builtins): Test both atomic and sync patterns.
11424 * c-common.c (sync_resolve_params, sync_resolve_return): Only tweak
11425 parameters that are the same type size.
11426 (get_atomic_generic_size): New. Find size of generic
11427 atomic function parameters and do typechecking.
11428 (add_atomic_size_parameter): New. Insert size into parameter list.
11429 (resolve_overloaded_atomic_exchange): Restructure __atomic_exchange to
11430 either __atomic_exchange_n or external library call.
11431 (resolve_overloaded_atomic_compare_exchange): Restructure
11432 __atomic_compare_exchange to either _n variant or external library call.
11433 (resolve_overloaded_atomic_load): Restructure __atomic_load to either
11434 __atomic_load_n or an external library call.
11435 (resolve_overloaded_atomic_store): Restructure __atomic_store to either
11436 __atomic_store_n or an external library call.
11437 (resolve_overloaded_builtin): Handle new __atomic builtins.
11439 2011-11-04 Eric Botcazou <ebotcazou@adacore.com>
11442 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Call fold_offsetof_1.
11443 (fold_offsetof_1): Make global. Remove STOP_REF argument and adjust.
11444 <INDIRECT_REF>: Return the argument.
11445 <ARRAY_REF>: Remove special code for negative offset.
11446 Call fold_build_pointer_plus instead of size_binop.
11447 (fold_offsetof): Remove STOP_REF argument and adjust.
11448 * c-common.h (fold_offsetof_1): Declare.
11449 (fold_offsetof): Remove STOP_REF argument.
11451 2011-11-02 Paolo Carlini <paolo.carlini@oracle.com>
11454 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
11455 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
11456 Wnarrowing for C++0x and C++98.
11457 * c.opt ([Wnarrowing]): Update.
11459 2011-11-01 Paolo Carlini <paolo.carlini@oracle.com>
11462 * c.opt: Add Wzero-as-null-pointer-constant.
11464 2011-10-31 Jason Merrill <jason@redhat.com>
11466 * c.opt (-fdeduce-init-list): Off by default.
11469 * c-common.h (cxx_dialect): Add cxx11 and cxx03.
11470 * c.opt: Add -std=c++11, -std=gnu++11, -std=gnu++03,
11471 and -Wc++11-compat.
11472 * c-opts.c (set_std_cxx11): Rename from set_std_cxx0x.
11474 2011-10-27 Roberto Agostino Vitillo <ravitillo@lbl.gov>
11477 * c.opt (fvisibility-inlines-hidden): Description change.
11479 2011-10-26 Ed Smith-Rowland <3dw4rd@verizon.net>
11481 Implement C++11 user-defined literals.
11482 * c-common.c (build_userdef_literal): New.
11483 * c-common.def: New tree code.
11484 * c-common.h (tree_userdef_literal): New tree struct and accessors.
11485 * c-lex.c (interpret_float): Add suffix parm.
11486 (c_lex_with_flags): Build literal tokens.
11488 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
11492 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
11495 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
11496 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
11497 Wnarrowing for C++0x and C++98.
11498 * c.opt ([Wnarrowing]): Update.
11500 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
11503 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
11504 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
11505 Wnarrowing for C++0x and C++98.
11506 * c.opt ([Wnarrowing]): Update.
11508 2011-10-21 Paolo Carlini <paolo.carlini@oracle.com>
11511 * c-common.c (conversion_warning): Remove code looking for
11512 artificial operands.
11514 2011-10-18 Dodji Seketeli <dodji@redhat.com>
11517 * c-lex.c (fe_file_change): Use LINEMAP_SYSP when
11518 !NO_IMPLICIT_EXTERN_C.
11520 2011-10-17 Michael Spertus <mike_spertus@symantec.com>
11522 * c-common.c (c_common_reswords): Add __bases,
11524 * c-common.h: Add RID_BASES and RID_DIRECT_BASES.
11526 2011-10-17 Paolo Carlini <paolo.carlini@oracle.com>
11529 * c.opt ([Wnonnull]): Add C++ and Objective-C++.
11531 2011-10-15 Tom Tromey <tromey@redhat.com>
11532 Dodji Seketeli <dodji@redhat.com>
11534 * c.opt (fdebug-cpp): New option.
11535 * c-opts.c (c_common_handle_option): Handle the option.
11536 * c-ppoutput.c (maybe_print_line_1): New static function. Takes an
11537 output stream in parameter. Factorized from ...
11538 (maybe_print_line): ... this. Dump location debug information when
11539 -fdebug-cpp is in effect.
11540 (print_line_1): New static function. Takes an output stream in
11541 parameter. Factorized from ...
11542 (print_line): ... here. Dump location information when -fdebug-cpp
11544 (scan_translation_unit): Dump location information when
11545 -fdebug-cpp is in effect.
11547 2011-10-15 Tom Tromey <tromey@redhat.com>
11548 Dodji Seketeli <dodji@redhat.com>
11550 * c.opt (ftrack-macro-expansion): New option. Handle it with and
11552 * c-opts.c (c_common_handle_option)<case
11553 OPT_ftrack_macro_expansion_, case OPT_ftrack_macro_expansion>: New
11554 cases. Handle -ftrack-macro-expansion with and without argument.
11556 2011-10-15 Tom Tromey <tromey@redhat.com>
11557 Dodji Seketeli <dodji@redhat.com>
11559 * c-ppoutput.c (scan_translation_unit, maybe_print_line)
11560 (print_line, cb_define, do_line_change): Adjust to avoid touching
11561 the internals of struct line_map. Use the public API instead.
11562 * c-pch.c (c_common_read_pch): Likewise.
11563 * c-lex.c (fe_file_change): Likewise.
11565 2011-10-14 Paolo Carlini <paolo.carlini@oracle.com>
11568 * c.opt ([Wformat-zero-length]): Add C++ and Objective-C++.
11570 2011-10-11 Paolo Carlini <paolo.carlini@oracle.com>
11573 * c-pretty-print.c (pp_c_floating_constant): Output
11574 max_digits10 (in the ISO C++ WG N1822 sense) decimal digits.
11576 2011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
11578 * c-common.c (def_builtin_1): Delete old interface with two
11579 parallel arrays to hold standard builtin declarations, and replace
11580 it with a function based interface that can support creating
11581 builtins on the fly in the future. Change all uses, and poison
11582 the old names. Make sure 0 is not a legitimate builtin index.
11583 * c-omp.c (c_finish_omp_barrier): Ditto.
11584 (c_finish_omp_taskwait): Ditto.
11585 (c_finish_omp_flush): Ditto.
11587 2011-10-11 Tristan Gingold <gingold@adacore.com>
11589 * c.opt: (fallow-parameterless-variadic-functions): New.
11591 2011-09-08 Dodji Seketeli <dodji@redhat.com>
11593 PR c++/33255 - Support -Wunused-local-typedefs warning
11594 * c-common.h (struct c_language_function::local_typedefs): New
11596 (record_locally_defined_typedef, maybe_record_typedef_use)
11597 (maybe_warn_unused_local_typedefs): Declare new functions.
11598 * c-common.c (record_locally_defined_typedef)
11599 (maybe_record_typedef_use)
11600 (maybe_warn_unused_local_typedefs): Define new functions.
11601 * c.opt: Declare new -Wunused-local-typedefs flag.
11603 2011-09-06 Eric Botcazou <ebotcazou@adacore.com>
11605 PR middle-end/50266
11606 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Fold offsetof-like
11609 2011-09-05 Richard Guenther <rguenther@suse.de>
11611 * c-common.c (complete_array_type): Use ssize_int (-1) instead
11612 of integer_minus_one_node for empty array upper bounds.
11614 2011-08-28 Dodji Seketeli <dodji@redhat.com>
11616 * c-pch.c (c_common_read_pch): Call linemap_add with LC_ENTER as
11617 it's the first time it's being called on this main TU.
11619 2011-08-24 Richard Guenther <rguenther@suse.de>
11622 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Fix conditional.
11624 2011-08-22 Gabriel Charette <gchare@google.com>
11626 * c-opts.c (c_finish_options): Force BUILTINS_LOCATION for tokens
11627 defined in cpp_init_builtins and c_cpp_builtins.
11629 2011-08-19 Joseph Myers <joseph@codesourcery.com>
11631 * c-common.c (c_common_reswords): Add __builtin_complex.
11632 * c-common.h (RID_BUILTIN_COMPLEX): New.
11634 2011-08-18 Joseph Myers <joseph@codesourcery.com>
11636 * c-common.c (c_common_reswords): Add _Noreturn.
11637 (keyword_is_function_specifier): Handle RID_NORETURN.
11638 * c-common.h (RID_NORETURN): New.
11640 2011-08-10 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
11642 * c-common.c (unsafe_conversion_p): New function. Check if it is
11643 unsafe to convert an expression to the type.
11644 (conversion_warning): Adjust, use unsafe_conversion_p.
11645 * c-common.h (unsafe_conversion_p): New function declaration.
11647 2011-08-02 Jakub Jelinek <jakub@redhat.com>
11649 * c-common.h (c_finish_omp_atomic): Adjust prototype.
11650 (c_finish_omp_taskyield): New prototype.
11651 * c-omp.c (c_finish_omp_atomic): Add OPCODE, V, LHS1 and RHS1
11652 arguments. Handle OMP_ATOMIC_READ, OMP_ATOMIC_CAPTURE_OLD and
11653 OMP_ATOMIC_CAPTURE_NEW in addition to OMP_ATOMIC. If LHS1
11654 or RHS1 have side-effects, evaluate those too in the right spot,
11655 if it is a decl and LHS is also a decl, error out if they
11657 (c_finish_omp_taskyield): New function.
11658 * c-cppbuiltin.c (c_cpp_builtins): Change _OPENMP to 201107.
11659 * c-pragma.c (omp_pragmas): Add taskyield.
11660 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKYIELD.
11661 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_FINAL and
11662 PRAGMA_OMP_CLAUSE_MERGEABLE.
11664 2011-07-25 Dodji Seketeli <dodji@redhat.com>
11666 * c-common.h (set_underlying_type): Remove parm name from
11669 2011-07-25 Romain Geissler <romain.geissler@gmail.com>
11671 * c-pretty-print.h: Search c-common.h in c-family.
11673 2011-07-22 Jason Merrill <jason@redhat.com>
11676 * c.opt (Wnarrowing): New.
11679 * c-common.h: Declare c_linkage_bindings.
11680 * c-pragma.c (handle_pragma_redefine_extname): Use it.
11683 * c-opts.c (set_std_cxx0x): Set flag_isoc94 and flag_isoc99.
11684 * c-pretty-print.c (pp_c_cv_qualifiers): Check c_dialect_cxx as well
11685 as flag_isoc99 for 'restrict'.
11686 (pp_c_specifier_qualifier_list): Likewise for _Complex.
11688 2011-07-21 Ian Lance Taylor <iant@google.com>
11690 PR middle-end/49705
11691 * c-common.c (c_disable_warnings): New static function.
11692 (c_enable_warnings): New static function.
11693 (c_fully_fold_internal): Change local unused_p to bool. Call
11694 c_disable_warnings and c_enable_warnings rather than change
11695 c_inhibit_evaluation_warnings.
11697 2011-07-20 Jason Merrill <jason@redhat.com>
11699 PR c++/6709 (DR 743)
11700 PR c++/42603 (DR 950)
11701 * c-common.h (CPP_KEYWORD, CPP_TEMPLATE_ID): Move from cp/parser.h.
11702 (CPP_NESTED_NAME_SPECIFIER, N_CP_TTYPES): Likewise.
11703 (CPP_DECLTYPE): New.
11704 * c-common.c (c_parse_error): Handle CPP_DECLTYPE.
11706 2011-07-19 Richard Guenther <rguenther@suse.de>
11708 * c-common.c (pointer_int_sum): Use fold_build_pointer_plus.
11709 * c-omp.c (c_finish_omp_for): Likewise.
11711 2011-07-12 Eric Botcazou <ebotcazou@adacore.com>
11713 * c-ada-spec.c (dump_nested_types): Put semi-colon after empty loop
11714 body on the next line.
11716 2011-07-08 Jason Merrill <jason@redhat.com>
11719 * c-omp.c (check_omp_for_incr_expr): Handle preevaluation.
11722 * c-common.c (c_apply_type_quals_to_decl): Don't check
11723 TYPE_NEEDS_CONSTRUCTING.
11725 2011-07-06 Richard Guenther <rguenther@suse.de>
11727 * c-common.c (c_common_nodes_and_builtins):
11728 Merge calls to build_common_tree_nodes and build_common_tree_nodes_2.
11730 2011-07-05 Richard Guenther <rguenther@suse.de>
11732 * c-common.c (c_common_nodes_and_builtins): Build all common
11735 2011-06-27 Jakub Jelinek <jakub@redhat.com>
11737 * c-common.h (c_tree_chain_next): New static inline function.
11739 * c-common.c (check_builtin_function_arguments): Handle
11740 BUILT_IN_ASSUME_ALIGNED.
11742 2011-06-21 Andrew MacLeod <amacleod@redhat.com>
11744 * c-common.c: Add sync_ or SYNC__ to builtin names.
11745 * c-omp.c: Add sync_ or SYNC__ to builtin names.
11747 2011-06-20 Pierre Vittet <piervit@pvittet.com>
11749 * c-pragma.h (pragma_handler_1arg, pragma_handler_2arg): New
11751 (gen_pragma_handler): New union.
11752 (internal_pragma_handler): New type.
11753 (c_register_pragma_with_data)
11754 (c_register_pragma_with_expansion_and_data): New functions.
11756 * c-pragma.c (registered_pragmas, c_register_pragma_1)
11757 (c_register_pragma, c_register_pragma_with_expansion)
11758 (c_invoke_pragma_handler): Changed to work with
11759 internal_pragma_handler.
11760 (c_register_pragma_with_data)
11761 (c_register_pragma_with_expansion_and_data): New functions.
11763 2011-06-14 Joseph Myers <joseph@codesourcery.com>
11765 * c-common.c: Include common/common-target.h.
11766 (handle_section_attribute): Use
11767 targetm_common.have_named_sections.
11768 * c-cppbuiltin.c: Include common/common-target.h.
11769 (c_cpp_builtins): Use targetm_common.except_unwind_info.
11771 2011-06-10 Richard Guenther <rguenther@suse.de>
11773 * c-pretty-print.c (pp_c_type_specifier): Use pp_c_identifier
11774 to print a IDENTIFIER_NODE.
11776 2011-06-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11777 Joseph Myers <joseph@codesourcery.com>
11779 * c.opt (fbuilding-libgcc): New option.
11780 * c-cppbuiltin.c (c_cpp_builtins): Define
11781 __LIBGCC_TRAMPOLINE_SIZE__ if flag_building_libgcc.
11783 2011-06-07 Jason Merrill <jason@redhat.com>
11785 * c-common.c (max_tinst_depth): Lower default to 900.
11787 * c-format.c (gcc_cxxdiag_char_table): Add 'S' format.
11789 2011-06-07 Richard Guenther <rguenther@suse.de>
11791 * c-common.c (c_common_nodes_and_builtins): Do not set
11792 size_type_node or call set_sizetype.
11794 2011-06-07 Dodji Seketeli <dodji@redhat.com>
11797 * c-pretty-print.c (pp_c_integer_constant): Consider the canonical
11798 type when using pointer comparison to compare types.
11800 2011-06-02 Jonathan Wakely <jwakely.gcc@gmail.com>
11802 * c.opt: Add -Wdelete-non-virtual-dtor.
11803 * c-opts.c (c_common_handle_option): Include it in -Wall.
11805 2011-05-30 Nathan Froyd <froydnj@gcc.gnu.org>
11810 2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
11812 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
11815 2011-05-27 Jakub Jelinek <jakub@redhat.com>
11818 * c-common.c (c_common_truthvalue_conversion) <case COND_EXPR>: For
11819 C++ don't call c_common_truthvalue_conversion on void type arms.
11821 2011-05-27 Nathan Froyd <froydnj@codesourcery.com>
11823 * c-common.h (struct stmt_tree_s) [x_cur_stmt_list]: Change to a VEC.
11824 (stmt_list_stack): Define.
11825 (cur_stmt_list): Adjust for new type of x_cur_stmt_list.
11826 * c-semantics.c (push_stmt_list, pop_stmt_list): Likewise.
11828 2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
11830 * c-common.c (warning_candidate_p): Check for BLOCKs.
11832 2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
11834 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
11837 2011-05-25 Jakub Jelinek <jakub@redhat.com>
11839 * c-common.c (def_fn_type): Remove extra va_end.
11841 2011-05-23 Jason Merrill <jason@redhat.com>
11844 * c-common.c (c_common_get_narrower): New.
11845 (shorten_binary_op, shorten_compare, warn_for_sign_compare): Use it.
11847 2011-05-23 Nathan Froyd <froydnj@codesourcery.com>
11849 * c-common.h (check_function_arguments): Tweak prototype of
11850 check_function_arguments.
11851 * c-common.c (check_function_arguments): Likewise. Adjust
11852 calls to check_function_nonnull, check_function_format, and
11853 check_function_sentinel.
11854 (check_function_sentinel): Take a FUNCTION_TYPE rather than
11855 separate attributes and typelist arguments. Use
11856 FOREACH_FUNCTION_ARGS to iterate over argument types.
11858 2011-05-15 Paolo Carlini <paolo.carlini@oracle.com>
11860 * c-common.c (c_common_reswords): Reorder.
11861 * c-common.h (rid): Likewise.
11863 2011-05-10 Nathan Froyd <froydnj@codesourcery.com>
11865 * c-common.c (def_fn_type): Don't call build_function_type, call
11866 build_function_type_array or build_varargs_function_type_array
11868 (c_common_nodes_and_builtins): Likewise.
11870 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
11872 * c-common.c (c_add_case_label): Omit the loc argument to
11874 * c-common.h (build_case_label): Remove.
11875 * c-semantics.c (build_case_label): Remove.
11877 2011-05-05 Joseph Myers <joseph@codesourcery.com>
11879 * c-objc.h (objc_start_method_definition): Update prototype.
11880 * stub-objc.c (objc_start_method_definition): Add extra parameter.
11882 2011-05-04 Nathan Froyd <froydnj@codesourcery.com>
11884 * c-common.c (check_main_parameter_types): Reindent. Don't use
11885 TYPE_ARG_TYPES directly.
11886 (handle_nonnull_attribute): Likewise.
11887 (sync_resolve_params): Likewise.
11888 * c-format.c (handle_format_arg_attribute): Likewise. Adjust call
11889 to check_format_string.
11890 (handle_format_attribute): Likewise.
11891 (check_format_string): Take a function type to examine instead of
11892 a type list. Use a function_arg_iterator to step through argument
11895 2011-05-04 Richard Guenther <rguenther@suse.de>
11897 * c-common.c (fix_string_type): Use size_int for index type bounds.
11898 (start_fname_decls): Do not pass NULL to build_int_cst.
11899 (c_init_attributes): Likewise.
11900 * c-lex.c (c_lex_with_flags): Likewise.
11902 2011-04-27 Jason Merrill <jason@redhat.com>
11904 * c-common.c (make_tree_vector_from_list): New.
11905 * c-common.h: Declare it.
11907 2011-04-26 Richard Guenther <rguenther@suse.de>
11909 PR preprocessor/48248
11910 * c-ppoutput.c (maybe_print_line): Always optimize newlines
11911 for output size with -P.
11913 2011-04-25 Paolo Carlini <paolo.carlini@oracle.com>
11915 * c-common.c (struct c_common_resword): Add __underlying_type.
11916 * c-common.h (enum rid): Add RID_UNDERLYING_TYPE.
11918 2011-04-20 Jim Meyering <meyering@redhat.com>
11920 * c-format.c (init_dollar_format_checking): Remove useless
11923 2011-04-15 Nicola Pero <nicola.pero@meta-innovation.com>
11925 * c-objc.h (objc_get_interface_ivars): Removed.
11926 (objc_detect_field_duplicates): New.
11927 * stub-objc.c: Likewise.
11929 2011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
11931 * stub-objc.c (objc_declare_protocols): Renamed to
11932 objc_declare_protocol.
11933 * c-objc.h: Likewise.
11935 2011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
11937 * stub-objc.c (objc_declare_class): Updated argument name.
11939 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
11941 * c-common.h (c_common_init_ts): Declare.
11942 * c-common.c (c_common_init_ts): Define.
11944 2011-04-12 Nicola Pero <nicola.pero@meta-innovation.com>
11946 * c-objc.h (objc_build_message_expr): Updated prototype.
11947 * stub-objc.c (objc_build_message_expr): Likewise.
11949 2011-04-12 Martin Jambor <mjambor@suse.cz>
11951 * c-gimplify.c (c_genericize): Call cgraph_get_create_node instead
11954 2011-04-11 Richard Guenther <rguenther@suse.de>
11956 * c-common.c (complete_array_type): Build a range type of
11959 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
11961 * c-common.c (handle_sentinel_attribute): Don't use TYPE_ARG_TYPES.
11962 (handle_type_generic_attribute): Likewise.
11964 2011-04-07 Jason Merrill <jason@redhat.com>
11967 * c-common.c (c_common_truthvalue_conversion): Don't ignore
11968 conversion from C++0x scoped enum.
11970 2011-04-06 Joseph Myers <joseph@codesourcery.com>
11972 * c-target-def.h: New file.
11973 * c-target.def: New file.
11974 * c-target.h: New file.
11975 * c-common.c (targetcm): Don't define here.
11976 * c-common.h (default_handle_c_option): Declare.
11977 * c-format.c: Include c-target.h instead of target.h.
11978 * c-opts.c: Include c-target.h instead of target.h. Explicitly
11980 (default_handle_c_option): Move from targhooks.c.
11982 2011-03-29 Jakub Jelinek <jakub@redhat.com>
11984 PR preprocessor/48248
11985 * c-ppoutput.c (print): Add src_file field.
11986 (init_pp_output): Initialize it.
11987 (maybe_print_line): Don't optimize by adding up to 8 newlines
11988 if map->to_file and print.src_file are different file.
11989 (print_line): Update print.src_file.
11991 2011-03-25 Kai Tietz <ktietz@redhat.com>
11993 * c-ada-spec.c (compare_comment): Use filename_cmp
11994 instead of strcmp for filename.
11996 2011-03-25 Jeff Law <law@redhat.com>
11998 * c-common.c (def_fn_type): Add missing va_end.
12000 2011-03-25 Jason Merrill <jason@redhat.com>
12002 * c.opt: Add -std=c++03.
12004 2011-03-22 Eric Botcazou <ebotcazou@adacore.com>
12006 * c-ada-spec.c (dump_ada_template): Skip non-class instances.
12008 2011-03-17 Kai Tietz <ktietz@redhat.com>
12011 * c-pretty-print.c (pp_c_specifier_qualifier_list):
12012 Display allowed attributes for function pointer types.
12013 (pp_c_attributes_display): New function to display
12014 attributes having affects_type_identity flag set to true.
12015 * c-pretty-print.h (pp_c_attributes_display): New prototype.
12017 * c-common.c (c_common_attribute_table):
12019 (c_common_format_attribute_table): Likewise.
12021 2011-03-18 Jason Merrill <jason@redhat.com>
12023 * c.opt (fconstexpr-depth): Add Var(max_constexpr_depth).
12024 * c-common.h: Don't declare it here.
12025 * c-common.c: Or define it here.
12026 * c-opts.c (c_common_handle_option): Or set it here.
12029 * c-common.c (handle_transparent_union_attribute): Don't
12030 make a duplicate type in C++.
12032 2011-03-15 Jason Merrill <jason@redhat.com>
12034 * c-common.c (max_constexpr_depth): New.
12035 * c-common.h: Declare it.
12036 * c-opts.c (c_common_handle_option): Set it.
12037 * c.opt (fconstexpr-depth): New option.
12039 2011-03-11 Jason Merrill <jason@redhat.com>
12041 * c-common.c (attribute_takes_identifier_p): Add missing const.
12044 * c-common.c (attribute_takes_identifier_p): Assume that an
12045 unknown attribute takes an identifier.
12047 2011-03-07 Nathan Froyd <froydnj@codesourcery.com>
12050 * c-common.c (c_type_hash): Call list_length instead of iterating
12051 through DECL_CHAIN. Rename 'i' to 'n_elements'.
12053 2011-02-19 Jakub Jelinek <jakub@redhat.com>
12056 * c-common.c (c_fully_fold_internal): Handle VIEW_CONVERT_EXPR.
12058 2011-02-17 Iain Sandoe <iains@gcc.gnu.org>
12060 * c.opt (fobjc-abi-version=) New.
12061 (fobjc-nilcheck): New.
12063 2011-02-03 Nathan Froyd <froydnj@codesourcery.com>
12066 * c-common.h (keyword_is_decl_specifier): Declare.
12067 * c-common.c (keyword_is_decl_specifier): Define.
12068 (keyword_is_function_specifier): New function.
12070 2011-01-26 Jakub Jelinek <jakub@redhat.com>
12073 * c-lex.c (interpret_float): If CPP_N_IMAGINARY, ensure
12074 EXCESS_PRECISION_EXPR is created with COMPLEX_TYPE instead of
12077 2011-01-26 Arnaud Charlet <charlet@adacore.com>
12079 * c-ada-spec.c (dump_generic_ada_node): Avoid dereferencing null type.
12081 2011-01-26 Jakub Jelinek <jakub@redhat.com>
12084 * c-opts.c (c_common_post_options): Call c_common_no_more_pch
12085 after init_c_lex if pch_file is set.
12087 2011-01-26 Dave Korn <dave.korn.cygwin@gmail.com>
12090 * c.opt (-fkeep-inline-dllexport): New switch.
12092 2011-01-12 Richard Guenther <rguenther@suse.de>
12094 PR middle-end/32511
12095 * c-common.c (handle_weak_attribute): Warn instead of error
12096 on declaring an inline function weak.
12098 2011-01-05 Tom Tromey <tromey@redhat.com>
12100 * c-common.h (lvalue_error): Update.
12101 * c-common.c (lvalue_error): Add 'loc' argument. Call error_at,
12104 2010-12-29 Nicola Pero <nicola.pero@meta-innovation.com>
12107 * c-objc.h (objc_finish_message_expr): Added argument to
12110 2010-12-22 Nathan Froyd <froydnj@codesourcery.com>
12112 * c-common.c (handle_nonnull_attribute, handle_sentinel_attribute):
12115 2010-12-18 Nicola Pero <nicola.pero@meta-innovation.com>
12117 * c-objc.h (objc_maybe_warn_exceptions): New.
12118 * stub-objc.c (objc_maybe_warn_exceptions): New.
12120 2010-12-10 Nathan Froyd <froydnj@codesourcery.com>
12122 * c-common.h (readonly_error): Declare.
12123 * c-common.c (readonly_error): Define.
12125 2010-12-09 Nathan Froyd <froydnj@codesourcery.com>
12127 * c-common.h (invalid_indirection_error): Declare.
12128 * c-common.c (invalid_indirection_error): Define.
12130 2010-12-03 Richard Guenther <rguenther@suse.de>
12133 * c-pretty-print.c (pp_c_postfix_expression): Handle MEM_REF.
12134 (pp_c_unary_expression): Likewise.
12135 (pp_c_expression): Likewise.
12137 2010-11-30 Nicola Pero <nicola.pero@meta-innovation.com>
12139 * c-common.h (objc_finish_function): New.
12140 (objc_non_volatilized_type): Removed.
12141 (objc_type_quals_match): Removed.
12142 * stub-objc.c (objc_finish_function): New.
12143 (objc_non_volatilized_type): Removed.
12144 (objc_type_quals_match): Removed.
12146 2010-11-30 Joseph Myers <joseph@codesourcery.com>
12148 * c-common.h (parse_optimize_options): Declare.
12149 * c-cppbuiltin.c, c-format.c, c-gimplify.c, c-lex.c, c-omp.c,
12150 c-pch.c, c-pragma.c, c-semantics.c: Don't include toplev.h.
12152 2010-11-29 Joseph Myers <joseph@codesourcery.com>
12154 * c-opts.c (check_deps_environment_vars): Use getenv instead of
12156 * c-pch.c (O_BINARY): Don't define here.
12157 * c-pragma.h: Include "cpplib.h" instead of <cpplib.h>.
12159 2010-11-25 Joseph Myers <joseph@codesourcery.com>
12161 * c-cppbuiltin.c (c_cpp_builtins): Pass &global_options to
12162 targetm.except_unwind_info.
12164 2010-11-23 Joseph Myers <joseph@codesourcery.com>
12166 * c-opts.c (c_common_handle_option): Pass location to
12167 set_struct_debug_option.
12169 2010-11-23 Joseph Myers <joseph@codesourcery.com>
12171 * c-common.c (visibility_options): Move from ../opts.c.
12172 * c-common.h (struct visibility_flags, visibility_options):
12174 * c-opts.c (finish_options): Rename to c_finish_options.
12175 (c_common_init): Update call to finish_options.
12177 2010-11-22 Nicola Pero <nicola.pero@meta-innovation.com>
12180 * c-lex.c (lex_string): Check that each string in an Objective-C
12181 string concat sequence starts with either one or zero '@', and
12182 that there are no spurious '@' signs at the end.
12184 2010-11-20 Joseph Myers <joseph@codesourcery.com>
12186 * c-pragma.c: Remove conditionals on HANDLE_PRAGMA_PACK,
12187 HANDLE_PRAGMA_PACK_PUSH_POP, HANDLE_PRAGMA_WEAK and
12188 HANDLE_PRAGMA_VISIBILITY.
12189 * c-pragma.h (HANDLE_PRAGMA_WEAK, HANDLE_PRAGMA_PACK,
12190 HANDLE_PRAGMA_VISIBILITY): Don't define.
12191 (HANDLE_SYSV_PRAGMA, HANDLE_PRAGMA_PACK_PUSH_POP): Don't test.
12193 2010-11-20 Nathan Froyd <froydnj@codesourcery.com>
12198 * c-common.h (keyword_begins_type_specifier): Declare.
12199 (keyword_is_storage_class_specifier): Declare.
12200 (keyword_is_type_qualifier): Declare.
12201 * c-common.c (keyword_begins_type_specifier): New function.
12202 (keyword_is_storage_class_specifier): New function.
12203 (keyword_is_type_qualifier): Declare.
12205 2010-11-19 Joseph Myers <joseph@codesourcery.com>
12208 * c-common.c (in_late_binary_op): Define.
12209 (c_common_truthvalue_conversion): Check in_late_binary_op before
12210 calling c_save_expr.
12211 * c-common.h (in_late_binary_op): Declare.
12213 2010-11-19 Joseph Myers <joseph@codesourcery.com>
12215 * c-opts.c (c_common_handle_option): Update calls to
12216 set_struct_debug_option.
12218 2010-11-19 Nicola Pero <nicola.pero@meta-innovation.com>
12220 * c-common.h (objc_declare_protocols): Added additional argument.
12221 * stub-objc.c (objc_declare_protocol): Same change.
12223 2010-11-18 Nathan Froyd <froydnj@codesourcery.com>
12226 * c-common.h (build_real_imag_expr): Declare.
12227 * c-semantics.c (build_real_imag_expr): Define.
12229 2010-11-17 Joseph Myers <joseph@codesourcery.com>
12231 * c-opts.c (c_common_parse_file): Take no arguments.
12232 * c-common.h (c_common_parse_file): Update prototype.
12234 2010-11-16 Jakub Jelinek <jakub@redhat.com>
12237 * c-common.c (warning_candidate_p): Don't track non-const calls
12240 2010-11-15 Ian Lance Taylor <iant@google.com>
12242 * c-lex.c (init_c_lex): Set macro debug callbacks if
12243 flag_dump_go_spec is set.
12245 2010-11-15 Nicola Pero <nicola.pero@meta-innovation.com>
12247 * c-common.h (objc_build_incr_expr_for_property_ref): New.
12248 * stub-objc.c (objc_build_incr_expr_for_property_ref): New.
12250 2010-11-15 Nathan Froyd <froydnj@codesourcery.com>
12252 PR preprocessor/45038
12253 * c-cppbuiltin.c (c_cpp_builtins): Use different format for C++
12256 2010-11-12 Joseph Myers <joseph@codesourcery.com>
12258 * c-common.h (c_family_lang_mask): Declare.
12259 * c-opts.c (c_family_lang_mask): Make extern.
12260 * c-pragma.c (handle_pragma_diagnostic): Use
12261 control_warning_option.
12263 2010-11-12 Joseph Myers <joseph@codesourcery.com>
12265 * c-common.c (parse_optimize_options): Update call to
12267 * c-common.h (c_common_handle_option): Update prototype.
12268 * c-opts.c (c_common_handle_option): Take location_t parameter and
12269 pass it to other functions.
12271 2010-11-11 Joseph Myers <joseph@codesourcery.com>
12273 * c-opts.c (warning_as_error_callback): Remove.
12274 (c_common_initialize_diagnostics): Don't call
12275 register_warning_as_error_callback.
12276 (c_common_handle_option): Handle -Werror=normalized= here.
12278 2010-11-10 Joseph Myers <joseph@codesourcery.com>
12280 * c-common.c (handle_mode_attribute): Use %' and word "signedness"
12282 * c-opts.c (c_common_parse_file): Start diagnostics with lowercase
12284 * c-pragma.c (handle_pragma_target, handle_pragma_optimize):
12285 Remove trailing '.' from diagnostics.
12286 * c.opt (Wwrite-strings_: Avoid '`' in help text.
12288 2010-11-10 Joseph Myers <joseph@codesourcery.com>
12290 * c-common.c (parse_optimize_options): Pass global_dc to
12292 * c-opts.c (c_common_handle_option): Pass &global_options to
12293 set_Wstrict_aliasing.
12294 * c.opt (v): Don't mark Common or document here.
12296 2010-11-06 Iain Sandoe <iains@gcc.gnu.org>
12299 * c-format.c (format_type): New type gcc_objc_string_format_type.
12300 (valid_stringptr_type_p): New.
12301 (handle_format_arg_attribute): Use valid_stringptr_type_p ().
12302 (check_format_string): Pass expected type, use
12303 valid_stringptr_type_p (), check that the format string types are
12304 consistent with the format specification.
12305 (decode_format_attr): Warn if NSString is used outside objective-c.
12306 (format_types_orig): Add NSString.
12307 (format_name): New.
12308 (format_flags): New.
12309 (check_format_arg): Handle format strings requiring an external parser.
12310 first_target_format_type: New variable.
12311 (handle_format_attribute): Set up first_target_format_type, pass the
12312 expected format arg string type to check_format_string().
12313 * c-common.h (FMT_FLAG_PARSE_ARG_CONVERT_EXTERNAL): New flag.
12314 * stub-objc.c (objc_string_ref_type_p): New.
12315 (objc_check_format_arg): New.
12317 2010-11-04 Nicola Pero <nicola.pero@meta-innovation.com>
12319 Fixed using the Objective-C 2.0 dot-syntax with class names.
12320 * c-common.h (objc_build_class_component_ref): New.
12321 * stub-objc.c (objc_build_class_component_ref): New.
12323 2010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
12325 * c.opt (Wproperty-assign-default): New option.
12327 2010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
12329 Implemented -fobjc-std=objc1 flag.
12330 * c.opt (fobjc-std=objc1): New option.
12332 2010-11-01 Nicola Pero <nicola.pero@meta-innovation.com>
12334 Implemented format and noreturn attributes for Objective-C methods.
12335 * c-common.c (handle_noreturn_attribute): Recognize 'noreturn'
12336 attribute for Objective-C methods.
12338 2010-10-31 Jason Merrill <jason@redhat.com>
12340 * c-common.c (conversion_warning, warn_for_collisions_1): Use
12343 2010-10-30 Nicola Pero <nicola.pero@meta-innovation.com>
12345 Implemented Objective-C 2.0 @property, @synthesize and @dynamic.
12346 * c-common.h (enum rid): Removed RID_COPIES and RID_IVAR.
12347 (objc_add_property_declaration): Removed arguments for copies and
12349 (objc_build_getter_call): Renamed to
12350 objc_maybe_build_component_ref.
12351 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
12352 (objc_is_property_ref): New.
12353 * c-common.c (c_common_reswords): Removed copies and ivar.
12354 * stub-objc.c (objc_add_property_declaration): Removed arguments
12355 for copies and ivar.
12356 (objc_build_getter_call): Renamed to
12357 objc_maybe_build_component_ref.
12358 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
12359 (objc_is_property_ref): New.
12361 2010-10-29 Arnaud Charlet <charlet@adacore.com>
12362 Matthew Gingell <gingell@adacore.com>
12364 * c-ada-spec.c (separate_class_package): New function.
12365 (pp_ada_tree_identifier): Prefix references to C++ classes with the
12366 name of their enclosing package.
12367 (print_ada_declaration): Use separate_class_package.
12369 2010-10-27 Jason Merrill <jason@redhat.com>
12371 * c-common.c (c_common_reswords): Add __is_literal_type.
12372 * c-common.h (enum rid): Add RID_IS_LITERAL_TYPE.
12374 * c-common.c (check_case_value): Remove special C++ code.
12376 2010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
12378 * c-common.h (enum rid): Added RID_READWRITE, RID_ASSIGN,
12379 RID_RETAIN, RID_COPY and RID_NONATOMIC. Updated RID_FIRST_PATTR
12380 and RID_LAST_PATTR.
12381 (objc_add_property_declaration): Added additional arguments.
12382 (objc_property_attribute_kind): Removed.
12383 (objc_set_property_attr): Removed.
12384 * c-common.c (c_common_reswords): Added readwrite, assign, retain,
12385 copy and nonatomic.
12386 * stub-objc.c (objc_add_property_declaration): Added additional
12388 (objc_set_property_attr): Removed.
12390 2010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
12392 * c-common.h (objc_add_property_variable): Renamed to
12393 objc_add_property_declaration. Added location argument.
12394 * stub-objc.c (objc_add_property_variable): Same change.
12396 2010-10-23 Nicola Pero <nicola.pero@meta-innovation.com>
12398 * c-common.h (objc_maybe_printable_name): New.
12399 * stub-objc.c (objc_maybe_printable_name): New.
12401 2010-10-22 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
12402 Andrew Pinski <pinskia@gmail.com>
12404 * c-common.h (c_common_mark_addressable_vec): Declare.
12405 * c-common.c (c_common_mark_addressable_vec): New function.
12407 2010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
12409 * c-common.h (objc_set_method_type): Removed.
12410 (objc_add_method_declaration): Added boolean argument.
12411 (objc_start_method_definition): Same change.
12412 (objc_build_method_signature): Same change.
12413 * stub-objc.c (objc_set_method_type): Removed.
12414 (objc_add_method_declaration): Added boolean argument.
12415 (objc_start_method_definition): Same change.
12416 (objc_build_method_signature): Same change.
12418 2010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
12420 * c-common.h (finish_file): Removed.
12421 (objc_write_global_declarations): New.
12422 * c-opts.c (c_common_parse_file): Do not call finish_file.
12423 * stub-objc.c (objc_write_global_declarations): New.
12425 2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
12427 Implemented parsing @synthesize and @dynamic for
12428 Objective-C/Objective-C++.
12429 * c-common.h (enum rid): Add RID_AT_SYNTHESIZE and RID_AT_DYNAMIC.
12430 (objc_add_synthesize_declaration): New.
12431 (objc_add_dynamic_declaration): New.
12432 * c-common.c (c_common_reswords): Add synthesize and dynamic.
12433 * stub-objc.c (objc_add_synthesize_declaration): New.
12434 (objc_add_dynamic_declaration): New.
12436 2010-10-18 Michael Meissner <meissner@linux.vnet.ibm.com>
12439 * c-cppbuiltin.c (mode_has_fma): Move function here from
12440 builtins.c. Don't use the fma optab, instead just use the
12441 HAVE_fma* macros, so that __FP_FAST_FMA* will be defined when
12444 2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
12446 Merge from 'apple/trunk' branch on FSF servers.
12448 2005-11-08 Fariborz Jahanian <fjahanian@apple.com>
12451 * c-common.h (objc_non_volatilized_type): New declaration
12452 * stub-objc.c (objc_non_volatilized_type): New stub.
12454 2010-10-17 Nicola Pero <nicola.pero@meta-innovation.com>
12456 Merge from 'apple/trunk' branch on FSF servers.
12458 2006-03-27 Fariborz Jahanian <fjahanian@apple.com>
12461 * c-common.h (objc_diagnose_private_ivar): New decl.
12462 * stub-objc.c (objc_diagnose_private_ivar): New stub.
12464 2010-10-17 Iain Sandoe <iains@gcc.gnu.org>
12466 * c-common.c (c_common_reswords): Add package, RID_AT_PACKAGE.
12467 * c-common.h (enum rid): Add RID_AT_PACKAGE.
12468 (objc_ivar_visibility_kind): New enum.
12469 (objc_set_visibility): Adjust prototype to use visibility enum.
12470 * stub-objc.c (objc_set_visibility): Adjust stub to use
12473 2010-10-14 Michael Meissner <meissner@linux.vnet.ibm.com>
12475 * c-cppbuiltin.c (builtin_define_float_constants): Emit
12476 __FP_FAST_FMA, __FP_FAST_FMAF, and __FP_FAST_FMAL if the machine
12477 has the appropriate fma builtins.
12478 (c_cpp_builtins): Adjust call to builtin_define_float_constants.
12480 2010-10-14 Iain Sandoe <iains@gcc.gnu.org>
12482 merge from FSF apple 'trunk' branch.
12483 2006 Fariborz Jahanian <fjahanian@apple.com>
12485 Radars 4436866, 4505126, 4506903, 4517826
12486 * c-common.c (c_common_resword): Define @property and its attributes.
12487 * c-common.h: Define property attribute enum entries.
12488 (OBJC_IS_PATTR_KEYWORD): New.
12489 (objc_property_attribute_kind): New enum.
12490 Declare objc_set_property_attr (), objc_add_property_variable (),
12491 objc_build_getter_call () and objc_build_setter_call ().
12492 * stub-objc.c (objc_set_property_attr): New stub.
12493 (objc_add_property_variable): Likewise.
12494 (objc_build_getter_call): Likewise.
12495 (objc_build_setter_call) Likewise.
12497 2010-10-13 Iain Sandoe <iains@gcc.gnu.org>
12499 merge from FSF apple 'trunk' branch.
12500 2006-04-26 Fariborz Jahanian <fjahanian@apple.com>
12502 Radar 3803157 (method attributes)
12503 * c-common.c (handle_deprecated_attribute): Recognize
12504 objc methods as valid declarations.
12505 * c-common.h: Declare objc_method_decl ().
12506 * stub-objc.c (objc_method_decl): New stub.
12508 2010-10-08 Joseph Myers <joseph@codesourcery.com>
12510 * c-common.c (parse_optimize_options): Call
12511 decode_cmdline_options_to_array_default_mask before
12512 decode_options. Update arguments to decode_options.
12513 * c-common.h (c_common_init_options_struct): Declare.
12514 * c-opts.c (c_common_init_options_struct): New. Split out from
12515 c_common_init_options.
12517 2010-10-06 Nicola Pero <nicola.pero@meta-innovation.com>
12519 Implemented fast enumeration for Objective-C.
12520 * c-common.h (objc_finish_foreach_loop): New.
12521 * stub-objc.c (objc_finish_foreach_loop): New.
12523 2010-10-05 Joseph Myers <joseph@codesourcery.com>
12525 * c-common.h (struct diagnostic_context): Don't declare here.
12526 (c_common_initialize_diagnostics): Declare using
12527 diagnostic_context typedef.
12528 * c-opts.c (c_common_handle_option): Pass global_dc to
12529 handle_generated_option.
12531 2010-10-04 Joseph Myers <joseph@codesourcery.com>
12533 * c-opts.c (c_common_handle_option): Pass &global_options_set to
12534 handle_generated_option.
12536 2010-10-03 Ian Lance Taylor <iant@google.com>
12538 * c.opt (-fplan9-extensions): New option.
12540 2010-10-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
12542 * c-cppbuiltin.c (define__GNUC__, builtin_define_type_precision):
12544 (c_cpp_builtins): Call functions from cppbuiltin.c instead
12545 of duplicating code.
12547 2010-09-30 Iain Sandoe <iains@gcc.gnu.org>
12549 * c-common.c: Add two new entries for @optional
12550 and @required keywords.
12552 merge from FSF 'apple/trunk' branch.
12553 2006-01-30 Fariborz Jahanian <fjahanian@apple.com>
12556 * c-common.h (RID_AT_OPTIONAL, RID_AT_REQUIRED): Two new
12557 objective-c keywords.
12558 (objc_set_method_opt): New declaration.
12559 * stub-objc.c (objc_set_method_opt): New stub.
12561 2010-09-30 Joseph Myers <joseph@codesourcery.com>
12563 * c-common.c (handle_optimize_attribute): Pass &global_options to
12564 cl_optimization_save and cl_optimization_restore.
12565 * c-opts.c (c_common_handle_option): Pass &global_options to
12566 handle_generated_option.
12567 * c-pragma.c (handle_pragma_diagnostic): Use option_flag_var.
12568 (handle_pragma_pop_options, handle_pragma_reset_options): Pass
12569 &global_options to cl_optimization_restore.
12571 2010-09-30 Nicola Pero <nicola.pero@meta-innovation.com>
12573 * c-lex.c (c_lex_with_flags): Updated comments for CPP_AT_NAME
12574 Objective-C/Objective-C++ keywords.
12576 2010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
12578 Merge from 'apple/trunk' branch on FSF servers.
12580 2005-10-04 Fariborz Jahanian <fjahanian@apple.com>
12583 * c-common.h (objc_check_global_decl): New declaration.
12584 * stub-objc.c (objc_check_global_decl): New stub.
12586 2010-09-29 Joseph Myers <joseph@codesourcery.com>
12588 * c.opt: Don't use VarExists.
12590 2010-09-29 Joseph Myers <joseph@codesourcery.com>
12592 * c-common.c (c_cpp_error): Update names of diagnostic_context
12594 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Update names of
12595 cl_optimization members.
12596 * c-opts.c (warning_as_error_callback, c_common_handle_option,
12597 sanitize_cpp_opts, finish_options): Update names of cpp_options
12600 2010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
12602 * c-common.h (OBJC_IS_CXX_KEYWORD): New macro. Updated comments.
12603 (objc_is_reserved_word): Removed.
12604 * c-common.c: Updated comments.
12605 * c-lex.c (c_lex_with_flags): Use OBJC_IS_CXX_KEYWORD instead of
12606 objc_is_reserved_word.
12607 * stub-objc.c (objc_is_reserved_word): Removed.
12609 2010-09-28 Iain Sandoe <iains@gcc.gnu.org>
12611 * c-common.h (objc_add_method_declaration): Adjust prototype to
12612 include attributes.
12613 (objc_start_method_definition): Likewise.
12614 (objc_build_keyword_decl): Likewise.
12615 * stub-objc.c:(objc_add_method_declaration): Handle attributes.
12616 (objc_start_method_definition): Likewise.
12617 (objc_build_keyword_decl): Likewise.
12619 2010-09-28 Iain Sandoe <iains@gcc.gnu.org>
12621 * c-common.h (objc_start_class_interface): Adjust prototype.
12622 (objc_start_category_interface): Likewise.
12623 (objc_start_protocol): Likewise.
12624 * stub-objc.c (objc_start_protocol): Adjust for extra argument.
12625 (objc_start_class_interface): Likewise.
12626 (objc_start_category_interface): Likewise.
12628 2010-09-27 Ian Lance Taylor <iant@google.com>
12630 * c-common.c (c_common_attribute_table): Add no_split_stack.
12631 (handle_no_split_stack_attribute): New static function.
12633 2010-09-27 Nicola Pero <nicola.pero@meta-innovation.com>
12635 Merge from 'apple/trunk' branch on FSF servers.
12637 2005-12-15 Fariborz Jahanian <fjahanian@apple.com>
12640 * c-common.h (objc_have_common_type): New declaration.
12641 * stub-objc.c (objc_have_common_type): New stub.
12643 2005-06-22 Ziemowit Laski <zlaski@apple.com>
12646 * c-common.h (objc_common_type): New prototype.
12647 * stub-objc.c (objc_common_type): New stub.
12649 2010-09-24 Jan Hubicka <jh@suse.cz>
12651 * c-common.c (handle_leaf_attribute): New function.
12652 (struct attribute_spec c_common_att): Add leaf.
12654 2010-09-22 Joseph Myers <joseph@codesourcery.com>
12656 * c.opt (-all-warnings, -ansi, -assert, -assert=, -comments,
12657 -comments-in-macros, -define-macro, -define-macro=, -dependencies,
12658 -dump, -dump=, -imacros, -imacros=, -include, -include=,
12659 -include-barrier, -include-directory, -include-directory=,
12660 -include-directory-after, -include-directory-after=,
12661 -include-prefix, -include-prefix=, -include-with-prefix,
12662 -include-with-prefix=, -include-with-prefix-after,
12663 -include-with-prefix-after=, -include-with-prefix-before,
12664 -include-with-prefix-before=, -no-integrated-cpp,
12665 -no-line-commands, -no-standard-includes, -no-warnings, -output,
12666 -output=, -pedantic, -pedantic-errors, -preprocess,
12667 -print-missing-file-dependencies, -trace-includes, -traditional,
12668 -traditional-cpp, -trigraphs, -undefine-macro, -undefine-macro=,
12669 -user-dependencies, -verbose, -write-dependencies,
12670 -write-user-dependencies, no-integrated-cpp, traditional): New.
12672 2010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
12675 * c-common.h (objc_start_method_definition): Return bool instead
12677 * stub-objc.c (objc_start_method_definition): Return bool instead
12680 2010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
12683 * c-common.h (objc_get_interface_ivars): New declaration.
12684 * stub-objc.c (objc_get_interface_ivars): New stub.
12686 2010-09-15 Ian Lance Taylor <iant@google.com>
12688 * c-common.c (parse_optimize_options): Do not capitalize warning
12689 messages. Remove period at end of warning message.
12691 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
12693 * c-common.c (handle_alias_ifunc_attribute): New, broken out of ...
12694 (handle_alias_attribute): ... here.
12695 (handle_ifunc_attribute): New.
12697 2010-09-06 Mark Mitchell <mark@codesourcery.com>
12699 * c-common.h (do_warn_double_promotion): Declare.
12700 * c-common.c (do_warn_double_promotion): Define.
12702 2010-09-05 Mark Mitchell <mark@codesourcery.com>
12704 * c.opt (Wdouble-promotion): New.
12706 2010-09-02 Joseph Myers <joseph@codesourcery.com>
12708 * c.opt (falt-external-templates, fhuge-objects, fvtable-gc,
12709 fvtable-thunks, fxref): Mark no longer supported in help text.
12711 2010-09-02 Joseph Myers <joseph@codesourcery.com>
12713 * c.opt (Wimport, fall-virtual, falt-external-templates,
12714 fdefault-inline, fenum-int-equiv, fexternal-templates,
12715 fguiding-decls, fhonor-std, fhuge-objects, flabels-ok,
12716 fname-mangling-version-, fnew-abi, fnonnull-objects,
12717 foptional-diags, fsquangle, fstrict-prototype, fthis-is-variable,
12718 fvtable-gc, fvtable-thunks, fxref): Mark with Ignore and Warn as
12720 (fhandle-exceptions): Mark with Alias and Warn.
12721 * c-opts.c (c_common_handle_option): Don't handle options marked
12724 2010-09-02 Joseph Myers <joseph@codesourcery.com>
12726 * c.opt (Wcomments, Werror-implicit-function-declaration,
12727 ftemplate-depth-, std=c89, std=c9x, std=gnu89, std=gnu9x,
12728 std=iso9899:1990, std=iso9899:1999, std=iso9899:199x): Mark as
12730 * c-common.c (option_codes): Use OPT_Wcomment instead of
12732 * c-opts.c (warning_as_error_callback, c_common_handle_option):
12733 Don't handle options marked as aliases.
12735 2010-08-25 Richard Guenther <rguenther@suse.de>
12737 * c-common.c (c_common_get_alias_set): Remove special
12738 handling for pointers.
12740 2010-08-20 Nathan Froyd <froydnj@codesourcery.com>
12742 * c-common.c: Use FOR_EACH_VEC_ELT.
12743 * c-gimplify.c: Likewise.
12744 * c-pragma.c: Likewise.
12746 2010-08-16 Joseph Myers <joseph@codesourcery.com>
12748 * c.opt (MDX): Change back to MD. Mark NoDriverArg instead of
12750 (MMDX): Change back to MMD. Mark NoDriverArg instead of
12752 * c-opts.c (c_common_handle_option): Use OPT_MD and OPT_MMD
12753 instead of OPT_MDX and OPT_MMDX.
12755 2010-08-16 Joseph Myers <joseph@codesourcery.com>
12757 * c.opt (MDX, MMDX, lang-asm): Mark RejectDriver.
12759 2010-08-12 Joseph Myers <joseph@codesourcery.com>
12761 * c.opt (MD, MMD): Change to MDX and MMDX.
12762 * c-opts.c (c_common_handle_option): Use OPT_MMD and OPT_MMDX.
12764 2010-08-11 Joseph Myers <joseph@codesourcery.com>
12766 * c-opts.c (c_common_handle_option): Call handle_generated_option
12767 instead of handle_option.
12769 2010-08-08 Nathan Froyd <froydnj@codesourcery.com>
12771 * c-pragma.c (add_to_renaming_pragma_list): Fix call to VEC_safe_push.
12772 (maybe_apply_renaming_pragma): Delete unneeded declarations.
12774 2010-08-08 Nathan Froyd <froydnj@codesourcery.com>
12776 * c-pragma.c (pending_redefinition): Declare. Declare a VEC of it.
12777 (pending_redefine_extname): Change type to a VEC.
12778 (add_to_renaming_pragma_list): Update for new type of
12779 pending_redefine_extname.
12780 (maybe_apply_renaming_pragma): Likewise.
12782 2010-08-04 Arnaud Charlet <charlet@adacore.com>
12784 * c-ada-spec.c (dump_ada_template): Mark underlying instance type as
12786 (dump_generic_ada_node): Code clean up. Use TREE_VISITED flag to
12787 decide whether a type has already been declared/seen.
12788 Do not go to the original type.
12789 (dump_nested_types): New parameter forward.
12790 Generate forward declaration if needed and mark type as visited.
12791 (print_ada_declaration): Call dump_nested_types if not already done.
12792 Mark types as visited.
12794 2010-08-03 Joseph Myers <joseph@codesourcery.com>
12796 * c.opt (-print-pch-checksum): Remove option.
12797 * c-opts.c (c_common_handle_option): Don't handle
12798 OPT_print_pch_checksum.
12800 2010-07-27 Joseph Myers <joseph@codesourcery.com>
12802 * c-common.h (c_common_handle_option): Update prototype and return
12804 * c-opts.c (c_common_handle_option): Update prototype and return
12805 value type. Update calls to handle_option and
12806 enable_warning_as_error.
12808 2010-07-27 Jakub Jelinek <jakub@redhat.com>
12811 * c-pretty-print.c (pp_c_expression): Handle C_MAYBE_CONST_EXPR.
12813 2010-07-27 Joseph Myers <joseph@codesourcery.com>
12815 * c-common.h (c_common_missing_argument): Remove.
12816 * c-opts.c (c_common_missing_argument): Remove.
12817 * c.opt (A, D, F, I, MD, MMD, MQ, MT, U, fconstant-string-class=,
12818 idirafter, imacros, include, isysroot, isystem, iquote): Add
12820 * c-objc-common.h (LANG_HOOKS_MISSING_ARGUMENT): Remove.
12822 2010-07-27 Joseph Myers <joseph@codesourcery.com>
12824 * c-common.h (c_common_option_lang_mask,
12825 c_common_initialize_diagnostics, c_common_complain_wrong_lang_p):
12827 (c_common_init_options): Update prototype.
12828 * c-opts.c (c_common_option_lang_mask): New.
12829 (c_common_initialize_diagnostics): Split out of
12830 c_common_init_options.
12831 (accept_all_c_family_options, c_common_complain_wrong_lang_p):
12833 (c_common_init_options): Update prototype. Use decoded options in
12834 search for -lang-asm.
12836 2010-07-15 Nathan Froyd <froydnj@codesourcery.com>
12838 * c-common.c: Carefully replace TREE_CHAIN with DECL_CHAIN.
12839 * c-format.c: Likewise.
12841 2010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
12843 * c-common.h: Include diagnostic-core.h. Error if already
12845 * c-semantics.c: Do not define GCC_DIAG_STYLE here.
12847 2010-07-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
12849 * c-common.c (IN_GCC_FRONTEND): Do not undef.
12850 Do not include expr.h
12851 (vector_mode_valid_p): Move here.
12853 2010-06-21 DJ Delorie <dj@redhat.com>
12855 * c-pragma.c (handle_pragma_diagnostic): Add push/pop,
12856 allow these pragmas anywhere.
12858 2010-06-14 Jakub Jelinek <jakub@redhat.com>
12861 * c-cppbuiltin.c: Include gt-c-family-c-cppbuiltin.h.
12862 (lazy_hex_fp_values, lazy_hex_fp_value_count): Add GTY(()) markers.
12863 (lazy_hex_fp_value, builtin_define_with_hex_fp_value): Use
12864 ggc_strdup instead of xstrdup.
12866 2010-06-10 Jakub Jelinek <jakub@redhat.com>
12868 * c-cppbuiltin.c: Include cpp-id-data.h.
12869 (lazy_hex_fp_values, lazy_hex_fp_value_count): New variables.
12870 (lazy_hex_fp_value): New function.
12871 (builtin_define_with_hex_fp_value): Provide definitions lazily.
12873 2010-06-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
12875 * c-gimplify.c: Do not include tree-flow.h
12877 2010-06-29 Joern Rennecke <joern.rennecke@embecosm.com>
12880 * c-common.c: Rename targetm member:
12881 targetm.enum_va_list -> targetm.enum_va_list_p
12883 2010-06-28 Anatoly Sokolov <aesok@post.ru>
12885 * c-common.c (shorten_compare): Adjust call to force_fit_type_double.
12887 2010-06-28 Steven Bosscher <steven@gcc.gnu.org>
12889 * c-cppbuiltin.c: Do not include except.h.
12891 2010-06-24 Andi Kleen <ak@linux.intel.com>
12893 * c-common.c (warn_for_omitted_condop): New.
12894 * c-common.h (warn_for_omitted_condop): Add prototype.
12896 2010-06-21 Joseph Myers <joseph@codesourcery.com>
12898 * c.opt (lang-objc): Remove.
12899 * c-opts.c (c_common_handle_option): Don't handle OPT_lang_objc.
12901 2010-06-21 Joern Rennecke <joern.rennecke@embecosm.com>
12903 * c-opts.c: Include "tm_p.h".
12905 2010-06-20 Joseph Myers <joseph@codesourcery.com>
12907 * c-common.c (parse_optimize_options): Update call to
12910 2010-06-18 Nathan Froyd <froydnj@codesourcery.com>
12912 * c-common.c (record_types_used_by_current_var_decl): Adjust for
12913 new type of types_used_by_cur_var_decl.
12915 2010-06-17 Joern Rennecke <joern.rennecke@embecosm.com>
12918 * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Add cast
12919 for C++ standard compliance.
12921 2010-06-16 Jason Merrill <jason@redhat.com>
12923 * c.opt: Add -Wnoexcept.
12925 2010-06-16 Richard Guenther <rguenther@suse.de>
12928 * c-common.c (c_common_truthvalue_conversion): Remove
12929 premature and wrong optimization concering ADDR_EXPRs.
12931 2010-06-15 Arnaud Charlet <charlet@adacore.com>
12933 * c-ada-spec.c (dump_sloc): Remove column info.
12934 (is_simple_enum): New function.
12935 (dump_generic_ada_node, print_ada_declaration): Map C enum types to Ada
12936 enum types when relevant.
12938 2010-06-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
12940 * c-common.c (conversion_warning): Warn at expression
12943 2010-06-10 Joseph Myers <joseph@codesourcery.com>
12945 * c-opts.c (c_common_handle_option): Don't handle
12948 2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
12950 * c-pragma.c (push_alignment): Use typed GC allocation.
12951 (handle_pragma_push_options): Likewise.
12953 * c-common.c (parse_optimize_options): Likewise.
12955 * c-common.h (struct sorted_fields_type): Add variable_size GTY
12958 2010-06-07 Joseph Myers <joseph@codesourcery.com>
12960 * c-common.c (flag_preprocess_only, flag_undef, flag_no_builtin,
12961 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
12962 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
12963 flag_signed_bitfields, warn_strict_null_sentinel,
12964 flag_nil_receivers, flag_zero_link, flag_replace_objc_classes,
12965 flag_gen_declaration, flag_no_gnu_keywords,
12966 flag_implement_inlines, flag_implicit_templates,
12967 flag_implicit_inline_templates, flag_optional_diags,
12968 flag_elide_constructors, flag_default_inline, flag_rtti,
12969 flag_conserve_space, flag_access_control, flag_check_new,
12970 flag_new_for_scope, flag_weak, flag_working_directory,
12971 flag_use_cxa_atexit, flag_use_cxa_get_exception_ptr,
12972 flag_enforce_eh_specs, flag_threadsafe_statics,
12973 flag_pretty_templates): Remove.
12974 * c-common.h (flag_preprocess_only, flag_nil_receivers,
12975 flag_objc_exceptions, flag_objc_sjlj_exceptions, flag_zero_link,
12976 flag_replace_objc_classes, flag_undef, flag_no_builtin,
12977 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
12978 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
12979 flag_const_strings, flag_signed_bitfields, flag_gen_declaration,
12980 flag_no_gnu_keywords, flag_implement_inlines,
12981 flag_implicit_templates, flag_implicit_inline_templates,
12982 flag_optional_diags, flag_elide_constructors, flag_default_inline,
12983 flag_rtti, flag_conserve_space, flag_access_control,
12984 flag_check_new, flag_new_for_scope, flag_weak,
12985 flag_working_directory, flag_use_cxa_atexit,
12986 flag_use_cxa_get_exception_ptr, flag_enforce_eh_specs,
12987 flag_threadsafe_statics, flag_pretty_templates,
12988 warn_strict_null_sentinel): Remove.
12989 * c.opt (E, Wstrict-null-sentinel, faccess-control, fasm,
12990 fbuiltin, fcheck-new, fconserve-space, felide-constructors,
12991 fenforce-eh-specs, ffor-scope, fgnu-keywords, fimplement-inlines,
12992 fimplicit-inline-templates, fimplicit-templates,
12993 flax-vector-conversions, fms-extensions, fnil-receivers,
12994 fnonansi-builtins, fpretty-templates, freplace-objc-classes,
12995 frtti, fshort-double, fshort-enums, fshort-wchar,
12996 fsigned-bitfields, fsigned-char, fstats, fthreadsafe-statics,
12997 funsigned-bitfields, funsigned-char, fuse-cxa-atexit,
12998 fuse-cxa-get-exception-ptr, fweak, fworking-directory, fzero-link,
12999 gen-decls, undef): Use Var.
13000 (fdefault-inline, foptional-diags): Document as doing nothing.
13001 * c-opts.c (c_common_handle_option): Remove cases for options now
13002 using Var. Mark ignored options as such.
13004 2010-06-05 Steven Bosscher <steven@gcc.gnu.org>
13006 * c-common.c: Moved to here from parent directory.
13007 * c-common.def: Likewise.
13008 * c-common.h: Likewise.
13009 * c-cppbuiltin.c: Likewise.
13010 * c-dump.c: Likewise.
13011 * c-format.c: Likewise.
13012 * c-format.h : Likewise.
13013 * c-gimplify.c: Likewise.
13014 * c-lex.c: Likewise.
13015 * c-omp.c: Likewise.
13017 * c-opts.c: Likewise.
13018 * c-pch.c: Likewise.
13019 * c-ppoutput.c: Likewise.
13020 * c-pragma.c: Likewise.
13021 * c-pragma.h: Likewise.
13022 * c-pretty-print.c: Likewise.
13023 * c-pretty-print.h: Likewise.
13024 * c-semantics.c: Likewise.
13025 * stub-objc.c: Likewise.
13027 * c-common.c: Include gt-c-family-c-common.h.
13028 * c-pragma.c: Include gt-c-family-c-pragma.h.
13030 Copyright (C) 2010-2022 Free Software Foundation, Inc.
13032 Copying and distribution of this file, with or without modification,
13033 are permitted in any medium without royalty provided the copyright
13034 notice and this notice are preserved.