1 2022-01-17 Martin Liska <mliska@suse.cz>
3 * c-ada-spec.cc: Rename .c names to .cc.
4 * c-ada-spec.h: Likewise.
5 * c-common.cc (c_build_vec_convert): Likewise.
6 (warning_candidate_p): Likewise.
7 * c-common.h (enum rid): Likewise.
8 (build_real_imag_expr): Likewise.
9 (finish_label_address_expr): Likewise.
10 (c_get_substring_location): Likewise.
11 (c_build_bind_expr): Likewise.
12 (conflict_marker_get_final_tok_kind): Likewise.
13 (c_parse_error): Likewise.
14 (check_missing_format_attribute): Likewise.
15 (invalid_array_size_error): Likewise.
16 (warn_for_multistatement_macros): Likewise.
17 (build_attr_access_from_parms): Likewise.
18 * c-cppbuiltin.cc (c_cpp_builtins): Likewise.
19 * c-format.cc: Likewise.
20 * c-gimplify.cc (c_gimplify_expr): Likewise.
21 * c-indentation.h: Likewise.
22 * c-objc.h (objc_prop_attr_kind_for_rid): Likewise.
23 * c-omp.cc (c_omp_predetermined_mapping): Likewise.
24 * c-opts.cc (c_common_post_options): Likewise.
25 (set_std_cxx23): Likewise.
26 * c-pragma.cc (handle_pragma_redefine_extname): Likewise.
27 * c-pretty-print.h: Likewise.
29 2022-01-17 Martin Liska <mliska@suse.cz>
31 * c-ada-spec.c: Moved to...
32 * c-ada-spec.cc: ...here.
33 * c-attribs.c: Moved to...
34 * c-attribs.cc: ...here.
35 * c-common.c: Moved to...
36 * c-common.cc: ...here.
37 * c-cppbuiltin.c: Moved to...
38 * c-cppbuiltin.cc: ...here.
39 * c-dump.c: Moved to...
41 * c-format.c: Moved to...
42 * c-format.cc: ...here.
43 * c-gimplify.c: Moved to...
44 * c-gimplify.cc: ...here.
45 * c-indentation.c: Moved to...
46 * c-indentation.cc: ...here.
47 * c-lex.c: Moved to...
49 * c-omp.c: Moved to...
51 * c-opts.c: Moved to...
53 * c-pch.c: Moved to...
55 * c-ppoutput.c: Moved to...
56 * c-ppoutput.cc: ...here.
57 * c-pragma.c: Moved to...
58 * c-pragma.cc: ...here.
59 * c-pretty-print.c: Moved to...
60 * c-pretty-print.cc: ...here.
61 * c-semantics.c: Moved to...
62 * c-semantics.cc: ...here.
63 * c-ubsan.c: Moved to...
64 * c-ubsan.cc: ...here.
65 * c-warn.c: Moved to...
67 * cppspec.c: Moved to...
68 * cppspec.cc: ...here.
69 * stub-objc.c: Moved to...
70 * stub-objc.cc: ...here.
72 2022-01-15 Martin Sebor <msebor@redhat.com>
75 * c.opt (-Wdangling-pointer): New option.
77 2022-01-15 Martin Sebor <msebor@redhat.com>
79 PR tree-optimization/80532
80 * c.opt (-Wuse-after-free): New options.
82 2022-01-14 David Malcolm <dmalcolm@redhat.com>
84 * c-attribs.c (c_common_attribute_table): Add "tainted_args".
85 (handle_tainted_args_attribute): New.
87 2022-01-13 Anthony Sharp <anthonysharp15@gmail.com>
88 Jason Merrill <jason@redhat.com>
91 * c.opt: Added -Wmissing-template-keyword.
93 2022-01-13 Richard Biener <rguenther@suse.de>
96 * c-common.c (c_common_mark_addressable_vec): Handle TARGET_EXPR.
98 2022-01-12 Martin Liska <mliska@suse.cz>
101 * c-attribs.c (handle_optimize_attribute): Do not call
102 cl_optimization_compare if we seen an error.
104 2022-01-11 Jakub Jelinek <jakub@redhat.com>
108 * c-warn.c (conversion_warning): Handle BIT_AND_EXPR, BIT_IOR_EXPR
111 2022-01-10 Richard Biener <rguenther@suse.de>
114 * c-common.c (c_build_shufflevector): Wrap the BIT_FIELD_REF
115 in a TARGET_EXPR to force a temporary.
117 2022-01-06 Marek Polacek <polacek@redhat.com>
120 * c-pragma.c (handle_pragma_scalar_storage_order): Use %< %> in
122 (handle_pragma_diagnostic): Likewise.
124 2022-01-03 Marek Polacek <polacek@redhat.com>
127 * c-format.c (check_tokens): Accept "decl-specifier*".
129 2022-01-03 Jakub Jelinek <jakub@redhat.com>
132 * c-attribs.c (handle_non_overlapping_attribute): New function.
133 (c_common_attribute_table): Add "non overlapping" attribute.
135 2021-12-30 Jakub Jelinek <jakub@redhat.com>
138 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Perform
139 cpp_define_unused/cpp_undef calls with forced token locations
142 2021-12-27 Patrick Palka <ppalka@redhat.com>
145 * c-common.c (pointer_int_sum): When quiet, return
146 error_mark_node for an incomplete pointed-to type and don't
147 call size_in_bytes_loc.
149 2021-12-17 Jason Merrill <jason@redhat.com>
152 * c-opts.c (c_common_post_options): Update defaults.
154 2021-12-16 Martin Liska <mliska@suse.cz>
157 * c-pragma.c (handle_pragma_pop_options): Do not check
158 global options modification when an error is seen in parsing
159 of options (pragmas or attributes).
161 2021-12-12 Jonathan Wakely <jwakely@redhat.com>
163 * known-headers.cc: Define INCLUDE_MEMORY instead of
165 * name-hint.h: Likewise.
166 (class name_hint): Use std::unique_ptr instead of gnu::unique_ptr.
168 2021-12-09 Jakub Jelinek <jakub@redhat.com>
171 * c-pch.c (c_common_no_more_pch): Pass a temporary void * var
172 with NULL value instead of NULL to host_hooks.gt_pch_use_address.
174 2021-12-03 Jakub Jelinek <jakub@redhat.com>
177 * c-pch.c (struct c_pch_validity): Remove pch_init member.
178 (pch_init): Don't initialize v.pch_init.
179 (c_common_valid_pch): Don't warn and punt if .text addresses change.
181 2021-12-01 Jason Merrill <jason@redhat.com>
184 * c.opt: Add -fconstexpr-fp-except.
186 2021-11-29 Richard Biener <rguenther@suse.de>
188 * c-format.c (check_format_string): Remove spurious
191 2021-11-29 Richard Biener <rguenther@suse.de>
193 * c-opts.c (c_common_post_options): Remove unreachable return.
194 * c-pragma.c (handle_pragma_target): Likewise.
195 (handle_pragma_optimize): Likewise.
197 2021-11-25 Jakub Jelinek <jakub@redhat.com>
200 * c-opts.c (c_common_post_options): Enable -Wcomma-subscript by
201 default for C++23 regardless of warn_deprecated.
202 * c-cppbuiltin.c (c_cpp_builtins): Predefine
203 __cpp_multidimensional_subscript=202110L for C++23.
205 2021-11-23 Martin Sebor <msebor@redhat.com>
208 * c.opt: Add -Winfinite-recursion.
210 2021-11-19 Martin Sebor <msebor@redhat.com>
214 * c-common.c (decl_with_nonnull_addr_p): Call maybe_nonzero_address
215 and improve handling tof defined symbols.
217 2021-11-19 Martin Liska <mliska@suse.cz>
220 2021-11-18 Martin Liska <mliska@suse.cz>
222 * c-gimplify.c (genericize_c_loop): Use option directly.
224 2021-11-18 Matthias Kretz <m.kretz@gsi.de>
226 * c-common.c (c_common_reswords): Add __builtin_assoc_barrier.
227 * c-common.h (enum rid): Add RID_BUILTIN_ASSOC_BARRIER.
229 2021-11-18 Martin Liska <mliska@suse.cz>
231 * c-gimplify.c (genericize_c_loop): Use option directly.
233 2021-11-17 Martin Uecker <uecker@gcc.gnu.org>
237 * c-common.c (pointer_int_sum): Make sure pointer expressions
238 are evaluated first when the size expression depends on for
239 variably-modified types.
241 2021-11-17 Marek Polacek <polacek@redhat.com>
243 PR preprocessor/103026
244 * c.opt (Wbidi-chars, Wbidi-chars=): New option.
246 2021-11-16 Jason Merrill <jason@redhat.com>
248 * c-common.c (release_tree_vector): Only cache vecs smaller than
251 2021-11-15 Jason Merrill <jason@redhat.com>
253 * c.opt: Add -fimplicit-constexpr.
254 * c-cppbuiltin.c: Define __cpp_implicit_constexpr.
255 * c-opts.c (c_common_post_options): Disable below C++14.
257 2021-11-15 Jakub Jelinek <jakub@redhat.com>
259 * c-omp.c (c_omp_split_clauses) <case OMP_CLAUSE_THREAD_LIMIT>:
260 Duplicate to both OMP_TARGET and OMP_TEAMS.
262 2021-11-10 Marek Polacek <polacek@redhat.com>
265 * c-pragma.c (handle_pragma_diagnostic): Handle #pragma GCC diagnostic
268 2021-11-09 David Malcolm <dmalcolm@redhat.com>
270 * c-pragma.c (GCC_BAD_AT): New macro.
271 (GCC_BAD2_AT): New macro.
272 (handle_pragma_pack): Use the location of the pertinent token when
273 issuing diagnostics about invalid constants/actions, and trailing
275 (handle_pragma_target): Likewise for non-string "GCC option".
276 (handle_pragma_message): Likewise for trailing junk.
278 2021-11-03 Joseph Myers <joseph@codesourcery.com>
281 * c-common.c (convert_and_check): Add argument init_const. Call
282 convert_init if init_const.
283 * c-common.h (convert_and_check): Update prototype.
284 (convert_init): New prototype.
286 2021-11-01 David Malcolm <dmalcolm@redhat.com>
288 * c-lex.c (c_lex_with_flags): When complaining about non-printable
289 CPP_OTHER tokens, set the "escape on output" flag.
291 2021-10-27 Jakub Jelinek <jakub@redhat.com>
293 * c-omp.c (c_omp_check_loop_iv_r): Don't clear 3rd bit for
295 (c_omp_check_nonrect_loop_iv): Handle POINTER_PLUS_EXPR.
296 (c_omp_check_loop_iv): Set kind even if the iterator is non-integral.
298 2021-10-27 Jakub Jelinek <jakub@redhat.com>
301 * c-common.h (c_omp_check_loop_iv_exprs): Add enum tree_code argument.
302 * c-omp.c (c_omp_check_loop_iv_r): For trees other than decls,
303 TREE_VEC, PLUS_EXPR, MINUS_EXPR, MULT_EXPR, POINTER_PLUS_EXPR or
304 conversions temporarily clear the 3rd bit from d->kind while walking
306 (c_omp_check_loop_iv_exprs): Add CODE argument. Or in 4 into data.kind
307 if possibly non-rectangular.
309 2021-10-21 Jakub Jelinek <jakub@redhat.com>
312 * c-omp.c (c_omp_predefined_variable): Return true also for
313 ubsan_create_data created artificial variables.
315 2021-10-14 Joseph Myers <joseph@codesourcery.com>
317 * c-format.c (printf_length_specs, scanf_length_specs)
318 (print_char_table, scan_char_table): Support DFP formats for C2X.
319 * c-format.h (TEX_D32, TEX_D64, TEX_D128): Remove.
320 (T2X_D32, T2X_D64, T2X_D128): New macros.
322 2021-10-14 Kwok Cheung Yeung <kcy@codesourcery.com>
324 * c-omp.c (c_omp_check_context_selector): Rename to
325 omp_check_context_selector and move to omp-general.c.
326 (c_omp_mark_declare_variant): Rename to omp_mark_declare_variant and
327 move to omp-general.c.
329 2021-10-12 Joseph Myers <joseph@codesourcery.com>
331 * c-format.c (print_char_table): Add %b and %B formats.
332 (scan_char_table): Add %b format.
333 * c-format.h (T2X_UI, T2X_UL, T2X_ULL, T2X_US, T2X_UC, T2X_ST)
334 (T2X_UPD, T2X_UIM): New macros.
336 2021-10-12 Jakub Jelinek <jakub@redhat.com>
338 * c-omp.c (c_finish_omp_atomic): Use
339 clear_padding_type_may_have_padding_p.
341 2021-10-08 Martin Liska <mliska@suse.cz>
343 * c-opts.c (c_common_post_options): Use new macro
346 2021-10-07 Martin Liska <mliska@suse.cz>
348 * c-common.c (parse_optimize_options): Make
349 save_opt_decoded_options a pointer type.
351 2021-10-06 Jakub Jelinek <jakub@redhat.com>
353 PR tree-optimization/102571
354 * c-omp.c (c_finish_omp_atomic): Optimize the case where type has
355 padding, but the non-padding bits are contiguous set of bytes
356 by adjusting the memcmp call arguments instead of emitting
357 __builtin_clear_padding and then comparing all the type's bytes.
359 2021-10-06 Jakub Jelinek <jakub@redhat.com>
362 * c-cppbuiltin.c (c_cpp_builtins): For -std=c++23 predefine
363 __cpp_constexpr to 202110L rather than 201907L.
365 2021-10-04 Marek Polacek <polacek@redhat.com>
368 * c-common.h (do_warn_array_compare): Declare.
369 * c-warn.c (do_warn_array_compare): New.
370 * c.opt (Warray-compare): New option.
372 2021-10-02 Iain Sandoe <iain@sandoe.co.uk>
374 * c-format.c: Remove a test of TARGET_FORMAT_TYPES with
375 NULL, this is not needed.
377 2021-10-01 Martin Sebor <msebor@redhat.com>
380 * c-common.c (decl_with_nonnull_addr_p): Handle members.
381 Check and perform warning suppression.
382 (c_common_truthvalue_conversion): Enhance warning suppression.
384 2021-10-01 Martin Liska <mliska@suse.cz>
387 * c-common.c (parse_optimize_options): decoded_options[0] is
388 used for program name, so merged_decoded_options should also
391 2021-10-01 Jakub Jelinek <jakub@redhat.com>
392 Richard Biener <rguenther@suse.de>
395 * c-ubsan.c (ubsan_instrument_division): Check the right
396 flag_sanitize_recover bit, depending on which sanitization
397 is done. Sanitize INT_MIN / -1 under SANITIZE_SI_OVERFLOW
398 rather than SANITIZE_DIVIDE. If both SANITIZE_SI_OVERFLOW
399 and SANITIZE_DIVIDE is enabled, neither check is known
400 to be false and flag_sanitize_recover bits for those two
401 aren't the same, emit both __ubsan_handle_divrem_overflow
402 and __ubsan_handle_divrem_overflow_abort calls.
404 2021-10-01 Martin Liska <mliska@suse.cz>
406 * c-common.c (parse_optimize_options): Combine optimize
407 options with what was provided on the command line.
409 2021-10-01 Jakub Jelinek <jakub@redhat.com>
411 * c-omp.c (c_omp_split_clauses): Also copy
412 OMP_CLAUSE_ORDER_REPRODUCIBLE.
414 2021-09-27 Martin Liska <mliska@suse.cz>
416 * c-opts.c (c_common_init_options_struct): Set also
417 x_flag_default_complex_method.
419 2021-09-22 Jakub Jelinek <jakub@redhat.com>
421 * c-omp.c (c_omp_split_clauses): Copy over OMP_CLAUSE_ALLOCATE_ALIGN.
423 2021-09-20 Matthias Kretz <m.kretz@gsi.de>
425 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Define or
426 undefine __RECIPROCAL_MATH__, __NO_SIGNED_ZEROS__,
427 __NO_TRAPPING_MATH__, __ASSOCIATIVE_MATH__, and
428 __ROUNDING_MATH__ according to the new optimization flags.
430 2021-09-18 Jakub Jelinek <jakub@redhat.com>
432 * c-omp.c (c_omp_split_clauses): Split order clause also to
433 distribute construct. Copy over OMP_CLAUSE_ORDER_UNCONSTRAINED.
435 2021-09-17 Jakub Jelinek <jakub@redhat.com>
437 * c-omp.c (c_finish_omp_atomic): Avoid creating
438 TARGET_EXPR if test is true, use create_tmp_var_raw instead of
439 create_tmp_var and add a zero initializer to TARGET_EXPRs that
440 had NULL initializer. When omitting operands after v = x,
441 use type of v rather than type of x. Fix type of vtmp
444 2021-09-13 Jason Merrill <jason@redhat.com>
446 * c.opt: Add -Winterference-size.
447 * c-cppbuiltin.c (cpp_atomic_builtins): Add __GCC_DESTRUCTIVE_SIZE
448 and __GCC_CONSTRUCTIVE_SIZE.
450 2021-09-10 Jakub Jelinek <jakub@redhat.com>
452 * c-common.h (c_finish_omp_atomic): Add r and weak arguments.
453 * c-omp.c: Include gimple-fold.h.
454 (c_finish_omp_atomic): Add r and weak arguments. Add support for
457 2021-09-09 qing zhao <qing.zhao@oracle.com>
459 * c-attribs.c (handle_uninitialized_attribute): New function.
460 (c_common_attribute_table): Add "uninitialized" attribute.
462 2021-09-08 liuhongt <hongtao.liu@intel.com>
464 * c-common.c (excess_precision_mode_join): Update below comments.
465 (c_ts18661_flt_eval_method): Set excess_precision_type to
466 EXCESS_PRECISION_TYPE_FLOAT16 when -fexcess-precision=16.
467 * c-cppbuiltin.c (cpp_atomic_builtins): Update below comments.
468 (c_cpp_flt_eval_method_iec_559): Set excess_precision_type to
469 EXCESS_PRECISION_TYPE_FLOAT16 when -fexcess-precision=16.
471 2021-09-07 Marcel Vollweiler <marcel@codesourcery.com>
473 * c-omp.c (c_finish_omp_flush): Handle MEMMODEL_SEQ_CST.
475 2021-09-03 Eric Botcazou <ebotcazou@adacore.com>
477 * c-ada-spec.c (dump_ads): Generate pragmas to disable style checks
478 and -gnatwu warning for the package specification.
480 2021-09-01 Iain Sandoe <iain@sandoe.co.uk>
482 * c-attribs.c (handle_unavailable_attribute): New.
484 2021-08-30 Jason Merrill <jason@redhat.com>
486 * c.opt: Add -Wmissing-requires.
488 2021-08-25 Lewis Hyatt <lhyatt@gmail.com>
491 * c-opts.c (c_common_input_charset_cb): New function.
492 (c_common_post_options): Call new function
493 diagnostic_initialize_input_context().
495 2021-08-20 Tobias Burnus <tobias@codesourcery.com>
497 * c-format.c (gcc_gfc_length_specs): Add 'll' and 'w'.
498 (gcc_gfc_char_table): Add T9L_LL and T9L_ULL to
499 "di" and "u", respecitively; fill with BADLEN to match
501 (get_init_dynamic_hwi): Split off from ...
502 (init_dynamic_diag_info): ... here. Call it.
503 (init_dynamic_gfc_info): Call it.
505 2021-08-20 Jakub Jelinek <jakub@redhat.com>
507 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_ERROR.
508 * c-pragma.c (omp_pragmas): Add error directive.
509 * c-omp.c (omp_directives): Uncomment error directive entry.
511 2021-08-18 Jakub Jelinek <jakub@redhat.com>
513 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_NOTHING.
514 * c-pragma.c (omp_pragmas): Add nothing directive.
515 * c-omp.c (omp_directives): Uncomment nothing directive entry.
517 2021-08-17 Jakub Jelinek <jakub@redhat.com>
520 * c-common.h (enum rid): Add RID_IS_LAYOUT_COMPATIBLE.
521 * c-common.c (c_common_reswords): Add __is_layout_compatible.
523 2021-08-17 Matt Jacobson <mhjacobson@me.com>
525 * c-opts.c (c_common_post_options): Default to
526 flag_objc_sjlj_exceptions = 1 only when flag_objc_abi < 2.
528 2021-08-17 Jakub Jelinek <jakub@redhat.com>
530 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_SCOPE.
531 * c-pragma.c (omp_pragmas): Add scope construct.
532 * c-omp.c (omp_directives): Uncomment scope directive entry.
534 2021-08-16 Sebastian Huber <sebastian.huber@embedded-brains.de>
536 * c-cppbuiltin.c (c_cpp_builtins): Define
537 __LIBGCC_GCOV_TYPE_SIZE if flag_building_libgcc is true.
539 2021-08-12 Jakub Jelinek <jakub@redhat.com>
541 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_MASKED.
542 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_FILTER.
543 * c-pragma.c (omp_pragmas_simd): Add masked construct.
544 * c-common.h (enum c_omp_clause_split): Add C_OMP_CLAUSE_SPLIT_MASKED
546 (c_finish_omp_masked): Declare.
547 * c-omp.c (c_finish_omp_masked): New function.
548 (c_omp_split_clauses): Handle combined masked constructs.
550 2021-07-30 Jakub Jelinek <jakub@redhat.com>
553 * c-common.h (enum rid): Add RID_IS_POINTER_INTERCONVERTIBLE_BASE_OF.
554 * c-common.c (c_common_reswords): Add
555 __is_pointer_interconvertible_base_of.
557 2021-07-29 Richard Biener <rguenther@suse.de>
560 * c-common.c (c_common_mark_addressable_vec): Look through
561 C_MAYBE_CONST_EXPR even if not at the toplevel.
563 2021-07-27 Martin Sebor <msebor@redhat.com>
566 * c-warn.c (warn_parm_ptrarray_mismatch): Use OEP_DECL_NAME.
568 2021-07-23 Jakub Jelinek <jakub@redhat.com>
570 * c-lex.c (c_common_has_attribute): Call canonicalize_attr_name also
571 on attr_id. Return 1 for omp::directive or omp::sequence in C++11
574 2021-07-23 Jakub Jelinek <jakub@redhat.com>
576 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP__START_ and
577 PRAGMA_OMP__LAST_ enumerators.
579 2021-07-21 Thomas Schwinge <thomas@codesourcery.com>
580 Joseph Myers <joseph@codesourcery.com>
581 Cesar Philippidis <cesar@codesourcery.com>
583 * c-pragma.h (pragma_omp_clause): Add 'PRAGMA_OACC_CLAUSE_NOHOST'.
585 2021-07-20 Martin Sebor <msebor@redhat.com>
587 * c-common.c (c_build_shufflevector): Adjust by-value argument to
589 * c-common.h (c_build_shufflevector): Same.
591 2021-07-16 Andrew Pinski <apinski@marvell.com>
594 * c-common.c (parse_optimize_options): Use the correct
597 2021-07-15 Martin Sebor <msebor@redhat.com>
601 * c-warn.c (warn_parm_array_mismatch): Use OEP_DECL_NAME.
603 2021-07-14 Jason Merrill <jason@redhat.com>
605 * c-opts.c (c_common_post_options): Set -fdelete-dead-exceptions.
607 2021-07-06 Martin Sebor <msebor@redhat.com>
609 * c-format.c (gcc_tdiag_char_table): Remove support for %G and %K.
610 (gcc_cdiag_char_table): Same.
611 (gcc_cxxdiag_char_table): Same.
613 2021-07-02 Jakub Jelinek <jakub@redhat.com>
615 * c-common.h (enum c_omp_directive_kind): New enum.
616 (struct c_omp_directive): New type.
617 (c_omp_categorize_directive): Declare.
618 * c-omp.c (omp_directives): New variable.
619 (c_omp_categorize_directive): New function.
621 2021-07-01 Eric Botcazou <ebotcazou@adacore.com>
623 * c-ada-spec.c (packed_layout): New global variable.
624 (dump_ada_declaration): Set it upon seeing a packed record type.
625 Do not put the "aliased" keyword if it is set.
626 (dump_ada_structure): Add Pack aspect if it is set and clear it.
628 2021-07-01 Eric Botcazou <ebotcazou@adacore.com>
630 * c-ada-spec.c (check_name): Rename into...
631 (check_type_name_conflict): ...this. Minor tweak.
632 (dump_ada_function_declaration): Adjust to above renaming.
633 (dump_ada_array_domains): Fix oversight.
634 (dump_ada_declaration): Call check_type_name_conflict for variables.
636 2021-06-25 Martin Sebor <msebor@redhat.com>
638 * c-common.c (c_wrap_maybe_const): Remove TREE_NO_WARNING.
639 (c_common_truthvalue_conversion): Replace direct uses of
640 TREE_NO_WARNING with warning_suppressed_p, suppress_warning, and
642 (check_function_arguments_recurse): Same.
643 * c-gimplify.c (c_gimplify_expr): Same.
644 * c-warn.c (overflow_warning): Same.
645 (warn_logical_operator): Same.
646 (warn_if_unused_value): Same.
647 (do_warn_unused_parameter): Same.
649 2021-06-24 Jakub Jelinek <jakub@redhat.com>
651 * c-common.h (enum c_omp_region_type): Add C_ORT_TARGET and
653 * c-omp.c (c_omp_split_clauses): For OMP_CLAUSE_IN_REDUCTION on
654 combined target constructs also add map (always, tofrom:) clause.
656 2021-06-15 Robin Dapp <rdapp@linux.ibm.com>
658 * c-attribs.c (common_handle_aligned_attribute): Remove short
659 circuit and dead code.
661 2021-06-14 Jonathan Wakely <jwakely@redhat.com>
664 * known-headers.cc (get_stdlib_header_for_name): Add known
665 headers for EXIT_FAILURE, EXIT_SUCCESS, abort, atexit, calloc,
668 2021-06-12 Jason Merrill <jason@redhat.com>
670 * c-attribs.c (handle_unused_attribute): Handle FIELD_DECL.
672 2021-06-11 Jakub Jelinek <jakub@redhat.com>
675 * c-cppbuiltin.c (c_cpp_builtins): Predefine __cpp_if_consteval for
676 -std=c++2b for P1938R3 consteval if support.
678 2021-06-09 Jason Merrill <jason@redhat.com>
681 * c-warn.c (warn_for_sign_compare): Remove C++ enum mismatch
684 2021-06-07 Martin Liska <mliska@suse.cz>
686 * c-target.def: Split long lines and replace them
689 2021-06-04 Martin Sebor <msebor@redhat.com>
692 * c-attribs.c (positional_argument): Bail on erroneous types.
694 2021-06-04 Martin Sebor <msebor@redhat.com>
696 * c-warn.c (warn_parm_array_mismatch): Check TREE_PURPOSE to test
697 for element presence.
699 2021-06-03 Eric Botcazou <ebotcazou@adacore.com>
701 * c-ada-spec.c (dump_ada_macros): Minor tweaks.
702 (dump_ada_decl_name): Likewise.
703 (dump_anonymous_type_name): Remove parent parameter and adjust.
704 (dump_sloc): Minor tweak.
705 (dump_ada_array_type): Remove type parameter and adjust.
706 (dump_ada_enum_type): Remove parent parameter and adjust.
707 (dump_ada_node): Adjust calls to above functions.
708 (dumped_anonymous_types): New global variable.
709 (dump_nested_types_1): Rename into...
710 (dump_nested_types): ...this.
711 (dump_nested_type): Remove parent and dumped_types parameters.
712 <ARRAY_TYPE>: Replace dumped_types with dumped_anonymous_types.
713 Adjust calls to dump_anonymous_type_name and dump_ada_array_type.
714 (dump_ada_specs): Initialize and free dumped_anonymous_types.
716 2021-06-03 Eric Botcazou <ebotcazou@adacore.com>
718 * c-ada-spec.c (pp_ada_tree_identifier): Tidy up.
719 (dump_ada_node) <POINTER_TYPE>: Deal specially with external subtypes.
721 2021-06-03 Eric Botcazou <ebotcazou@adacore.com>
723 * c-ada-spec.c (dump_ada_enum_type): Dump a prefix for constants.
724 (htable_t): New typedef.
725 (overloaded_names): Use it.
726 (add_name): New function.
727 (init_overloaded_names): Use add_name to populate the table and add
728 special cases for sigaction and stat.
729 (overloaded_name_p): Rename into...
730 (overloading_index): ...this. Do not initialize overloaded_names table
731 here. Return the index or zero.
732 (dump_ada_declaration): Minor tweaks. Do not skip overloaded functions
733 but add an overloading suffix instead.
734 (dump_ada_specs): Initialize overloaded_names tables here.
736 2021-06-01 Martin Liska <mliska@suse.cz>
739 * c-attribs.c (handle_optimize_attribute): Limit sanity check
740 to a situation where we are not in processing of an optimize
742 * c-pragma.c (handle_pragma_pop_options): Restore target
745 2021-05-31 Indu Bhagat <indu.bhagat@oracle.com>
748 * c-pch.c (c_common_valid_pch): Use xstrdup for debug format set names.
750 2021-05-31 Richard Biener <rguenther@suse.de>
753 * c-common.c: Include tree-vector-builder.h and
755 (c_common_reswords): Add __builtin_shufflevector.
756 (c_build_shufflevector): New funtion.
757 * c-common.h (enum rid): Add RID_BUILTIN_SHUFFLEVECTOR.
758 (c_build_shufflevector): Declare.
760 2021-05-28 Jakub Jelinek <jakub@redhat.com>
763 * c-omp.c (c_omp_split_clauses): For reduction clause if combined with
764 target add a map tofrom clause with OMP_CLAUSE_MAP_IMPLICIT.
766 2021-05-28 Tobias Burnus <tobias@codesourcery.com>
768 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_AFFINITY.
770 2021-05-25 Martin Liska <mliska@suse.cz>
772 PR tree-optimization/92860
774 * c-attribs.c (handle_optimize_attribute): Save target node
775 before calling parse_optimize_options and save it in case
777 * c-pragma.c (handle_pragma_target): Similarly for pragma.
778 (handle_pragma_pop_options): Likewise here.
780 2021-05-25 Martin Liska <mliska@suse.cz>
782 * c-attribs.c (handle_no_sanitize_coverage_attribute): New.
784 2021-05-25 Jakub Jelinek <jakub@redhat.com>
787 * c-omp.c (c_omp_split_clauses): Copy reduction to teams when teams is
788 combined with simd and not with taskloop or for.
790 2021-05-21 Jakub Jelinek <jakub@redhat.com>
793 * c-omp.c (c_omp_split_clauses): Set OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT
794 on firstprivate clause copy going to target construct, and for
795 target simd set also OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT_TARGET bit.
797 2021-05-20 Jonathan Wakely <jwakely@redhat.com>
799 * c.opt (Wc++11-extensions, Wc++14-extensions)
800 (Wc++17-extensions, Wc++20-extensions, Wc++23-extensions): New
803 2021-05-20 Indu Bhagat <indu.bhagat@oracle.com>
805 * c-lex.c (init_c_lex): Use dwarf_debuginfo_p.
807 2021-05-20 Indu Bhagat <indu.bhagat@oracle.com>
809 * c-opts.c (c_common_post_options): Adjust access to debug_type_names.
810 * c-pch.c (struct c_pch_validity): Use type uint32_t.
811 (pch_init): Renamed member.
812 (c_common_valid_pch): Adjust access to debug_type_names.
814 2021-05-19 Martin Sebor <msebor@redhat.com>
817 * c-attribs.c (build_attr_access_from_parms): Handle arbitrarily many
820 2021-05-18 Richard Biener <rguenther@suse.de>
823 * c-attribs.c (type_valid_for_vector_size): Reject too large nunits.
824 Reword existing nunit diagnostic.
826 2021-05-17 Joern Rennecke <joern.rennecke@embecosm.com>
828 * c-common.c (braced_list_to_string): Return CTOR unchanged
829 if host and target character sizes don't match.
831 2021-05-14 Martin Liska <mliska@suse.cz>
833 * c.opt: Add Warning keyword for 2 options.
835 2021-05-13 Martin Liska <mliska@suse.cz>
838 * c-attribs.c (handle_target_clones_attribute): Expect a string
839 argument to target_clone argument.
841 2021-05-11 Joseph Myers <joseph@codesourcery.com>
843 * c-lex.c (interpret_float): Handle digit separators for C2X.
845 2021-05-10 Martin Liska <mliska@suse.cz>
847 * c-ada-spec.c (print_destructor): Use startswith
848 function instead of strncmp.
849 (dump_ada_declaration): Likewise.
850 * c-common.c (disable_builtin_function): Likewise.
851 (def_builtin_1): Likewise.
852 * c-format.c (check_tokens): Likewise.
853 (check_plain): Likewise.
854 (convert_format_name_to_system_name): Likewise.
856 2021-04-28 Patrick McGehearty <patrick.mcgehearty@oracle.com>
858 * c-cppbuiltin.c (c_cpp_builtins): Add supporting macros for new
861 2021-04-26 Thomas Schwinge <thomas@codesourcery.com>
862 Nathan Sidwell <nathan@codesourcery.com>
863 Tom de Vries <vries@codesourcery.com>
864 Julian Brown <julian@codesourcery.com>
865 Kwok Cheung Yeung <kcy@codesourcery.com>
867 * c.opt (Wopenacc-parallelism): New.
869 2021-04-19 Thomas Schwinge <thomas@codesourcery.com>
871 * c.opt (fopenacc-kernels=): Remove.
873 2021-04-08 Jakub Jelinek <jakub@redhat.com>
875 * c-warn.c (do_warn_double_promotion): Fix comment typo,
877 (check_alignment_of_packed_member): Fix a comment typo,
879 (warn_parm_ptrarray_mismatch): Fix comment typos, os -> of
880 and onless -> unless.
881 (warn_parm_array_mismatch): Fix comment typos, declaratation
882 -> declaration and woud -> would. Fix up comment indentation.
884 2021-04-08 Martin Sebor <msebor@redhat.com>
887 * c.opt (Wmismatched-new-delete): Correct spelling.
889 2021-04-05 Eric Botcazou <ebotcazou@adacore.com>
891 * c-ada-spec.c (is_simple_enum): Minor tweaks.
892 (dump_ada_enum_type): Add TYPE and PARENT parameters. For non-simple
893 enumeral types use again the type name for the enumeration constants.
894 (dump_ada_node): Adjust call to dump_ada_enum_type.
895 (dump_nested_type): Likewise.
897 2021-04-01 Jason Merrill <jason@redhat.com>
900 * c-opts.c (c_common_post_options): Bump latest_abi_version.
902 2021-03-25 Jakub Jelinek <jakub@redhat.com>
905 * c-warn.c (do_warn_duplicated_branches): Pass also
906 OEP_ADDRESS_OF_SAME_FIELD to operand_equal_p.
908 2021-03-20 Jakub Jelinek <jakub@redhat.com>
911 * c-gimplify.c (c_genericize_control_stmt): Handle STATEMENT_LIST.
913 2021-03-05 Eric Botcazou <ebotcazou@adacore.com>
915 * c-ada-spec.c (dump_ada_declaration) <TYPE_DECL>: Dump nested types
916 after entering the separate class package, if any.
918 2021-03-04 Richard Biener <rguenther@suse.de>
920 * c-pretty-print.c (c_pretty_printer::direct_abstract_declarator):
923 2021-03-04 Jakub Jelinek <jakub@redhat.com>
926 * c-ppoutput.c (print): Change src_line type from int to unsigned.
927 (token_streamer::stream) Likewise.
928 (maybe_print_line_1): Likewise. Don't strcmp src_file if src_loc is
931 2021-03-03 Jakub Jelinek <jakub@redhat.com>
934 * c-common.c (build_va_arg): Call c_common_mark_addressable_vec
935 instead of mark_addressable. Fix a comment typo -
936 neutrallly -> neutrally.
938 2021-02-28 Jakub Jelinek <jakub@redhat.com>
941 * c-attribs.c (handle_malloc_attribute): Fix a typo in inform
942 message - refernced -> referenced. Remove superfluous space before
943 closing paren of function calls.
945 2021-02-25 Nathan Sidwell <nathan@acm.org>
948 * c.opt (-flang-info-module-cmi): Renamed option.
950 2021-02-19 Nathan Sidwell <nathan@acm.org>
952 * c.opt (flang-info-module-read, flang-info-module-read=): New.
954 2021-02-18 H.J. Lu <hjl.tools@gmail.com>
957 * c-attribs.c (c_common_attribute_table): Add the "retain"
959 (handle_retain_attribute): New function.
961 2021-02-16 Marek Polacek <polacek@redhat.com>
964 * c-attribs.c (handle_assume_aligned_attribute): Check that the
965 alignment argument is non-negative. Tweak a warning message.
967 2021-02-12 Martin Sebor <msebor@redhat.com>
970 * c-warn.c (warn_parm_array_mismatch): Free strings returned from
971 print_generic_expr_to_str.
973 2021-02-10 Richard Biener <rguenther@suse.de>
975 * c-common.c (parse_optimize_options): Free decoded_options.
977 2021-02-04 emsr <3dw4rd@verizon.net>
979 * c-cppbuiltin.c (c_cpp_builtins): __cpp_size_t_suffix=202011L.
981 2021-02-03 Ed Smith-Rowland <3dw4rd@verizon.net>
983 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_size_t_suffix.
984 * c-lex.c (interpret_integer): Set node type for size literal.
986 2021-01-28 Jakub Jelinek <jakub@redhat.com>
988 * c.opt (-std=c++2a, -std=c++20, -std=gnu++2a, -std=gnu++20): Remove
989 draft from description.
990 (-std=c++2b): Fix a pasto, 2020 -> 2023.
992 2021-01-26 Paul Fee <paul.f.fee@gmail.com>
994 * c-common.h (cxx_dialect): Add cxx23 as a dialect.
995 * c.opt: Add options for -std=c++23, std=c++2b, -std=gnu++23
997 * c-opts.c (set_std_cxx23): New.
998 (c_common_handle_option): Set options when -std=c++23 is enabled.
999 (c_common_post_options): Adjust comments.
1000 (set_std_cxx20): Likewise.
1002 2021-01-25 Martin Sebor <msebor@redhat.com>
1005 * c-common.c (check_nonnull_arg): Adjust warning text.
1007 2021-01-17 Martin Sebor <msebor@redhat.com>
1009 * c-pretty-print.c (c_pretty_printer::primary_expression): Don't
1010 assume SSA_NAME_IDENTIFIER evaluates to nonzero.
1012 2021-01-16 Kwok Cheung Yeung <kcy@codesourcery.com>
1014 * c-pragma.h (pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_DETACH.
1015 Redefine PRAGMA_OACC_CLAUSE_DETACH.
1017 2021-01-15 Jakub Jelinek <jakub@redhat.com>
1019 PR tree-optimization/98597
1020 * c-pretty-print.c: Include options.h.
1021 (c_fold_indirect_ref_for_warn): New function.
1022 (print_mem_ref): Use it. If it returns something that has compatible
1023 type and is TBAA compatible with zero offset, print it and return,
1024 otherwise print it using offsetof syntax or array ref syntax. Fix up
1025 printing if MEM_REFs first operand is ADDR_EXPR, or when the first
1026 argument has pointer to array type. Print pointers using the standard
1029 2021-01-12 Martin Sebor <msebor@redhat.com>
1033 * c-pretty-print.c (print_mem_ref): Avoid assuming MEM_REF operand
1034 has pointer type. Remove redundant code. Avoid calling
1035 gimple_canonical_types_compatible_p.
1037 2021-01-07 Martin Sebor <msebor@redhat.com>
1040 * c-pretty-print.c (print_mem_ref): Strip array from access type.
1041 Avoid assuming acces type's size is constant. Correct condition
1042 guarding the printing of a parenthesis.
1044 2021-01-06 Martin Sebor <msebor@redhat.com>
1047 * c-pretty-print.c (c_pretty_printer::primary_expression): For
1048 SSA_NAMEs print VLA names and GIMPLE defining statements.
1049 (print_mem_ref): New function.
1050 (c_pretty_printer::unary_expression): Call it.
1052 2021-01-06 Richard Biener <rguenther@suse.de>
1054 PR tree-optimization/95582
1055 * c-attribs.c (c_common_attribute_table): Add entry for
1056 signed_bool_precision.
1057 (handle_signed_bool_precision_attribute): New.
1059 2020-12-24 Iain Sandoe <iain@sandoe.co.uk>
1061 * c.opt: Add -stdlib= option and enumerations for
1062 libstdc++ and libc++.
1064 2020-12-16 Martin Liska <mliska@suse.cz>
1066 * c.opt: Remove usage of Report.
1068 2020-12-14 Martin Sebor <msebor@redhat.com>
1073 * c-attribs.c (maybe_add_noinline): New function.
1074 (handle_malloc_attribute): Call it. Use ATTR_FLAG_INTERNAL.
1075 Implicitly add attribute noinline to functions not declared inline
1078 2020-12-09 Tobias Burnus <tobias@codesourcery.com>
1080 * c-pragma.c (omp_pragmas): Add 'allocate'.
1081 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_ALLOCATE.
1083 2020-12-08 Jakub Jelinek <jakub@redhat.com>
1086 * c-pragma.c (omp_pragmas): Remove "master".
1087 (omp_pragmas_simd): Add "master".
1089 2020-12-07 Marek Polacek <polacek@redhat.com>
1092 * c-common.c (verify_tree_lim_r): New function.
1093 (verify_sequence_points): Use it. Use nullptr instead of 0.
1095 2020-12-03 Martin Sebor <msebor@redhat.com>
1099 * c-attribs.c (handle_dealloc_attribute): New function.
1100 (handle_malloc_attribute): Handle argument forms of attribute.
1101 * c.opt (-Wmismatched-dealloc): New option.
1102 (-Wmismatched-new-delete): New option.
1104 2020-12-03 Jakub Jelinek <jakub@redhat.com>
1107 * c-common.h (enum rid): Add RID_BUILTIN_BIT_CAST.
1108 * c-common.c (c_common_reswords): Add __builtin_bit_cast.
1110 2020-12-01 JeanHeyd Meneide <phdofthehouse@gmail.com>
1112 * c-cppbuiltin.c (c_cpp_builtins): Add predefined
1113 {__GNUC_EXECUTION_CHARSET_NAME} and
1114 _WIDE_EXECUTION_CHARSET_NAME} macros.
1116 2020-12-01 Nathan Sidwell <nathan@acm.org>
1118 * c-common.c (module, import, export): New internal tokens (with
1120 * c-common.h (RID__MODULE, RID__IMPORT & RID__EXPORT): Enumerate
1122 (D_CXX_MODULES, D_CXX_MODULES_FLAGS): Enable them.
1123 * c-cppbuiltin.c (c_cpp_builtins): Feature macro.
1125 2020-12-01 Nathan Sidwell <nathan@acm.org>
1127 * c-opts.c (c_common_init_options): Ask for module dependencies.
1128 (c_common_handle_option): Handle -Mmodules -Mno-modules.
1129 * c-pch.c (c_common_valid_pch): ... does not play with C++
1131 * c.opt (Mmodules, Mno-modules): New preprocessor dependency
1133 (fmodules-ts, fmodule-header, fmodule-implicit-inline)
1134 (fmodule-only, fmodule-mapper, fmodule-lazy)
1135 (fmodule-version-ignore, Winvalid-imported-macros)
1136 (flang-info-include-translate, flang-info-include-translate-not):
1139 2020-11-28 Eric Botcazou <ebotcazou@adacore.com>
1141 * c-ada-spec.c (dump_nested_type) <RECORD_TYPE>: Remove obsolete code.
1142 (dump_ada_structure): Also deal with convention, unchecked union and
1143 bit-field for nested types. In the latter case, print an Alignment
1144 aspect along with the Pack aspect.
1146 2020-11-25 Martin Sebor <msebor@redhat.com>
1149 * c-attribs.c (handle_patchable_function_entry_attribute): Avoid
1152 2020-11-24 Martin Sebor <msebor@redhat.com>
1154 * c-warn.c (warn_parm_array_mismatch): Avoid invalid redeclarations.
1156 2020-11-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
1158 * c-attribs.c (handle_special_var_sec_attribute): New.
1159 (handle_noinit_attribute): Remove.
1160 (attr_noinit_exclusions): Rename to...
1161 (attr_section_exclusions): ...this, and add "persistent" attribute
1163 (c_common_attribute_table): Add "persistent" attribute.
1165 2020-11-21 Aaron Sawdey <acsawdey@linux.ibm.com>
1167 * c-pretty-print.c (c_pretty_printer::simple_type_specifier):
1168 Treat opaque types like other types.
1169 (c_pretty_printer::direct_abstract_declarator): Opaque types are
1172 2020-11-20 Martin Sebor <msebor@redhat.com>
1174 * c-warn.c (warn_parm_array_mismatch): Bail on invalid redeclarations
1175 with fewer arguments.
1177 2020-11-20 Martin Sebor <msebor@redhat.com>
1180 * c-attribs.c (handle_access_attribute): Handle ATTR_FLAG_INTERNAL.
1181 Error out on invalid modes.
1183 2020-11-20 Jakub Jelinek <jakub@redhat.com>
1186 * c-common.c (check_builtin_function_arguments): Handle
1187 BUILT_IN_CLEAR_PADDING.
1189 2020-11-18 Nathan Sidwell <nathan@acm.org>
1191 * c-lex.c (c_lex_with_flags): CPP_HEADER_NAMEs can now be seen.
1193 2020-11-17 Nathan Sidwell <nathan@acm.org>
1195 * c-common.h (enum c_tree_index): Reorder to place lazy fields
1196 after newly-added CTI_MODULE_HWM.
1198 2020-11-17 Joseph Myers <joseph@codesourcery.com>
1200 * c-cppbuiltin.c (builtin_define_float_constants): Define
1201 "*_IS_IEC_60559__" macros.
1203 2020-11-17 Nathan Sidwell <nathan@acm.org>
1205 * c-lex.c: #include "langhooks.h".
1206 (cb_undef): Maybe call preprocess_undef lang hook.
1207 * c-opts.c (c_common_post_options): Maybe call preprocess_options
1209 (push_command_line_include): Maybe call preprocess_main_file lang
1211 (cb_file_change): Likewise.
1212 * c-ppoutput.c: #include "langhooks.h.
1213 (scan_translation_unit): Maybe call preprocess_token lang hook.
1214 (class do_streamer): New, derive from token_streamer.
1215 (directives_only_cb): Data pointer is do_streamer, call
1216 preprocess_token lang hook.
1217 (scan_translation_unit_directives_only): Use do_streamer.
1218 (print_line_1): Move src_line recording to after string output.
1219 (cb_undef): Maybe call preprocess_undef lang hook.
1221 2020-11-17 Nathan Sidwell <nathan@acm.org>
1223 * c-ppoutput.c (scan_translation_unit): Use token_streamer, remove
1224 code duplicating that functionality.
1226 2020-11-17 Jakub Jelinek <jakub@redhat.com>
1229 * c-common.c (check_builtin_function_arguments)
1230 <case BUILT_IN_ADD_OVERFLOW>: Diagnose when last argument is pointer
1231 to _Atomic. For the TYPE_READONLY case, adjust message to be usable
1232 for more builtins and argument positions.
1234 2020-11-16 Iain Sandoe <iain@sandoe.co.uk>
1237 * stub-objc.c: Include c-common.h to declare enum rid.
1239 2020-11-13 Jakub Jelinek <jakub@redhat.com>
1242 * c-cppbuiltin.c: Include configargs.h.
1243 (c_cpp_builtins): For C++11 and later if THREAD_MODEL_SPEC is not
1244 defined, predefine __STDCPP_THREADS__ to 1 unless thread_model is
1247 2020-11-13 Gergö Barany <gergo@codesourcery.com>
1248 Thomas Schwinge <thomas@codesourcery.com>
1250 * c.opt (fopenacc-kernels): Add.
1252 2020-11-13 Jason Merrill <jason@redhat.com>
1254 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_using_enum.
1256 2020-11-13 Piotr H. Dabrowski <phd@phd.re>
1259 * c-cppbuiltin.c: c_cpp_builtins_optimize_pragma(): use cpp_define_unused()
1261 2020-11-13 Martin Liska <mliska@suse.cz>
1263 * c-attribs.c (build_attr_access_from_parms): Format properly.
1265 2020-11-13 Iain Sandoe <iain@sandoe.co.uk>
1268 * c-common.c (c_common_reswords): null_unspecified, nullable,
1269 nonnull, null_resettable: New keywords.
1270 * c-common.h (enum rid): RID_NULL_UNSPECIFIED, RID_NULLABLE,
1271 RID_NONNULL, RID_NULL_RESETTABLE: New.
1272 (OBJC_IS_PATTR_KEYWORD): Include nullability keywords in the
1273 ranges accepted for property attributes.
1274 * c-attribs.c (handle_objc_nullability_attribute): New.
1275 * c-objc.h (enum objc_property_attribute_group): Add
1276 OBJC_PROPATTR_GROUP_NULLABLE.
1277 (enum objc_property_attribute_kind):Add
1278 OBJC_PROPERTY_ATTR_NULL_UNSPECIFIED, OBJC_PROPERTY_ATTR_NULLABLE,
1279 OBJC_PROPERTY_ATTR_NONNULL, OBJC_PROPERTY_ATTR_NULL_RESETTABLE.
1281 2020-11-13 Iain Sandoe <iain@sandoe.co.uk>
1284 * c-attribs.c (handle_objc_root_class_attribute): New
1285 * c-objc.h (objc_start_class_interface): Add a location
1286 value for the position of the class name.
1287 * c.opt: Add Wobjc-root-class.
1288 * stub-objc.c (objc_start_class_interface): Add a location
1289 value for the position of the class name.
1291 2020-11-12 Joseph Myers <joseph@codesourcery.com>
1293 * c-lex.c (c_common_has_attribute): Take argument std_syntax.
1294 Allow scope for C. Handle standard attributes for C. Do not
1295 accept unscoped attributes if std_syntax and not handled as
1296 standard attributes.
1297 * c-common.h (c_common_has_attribute): Update prototype.
1299 2020-11-12 Nicholas Guriev <guriev-ns@ya.ru>
1302 * c-pch.c (c_common_valid_pch): Use cpp_warning with CPP_W_INVALID_PCH
1303 reason to fix -Werror=invalid-pch and -Wno-error=invalid-pch switches.
1305 2020-11-11 Patrick Palka <ppalka@redhat.com>
1308 * c-opts.c (c_common_post_options): Update latest_abi_version.
1310 2020-11-10 Jakub Jelinek <jakub@redhat.com>
1313 * c-common.h (warn_if_unused_value): Add quiet argument defaulted
1315 * c-warn.c (warn_if_unused_value): Likewise. Pass it down
1316 recursively and just return true instead of warning if it is true.
1317 Handle COMPLEX_EXPR.
1319 2020-11-10 Chung-Lin Tang <cltang@codesourcery.com>
1321 * c-common.h (c_omp_adjust_map_clauses): New declaration.
1322 * c-omp.c (struct map_clause): Helper type for c_omp_adjust_map_clauses.
1323 (c_omp_adjust_map_clauses): New function.
1325 2020-11-09 Marek Polacek <polacek@redhat.com>
1328 * c-common.c (attribute_fallthrough_p): Tweak the warning
1331 2020-11-09 Patrick Palka <ppalka@redhat.com>
1333 * c-pragma.c (handle_pragma_diagnostic): Split the
1334 unknown-option -Wpragmas diagnostic into a warning and a
1335 subsequent note containing a spelling suggestion. Avoid
1336 computing the suggestion if -Wpragmas warnings are being
1339 2020-11-09 Patrick Palka <ppalka@redhat.com>
1342 * c-indentation.c (get_visual_column): Remove location_t
1343 parameter. Move the column-tracking diagnostic code from here
1345 (should_warn_for_misleading_indentation): ... here, before the
1346 early exit for when the loci are not all distinct. Don't pass a
1347 location_t argument to get_visual_column.
1348 (assert_get_visual_column_succeeds): Don't pass a location_t
1349 argument to get_visual_column.
1350 (assert_get_visual_column_fails): Likewise.
1352 2020-11-08 Iain Sandoe <iain@sandoe.co.uk>
1354 * c-common.h (OBJC_IS_PATTR_KEYWORD): Add class to the list
1355 of keywords accepted in @property attribute contexts.
1356 * c-objc.h (enum objc_property_attribute_group): Add
1357 OBJC_PROPATTR_GROUP_CLASS.
1358 (enum objc_property_attribute_kind): Add
1359 OBJC_PROPERTY_ATTR_CLASS.
1361 2020-11-07 Iain Sandoe <iain@sandoe.co.uk>
1363 * c-common.c (c_common_reswords): Add 'atomic' property
1365 * c-common.h (enum rid): Add RID_PROPATOMIC for atomic
1366 property attributes.
1368 2020-11-07 Iain Sandoe <iain@sandoe.co.uk>
1370 * c-attribs.c (handle_nsobject_attribute): New.
1371 * c.opt: Add WNSObject-attribute.
1373 2020-11-06 Iain Sandoe <iain@sandoe.co.uk>
1375 * c-objc.h (enum objc_property_attribute_group): New
1376 (enum objc_property_attribute_kind): New.
1377 (OBJC_PROPATTR_GROUP_MASK): New.
1378 (struct property_attribute_info): Small class encapsulating
1379 parser output from property attributes.
1380 (objc_prop_attr_kind_for_rid): New
1381 (objc_add_property_declaration): Simplify interface.
1382 * stub-objc.c (enum rid): Dummy type.
1383 (objc_add_property_declaration): Simplify interface.
1384 (objc_prop_attr_kind_for_rid): New.
1386 2020-11-06 Nathan Sidwell <nathan@acm.org>
1388 * c-ada-spec.c (collect_ada_nodes): Rename
1389 DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
1390 (collect_ada_node): Likewise.
1391 (dump_forward_type): Likewise.
1392 * c-common.c (set_underlying_type): Rename
1393 DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
1394 (user_facing_original_type, c_common_finalize_early_debug): Likewise.
1396 2020-11-06 Jakub Jelinek <jakub@redhat.com>
1398 * c-common.c (verify_sequence_points): Remove DEBUG_FUNCTION.
1400 2020-11-05 Marek Polacek <polacek@redhat.com>
1403 * c.opt (Wexceptions): New option.
1405 2020-11-05 Marek Polacek <polacek@redhat.com>
1408 * c.opt (Wvexing-parse): New option.
1410 2020-11-04 Jakub Jelinek <jakub@redhat.com>
1413 * c-omp.c (c_omp_split_clauses): Look through array reductions to find
1414 underlying decl to clear in the allocate_head bitmap.
1416 2020-11-04 Iain Sandoe <iain@sandoe.co.uk>
1418 * c-objc.h (objc_non_constant_expr_p): New.
1419 * stub-objc.c (objc_non_constant_expr_p): New.
1421 2020-11-03 Nathan Sidwell <nathan@acm.org>
1423 * c.opt (MQ,MT): Reword description to be make-agnostic.
1425 2020-11-02 Nathan Sidwell <nathan@acm.org>
1427 * c-opts.c (c_common_post_options): Move var decl to its
1428 initialization point.
1430 2020-11-01 Iain Sandoe <iain@sandoe.co.uk>
1432 * c-lex.c (c_lex_with_flags): When combining '@' with a
1433 keyword for Objective-C, combine the location ranges too.
1435 2020-10-30 Qing Zhao <qing.zhao@oracle.com>
1436 H.J.Lu <hjl.tools@gmail.com>
1438 * c-attribs.c (c_common_attribute_table): Add new attribute
1439 zero_call_used_regs.
1440 (handle_zero_call_used_regs_attribute): New function.
1442 2020-10-28 Marek Polacek <polacek@redhat.com>
1445 * c-opts.c (c_common_post_options): In C++20, turn on
1446 -Wdeprecated-enum-enum-conversion and
1447 -Wdeprecated-enum-float-conversion.
1448 * c.opt (Wdeprecated-enum-enum-conversion,
1449 Wdeprecated-enum-float-conversion): New options.
1450 (Wenum-conversion): Allow for C++ too.
1452 2020-10-28 Jakub Jelinek <jakub@redhat.com>
1454 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ALLOCATE.
1455 * c-omp.c: Include bitmap.h.
1456 (c_omp_split_clauses): Handle OMP_CLAUSE_ALLOCATE.
1458 2020-10-26 Ville Voutilainen <ville.voutilainen@gmail.com>
1460 * c-common.c (__is_nothrow_assignable): New.
1461 (__is_nothrow_constructible): Likewise.
1462 * c-common.h (RID_IS_NOTHROW_ASSIGNABLE): New.
1463 (RID_IS_NOTHROW_CONSTRUCTIBLE): Likewise.
1465 2020-10-23 Jan Hubicka <hubicka@ucw.cz>
1467 * c-common.c (c_common_finalize_early_debug): Update for new thunk api.
1469 2020-10-23 Marek Polacek <polacek@redhat.com>
1472 * c-common.c (verify_tree): Handle PAREN_SIZEOF_EXPR.
1473 (c_common_init_ts): Likewise.
1474 * c-common.def (PAREN_SIZEOF_EXPR): New tree code.
1475 * c-common.h (maybe_warn_sizeof_array_div): Declare.
1476 * c-warn.c (sizeof_pointer_memaccess_warning): Unwrap NOP_EXPRs.
1477 (maybe_warn_sizeof_array_div): New function.
1478 * c.opt (Wsizeof-array-div): New option.
1480 2020-10-23 Martin Sebor <msebor@redhat.com>
1483 * c-warn.c (warn_parm_ptrarray_mismatch): Move null test earlier.
1485 2020-10-22 Martin Liska <mliska@suse.cz>
1488 * c-attribs.c (handle_no_stack_protect_function_attribute): New.
1489 (handle_stack_protect_attribute): Add error message for a
1490 no_stack_protector function.
1492 2020-10-22 Martin Liska <mliska@suse.cz>
1494 * c-cppbuiltin.c (c_cpp_builtins): Use the stack_protector enum.
1496 2020-10-22 Jan Hubicka <hubicka@ucw.cz>
1498 * c-gimplify.c: Include tree-nested.h
1499 (c_genericize): Update for new nested function info.
1501 2020-10-14 Martin Sebor <msebor@redhat.com>
1504 * c-attribs.c (build_attr_access_from_parms): Wrap chain of VLA
1505 bounds in an extra list.
1507 2020-10-05 Richard Biener <rguenther@suse.de>
1508 Jakub Jelinek <jakub@redhat.com>
1511 * c-pretty-print.c: Include langhooks.h.
1512 (c_pretty_printer::postfix_expression): Handle TARGET_MEM_REF as
1514 (c_pretty_printer::expression): Handle TARGET_MEM_REF as
1516 (c_pretty_printer::unary_expression): Handle TARGET_MEM_REF.
1518 2020-09-30 Martin Sebor <msebor@redhat.com>
1521 * c-attribs.c (append_access_attr): Use the function declaration
1522 location for a warning about an attribute access argument.
1524 2020-09-29 Marek Polacek <polacek@redhat.com>
1527 * c.opt (Wrange-loop-construct): New option.
1529 2020-09-23 Martin Sebor <msebor@redhat.com>
1532 * c-warn.c (warn_parm_ptrarray_mismatch): Handle more invalid input.
1534 2020-09-23 Marek Polacek <polacek@redhat.com>
1537 * c-gimplify.c (c_genericize): Only call do_warn_duplicated_branches_r
1538 after loops and other structured control constructs have been lowered.
1540 2020-09-22 Jakub Jelinek <jakub@redhat.com>
1542 * c.opt (Wbuiltin-declaration-mismatch): Fix typo in variable name:
1543 warn_builtin_declaraion_mismatch -> warn_builtin_declaration_mismatch.
1545 2020-09-21 Marek Polacek <polacek@redhat.com>
1547 * c.opt (Wctad-maybe-unsupported): New option.
1549 2020-09-19 Martin Sebor <msebor@redhat.com>
1552 * c-common.h (warn_parm_array_mismatch): Declare new function.
1553 (has_attribute): Move declaration of an existing function.
1554 (build_attr_access_from_parms): Declare new function.
1555 * c-warn.c (parm_array_as_string): Define new function.
1556 (plus_one): Define new function.
1557 (warn_parm_ptrarray_mismatch): Define new function.
1558 (warn_parm_array_mismatch): Define new function.
1559 (vla_bound_parm_decl): New function.
1560 * c.opt (-Warray-parameter, -Wvla-parameter): New options.
1561 * c-pretty-print.c (pp_c_type_qualifier_list): Don't print array type
1563 (c_pretty_printer::direct_abstract_declarator): ...but instead print
1564 them in brackets here. Also print [static]. Strip extraneous
1565 expressions from VLA bounds.
1567 2020-09-19 Martin Sebor <msebor@redhat.com>
1570 * c-attribs.c (c_common_attribute_table): Add "arg spec" attribute.
1571 (handle_argspec_attribute): New function.
1572 (get_argument, get_argument_type): New functions.
1573 (append_access_attrs): Add overload. Handle internal attribute
1574 representation in addition to external.
1575 (handle_access_attribute): Handle internal attribute representation
1576 in addition to external.
1577 (build_attr_access_from_parms): New function.
1579 2020-09-19 Sandra Loosemore <sandra@codesourcery.com>
1581 * c-gimplify.c (genericize_c_loop): Rewrite to match
1582 c_finish_loop in c-typeck.c.
1584 2020-09-19 Sandra Loosemore <sandra@codesourcery.com>
1586 * c-common.c (c_block_may_fallthrough): New, split from
1587 cxx_block_may_fallthrough in the cp front end.
1588 (c_common_init_ts): Move handling of loop and switch-related
1589 statements here from the cp front end.
1590 * c-common.def (FOR_STMT, WHILE_STMT, DO_STMT): Move here from
1592 (BREAK_STMT, CONTINUE_STMT, SWITCH_STMT): Likewise.
1593 * c-common.h (c_block_may_fallthru): Declare.
1594 (bc_state_t): Move here from cp front end.
1595 (save_bc_state, restore_bc_state): Declare.
1596 (c_genericize_control_stmt): Declare.
1597 (WHILE_COND, WHILE_BODY): Likewise.
1598 (DO_COND, DO_BODY): Likewise.
1599 (FOR_INIT_STMT, FOR_COND, FOR_EXPR, FOR_BODY, FOR_SCOPE): Likewise.
1600 (SWITCH_STMT_COND, SWITCH_STMT_BODY): Likewise.
1601 (SWITCH_STMT_TYPE, SWITCH_STMT_SCOPE): Likewise.
1602 (SWITCH_STMT_ALL_CASES_P, SWITCH_STMT_NO_BREAK_P): Likewise.
1603 (LABEL_DECL_BREAK, LABEL_DECL_CONTINUE): Likewise.
1604 * c-dump.c (dump_stmt): Copy from cp front end.
1605 (c_dump_tree): Move code to handle structured loop and switch
1606 tree nodes here from cp front end.
1607 * c-gimplify.c: Adjust includes.
1608 (enum bc_t, bc_label, begin_bc_block, finish_bc_block): Move from
1610 (save_bc_state, restore_bc_state): New functions using old code
1612 (get_bc_label, expr_loc_or_loc): Move from cp front end.
1613 (genericize_c_loop): Move from cp front end.
1614 (genericize_for_stmt, genericize_while_stmt): Likewise.
1615 (genericize_do_stmt, genericize_switch_stmt): Likewise.
1616 (genericize_continue_stmt, genericize_break_stmt): Likewise.
1617 (genericize_omp_for_stmt): Likewise.
1618 (c_genericize_control_stmt): New function using code split from
1620 (c_genericize_control_r): New.
1621 (c_genericize): Call walk_tree with c_genericize_control_r.
1622 * c-pretty-print.c (c_pretty_printer::statement): Move code to handle
1623 structured loop and switch tree nodes here from cp front end.
1625 2020-09-17 Patrick Palka <ppalka@redhat.com>
1628 * c-indentation.c (should_warn_for_misleading_indentation): Move
1629 declarations of local variables closer to their first use.
1630 Handle virtual token locations by resolving them to their
1631 respective macro expansion points. If all three tokens are
1632 produced from the same macro expansion, then instead use their
1633 loci within the macro definition.
1635 2020-09-16 Martin Sebor <msebor@redhat.com>
1639 * c-attribs.c (validate_attr_args): New function.
1640 (validate_attr_arg): Same.
1641 (handle_section_attribute): Call it. Introduce a local variable.
1642 (handle_alloc_size_attribute): Same.
1643 (handle_alloc_align_attribute): Same.
1645 2020-09-14 Jakub Jelinek <jakub@redhat.com>
1647 * c-attribs.c (handle_optimize_attribute): Adjust
1648 cl_optimization_save, cl_optimization_restore and
1649 build_optimization_node callers.
1650 * c-pragma.c (handle_pragma_optimize): Adjust
1651 build_optimization_node caller.
1652 (handle_pragma_push_options): Adjust
1653 build_optimization_node and build_target_option_node callers.
1654 (handle_pragma_pop_options, handle_pragma_reset_options):
1655 Adjust cl_optimization_restore callers.
1657 2020-08-28 Martin Sebor <msebor@redhat.com>
1659 * c.opt (Wstringop-overread): New option.
1661 2020-08-11 Jakub Jelinek <jakub@redhat.com>
1664 * c-common.c (get_atomic_generic_size): Require that first argument's
1665 type points to a complete type and use tree_fits_uhwi_p instead of
1666 just INTEGER_CST TREE_CODE check for the TYPE_SIZE_UNIT.
1668 2020-07-31 Martin Sebor <msebor@redhat.com>
1671 * c-common.c (check_function_arguments_recurse): Return early when
1672 no-warning bit is set.
1674 2020-07-31 Richard Biener <rguenther@suse.de>
1677 * c-common.h (c_common_finalize_early_debug): Declare.
1678 * c-common.c: Include debug.h.
1679 (c_common_finalize_early_debug): finalize_early_debug langhook
1680 implementation generating debug for extern declarations.
1682 2020-07-27 Nathan Sidwell <nathan@acm.org>
1684 * c-common.c (try_to_locate_new_include_insertion_point): Use
1685 strcmp, not pointer equality.
1687 2020-07-25 Martin Sebor <msebor@redhat.com>
1690 * c-common.c (check_nonnull_arg): Print note only when warning was
1693 2020-07-22 Tobias Burnus <tobias@codesourcery.com>
1695 * c-omp.c (c_finish_omp_critical): Check for no name but
1696 nonzero hint provided.
1698 2020-07-20 Jason Merrill <jason@redhat.com>
1700 * c-cppbuiltin.c (c_cpp_builtins): Update
1701 __cpp_nontype_template_args for C++20.
1703 2020-07-20 Martin Sebor <msebor@redhat.com>
1706 * c.opt: Remove stray text.
1708 2020-07-14 Lewis Hyatt <lhyatt@gmail.com>
1711 * c-indentation.c (should_warn_for_misleading_indentation): Get
1712 global tabstop from the new source.
1713 * c-opts.c (c_common_handle_option): Remove handling of -ftabstop, which
1714 is now a common option.
1717 2020-07-08 Eric Botcazou <ebotcazou@adacore.com>
1719 * c.opt (Wscalar-storage-order): Add explicit variable.
1721 2020-07-07 Nathan Sidwell <nathan@acm.org>
1723 * c-opts.c (c_common_post_options): Add 'injecting' arg to
1725 (c_finish_options): Add linemap_line_start calls for builtin and cmd
1726 maps. Force token position to line_table's highest line.
1727 * c-ppoutput.c (print_line_1): Refactor, print line zero.
1728 (cb_define): Always increment source line.
1730 2020-07-06 Martin Sebor <msebor@redhat.com>
1733 * c-common.c (check_function_nonnull): Avoid checking syntesized calls
1734 to stub lambda objects with null this pointer.
1735 (check_nonnull_arg): Handle C++ nullptr.
1737 2020-07-02 Jason Merrill <jason@redhat.com>
1738 Jakub Jelinek <jakub@redhat.com>
1740 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_consteval.
1742 2020-06-30 Jakub Jelinek <jakub@redhat.com>
1745 * c-common.c (check_function_arguments_recurse): Don't crash on
1746 calls to internal functions.
1748 2020-06-28 Martin Sebor <msebor@redhat.com>
1751 * c-common.c (struct nonnull_arg_ctx): Add members.
1752 (check_function_nonnull): Use nonnull_arg_ctx as argument. Handle
1753 C++ member functions specially. Consider the this pointer implicitly
1755 (check_nonnull_arg): Use location of argument when available.
1756 (check_function_arguments): Use nonnull_arg_ctx as argument.
1758 2020-06-27 Jakub Jelinek <jakub@redhat.com>
1761 * c-common.c (pointer_int_sum): Use TYPE_OVERFLOW_UNDEFINED instead of
1762 !TYPE_UNSIGNED check to see if we can apply distributive law and handle
1763 smaller precision intop operands separately.
1765 2020-06-26 Marek Polacek <polacek@redhat.com>
1767 * c-opts.c (c_common_init_options): Default to gnu++17.
1769 2020-06-17 Jonathan Wakely <jwakely@redhat.com>
1772 * c-common.c (get_atomic_generic_size): Check cv-qualifiers in
1775 2020-06-16 Jakub Jelinek <jakub@redhat.com>
1777 * c-common.h (c_omp_check_loop_iv_exprs): Add an int argument.
1778 * c-omp.c (struct c_omp_check_loop_iv_data): Add maybe_nonrect and
1780 (c_omp_is_loop_iterator): New function.
1781 (c_omp_check_loop_iv_r): Use it. Add support for silent scanning
1782 if outer loop iterator is present. Perform duplicate checking through
1783 hash_set in the function rather than expecting caller to do that.
1784 Pass NULL instead of d->ppset to walk_tree_1.
1785 (c_omp_check_nonrect_loop_iv): New function.
1786 (c_omp_check_loop_iv): Use it. Fill in new members, allow
1787 non-rectangular loop forms, diagnose multiple associated loops with
1788 the same iterator. Pass NULL instead of &pset to walk_tree_1.
1789 (c_omp_check_loop_iv_exprs): Likewise.
1791 2020-06-10 Martin Liska <mliska@suse.cz>
1793 PR tree-optimization/92860
1794 * c-attribs.c (handle_optimize_attribute):
1795 Save global options and compare it after parsing of function
1797 * c-pragma.c (opt_stack::saved_global_options): New field.
1798 (handle_pragma_push_options): Save global_options.
1799 (handle_pragma_pop_options): Compare them after pop.
1801 2020-06-09 Jakub Jelinek <jakub@redhat.com>
1804 * c-pretty-print.c (c_pretty_printer::unary_expression): Handle the
1805 case when MEM_REF's first argument has type pointer to incomplete type.
1807 2020-06-05 Jason Merrill <jason@redhat.com>
1809 * c-pretty-print.c (pp_c_additive_expression): Handle negative
1810 operand to POINTER_PLUS_EXPR.
1812 2020-06-04 Martin Sebor <msebor@redhat.com>
1816 * c-attribs.c (append_access_attrs): Handle attr_access::none.
1817 (handle_access_attribute): Same.
1819 2020-06-03 Mark Wielaard <mark@klomp.org>
1821 * known-headers.cc (get_cp_stdlib_header_for_string_macro_name):
1823 * known-headers.h (get_cp_stdlib_header_for_string_macro_name):
1824 New function declaration.
1826 2020-06-03 Mark Wielaard <mark@klomp.org>
1828 * known-headers.cc (get_string_macro_hint): New function.
1829 (get_stdlib_header_for_name): Use get_string_macro_hint.
1830 (get_c_stdlib_header_for_string_macro_name): New function.
1831 * known-headers.h (get_c_stdlib_header_for_string_macro_name):
1832 New function declaration.
1834 2020-06-03 Tobias Burnus <tobias@codesourcery.com>
1836 * c-common.h (c_omp_predetermined_mapping): Declare.
1837 * c-omp.c (c_omp_predetermined_mapping): New.
1839 2020-05-22 Mark Wielaard <mark@klomp.org>
1841 * known-headers.cc (get_stdlib_header_for_name): Add a new
1842 stdlib_hint array for stdbool and stdint.
1844 2020-05-22 Mark Wielaard <mark@klomp.org>
1846 * known-headers.cc (get_stdlib_header_for_name): Return
1847 "<stdbool.h>" for "bool", "true" or "false" when STDLIB_C and
1850 2020-05-20 Nathan Sidwell <nathan@acm.org>
1852 * c-common.c (try_to_locate_new_include_insertion_point): Revert change.
1854 * c-common.c (try_to_locate_new_include_insertion_point): Use
1855 strcmp to compare filenames.
1856 * c-lex.c (init_c_lex): Move declaration to initialization.
1857 * c-opts.c (handle_deferred_opts): Move cpp_get_deps call into
1858 deferred count loop.
1860 2020-05-15 Jason Merrill <jason@redhat.com>
1862 * c-opts.c (set_std_cxx20): Set flag_coroutines.
1864 2020-05-13 Jason Merrill <jason@redhat.com>
1866 * c.opt (std=c++20): Make c++2a the alias.
1867 (std=gnu++20): Likewise.
1868 * c-common.h (cxx_dialect): Change cxx2a to cxx20.
1870 * c-cppbuiltin.c: Adjust.
1871 * c-ubsan.c: Adjust.
1874 2020-05-12 Eric Botcazou <ebotcazou@adacore.com>
1876 * c-ada-spec.c (dump_ads): Output pragma Warnings ("U"); on entry.
1878 2020-05-08 Nathan Sidwell <nathan@acm.org>
1880 Reimplement directives only processing.
1881 * c-ppoutput.c (token_streamer): Ne.
1882 (directives_only_cb): New. Swallow ...
1883 (print_lines_directives_only): ... this.
1884 (scan_translation_unit_directives_only): Reimplment using the
1885 published interface.
1887 2020-05-07 Marek Polacek <polacek@redhat.com>
1889 * c-format.c (badwords): Add "nonstatic".
1891 202-05-07 Jakub Jelinek <jakub@redhat.com>
1894 * c-common.c (speculation_safe_value_resolve_params): Return false if
1895 error_operand_p (val2).
1896 (resolve_overloaded_builtin) <case BUILT_IN_SPECULATION_SAFE_VALUE_N>:
1897 Remove extraneous semicolon.
1899 2020-05-06 qing zhao <qing.zhao@oracle.com>
1902 * c-indentation.c (get_visual_column): Add a hint to use the new
1903 -flarge-source-files option.
1905 2020-05-05 Stefan Schulze Frielinghaus <stefansf@linux.ibm.com>
1907 * c-attribs.c (handle_vector_size_attribute): Add attribute
1908 nonnull for argument args in order to silence warning of
1909 uninitialized variable usage. Since this is local to the
1910 compilation unit and thus cannot be checked at call sides by the
1911 compiler, added an assert statement in order to verify this.
1913 2020-05-01 H.J. Lu <hongjiu.lu@intel.com>
1916 * c-attribs.c (handle_patchable_function_entry_attribute): Limit
1917 value to USHRT_MAX (65535).
1919 2020-04-29 Jakub Jelinek <jakub@redhat.com>
1921 * c-format.c (PP_FORMAT_CHAR_TABLE): Add %{ and %}.
1923 2020-04-27 Jakub Jelinek <jakub@redhat.com>
1926 * c-common.c (resolve_overloaded_builtin): Return error_mark_node for
1927 fncode == BUILT_IN_NONE before initialization of first_param.
1929 2020-04-23 Marek Polacek <polacek@redhat.com>
1932 * c-attribs.c (find_tm_attribute): Use get_attribute_name instead of
1935 2020-04-14 Patrick Palka <ppalka@redhat.com>
1938 * c-pretty-print.c (pp_c_pointer) <case REFERENCE_TYPE>: Print a double
1939 ampersand if it's an rvalue reference type.
1941 2020-04-13 Martin Sebor <msebor@redhat.com>
1944 * c-pretty-print.c (c_pretty_printer::direct_abstract_declarator): Avoid
1945 printing array bound for flexible array members.
1947 2020-04-13 Iain Sandoe <iain@sandoe.co.uk>
1949 * c-cppbuiltin.c (c_cpp_builtins): Update coroutines builtin
1952 2020-04-02 Richard Biener <rguenther@suse.de>
1955 * c-opts.c (c_common_post_options): Enable -ffinite-loops
1956 for -O2 and C++11 or newer.
1958 2020-03-28 Patrick Palka <ppalka@redhat.com>
1960 * c.opt: Add -fconcepts-diagnostics-depth.
1962 2020-03-27 Martin Sebor <msebor@redhat.com>
1965 * c-attribs.c (handle_copy_attribute): Avoid passing expressions
1966 to decl_attributes. Make handling of different kinds of entities
1969 2020-03-27 Martin Sebor <msebor@redhat.com>
1972 * c-attribs.c (handle_access_attribute): Avoid setting TYPE_ATTRIBUTES
1975 2020-03-23 Jakub Jelinek <jakub@redhat.com>
1978 * c-warn.c (warnings_for_convert_and_check): For expr and/or
1979 result being COMPOUND_EXPRs, skip to ultimate rhs.
1981 2020-03-20 Richard Sandiford <richard.sandiford@arm.com>
1984 * c-common.c (c_common_type_for_mode): Before using a registered
1985 built-in type, check that the vectorness of the type matches
1986 the vectorness of the mode.
1988 2020-03-17 Jakub Jelinek <jakub@redhat.com>
1990 * c-common.c (resolve_overloaded_builtin): Fix up duplicated word
1991 issue in a diagnostic message.
1993 2020-03-15 Lewis Hyatt <lhyatt@gmail.com>
1995 * c.opt: Avoid redundancy in the help text.
1997 2020-03-02 Marek Polacek <polacek@redhat.com>
1999 PR c++/93958 - add missing -std=gnu++20.
2000 * c.opt: Add -std=gnu++20.
2002 2020-03-01 Martin Sebor <msebor@redhat.com>
2005 * c-attribs.c (append_access_attrs): Correctly handle attribute.
2006 (handle_access_attribute): Same.
2008 2020-02-25 Jakub Jelinek <jakub@redhat.com>
2011 * c-pragma.c (handle_pragma_diagnostic): Add missing ? after
2012 "did you mean" hint in diagnostics.
2014 2020-02-15 Jason Merrill <jason@redhat.com>
2016 * c.opt: Add -std=c++20.
2018 2020-02-14 Eric Botcazou <ebotcazou@adacore.com>
2020 * c-ada-spec.c: Include bitmap.h.
2021 (dump_ada_double_name): Rename into...
2022 (dump_anonymous_type_name): ...this. Always use the TYPE_UID.
2023 (dump_ada_array_type): Adjust to above renaming. Robustify.
2024 (dump_nested_types_1): New function copied from... Add dumped_types
2025 parameter and pass it down to dump_nested_type.
2026 (dump_nested_types): ...this. Remove parent parameter. Just call
2027 dump_nested_types_1 on an automatic bitmap.
2028 (dump_nested_type): Add dumped_types parameter.
2029 <ARRAY_TYPE>: Do not dump it if already present in dumped_types.
2030 Adjust recursive calls and adjust to above renaming.
2031 (dump_ada_declaration): Adjust call to dump_nested_types.
2032 Tidy up and adjust to above renaming.
2033 (dump_ada_specs): Initialize and release bitmap obstack.
2035 2020-02-10 Martin Sebor <msebor@redhat.com>
2038 * c-attribs.c (handle_access_attribute): Correct off-by-one mistakes.
2040 2020-02-10 Jakub Jelinek <jakub@redhat.com>
2043 * c-format.c (check_plain): Fix up last argument of strncasecmp.
2044 Remove useless extra test.
2046 2020-02-03 Julian Brown <julian@codesourcery.com>
2047 Tobias Burnus <tobias@codesourcery.com>
2049 * c-cppbuiltin.c (c_cpp_builtins): Update _OPENACC define to 201711.
2051 2020-01-29 Jason Merrill <jason@redhat.com>
2054 * c-attribs.c (check_cxx_fundamental_alignment_constraints): Remove.
2056 2020-01-23 Jason Merrill <jason@redhat.com>
2058 * c-warn.c (conversion_warning): Change -Wsign-conversion handling.
2060 2020-01-23 Martin Sebor <msebor@redhat.com>
2063 * c-common.c (check_function_arguments): Avoid overlap checking
2064 of sprintf functions.
2066 2020-01-22 Jason Merrill <jason@redhat.com>
2068 PR testsuite/93391 - PR 40752 test fails with unsigned plain char.
2070 * c-warn.c (conversion_warning): Check operands only after checking
2071 the whole expression. Don't check second operand of + for sign.
2073 2020-01-21 Jason Merrill <jason@redhat.com>
2074 Manuel López-Ibáñez <manu@gcc.gnu.org>
2076 PR c++/40752 - useless -Wconversion with short +=.
2077 * c.opt (-Warith-conversion): New.
2078 * c-warn.c (conversion_warning): Recurse for operands of
2079 operators. Only warn about the whole expression with
2082 2020-01-21 Jason Merrill <jason@redhat.com>
2084 * c-common.c (unsafe_conversion_p): Don't warn, return UNSAFE_SIGN.
2085 * c-warn.c (conversion_warning): Warn about UNSAFE_SIGN.
2087 2020-01-20 Nathan Sidwell <nathan@acm.org>
2089 PR preprocessor/80005
2090 * c-cppbuiltins.c (c_cpp_builtins): Don't define __has_include{,_next}.
2092 2020-01-18 Iain Sandoe <iain@sandoe.co.uk>
2094 * c-common.c (co_await, co_yield, co_return): New.
2095 * c-common.h (RID_CO_AWAIT, RID_CO_YIELD,
2096 RID_CO_RETURN): New enumeration values.
2097 (D_CXX_COROUTINES): Bit to identify coroutines are active.
2098 (D_CXX_COROUTINES_FLAGS): Guard for coroutine keywords.
2099 * c-cppbuiltin.c (__cpp_coroutines): New cpp define.
2100 * c.opt (fcoroutines): New command-line switch.
2102 2020-01-10 David Malcolm <dmalcolm@redhat.com>
2104 * c-format.c (local_event_ptr_node): New.
2105 (PP_FORMAT_CHAR_TABLE): Add entry for "%@".
2106 (init_dynamic_diag_info): Initialize local_event_ptr_node.
2107 * c-format.h (T_EVENT_PTR): New define.
2109 2020-01-10 Martin Sebor <msebor@redhat.com>
2112 * c-attribs.c (append_access_attrs): Validate against the translated
2113 access string rather than the human-readable representation.
2115 2020-01-01 Jakub Jelinek <jakub@redhat.com>
2117 Update copyright years.
2119 2019-12-20 Eric Botcazou <ebotcazou@adacore.com>
2121 * c-ada-spec.h (decl_sloc): Delete.
2122 * c-ada-spec.c (decl_sloc): Make static.
2124 2019-12-19 Julian Brown <julian@codesourcery.com>
2126 * c-common.h (c_omp_map_clause_name): Add prototype.
2127 * c-omp.c (c_omp_map_clause_name): New function.
2128 * c-pragma.h (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ATTACH and
2129 PRAGMA_OACC_CLAUSE_DETACH.
2131 2019-12-19 Julian Brown <julian@codesourcery.com>
2132 Maciej W. Rozycki <macro@codesourcery.com>
2133 Tobias Burnus <tobias@codesourcery.com>
2134 Thomas Schwinge <thomas@codesourcery.com>
2136 * c-pragma.h (pragma_omp_clause): Add
2137 PRAGMA_OACC_CLAUSE_NO_CREATE.
2139 2019-12-17 Martin Sebor <msebor@redhat.com>
2142 * c.opt (-Wmismatched-tags, -Wredundant-tags): New options.
2144 2019-12-11 David Malcolm <dmalcolm@redhat.com>
2146 * c-pretty-print.c (c_pretty_printer::clone): New vfunc
2148 * c-pretty-print.h (c_pretty_printer::clone): New vfunc decl.
2150 2019-12-09 David Malcolm <dmalcolm@redhat.com>
2152 * c-format.c (range_label_for_format_type_mismatch::get_text):
2153 Replace label_text ctor called with true with label_text::take.
2155 2019-12-09 David Malcolm <dmalcolm@redhat.com>
2157 * c-format.c (selftest::test_type_mismatch_range_labels): Remove
2158 initial newline from expected outputs.
2159 * c-opts.c (c_diagnostic_finalizer): Add pp_newline call before
2160 call to diagnostic_show_locus.
2162 2019-12-06 Jakub Jelinek <jakub@redhat.com>
2164 * c-cppbuiltin.c (c_cpp_builtins): Don't define __cpp_consteval for
2167 2019-12-05 Marek Polacek <polacek@redhat.com>
2168 Jakub Jelinek <jakub@redhat.com>
2170 PR c++/91353 - P1331R2: Allow trivial default init in constexpr contexts.
2171 * c-cppbuiltin.c (c_cpp_builtins): Adjust the value of __cpp_constexpr.
2173 2019-12-05 Marek Polacek <polacek@redhat.com>
2175 PR c++/92271 - make __is_same alias for __is_same_as.
2176 * c-common.c: Add __is_same, an alias for __is_same_as.
2178 2019-12-03 Marek Polacek <polacek@redhat.com>
2180 PR c++/91363 - P0960R3: Parenthesized initialization of aggregates.
2181 * c-cppbuiltin.c (c_cpp_builtins): Predefine
2182 __cpp_aggregate_paren_init=201902 for -std=c++2a.
2184 2019-11-30 Jan Hubicka <hubicka@ucw.cz>
2186 * c-attribs.c (handle_symver_attribute): New function
2187 (c_common_attributes): Add symver.
2189 2019-11-30 Richard Sandiford <richard.sandiford@arm.com>
2191 * c-common.c (pointer_int_sum): Use verify_type_context to check
2192 whether the target allows pointer arithmetic for the types involved.
2193 (c_sizeof_or_alignof_type, c_alignof_expr): Use verify_type_context
2194 to check whether the target allows sizeof and alignof operations
2195 for the types involved.
2197 2019-11-27 Jason Merrill <jason@redhat.com>
2199 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_deduction_guides.
2201 2019-11-26 Jakub Jelinek <jakub@redhat.com>
2204 * c-attribs.c (handle_mode_attribute): Add mode attribute to
2207 2019-11-25 Joseph Myers <joseph@codesourcery.com>
2210 * c-common.c (c_common_type_for_mode): Handle decimal
2211 floating-point types being NULL_TREE.
2212 * c-format.c (get_format_for_type_1): Handle specified types being
2214 * c-lex.c (interpret_float): Give an error for decimal
2215 floating-point constants when decimal floating-point not
2218 2019-11-23 Jakub Jelinek <jakub@redhat.com>
2221 * c-attribs.c (append_access_attrs): Avoid buffer overflow. Avoid
2222 memory leak. Use XNEWVEC macro. Use auto_diagnostic_group to
2223 group warning with inform together.
2224 (handle_access_attribute): Formatting fix.
2226 2019-11-22 Jakub Jelinek <jakub@redhat.com>
2229 * c-common.h (identifier_global_tag): Declare.
2230 * c-format.c (get_pointer_to_named_type): Renamed to ...
2231 (get_named_type): ... this. Use identifier_global_tag instead of
2232 identifier_global_value, handle the return value being a TYPE_P.
2233 (init_dynamic_diag_info): Adjust get_pointer_to_named_type callers
2234 to call get_named_type instead. Formatting fixes.
2236 Implement P1902R1, Missing feature-test macros 2017-2019.
2237 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_init_captures
2238 and __cpp_generic_lambdas for -std=c++2a. Define
2239 __cpp_designated_initializers, __cpp_constexpr_in_decltype and
2240 __cpp_consteval for -std=c++2a. Remove a FIXME comment about
2241 __cpp_concepts for -std=c++2a.
2243 2019-11-22 Martin Sebor <msebor@redhat.com>
2246 * c-attribs.c (handle_access_attribute): New function.
2247 (c_common_attribute_table): Add new attribute.
2248 (get_argument_type): New function.
2249 (append_access_attrs): New function.
2250 (get_nonnull_operand): Rename...
2251 (get_attribute_operand): ...to this.
2252 * c-common.c (get_nonnull_operand): Rename...
2253 (get_attribute_operand): ...to this.
2255 2019-11-21 Joseph Myers <joseph@codesourcery.com>
2257 * c-attribs.c (handle_fallthrough_attribute): Use pedwarn instead
2260 2019-11-19 Joseph Myers <joseph@codesourcery.com>
2262 * c-common.c (attribute_fallthrough_p): In C, use pedwarn not
2263 warning for standard attributes mixed with fallthrough attributes.
2265 2019-11-15 Joseph Myers <joseph@codesourcery.com>
2267 * c-attribs.c (handle_fallthrough_attribute): Remove static.
2268 * c-common.h (handle_fallthrough_attribute): Declare.
2270 2019-11-15 Joseph Myers <joseph@codesourcery.com>
2272 * c-attribs.c (handle_deprecated_attribute): Remove static.
2273 * c-common.h (handle_deprecated_attribute): Declare.
2275 2019-11-14 Joseph Myers <joseph@codesourcery.com>
2277 * c-lex.c (lex_charconst): Make CPP_UTF8CHAR constants unsigned
2280 2019-11-14 Jakub Jelinek <jakub@redhat.com>
2282 * c-omp.c (c_omp_check_context_selector): Add nvidia to the list of
2285 * c-omp.c (c_omp_check_context_selector): Handle name lists
2286 containing string literals. Don't diagnose atomic_default_mem_order
2287 with multiple props.
2289 2019-11-13 Joseph Myers <joseph@codesourcery.com>
2291 * c-cppbuiltin.c (builtin_define_float_constants): Also define
2292 NORM_MAX constants. Update call to get_max_float.
2293 (LAZY_HEX_FP_VALUES_CNT): Update value to include NORM_MAX
2296 2019-11-13 Eric Botcazou <ebotcazou@adacore.com>
2298 * c-ada-spec.c (get_underlying_decl): Do not look through typedefs.
2299 (dump_forward_type): Do not generate a declaration for function types.
2300 (dump_nested_type) <ARRAY_TYPE>: Do not generate a nested declaration
2301 of the component type if it is declared in another file.
2303 2019-11-12 Martin Liska <mliska@suse.cz>
2305 * c-opts.c (c_common_post_options):
2306 Use SET_OPTION_IF_UNSET.
2308 2019-11-12 Maciej W. Rozycki <macro@codesourcery.com>
2309 Frederik Harwath <frederik@codesourcery.com>
2312 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_SERIAL enumeration
2314 * c-pragma.c (oacc_pragmas): Add "serial" entry.
2316 2019-11-08 Richard Sandiford <richard.sandiford@arm.com>
2318 * c-common.h (gnu_vector_type_p): New function.
2319 * c-common.c (c_build_vec_perm_expr): Require __builtin_shuffle
2320 vectors to satisfy gnu_vector_type_p.
2321 (c_build_vec_convert): Likewise __builtin_convertvector.
2322 (convert_vector_to_array_for_subscript): Likewise when applying
2323 implicit vector to array conversion.
2324 (scalar_to_vector): Likewise when converting vector-scalar
2325 operations to vector-vector operations.
2327 2019-11-08 Joseph Myers <joseph@codesourcery.com>
2329 * c.opt (Wold-style-definition): Initialize to -1.
2330 * c-opts.c (c_common_post_options): Set warn_old_style_definition
2331 to flag_isoc2x if not set explicitly.
2333 2019-11-07 Joseph Myers <joseph@codesourcery.com>
2335 * c-attribs.c (parse_tm_stmt_attr): Handle scoped attributes.
2337 2019-11-05 Jason Merrill <jason@redhat.com>
2339 * c-opts.c (c_common_post_options): -fconcepts-ts implies
2342 2019-11-04 Kamlesh Kumar <kamleshbhalui@gmail.com>
2344 * c-opts.c (c_common_post_options): Update
2347 2019-11-02 Jakub Jelinek <jakub@redhat.com>
2349 * c-common.h (c_omp_get_context_selector): Remove.
2350 * c-omp.c (c_omp_get_context_selector): Moved to omp-general.c
2351 and renamed to omp_get_context_selector.
2353 * c-omp.c (c_omp_mark_declare_variant): Use
2354 omp_context_selector_set_compare.
2356 PR c++/88335 - Implement P1073R3: Immediate functions
2357 * c-common.h (enum rid): Add RID_CONSTEVAL.
2358 * c-common.c (c_common_reswords): Add consteval.
2360 2019-11-01 Martin Sebor <msebor@redhat.com>
2366 * c-pretty-print.c (direct_abstract_declarator): Print
2367 bound in zero-length arrays.
2368 * c.opt (-Wzero-length-bounds): New option.
2370 2019-10-30 Nathan Sidwell <nathan@acm.org>
2372 * c-cppbuiltin.c (c_cpp_builtins): Add 'L' suffix to feature
2375 2019-10-28 Martin Sebor <msebor@redhat.com>
2378 * c-common.c (c_common_nodes_and_builtins): Call c_define_builtins
2379 even when only preprocessing.
2380 * c-common.h (names_builtin_p): Declare new function.
2381 * c-lex.c (init_c_lex): Set has_builtin.
2382 (c_common_has_builtin): Define a new function.
2383 * c-ppoutput.c (init_pp_output): Set has_builtin.
2385 2019-10-24 Jakub Jelinek <jakub@redhat.com>
2387 * c-common.h (c_omp_context_selector_matches): Remove.
2388 * c-omp.c (c_omp_context_selector_matches): Remove.
2389 * c-attribs.c (c_common_attribute_table): Add
2390 "omp declare target {host,nohost,block}" attributes.
2392 2019-10-17 JeanHeyd Meneide <phdofthehouse@gmail.com>
2394 * c-lex.c (c_common_has_attribute): Update nodiscard value.
2396 2019-10-14 Richard Sandiford <richard.sandiford@arm.com>
2398 * c-common.h (user_facing_original_type_p): Declare.
2399 * c-common.c: Include c-spellcheck.h.
2400 (user_facing_original_type_p): New function.
2402 2019-10-12 Jakub Jelinek <jakub@redhat.com>
2404 * c-common.h (c_omp_mark_declare_variant,
2405 c_omp_context_selector_matches): Declare.
2406 * c-omp.c: Include attribs.h, gimplify.h, cgraph.h, symbol-summary.h
2408 (c_omp_get_context_selector): Support second argument NULL.
2409 (c_omp_mark_declare_variant, c_omp_context_selector_matches): New
2411 * c-attribs.c (c_common_attribute_table): Remove "omp declare variant"
2412 attribute, add "omp declare variant base" and
2413 "omp declare variant variant" attributes.
2415 2019-10-11 Joseph Myers <joseph@codesourcery.com>
2417 * c.opt (Wc11-c2x-compat): Add CPP(cpp_warn_c11_c2x_compat)
2418 CppReason(CPP_W_C11_C2X_COMPAT).
2420 2019-10-11 Joseph Myers <joseph@codesourcery.com>
2422 * c-common.c (c_common_reswords): Do not use D_EXT for _Decimal32,
2423 _Decimal64 and _Decimal128.
2425 2019-10-10 Joseph Myers <joseph@codesourcery.com>
2427 * c-cppbuiltin.c (c_cpp_builtins): Do not define macros for DFP
2428 types if DFP not supported.
2430 2019-10-10 Jakub Jelinek <jakub@redhat.com>
2432 * c-common.h (c_omp_check_context_selector,
2433 c_omp_get_context_selector): Declare.
2434 * c-omp.c (c_omp_declare_simd_clauses_to_numbers): Fix spelling
2435 in diagnostic message.
2436 (c_omp_check_context_selector, c_omp_get_context_selector): New
2438 * c-attribs.c (c_common_attribute_table): Add "omp declare variant"
2440 (handle_omp_declare_variant_attribute): New function.
2442 2019-10-09 Martin Sebor <msebor@redhat.com>
2444 PR tree-optimization/90879
2445 * c.opt (-Wstring-compare): New option.
2447 2019-10-08 Andrew Sutton <asutton@lock3software.com>
2448 Jason Merrill <jason@redhat.com>
2450 Update the concepts implementation to conform to the C++20
2451 specification, improve compile times, and generally clean up
2454 * c-cppbuiltin.c (c_cpp_builtins): Use new feature test values for
2455 concepts when -std=c++2a. Bump __cpp_concepts to 201907.
2456 * c.opt: Add -Wconcepts-ts.
2457 * c-opts.c (c_common_post_options): Warn when -fconcepts is used
2458 with -std=c++2a. Disable warning for -fconcepts in C++20 mode.
2459 (set_std_cxx2a): Enable concepts by default.
2461 2019-10-08 Joseph Myers <joseph@codesourcery.com>
2463 * c-opts.c (c_common_post_options): Set
2464 -fno-fp-int-builtin-inexact for C2X.
2466 2019-10-05 Jakub Jelinek <jakub@redhat.com>
2468 PR c++/91369 - Implement P0784R7: constexpr new
2469 * c-cppbuiltin.c (c_cpp_builtins): Predefine
2470 __cpp_constexpr_dynamic_alloc=201907 for -std=c++2a.
2472 2019-10-04 Joseph Myers <joseph@codesourcery.com>
2475 * c-format.c (C_STD_VER): Handle C2x.
2476 (C_STD_NAME): Likewise.
2477 (strftime_flag_specs): Add 'O' modifier with 'p' flag.
2478 (time_char_table): Use separate entry for 'B' and 'b', with 'O'
2479 modifier allowed and 'p' flag.
2480 * c-format.h (enum format_std_version): Add STD_C2X.
2481 (struct format_char_info): Mention 'p' in comment on flags2.
2483 2019-10-01 David Malcolm <dmalcolm@redhat.com>
2485 * c-opts.c (c_diagnostic_finalizer): Temporarily clear prefix when
2486 calling diagnostic_show_locus, rather than destroying it afterwards.
2488 2019-10-01 Jakub Jelinek <jakub@redhat.com>
2491 * c-warn.c (check_alignment_of_packed_member): Ignore FIELD_DECLs
2492 with NULL DECL_FIELD_OFFSET.
2494 2019-10-01 Richard Sandiford <richard.sandiford@arm.com>
2496 * c-pretty-print.c (pp_c_specifier_qualifier_list): If a vector type
2497 has a type name, use it in preference to the __vector syntax.
2499 2019-09-30 Richard Sandiford <richard.sandiford@arm.com>
2501 * c-pretty-print.c (pp_c_parameter_type_list): Avoid printing
2502 two spaces between a comma and "...".
2504 2019-09-27 Jakub Jelinek <jakub@redhat.com>
2507 * c-common.h (c_omp_predefined_variable): Declare.
2508 * c-omp.c (c_omp_predefined_variable): New function.
2509 (c_omp_predetermined_sharing): Return OMP_CLAUSE_DEFAULT_SHARED
2510 for predefined variables.
2512 2019-09-27 Richard Sandiford <richard.sandiford@arm.com>
2514 * c-common.h (build_function_call_vec): Take the original
2515 function decl as an optional final parameter.
2516 (check_builtin_function_arguments): Take the original function decl.
2517 * c-common.c (check_builtin_function_arguments): Likewise.
2518 Handle all built-in functions, not just BUILT_IN_NORMAL ones.
2519 Use targetm.check_builtin_call to check BUILT_IN_MD functions.
2521 2019-09-15 Jason Merrill <jason@redhat.com>
2523 * c-warn.c (warn_logical_operator): Strip location wrappers. Don't
2524 fold_for_warn in "|| mask" warning.
2526 2019-09-10 Martin Liska <mliska@suse.cz>
2528 * c.opt: Use newly added WarnRemoved.
2530 2019-09-09 Martin Liska <mliska@suse.cz>
2532 * c.opt: Update comment of removed
2533 options that are preserved only for backward
2536 2019-09-06 Martin Liska <mliska@suse.cz>
2539 * c-common.c: Remove definition of flag_use_repository.
2540 * c-common.h: Likewise.
2541 * c-opts.c (c_common_handle_option):
2542 Do not handle OPT_frepo option.
2543 * c.opt: Mark the option with Deprecated.
2545 2019-09-04 Marek Polacek <polacek@redhat.com>
2547 * c.opt (fdeduce-init-list): Ignored.
2549 2019-09-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2552 * c.opt (Wenum-conversion): New option.
2554 2019-09-03 Jozef Lawrynowicz <jozef.l@mittosystems.com>
2556 * c-attribs.c (handle_section_attribute): Call the
2557 handle_generic_attribute target hook after performing target
2558 independent processing.
2559 (handle_noinit_attribute): Likewise.
2561 2019-09-03 Ian Lance Taylor <iant@golang.org>
2563 * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Always expand
2564 when using -fgo-dump-spec.
2566 2019-09-02 Martin Liska <mliska@suse.cz>
2569 * c-common.c (fname_as_string): Use cxx_printable_name for
2570 __PRETTY_FUNCTION__ same as was used before r265711.
2572 2019-08-28 Marek Polacek <polacek@redhat.com>
2574 Implement P1152R4: Deprecating some uses of volatile.
2576 * c-opts.c (c_common_post_options): Enable -Wvolatile by
2577 default for C++2a, unless -Wno-deprecated.
2578 * c.opt (Wvolatile): New warning.
2580 2019-08-28 Marek Polacek <polacek@redhat.com>
2582 PR c++/91360 - Implement C++20 P1143R2: constinit.
2583 * c-common.c (c_common_reswords): Add constinit and __constinit.
2584 (keyword_is_decl_specifier): Handle RID_CONSTINIT.
2585 * c-common.h (enum rid): Add RID_CONSTINIT, RID_FIRST_CXX20, and
2588 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_constinit.
2589 * c-format.c (cxx_keywords): Add "constinit".
2590 * c.opt (Wc++2a-compat, Wc++20-compat): New options.
2592 2019-08-27 Jakub Jelinek <jakub@redhat.com>
2595 * c-common.c (verify_tree): For LSHIFT_EXPR, RSHIFT_EXPR,
2596 COMPONENT_REF and ARRAY_REF in cxx_dialect >= cxx17 mode handle it
2597 like COMPOUND_EXPR rather than normal expression.
2599 2019-08-23 Iain Sandoe <iain@sandoe.co.uk>
2602 * c-lex.c (c_lex_with_flags): Don't call
2603 c_common_no_more_pch () from here.
2605 2019-08-23 Jakub Jelinek <jakub@redhat.com>
2608 * c-common.c (c_ts18661_flt_eval_method): Use flag_excess_precision
2609 instead of flag_excess_precision_cmdline.
2610 * c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): Likewise.
2611 * c-opts.c (c_common_post_options): Likewise.
2613 2019-08-22 Martin Sebor <msebor@redhat.com>
2616 * c-common.c (braced_list_to_string): Add argument and overload.
2617 Handle flexible length arrays and unions.
2619 2019-08-21 Eric Botcazou <ebotcazou@adacore.com>
2621 * c-ada-spec.c (dump_ada_function_declaration): Be prepared for broken
2622 function declarations where arguments are missing. Rename variables.
2624 2019-08-15 Richard Biener <rguenther@suse.de>
2626 * c-common.c (c_stddef_cpp_builtins): When the GIMPLE FE is
2627 enabled, define __SIZETYPE__.
2629 2019-08-14 Christophe Lyon <christophe.lyon@linaro.org>
2631 * c-attribs.c (c_common_attribute_table): Add "noinit" entry. Add
2632 exclusion with "section" attribute.
2633 (attr_noinit_exclusions): New table.
2634 (handle_noinit_attribute): New function.
2636 2019-08-13 Richard Sandiford <richard.sandiford@arm.com>
2639 * c-common.c (resolve_overloaded_builtin): Use
2640 copy_decl_built_in_function.
2642 2019-08-13 Martin Sebor <msebor@redhat.com>
2645 * c-format.c (printf_length_specs): Set FMT_LEN_w for "w".
2646 (asm_fprintf_length_spec): Same.
2647 * c-format.h (format_lengths): Add FMT_LEN_w.
2649 2019-08-10 Jakub Jelinek <jakub@redhat.com>
2651 * c-pragma.h (enum pragma_omp_clause): Add
2652 PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
2654 2019-08-07 Jakub Jelinek <jakub@redhat.com>
2656 * c-pragma.h (enum pragma_omp_clause): Add
2657 PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR. Set PRAGMA_OACC_CLAUSE_USE_DEVICE
2658 equal to PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR instead of being a separate
2661 2019-08-05 Marek Polacek <polacek@redhat.com>
2663 PR c++/91338 - Implement P1161R3: Deprecate a[b,c].
2664 * c-opts.c (c_common_post_options): Enable -Wcomma-subscript by
2665 default for C++2a, unless -Wno-deprecated.
2666 * c.opt (Wcomma-subscript): New warning.
2668 2019-07-20 Jakub Jelinek <jakub@redhat.com>
2670 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_LOOP.
2671 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_BIND.
2672 * c-pragma.c (omp_pragmas_simd): Add PRAGMA_OMP_LOOP entry.
2673 * c-common.h (enum c_omp_clause_split): Add C_OMP_CLAUSE_SPLIT_LOOP.
2674 * c-omp.c (c_omp_split_clauses): Add support for 4 new combined
2675 constructs with the loop construct.
2677 2019-07-13 Jakub Jelinek <jakub@redhat.com>
2680 * c-omp.c (c_omp_split_clauses): Fix a pasto in
2681 OMP_CLAUSE_REDUCTION_TASK handling.
2683 2019-07-12 Jakub Jelinek <jakub@redhat.com>
2685 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ORDER.
2686 * c-omp.c (c_omp_split_clauses): Handle splitting of OMP_CLAUSE_ORDER.
2688 2019-07-09 Martin Sebor <msebor@redhat.com>
2691 * c-opts.c (handle_deferred_opts): Change class-key of PODs to struct
2692 and others to class.
2693 * c-pretty-print.h: Same.
2695 2019-07-09 Martin Sebor <msebor@redhat.com>
2698 * c-format.c (check_argument_type): Change class-key from class to
2699 struct and vice versa to match convention and avoid -Wclass-is-pod
2700 and -Wstruct-no-pod.
2701 * c-pretty-print.h: Same.
2703 2019-07-03 Martin Liska <mliska@suse.cz>
2705 * c-common.c (try_to_locate_new_include_insertion_point): Remove
2708 2019-07-03 Jakub Jelinek <jakub@redhat.com>
2710 * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_REDUCTION_INSCAN
2711 clauses on OMP_FOR rather than OMP_PARALLEL when OMP_FOR is combined
2714 2019-07-02 qing zhao <qing.zhao@oracle.com>
2716 PR preprocessor/90581
2717 * c-opts.c (c_common_handle_option): Handle -fmax-include-depth.
2718 * c.opt: Add new option -fmax-include-depth.
2720 2019-06-26 Jason Merrill <jason@redhat.com>
2722 PR c++/55442 - memory-hog with highly recursive constexpr.
2723 * c.opt (fconstexpr-loop-limit): New.
2725 2019-06-25 Jakub Jelinek <jakub@redhat.com>
2728 * c-omp.c (c_finish_omp_atomic): Allow tree_invariant_p in addition
2729 to SAVE_EXPR in first operand of a COMPOUND_EXPR.
2731 2019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
2733 * c-common.c (c_common_nodes_and_builtins): Define
2734 alternate "__intN__" name for "__intN" types.
2736 2019-06-24 Jan Hubicka <jh@suse.cz>
2738 * c-common.c (braced_lists_to_strings): Check that
2739 type is array or integer prior checking string flag.
2741 2019-06-21 Matthew Beliveau <mbelivea@redhat.com>
2743 PR c++/90875 - added -Wswitch-outside-range option
2744 * c.opt (Wswitch-outside-range): Added new option.
2745 * c-warn.c (c_do_switch_warnings): Use OPT_Wswitch-outside-range.
2747 2019-06-21 Marek Polacek <polacek@redhat.com>
2749 PR c++/90953 - ICE with -Wmissing-format-attribute.
2750 * c-common.c (check_function_arguments_recurse): Use
2752 (check_missing_format_attribute): Likewise.
2754 2019-06-19 Marek Polacek <polacek@redhat.com>
2756 PR c++/60364 - noreturn after first decl not diagnosed.
2757 * c-attribs.c (handle_noreturn_attribute): No longer static.
2758 * c-common.h (handle_noreturn_attribute, attr_noreturn_exclusions):
2760 * c-format.c (check_function_format): Use get_attribute_name.
2762 2019-06-19 Martin Sebor <msebor@redhat.com>
2764 PR translation/90156
2765 * c-format.c (function_format_info::format_type): Adjust type.
2766 (function_format_info::is_raw): New member.
2767 (decode_format_type): Adjust signature. Handle "raw" diag attributes.
2768 (decode_format_attr): Adjust call to decode_format_type.
2769 Avoid a redundant call to convert_format_name_to_system_name.
2770 Avoid abbreviating the word "arguments" in a diagnostic.
2771 (format_warning_substr): New function.
2772 (avoid_dollar_number): Quote dollar sign in a diagnostic.
2773 (finish_dollar_format_checking): Same.
2774 (check_format_info): Same.
2775 (struct baltoks_t): New.
2776 (c_opers, c_keywords, cxx_keywords, badwords, contrs): New arrays.
2777 (maybe_diag_unbalanced_tokens, check_tokens, check_plain): New
2779 (check_format_info_main): Call check_plain. Use baltoks_t. Call
2780 maybe_diag_unbalanced_tokens.
2781 (handle_format_attribute): Spell out the word "arguments" in
2784 2019-06-11 Matthew Beliveau <mbelivea@redhat.com>
2786 PR c++/90449 - add -Winaccessible-base option.
2787 * c.opt (Winaccessible-base): New option.
2789 2019-06-10 Jakub Jelinek <jakub@redhat.com>
2791 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_SCAN.
2792 * c-pragma.c (omp_pragmas_simd): Add #pragma omp scan.
2793 * c-omp.c (c_omp_split_clauses): Diagnose inscan reductions on
2794 combined/composite constructs where it is not allowed. Copy over
2795 OMP_CLAUSE_REDUCTION_INSCAN.
2797 2019-06-05 Martin Sebor <msebor@redhat.com>
2799 * c-attribs.c (handle_mode_attribute): Adjust quoting and hyphenation.
2800 (handle_alias_ifunc_attribute): Same.
2801 (handle_copy_attribute): Same.
2802 (handle_weakref_attribute): Same.
2803 (handle_nonnull_attribute): Same.
2804 * c-warn.c (warn_for_sign_compare): Same.
2805 (warn_for_restrict): Same.
2808 2019-06-05 Martin Sebor <msebor@redhat.com>
2810 * c-pragma.c (handle_pragma_weak): Adjust quoting in a diagnostic.
2811 * c.opt (-Wformat-diag): Remove a spurious period.
2813 2019-05-29 Jakub Jelinek <jakub@redhat.com>
2816 * c-common.c (check_builtin_function_arguments)
2817 <case BUILTIN_*_OVERFLOW>: Diagnose pointer to const qualified integer
2820 2019-05-23 Eric Botcazou <ebotcazou@adacore.com>
2822 * c-ada-spec.c (compare_node): Compare the DECL_UIDs as a last resort.
2824 2019-05-22 Martin Liska <mliska@suse.cz>
2827 * c-attribs.c (handle_copy_attribute): Do not copy
2828 target_clones attribute.
2830 2019-05-21 Eric Botcazou <ebotcazou@adacore.com>
2832 * c-ada-spec.h (enum cpp_operation): Add IS_ASSIGNMENT_OPERATOR.
2833 * c-ada-spec.c (print_assignment_operator): New function.
2834 (dump_ada_declaration) <FUNCTION_DECL>: Call it do dump explicit copy
2835 assignment operators declared as methods and filter out the others.
2837 2019-05-17 Thomas Schwinge <thomas@codesourcery.com>
2840 * c-attribs.c (c_common_attribute_table): Set min_len to -1 for
2841 "omp declare target".
2843 2019-05-16 Martin Sebor <msebor@redhat.com>
2845 * c-attribs.c (handle_no_sanitize_attribute): Quote identifiers,
2846 keywords, operators, and types in diagnostics.
2847 (handle_scalar_storage_order_attribute): Same.
2848 (handle_mode_attribute): Same.
2849 (handle_visibility_attribute): Same.
2850 (handle_assume_aligned_attribute): Same.
2851 (handle_no_split_stack_attribute): Same.
2852 * c-common.c (shorten_compare): Same.
2853 (c_common_truthvalue_conversion): Same.
2854 (cb_get_source_date_epoch): Same.
2855 * c-lex.c (cb_def_pragma): Quote keywords, operators, and types
2857 (interpret_float): Same.
2858 * c-omp.c (c_finish_omp_for): Same.
2859 * c-opts.c (c_common_post_options): Same.
2860 * c-pch.c (c_common_pch_pragma): Same.
2861 * c-pragma.c (pop_alignment): Same.
2862 (handle_pragma_pack): Same.
2863 (apply_pragma_weak): Same.
2864 (handle_pragma_weak): Same.
2865 (handle_pragma_scalar_storage_order): Same.
2866 (handle_pragma_redefine_extname): Same.
2867 (add_to_renaming_pragma_list): Same.
2868 (maybe_apply_renaming_pragma): Same.
2869 (push_visibility): Same.
2870 (handle_pragma_visibility): Same.
2871 (handle_pragma_optimize): Same.
2872 (handle_pragma_message): Same.
2873 * c-warn.c (warn_for_omitted_condop): Same.
2874 (lvalue_error): Same.
2876 2019-05-15 Richard Biener <rguenther@suse.de>
2879 * c-common.c (c_common_mark_addressable_vec): Also mark
2880 a COMPOUND_LITERAL_EXPR_DECL addressable similar to
2883 2019-05-06 Nathan Sidwell <nathan@acm.org>
2885 * c-opts.c (handle_defered_opts): Rename struct deps to struc mkdeps.
2887 2019-04-30 Nathan Sidwell <nathan@acm.org>
2889 * c-common.c (c_common_init_ts): Use MARK_TS_EXP. Mark SIZEOF_EXPR.
2891 2019-04-30 Martin Liska <mliska@suse.cz>
2893 * c-pragma.c (handle_pragma_diagnostic): Provide hints
2894 for unknown options.
2896 2019-04-26 Richard Sandiford <richard.sandiford@arm.com>
2898 * c-warn.c (strict_aliasing_warning): Apply COMPLETE_TYPE_P to
2899 the pointer target rather than the pointer itself.
2901 2019-04-19 Jakub Jelinek <jakub@redhat.com>
2904 * c-common.h (c_add_case_label): Remove orig_type and outside_range_p
2906 (c_do_switch_warnings): Remove outside_range_p argument.
2907 * c-common.c (check_case_bounds): Removed.
2908 (c_add_case_label): Remove orig_type and outside_range_p arguments.
2909 Don't call check_case_bounds. Fold low_value as well as high_value.
2910 * c-warn.c (c_do_switch_warnings): Remove outside_range_p argument.
2911 Check for case labels outside of range of original type here and
2914 2019-04-12 Jakub Jelinek <jakub@redhat.com>
2916 PR translation/90041
2917 * c.opt (-fhandle-exceptions): Use %< and %> around option names
2918 in the Warn diagnostics.
2921 * c-attribs.c (handle_patchable_function_entry_attribute): Add
2922 function comment. Warn if arguments of the attribute are not positive
2925 2019-04-09 Eric Botcazou <ebotcazou@adacore.com>
2927 * c-ada-spec.c (print_destructor): Deal with deleting destructors.
2928 (dump_ada_declaration) <FUNCTION_DECL>: Likewise.
2930 2019-04-07 Eric Botcazou <ebotcazou@adacore.com>
2932 * c-ada-spec.c (is_float128): New predicate extracted from...
2933 (dump_ada_node) <COMPLEX_TYPE>: Use it to recognize __cfloat128.
2934 <REAL_TYPE>: ...here. Call it.
2936 2019-04-05 David Malcolm <dmalcolm@redhat.com>
2939 * c-warn.c (check_address_or_pointer_of_packed_member): Add
2940 auto_diagnostic_group. Guard inform calls by result of
2943 2019-04-05 Marek Polacek <polacek@redhat.com>
2945 PR c++/89973 - -Waddress-of-packed-member ICE with invalid conversion.
2946 * c-warn.c (check_address_or_pointer_of_packed_member): Check the type
2949 2019-04-03 Jason Merrill <jason@redhat.com>
2951 PR c++/86586 - -fcompare-debug=-Wsign-compare.
2952 * c-warn.c (warn_for_sign_compare): Call fold_for_warn.
2954 2019-04-01 Martin Sebor <msebor@redhat.com>
2957 * c-attribs.c (handle_copy_attribute): Handle references and
2958 non-constant expressions.
2960 2019-03-22 Jakub Jelinek <jakub@redhat.com>
2963 * c.opt (-fconstexpr-ops-limit=): New option.
2965 2019-03-21 Jakub Jelinek <jakub@redhat.com>
2967 * c-common.c (per_file_includes_t): Use false as Lazy in hash_set
2970 2019-03-19 Martin Sebor <msebor@redhat.com>
2972 PR tree-optimization/89688
2973 * c-common.c (braced_list_to_string): Make static.
2974 (braced_lists_to_strings): Define new function.
2975 * c-common.h (braced_list_to_string): Remove.
2976 (braced_lists_to_strings): Declare.
2978 2019-03-12 Martin Liska <mliska@suse.cz>
2980 * c-opts.c (c_common_handle_option): Wrap option with %< and %>.
2982 2019-03-11 Martin Liska <mliska@suse.cz>
2984 * c-opts.c (c_common_post_options): Wrap apostrophes
2985 in gcc internal format with %'.
2987 2019-03-11 Martin Liska <mliska@suse.cz>
2989 * c-attribs.c (handle_nocf_check_attribute): Wrap an option name
2990 in a string format message and fix GNU coding style.
2991 * c-common.c (vector_types_convertible_p): Likewise.
2992 (c_build_vec_perm_expr): Likewise.
2993 * c-indentation.c (get_visual_column): Likewise.
2994 * c-opts.c (c_common_handle_option): Likewise.
2995 (c_common_post_options): Likewise.
2996 (sanitize_cpp_opts): Likewise.
2997 * c-pch.c (c_common_pch_pragma): Likewise.
2998 * c-pragma.c (handle_pragma_pack): Likewise.
3000 2019-03-08 Jakub Jelinek <jakub@redhat.com>
3002 PR tree-optimization/89550
3003 * c-common.c (c_common_truthvalue_conversion): Only set
3004 TREE_NO_WARNING if warning_at returned true.
3005 * c-warn.c (overflow_warning, warn_logical_operator): Likewise.
3007 2019-02-25 Sandra Loosemore <sandra@codesourcery.com>
3008 Martin Sebor <msebor@gmail.com>
3010 * c.opt (Wmissing-attributes): Clean up doc string.
3012 2019-02-25 Jakub Jelinek <jakub@redhat.com>
3015 * c-format.c (maybe_read_dollar_number): Compute nargnum in
3016 HOST_WIDE_INT type to avoid overflows and change overflow_flag
3019 2019-02-22 Richard Biener <rguenther@suse.de>
3021 * c-pch.c (no_checksum): Remove.
3022 (pch_init): Remove assertion that executable_checksum is not
3024 (c_common_valid_pch): Likewise.
3026 2019-02-18 Martin Sebor <msebor@redhat.com>
3029 * c-common.c (invalid_array_size_error): Handle cst_size_not_constant.
3031 2019-02-16 David Malcolm <dmalcolm@redhat.com>
3034 * c-common.c (shorten_compare): Call fold_for_warn on op0 when
3035 implementing -Wtype-limits.
3037 2019-02-11 Martin Sebor <msebor@redhat.com>
3040 * c-common.c (invalid_array_size_error): New function.
3041 (valid_array_size_p): Call it. Handle size as well as type.
3042 * c-common.h (valid_constant_size_p): New function.
3043 (enum cst_size_error): New type.
3045 2019-01-31 David Malcolm <dmalcolm@redhat.com>
3048 * known-headers.cc (get_stdlib_header_for_name): Add
3049 {FLT|DBL|LDBL}_{MAX|MIN} to "hints" array.
3051 2019-01-31 Jakub Jelinek <jakub@redhat.com>
3054 * c-pretty-print.c (pp_c_enumeration_constant): Print always as
3055 a C cast in pp_c_flag_gnu_v3 mode.
3057 2019-01-29 Jakub Jelinek <jakub@redhat.com>
3060 * c-common.c (c_common_nodes_and_builtins): Build type variants for
3061 builtin_structptr_types types even for C.
3063 2019-01-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
3065 * c-warn.c (check_address_or_pointer_of_packed_member): Handle the case
3066 when rhs is of array type correctly. Fix handling of nested structures.
3067 Fix handling of indirect_ref together with nop_expr and/or addr_expr.
3068 (check_and_warn_address_or_pointer_of_packed_member): Fix handling of
3069 type casts within nested compound expressions.
3071 2019-01-22 Jakub Jelinek <jakub@redhat.com>
3074 * c-omp.c (c_finish_omp_atomic): For bitfield atomics, update type
3075 variable after using BIT_FIELD_REF.
3077 2019-01-18 H.J. Lu <hongjiu.lu@intel.com>
3081 * c-common.h (warn_for_address_or_pointer_of_packed_member):
3082 Remove the boolean argument.
3083 * c-warn.c (check_address_of_packed_member): Renamed to ...
3084 (check_address_or_pointer_of_packed_member): This. Also
3085 warn pointer conversion.
3086 (check_and_warn_address_of_packed_member): Renamed to ...
3087 (check_and_warn_address_or_pointer_of_packed_member): This.
3088 Also warn pointer conversion.
3089 (warn_for_address_or_pointer_of_packed_member): Remove the
3090 boolean argument. Don't check pointer conversion here.
3092 2019-01-15 Richard Sandiford <richard.sandiford@arm.com>
3095 * c.opt (Wdeprecated): Move documentation and variable to common.opt.
3097 2019-01-14 Jakub Jelinek <jakub@redhat.com>
3099 * c-cppbuiltin.c (c_cpp_builtin): Define __cpp_guaranteed_copy_elision
3100 and __cpp_nontype_template_parameter_auto. Add a comment that
3101 __cpp_template_auto is deprecated.
3103 2019-01-14 Tom Honermann <tom@honermann.net>
3105 Implement P0482R5, char8_t: A type for UTF-8 characters and strings
3106 * c-common.c (c_common_reswords): Add char8_t.
3107 (fix_string_type): Use char8_t for the type of u8 string literals.
3108 (c_common_get_alias_set): char8_t doesn't alias.
3109 (c_common_nodes_and_builtins): Define char8_t as a builtin type in
3111 (c_stddef_cpp_builtins): Add __CHAR8_TYPE__.
3112 (keyword_begins_type_specifier): Add RID_CHAR8.
3113 * c-common.h (rid): Add RID_CHAR8.
3114 (c_tree_index): Add CTI_CHAR8_TYPE and CTI_CHAR8_ARRAY_TYPE.
3115 Define D_CXX_CHAR8_T and D_CXX_CHAR8_T_FLAGS.
3116 Define char8_type_node and char8_array_type_node.
3117 * c-cppbuiltin.c (cpp_atomic_builtins): Predefine
3118 __GCC_ATOMIC_CHAR8_T_LOCK_FREE.
3119 (c_cpp_builtins): Predefine __cpp_char8_t.
3120 * c-lex.c (lex_string): Use char8_array_type_node as the type of
3122 (lex_charconst): Use char8_type_node as the type of CPP_UTF8CHAR.
3123 * c-opts.c: If not otherwise specified, enable -fchar8_t when
3125 * c.opt: Add the -fchar8_t command line option.
3127 2019-01-14 Martin Sebor <msebor@redhat.com>
3130 * c-attribs.c (positional_argument): Call valid_format_string_type_p
3131 and issue errors if it fails.
3132 * c-common.h (valid_format_string_type_p): Declare.
3133 * c-format.c (valid_stringptr_type_p): Rename...
3134 (valid_format_string_type_p): ...to this and make extern.
3135 (handle_format_arg_attribute): Adjust to new name.
3136 (check_format_string): Same.
3138 2019-01-13 H.J. Lu <hongjiu.lu@intel.com>
3140 * c-warn.c (warn_for_address_or_pointer_of_packed_member):
3141 Replace "may may" with "may" in warning message.
3143 2019-01-07 Jakub Jelinek <jakub@redhat.com>
3146 * c-common.h (enum rid): Add RID_BUILTIN_CONVERTVECTOR.
3147 (c_build_vec_convert): Declare.
3148 * c-common.c (c_build_vec_convert): New function.
3150 2019-01-04 Martin Sebor <msebor@redhat.com>
3153 * c-attribs.c (handle_copy_attribute): Avoid copying attribute leaf.
3154 Handle C++ empty throw specification and C11 _Noreturn.
3155 (has_attribute): Also handle C11 _Noreturn.
3157 2019-01-04 Martin Sebor <msebor@redhat.com>
3160 * c-attribs.c (positional_argument): Also accept enumerated types.
3162 2019-01-01 Jakub Jelinek <jakub@redhat.com>
3164 Update copyright years.
3166 2018-12-20 H.J. Lu <hongjiu.lu@intel.com>
3169 * c-common.h (warn_for_address_or_pointer_of_packed_member): New.
3170 * c-warn.c (check_alignment_of_packed_member): New function.
3171 (check_address_of_packed_member): Likewise.
3172 (check_and_warn_address_of_packed_member): Likewise.
3173 (warn_for_address_or_pointer_of_packed_member): Likewise.
3174 * c.opt: Add -Wno-address-of-packed-member.
3176 2018-12-20 David Malcolm <dmalcolm@redhat.com>
3179 * c-warn.c (get_outermost_macro_expansion): New function.
3180 (spelled_the_same_p): Use it to unwind the macro expansions, and
3181 compare the outermost macro in each nested expansion, rather than
3184 2018-12-19 David Malcolm <dmalcolm@redhat.com>
3187 * c-common.h (warn_tautological_cmp): Convert 1st param from
3188 location_t to const op_location_t &.
3189 * c-warn.c (find_array_ref_with_const_idx_r): Call fold_for_warn
3190 when testing for INTEGER_CST.
3191 (warn_tautological_bitwise_comparison): Convert 1st param from
3192 location_t to const op_location_t &; use it to build a
3193 binary_op_rich_location, and use this.
3194 (spelled_the_same_p): New function.
3195 (warn_tautological_cmp): Convert 1st param from location_t to
3196 const op_location_t &. Warn for macro expansions if
3197 spelled_the_same_p. Use binary_op_rich_location.
3199 2018-12-19 David Malcolm <dmalcolm@redhat.com>
3203 * c-common.c (unsafe_conversion_p): Fold any location wrapper.
3204 (verify_tree): Handle location wrappers.
3205 (c_common_truthvalue_conversion): Strip any location wrapper.
3207 (fold_offsetof): Strip any location wrapper.
3208 (complete_array_type): Likewise for initial_value.
3209 (convert_vector_to_array_for_subscript): Call fold_for_warn on the
3210 index before checking for INTEGER_CST.
3211 * c-pretty-print.c (c_pretty_printer::primary_expression): Don't
3212 print parentheses around location wrappers.
3213 * c-warn.c (warn_logical_operator): Call fold_for_warn on op_right
3214 before checking for INTEGER_CST.
3215 (warn_tautological_bitwise_comparison): Call
3216 tree_strip_any_location_wrapper on lhs, rhs, and bitop's operand
3217 before checking for INTEGER_CST.
3218 (readonly_error): Strip any location wrapper.
3219 (warn_array_subscript_with_type_char): Strip location wrappers
3220 before checking for INTEGER_CST. Use the location of the index if
3223 2018-12-06 Jason Merrill <jason@redhat.com>
3225 PR c++/88136 - -Wdeprecated-copy false positives
3226 * c.opt (Wdeprecated-copy-dtor): New.
3227 (Wdeprecated-copy): Move to -Wextra.
3229 2018-11-29 Martin Sebor <msebor@redhat.com>
3233 * c-attribs.c (common_handle_aligned_attribute): Silently avoid setting
3234 alignments to values less than the target requires.
3235 (has_attribute): For attribute aligned consider both the attribute
3236 and the alignment bits.
3237 * c-common.c (c_init_attributes): Optionally issue a warning for
3240 2018-11-28 Martin Sebor <msebor@redhat.com>
3244 * c-warn.c (sizeof_pointer_memaccess_warning): Bail if source
3245 or destination is an error.
3247 2018-11-28 Jakub Jelinek <jakub@redhat.com>
3250 * c-ubsan.c: Include langhooks.h.
3251 (ubsan_instrument_division): Change gcc_assert that main variants
3252 of op0 and op1 types are equal to gcc_checking_assert that the
3253 main variants are compatible types.
3255 2018-11-27 Eric Botcazou <ebotcazou@adacore.com>
3257 * c-ada-spec.c: Include stringpool.h.
3258 (has_static_fields): Return false for incomplete types.
3259 (is_tagged_type): Likewise.
3260 (has_nontrivial_methods): Likewise.
3261 (dump_ada_node) <INTEGER_TYPE>: Deal specifically with __int128.
3262 (struct overloaded_name_hash): New structure.
3263 (struct overloaded_name_hasher): Likewise.
3264 (overloaded_names): New global variable.
3265 (init_overloaded_names): New static function.
3266 (overloaded_name_p): New predicate.
3267 (dump_ada_declaration) <TYPE_DECL>: Tidy up and set TREE_VISITED
3268 on the TYPE_STUB_DECL of the original type of a typedef, if any.
3269 <FUNCTION_DECL>: Bail out for an unsupported overloaded name.
3270 Remove always-true condition and dump forward types.
3271 (dump_ada_specs): Delete overloaded_names.
3273 2018-11-20 Martin Sebor <msebor@redhat.com>
3275 * c-attribs.c (type_for_vector_size): New function.
3276 (type_valid_for_vector_size): Same.
3277 (handle_vector_size_attribute): Move code to the functions above
3279 (validate_attribute, has_attribute): New functions.
3280 * c-common.h (has_attribute): Declare.
3281 (rid): Add RID_HAS_ATTRIBUTE_EXPRESSION.
3282 * c-common.c (c_common_resword): Same.
3284 2018-11-16 Jason Merrill <jason@redhat.com>
3286 * c-lex.c (c_common_has_attribute): Handle likely/unlikely.
3287 * c-attribs.c (attr_cold_hot_exclusions): Make public.
3289 2018-11-16 Jakub Jelinek <jakub@redhat.com>
3292 * c-common.c (fix_string_type): Reject string literals larger than
3293 TYPE_MAX_VALUE (ssizetype) bytes.
3295 2018-11-15 Martin Sebor <msebor@redhat.com>
3299 * c-attribs.c (positional_argument): New function.
3300 (handle_alloc_size_attribute): Use it and simplify.
3301 (handle_alloc_align_attribute): Same.
3302 (handle_assume_aligned_attribute): Same.
3303 (handle_nonnull_attribute): Same.
3304 * c-common.c (check_function_arguments): Pass fntype to
3305 check_function_format.
3306 * c-common.h (check_function_format): Add an argument.
3307 (PosArgFlags, positional_argument): Declare new type and function.
3308 * c-format.c (decode_format_attr): Add arguments.
3309 (check_format_string, get_constant): Same.
3310 (convert_format_name_to_system_name): Adjust.
3312 2018-11-15 David Malcolm <dmalcolm@redhat.com>
3315 * c-opts.c (c_diagnostic_finalizer): Add diagnostic_t param.
3317 2018-11-14 Jakub Jelinek <jakub@redhat.com>
3319 P1236R1 - Signed integers are two's complement
3320 * c-warn.c (maybe_warn_shift_overflow): Don't warn for c++2a.
3321 * c-ubsan.c (ubsan_instrument_shift): Make signed shifts
3322 with in-range second operand well defined for -std=c++2a.
3325 * c-common.c (parse_optimize_options): Allocate option string from
3326 opts_obstack rather than as GC memory. Move the allocation after
3327 warning for invalid option.
3329 2018-11-13 David Malcolm <dmalcolm@redhat.com>
3331 * c-common.c (c_get_substring_location): Update for renaming of
3332 get_source_location_for_substring to get_location_within_string.
3333 * c-lex.c: Replace "source_location" with "location_t".
3334 * c-opts.c: Likewise.
3335 * c-ppoutput.c: Likewise.
3337 2018-11-13 Martin Sebor <msebor@redhat.com>
3340 * c-attribs.c (handle_copy_attribute): Exclude inlining attributes.
3341 (handle_tls_model_attribute): Improve diagnostics.
3343 2018-11-12 Jason Merrill <jason@redhat.com>
3345 * c-cppbuiltin.c (c_cpp_builtins): Define
3346 __cpp_impl_destroying_delete.
3348 * c-cppbuiltin.c (c_cpp_builtins): Change __cpp_explicit_bool to
3349 __cpp_conditional_explicit.
3351 2018-11-09 Martin Sebor <msebor@redhat.com>
3354 * c-attribs.c (handle_copy_attribute): New function.
3356 2018-11-09 Martin Sebor <msebor@redhat.com>
3359 * c-common.c (check_user_alignment): Use MAX_OFILE_ALIGNMENT.
3361 2018-11-08 Jakub Jelinek <jakub@redhat.com>
3363 * c-common.h (c_finish_omp_taskgroup): Add CLAUSES argument.
3364 (c_finish_omp_atomic): Replace bool SEQ_CST argument with
3365 enum omp_memory_order MEMORY_ORDER.
3366 (c_finish_omp_flush): Add MO argument.
3367 (c_omp_depend_t_p, c_finish_omp_depobj): Declare.
3368 (c_finish_omp_for): Add FINAL_P argument.
3369 * c-omp.c: Include memmodel.h.
3370 (c_finish_omp_taskgroup): Add CLAUSES argument. Set
3371 OMP_TASKGROUP_CLAUSES to it.
3372 (c_finish_omp_atomic): Replace bool SEQ_CST argument with
3373 enum omp_memory_order MEMORY_ORDER. Set OMP_ATOMIC_MEMORY_ORDER
3374 instead of OMP_ATOMIC_SEQ_CST.
3375 (c_omp_depend_t_p, c_finish_omp_depobj): New functions.
3376 (c_finish_omp_flush): Add MO argument, if not MEMMODEL_LAST, emit
3377 __atomic_thread_fence call with the given value.
3378 (check_omp_for_incr_expr): Formatting fixes.
3379 (c_finish_omp_for): Add FINAL_P argument. Allow NE_EXPR
3380 even in OpenMP loops, diagnose if NE_EXPR and incr expression
3381 is not constant expression 1 or -1. Transform NE_EXPR loops
3382 with iterators pointers to VLA into LT_EXPR or GT_EXPR loops.
3383 (c_omp_check_loop_iv_r): Look for orig decl of C++ range for
3385 (c_omp_split_clauses): Add support for combined
3386 #pragma omp parallel master and
3387 #pragma omp {,parallel }master taskloop{, simd} constructs.
3388 Handle OMP_CLAUSE_IN_REDUCTION. Handle OMP_CLAUSE_REDUCTION_TASK.
3389 Handle OMP_CLAUSE_NONTEMPORAL. Handle splitting OMP_CLAUSE_IF
3390 also to OMP_SIMD. Copy OMP_CLAUSE_LASTPRIVATE_CONDITIONAL.
3391 (c_omp_predetermined_sharing): Don't return
3392 OMP_CLAUSE_DEFAULT_SHARED for const qualified decls.
3393 * c-pragma.c (omp_pragmas): Add PRAGMA_OMP_DEPOBJ and
3394 PRAGMA_OMP_REQUIRES.
3395 * c-pragma.h (enum pragma_kind): Likewise.
3396 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_NONTEMPORAL
3397 and PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
3399 2018-11-08 David Malcolm <dmalcolm@redhat.com>
3401 * c-format.c (gcc_dump_printf_char_table): Add entry for %f.
3403 2018-11-08 David Malcolm <dmalcolm@redhat.com>
3405 * c-format.c (local_cgraph_node_ptr_node): New variable.
3406 (gcc_dump_printf_char_table): Add entry for %C.
3407 (get_pointer_to_named_type): New function, taken from the handling
3408 code for "gimple *" from...
3409 (init_dynamic_diag_info): ...here. Add handling for
3411 * c-format.h (T_CGRAPH_NODE): New.
3413 2018-10-19 Jason Merrill <jason@redhat.com>
3415 * c-cppbuiltin.c (c_cpp_builtins): Add
3416 __cpp_nontype_template_parameter_class.
3418 2018-10-31 Nathan Sidwell <nathan@acm.org>
3420 * c-opts.c (c_finish_options): Force command line macro
3421 location. Refactor to avoid repeating main debug hook.
3422 (push_command_line_include): Clarify comment.
3424 * c-opts.c (c_finish_options): Adjust cpp_force_token_locations call.
3426 2018-10-30 Martin Sebor <msebor@redhat.com>
3429 * c-format.c (check_format_types): Avoid diagnosing null pointer
3430 arguments to printf-family of functions.
3432 2018-10-30 Marek Polacek <polacek@redhat.com>
3434 Implement P0892R2, explicit(bool).
3435 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_explicit_bool.
3437 2018-10-29 David Malcolm <dmalcolm@redhat.com>
3439 * name-hint.h (name_hint::take_deferred): New member function.
3441 2018-10-29 David Malcolm <dmalcolm@redhat.com>
3444 * c-common.c (check_function_sentinel): Call fold_for_warn on the
3446 (check_function_restrict): Rename param "argarray" to
3447 "unfolded_argarray", and make a copy named "argarray", calling
3448 fold_for_warn on each argument.
3449 (check_function_arguments): Add note about responsibility for
3450 folding the arguments.
3452 2018-10-17 Joseph Myers <joseph@codesourcery.com>
3454 * c-common.c (flag_isoc2x): New variable.
3455 * c-common.h (clk_c): Update comment to reference C2X.
3456 (flag_isoc99, flag_isoc11): Update comments to reference future
3457 standard versions in general.
3458 (flag_isoc2x): Declare.
3459 * c-opts.c (set_std_c2x): New function.
3460 (c_common_handle_option): Handle -std=c2x and -std=gnu2x.
3461 (set_std_c89, set_std_c99, set_std_c11, set_std_c17): Set
3463 * c.opt (Wc11-c2x-compat, std=c2x, std=gnu2x): New options.
3465 2018-10-17 Joseph Myers <joseph@codesourcery.com>
3467 * c.opt (std=c17, std=c18, std=gnu17, std=gnu18, std=iso9899:2017)
3468 (std=iso9899:2018): Document C17 as published in 2018.
3470 2018-10-12 Christophe Lyon <christophe.lyon@linaro.org>
3473 * c-pretty-print.c (c_pretty_printer::constant): Fix typo.
3475 2018-10-11 Will Wray <wjwray@gmail.com>
3478 * c-pretty-print.h (pp_c_type_cast): Prototype.
3479 (pp_c_integer_constant): Likewise.
3480 * c-pretty-print.c (pp_c_type_cast): No longer static.
3481 (pp_c_integer_constant): Likewise.
3482 (pp_c_enumeration_constant): Fix loop termination when finding
3483 name of constant. No longer returns a value. Call
3484 pp_c_integer_constant.
3485 (c_pretty_printer::constant): Update for changes to
3486 pp_c_enumeration_constant.
3488 2018-10-11 Jakub Jelinek <jakub@redhat.com>
3490 * c-lex.c (c_common_has_attribute): Return 201803 instead of 20180312
3491 for no_unique_address.
3493 2018-10-09 David Malcolm <dmalcolm@redhat.com>
3495 * c-common.c (c_option_controlling_cpp_error): Rename to...
3496 (c_option_controlling_cpp_diagnostic): ...this, and convert
3497 "reason" from int to enum.
3498 (c_cpp_error): Rename to...
3499 (c_cpp_diagnostic): ...this, converting level and reason to enums.
3500 * c-common.h (c_cpp_error): Rename to...
3501 (c_cpp_diagnostic): ...this, converting level and reason to enums.
3502 * c-opts.c (c_common_init_options): Update for renaming.
3504 2018-10-08 Richard Sandiford <richard.sandiford@arm.com>
3507 * c-common.c (vector_types_compatible_elements_p): Use
3508 INTEGRAL_TYPE_P instead of checking only for INTEGER_TYPE.
3510 2018-10-04 Vinay Kumar <vinay.kumar@blackfigtech.com>
3512 * c-attribs.c (get_priority): Add a warning flag warn_prio_ctor_dtor
3513 to generate constructor destructor priority warning.
3514 * c.opt (-Wprio-ctor-dtor): New option.
3516 2018-10-01 Jason Merrill <jason@redhat.com>
3518 * c-lex.c (c_common_has_attribute): Add no_unique_address.
3520 2018-10-01 Eric Botcazou <ebotcazou@adacore.com>
3522 * c-ada-spec.c (get_underlying_decl): Get to the main type variant.
3523 (dump_ada_node): Add const keyword.
3525 2018-09-25 Martin Liska <mliska@suse.cz>
3527 * c-common.c (c_common_truthvalue_conversion):
3528 Remove Pascal from documentation.
3530 2018-09-21 Eric Botcazou <ebotcazou@adacore.com>
3532 * c-ada-spec.c: Include diagnostic.h.
3533 (dump_ada_declaration) <RECORD_TYPE>: Issue a warning on packed layout.
3535 2018-09-19 Marek Polacek <polacek@redhat.com>
3537 * c.opt (Wclass-conversion): New.
3539 2018-09-17 David Malcolm <dmalcolm@redhat.com>
3541 * c-format.c (range_label_for_format_type_mismatch::get_text):
3542 Update for new param.
3544 2018-09-17 David Malcolm <dmalcolm@redhat.com>
3546 * c-format.c (format_warning_at_char): Update for introduction of
3547 format_string_diagnostic_t.
3548 (format_type_warning): Likewise.
3550 2018-09-17 Martin Jambor <mjambor@suse.cz>
3553 * c.opt (Wabsolute-value): New.
3555 2018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
3557 * c-common.c (complete_flexible_array_elts): New helper function.
3558 * c-common.h (complete_flexible_array_elts): Declare.
3560 2018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
3562 * c-common.c (braced_list_to_string): Remove eval parameter.
3563 Add some more checks. Always create zero-terminated STRING_CST.
3564 * c-common.h (braced_list_to_string): Adjust prototype.
3566 2018-08-27 David Malcolm <dmalcolm@redhat.com>
3569 * c-common.c (c_cpp_error): Update for conversion of show_caret_p
3571 (maybe_suggest_missing_token_insertion): Likewise.
3572 (maybe_add_include_fixit): Add param "override_location". If set,
3573 and source-printing is enabled, then override the rich_location's
3574 primary location with that of the insertion point for the fix-it
3575 hint, marking it with SHOW_LINES_WITHOUT_RANGE.
3576 * c-common.h (extern void maybe_add_include_fixit): Add bool
3578 * c-format.c (selftest::test_type_mismatch_range_labels): Update
3579 for conversion of show_caret_p to a tri-state.
3580 * c-warn.c (warn_for_restrict): Likewise.
3582 (suggest_missing_header::~suggest_missing_header): Update call to
3583 maybe_add_include_fixit to suggest overriding the location, as it
3586 2018-08-27 Martin Liska <mliska@suse.cz>
3588 * c-common.c (check_function_restrict): Use new function
3589 fndecl_built_in_p and remove check for FUNCTION_DECL if
3591 (check_builtin_function_arguments): Likewise.
3592 (reject_gcc_builtin): Likewise.
3593 * c-warn.c (sizeof_pointer_memaccess_warning): Likewise.
3595 2018-08-26 Marek Polacek <polacek@redhat.com>
3597 PR c++/87029, Implement -Wredundant-move.
3598 * c.opt (Wredundant-move): New option.
3600 2018-08-21 Marek Polacek <polacek@redhat.com>
3602 PR c++/86981, Implement -Wpessimizing-move.
3603 * c.opt (Wpessimizing-move): New option.
3605 2018-08-20 David Malcolm <dmalcolm@redhat.com>
3608 * c-attribs.c (common_handle_aligned_attribute): Add
3609 auto_diagnostic_group instance.
3610 * c-indentation.c (warn_for_misleading_indentation): Likewise.
3611 * c-opts.c (c_common_post_options): Likewise.
3612 * c-warn.c (warn_logical_not_parentheses): Likewise.
3613 (warn_duplicated_cond_add_or_warn): Likewise.
3614 (warn_for_multistatement_macros): Likewise.
3616 2018-08-20 Nathan Sidwell <nathan@acm.org>
3618 * c-ada-spec.c (macro_length, dump_ada_macros): Adjust macro parm
3621 2018-08-17 Nathan Sidwell <nathan@acm.org>
3623 * c-cppbuiltin.c (struct lazy_hex_fp_value_struct): Remove macro
3625 (laxy_hex_fp_value_count): Make unsigned.
3626 (lazy_hex_fp_value): Provided with macro & lazy number. Directly
3627 manipulate the macro.
3628 (builtin_defin_with_hex_fp_value): Adjust callback name, use
3631 2018-08-17 David Malcolm <dmalcolm@redhat.com>
3633 * c-format.c (enum format_type): Add gcc_dump_printf_format_type.
3634 (gcc_dump_printf_length_specs): New.
3635 (gcc_dump_printf_flag_pairs): New.
3636 (gcc_dump_printf_flag_specs): New.
3637 (gcc_dump_printf_char_table): New.
3638 (format_types_orig): Add entry for "gcc_dump_printf".
3639 (init_dynamic_diag_info): Set up length_char_specs and
3640 conversion_specs for gcc_dump_printf_format_type.
3641 (handle_format_attribute): Handle gcc_dump_printf_format_type.
3643 2018-08-17 Nathan Sidwell <nathan@acm.org>
3645 * c-ada-spec.c (macro_length, dump_ada_macros): Constify.
3647 * c-ada-spec.c: Don't #include "cpp-id-data.h"
3648 * c-cppbuiltin.c: Likewise.
3650 2018-08-17 Martin Liska <mliska@suse.cz>
3652 * c.opt: Remove Warn, Init and Report for options with
3653 Ignore/Deprecated flag. Warning is done automatically for
3656 2018-08-16 David Malcolm <dmalcolm@redhat.com>
3659 * c-common.c (selftest::c_family_tests): Call
3660 selftest::c_indentation_c_tests.
3661 * c-common.h (selftest::c_indentation_c_tests): New decl.
3662 * c-indentation.c: Include "selftest.h".
3663 (next_tab_stop): Add "tab_width" param, rather than accessing
3665 (get_visual_column): Likewise. Clarify comment. Bulletproof
3666 against reading past the end of the line.
3667 (get_first_nws_vis_column): Add "tab_width" param.
3668 (detect_intervening_unindent): Likewise.
3669 (should_warn_for_misleading_indentation): Read tab width from
3670 cpp_opts and pass around.
3671 (selftest::test_next_tab_stop): New test.
3672 (selftest::assert_get_visual_column_succeeds): New function.
3673 (ASSERT_GET_VISUAL_COLUMN_SUCCEEDS): New macro.
3674 (selftest::assert_get_visual_column_fails): New function.
3675 (ASSERT_GET_VISUAL_COLUMN_FAILS): New macro.
3676 (selftest::test_get_visual_column): New test.
3677 (selftest::c_indentation_c_tests): New function.
3679 2018-08-16 Nathan Sidwell <nathan@acm.org>
3681 * c-ada-spec.c (count_ada_macro): Use cpp_user_macro_p.
3682 (store_ada_macro): Likewise.
3683 * c-ppoutput.c (cb_used_define, dump_macro): Likewise.
3684 * c-spellcheck.cc (should-suggest_as_macro_p): Likewise,
3686 2018-08-15 David Malcolm <dmalcolm@redhat.com>
3688 * c-format.c: Include "selftest-diagnostic.h" and
3689 "gcc-rich-location.h".
3690 (format_warning_at_char): Pass NULL for new label params of
3692 (class indirection_suffix): New class.
3693 (class range_label_for_format_type_mismatch): New class.
3694 (format_type_warning): Move logic for generating "*" suffix to
3695 class indirection_suffix. Create "fmt_label" and "param_label"
3696 to show their types, and pass them to the
3697 format_warning_at_substring calls.
3698 (selftest::test_type_mismatch_range_labels): New test.
3699 (selftest::c_format_c_tests): Call it.
3701 2018-08-13 Martin Sebor <msebor@redhat.com>
3703 PR tree-optimization/71625
3704 * c-common.c (braced_list_to_string): New function.
3705 * c-common.h (braced_list_to_string): Declare it.
3707 2018-08-08 Nathan Sidwell <nathan@acm.org>
3709 * c-common.c (try_to_locate_new_include_inertion_point): Use
3710 linemap_included_from_linemap.
3711 * c-lex.c (fe_file_change): Use linemap_included_from.
3712 * c-ppoutput.c (pp_file_change): Likewise.
3714 2018-08-01 Martin Sebor <msebor@redhat.com>
3716 PR tree-optimization/86650
3717 * c-format.c (gcc_tdiag_char_table): Update comment for "%G".
3718 (gcc_cdiag_char_table, gcc_cxxdiag_char_table): Same.
3719 (init_dynamic_diag_info): Update from "gcall *" to "gimple *".
3720 * c-format.h (T89_G): Update to be "gimple *" rather than
3722 (local_gcall_ptr_node): Rename...
3723 (local_gimple_ptr_node): ...to this.
3725 2018-07-31 David Malcolm <dmalcolm@redhat.com>
3727 * c-format.c (PP_FORMAT_CHAR_TABLE): New macro, based on existing
3728 table entries for gcc_diag_char_table, and the 'Z' entry from
3729 gcc_tdiag_char_table, changing the "chain" entry for 'Z' from
3730 &gcc_tdiag_char_table[0] to &gcc_diag_char_table[0].
3731 (gcc_diag_char_table): Use PP_FORMAT_CHAR_TABLE, implicitly
3732 adding missing "Z" for this table. Remove erroneous "G" and "K"
3734 (gcc_tdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
3735 (gcc_cdiag_char_table): Use PP_FORMAT_CHAR_TABLE.
3736 (gcc_cxxdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
3738 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3740 * c-common.c (speculation_safe_resolve_call): New function.
3741 (speculation_safe_resolve_params): New function.
3742 (speculation_safe_resolve_return): New function.
3743 (resolve_overloaded_builtin): Handle __builtin_speculation_safe_value.
3744 * c-cppbuiltin.c (c_cpp_builtins): Add pre-define for
3745 __HAVE_SPECULATION_SAFE_VALUE.
3747 2018-07-20 David Malcolm <dmalcolm@redhat.com>
3749 * c-common.c (c_cpp_error): Remove redundant "line_table"
3750 parameter from call to rich_location::set_range.
3751 (maybe_suggest_missing_token_insertion): Likewise.
3753 2018-07-20 Martin Sebor <msebor@redhat.com>
3756 * c.opt (-Warray-bounds): Remove redundant -Wall.
3758 2018-07-20 Martin Sebor <msebor@redhat.com>
3761 * c-common.h (c_common_handle_option): Change function argument
3763 * c-opts.c (c_common_init_options): Same.
3764 (c_common_handle_option): Same. Remove special handling of
3765 OPT_Walloca_larger_than_ and OPT_Wvla_larger_than_.
3766 * c.opt (-Walloc-size-larger-than, -Walloca-larger-than): Change
3767 options to take a HOST_WIDE_INT argument and accept a byte-size
3769 (-Wvla-larger-than): Same.
3770 (-Wno-alloc-size-larger-than, -Wno-alloca-larger-than): New.
3771 (-Wno-vla-larger-than): Same.
3773 2018-07-12 Jakub Jelinek <jakub@redhat.com>
3775 * c-attribs.c (c_common_attribute_table): Add
3776 "omp declare target implicit" attribute.
3778 2018-07-12 Richard Biener <rguenther@suse.de>
3781 * c-attribs.c (handle_packed_attribute): Do not build a variant
3782 type with TYPE_PACKED, instead ignore the attribute if we may
3783 not apply to the original type.
3785 2018-07-10 Jakub Jelinek <jakub@redhat.com>
3788 * c-omp.c (c_omp_check_loop_iv_r, c_omp_check_loop_iv): Allow declv
3789 to contain TREE_LIST for both the original class iterator and the
3792 2018-07-07 Eric Botcazou <ebotcazou@adacore.com>
3794 * c-ada-spec.c (to_ada_name): Remove index parameter.
3795 (pp_ada_tree_identifier): Likewise.
3796 (dump_ada_macros): Adjust call to to_ada_name.
3797 (struct overloaded_name_hash): Delete.
3798 (struct overloaded_name_hasher): Likewise.
3799 (overloaded_names): Likewise.
3800 (compute_overloading_index): Likewise.
3801 (dump_ada_decl_name): Do not call compute_overloading_index and
3802 adjust calls to pp_ada_tree_identifier.
3803 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
3804 (dump_ada_import): Add spc parameter and switch to aspect syntax.
3805 (dump_ada_function_declaration): Adjust call to pp_ada_tree_identifier.
3806 (dump_ada_enum_type): Remove type and display_convention parameters.
3807 Adjust calls to pp_ada_tree_identifier.
3808 (dump_ada_node): Likewise and for dump_ada_structure.
3809 (dump_nested_type) <ENUMERAL_TYPE>: Adjust call to dump_ada_enum_type
3811 <RECORD_TYPE>: Adjust call to dump_ada_structure and switch to aspect
3813 (print_constructor): Adjust call to pp_ada_tree_identifier.
3814 (print_destructor): Likewise.
3815 (dump_ada_declaration): Switch to aspect syntax.
3816 (dump_ada_structure): Likewise and tidy up. Replace display_convention
3817 parameter with nested parameter.
3818 (dump_ads): Emit pragma Ada_2012 in lieu of pragma Ada_2005.
3819 (dump_ada_specs): Do not delete overloaded_names table.
3821 2018-07-06 Peter Bergner <bergner@linux.ibm.com>
3824 * c-attribs.c (handle_mode_attribute): Call translate_mode_attribute
3827 2018-07-05 Nathan Sidwell <nathan@acm.org>
3829 * c-lex.c (fe_file_change): Check SYSTEM_IMPLICIT_EXTERN_C not
3830 NO_IMPLICIT_EXTERN_C.
3832 2018-06-28 Martin Liska <mliska@suse.cz>
3834 * cppspec.c: Include opt-suggestions.h.
3836 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
3837 Thomas Schwinge <thomas@codesourcery.com>
3838 Cesar Philippidis <cesar@codesourcery.com>
3840 * c-pragma.h (enum pragma_omp_clause): Add
3841 PRAGMA_OACC_CLAUSE_{FINALIZE,IF_PRESENT}. Remove
3842 PRAGMA_OACC_CLAUSE_PRESENT_OR_{COPY,COPYIN,COPYOUT,CREATE}.
3844 2018-06-20 Jakub Jelinek <jakub@redhat.com>
3847 * c-common.c (check_nonnull_arg): Use fold_for_warn. Adjust obsolete
3850 2018-06-18 Martin Sebor <msebor@redhat.com>
3853 * c-warn.c (sizeof_pointer_memaccess_warning): Check for attribute
3856 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
3858 * c-common.c (c_common_truthvalue_conversion): Handle ABSU_EXPR.
3860 2018-06-13 Jason Merrill <jason@redhat.com>
3862 * c-opts.c (c_common_post_options): Warn about useless -Wabi.
3863 (c_common_handle_option) [OPT_Wabi_]: Remove flag_abi_compat_version
3866 PR c++/86094 - wrong code with defaulted move ctor.
3867 * c-opts.c (c_common_post_options): Bump the current ABI version to
3868 13. Set warn_abi_version and flag_abi_compat_version to the current
3869 version rather than 0. Fix defaulting flag_abi_compat_version from
3872 2018-06-12 Martin Sebor <msebor@redhat.com>
3875 * c-warn.c (sizeof_pointer_memaccess_warning): Avoid warning when
3876 sizeof source and destination yields the same value.
3878 2018-06-12 Martin Liska <mliska@suse.cz>
3880 * c.opt: Make MPX-related options as Deprecated.
3882 2018-06-08 David Malcolm <dmalcolm@redhat.com>
3884 * c-pretty-print.c (c_pretty_printer::statement): Use TDF_NONE
3887 2018-06-08 Martin Liska <mliska@suse.cz>
3889 * c-attribs.c (handle_bnd_variable_size_attribute): Remove support
3890 for MPX (macros, related functions, fields in cgraph_node, ...).
3891 (handle_bnd_legacy): Likewise.
3892 (handle_bnd_instrument): Likewise.
3895 2018-06-06 Jakub Jelinek <jakub@redhat.com>
3898 * c-cppbuiltin.c (c_cpp_builtins): Fix a typo, set
3899 __cpp_transactional_memory to 201500 instead of 210500.
3901 2018-06-06 Jason Merrill <jason@redhat.com>
3903 PR c++/85710 - ICE with -Wmemset-elt-size.
3904 * c-warn.c (warn_for_memset): Don't crash on incomplete element type.
3906 2018-06-01 Jason Merrill <jason@redhat.com>
3908 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_deduction_guides to
3911 2018-06-01 Eric Botcazou <ebotcazou@adacore.com>
3913 * c-ada-spec.c (dump_ada_declaration) <TYPE_DECL>: Generate a forward
3914 declaration for a typedef independently of whether the declaration of
3915 the subtype is generated.
3917 2018-05-31 Martin Sebor <msebor@redhat.com>
3920 * c.opt (-Wno-alloc-size-larger-than): New option.
3922 2018-04-22 David Pagan <dave.pagan@oracle.com>
3925 * c-opts.c (c_common_post_options): Set default for warn_return_type
3926 for C++/C++ with ObjC extensions only. For C, makes it possible to
3927 differentiate between default (no option), -Wreturn-type, and
3930 2018-05-29 Jason Merrill <jason@redhat.com>
3932 * c.opt (Winit-list-lifetime): New flag.
3934 2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
3936 * c-lex.c (get_fileinfo): Use splay_tree_compare_strings and
3937 splay_tree_delete_pointers.
3939 2018-05-26 Jakub Jelinek <jakub@redhat.com>
3942 * c-warn.c (diagnose_mismatched_attributes): Remove unnecessary
3943 noinline variable to workaround broken kernel headers.
3945 2018-05-18 Jason Merrill <jason@redhat.com>
3947 * c.opt (Wdeprecated-copy): New flag.
3949 2018-05-17 Martin Liska <mliska@suse.cz>
3951 * c-warn.c (overflow_warning): Do not use
3952 space in between 'G_' and '('.
3954 2018-05-09 Jason Merrill <jason@redhat.com>
3956 * c-common.c (valid_array_size_p): Add complain parameter.
3957 * c-common.h: ...which defaults to true.
3959 2018-05-11 Jakub Jelinek <jakub@redhat.com>
3962 * c-omp.c (c_omp_predetermined_sharing): Return
3963 OMP_CLAUSE_DEFAULT_SHARED for artificial vars with integral type.
3965 2018-05-11 Martin Liska <mliska@suse.cz>
3968 * c-attribs.c (handle_no_sanitize_attribute): Iterate all
3971 2018-05-10 Jakub Jelinek <jakub@redhat.com>
3974 * c-common.h (fold_offsetof_1): Removed.
3975 (fold_offsetof): Add TYPE argument defaulted to size_type_node and
3976 CTX argument defaulted to ERROR_MARK.
3977 * c-common.c (fold_offsetof_1): Renamed to ...
3978 (fold_offsetof): ... this. Remove wrapper function. Add TYPE
3979 argument, convert the pointer constant to TYPE and use size_binop
3980 with PLUS_EXPR instead of fold_build_pointer_plus if type is not
3981 a pointer type. Adjust recursive calls.
3983 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
3986 * c-attribs.c (handle_visibility_attribute): Do not set no_add_attrs.
3988 2018-05-07 Nathan Sidwell <nathan@acm.org>
3990 * c.opt (ffor-scope): Remove functionality, issue warning.
3992 2018-05-03 Nathan Sidwell <nathan@acm.org>
3994 * c.opt (ffriend-injection): Remove functionality, issue warning.
3996 2018-05-01 David Malcolm <dmalcolm@redhat.com>
3999 * c-format.c (struct format_check_results): Add field
4001 (check_format_info): Initialize it, and warn if encountered.
4002 (check_format_arg): Distinguish between wide char and
4003 everything else when detecting arrays of non-char.
4005 2018-04-30 David Malcolm <dmalcolm@redhat.com>
4007 * c-format.c (get_corrected_substring): Update for
4008 location_get_source_line returning a char_span. Use a char_span
4009 when handling the prefix of the correction.
4010 * c-indentation.c (get_visual_column): Update for
4011 location_get_source_line returning a char_span.
4012 (get_first_nws_vis_column): Likewise.
4014 2018-03-29 David Malcolm <dmalcolm@redhat.com>
4017 * known-headers.cc (get_stdlib_header_for_name): Add various names
4018 from <assert.h>, <string.h>, and <memory.h>; add more names from
4021 2018-03-27 Jakub Jelinek <jakub@redhat.com>
4024 * c-common.c (fold_offsetof_1) <case COMPOUND_EXPR>: Assert that
4025 get_base_address of the second operand is a VAR_P, rather than the
4026 operand itself, and use gcc_checking_assert instead of gcc_assert.
4028 2018-03-23 Marek Polacek <polacek@redhat.com>
4031 * c-pretty-print.c (c_pretty_printer::multiplicative_expression)
4032 <case RDIV_EXPR>: Tweak condition.
4034 2018-03-20 Eric Botcazou <ebotcazou@adacore.com>
4036 * c-ada-spec.c (pp_ada_tree_identifier): Deal specifically with _Bool.
4038 2018-03-16 Jakub Jelinek <jakub@redhat.com>
4041 * c-warn.c (conversion_warning): Replace "to to" with "to" in
4045 * c-warn.c (diagnose_mismatched_attributes): Remove trailing space from
4048 2018-03-16 Richard Biener <rguenther@suse.de>
4051 * c-gimplify.c (c_gimplify_expr): Revert previous change. Instead
4052 unshare the possibly folded expression.
4054 2018-03-15 Richard Biener <rguenther@suse.de>
4057 * c-gimplify.c (c_gimplify_expr): Do not fold expressions.
4059 2018-03-13 Martin Sebor <msebor@redhat.com>
4061 PR tree-optimization/84725
4062 * c-attribs.c (handle_nonstring_attribute): Allow attribute nonstring
4063 with all three narrow character types, including their qualified forms.
4065 2018-03-12 Martin Sebor <msebor@redhat.com>
4067 PR tree-optimization/83456
4068 * c-common.c (check_function_restrict): Return bool.
4069 Restore checking of bounded built-in functions.
4070 (check_function_arguments): Also return the result
4071 of warn_for_restrict.
4072 * c-common.c (check_function_restrict): Return bool.
4073 * c-warn.c (warn_for_restrict): Return bool.
4075 2018-03-02 Marek Polacek <polacek@redhat.com>
4078 * c-warn.c (warn_for_sign_compare): Bail out if any of the operands
4081 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
4083 * c-attribs.c (c_common_attribute_table): Remove "cilk simd
4086 2018-03-01 Marek Polacek <polacek@redhat.com>
4089 * c-attribs.c (common_handle_aligned_attribute): Don't use invalid
4090 alignment in computation.
4092 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
4094 * c-ada-spec.c (dump_ada_node) <NULLPTR_TYPE>: New case.
4095 <REAL_TYPE>: Deal specifically with _Float128/__float128.
4097 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
4099 * c-ada-spec.c (dump_ada_double_name) <ENUMERAL_TYPE>: New case.
4100 (is_char_array): Take a type instead of a declaration.
4101 (dump_ada_array_type): Likewise.
4102 (is_simple_enum): Minor tweak.
4103 (dump_ada_enum_type): New function extracted from...
4104 (dump_ada_node) <ENUMERAL_TYPE>: ...here. Invoke it.
4105 <INTEGER_TYPE>: Remove unreachable code.
4106 <RECORD_TYPE>: Likewise. Minor tweaks.
4107 (dump_nested_type) <ARRAY_TYPE>: Adjust to above changes.
4108 <ENUMERAL_TYPE>: New case.
4109 <RECORD_TYPE>: Factor out common code.
4110 (dump_ada_declaration) <ARRAY_TYPE>: Adjust to above changes.
4111 Minor tweaks. Deal with enumeral types.
4112 (dump_ada_structure): Minor tweaks.
4114 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
4116 * c-ada-spec.c (dump_ada_node) <POINTER_TYPE>: Do not use generic
4117 address for incomplete structures.
4118 (dump_forward_type): Do not bail out for incomplete structures.
4119 (dump_ada_declaration): Do not special-case incomplete structures
4120 for subtypes. Dump them as null records for types.
4122 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
4124 * c-ada-spec.c (dump_ada_import): Use boolean and fix formatting.
4125 (is_char_array): Fix formatting.
4126 (dump_template_types): Likewise.
4127 (dump_generic_ada_node): Rename into...
4128 (dump_ada_node): ...this.
4129 <POINTER_TYPE>: Remove superfluous space. Use generic address for
4130 incomplete structures and not for empty structures. Do not use it
4131 when forward declarations are needed.
4132 (dump_forward_type): New function.
4133 (dump_nested_types): Remove FORWARD parameter. Do not consider
4134 TREE_VISITED and do not generate a forward declaration. Only dump
4135 original nested types for nested declaration.
4136 (dump_nested_type) <POINTER_TYPE>: Call dump_forward_type.
4137 <ARRAY_TYPE>: Likewise if the component type is an anonymous pointer.
4138 <RECORD_TYPE>: Do not consider TREE_VISITED.
4139 (dump_ada_declaration): Use booleans and fix formatting throughout.
4140 <TYPE_DECL>: Skip incomplete structures and not empty structures.
4141 Call dump_forward_type instead of dump_nested_types for a typedef.
4142 Remove superfluous check and adjust call to dump_nested_types.
4143 <POINTER_TYPE>: Call dump_forward_type and fall through.
4144 (dump_ada_struct_decl): Rename into...
4145 (dump_ada_structure): ...this. Do not special-case empty structures.
4147 2018-02-27 Martin Sebor <msebor@redhat.com>
4150 * c.opt (-Wmissing-attributes): New option.
4152 2018-02-21 Martin Liska <mliska@suse.cz>
4154 * c.opt (Wcatch-value=): Add IntegerRange.
4156 2018-02-15 Jason Merrill <jason@redhat.com>
4158 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_deduction_guides.
4160 2018-02-09 Nathan Sidwell <nathan@acm.org>
4163 * c-common.h (strict_aliasing_warning): Drop OTYPE arg, insert LOC
4165 * c-warn.c (strict_aliasing_warning): Drop OTYPE arg, require LOC
4168 2018-02-09 Martin Sebor <msebor@redhat.com>
4171 * c.opt (-Wstringop-overflow, -Warray-bounds): Add LTO.
4172 (-Walloc-size-larger-than, -Wformat-truncation=): Same.
4173 (-Wmaybe-uninitialized, -Wnonnull, -Wrestrict): Same.
4174 (-Wstrict-overflow, -Wsuggest-attribute): Same.
4175 (-Wuninitialized): Same.
4177 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
4179 * c-ada-spec.c (dump_ada_declaration): Do not generate the 'constant'
4180 keyword for components.
4182 2018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
4184 * c-common.h (DECL_UNNAMED_BIT_FIELD): New.
4186 2018-02-02 Julia Koval <julia.koval@intel.com>
4188 * c-common.h (omp_clause_mask): Move to wide_int_bitmask.h.
4190 2018-01-29 Marek Polacek <polacek@redhat.com>
4193 * c-format.c (check_function_format): Check current_function_decl.
4195 2018-01-27 Jakub Jelinek <jakub@redhat.com>
4197 * c-cppbuiltin.c (c_cpp_builtins): Use ggc_strdup for the fp_suffix
4199 (LAZY_HEX_FP_VALUES_CNT): Define.
4200 (lazy_hex_fp_values): Allow up to LAZY_HEX_FP_VALUES_CNT lazy hex fp
4201 values rather than just 12.
4202 (builtin_define_with_hex_fp_value): Likewise.
4204 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
4207 * c.opt (-fmacro-prefix-map): New option.
4208 * c-opts.c (c_common_handle_option): Handle it.
4209 * c-lex.c (init_c_lex): Set remap_filename cpp callback.
4210 * c-ppoutput.c (init_pp_output): Likewise.
4212 2018-01-17 David Malcolm <dmalcolm@redhat.com>
4215 * c-common.c (fold_for_warn): Move to c/c-fold.c and cp/expr.c.
4217 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
4219 * c-ada-spec.c (dump_number): Add FLOAT_P parameter.
4220 Skip 'f' and 'F' characters if it is true.
4221 (store_ada_macro): Minor tweak.
4222 (dump_ada_macros) <CPP_COMMENT>: Likewise.
4223 <CPP_WSTRING>: Likewise.
4224 <CPP_STRING>: Output '&' in the buffer if not the first string.
4225 <CPP_NUMBER>: Adjust calls to dump_number.
4227 2018-01-10 David Malcolm <dmalcolm@redhat.com>
4230 * c-common.c: Include "selftest.h".
4231 (get_atomic_generic_size): Perform the test for integral type
4232 before the range test for any integer constant, fixing indentation
4233 of braces. Call fold_for_warn before testing for an INTEGER_CST.
4234 (reject_gcc_builtin): Strip any location wrapper from EXPR.
4235 (selftest::test_fold_for_warn): New function.
4236 (selftest::c_common_c_tests): New function.
4237 (selftest::c_family_tests): Call it, and
4238 selftest::c_pretty_print_c_tests.
4239 * c-common.h (selftest::c_pretty_print_c_tests): New decl.
4240 * c-format.c (check_format_arg): Convert VAR_P check to a
4242 * c-pretty-print.c: Include "selftest.h".
4243 (pp_c_cast_expression): Don't print casts for location wrappers.
4244 (selftest::assert_c_pretty_printer_output): New function.
4245 (ASSERT_C_PRETTY_PRINTER_OUTPUT): New macro.
4246 (selftest::test_location_wrappers): New function.
4247 (selftest::c_pretty_print_c_tests): New function.
4248 * c-warn.c (warn_for_memset): Call fold_for_warn on the arguments.
4250 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
4251 Alan Hayward <alan.hayward@arm.com>
4252 David Sherwood <david.sherwood@arm.com>
4254 * c-common.c (c_common_type_for_mode): Handle MODE_VECTOR_BOOL.
4256 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
4257 Alan Hayward <alan.hayward@arm.com>
4258 David Sherwood <david.sherwood@arm.com>
4260 * c-ubsan.c (ubsan_instrument_shift): Treat GET_MODE_BITSIZE
4263 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
4264 Alan Hayward <alan.hayward@arm.com>
4265 David Sherwood <david.sherwood@arm.com>
4267 * c-common.c (vector_types_convertible_p, c_build_vec_perm_expr)
4268 (convert_vector_to_array_for_subscript): Handle polynomial
4269 TYPE_VECTOR_SUBPARTS.
4270 (c_common_type_for_mode): Check valid_vector_subparts_p.
4271 * c-pretty-print.c (pp_c_initializer_list): Handle polynomial
4274 2018-01-03 Jakub Jelinek <jakub@redhat.com>
4276 Update copyright years.
4278 2017-12-22 Mike Stump <mikestump@comcast.net>
4279 Eric Botcazou <ebotcazou@adacore.com>
4281 * c-pragma.c (init_pragma): Register pragma GCC unroll.
4282 * c-pragma.h (enum pragma_kind): Add PRAGMA_UNROLL.
4284 2017-12-22 Alexandre Oliva <aoliva@redhat.com>
4288 * c-semantics.c (only_debug_stmts_after_p): New.
4289 (pop_stmt_list): Clear side effects in debug-only stmt list.
4290 Check for single nondebug stmt followed by debug stmts only.
4292 2017-12-21 Alexandre Oliva <aoliva@redhat.com>
4295 * c-semantics.c (pop_stmt_list): Propagate side effects from
4296 single nondebug stmt to container list.
4298 2017-12-19 Jakub Jelinek <jakub@redhat.com>
4300 * known-headers.cc (get_stdlib_header_for_name): Replace Yoda
4301 conditions with typical order conditions.
4303 2017-12-18 Marek Polacek <polacek@redhat.com>
4305 * c-warn.c (warn_logical_operator): Return early if -Wlogical-op is
4308 2017-12-17 Martin Sebor <msebor@redhat.com>
4310 * c-attribs.c (common_handle_aligned_attribute): Avoid issuing
4311 an error for attribute warn_if_not_aligned.
4313 2017-12-16 Martin Sebor <msebor@redhat.com>
4315 PR tree-optimization/78918
4316 * c-common.c (check_function_restrict): Avoid checking built-ins.
4317 * c.opt (-Wrestrict): Include in -Wall.
4319 2017-12-15 Jakub Jelinek <jakub@redhat.com>
4321 * c-attribs.c (c_common_attribute_table,
4322 c_common_format_attribute_table): Swap affects_type_identity
4323 and handler fields, adjust comments.
4325 2017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
4327 * c.opt (Wcast-function-type): New warning option.
4328 * c-lex.c (get_fileinfo): Avoid warning.
4329 * c-ppoutput.c (scan_translation_unit_directives_only): Remove cast.
4331 2017-12-14 Qing Zhao <qing.zhao@oracle.com>
4334 * c-cppbuiltin.c (builtin_define_with_hex_fp_value):
4335 Adjust the size of buf1 and buf2, add a new buf to avoid
4336 format-overflow warning.
4338 2017-12-12 Alexandre Oliva <aoliva@redhat.com>
4340 * c-semantics.c (pop_stmt_list): Move begin stmt marker into
4341 subsequent statement list.
4343 2017-12-07 Martin Sebor <msebor@redhat.com>
4347 * c-attribs.c (attr_aligned_exclusions): New array.
4348 (attr_alloc_exclusions, attr_cold_hot_exclusions): Same.
4349 (attr_common_exclusions, attr_const_pure_exclusions): Same.
4350 (attr_gnu_inline_exclusions, attr_inline_exclusions): Same.
4351 (attr_noreturn_exclusions, attr_returns_twice_exclusions): Same.
4352 (attr_warn_unused_result_exclusions): Same.
4353 (handle_hot_attribute, handle_cold_attribute): Simplify.
4354 (handle_const_attribute): Warn on function returning void.
4355 (handle_pure_attribute): Same.
4356 (handle_aligned_attribute): Diagnose conflicting attribute
4358 * c-warn.c (diagnose_mismatched_attributes): Simplify.
4360 2017-12-06 David Malcolm <dmalcolm@redhat.com>
4363 * c-common.c (selftest::c_family_tests): Call
4364 selftest::c_spellcheck_cc_tests.
4365 * c-common.h (selftest::c_spellcheck_cc_tests): New decl.
4366 * c-spellcheck.cc: Include "selftest.h".
4367 (name_reserved_for_implementation_p): New function.
4368 (should_suggest_as_macro_p): New function.
4369 (find_closest_macro_cpp_cb): Move the check for NT_MACRO to
4370 should_suggest_as_macro_p and call it.
4371 (selftest::test_name_reserved_for_implementation_p): New function.
4372 (selftest::c_spellcheck_cc_tests): New function.
4373 * c-spellcheck.h (name_reserved_for_implementation_p): New decl.
4375 2017-12-06 David Malcolm <dmalcolm@redhat.com>
4377 * c-spellcheck.cc: New file, taken from macro-handling code in
4379 * c-spellcheck.h: New file, taken from macro-handling code in
4382 2017-12-01 Jakub Jelinek <jakub@redhat.com>
4384 * c-attribs.c (c_common_attribute_table): Remove "cilk simd function"
4386 (handle_simd_attribute): Don't check for "cilk simd function"
4387 attribute. Reindent, formatting changes.
4389 2017-11-30 Julia Koval <julia.koval@intel.com>
4391 * c-common.h (inv_list): Remove.
4393 2017-11-28 Jakub Jelinek <jakub@redhat.com>
4396 * c-common.c (c_switch_covers_all_cases_p_1,
4397 c_switch_covers_all_cases_p): New functions.
4398 * c-common.h (c_switch_covers_all_cases_p): Declare.
4400 2017-11-28 Julia Koval <julia.koval@intel.com>
4401 Sebastian Peryt <sebastian.peryt@intel.com>
4403 * array-notation-common.c: Delete.
4404 * c-cilkplus.c: Ditto.
4405 * c-common.c (_Cilk_spawn, _Cilk_sync, _Cilk_for): Remove.
4406 * c-common.def (ARRAY_NOTATION_REF): Remove.
4407 * c-common.h (RID_CILK_SPAWN, build_array_notation_expr,
4408 build_array_notation_ref, C_ORT_CILK, c_check_cilk_loop,
4409 c_validate_cilk_plus_loop, cilkplus_an_parts,
4410 cilk_ignorable_spawn_rhs_op,
4411 cilk_recognize_spawn): Remove.
4412 * c-gimplify.c (CILK_SPAWN_STMT): Remove.
4413 * c-omp.c: Remove CILK_SIMD check.
4414 * c-pragma.c: Ditto.
4415 * c-pragma.h: Remove CILK related pragmas.
4416 * c-pretty-print.c (c_pretty_printer::postfix_expression): Remove
4417 ARRAY_NOTATION_REF condition.
4418 (c_pretty_printer::expression): Ditto.
4419 * c.opt (fcilkplus): Remove.
4422 2017-11-21 Marc Glisse <marc.glisse@inria.fr>
4424 * c-pretty-print.c (pp_c_additive_expression,
4425 c_pretty_printer::expression): Handle POINTER_DIFF_EXPR.
4427 2017-11-21 Jakub Jelinek <jakub@redhat.com>
4429 * c-common.c (get_nonnull_operand): Use tree_to_uhwi.
4432 * c-common.c (get_atomic_generic_size): Use TREE_INT_CST_LOW
4433 instead of tree_to_uhwi, formatting fix.
4435 2017-11-20 David Malcolm <dmalcolm@redhat.com>
4438 * known-headers.cc: New file, based on material from c/c-decl.c.
4439 (suggest_missing_header): Copied as-is.
4440 (get_stdlib_header_for_name): New, based on get_c_name_hint but
4441 heavily edited to add C++ support. Add some knowledge about
4442 <limits.h>, <stdint.h>, and <wchar.h>.
4443 * known-headers.h: Likewise.
4445 2017-11-20 David Malcolm <dmalcolm@redhat.com>
4447 * c-common.h (enum lookup_name_fuzzy_kind): Move to name-hint.h.
4448 (lookup_name_fuzzy): Likewise. Convert return type from
4449 const char * to name_hint. Add location_t param.
4450 * name-hint.h: New header.
4452 2017-11-19 Jakub Jelinek <jakub@redhat.com>
4456 * c-common.h (c_fully_fold): Add LVAL argument defaulted to false.
4458 2017-11-16 Joseph Myers <joseph@codesourcery.com>
4460 * c.opt (-std=c17, std=gnu17, -std=iso9899:2017): Refer to 2018
4461 expected publication date of C17.
4462 (-std=c18, -std=gnu18, -std=iso9899:2018): New option aliases.
4464 2017-11-15 Joseph Myers <joseph@codesourcery.com>
4467 * c-common.c (c_common_reswords): Add __builtin_tgmath.
4468 * c-common.h (enum rid): Add RID_BUILTIN_TGMATH.
4470 2017-11-10 Martin Sebor <msebor@redhat.com>
4473 * c-common.c (catenate_strings): Use memcpy instead of strncpy.
4474 * c-warn.c (sizeof_pointer_memaccess_warning): Handle arrays.
4475 * c.opt (-Wstringop-truncation): New option.
4477 2017-11-06 Martin Liska <mliska@suse.cz>
4480 * c-opts.c (c_common_post_options): Set -Wreturn-type for C++
4482 * c.opt: Set default value of warn_return_type.
4484 2017-10-31 David Malcolm <dmalcolm@redhat.com>
4486 * c-common.c (binary_op_error): Update for renaming of
4488 (c_parse_error): Likewise.
4489 * c-warn.c (warn_logical_not_parentheses): Likewise for
4490 renaming of inform_at_rich_loc.
4491 (warn_for_restrict): Likewise for renaming of
4492 warning_at_rich_loc_n.
4494 2017-10-30 Joseph Myers <joseph@codesourcery.com>
4496 * c.opt (std=c17, std=gnu17, std=iso9899:2017): New options.
4497 * c-opts.c (set_std_c17): New function.
4498 (c_common_init_options): Use gnu17 as default C version.
4499 (c_common_handle_option): Handle -std=c17 and -std=gnu17.
4501 2017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
4503 * c-cppbuiltin.c (mode_has_fma): Add support for PowerPC KFmode.
4504 (c_cpp_builtins): If a machine has a fast fma _Float<N> and
4505 _Float<N>X variant, define __FP_FAST_FMA<N> and/or
4508 2017-10-23 Marek Polacek <polacek@redhat.com>
4511 * c-warn.c (warnings_for_convert_and_check): Fix typos.
4513 2017-10-19 Eric Botcazou <ebotcazou@adacore.com>
4515 * c-common.c (check_builtin_function_arguments): Also check arguments
4516 of __builtin_alloca_with_align_and_max.
4518 2017-10-17 David Malcolm <dmalcolm@redhat.com>
4520 * c-format.c (format_warning_at_char): Pass UNKNOWN_LOCATION
4521 rather than NULL to format_warning_va.
4522 (check_format_types): Likewise when calling format_type_warning.
4523 Remove code to extract source_ranges and source_range * in favor
4524 of just a location_t.
4525 (format_type_warning): Convert source_range * param to a
4528 2017-10-13 Jakub Jelinek <jakub@redhat.com>
4530 * c-gimplify.c (c_gimplify_expr): Handle [LR]ROTATE_EXPR like
4533 2017-10-12 David Malcolm <dmalcolm@redhat.com>
4535 * c-common.c (enum missing_token_insertion_kind): New enum.
4536 (get_missing_token_insertion_kind): New function.
4537 (maybe_suggest_missing_token_insertion): New function.
4538 * c-common.h (maybe_suggest_missing_token_insertion): New decl.
4540 2017-10-11 Nathan Sidwell <nathan@acm.org>
4542 * c-opts.c (add_prefixed_path): Change chain to incpath_kind.
4543 (c_common_handle_option): Update incpath_kind names.
4545 2017-10-11 Martin Liska <mliska@suse.cz>
4548 * c-attribs.c (handle_no_sanitize_attribute): Report directly
4549 Wattributes warning.
4551 2017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
4553 * c-ada-spec.c (dump_generic_ada_node): Use wi::to_wide when
4554 operating on trees as wide_ints.
4555 * c-common.c (pointer_int_sum): Likewise.
4556 * c-pretty-print.c (pp_c_integer_constant): Likewise.
4557 * c-warn.c (match_case_to_enum_1): Likewise.
4558 (c_do_switch_warnings): Likewise.
4559 (maybe_warn_shift_overflow): Likewise.
4561 2017-10-10 Jakub Jelinek <jakub@redhat.com>
4564 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_wide
4565 instead of wide_int::from.
4567 2017-10-06 Jakub Jelinek <jakub@redhat.com>
4570 * c-warn.c (warn_tautological_bitwise_comparison): Instead of
4571 using to_widest use wide_int with the larger of the two precisions.
4573 2017-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
4575 * c-pretty-print.c (pp_c_parameter_type_list): Print ... for variadic
4578 2017-10-02 Richard Sandiford <richard.sandiford@linaro.org>
4580 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_widest
4581 when combining the original unconverted comparison operands.
4583 2017-09-29 Jakub Jelinek <jakub@redhat.com>
4585 * c-attribs.c (handle_noipa_attribute): Don't add "stack_protect"
4588 2017-09-29 Eric Botcazou <ebotcazou@adacore.com>
4590 * c-ada-spec.c (to_ada_name): Add index parameter.
4591 (pp_ada_tree_identifier): Likewise.
4592 (dump_ada_macros): Adjust call to to_ada_name.
4593 (struct overloaded_name_hash): New type.
4594 (struct overloaded_name_hasher): Likewise.
4595 (overloaded_names): New hash table.
4596 (compute_overloading_index): New function.
4597 (dump_ada_decl_name): Call it and pass the result to
4598 pp_ada_tree_identifier.
4599 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
4600 (dump_ada_function_declaration): Likewise.
4601 (dump_generic_ada_node): Likewise.
4602 (print_constructor): Likewise.
4603 (print_destructor): Likewise.
4604 (dump_ada_specs): Delete overloaded_names table.
4606 2017-09-29 Eric Botcazou <ebotcazou@adacore.com>
4608 * c-ada-spec.c (max_ada_macros): Move around.
4609 (store_ada_macro_index): Likewise.
4610 (source_file): Rename into...
4611 (macro_source_file): ...this.
4612 (count_ada_macro): Move around.
4613 (store_ada_macro): Likewise.
4614 (compare_macro): Likewise.
4615 (print_ada_macros): Merge in...
4616 (dump_ada_macros): ...this.
4617 (source_file_base): Rename into...
4618 (current_source_file): ...this.
4619 (print_comment): Move around.
4620 (dump_ada_nodes): Call dump_ada_declaration directly.
4621 (struct with): Change type of limited field to bool.
4622 (append_withs): Change type of limited_access parameter to bool.
4623 (pp_ada_tree_identifie): Likewise.
4624 (dump_ada_decl_nam): Likewise.
4625 (dump_generic_ada_node): Likewise. Do not print the return type.
4626 (to_ada_name): Change type of space_found parameter to bool.
4627 (dump_ada_function_declaration): Return void and change type of
4628 parameters to bool. Also print the return type for a function.
4629 (print_ada_methods): Rename into...
4630 (dump_ada_methods): ...this.
4631 (print_ada_declaration): Rename into ...
4632 (dump_ada_declaration): ...this. Do not print the return type.
4633 (print_ada_struct_decl): Rename into...
4634 (dump_ada_struct_decl): ...this.
4636 2017-09-29 Jakub Jelinek <jakub@redhat.com>
4638 * c-attribs.c (handle_packed_attribute): Test DECL_C_BIT_FIELD
4639 rather than DECL_INITIAL.
4640 (common_handle_aligned_attribute): Likewise.
4642 2017-09-20 Alexandre Oliva <aoliva@redhat.com>
4644 * c.opt (gen-decls): Add RejectNegative.
4646 2017-09-15 Andrew Sutton <andrew.n.sutton@gmail.com>
4647 Jakub Jelinek <jakub@redhat.com>
4649 Add support for -std=c++2a.
4650 * c-common.h (cxx_dialect): Add cxx2a as a dialect.
4651 * opt.c: Add options for -std=c++2a and -std=gnu++2a.
4652 * c-opts.c (set_std_cxx2a): New.
4653 (c_common_handle_option): Set options when -std=c++2a is enabled.
4654 (c_common_post_options): Adjust comments.
4655 (set_std_cxx14, set_std_cxx17): Likewise.
4657 2017-09-15 Eric Botcazou <ebotcazou@adacore.com>
4659 * c-pragma.c (handle_pragma_scalar_storage_order): Expand on error
4660 message for non-uniform endianness and issue a warning in C++.
4662 2017-09-15 Jakub Jelinek <jakub@redhat.com>
4664 * c.opt (Wc++1z-compat): Change from option to undocumented alias.
4665 (Wc++17-compat): Change from undocumented alias to option.
4666 (Wnoexcept-type): Enable by Wc++17-compat instead of Wc++1z-compat,
4667 change C++1z to C++17 in description.
4668 (std=c++1z, std=gnu++1z): Change from option to undocumented
4670 (std=c++17, std=gnu++17): Change from undocumented alias to option.
4672 * c-common.h (enum cxx_dialect): Rename cxx1z to cxx17.
4673 * c-opts.c (set_std_cxx1z): Rename to ...
4674 (set_std_cxx17): ... this.
4675 (c_common_handle_option): Rename OPT_std_c__1z to OPT_std_c__17
4676 and OPT_std_gnu__1z to OPT_std_gnu__17. Adjust set_std_cxx1z
4678 (c_common_post_options): Use cxx17 instead of cxx1z. Adjust
4681 2017-09-12 H.J. Lu <hongjiu.lu@intel.com>
4683 * c-attribs.c (common_handle_aligned_attribute): Don't warn
4684 function alignment if warn_if_not_aligned_p is true.
4686 2017-09-12 Nathan Sidwell <nathan@acm.org>
4688 * c-common.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
4689 resort_sorted_fields): Move to c/c-decl.c.
4690 * c-common.h (field_decl_cmp, resort_sorted_fields): Delete.
4691 (struct sorted_fields_type): Move to c/c-lang.h.
4693 2017-09-09 Jonathan Wakely <jwakely@redhat.com>
4696 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_threadsafe_static_init.
4698 2017-09-04 Marek Polacek <polacek@redhat.com>
4701 * c-warn.c (warn_tautological_bitwise_comparison): New function.
4702 (warn_tautological_cmp): Call it.
4704 2017-09-01 Boris Kolpackov <boris@codesynthesis.com>
4706 * c-opts.c (c_common_finish): Write dependency information even if
4709 2017-09-01 Jakub Jelinek <jakub@redhat.com>
4712 * c-pragma.c (omp_pragmas): Move "ordered" entry from here to ...
4713 (omp_pragmas_simd): ... here.
4714 * c-omp.c (c_finish_omp_ordered): If clauses isn't simd clause alone,
4715 create new clauses list containing just simd clause.
4717 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
4718 Alan Hayward <alan.hayward@arm.com>
4719 David Sherwood <david.sherwood@arm.com>
4721 * c-attribs.c (vector_mode_valid_p) Fold GET_MODE_INNER call
4722 into scalar_mode_supported_p call.
4723 (handle_mode_attribute): Update call to scalar_mode_supported_p.
4725 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
4726 Alan Hayward <alan.hayward@arm.com>
4727 David Sherwood <david.sherwood@arm.com>
4729 * c-common.c (c_common_fixed_point_type_for_size): Use opt_scalar_mode
4730 for the mode iterator.
4732 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
4733 Alan Hayward <alan.hayward@arm.com>
4734 David Sherwood <david.sherwood@arm.com>
4736 * c-lex.c (interpret_fixed): Use SCALAR_TYPE_MODE.
4737 * c-common.c (c_build_vec_perm_expr): Likewise.
4739 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
4740 Alan Hayward <alan.hayward@arm.com>
4741 David Sherwood <david.sherwood@arm.com>
4743 * c-common.c (c_common_type_for_mode): Use as_a <scalar_int_mode>.
4745 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
4746 Alan Hayward <alan.hayward@arm.com>
4747 David Sherwood <david.sherwood@arm.com>
4749 * c-attribs.c (handle_mode_attribute): Check for a scalar_int_mode
4750 before calling targetm.addr_space.valid_pointer_mode.
4752 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
4753 Alan Hayward <alan.hayward@arm.com>
4754 David Sherwood <david.sherwood@arm.com>
4756 * c-cppbuiltin.c (c_cpp_builtins): Use opt_scalar_float_mode.
4758 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
4759 Alan Hayward <alan.hayward@arm.com>
4760 David Sherwood <david.sherwood@arm.com>
4762 * c-common.c (c_common_fixed_point_type_for_size): Use new mode
4764 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
4766 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
4767 Alan Hayward <alan.hayward@arm.com>
4768 David Sherwood <david.sherwood@arm.com>
4770 * c-cppbuiltin.c (mode_has_fma): Prefix mode names with E_ in
4773 2017-08-29 Martin Liska <mliska@suse.cz>
4776 * c-common.c (parse_optimize_options): Add argument to function
4778 * c-pragma.c (handle_pragma_diagnostic): Likewise.
4780 2017-08-24 David Malcolm <dmalcolm@redhat.com>
4782 * c-lex.c (interpret_float): Use token location
4783 when building an EXCESS_PRECISION_EXPR.
4785 2017-08-21 David Malcolm <dmalcolm@redhat.com>
4787 * c-common.c (check_function_arguments): Add "arglogs" param; pass
4788 it to check_function_format.
4789 * c-common.h (check_function_arguments): Add vec<location_t> *
4791 (check_function_format): Likewise.
4792 * c-format.c (struct format_check_context): Add field "arglocs".
4793 (check_function_format): Add param "arglocs"; pass it to
4795 (check_format_info): Add param "arglocs"; use it to initialize
4796 new field of format_ctx.
4797 (check_format_arg): Pass format_ctx->arglocs to new param of
4798 check_format_info_main.
4799 (class argument_parser): New field "arglocs".
4800 (argument_parser::argument_parser): Add "arglocs_" param and use
4801 it to initialize new field.
4802 (argument_parser::check_argument_type): Pass new arglocs field to
4804 (check_format_info_main): Add param "arglocs", and use it when
4805 constructing arg_parser.
4806 (check_format_types): Add param "arglocs"; use it if non-NULL when
4807 !EXPR_HAS_LOCATION (cur_param) to get at location information.
4809 2017-08-18 H.J. Lu <hongjiu.lu@intel.com>
4812 * c-attribs.c (handle_warn_if_not_aligned_attribute): New.
4813 (c_common_attribute_table): Add warn_if_not_aligned.
4814 (handle_aligned_attribute): Renamed to ...
4815 (common_handle_aligned_attribute): Remove argument, name, and add
4816 argument, warn_if_not_aligned. Handle warn_if_not_aligned.
4817 (handle_aligned_attribute): New.
4818 * c.opt: Add -Wif-not-aligned and -Wpacked-not-aligned.
4820 2017-08-14 Martin Sebor <msebor@redhat.com>
4823 * c-attribs.c (c_common_attribute_table): Add nonstring entry.
4824 (handle_nonstring_attribute): New function.
4826 2017-08-14 Martin Sebor <msebor@redhat.com>
4829 * c-format.h (T89_G): New macro.
4830 * c-format.c (local_gcall_ptr_node): New variable.
4831 (init_dynamic_diag_info): Initialize it.
4833 2017-08-11 Martin Liska <mliska@suse.cz>
4835 * c-opts.c (c_common_post_options): Replace ASM_OUTPUT_DEF with
4836 TARGET_SUPPORTS_ALIASES.
4838 2017-08-10 David Malcolm <dmalcolm@redhat.com>
4840 * c-common.c (c_parse_error): Add rich_location * param, using it
4841 rather implicitly using input_location.
4842 * c-common.h (c_parse_error): Add rich_location * param.
4844 2017-08-09 Marek Polacek <polacek@redhat.com>
4846 * c-common.c (pointer_int_sum): Use true/false instead of 1/0.
4847 (c_common_truthvalue_conversion): Likewise.
4848 * c-omp.c (c_finish_omp_atomic): Likewise.
4849 * c-common.h (build_binary_op): Update declaration.
4851 2017-08-08 Martin Liska <mliska@suse.cz>
4853 * c-ada-spec.c: Include header files.
4854 * c-ubsan.c: Likewise.
4855 * c-warn.c: Likewise.
4857 2017-08-07 Jakub Jelinek <jakub@redhat.com>
4860 * c-omp.c (c_finish_omp_atomic): Handle atomics on bitfields.
4862 2017-08-07 Eric Botcazou <ebotcazou@adacore.com>
4864 * c-ada-spec.c (has_nontrivial_methods): Test for FUNCTION_DECL.
4865 (print_ada_methods): Likewise.
4866 (print_ada_declaration): Likewise.
4868 2017-08-07 Martin Liska <mliska@suse.cz>
4870 * array-notation-common.c: Add new includes.
4871 * c-format.c( handle_format_attribute): Canonicalize a format
4873 * c-lex.c (c_common_has_attribute): Canonicalize name of an
4875 * c-pretty-print.c: Add new include.
4877 2017-08-05 Eric Botcazou <ebotcazou@adacore.com>
4879 * c-ada-spec.c (has_static_fields): Look only into variables.
4880 (print_constructor): Add TYPE parameter and use it for the name.
4881 (print_destructor): Likewise.
4882 (print_ada_declaration): Adjust to new constructor/destructor names.
4883 Adjust calls to print_constructor and print_destructor.
4884 (print_ada_struct_decl): Do not test TREE_STATIC on FIELD_DECL.
4885 Look only into variables in the final loop.
4887 2017-08-01 Eric Botcazou <ebotcazou@adacore.com>
4889 * c-ada-spec.c (has_static_fields): Look only into fields.
4890 (dump_generic_ada_node): Small tweak.
4891 (dump_nested_types): Look only into fields.
4892 (print_ada_declaration): Look only into methods. Small tweak.
4893 (print_ada_struct_decl): Look only into fields. Use DECL_VIRTUAL_P.
4895 2017-08-01 Eric Botcazou <ebotcazou@adacore.com>
4897 * c-ada-spec.c (print_generic_ada_decl): Pass correctly-typed constant.
4898 (dump_ada_function_declaration): Likewise.
4899 (dump_generic_ada_node): Likewise.
4900 (print_ada_declaration): Add support for const-qualified variables.
4902 2017-07-31 Martin Liska <mliska@suse.cz>
4905 * c-ubsan.c (ubsan_maybe_instrument_array_ref):
4906 Guard condition with flag_sanitize_p also with current_function_decl
4908 (ubsan_maybe_instrument_reference_or_call): Likewise.
4910 2017-07-30 Uros Bizjak <ubizjak@gmail.com>
4912 * c-format.c (asm_fprintf_char_table): Add 'z' to format_chars.
4914 2017-07-29 Eric Botcazou <ebotcazou@adacore.com>
4916 * c-ada-spec.c (dump_generic_ada_node): Take into account signedness
4918 (print_ada_declaration): Add missing guard for record types.
4920 2017-07-27 Jakub Jelinek <jakub@redhat.com>
4923 * c-omp.c (c_finish_omp_for): If the condition is wrapped in
4924 rhs of COMPOUND_EXPR(s), skip them and readd their lhs into
4925 new COMPOUND_EXPRs around the rhs of the comparison.
4927 2017-07-27 Marek Polacek <polacek@redhat.com>
4930 * c-warn.c (warn_for_sign_compare): Tweak the warning message. Print
4933 2017-07-27 Jakub Jelinek <jakub@redhat.com>
4935 * c-attribs.c (c_common_attribute_table): Add noipa attribute.
4936 (handle_noipa_attribute): New function.
4938 2017-07-07 Torsten Duwe <duwe@suse.de>
4940 * c-attribs.c (c_common_attribute_table): Add entry for
4941 "patchable_function_entry".
4943 2017-07-20 Nathan Sidwell <nathan@acm.org>
4945 Remove TYPE_METHODS.
4946 * c-ada-spec.c (is_tagged_type, has_nontrivial_methods,
4947 dump_ada_template, print_ada_methods,
4948 print_ada_declaration): Member fns are on TYPE_FIELDS.
4950 2017-07-18 Nathan Sidwell <nathan@acm.org>
4952 * c-warn.c (warn_for_memset): Use TYPE_{MIN,MAX}_VALUE.
4954 2017-07-14 David Malcolm <dmalcolm@redhat.com>
4956 * c-common.c (try_to_locate_new_include_insertion_point): New
4958 (per_file_includes_t): New typedef.
4959 (added_includes_t): New typedef.
4960 (added_includes): New variable.
4961 (maybe_add_include_fixit): New function.
4962 * c-common.h (maybe_add_include_fixit): New decl.
4964 2017-07-10 Martin Sebor <msebor@redhat.com>
4967 * c.opt (-Wstringop-overflow): Set defaults in LangEnabledBy.
4969 2017-07-06 David Malcolm <dmalcolm@redhat.com>
4971 * c-common.c (selftest::c_family_tests): New.
4972 * c-common.h (selftest::run_c_tests): Move decl to c/c-lang.h.
4973 (selftest::c_family_tests): New decl.
4975 2017-07-04 Marek Polacek <polacek@redhat.com>
4978 * c-common.c (sync_resolve_size): Give error for pointers to incomplete
4981 2017-07-04 Marek Polacek <polacek@redhat.com>
4983 * c-warn.c (warn_if_unused_value): Remove WITH_CLEANUP_EXPR handling.
4985 2017-06-28 Martin Liska <mliska@suse.cz>
4988 * c-attribs.c (handle_alias_ifunc_attribute): Append ifunc alias
4989 to a function declaration.
4991 2017-06-28 Martin Liska <mliska@suse.cz>
4994 * c.opt: Add IntegerRange to various options.
4996 2017-06-26 Marek Polacek <polacek@redhat.com>
4999 * c-common.h (warn_for_multistatement_macros): Declare.
5000 * c-warn.c: Include "c-family/c-indentation.h".
5001 (warn_for_multistatement_macros): New function.
5002 * c.opt (Wmultistatement-macros): New option.
5003 * c-indentation.c (guard_tinfo_to_string): No longer static.
5004 Change the parameter type to "enum rid". Handle RID_SWITCH.
5005 * c-indentation.h (guard_tinfo_to_string): Declare.
5007 2017-06-23 Marc Glisse <marc.glisse@inria.fr>
5009 * c-common.c (c_common_nodes_and_builtins): Use builtin_structptr_types.
5011 2017-06-15 Martin Sebor <msebor@redhat.com>
5014 * c.opt (-Wclass-memaccess): New option.
5016 2017-06-14 Boris Kolpackov <boris@codesynthesis.com>
5018 * c-opts.c (c_common_finish): Handle '-' special value to -MF.
5020 2017-06-13 Marek Polacek <polacek@redhat.com>
5023 * c-warn.c (do_warn_duplicated_branches): Return if any of the
5026 2017-06-13 Martin Liska <mliska@suse.cz>
5029 * c-attribs.c (add_no_sanitize_value): New function.
5030 (handle_no_sanitize_attribute): Likewise.
5031 (handle_no_sanitize_address_attribute): Use the function.
5032 (handle_no_sanitize_thread_attribute): New function.
5033 (handle_no_address_safety_analysis_attribute): Use
5034 add_no_sanitize_value.
5035 (handle_no_sanitize_undefined_attribute): Likewise.
5036 * c-common.h: Declare new functions.
5037 * c-ubsan.c (ubsan_instrument_division): Use sanitize_flags_p.
5038 (ubsan_instrument_shift): Likewise.
5039 (ubsan_instrument_bounds): Likewise.
5040 (ubsan_maybe_instrument_array_ref): Likewise.
5041 (ubsan_maybe_instrument_reference_or_call): Likewise.
5043 2017-06-11 Jason Merrill <jason@redhat.com>
5045 * c-ada-spec.c, c-pragma.c: Use id_equal.
5047 2017-06-04 Marek Polacek <polacek@redhat.com>
5050 * c-format.c (matching_type_p): Return false if any of the types
5051 requires structural equality.
5053 2017-06-02 Martin Sebor <msebor@redhat.com>
5056 * c-warn.c (conversion_warning): Use -Wconversion for integer
5057 conversion and -Wfloat-conversion for floating one.
5059 2017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
5061 * c.opt (Wsizeof-pointer-div): New warning option.
5063 2017-06-01 Volker Reichelt <v.reichelt@netcologne.de>
5065 * c.opt (Wcatch-value): New shortcut for Wcatch-value=1.
5066 (Wcatch-value=1): Enable by -Wall.
5068 2017-05-30 David Malcolm <dmalcolm@redhat.com>
5070 * c-format.c (gcc_cxxdiag_char_table): Add 'H' and 'I' to
5072 * c.opt (fdiagnostics-show-template-tree): New option.
5073 (felide-type): New option.
5075 2017-05-25 Volker Reichelt <v.reichelt@netcologne.de>
5077 * c.opt (Wcatch-value=): New C++ warning flag.
5079 2017-05-24 Nathan Sidwell <nathan@acm.org>
5081 * c=common.c (field_decl_cmp, resort_field_decl_cmp): Adjust T
5082 const casts to avoid warning.
5084 2017-05-24 Martin Sebor <msebor@redhat.com>
5087 * c-common.h (unsafe_conversion_p): Add a function argument.
5088 * c-common.c (unsafe_conversion_p): Same.
5089 Add type names and values to diagnostics.
5090 (scalar_to_vector): Adjust.
5091 * c-warn.c (constant_expression_error): Add a function argument.
5092 Add type names and values to diagnostics.
5093 (conversion_warning): Add a function argument.
5094 Add type names and values to diagnostics.
5095 (warnings_for_convert_and_check): Same.
5097 2017-05-19 Jason Merrill <jason@redhat.com>
5099 * c-warn.c (match_case_to_enum_1): Don't warn about enums with no
5102 2017-05-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
5104 * c-format.c (locus): Move out of function scope,
5107 2017-05-19 Nathan Sidwell <nathan@acm.org>
5109 * c-opts.c (class_dump_file, class_dump_flags): Delete.
5110 (c_common_parse_file): Remove class dump handling.
5111 (get_dump_info): Likewise.
5113 2017-05-19 Richard Biener <rguenther@suse.de>
5116 * c-warn.c (strict_aliasing_warning): Do not warn for accesses
5117 to alias-set zero memory.
5119 2017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
5121 * c-format.c (local_tree_type_node): Add GTY attribute.
5123 2017-05-18 Marek Polacek <polacek@redhat.com>
5125 * c-common.c (c_common_type_for_size): Use NULL_TREE instead of 0.
5126 (c_common_fixed_point_type_for_size): Likewise.
5127 (c_common_type_for_mode): Likewise.
5128 (shorten_compare): Likewise.
5129 (c_promoting_integer_type_p): Use false/true instead of 0/1.
5130 * c-pragma.c (maybe_apply_renaming_pragma): Use NULL_TREE instead of 0.
5132 2017-05-18 Marek Polacek <polacek@redhat.com>
5134 * c-common.c (self_promoting_args_p): Change the return type to bool.
5135 Use false/true instead of 0/1.
5136 * c-common.h (self_promoting_args_p): Update.
5138 2017-05-17 Marek Polacek <polacek@redhat.com>
5140 * c-common.c: Use NULL_TREE instead of 0 where appropriate.
5141 * c-warn.c: Likewise.
5143 2017-05-17 Ville Voutilainen <ville.voutilainen@gmail.com>
5145 Implement new C++ intrinsics __is_assignable and __is_constructible.
5146 * c-common.c (__is_assignable, __is_constructible): New.
5147 * c-common.h (RID_IS_ASSIGNABLE, RID_IS_CONSTRUCTIBLE): Likewise.
5149 2017-05-17 Martin Liska <mliska@suse.cz>
5151 * c-common.h: Introduce dump_flags_t type and
5152 use it instead of int type.
5153 * c-gimplify.c (c_genericize): Likewise.
5154 * c-opts.c: Likewise.
5156 2017-05-17 Marek Polacek <polacek@redhat.com>
5158 * c-common.c (c_save_expr): Remove.
5159 (c_common_truthvalue_conversion): Remove a call to c_save_expr.
5160 * c-common.h (c_save_expr): Remove declaration.
5162 2017-05-09 Volker Reichelt <v.reichelt@netcologne.de>
5165 * c-pretty-print.c (c_pretty_printer::expression): Handle MAX_EXPR,
5166 MIN_EXPR, EXACT_DIV_EXPR, RDIV_EXPR, LROTATE_EXPR, RROTATE_EXPR.
5167 (c_pretty_printer::postfix_expression): Handle MAX_EXPR, MIN_EXPR.
5168 (c_pretty_printer::multiplicative_expression): Handle EXACT_DIV_EXPR,
5170 (pp_c_shift_expression): Handle LROTATE_EXPR, RROTATE_EXPR.
5172 2017-05-09 Marek Polacek <polacek@redhat.com>
5175 * c-warn.c (unwrap_c_maybe_const): New.
5176 (warn_logical_operator): Call it.
5178 2017-05-09 Nathan Sidwell <nathan@acm.org>
5180 * c-common.c (c_register_builtin_type): Use pushdecl lang_hook.
5181 * c-common.h (pushdecl_top_level, pushdecl): Don't declare here.
5183 2017-05-08 Martin Sebor <msebor@redhat.com>
5185 PR translation/80280
5186 * c-format.h (struct format_flag_spec): Add new member.
5188 * c-format.c (local_tree_type_node): New global.
5189 (printf_flag_specs, asm_fprintf_flag_spec): Initialize new data.
5190 (gcc_diag_flag_specs, scanf_flag_specs, strftime_flag_specs): Ditto.
5191 (strfmon_flag_specs): Likewise.
5192 (gcc_diag_char_table, gcc_cdiag_char_table): Split up specifiers
5193 with distinct quoting properties.
5194 (gcc_tdiag_char_table, gcc_cxxdiag_char_table): Same.
5195 (flag_chars_t::validate): Add argument and handle bad quoting.
5196 (check_format_info_main): Handle quoting problems.
5197 (init_dynamic_diag_info): Simplify.
5199 2017-05-08 Jason Merrill <jason@redhat.com>
5201 * c-opts.c (c_common_post_options): Update defaults for
5202 flag_abi_version and flag_abi_compat_version.
5204 2017-05-05 David Malcolm <dmalcolm@redhat.com>
5206 * c-common.c (c_cpp_error): Replace report_diagnostic
5207 with diagnostic_report_diagnostic.
5209 2017-05-04 Martin Sebor <msebor@redhat.com>
5211 PR translation/80280
5212 * c-attribs.c (handle_alias_ifunc_attribute): Quote a %D directive.
5213 (handle_weakref_attribute): Same.
5215 2017-05-03 Nathan Sidwell <nathan@acm.org>
5217 Canonicalize canonical type hashing
5218 * c-common.c (complete_array_type): Use type_hash_canon.
5220 2017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
5223 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): Remove
5225 (cilk_install_body_pedigree_operations): Likewise.
5226 * cilk.c (cilk_set_spawn_marker): Mark functions that should be
5228 (cilk_gimplify_call_params_in_spawned_fn): Remove.
5229 (cilk_install_body_pedigree_operations): Likewise.
5230 (gimplify_cilk_spawn): Add EXPR_STMT and CLEANUP_POINT_EXPR
5233 2017-04-27 Jakub Jelinek <jakub@redhat.com>
5236 * c-common.c (complete_array_type): Only hash TYPE_TYPELESS_STORAGE
5237 flag on non-aggregate element types.
5239 2017-04-25 Bernd Edlinger <bernd.edlinger@hotmail.de>
5241 * c-common.c (c_type_hasher, type_hash_table): Remove.
5242 (c_common_get_alias_set): Remove unreachable code.
5243 * c-opts.c (c_common_post_options): Make sure cc1 takes only one file.
5245 2017-04-20 Volker Reichelt <v.reichelt@netcologne.de>
5247 * c.opt (Wextra-semi): New C++ warning flag.
5249 2017-04-20 Jakub Jelinek <jakub@redhat.com>
5252 * c-common.c (complete_array_type): Preserve TYPE_TYPELESS_STORAGE.
5254 2017-04-18 Jakub Jelinek <jakub@redhat.com>
5258 * c-common.c (c_common_type_for_mode): Don't handle
5259 widest_*_literal_type_node here.
5260 c_common_signed_or_unsigned_type): Likewise.
5261 (c_common_nodes_and_builtins): Set widest_*_literal_type_node
5262 to *intTI_type_node or *intDI_type_node depending on whether
5263 TImode is supported by the target or not.
5265 2017-04-10 Martin Liska <mliska@suse.cz>
5268 * c-ubsan.c (ubsan_instrument_shift): Evaluate RHS before
5269 doing an UBSAN check.
5271 2017-04-03 Jonathan Wakely <jwakely@redhat.com>
5273 * c-warn.c (do_warn_double_promotion): Fix typo in comment.
5275 2017-03-31 Jakub Jelinek <jakub@redhat.com>
5278 * c-ubsan.h (ubsan_maybe_instrument_reference): Change argument to
5280 * c-ubsan.c (ubsan_maybe_instrument_reference): Likewise. Handle
5281 not just NOP_EXPR to REFERENCE_TYPE, but also INTEGER_CST with
5284 2017-03-31 David Malcolm <dmalcolm@redhat.com>
5286 PR documentation/78732
5287 * c.opt (Wendif-labels): Fix description to refer to
5288 #else rather than #elif.
5290 2017-03-31 Jakub Jelinek <jakub@redhat.com>
5293 * c-common.h (enum rid): Add RID_IS_AGGREGATE.
5294 * c-common.c (c_common_reswords): Add __is_aggregate trait.
5296 2017-03-27 Jakub Jelinek <jakub@redhat.com>
5299 * c-common.c (c_common_mark_addressable_vec): Don't set
5300 TREE_ADDRESSABLE on DECL_HARD_REGISTER.
5302 2017-03-21 Martin Sebor <msebor@redhat.com>
5305 * c-common.c (set_underlying_type): Mark type used only when
5306 original del is declared unused.
5308 2017-03-10 David Malcolm <dmalcolm@redhat.com>
5310 PR translation/79848
5311 * c-format.c (check_format_string): Simplify uses of "%<%s%>" to
5314 2017-03-10 David Malcolm <dmalcolm@redhat.com>
5317 * c-indentation.c (warn_for_misleading_indentation): Remove parens
5318 from inform's message, so that xgettext can locate it.
5320 2017-03-09 Marek Polacek <polacek@redhat.com>
5324 * c-attribs.c (handle_nonnull_attribute): Save the result of default
5325 conversion to the attribute list.
5327 2017-03-09 Martin Liska <mliska@suse.cz>
5329 * c-ada-spec.c (macro_length): Increment value instead of a pointer.
5331 2017-03-03 Jason Merrill <jason@redhat.com>
5333 * c.opt (Wnoexcept-type): New.
5335 2017-03-02 Richard Biener <rguenther@suse.de>
5338 * c-common.c (c_common_mark_addressable_vec): Look through
5341 2017-02-28 Martin Liska <mliska@suse.cz>
5343 * c.opt: Replace space with tabular for options of <number>
5346 2017-02-28 Martin Liska <mliska@suse.cz>
5348 * c.opt: Fix --help=option -Q for options which are of
5351 2017-02-24 Jakub Jelinek <jakub@redhat.com>
5354 * c-common.c (check_function_restrict): New function.
5355 (check_function_arguments): Add FNDECL argument. Call
5356 check_function_restrict if -Wrestrict.
5357 * c-warn.c (warn_for_restrict): Remove ARGS argument, add ARGARRAY
5358 and NARGS. Use auto_vec for ARG_POSITIONS, simplify.
5359 * c-common.h (check_function_arguments): Add FNDECL argument.
5360 (warn_for_restrict): Remove ARGS argument, add ARGARRAY and NARGS.
5362 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
5364 * c-ada-spec.c (dump_ada_function_declaration): Add comment about the
5365 treatment of parameters with pointer-to-tagged type and tidy up.
5366 (print_ada_methods): Remove the special treatment of C++ static member
5369 2017-02-22 Martin Liska <mliska@suse.cz>
5371 * c.opt: Replace inequality signs with square brackets
5374 2017-02-21 Jakub Jelinek <jakub@redhat.com>
5377 * c-attribs.c (handle_mode_attribute): Use build_qualified_type to
5380 2017-02-17 Joseph Myers <joseph@codesourcery.com>
5382 * c-cppbuiltin.c (builtin_define_float_constants): Define
5383 __DECIMAL_DIG__ to the value for long double.
5385 2017-02-15 Marek Polacek <polacek@redhat.com>
5388 * c-warn.c (do_warn_double_promotion): Don't warn if an invalid
5389 conversion has occured.
5391 2017-01-24 David Malcolm <dmalcolm@redhat.com>
5393 * c-common.c (c_common_reswords): Add "__RTL".
5394 * c-common.h (enum rid): Add RID_RTL.
5396 2017-01-20 Marek Polacek <polacek@redhat.com>
5399 * c-common.h (do_warn_duplicated_branches_r): Declare.
5400 * c-gimplify.c (c_genericize): Walk the function tree calling
5401 do_warn_duplicated_branches_r.
5402 * c-warn.c (expr_from_macro_expansion_r): New.
5403 (do_warn_duplicated_branches): New.
5404 (do_warn_duplicated_branches_r): New.
5405 * c.opt (Wduplicated-branches): New option.
5407 2017-01-17 David Malcolm <dmalcolm@redhat.com>
5410 * c-indentation.c (warn_for_misleading_indentation): Use the past
5411 subjunctive in the note.
5413 2017-01-17 Aldy Hernandez <aldyh@redhat.com>
5416 * array-notation-common.c (cilkplus_extract_an_triplets): Convert
5417 start type to integer_type.
5419 2017-01-16 Jakub Jelinek <jakub@redhat.com>
5422 * c.opt (gen-decls): Add Driver flag.
5424 2017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
5427 2017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
5430 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
5432 2017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
5435 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
5437 2017-01-12 Martin Sebor <msebor@redhat.com>
5439 (-Wformat-overflow): ...to this.
5441 2017-01-11 Martin Sebor <msebor@redhat.com>
5444 * c.opt (-Walloca-larger-than, -Wformat-length, -Wformat-truncation):
5445 Also enable for LTO.
5447 2017-01-10 Jason Merrill <jason@redhat.com>
5449 Implement P0195R2, C++17 variadic using.
5450 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_variadic_using.
5452 2017-01-09 Jakub Jelinek <jakub@redhat.com>
5454 PR translation/79019
5455 PR translation/79020
5456 * c.opt (Wnormalized=): Fix typo in description.
5458 2017-01-08 Martin Sebor <msebor@redhat.com>
5461 * c.opt (-Wformat-truncation): New option.
5463 2017-01-06 Alexandre Oliva <aoliva@redhat.com>
5465 * c-pretty-print.c (pp_c_tree_decl_identifier): Convert 16-bit
5466 value to unsigned short to fit in 4 hex digits without
5469 2017-01-05 Eric Botcazou <ebotcazou@adacore.com>
5471 * c.opt (fsso-struct): Add 'native' value.
5473 2017-01-05 Martin Liska <mliska@suse.cz>
5476 * c-opts.c (c_common_post_options): Reject '-' filename for a precompiled
5479 2017-01-04 Marek Polacek <polacek@redhat.com>
5482 * c.opt (Wpointer-compare): New option.
5484 2017-01-04 Jakub Jelinek <jakub@redhat.com>
5487 * c.opt (fsso-struct=): Add RejectNegative.
5489 2017-01-01 Jakub Jelinek <jakub@redhat.com>
5491 Update copyright years.
5493 2016-12-29 Martin Liska <mliska@suse.cz>
5496 * c.opt (strong-eval-order): Add RejectNegative keyword.
5498 2016-12-22 Jason Merrill <jason@redhat.com>
5500 Implement P0522R0, matching of template template arguments.
5501 * c-cppbuiltin.c (c_cpp_builtins): Define
5502 __cpp_template_template_args.
5504 2016-12-21 Jakub Jelinek <jakub@redhat.com>
5507 * c-common.c (struct nonnull_arg_ctx): New type.
5508 (check_function_nonnull): Return bool instead of void. Use
5509 nonnull_arg_ctx as context rather than just location_t.
5510 (check_nonnull_arg): Adjust for the new context type, set
5511 warned_p to true if a warning has been diagnosed.
5512 (check_function_arguments): Return bool instead of void.
5513 * c-common.h (check_function_arguments): Adjust prototype.
5515 2016-12-21 Jason Merrill <jason@redhat.com>
5517 * c.opt (-fnew-ttp-matching): New flag.
5518 * c-opts.c (c_common_post_options): Default on if -std=c++1z.
5520 2016-12-14 Martin Jambor <mjambor@suse.cz>
5522 * c-omp.c: Include omp-general.h instead of omp-low.h.
5523 (c_finish_oacc_wait): Adjusted call to find_omp_clause to use its new
5526 2016-12-14 Martin Sebor <msebor@redhat.com>
5529 * c-common.c (check_nonnull_arg): Disable when optimization
5532 2016-12-12 Marek Polacek <polacek@redhat.com>
5535 * c-common.c (attribute_fallthrough_p): Return false for
5538 2016-12-08 Martin Sebor <msebor@redhat.com>
5541 * c.opt (-Walloc-zero, -Walloc-size-larger-than): New options.
5543 2016-12-08 Martin Sebor <msebor@redhat.com>
5546 * c-pretty-print (pp_c_integer_constant): Avoid formatting type
5549 2016-12-07 Martin Sebor <msebor@redhat.com>
5555 * c.opt (-Wstringop-overflow): New option.
5557 2016-12-02 Maxim Ostapenko <m.ostapenko@samsung.com>
5559 * c-attribs.c (asan odr indicator): New attribute.
5560 (handle_asan_odr_indicator_attribute): New function.
5562 2016-11-26 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5564 * c-common.c (c_common_nodes_and_builtins): Remove initialization of
5567 2016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
5569 * c-common.c (excess_precision_mode_join): New.
5570 (c_ts18661_flt_eval_method): New.
5571 (c_c11_flt_eval_method): Likewise.
5572 (c_flt_eval_method): Likewise.
5573 * c-common.h (excess_precision_mode_join): New.
5574 (c_flt_eval_method): Likewise.
5575 * c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): New.
5576 (cpp_iec_559_value): Call it.
5577 (c_cpp_builtins): Modify logic for __LIBGCC_*_EXCESS_PRECISION__,
5578 call c_flt_eval_method to set __FLT_EVAL_METHOD__ and
5579 __FLT_EVAL_METHOD_TS_18661_3__.
5581 2016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
5583 * c-opts.c (c_common_post_options): Add logic to handle the default
5584 case for -fpermitted-flt-eval-methods.
5586 2016-11-23 Paolo Bonzini <bonzini@gnu.org>
5588 * c.opt (Wexpansion-to-defined): New.
5590 2016-11-23 Jakub Jelinek <jakub@redhat.com>
5593 * c-pragma.c (handle_pragma_target): Don't replace
5594 current_target_pragma, but chainon the new args to the current one.
5596 2016-11-22 Nathan Sidwell <nathan@acm.org>
5598 * array-notation-common.c (cilkplus_extract_an_trplets): Fix
5599 indentation and formatting.
5601 2016-11-21 Martin Sebor <msebor@redhat.com>
5603 * c.opt (-fprintf-return-value): Enable by default.
5605 2016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
5608 * c.opt (-Wbuiltin-declaration-mismatch): New warning.
5609 * c-common.c (c_common_nodes_and_builtins): Initialize
5610 const_tm_ptr_type_node.
5612 2016-11-16 Marek Polacek <polacek@redhat.com>
5615 * c-common.c (c_add_case_label): Turn error_at calls into inform.
5617 2016-11-14 Jakub Jelinek <jakub@redhat.com>
5619 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_structured_bindings.
5621 2016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
5622 Richard Biener <rguenther@suse.de>
5624 * c-common.h (c_common_resword): Add RID_GIMPLE, RID_PHI types.
5625 * c-common.h (enum rid): Add RID_GIMPLE, RID_PHI.
5626 * c.opt (fgimple): New option.
5628 2016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5631 * c-common.h (warn_for_restrict): Declare.
5632 * c-warn.c: Include gcc-rich-location.h.
5633 (warn_for_restrict): New function.
5634 * c-format.c (gcc_tdiag_char_table): Add entry for "Z" specifier.
5635 (gcc_cdiag_char_table): Likewise.
5636 (gcc_cxxdiag_char_table): Likewise.
5637 * c.opt (Wrestrict): New option.
5639 2016-11-13 Eric Botcazou <ebotcazou@adacore.com>
5641 * c-ada-spec.c (print_ada_declaration): For typedef declarations, look
5642 for nested types only if the type is a record or union and dump SLOC.
5644 2016-11-09 Jason Merrill <jason@redhat.com>
5646 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_template_auto.
5648 2016-11-09 Jakub Jelinek <jakub@redhat.com>
5650 * c-ubsan.c (ubsan_instrument_shift): Handle split
5651 -fsanitize=shift-base and -fsanitize=shift-exponent.
5653 2016-11-07 Jason Merrill <jason@redhat.com>
5655 * c.opt (Wc++1z-compat): New.
5656 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_noexcept_function_type.
5658 2016-11-07 Martin Liska <mliska@suse.cz>
5660 * c-warn.c (warn_for_unused_label): Save all labels used
5661 in goto or in &label.
5663 2016-11-03 Jason Merrill <jason@redhat.com>
5665 * c-cppbuiltin.c (c_cpp_builtins): Correct
5666 __cpp_inheriting_constructors.
5668 2016-11-01 Jason Merrill <jason@redhat.com>
5670 * c-cppbuiltin.c (c_cpp_builtins): Update
5671 __cpp_inheriting_constructors.
5673 * c.opt (-fnew-inheriting-ctors): New.
5674 * c-opts.c: Default to on for ABI 11+.
5676 2016-10-31 Jakub Jelinek <jakub@redhat.com>
5679 * c.opt (fext-numeric-literals): Add Var and Init.
5680 * c-opts.c (c_common_handle_option): Don't clear
5681 cpp_opts->ext_numeric_literals for -std=c++{11,14,1z}.
5682 (c_common_post_options): Clear it here if not set
5685 2016-10-28 Aldy Hernandez <aldyh@redhat.com>
5688 * c-pretty-print.c (simple_type_specifier): Do not dereference `t'
5691 2016-10-25 Jakub Jelinek <jakub@redhat.com>
5693 * c-common.h (enum rid): Add RID_BUILTIN_LAUNDER.
5694 * c-common.c (c_common_reswords): Add __builtin_launder.
5696 2016-10-24 Bernd Edlinger <bernd.edlinger@hotmail.de>
5698 * c-common.c (c_common_truthvalue_conversion): Warn for
5699 multiplications in boolean context. Fix the quoting of '<<' and '<'
5700 in the shift warning.
5702 2016-10-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
5704 * c-common.c (c_common_truthvalue_conversion): Fix the comment.
5706 2016-10-20 Jason Merrill <jason@redhat.com>
5708 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_concepts value.
5710 2016-10-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
5712 * c-common.c (c_common_truthvalue_conversion): Warn only for signed
5713 integer shift ops in boolean context.
5715 2016-10-18 Aldy Hernandez <aldyh@redhat.com>
5717 * c.opt (Walloca): New.
5718 (Walloca-larger-than=): New.
5719 (Wvla-larger-than=): New.
5721 2016-10-17 Marek Polacek <polacek@redhat.com>
5723 * c-warn.c (find_array_ref_with_const_idx_r): Remove parameter names.
5724 Return immediately when finding a match.
5725 (warn_tautological_cmp): Remove a boolean variable that is no longer
5728 2016-10-17 Marek Polacek <polacek@redhat.com>
5730 * c-attribs.c: New file.
5731 * c-common.c: Move attributes handling to c-attribs.c.
5732 (get_nonnull_operand): No longer static.
5733 * c-common.h: Move the declarations from c-attribs.c to its own section.
5735 2016-10-14 Jason Merrill <jason@redhat.com>
5737 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_aggregate_bases
5738 and __cpp_deduction_guides.
5740 2016-10-13 Jason Merrill <jason@redhat.com>
5742 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_inline_variables.
5744 2016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
5746 * c-cppbuiltin.c: Include memmodel.h.
5747 * c-opts.c: Likewise.
5748 * c-pragma.c: Likewise.
5749 * c-warn.c: Likewise.
5751 2016-10-12 Jakub Jelinek <jakub@redhat.com>
5753 * c.opt (Wextra): Add as C/C++/ObjC/ObjC++ option.
5754 (Wimplicit-fallthrough=): Enable for these languages by -Wextra.
5755 * c-opts.c (sanitize_cpp_opts): Initialize
5756 cpp_opts->cpp_warn_implicit_fallthrough.
5758 2016-10-11 Marek Polacek <polacek@redhat.com>
5760 * c-common.c (warning_candidate_p): Change the return type to bool
5761 and return true/false instead of 1/0.
5762 (vector_mode_valid_p): Likewise.
5764 2016-10-11 Marek Polacek <polacek@redhat.com>
5766 * c-common.c (fold_for_warn): No longer static.
5767 (bool_promoted_to_int_p): Likewise.
5768 (c_common_get_narrower): Likewise.
5769 (constant_expression_warning): Move to c-warn.c.
5770 (constant_expression_error): Likewise.
5771 (overflow_warning): Likewise.
5772 (warn_logical_operator): Likewise.
5773 (find_array_ref_with_const_idx_r): Likewise.
5774 (warn_tautological_cmp): Likewise.
5775 (expr_has_boolean_operands_p): Likewise.
5776 (warn_logical_not_parentheses): Likewise.
5777 (warn_if_unused_value): Likewise.
5778 (strict_aliasing_warning): Likewise.
5779 (sizeof_pointer_memaccess_warning): Likewise.
5780 (check_main_parameter_types): Likewise.
5781 (conversion_warning): Likewise.
5782 (warnings_for_convert_and_check): Likewise.
5783 (match_case_to_enum_1): Likewise.
5784 (match_case_to_enum): Likewise.
5785 (c_do_switch_warnings): Likewise.
5786 (warn_for_omitted_condop): Likewise.
5787 (readonly_error): Likewise.
5788 (lvalue_error): Likewise.
5789 (invalid_indirection_error): Likewise.
5790 (warn_array_subscript_with_type_char): Likewise.
5791 (warn_about_parentheses): Likewise.
5792 (warn_for_unused_label): Likewise.
5793 (warn_for_div_by_zero): Likewise.
5794 (warn_for_memset): Likewise.
5795 (warn_for_sign_compare): Likewise.
5796 (do_warn_double_promotion): Likewise.
5797 (do_warn_unused_parameter): Likewise.
5798 (record_locally_defined_typedef): Likewise.
5799 (maybe_record_typedef_use): Likewise.
5800 (maybe_warn_unused_local_typedefs): Likewise.
5801 (maybe_warn_bool_compare): Likewise.
5802 (maybe_warn_shift_overflow): Likewise.
5803 (warn_duplicated_cond_add_or_warn): Likewise.
5804 (diagnose_mismatched_attributes): Likewise.
5805 * c-common.h: Move the declarations from c-warn.c to its own section.
5806 * c-warn.c: New file.
5808 2016-10-08 Jason Merrill <jason@redhat.com>
5810 * c-common.c (c_common_truthvalue_conversion): Don't distribute
5811 into COND_EXPR in C++.
5813 2016-10-08 Jakub Jelinek <jakub@redhat.com>
5815 * c-lex.c (c_lex_with_flags) <case CPP_COMMENT>: For CPP_COMMENT
5816 token with PREV_FALLTHROUGH, skip all following CPP_PADDING and
5817 CPP_COMMENT tokens and set add_flags to PREV_FALLTHROUGH afterwards.
5819 2016-10-07 Jakub Jelinek <jakub@redhat.com>
5821 Implement LWG2296 helper intrinsic
5822 * c-common.h (enum rid): Add RID_ADDRESSOF.
5823 * c-common.c (c_common_reswords): Add __builtin_addressof.
5825 2016-10-07 Bernd Edlinger <bernd.edlinger@hotmail.de>
5828 * c-common.c (c_common_truthvalue_conversion): Warn also for
5829 suspicious enum values in boolean context.
5831 2016-10-06 Jakub Jelinek <jakub@redhat.com>
5833 Implement P0258R2 - helper for C++17
5834 std::has_unique_object_representations trait
5835 * c-common.h (enum rid): Add RID_HAS_UNIQUE_OBJ_REPRESENTATIONS.
5836 * c-common.c (c_common_reswords): Add
5837 __has_unique_object_representations.
5839 2016-10-05 Jakub Jelinek <jakub@redhat.com>
5842 * c-ubsan.c (ubsan_instrument_return): Don't call
5843 initialize_sanitizer_builtins here.
5845 2016-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
5847 * c-common.c (c_common_truthvalue_conversion): Warn also for suspicious
5848 conditional expression in boolean context when only one arm is
5851 2016-10-05 Jakub Jelinek <jakub@redhat.com>
5854 * c-ubsan.c (ubsan_instrument_shift): Return NULL_TREE if type0
5857 * c-common.c (c_common_reswords): Update comment for C++11.
5859 2016-10-04 Jason Merrill <jason@redhat.com>
5861 * c-common.c (make_tree_vector_from_ctor): New.
5862 * c-common.h: Declare it.
5864 2016-10-04 Jakub Jelinek <jakub@redhat.com>
5866 * c-cppbuiltin.c (c_cpp_builtins): Don't define
5867 __LIBGCC_JCR_SECTION_NAME__.
5869 2016-10-03 Bernd Edlinger <bernd.edlinger@hotmail.de>
5871 * c-common.c (c_common_truthvalue_conversion): Warn for suspicious
5872 left shift in boolean context.
5874 2016-09-29 Jakub Jelinek <jakub@redhat.com>
5876 Implement P0001R1 - C++17 removal of register storage class specifier
5877 * c.opt (Wregister): New warning.
5878 * c-opts.c (c_common_post_options): Enable -Wregister by
5881 2016-09-29 James Greenhalgh <james.greenhalgh@arm.com>
5883 * c-opts.c (c_common_post_options): Remove special case for
5884 TARGET_FLT_EVAL_METHOD_NON_DEFAULT with -fexcess-precision=standard
5887 2016-09-27 Jakub Jelinek <jakub@redhat.com>
5889 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_capture_star_this for
5892 * c-ada-spec.c (print_ada_declaration): Remove break after return.
5894 2016-09-26 Thomas Preud'homme <thomas.preudhomme@arm.com>
5896 * c-common.c: Include memmodel.h.
5898 2016-09-26 Marek Polacek <polacek@redhat.com>
5900 * c-lex.c (c_common_has_attribute): Handle attribute fallthrough.
5902 2016-09-26 Marek Polacek <polacek@redhat.com>
5905 * c-common.c (c_common_attribute_table): Add fallthrough attribute.
5906 (handle_fallthrough_attribute): New function.
5907 (attribute_fallthrough_p): New function.
5908 * c-common.h (attribute_fallthrough_p): Declare.
5910 2016-09-24 Marek Polacek <polacek@redhat.com>
5913 * c.opt (Wbool-operation): New.
5915 2016-09-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
5917 * c-common.c (c_common_truthvalue_conversion): Inhibit
5918 Wint-in-bool-context warning with from_macro_definition_at.
5919 Mention the expression will always evaluate to true.
5921 2016-09-21 Martin Sebor <msebor@redhat.com>
5924 * c.opt (fprintf-return-value): Temporarily initialize to zero
5925 to unblock bootstrap failures.
5927 2016-09-21 Jakub Jelinek <jakub@redhat.com>
5930 * c.opt (Waligned-new=): Add RejectNegative.
5931 (faligned-new=): Likewise. Spelling fix - change
5932 aligned_new_threshhold to aligned_new_threshold.
5933 * c-cppbuiltin.c (c_cpp_builtins): Change aligned_new_threshhold
5934 to aligned_new_threshold.
5936 2016-09-20 Martin Sebor <msebor@redhat.com>
5939 * c.opt: Add -Wformat-length and -fprintf-return-value.
5941 2016-09-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
5944 * c.opt (Wint-in-bool-context): New warning.
5945 * c-common.c (c_common_truthvalue_conversion): Warn on integer
5946 constants in boolean context.
5948 2016-09-19 Joseph Myers <joseph@codesourcery.com>
5950 * c-common.c (max_align_t_align): Also consider alignment of
5953 2016-09-15 Jason Merrill <jason@redhat.com>
5955 * c-common.c (check_cxx_fundamental_alignment_constraints): Check
5958 2016-09-14 Jason Merrill <jason@redhat.com>
5960 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
5961 limit FIELD_DECL, either.
5963 2016-09-14 Marek Polacek <polacek@redhat.com>
5965 * c-common.c (c_common_truthvalue_conversion): Use false instead of 0.
5966 * c-common.h (build_unary_op): Change nonconvert parameter type to bool.
5967 * c-omp.c (c_finish_omp_atomic): Use false instead of 0.
5969 2016-09-13 David Malcolm <dmalcolm@redhat.com>
5971 * c-common.c (warn_logical_not_parentheses): Replace
5972 rich_location::add_fixit_insert calls with add_fixit_insert_before
5973 and add_fixit_insert_after, eliminating the "next_loc" calculation.
5975 2016-09-13 Jason Merrill <jason@redhat.com>
5976 Tom de Vries <tom@codesourcery.com>
5979 * c-common.c (set_underlying_type): Don't treat array as builtin type.
5981 2016-09-13 Jason Merrill <jason@redhat.com>
5983 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
5986 2016-09-12 Jason Merrill <jason@redhat.com>
5988 * c-common.c (check_cxx_fundamental_alignment_constraints): Fix
5989 bit/byte confusion, allow large alignment for types.
5991 2016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
5994 * c-common.c (warn_for_omitted_condop): Also warn for boolean data.
5996 2016-09-12 David Malcolm <dmalcolm@redhat.com>
5999 * c-format.c (argument_parser::check_argument_type): Add params
6000 "type_start" and "conversion_char". Use the former to generate
6001 offset_to_type_start and pass it and conversion_char to
6003 (check_format_info_main): Capture the start of the type
6004 information as "type_start", and pass it an format_char
6005 to arg_parser.check_argument_type.
6006 (check_format_types): Provide an example in the leading comment.
6007 Add params "offset_to_type_start" and "conversion_char"; pass
6008 them to format_type_warning calls.
6009 (test_get_modifier_for_format_len): Likewise.
6010 (matching_type_p): New function.
6011 (get_format_for_type): Add param "conversion_char" and move
6012 implementation into...
6013 (get_format_for_type_1): ...new function, called twice.
6014 Use new function matching_type_p rather than checking for
6015 TYPE_CANONICAL equality.
6016 (get_corrected_substring): New function.
6017 (format_type_warning): Provide an example in the leading comment.
6018 Add params "offset_to_type_start" and "conversion_char". Replace
6019 call to get_format_for_type with call to get_corrected_substring
6020 and move rejection of hints for widths/precisions there.
6021 (assert_format_for_type_streq): Add param "conversion_char".
6022 (ASSERT_FORMAT_FOR_TYPE_STREQ): Add param CONVERSION_CHAR.
6023 (test_get_format_for_type_printf): Add conversion chars to the
6024 tests, adding coverage for various combinations of integer
6025 vs double conversions, and for preserving octal and hexadecimal
6027 (test_get_format_for_type_scanf): Add conversion chars to the
6030 2016-09-10 Tom de Vries <tom@codesourcery.com>
6033 * c-common.c (build_va_arg): Handle more strict
6034 targetm.canonical_va_list_type. Replace first argument type error with
6037 2016-09-09 Martin Sebor <msebor@redhat.com>
6041 * c-format.c (argument_parser::find_format_char_info): Use %qc
6042 format directive unconditionally.
6044 2016-09-09 Jason Merrill <jason@redhat.com>
6046 Implement C++17 new of over-aligned types.
6047 * c.opt: Add -faligned-new and -Waligned-new.
6048 * c-common.c (max_align_t_align): Split out from...
6049 (cxx_fundamental_alignment_p): ...here.
6050 * c-common.h: Declare it.
6051 * c-cppbuiltin.c (c_cpp_builtins): Handle aligned new.
6053 2016-09-09 Joseph Myers <joseph@codesourcery.com>
6055 * c-cppbuiltin.c (builtin_define_type_width): New function.
6056 (builtin_define_stdint_macros, c_cpp_builtins): Define type width
6059 2016-09-07 David Malcolm <dmalcolm@redhat.com>
6061 * c-common.c (get_cpp_ttype_from_string_type): Handle being passed
6063 (substring_loc::get_location): Move to substring-locations.c,
6064 keeping implementation as...
6065 (c_get_substring_location): New function, from the above, reworked
6066 to use accessors rather than member lookup.
6067 * c-common.h (class substring_loc): Move to substring-locations.h,
6068 replacing with a forward decl.
6069 (c_get_substring_location): New decl.
6070 * c-format.c: Include "substring-locations.h".
6071 (format_warning_va): Move to substring-locations.c.
6072 (format_warning_at_substring): Likewise.
6074 2016-09-06 Martin Sebor <msebor@redhat.com>
6077 * c-format.c (check_function_format): Avoid issuing warnings for
6078 functions unless they call format functions with non-constant
6081 2016-09-06 Richard Biener <rguenther@suse.de>
6084 * c-common.c (c_common_mark_addressable_vec): Handle
6085 COMPOUND_LITERAL_EXPR.
6087 2016-09-05 Marek Polacek <polacek@redhat.com>
6090 * c-common.c (bool_promoted_to_int_p): New function.
6091 (expr_has_boolean_operands_p): New function.
6092 (warn_logical_not_parentheses): Return if expr_has_boolean_operands_p.
6093 (maybe_warn_bool_compare): Use bool_promoted_to_int_p.
6095 2016-09-04 Tom de Vries <tom@codesourcery.com>
6098 2016-08-29 Tom de Vries <tom@codesourcery.com>
6100 * c-common.c (build_va_arg): Replace first argument type error
6103 2016-09-02 Jakub Jelinek <jakub@redhat.com>
6106 * c-omp.c (c_finish_omp_atomic): Reject _Atomic qualified expressions.
6107 (c_finish_omp_for): Reject _Atomic qualified iterators.
6109 2016-09-01 Martin Sebor <msebor@redhat.com>
6111 * c-ada-spec.c (dump_ada_function_declaration): Increase buffer
6112 size to guarantee it fits the output of the formatted function
6113 regardless of its arguments.
6115 2016-09-01 Marek Polacek <polacek@redhat.com>
6118 * c-common.c (resolve_overloaded_builtin): Fix formatting. Add
6121 2016-08-29 Marek Polacek <polacek@redhat.com>
6124 * c-common.c (warn_logical_not_parentheses): Don't warn for
6125 a comparison or a logical operator.
6127 2016-08-29 Tom de Vries <tom@codesourcery.com>
6129 * c-common.c (build_va_arg): Fix type comparison assert.
6131 2016-08-29 Tom de Vries <tom@codesourcery.com>
6133 * c-common.c (build_va_arg): Replace first argument type error
6136 2016-08-29 Tom de Vries <tom@codesourcery.com>
6139 * c-common.c (build_va_arg): Add first argument error. Build va_arg
6140 with error_mark_node as va_list instead of with illegal va_list.
6142 2016-08-25 Marek Polacek <polacek@redhat.com>
6143 David Malcolm <dmalcolm@redhat.com>
6145 * c-common.c (warn_logical_not_parentheses): Print fixit hints.
6146 * c-common.h (warn_logical_not_parentheses): Update declaration.
6148 2016-08-22 Marek Polacek <polacek@redhat.com>
6151 * c-common.c (warn_for_memset): Check type for null.
6153 2016-08-22 Joseph Myers <joseph@codesourcery.com>
6155 * c-cppbuiltin.c (c_cpp_builtins): Check _FloatN and
6156 _FloatNx types for suffixes for built-in functions.
6158 2016-08-19 Joseph Myers <joseph@codesourcery.com>
6161 * c-common.h (RID_FLOAT16, RID_FLOATN_NX_FIRST, RID_FLOAT32)
6162 (RID_FLOAT64, RID_FLOAT128, RID_FLOAT32X, RID_FLOAT64X)
6163 (RID_FLOAT128X): New enum rid values.
6164 (CASE_RID_FLOATN_NX): New macro.
6165 * c-common.c (c_common_reswords): Add _FloatN and _FloatNx
6167 (c_common_type_for_mode): Check for _FloatN and _FloatNx and
6168 corresponding complex types.
6169 (c_common_nodes_and_builtins): For non-C++, register _FloatN and
6170 _FloatNx and corresponding complex types.
6171 (keyword_begins_type_specifier): Use CASE_RID_FLOATN_NX.
6172 * c-cppbuiltin.c (builtin_define_float_constants): Check _FloatN
6173 and _FloatNx types for the widest type for determining
6174 DECIMAL_DIG. Define __LDBL_DECIMAL_DIG__ as well as
6175 __DECIMAL_DIG__ for long double. Handle FMA_SUFFIX being NULL.
6176 (c_cpp_builtins): Call builtin_define_float_constants for _FloatN
6178 * c-lex.c (interpret_float): Handle _FloatN and _FloatNx
6180 * c-pretty-print.c (pp_c_floating_constant): Handle _FloatN and
6183 2016-08-18 David Malcolm <dmalcolm@redhat.com>
6185 * c-opts.c (c_diagnostic_finalizer): Update for change to
6186 diagnostic_show_locus.
6188 2016-08-18 David Malcolm <dmalcolm@redhat.com>
6190 * c-common.c: Include "spellcheck.h".
6191 (cb_get_suggestion): New function.
6192 * c-common.h (cb_get_suggestion): New decl.
6193 * c-lex.c (init_c_lex): Initialize cb->get_suggestion to
6196 2016-08-18 Marek Polacek <polacek@redhat.com>
6199 * c-common.c (get_atomic_generic_size): Disallow pointer-to-function
6202 2016-08-16 David Malcolm <dmalcolm@redhat.com>
6205 * c-common.c (substring_loc::get_range): Rename to...
6206 (substring_loc::get_location): ...this, converting param from a
6207 source_range * to a location_t *. Call
6208 get_source_location_for_substring rather than
6209 get_source_range_for_substring, and pass in m_caret_idx.
6210 * c-common.h (substring_loc::substring_loc): Add param "caret_idx".
6211 (substring_loc::get_range): Replace with...
6212 (substring_loc::get_location): ...this.
6213 (substring_loc::set_caret_index): New method.
6214 (substring_loc): Add field m_caret_idx.
6215 * c-format.c (format_warning_va): Update for above changes.
6216 Rename local "substring_loc" to "fmt_substring_loc" to avoid
6217 clashing with type name.
6218 (format_warning_at_char): Add caret_idx param to substring_loc ctor.
6219 (check_argument_type): Likewise.
6220 (format_type_warning): Rename param "fmt_loc" to "whole_fmt_loc"
6221 Use a copy when emitting warnings, setting the caret index from TYPE.
6223 2016-08-16 Eric Botcazou <ebotcazou@adacore.com>
6224 Arnaud Charlet <charlet@adacore.com>
6226 * c-ada-spec.c (dump_number): New function.
6227 (handle_escape_character): Likewise.
6228 (print_ada_macros): Add handling of constant integers and strings.
6230 2016-08-12 Marek Polacek <polacek@redhat.com>
6233 * c-common.c (scalar_to_vector): Adjust fall through comment.
6234 * c-opts.c (c_common_handle_option): Likewise.
6235 * c-pragma.c (handle_pragma_pack): Add FALLTHRU.
6236 * c-pretty-print.c (c_pretty_printer::postfix_expression): Adjust
6237 fall through comment.
6238 * cilk.c (extract_free_variables): Add FALLTHRU.
6240 2016-08-10 Jason Merrill <jason@redhat.com>
6242 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_if_constexpr.
6244 2016-08-09 Jason Merrill <jason@redhat.com>
6246 * c-common.c (c_common_attribute_table): vector_size affects type
6249 2016-08-09 Marek Polacek <polacek@redhat.com>
6252 * c-ada-spec.c (dump_generic_ada_node): Add return.
6254 2016-08-09 Jason Merrill <jason@redhat.com>
6256 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_constexpr for
6257 C++17 constexpr lambdas.
6259 2016-08-08 David Malcolm <dmalcolm@redhat.com>
6262 * c-common.h (selftest::c_format_c_tests): New declaration.
6263 (selftest::run_c_tests): New declaration.
6264 * c-format.c: Include "selftest.h.
6265 (format_warning_va): Add param "corrected_substring" and use
6266 it to add a replacement fix-it hint.
6267 (format_warning_at_substring): Likewise.
6268 (format_warning_at_char): Update for new param of
6270 (argument_parser::check_argument_type): Pass "fki" to
6272 (check_format_types): Add param "fki" and pass it to
6273 format_type_warning.
6274 (deref_n_times): New function.
6275 (get_modifier_for_format_len): New function.
6276 (selftest::test_get_modifier_for_format_len): New function.
6277 (get_format_for_type): New function.
6278 (format_type_warning): Add param "fki" and use it to attempt
6279 to provide hints for argument types when calling
6280 format_warning_at_substring.
6281 (selftest::get_info): New function.
6282 (selftest::assert_format_for_type_streq): New function.
6283 (ASSERT_FORMAT_FOR_TYPE_STREQ): New macro.
6284 (selftest::test_get_format_for_type_printf): New function.
6285 (selftest::test_get_format_for_type_scanf): New function.
6286 (selftest::c_format_c_tests): New function.
6288 2016-08-08 David Malcolm <dmalcolm@redhat.com>
6291 * c-format.c: Include "diagnostic.h".
6292 (location_column_from_byte_offset): Delete.
6293 (location_from_offset): Delete.
6294 (format_warning_va): New function.
6295 (format_warning_at_substring): New function.
6296 (format_warning_at_char): New function.
6297 (check_format_arg): Capture location of format_tree and pass to
6298 check_format_info_main.
6299 (argument_parser): Add fields "start_of_this_format" and
6300 "format_string_cst".
6301 (flag_chars_t::validate): Add param "format_string_cst". Convert
6302 warning_at call using location_from_offset to call to
6303 format_warning_at_char.
6304 (argument_parser::argument_parser): Add param "format_string_cst_"
6305 and use use it to initialize field "format_string_cst".
6306 Initialize new field "start_of_this_format".
6307 (argument_parser::read_format_flags): Convert warning_at call
6308 using location_from_offset to a call to format_warning_at_char.
6309 (argument_parser::read_any_format_left_precision): Likewise.
6310 (argument_parser::read_any_format_precision): Likewise.
6311 (argument_parser::read_any_other_modifier): Likewise.
6312 (argument_parser::find_format_char_info): Likewise, in three places.
6313 (argument_parser::parse_any_scan_set): Likewise, in one place.
6314 (argument_parser::handle_conversions): Likewise, in two places.
6315 (argument_parser::check_argument_type): Add param "fmt_param_loc"
6316 and use it to make a substring_loc. Pass the latter to
6318 (check_format_info_main): Add params "fmt_param_loc" and
6319 "format_string_cst". Convert warning_at calls using
6320 location_from_offset to calls to format_warning_at_char. Pass the
6321 new params to the arg_parser ctor. Pass "format_string_cst" to
6322 flag_chars.validate. Pass "fmt_param_loc" to
6323 arg_parser.check_argument_type.
6324 (check_format_types): Convert first param from a location_t
6325 to a const substring_loc & and rename to "fmt_loc". Attempt
6326 to extract the range of the relevant parameter and pass it
6327 to format_type_warning.
6328 (format_type_warning): Convert first param from a location_t
6329 to a const substring_loc & and rename to "fmt_loc". Add
6330 params "param_range" and "type". Replace calls to warning_at
6331 with calls to format_warning_at_substring.
6333 2016-08-08 David Malcolm <dmalcolm@redhat.com>
6335 * c-format.c (class flag_chars_t): New class.
6336 (struct length_modifier): New struct.
6337 (class argument_parser): New class.
6338 (flag_chars_t::flag_chars_t): New ctor.
6339 (flag_chars_t::has_char_p): New method.
6340 (flag_chars_t::add_char): New method.
6341 (flag_chars_t::validate): New method.
6342 (flag_chars_t::get_alloc_flag): New method.
6343 (flag_chars_t::assignment_suppression_p): New method.
6344 (argument_parser::argument_parser): New ctor.
6345 (argument_parser::read_any_dollar): New method.
6346 (argument_parser::read_format_flags): New method.
6347 (argument_parser::read_any_format_width): New method.
6348 (argument_parser::read_any_format_left_precision): New method.
6349 (argument_parser::read_any_format_precision): New method.
6350 (argument_parser::handle_alloc_chars): New method.
6351 (argument_parser::read_any_length_modifier): New method.
6352 (argument_parser::read_any_other_modifier): New method.
6353 (argument_parser::find_format_char_info): New method.
6354 (argument_parser::validate_flag_pairs): New method.
6355 (argument_parser::give_y2k_warnings): New method.
6356 (argument_parser::parse_any_scan_set): New method.
6357 (argument_parser::handle_conversions): New method.
6358 (argument_parser::check_argument_type): New method.
6359 (check_format_info_main): Introduce classes argument_parser
6360 and flag_chars_t, moving the code within the loop into methods
6361 of these classes. Make various locals "const".
6363 2016-08-05 David Malcolm <dmalcolm@redhat.com>
6365 * c-common.c: Include "substring-locations.h".
6366 (get_cpp_ttype_from_string_type): New function.
6367 (g_string_concat_db): New global.
6368 (substring_loc::get_range): New method.
6369 * c-common.h (g_string_concat_db): New declaration.
6370 (class substring_loc): New class.
6371 * c-lex.c (lex_string): When concatenating strings, capture the
6372 locations of all tokens using a new obstack, and record the
6373 concatenation locations within g_string_concat_db.
6374 * c-opts.c (c_common_init_options): Construct g_string_concat_db
6377 2016-07-29 Marek Polacek <polacek@redhat.com>
6380 * c-common.c (c_common_truthvalue_conversion): Use LOCATION for the
6381 parentheses warning.
6384 * c-common.c (handle_alloc_align_attribute): Also check FUNCTION_DECL.
6386 2016-07-28 Martin Liska <mliska@suse.cz>
6388 PR gcov-profile/68025
6389 * c-common.c (handle_no_profile_instrument_function_attribute):
6391 2016-07-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
6393 * c-common.c (check_user_alignment): Use LOG2_BITS_PER_UNIT instead of
6396 2016-07-25 Jason Merrill <jason@redhat.com>
6399 * c.opt (fconstexpr-loop-limit): New.
6401 2016-07-22 Martin Sebor <msebor@redhat.com>
6404 * c-common.c (resolve_overloaded_builtin): Avoid converting
6405 __atomic_compare_exchange_n return type to that of what its
6406 first argument points to.
6408 2016-07-22 Uros Bizjak <ubizjak@gmail.com>
6410 * c-common.c: Use HOST_WIDE_INT_M1U instead of
6411 ~(unsigned HOST_WIDE_INT) 0.
6413 2016-07-22 Martin Liska <mliska@suse.cz>
6415 PR gcov-profile/69028
6416 PR gcov-profile/62047
6417 * cilk.c (create_cilk_helper_decl): Set location of a new decl
6418 to the current_function_decl.
6420 2016-07-21 Jason Merrill <jason@redhat.com>
6423 * c-common.c (c_common_truthvalue_conversion): Check
6424 c_inhibit_evaluation_warnings for warning about address of
6427 2016-07-20 David Malcolm <dmalcolm@redhat.com>
6429 * c-common.h (lookup_name_fuzzy): Convert return type from tree to
6432 2016-07-15 Jason Merrill <jason@redhat.com>
6434 * c-opts.c (c_common_post_options): Update -fabi-version default to 11.
6436 2016-07-15 Jakub Jelinek <jakub@redhat.com>
6439 * c-common.h (enum lookup_name_fuzzy_kind): Add
6440 FUZZY_LOOKUP_FUNCTION_NAME.
6442 2016-07-08 Jason Merrill <jason@redhat.com>
6444 P0145: Refining Expression Order for C++.
6445 * c.opts (-fargs-in-order): Rename to -fstrong-eval-order.
6448 2016-07-05 Markus Trippelsdorf <markus@trippelsdorf.de>
6451 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_rvalue_references.
6453 2016-06-29 Thomas Schwinge <thomas@codesourcery.com>
6455 * c-pragma.h (enum pragma_kind): Rename
6456 PRAGMA_OMP_DECLARE_REDUCTION to PRAGMA_OMP_DECLARE. Adjust all
6459 2016-06-29 Richard Biener <rguenther@suse.de>
6462 * c-common.c (c_common_get_alias_set): Remove union type punning case.
6464 2016-06-24 Jason Merrill <jason@redhat.com>
6466 P0145R2: Refining Expression Order for C++.
6467 * c-common.c (verify_tree) [COMPOUND_EXPR]: Fix handling on LHS of
6470 2016-06-24 Jakub Jelinek <jakub@redhat.com>
6472 * c-common.c (check_builtin_function_arguments): Require last
6473 argument of BUILT_IN_*_OVERFLOW_P to have INTEGER_TYPE type.
6474 Adjust wording of diagnostics for BUILT_IN_*_OVERLFLOW
6475 if the last argument is pointer to enumerated or boolean type.
6477 2016-06-22 David Malcolm <dmalcolm@redhat.com>
6480 * c-common.h (enum lookup_name_fuzzy_kind): New enum.
6481 (lookup_name_fuzzy): New prototype.
6483 2016-06-21 John David Anglin <danglin@gcc.gnu.org>
6485 * c-common.c (get_source_date_epoch): Use int64_t instead of long long.
6487 2016-06-14 Jason Merrill <jason@redhat.com>
6489 P0145R2: Refining Expression Order for C++.
6490 * c.opt (fargs-in-order): New.
6491 * c-opts.c (c_common_post_options): Adjust flag_args_in_order.
6493 2016-06-13 Jakub Jelinek <jakub@redhat.com>
6496 * c-gimplify.c (ubsan_walk_array_refs_r): Set *walk_subtrees = 0 on
6497 all BIND_EXPRs, and on all BIND_EXPRs recurse also on BIND_EXPR_BODY.
6499 PR preprocessor/71183
6500 * c-ppoutput.c (init_pp_output): Set cb->get_source_date_epoch
6501 to cb_get_source_date_epoch.
6503 2016-06-10 Jakub Jelinek <jakub@redhat.com>
6506 * c.opt (Wpsabi): Add Warning flag.
6508 2016-06-10 Martin Sebor <msebor@redhat.com>
6511 * c-common.c (handle_nonnull_attribute): Accept
6512 the nonnull attribute in type-generic builtins.
6514 2016-06-09 Martin Sebor <msebor@redhat.com>
6517 * c-common.c (builtin_function_validate_nargs): Make text of error
6518 message consistent with others like it.
6520 2016-06-08 Martin Sebor <msebor@redhat.com>
6521 Jakub Jelinek <jakub@redhat.com>
6525 * c-common.c (check_builtin_function_arguments): Handle
6526 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
6528 2016-06-08 Richard Biener <rguenther@suse.de>
6530 * c-common.c (parse_optimize_options): Improve diagnostic messages.
6532 2016-06-07 Richard Biener <rguenther@suse.de>
6535 * c-common.c (parse_optimize_options): Only apply CL_OPTIMIZATION
6536 options and warn about others.
6538 2016-06-01 Eduard Sanou <dhole@openmailbox.org>
6540 * c-common.c (get_source_date_epoch): Rename to
6541 cb_get_source_date_epoch.
6542 * c-common.c (cb_get_source_date_epoch): Use a single generic erorr
6543 message when the parsing fails. Use error_at instead of fatal_error.
6544 * c-common.h (get_source_date_epoch): Rename to
6545 cb_get_source_date_epoch.
6546 * c-common.h (cb_get_source_date_epoch): Prototype.
6547 * c-common.h (MAX_SOURCE_DATE_EPOCH): Define.
6548 * c-common.h (c_omp_region_type): Remove trailing comma.
6549 * c-lex.c (init_c_lex): Set cb->get_source_date_epoch callback.
6550 * c-lex.c (c_lex_with_flags): Remove initialization of
6551 pfile->source_date_epoch.
6553 2016-05-30 Jakub Jelinek <jakub@redhat.com>
6556 * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_DEPEND to
6557 C_OMP_CLAUSE_SPLIT_TARGET. Put OMP_CLAUSE_NOWAIT to
6558 C_OMP_CLAUSE_SPLIT_TARGET if combined with target construct,
6559 instead of C_OMP_CLAUSE_SPLIT_FOR.
6561 2016-05-24 Richard Biener <rguenther@suse.de>
6565 * c-common.h (convert_vector_to_pointer_for_subscript): Rename to ...
6566 (convert_vector_to_array_for_subscript): ... this.
6567 * c-common.c (convert_vector_to_pointer_for_subscript): Use a
6568 VIEW_CONVERT_EXPR to an array type. Rename to ...
6569 (convert_vector_to_array_for_subscript): ... this.
6571 2016-05-12 Marek Polacek <polacek@redhat.com>
6574 * c-common.c (pointer_int_sum): Call size_in_bytes_loc instead of
6575 size_in_bytes and pass LOC to it.
6577 2016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
6580 * c.opt (Wduplicate-decl-specifier): New option.
6582 2016-05-11 Marek Polacek <polacek@redhat.com>
6585 * c-common.c (diagnose_mismatched_attributes): New function.
6586 * c-common.h (diagnose_mismatched_attributes): Declare.
6588 2016-05-04 Marek Polacek <polacek@redhat.com>
6590 * c.opt (Wdangling-else): New option.
6592 2016-05-03 Marek Polacek <polacek@redhat.com>
6595 * c-common.c (builtin_function_validate_nargs): Add location
6597 (check_builtin_function_arguments): Add location and arguments
6598 parameters. Use them.
6599 * c-common.h (check_builtin_function_arguments): Update declaration.
6601 2016-05-03 Richard Biener <rguenther@suse.de>
6603 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Do not
6604 allow call args to gimplify to SSA names.
6606 2016-05-03 Marek Polacek <polacek@redhat.com>
6608 * c-common.h (enum c_omp_region_type): Remove stray comma.
6610 2016-05-02 Cesar Philippidis <cesar@codesourcery.com>
6612 * c-common.h (enum c_omp_region_type): Define.
6614 2016-05-02 Richard Sandiford <richard.sandiford@arm.com>
6616 * c-common.c (shorten_compare): Use wi::to_wide.
6618 2016-04-29 Cesar Philippidis <cesar@codesourcery.com>
6621 * c-common.h (c_oacc_split_loop_clauses): Add boolean argument.
6622 * c-omp.c (c_oacc_split_loop_clauses): Use it to duplicate
6623 reduction clauses in acc parallel loops.
6625 2016-04-29 Marek Polacek <polacek@redhat.com>
6628 * c-common.c (warn_for_memset): Check domain before accessing it.
6630 2016-04-29 Dominik Vogt <vogt@linux.vnet.ibm.com>
6633 * c-common.c (handle_aligned_attribute): Allow 0 as an argument to the
6634 "aligned" attribute.
6636 2016-04-28 Jason Merrill <jason@redhat.com>
6638 * c-lex.c (c_common_has_attribute): Handle nodiscard.
6640 2016-04-28 Eduard Sanou <dhole@openmailbox.org>
6641 Matthias Klose <doko@debian.org>
6643 * c-common.c (get_source_date_epoch): New function, gets the environment
6644 variable SOURCE_DATE_EPOCH and parses it as long long with error
6646 * c-common.h (get_source_date_epoch): Prototype.
6647 * c-lex.c (c_lex_with_flags): set parse_in->source_date_epoch.
6649 2015-04-27 Ryan Burn <contact@rnburn.com>
6653 * cilk.c (cilk_ignorable_spawn_rhs_op): Change to external linkage.
6654 (cilk_recognize_spawn): Renamed from recognize_spawn and change to
6656 (cilk_detect_and_unwrap): Corresponding changes.
6657 (extract_free_variables): Don't extract free variables from
6658 AGGR_INIT_EXPR slot.
6659 * c-common.h (cilk_ignorable_spawn_rhs_op): Prototype.
6660 (cilk_recognize_spawn): Likewise.
6662 2016-04-27 Bernd Schmidt <bschmidt@redhat.com>
6664 * c.opt (Wmemset-elt-size): New option.
6665 * c-common.c (warn_for_memset): New function.
6666 * c-common.h (warn_for_memset): Declare.
6668 2016-04-25 Jason Merrill <jason@redhat.com>
6670 * c-common.c (handle_unused_attribute): Accept CONST_DECL.
6672 * c-common.h: Declare it.
6673 * c-lex.c (c_common_has_attribute): Add maybe_unused.
6675 2016-04-22 Jason Merrill <jason@redhat.com>
6677 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_range_based_for.
6679 2016-04-20 Ilya Verbin <ilya.verbin@intel.com>
6682 * c-cilkplus.c (c_finish_cilk_clauses): Remove function.
6683 * c-common.h (c_finish_cilk_clauses): Remove declaration.
6685 2016-04-18 Michael Matz <matz@suse.de>
6687 * c-common.c (handle_aligned_attribute): Use SET_TYPE_ALIGN
6690 2016-04-17 Eric Botcazou <ebotcazou@adacore.com>
6692 * c-ada-spec.c (get_underlying_decl): Return the typedef, if any.
6693 (dump_generic_ada_node) <POINTER_TYPE>: Clean up handling of access
6694 to incomplete types.
6695 (dump_nested_type): Remove redundant tests and tidy up.
6696 (print_ada_declaration): Also set TREE_VISITED on the declaration of
6697 a type which is the typedef of an original type.
6699 2016-04-15 Marek Polacek <polacek@redhat.com>
6702 * c-common.c (build_va_arg): Change two asserts into errors and return
6705 2016-04-13 Marek Polacek <polacek@redhat.com>
6708 * c-indentation.c (should_warn_for_misleading_indentation): Bail out
6709 for switch statements, too.
6711 2016-03-28 Jason Merrill <jason@redhat.com>
6713 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_range_based_for.
6715 2016-03-23 Marek Polacek <polacek@redhat.com>
6718 * c.opt (Wignored-attributes): New option.
6720 2016-03-22 David Malcolm <dmalcolm@redhat.com>
6723 * c-indentation.c (warn_for_misleading_indentation): Rewrite the
6724 diagnostic text, reversing the order of the warning and note so
6725 that they appear in source order.
6727 2016-03-17 Marek Polacek <polacek@redhat.com>
6730 * c-common.c (resolve_overloaded_builtin): Set TREE_USED for the fetch
6733 2016-03-14 Jason Merrill <jason@redhat.com>
6735 * c-cppbuiltin.c (c_cpp_builtins): Set __cpp_hex_float.
6737 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_range_based_for.
6739 2016-03-09 Richard Biener <rguenther@suse.de>
6742 * c-common.c (strict_aliasing_warning): Add back
6743 alias_sets_conflict_p check.
6745 2016-03-08 Jason Merrill <jason@redhat.com>
6747 * c-opts.c (set_std_cxx1z): Don't enable concepts.
6749 2016-03-04 David Malcolm <dmalcolm@redhat.com>
6752 * c-indentation.c (get_visual_column): Move code to determine next
6754 (next_tab_stop): ...this new function.
6755 (line_contains_hash_if): Delete function.
6756 (detect_preprocessor_logic): Delete function.
6757 (get_first_nws_vis_column): New function.
6758 (detect_intervening_unindent): New function.
6759 (should_warn_for_misleading_indentation): Replace call to
6760 detect_preprocessor_logic with a call to
6761 detect_intervening_unindent.
6763 2016-03-04 David Malcolm <dmalcolm@redhat.com>
6766 * c-indentation.c (should_warn_for_misleading_indentation): When
6767 suppressing warnings about cases where the guard and body are on
6768 the same column, only use the first non-whitespace column in place
6769 of the guard token column when dealing with "else" clauses.
6770 When rejecting aligned BODY and NEXT, loosen the requirement
6771 from equality with the first non-whitespace of guard to simply
6772 that they not be indented relative to it.
6774 2016-03-04 Richard Biener <rguenther@suse.de>
6777 * c-common.c (strict_aliasing_warning): Use alias_set_subset_of
6778 instead of alias_sets_conflict_p.
6780 2016-03-01 Marek Polacek <polacek@redhat.com>
6783 * c-common.c (reject_gcc_builtin): Check for FUNCTION_DECL rather than
6786 2016-02-22 Martin Sebor <msebor@redhat.com>
6789 * c-common.c (check_builtin_function_arguments): Validate and
6790 reject invalid arguments to __builtin_alloca_with_align.
6792 2016-02-20 Mark Wielaard <mjw@redhat.com>
6795 * c.opt (Wunused-const-variable): Turn into Alias for...
6796 (Wunused-const-variable=): New option.
6798 2016-02-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
6801 * c-opts.c (c_common_post_options): Move call to set_std_cxx14 from
6803 (c_common_init_options): ...to here.
6804 (set_std_cxx98): Initialize flag_isoc94 and flag_isoc99.
6806 2016-02-19 Jakub Jelinek <jakub@redhat.com>
6809 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_GRAINSIZE.
6810 (init_pragma): Register PRAGMA_CILK_GRAINSIZE even for
6811 flag_preprocess_only.
6813 2016-02-16 Jakub Jelinek <jakub@redhat.com>
6816 * c.opt (Wnonnull-compare): Enable for -Wall.
6818 2016-02-15 Jakub Jelinek <jakub@redhat.com>
6821 * c-common.c (sync_resolve_size): Diagnose too few arguments
6822 even when params is non-NULL empty vector.
6824 2016-02-08 Bernd Schmidt <bschmidt@redhat.com>
6827 * c.opt (fshort-double): Remove.
6829 2016-02-05 Martin Sebor <msebor@redhat.com>
6832 * c.opt (Warning options): Update -Wplacement-new to take
6833 an optional argument.
6835 2016-02-01 Jakub Jelinek <jakub@redhat.com>
6837 PR preprocessor/69543
6839 * c-pragma.c (handle_pragma_diagnostic): Pass input_location
6840 instead of loc to control_warning_option.
6842 2016-02-01 Nathan Sidwell <nathan@codesourcery.com>
6844 * c.opt (fopenacc-dim=): New option.
6846 2016-01-27 Ryan Burn <contact@rnburn.com>
6849 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Change to use
6850 gimplify_arg. Removed superfluous post_p argument.
6851 * c-family.h (cilk_gimplify_call_params_in_spawned_fn): Removed
6852 superfluous post_p argument.
6853 * c-gimplify.c (c_gimplify_expr): Likewise.
6855 2016-01-26 David Malcolm <dmalcolm@redhat.com>
6858 * c-opts.c (c_diagnostic_finalizer): Replace invocation of
6859 pp_newline_and_flush with pp_flush.
6861 2016-01-20 Martin Sebor <msebor@redhat.com>
6864 * c-common.c (sync_resolve_size): Avoid printing diagnostic about
6865 an incompatible argument when the argument isn't a valid tree node.
6867 2016-01-18 Jason Merrill <jason@redhat.com>
6870 * c-common.c (check_function_arguments_recurse): Fold the whole
6871 COND_EXPR, not just the condition.
6873 2016-01-18 Tom de Vries <tom@codesourcery.com>
6875 * c-omp.c (c_oacc_split_loop_clauses): Don't copy OMP_CLAUSE_REDUCTION,
6876 classify as loop clause.
6878 2016-01-15 Jakub Jelinek <jakub@redhat.com>
6881 * c-pragma.c (c_register_pragma_1): Adjust comment to note that
6882 C++ FE no longer has limit on number of pragmas.
6884 2015-01-14 Ryan Burn <contact@rnburn.com>
6887 * cilk.c (create_cilk_wrapper_body): Call fold_build_cleanup_point_expr
6888 to add missing cleanup point.
6890 2016-01-14 David Malcolm <dmalcolm@redhat.com>
6893 * c-indentation.c (get_visual_column): Add location_t param.
6894 Handle the column number being zero by effectively disabling the
6895 warning, with an "inform".
6896 (should_warn_for_misleading_indentation): Add location_t argument
6897 for all uses of get_visual_column.
6899 2016-01-10 Patrick Palka <ppalka@gcc.gnu.org>
6902 * c-indentation.c (should_warn_for_misleading_indentation):
6903 Don't warn about do-while statements.
6905 2016-01-07 Martin Sebor <msebor@redhat.com>
6908 * c-common.c (sync_resolve_size): Reject first argument when it's
6911 2016-01-05 David Malcolm <dmalcolm@redhat.com>
6914 * c-indentation.c (get_visual_column): Remove default argument.
6915 (should_warn_for_misleading_indentation): For the multiline case,
6916 update call to get_visual_column for next_stmt_exploc so that it
6917 captures the location of the first non-whitespace character in the
6918 relevant line. Don't issue warnings if there is non-whitespace
6919 before the next statement.
6921 2016-01-04 Jakub Jelinek <jakub@redhat.com>
6923 Update copyright years.
6925 2015-12-21 David Malcolm <dmalcolm@redhat.com>
6927 * c-common.c (binary_op_error): Convert first param from
6928 location_t to rich_location * and use it when emitting an error.
6929 * c-common.h (binary_op_error): Convert first param from
6930 location_t to rich_location *.
6932 2015-12-16 David Malcolm <dmalcolm@redhat.com>
6934 * c-common.h (conflict_marker_get_final_tok_kind): New prototype.
6935 * c-lex.c (conflict_marker_get_final_tok_kind): New function.
6937 2015-12-15 Ilya Verbin <ilya.verbin@intel.com>
6939 * c-common.c (c_common_attribute_table): Handle "omp declare target
6942 2015-12-14 Jakub Jelinek <jakub@redhat.com>
6945 * c.opt (Wmissing-format-attribute, Wnormalized): Add Warning option.
6947 2014-12-12 Tobias Burnus <burnus@net-b.de>
6950 * c-format.c (gcc_gfc_char_table): Add 'q' flag to remaining
6951 specifiers (%d, %i,%u and %c).
6953 2015-12-10 David Malcolm <dmalcolm@redhat.com>
6955 * c.opt (Wmisleading-indentation): Add to -Wall for C and C++.
6957 2015-12-08 Jakub Jelinek <jakub@redhat.com>
6961 * c.opt (Wfloat-conversion, Wsign-conversion): Add Warning.
6962 * c-pragma.c (handle_pragma_diagnostic): Adjust
6963 control_warning_option caller.
6965 2015-12-07 David Malcolm <dmalcolm@redhat.com>
6967 * c-common.c (c_cpp_error): Update for change to
6968 rich_location::set_range.
6970 2015-12-04 Paolo Bonzini <bonzini@gnu.org>
6972 * c-common.c (maybe_warn_shift_overflow): Warn on all overflows if
6973 shifting 1 out of the sign bit.
6975 2015-12-04 Kirill Yukhin <kirill.yukhin@intel.com>
6977 * c-common.c (c_common_attribute_table[]): Update max arguments
6978 count for "simd" attribute.
6979 (handle_simd_attribute): Parse "notinbranch" and "inbranch" arguments.
6981 2015-12-03 Jakub Jelinek <jakub@redhat.com>
6983 PR preprocessor/57580
6984 * c-ppoutput.c (print): Change printed field to bool.
6985 Move src_file last for smaller padding.
6986 (init_pp_output): Set print.printed to false instead of 0.
6987 (scan_translation_unit): Fix up formatting. Set print.printed
6988 to true after printing something other than newline.
6989 (scan_translation_unit_trad): Set print.printed to true instead of 1.
6990 (maybe_print_line_1): Set print.printed to false instead of 0.
6991 (print_line_1): Likewise.
6992 (do_line_change): Set print.printed to true instead of 1.
6993 (cb_define, dump_queued_macros, cb_include, cb_def_pragma,
6994 dump_macro): Set print.printed to false after printing newline.
6996 2015-12-02 Jason Merrill <jason@redhat.com>
6998 * c-common.c (fold_for_warn): New.
6999 (warn_logical_operator, warn_tautological_cmp)
7000 (check_function_arguments_recurse, maybe_warn_bool_compare): Use it.
7002 * c-common.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
7003 (c_fully_fold_internal, decl_constant_value_for_optimization):
7005 * c-common.h: Don't declare decl_constant_value_for_optimization.
7007 2015-12-02 Joseph Myers <joseph@codesourcery.com>
7010 * c-common.h (c_build_qualified_type): Add extra default
7013 2015-12-01 Julian Brown <julian@codesourcery.com>
7014 Cesar Philippidis <cesar@codesourcery.com>
7015 James Norris <James_Norris@mentor.com>
7017 * c-pragma.c (oacc_pragmas): Add PRAGMA_OACC_HOST_DATA.
7018 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_HOST_DATA.
7019 (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_USE_DEVICE.
7021 2015-11-30 Eric Botcazou <ebotcazou@adacore.com>
7023 * c-ada-spec.c (print_ada_macros): Remove redundant blank line.
7024 (decl_sloc_common): Delete and move bulk of processing to...
7025 (decl_sloc): ...here.
7026 (pp_ada_tree_identifier): Remove reference to QUAL_UNION_TYPE.
7027 (dump_ada_double_name): Remove S parameter and compute the suffix.
7028 (dump_ada_array_type): Add PARENT parameter. Simplify computation of
7029 element type and deal with an anonymous one.
7030 (dump_ada_template): Use RECORD_OR_UNION_TYPE_P macro.
7031 (dump_generic_ada_node): Tweak. Adjust call to dump_ada_array_type
7032 and remove reference to QUAL_UNION_TYPE.
7033 (dump_nested_types): Make 2 passes on the fields and move bulk to...
7034 (dump_nested_type): ...here. New function extracted from above.
7035 Generate a full declaration for anonymous element type of arrays.
7036 (print_ada_declaration): Really skip anonymous declarations. Remove
7037 references to QUAL_UNION_TYPE. Adjust call to dump_ada_array_type.
7038 Clean up processing of declarations of array types and objects.
7039 (print_ada_struct_decl): Remove reference to QUAL_UNION_TYPE.
7040 Remove obsolete code and tidy up.
7042 2015-11-29 Jan Hubicka <hubicka@ucw.cz>
7045 * c-common.c (handle_transparent_union_attribute): Update
7048 2015-11-27 Martin Liska <mliska@suse.cz>
7051 * array-notation-common.c (cilkplus_extract_an_triplets):
7052 Release vector of vectors.
7053 * cilk.c (gimplify_cilk_spawn): Free allocated memory.
7055 2015-11-26 Eric Botcazou <ebotcazou@adacore.com>
7058 * c-ada-spec.c (dump_nested_types): Add guard for error_mark_node.
7059 (print_ada_struct_decl): Likewise.
7061 2015-11-23 Igor Zamyatin <igor.zamyatin@intel.com>
7064 * c-gimplify.c (c_gimplify_expr): Stop the process if see an error.
7065 * cilk.c (recognize_spawn): Determine location in a more precise
7068 2015-11-19 Jason Merrill <jason@redhat.com>
7070 * c-common.c (shorten_compare): But look through macros from
7073 2015-11-18 Jason Merrill <jason@redhat.com>
7075 * c-common.c (shorten_compare): Don't -Wtype-limits if the
7076 non-constant operand comes from a macro.
7078 2015-11-17 Jason Merrill <jason@redhat.com>
7081 * c-common.c (warn_tautological_cmp): Fold before checking for
7084 2015-11-16 Marek Polacek <polacek@redhat.com>
7087 * c-common.c (check_case_bounds): Fold low and high cases.
7089 2015-11-16 Marek Polacek <polacek@redhat.com>
7091 * c-ada-spec.c (dump_ada_template): Use RECORD_OR_UNION_TYPE_P.
7092 * c-common.c (c_common_get_alias_set): Likewise.
7093 (handle_visibility_attribute): Likewise.
7095 2015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
7097 * c-common.c (handle_simd_attribute): New.
7098 (struct attribute_spec): Add entry for "simd".
7099 (handle_simd_attribute): New.
7101 2015-11-13 Kai Tietz <ktietz70@googlemail.com>
7103 * c-lex.c (interpret_float): Use fold_convert.
7105 2015-11-13 David Malcolm <dmalcolm@redhat.com>
7107 * c-common.c (c_fully_fold_internal): Capture existing souce_range,
7108 and store it on the result.
7109 * c-opts.c (c_common_init_options): Set
7110 global_dc->colorize_source_p.
7112 2015-11-12 James Norris <jnorris@codesourcery.com>
7113 Joseph Myers <joseph@codesourcery.com>
7115 * c-pragma.c (oacc_pragmas): Add entry for declare directive.
7116 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_DECLARE.
7117 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT and
7118 PRAGMA_OACC_CLAUSE_LINK.
7120 2015-11-11 Marek Polacek <polacek@redhat.com>
7124 * c-common.c (valid_array_size_p): New function.
7125 * c-common.h (valid_array_size_p): Declare.
7127 2015-11-11 Dominique d'Humieres <dominiq@lps.ens.fr>
7130 * c-pragma.c (c_register_pragma_1): Update the gcc_assert to 256.
7132 2015-11-11 Andrew MacLeod <amacleod@redhat.com>
7134 * array-notation-common.c: Remove unused header files.
7135 * c-ada-spec.c: Likewise.
7136 * c-cilkplus.c: Likewise.
7137 * c-common.c: Likewise.
7138 * c-cppbuiltin.c: Likewise.
7139 * c-dump.c: Likewise.
7140 * c-format.c: Likewise.
7141 * c-gimplify.c: Likewise.
7142 * c-indentation.c: Likewise.
7143 * c-lex.c: Likewise.
7144 * c-omp.c: Likewise.
7145 * c-opts.c: Likewise.
7146 * c-pch.c: Likewise.
7147 * c-ppoutput.c: Likewise.
7148 * c-pragma.c: Likewise.
7149 * c-pretty-print.c: Likewise.
7150 * c-semantics.c: Likewise.
7151 * c-ubsan.c: Likewise.
7153 * stub-objc.c: Likewise.
7155 2015-11-09 Thomas Schwinge <thomas@codesourcery.com>
7156 Cesar Philippidis <cesar@codesourcery.com>
7157 James Norris <jnorris@codesourcery.com>
7158 Julian Brown <julian@codesourcery.com>
7159 Nathan Sidwell <nathan@codesourcery.com>
7161 * c-pragma.c (oacc_pragmas): Add "routine".
7162 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ROUTINE.
7164 2015-11-08 Eric Botcazou <ebotcazou@adacore.com>
7166 * c-common.c (c_common_attributes): Add scalar_storage_order.
7167 (handle_scalar_storage_order_attribute): New function.
7168 * c-pragma.c (global_sso): New variable.
7169 (maybe_apply_pragma_scalar_storage_order): New function.
7170 (handle_pragma_scalar_storage_order): Likewise.
7171 (init_pragma): Register scalar_storage_order.
7172 * c-pragma.h (maybe_apply_pragma_scalar_storage_order): Declare.
7173 * c.opt (Wscalar-storage-order): New warning.
7174 (fsso-struct=): New option.
7176 2015-11-08 Martin Sebor <msebor@redhat.com>
7178 * c.opt (Wplacement-new): Add a period to the end of a sentence.
7180 2015-11-07 Richard Sandiford <richard.sandiford@arm.com>
7182 * c-common.c: Don't undef DEF_BUILTIN.
7184 2015-11-06 David Malcolm <dmalcolm@redhat.com>
7186 * c-common.c (c_cpp_error): Convert parameter from location_t to
7187 rich_location *. Eliminate the "column_override" parameter and
7188 the call to diagnostic_override_column.
7189 Update the "done_lexing" clause to set range 0
7190 on the rich_location, rather than overwriting a location_t.
7191 * c-common.h (c_cpp_error): Convert parameter from location_t to
7192 rich_location *. Eliminate the "column_override" parameter.
7194 2015-11-05 Cesar Philippidis <cesar@codesourcery.com>
7195 Thomas Schwinge <thomas@codesourcery.com>
7196 James Norris <jnorris@codesourcery.com>
7198 * c-omp.c (c_oacc_split_loop_clauses): Make TILE, GANG, WORKER, VECTOR,
7199 AUTO, SEQ, INDEPENDENT and PRIVATE loop clauses. Associate REDUCTION
7200 clauses with parallel and kernels and loops.
7201 * c-pragma.h (enum pragma_omp_clause): Add entries for
7202 PRAGMA_OACC_CLAUSE_{INDEPENDENT,TILE,DEFAULT}.
7203 * pt.c (tsubst_omp_clauses): Add support for OMP_CLAUSE_{NUM_GANGS,
7204 NUM_WORKERS,VECTOR_LENGTH,GANG,WORKER,VECTOR,ASYNC,WAIT,TILE,AUTO,
7206 (tsubst_expr): Add support for OMP_CLAUSE_{KERNELS,PARALLEL,LOOP}.
7208 2015-11-05 Martin Sebor <msebor@redhat.com>
7211 * c.opt (-Wplacement-new): New option.
7213 2015-11-05 Jakub Jelinek <jakub@redhat.com>
7215 * c-common.h (c_finish_omp_atomic): Add TEST argument.
7216 (c_omp_check_loop_iv, c_omp_check_loop_iv_exprs): New prototypes.
7217 * c-omp.c (c_finish_omp_atomic): Add TEST argument. Don't call
7218 save_expr or create_tmp_var* if TEST is true.
7219 (c_finish_omp_for): Store OMP_FOR_ORIG_DECLS always.
7220 Don't call add_stmt here.
7221 (struct c_omp_check_loop_iv_data): New type.
7222 (c_omp_check_loop_iv_r, c_omp_check_loop_iv,
7223 c_omp_check_loop_iv_exprs): New functions.
7224 (c_omp_split_clauses): Adjust for lastprivate being allowed on
7226 (c_omp_declare_simd_clauses_to_numbers): Change
7227 OMP_CLAUSE_LINEAR_VARIABLE_STRIDE OMP_CLAUSE_LINEAR_STEP into numbers.
7228 (c_omp_declare_simd_clauses_to_decls): Similarly change those
7229 from numbers to PARM_DECLs.
7231 2015-11-04 Mikhail Maltsev <maltsevm@gmail.com>
7233 * c-omp.c (c_omp_split_clauses): Remove conditional compilation. Use
7236 2015-11-03 Bernd Schmidt <bschmidt@redhat.com>
7239 * c-common.h (fold_offsetof_1): Add argument.
7240 * c-common.c (fold_offsetof_1): Diagnose more invalid
7241 offsetof expressions that reference elements past the end of
7244 2015-11-03 Thomas Schwinge <thomas@codesourcery.com>
7245 Chung-Lin Tang <cltang@codesourcery.com>
7247 * c-pragma.c (oacc_pragmas): Add "atomic".
7248 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ATOMIC.
7250 2015-10-30 Evgeny Stupachenko <evstupac@gmail.com>
7252 * c-common.c (handle_target_clones_attribute): New.
7253 (c_common_attribute_table): Add handle_target_clones_attribute.
7254 (handle_always_inline_attribute): Add check on target_clones attribute.
7255 (handle_target_attribute): Ditto.
7257 2015-10-29 Andrew MacLeod <amacleod@redhat.com>
7259 * array-notation-common.c: Reorder #include's and remove duplicates.
7260 * c-ada-spec.c: Likewise.
7261 * c-cilkplus.c: Likewise.
7262 * c-common.c: Likewise.
7263 * c-cppbuiltin.c: Likewise.
7264 * c-dump.c: Likewise.
7265 * c-format.c: Likewise.
7266 * c-gimplify.c: Likewise.
7267 * c-indentation.c: Likewise.
7268 * c-lex.c: Likewise.
7269 * c-omp.c: Likewise.
7270 * c-opts.c: Likewise.
7271 * c-pch.c: Likewise.
7272 * c-ppoutput.c: Likewise.
7273 * c-pragma.c: Likewise.
7274 * c-pretty-print.c: Likewise.
7275 * c-semantics.c: Likewise.
7276 * c-ubsan.c: Likewise.
7278 * stub-objc.c: Likewise.
7280 2015-10-28 Jason Merrill <jason@redhat.com>
7282 * c-common.c (pointer_int_sum): Fold the MULT_EXPR.
7284 2015-10-27 Thomas Schwinge <thomas@codesourcery.com>
7285 James Norris <jnorris@codesourcery.com>
7286 Cesar Philippidis <cesar@codesourcery.com>
7290 * c-common.h (c_oacc_split_loop_clauses): Declare function.
7291 * c-omp.c (c_oacc_split_loop_clauses): New function.
7293 2015-10-21 Martin Sebor <msebor@redhat.com>
7296 * c.opt: End each sentence that describes an option with a period.
7298 2015-10-20 Marek Polacek <polacek@redhat.com>
7300 * array-notation-common.c (is_cilkplus_vector_p): Define.
7301 * c-common.h (is_cilkplus_vector_p): Declare.
7303 2015-10-20 Marek Polacek <polacek@redhat.com>
7305 * c.opt (std=gnu++11): Do not describe as experimental.
7306 (std=gnu++14): Likewise.
7308 2015-10-19 Jason Merrill <jason@redhat.com>
7310 * c-cppbuiltin.c (c_cpp_builtins): Define
7311 __cpp_nontype_template_args.
7313 2015-10-19 Jason Merrill <jason@redhat.com>
7315 * c-cppbuiltin.c (c_cpp_builtins): Define
7316 __cpp_enumerator_attributes, __cpp_fold_expressions,
7317 __cpp_unicode_characters.
7319 2015-10-13 Jakub Jelinek <jakub@redhat.com>
7320 Aldy Hernandez <aldyh@redhat.com>
7322 * c-common.c (enum c_builtin_type): Define DEF_FUNCTION_TYPE_9,
7323 DEF_FUNCTION_TYPE_10 and DEF_FUNCTION_TYPE_11.
7324 (c_define_builtins): Likewise.
7325 * c-common.h (enum c_omp_clause_split): Add
7326 C_OMP_CLAUSE_SPLIT_TASKLOOP.
7327 (c_finish_omp_critical, c_finish_omp_ordered): Add CLAUSES argument.
7328 (c_finish_omp_for): Add ORIG_DECLV argument.
7329 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP as
7330 201511 instead of 201307.
7331 * c-omp.c (c_finish_omp_critical): Add CLAUSES argument, set
7332 OMP_CRITICAL_CLAUSES to it.
7333 (c_finish_omp_ordered): Add CLAUSES argument, set
7334 OMP_ORDERED_CLAUSES to it.
7335 (c_finish_omp_for): Add ORIG_DECLV argument, set OMP_FOR_ORIG_DECLS
7336 to it if OMP_FOR. Clear DECL_INITIAL on the IVs.
7337 (c_omp_split_clauses): Handle OpenMP 4.5 combined/composite
7338 constructs and new OpenMP 4.5 clauses. Clear
7339 OMP_CLAUSE_SCHEDULE_SIMD if not combined with OMP_SIMD. Add
7341 * c-pragma.c (omp_pragmas_simd): Add taskloop.
7342 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKLOOP.
7343 (enum pragma_omp_clause): Add
7344 PRAGMA_OMP_CLAUSE_{DEFAULTMAP,GRAINSIZE,HINT,{IS,USE}_DEVICE_PTR}
7345 and PRAGMA_OMP_CLAUSE_{LINK,NOGROUP,NUM_TASKS,PRIORITY,SIMD,THREADS}.
7347 2015-10-05 Richard Sandiford <richard.sandiford@arm.com>
7349 * c-lex.c (interpret_float): Use real_equal instead of
7352 2015-10-04 Jason Merrill <jason@redhat.com>
7354 Implement N4514, C++ Extensions for Transactional Memory.
7355 * c-common.c (c_common_reswords): Add C++ TM TS keywords.
7356 (c_common_attribute_table): Add transaction_safe_dynamic.
7357 transaction_safe now affects type identity.
7358 (handle_tm_attribute): Handle transaction_safe_dynamic.
7359 * c-common.h (enum rid): Add RID_ATOMIC_NOEXCEPT,
7360 RID_ATOMIC_CANCEL, RID_SYNCHRONIZED.
7361 (OBJC_IS_CXX_KEYWORD): Add RID_SYNCHRONIZED.
7363 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_transactional_memory.
7364 * c-pretty-print.c (pp_c_attributes_display): Don't print
7365 transaction_safe in C++.
7367 2015-10-02 Marek Polacek <polacek@redhat.com>
7369 * c.opt (Wduplicated-cond): Don't enable by -Wall anymore.
7371 2015-10-02 Marek Polacek <polacek@redhat.com>
7374 * c-common.c (warn_duplicated_cond_add_or_warn): New function.
7375 * c-common.h (warn_duplicated_cond_add_or_warn): Declare.
7376 * c.opt (Wduplicated-cond): New option.
7378 2015-10-01 Joseph Myers <joseph@codesourcery.com>
7380 * c.opt (std=c11): Do not describe as experimental.
7381 (std=gnu11): Likewise.
7382 (std=iso9899:2011): Likewise.
7384 2015-09-28 Nathan Sidwell <nathan@codesourcery.com>
7386 * c-common.c (DEF_FUNCTION_TYPE_VAR_6): New.
7387 (DEF_FUNCTION_TYPE_VAR_11): Delete.
7389 2015-09-25 Marek Polacek <polacek@redhat.com>
7391 * c-ubsan.c (ubsan_instrument_division): Remove unnecessary code.
7392 (ubsan_instrument_shift): Likewise.
7394 2015-09-25 Marek Polacek <polacek@redhat.com>
7397 * c-ubsan.c (ubsan_instrument_division): Also pre-evaluate OP1.
7399 2015-09-24 Patrick Palka <ppalka@gcc.gnu.org>
7401 * c-indentation.c (should_warn_for_misleading_indentation):
7402 Compare next_stmt_vis_column with guard_line_first_nws instead
7403 of with guard_line_vis_column.
7405 2015-09-23 Manuel López-Ibáñez <manu@gcc.gnu.org>
7409 * c-pragma.c (handle_pragma_diagnostic): Detect non-warning
7410 options and options not valid for the current language.
7412 2015-09-22 Patrick Palka <ppalka@gcc.gnu.org>
7414 * c-indentation.c (should_warn_for_misleading_indentation):
7415 Float out and consolidate the calls to get_visual_column that
7416 are passed guard_exploc as an argument. Compare
7417 next_stmt_vis_column with guard_line_first_nws instead of with
7418 body_line_first_nws.
7420 2015-09-22 Nathan Sidwell <nathan@codesourcery.com>
7422 * c.opt (Wmultiple-inheritance, Wvirtual-inheritance, Wtemplates,
7423 Wnamespaces): New C++ warnings.
7425 2015-09-22 Jason Merrill <jason@redhat.com>
7427 * c-common.h (abi_compat_version_crosses): New.
7428 (warn_abi_version): Declare.
7429 * c-common.c: Define it.
7430 * c-opts.c (c_common_post_options): Handle it.
7431 flag_abi_compat_version defaults to 8.
7433 2015-09-21 Ville Voutilainen <ville.voutilainen@gmail.com>
7435 Complete the implementation of N4230, Nested namespace definition.
7436 * c-cppbuiltin.c: Add __cpp_namespace_attributes and
7437 __cpp_nested_namespace_definitions.
7439 2015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
7441 * c-pragma.c (handle_pragma_diagnostic): Fix wrong return.
7443 2015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
7445 * c-pragma.c (handle_pragma_diagnostic): Use explicit location
7447 * c-pragma.h (pragma_lex): Add optional loc argument.
7449 2015-09-16 Mikhail Maltsev <maltsevm@gmail.com>
7451 * c-format.c (check_format_arg): Adjust to use common block size in all
7454 2015-09-15 David Malcolm <dmalcolm@redhat.com>
7456 * c-format.c (location_from_offset): Update for change in
7457 signature of location_get_source_line.
7458 * c-indentation.c (get_visual_column): Likewise.
7459 (line_contains_hash_if): Likewise.
7461 2015-09-14 Marek Polacek <polacek@redhat.com>
7463 * c-opts.c (c_common_post_options): Set C++ standard earlier, before
7464 setting various warnings.
7466 2015-09-14 Marek Polacek <polacek@redhat.com>
7468 * c-common.c (warn_for_sign_compare): Cast to unsigned when shifting
7471 2015-09-11 Mark Wielaard <mjw@redhat.com>
7474 * c.opt (Wunused-variable): Option from common.opt.
7475 (Wunused-const-variable): New option.
7477 2015-09-09 Paolo Carlini <paolo.carlini@oracle.com>
7480 * c.opt ([Wsubobject-linkage]): Add.
7482 2015-09-03 Martin Sebor <msebor@redhat.com>
7485 * c-common.h (c_decl_implicit, reject_gcc_builtin): Declare new
7487 * c-common.c (reject_gcc_builtin): Define.
7489 2015-09-02 Balaji V. Iyer <balaji.v.iyer@intel.com>
7492 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): New
7494 * c-gimplify.c (c_gimplify_expr): Added a call to the function
7495 cilk_gimplify_call_params_in_spawned_fn.
7496 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): New function.
7497 (gimplify_cilk_spawn): Removed EXPR_STMT and CLEANUP_POINT_EXPR
7500 2015-08-25 Marek Polacek <polacek@redhat.com>
7503 * c-common.c (handle_weak_attribute): Don't check whether the
7504 visibility can be changed here.
7506 2015-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
7508 * c-lex.c (c_lex_with_flags): Use explicit locations.
7510 2015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
7512 * c-ada-spec.h, c-common.c, c-common.h, c-format.c, c-format.h,
7513 c-objc.h, c-ppoutput.c, c-pragma.c, c-pragma.h: Remove useless
7515 2015-08-18 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
7518 * c-common.c (check_builtin_function_arguments): Add check
7519 for BUILT_IN_SIGNBIT argument.
7521 2015-08-18 Paolo Carlini <paolo.carlini@oracle.com>
7524 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_static_assert value
7527 2015-08-17 Marek Polacek <polacek@redhat.com>
7529 * c-pretty-print.c (pp_c_cv_qualifiers): Remove code dealing
7530 with whitespaces before qualifier names.
7532 2015-08-12 Marek Polacek <polacek@redhat.com>
7535 * c-common.c (maybe_warn_shift_overflow): Properly handle
7536 left-shifting 1 into the sign bit.
7538 2015-08-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
7540 * c.opt (Wchkp): Use LangEnabledBy instead of EnabledBy.
7542 2015-08-06 Andrew Sutton <andrew.n.sutton@gmail.com>
7543 Braden Obrzut <admin@maniacsvault.net>
7544 Jason Merrill <jason@redhat.com>
7546 Add C++ Concepts TS support.
7547 * c-common.c (c_common_reswords): Add __is_same_as, concept, requires.
7548 * c-common.h (enum rid): Add RID_IS_SAME_AS, RID_CONCEPT, RID_REQUIRES.
7549 (D_CXX_CONCEPTS, D_CXX_CONCEPTS_FLAGS): New.
7550 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_concepts.
7551 * c-opts.c (set_std_cxx1z): Set flag_concepts.
7552 * c.opt (fconcepts): New.
7554 2015-08-02 Martin Sebor <msebor@redhat.com>
7556 * c.opt (-Wframe-address): New warning option.
7558 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
7560 * c-indentation.c (should_warn_for_misleading_indentation):
7563 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
7565 * c-indentation.c (get_visual_column): Add parameter first_nws,
7566 use it. Update comment documenting the function.
7567 (is_first_nonwhitespace_on_line): Remove.
7568 (should_warn_for_misleading_indentation): Replace usage of
7569 of is_first_nonwhitespace_on_line with get_visual_column.
7571 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
7573 * c-indentation.h (struct token_indent_info): Define.
7574 (get_token_indent_info): Define.
7575 (warn_for_misleading_information): Declare.
7576 * c-common.h (warn_for_misleading_information): Remove.
7577 * c-identation.c (warn_for_misleading_indentation):
7578 Change declaration to take three token_indent_infos. Adjust
7580 * c-identation.c (should_warn_for_misleading_indentation):
7581 Likewise. Bail out early if the body is a compound statement.
7582 (guard_tinfo_to_string): Define.
7584 2015-07-30 Jason Merrill <jason@redhat.com>
7586 * c-pretty-print.c (unary_expression) [INDIRECT_REF]: Don't print
7587 '*' for reference decay.
7589 2015-07-30 Marek Polacek <polacek@redhat.com>
7591 * c-common.c (warn_tautological_cmp): Bail for float types.
7593 2015-07-27 Marek Polacek <polacek@redhat.com>
7596 * c-common.c (warn_tautological_cmp): Don't warn for macro expansion.
7598 2015-07-27 Marek Polacek <polacek@redhat.com>
7602 * c-common.c (find_array_ref_with_const_idx_r): New function.
7603 (warn_tautological_cmp): New function.
7604 * c-common.h (warn_tautological_cmp): Declare.
7605 * c.opt (Wtautological-compare): New option.
7607 2015-07-23 Marek Polacek <polacek@redhat.com>
7609 * c-ubsan.c (ubsan_instrument_division): Use unshare_expr throughout.
7610 (ubsan_instrument_shift): Likewise.
7612 2015-07-23 Marek Polacek <polacek@redhat.com>
7615 * c-ubsan.c: Include gimplify.h.
7616 (ubsan_instrument_division): Unshare OP0 and OP1.
7617 (ubsan_instrument_shift): Likewise.
7619 2015-07-20 Marek Polacek <polacek@redhat.com>
7620 Richard Sandiford <richard.sandiford@arm.com>
7623 * c-common.c (c_fully_fold_internal): Warn about left shift overflows.
7624 Use EXPR_LOC_OR_LOC.
7625 (maybe_warn_shift_overflow): New function.
7626 * c-common.h (maybe_warn_shift_overflow): Declare.
7627 * c-opts.c (c_common_post_options): Set warn_shift_overflow.
7628 * c.opt (Wshift-overflow): New option.
7630 2015-07-16 Martin Liska <mliska@suse.cz>
7632 * c-format.c (static void check_format_info_main): Use
7633 object_allocator instead of pool_allocator.
7634 (check_format_arg): Likewise.
7635 (check_format_info_main): Likewise.
7637 2015-07-15 Andrew MacLeod <amacleod@redhat.com>
7639 * c-opts.c: Remove multiline #include comment.
7641 2015-07-12 Aldy Hernandez <aldyh@redhat.com>
7643 * c-common.c: Fix double word typos.
7645 2015-07-10 Eric Botcazou <ebotcazou@adacore.com>
7647 * c-ada-spec.h (cpp_operation): Revert latest change.
7648 * c-ada-spec.c (print_ada_declaration): Likewise. Skip implicit
7649 constructors and destructors.
7651 2015-07-09 Andrew MacLeod <amacleod@redhat.com>
7653 * c-common.h: Adjust includes for flags.h changes.
7654 * stub-objc.c: Likewise.
7656 2015-07-08 Eric Botcazou <ebotcazou@adacore.com>
7658 * c-ada-spec.h (cpp_operation): Add IS_CONSTEXPR.
7659 * c-ada-spec.c (print_ada_declaration): Skip constexpr constructors.
7661 2015-07-08 Jakub Jelinek <jakub@redhat.com>
7663 * c-omp.c (c_omp_declare_simd_clauses_to_numbers): If all clauses
7664 are to be removed, return NULL rather than original clauses list.
7666 2015-07-07 Andrew MacLeod <amacleod@redhat.com>
7668 * array-notation-common.c: Adjust includes.
7669 * c-ada-spec.c: Likewise.
7670 * c-cilkplus.c: Likewise.
7671 * c-common.h: Likewise.
7672 * c-cppbuiltin.c: Likewise.
7673 * c-dump.c: Likewise.
7674 * c-format.c: Likewise.
7675 * c-gimplify.c: Likewise.
7676 * c-indentation.c: Likewise.
7677 * c-lex.c: Likewise.
7678 * c-omp.c: Likewise.
7679 * c-opts.c: Likewise.
7680 * c-pch.c: Likewise.
7681 * c-ppoutput.c: Likewise.
7682 * c-pragma.c: Likewise.
7683 * c-pretty-print.c: Likewise.
7684 * c-semantics.c: Likewise.
7685 * c-ubsan.c: Likewise.
7687 * stub-objc.c: Likewise.
7689 2015-07-07 Eric Botcazou <ebotcazou@adacore.com>
7691 * c-ada-spec.h (cpp_operation): Add IS_MOVE_CONSTRUCTOR.
7692 * c-ada-spec.c (print_ada_declaration): Skip move constructors.
7694 2015-07-01 Jason Merrill <jason@redhat.com>
7696 * c-common.h (D_CXX11): Rename from D_CXX0X.
7697 (RID_FIRST_CXX11, RID_LAST_CXX11): Rename from *_CXX0X.
7698 * c-common.c: Adjust.
7700 * c-opts.c (c_common_post_options): Default to C++14.
7702 * c-opts.c (c_common_post_options): Highest ABI level is now 10.
7704 2015-06-30 Edward Smith-Rowland <3dw4rd@verizon.net>
7706 Implement N4197 - Adding u8 character literals
7707 * c-ada-spec.c (print_ada_macros): Treat CPP_UTF8CHAR like
7709 * c-common.c (c_parse_error): Print CPP_UTF8CHAR and
7710 CPP_UTF8CHAR_USERDEF tokens.
7711 * c-lex.c (c_lex_with_flags): Treat CPP_UTF8CHAR_USERDEF
7712 and CPP_UTF8CHAR tokens.
7713 (lex_charconst): Treat CPP_UTF8CHAR token.
7715 2015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
7718 * c-common.c (do_warn_unused_parameter): Move here.
7719 * c-common.h (do_warn_unused_parameter): Declare.
7721 2015-06-29 Marek Polacek <polacek@redhat.com>
7724 * c-common.c (check_case_bounds): Add bool * parameter. Set
7726 (c_add_case_label): Add bool * parameter. Pass it down to
7728 (c_do_switch_warnings): Add bool parameters. Implement -Wswitch-bool
7730 * c-common.h (c_add_case_label, c_do_switch_warnings): Update
7733 2015-06-27 Marek Polacek <polacek@redhat.com>
7735 * c-common.c (check_main_parameter_types): Use VECTOR_TYPE_P
7736 or VECTOR_INTEGER_TYPE_P throughout.
7737 * c-gimplify.c: Likewise.
7739 2015-06-26 Marek Polacek <polacek@redhat.com>
7741 * array-notation-common.c (find_rank): Use INDIRECT_REF_P.
7742 * c-common.c (c_fully_fold_internal): Likewise.
7743 (c_alignof_expr): Likewise.
7744 * c-pretty-print.c (c_pretty_printer::postfix_expression): Likewise.
7745 * c-ubsan.c (ubsan_instrument_bounds): Likewise.
7746 * cilk.c (create_parm_list): Likewise.
7748 2015-06-26 Marek Polacek <polacek@redhat.com>
7750 * c-common.c (handle_unused_attribute): Use VAR_OR_FUNCTION_DECL_P.
7752 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
7754 * c-common.c: Remove ipa-ref.h and plugin-api.h from include list.
7755 * c-gimplify.c: Likewise.
7756 * c-pragma.c: Likewise.
7757 * c-ubsan.c: Likewise.
7760 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
7762 * c-common.c (c_type_hasher): Inherit from ggc_ptr_hash rather than
7765 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
7767 * cilk.c: Move calls.h after tm.h in the include chain.
7769 2015-06-25 Marek Polacek <polacek@redhat.com>
7771 * array-notation-common.c: Use VAR_P throughout.
7772 * c-ada-spec.c: Likewise.
7773 * c-common.c: Likewise.
7774 * c-format.c: Likewise.
7775 * c-gimplify.c: Likewise.
7776 * c-omp.c: Likewise.
7777 * c-pragma.c: Likewise.
7778 * c-pretty-print.c: Likewise.
7781 2015-06-25 Marek Polacek <polacek@redhat.com>
7783 * cilk.c (extract_free_variables): Use is_global_var.
7785 2015-06-23 Richard Sandiford <richard.sandiford@arm.com>
7787 * c-common.c: Don't include target-def.h.
7789 2015-06-23 Marek Polacek <polacek@redhat.com>
7791 * c-common.c (warn_logical_operator): Use tree_int_cst_equal
7792 when comparing INTEGER_CSTs.
7794 2015-06-22 Pierre-Marie de Rodat <derodat@adacore.com>
7796 * c-ada-spec.h (cpp_operation): Add HAS_DEPENDENT_TEMPLATE_ARGS.
7797 * c-ada-spec.c (collect_ada_nodes): Skip NAMESPACE_DECL
7798 (dump_ada_template): Skip partially specialized types.
7800 2015-06-22 Mikhail Maltsev <maltsevm@gmail.com>
7802 * c-common.c (scalar_to_vector): Use std::swap instead of manually
7805 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
7807 * array-notation-common.c: Do not include input.h, line-map.h or is-a.h.
7808 * c-ada-spec.c: Likewise.
7809 * c-cilkplus.c: Likewise.
7810 * c-common.c: Likewise.
7811 * c-common.h: Likewise.
7812 * c-cppbuiltin.c: Likewise.
7813 * c-dump.c: Likewise.
7814 * c-format.c: Likewise.
7815 * c-gimplify.c: Likewise.
7816 * c-indentation.c: Likewise.
7817 * c-lex.c: Likewise.
7818 * c-omp.c: Likewise.
7819 * c-opts.c: Likewise.
7820 * c-pch.c: Likewise.
7821 * c-ppoutput.c: Likewise.
7822 * c-pragma.c: Likewise.
7823 * c-pretty-print.c: Likewise.
7824 * c-semantics.c: Likewise.
7825 * c-ubsan.c: Likewise.
7827 * stub-objc.c: Likewise.
7829 2015-06-13 Patrick Palka <ppalka@gcc.gnu.org>
7832 * c-common.c (c_common_truthvalue_conversion): Warn when
7833 converting an address of a reference to a truth value.
7835 2015-06-08 Andrew MacLeod <amacleod@redhat.com>
7837 * array-notation-common.c : Adjust include files.
7838 * c-ada-spec.c : Likewise.
7839 * c-cilkplus.c : Likewise.
7840 * c-common.c : Likewise.
7841 * c-common.h : Likewise.
7842 * c-cppbuiltin.c : Likewise.
7843 * c-dump.c : Likewise.
7844 * c-format.c : Likewise.
7845 * c-gimplify.c : Likewise.
7846 * c-indentation.c : Likewise.
7847 * c-lex.c : Likewise.
7848 * c-omp.c : Likewise.
7849 * c-opts.c : Likewise.
7850 * c-pch.c : Likewise.
7851 * c-ppoutput.c : Likewise.
7852 * c-pragma.c : Likewise.
7853 * c-pretty-print.c : Likewise.
7854 * c-semantics.c : Likewise.
7855 * c-ubsan.c : Likewise.
7856 * cilk.c : Likewise.
7857 * stub-objc.c : Likewise.
7859 2015-06-08 Marek Polacek <polacek@redhat.com>
7862 * c-format.c (location_from_offset): Return LOC if LINE is null.
7864 2015-06-05 Aldy Hernandez <aldyh@redhat.com>
7866 * c-common.h (c_parse_final_cleanups): New prototype.
7867 * c-opts.c (c_common_parse_file): Call c_parse_final_cleanups.
7869 2015-06-04 Sriraman Tallam <tmsriram@google.com>
7871 * c-common.c (noplt): New attribute.
7872 (handle_noplt_attribute): New handler.
7874 2015-06-04 Andrew MacLeod <amacleod@redhat.com>
7876 * array-notation-common.c: Adjust includes for restructured coretypes.h.
7877 * c-ada-spec.c: Likewise.
7878 * c-cilkplus.c: Likewise.
7879 * c-common.c: Likewise.
7880 * c-common.h: Likewise.
7881 * c-cppbuiltin.c: Likewise.
7882 * c-dump.c: Likewise.
7883 * c-format.c: Likewise.
7884 * c-gimplify.c: Likewise.
7885 * c-indentation.c: Likewise.
7886 * c-lex.c: Likewise.
7887 * c-omp.c: Likewise.
7888 * c-opts.c: Likewise.
7889 * c-pch.c: Likewise.
7890 * c-ppoutput.c: Likewise.
7891 * c-pragma.c: Likewise.
7892 * c-pretty-print.c: Likewise.
7893 * c-semantics.c: Likewise.
7894 * c-ubsan.c: Likewise.
7896 * stub-objc.c: Likewise.
7898 2015-06-02 David Malcolm <dmalcolm@redhat.com>
7901 * c-indentation.c (should_warn_for_misleading_indentation): Use
7902 expand_location rather than expand_location_to_spelling_point.
7903 Don't warn if the guarding statement is more indented than the
7906 2015-06-02 David Malcolm <dmalcolm@redhat.com>
7908 * c-indentation.c (warn_for_misleading_indentation): Bail out
7909 immediately if -Wmisleading-indentation isn't enabled.
7911 2015-06-01 Martin Liska <mliska@suse.cz>
7913 * c-format.c (check_format_arg):Use new type-based pool allocator.
7914 (check_format_info_main) Likewise.
7916 2015-05-31 Eric Botcazou <ebotcazou@adacore.com>
7918 * c-ada-spec.c (is_tagged_type): Test for TYPE_METHODS on main variant.
7919 (has_nontrivial_methods): Likewise.
7921 2015-05-25 Marek Polacek <polacek@redhat.com>
7923 * c-ubsan.c (ubsan_instrument_shift): Use type0.
7925 2015-05-22 Marek Polacek <polacek@redhat.com>
7928 * c-common.c (handle_deprecated_attribute): Allow CONST_DECL.
7930 2015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
7932 * c-cppbuiltin.c (c_cpp_builtins): Use if instead of #if with
7933 STACK_GROWS_DOWNWARD.
7935 2015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
7937 * c-cppbuiltin.c (c_cpp_builtins): Check the value of
7938 STACK_GROWS_DOWNWARD rather than if it is defined.
7940 2015-05-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
7943 * c-format.c (location_column_from_byte_offset): New.
7944 (location_from_offset): New.
7945 (struct format_wanted_type): Add offset_loc field.
7946 (check_format_info): Move handling of location for extra arguments
7947 closer to the point of warning.
7948 (check_format_info_main): Pass the result of location_from_offset
7950 (format_type_warning): Pass the result of location_from_offset
7953 2015-05-20 Marek Polacek <polacek@redhat.com>
7955 * c-omp.c (check_omp_for_incr_expr): Use BINARY_CLASS_P.
7957 2015-05-20 Marek Polacek <polacek@redhat.com>
7959 * c-ada-spec.c (dump_sloc): Use DECL_P.
7961 2015-05-20 Marek Polacek <polacek@redhat.com>
7963 * c-pragma.c: Use VAR_OR_FUNCTION_DECL_P throughout.
7964 * c-common.c: Likewise.
7966 2015-05-19 David Malcolm <dmalcolm@redhat.com>
7968 * c-common.h (fe_file_change): Strengthen param from
7969 const line_map * to const line_map_ordinary *.
7970 (pp_file_change): Likewise.
7971 * c-lex.c (fe_file_change): Likewise.
7972 (cb_define): Use linemap_check_ordinary when invoking
7974 (cb_undef): Likewise.
7975 * c-opts.c (c_finish_options): Use linemap_check_ordinary when
7976 invoking cb_file_change.
7977 (c_finish_options): Likewise.
7978 (push_command_line_include): Likewise.
7979 (cb_file_change): Strengthen param "new_map" from
7980 const line_map * to const line_map_ordinary *.
7981 * c-ppoutput.c (cb_define): Likewise for local "map".
7982 (pp_file_change): Likewise for param "map" and local "from".
7984 2015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
7986 * c-common.c (shorten_compare): Use std::swap instead of explicit swaps.
7988 2015-05-18 Tom de Vries <tom@codesourcery.com>
7990 * c-common.c (build_va_arg_1): New function.
7991 (build_va_arg): Add address operator to va_list operand if necessary.
7993 2015-05-15 Mikhail Maltsev <maltsevm@gmail.com>
7996 * c-common.c (int_safely_convertible_to_real_p): Define.
7997 (unsafe_conversion_p): Check conversions involving complex types.
7998 (conversion_warning): Add new warning message for conversions which
7999 discard imaginary component.
8000 * c-common.h: (enum conversion_safety): Add new enumerator for such
8003 2015-05-14 Marek Polacek <polacek@redhat.com>
8007 * c-common.c (c_fully_fold): Pass false down to c_fully_fold_internal.
8008 (c_fully_fold_internal): Fold C_MAYBE_CONST_EXPRs with
8009 C_MAYBE_CONST_EXPR_INT_OPERANDS set. Add FOR_INT_CONST argument and
8010 use it. If FOR_INT_CONST, require that all evaluated operands be
8013 2015-05-12 David Malcolm <dmalcolm@redhat.com>
8015 * c-common.h (warn_for_misleading_indentation): New prototype.
8016 * c-indentation.c: New file.
8017 * c.opt (Wmisleading-indentation): New option.
8019 2015-05-12 Tom de Vries <tom@codesourcery.com>
8021 PR tree-optimization/66010
8022 * c-common.c (build_va_arg): Don't mark ap addressable unless necessary.
8024 2015-05-09 Jason Merrill <jason@redhat.com>
8026 * c-opts.c (c_common_post_options): Also clear
8027 cpp_opts->cpp_warn_cxx11_compat.
8029 * c-common.h (enum cxx_dialect): Add cxx_unset.
8030 * c-common.c (cxx_dialect): Initialize to cxx_unset.
8031 * c-opts.c (c_common_post_options): Set C++ dialect to C++98 if unset.
8033 * c.opt (std=c++14): Remove Undocumented flag and experimental warning.
8034 (std=gnu++0x): Mark as Undocumented.
8035 (std=gnu++1y): Add deprecated message.
8037 2015-05-08 Jason Merrill <jason@redhat.com>
8039 * c.opt (Wc++11-compat): Make primary. Rename var warn_cxx11_compat.
8042 * c.opt (Wc++0x-compat): Also set cpp_warn_cxx11_compat.
8044 2015-05-08 Marek Polacek <polacek@redhat.com>
8047 * c.opt (Woverride-init-side-effects): New option.
8049 2015-05-07 Marek Polacek <polacek@redhat.com>
8052 * c-common.c (c_fully_fold_internal): Warn when left shifting a
8054 * c.opt (Wshift-negative-value): New option.
8055 * c-opts.c (c_common_post_options): Set warn_shift_negative_value
8056 when -Wextra and C99/C++11 mode.
8058 2015-05-07 Marek Polacek <polacek@redhat.com>
8059 Martin Uecker <uecker@eecs.berkeley.edu>
8061 * c-ubsan.c (ubsan_instrument_bounds): Don't skip instrumenting
8062 flexible member array-like members if SANITIZE_BOUNDS_STRICT.
8064 2015-05-05 Jason Merrill <jason@redhat.com>
8066 * c.opt (Wterminate): New.
8068 2015-04-30 Marek Polacek <polacek@redhat.com>
8070 * c-common.c (maybe_warn_bool_compare): When comparing with 0/1,
8071 require that the non-constant be of a boolean type.
8073 2015-04-29 Josh Triplett <josh@joshtriplett.org>
8075 * c-common.c (handle_section_attribute): Refactor to reduce
8076 nesting and distinguish between error cases.
8078 2015-04-29 Marek Polacek <polacek@redhat.com>
8081 * c-common.c (maybe_warn_bool_compare): Warn when comparing a boolean
8084 2015-04-29 Jakub Jelinek <jakub@redhat.com>
8086 * c-common.h (omp_clause_mask): Unconditionally define as a class.
8087 Use uint64_t instead of unsigned HOST_WIDE_INT and 64 instead of
8088 HOST_BITS_PER_WIDE_INT.
8090 2015-04-28 Tom de Vries <tom@codesourcery.com>
8092 PR tree-optimization/65887
8093 * c-common.c (build_va_arg): Mark va_arg ap argument as addressable.
8095 2015-04-28 Eric Botcazou <ebotcazou@adacore.com>
8096 Pierre-Marie de Rodat <derodat@adacore.com>
8098 * c-ada-spec.c (in_function): Delete.
8099 (dump_generic_ada_node): Do not change in_function and remove the
8100 redundant code dealing with it.
8101 (print_ada_declaration): Do not change in_function. Use INDENT_INCR.
8102 (print_ada_methods): Output the static member functions in a nested
8103 package after the regular methods as well as associated renamings.
8105 2015-04-24 Marek Polacek <polacek@redhat.com>
8108 * c-common.c (c_fully_fold_internal): Use OPT_Wshift_count_negative
8109 and OPT_Wshift_count_overflow.
8112 * c-common.c (warn_logical_operator): Warn if the operands have the
8115 2015-04-24 Marek Polacek <polacek@redhat.com>
8118 * c-common.c (warn_logical_operator): Bail if either operand comes
8119 from a macro expansion.
8121 2015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
8124 * c-common.c (c_default_pointer_mode): Add definition.
8125 * c-common.h (c_default_pointer_mode): Add declaration.
8127 2015-03-11 Jakub Jelinek <jakub@redhat.com>
8129 * c-common.c (c_common_nodes_and_builtins): Don't call xstrdup
8130 on record_builtin_type argument.
8132 2015-03-10 Jakub Jelinek <jakub@redhat.com>
8135 * c-common.c (warn_logical_not_parentheses): Don't warn for
8138 2015-03-07 Marek Polacek <polacek@redhat.com>
8141 * c-ubsan.c (ubsan_instrument_bounds): Check for COMPONENT_REF
8142 before trying to figure out whether we have a flexible array member.
8144 2015-03-06 Eric Botcazou <ebotcazou@adacore.com>
8145 Jonathan Wakely <jwakely.gcc@gmail.com>
8147 * c-ada-spec.c (dump_ada_double_name): Fix pasto.
8149 2015-03-05 Eric Botcazou <ebotcazou@adacore.com>
8152 * c-ada-spec.c (print_destructor): Remove obsolete code.
8154 2015-03-01 Eric Botcazou <ebotcazou@adacore.com>
8156 * c-ada-spec.c (is_tagged_type): Add guard for DECL_VINDEX.
8157 (dump_template_types): Adjust DECL_TEMPLATE_INSTANTIATIONS and
8158 DECL_TEMPLATE_RESULT emulations.
8159 (dump_ada_template)): Add guard for TYPE_METHODS.
8161 2015-02-27 Marek Polacek <polacek@redhat.com>
8164 * c.opt (Wformat-signedness): Don't enable by -Wformat=2.
8166 2015-02-27 Kai Tietz <ktietz@redhat.com>
8169 * c-pragma.c (handle_pragma_weak): Do not try to create
8170 weak/alias of declarations not being function, or variable
8173 2015-02-24 Thomas Schwinge <thomas@codesourcery.com>
8176 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
8178 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
8180 2015-02-16 Marek Polacek <polacek@redhat.com>
8183 * c-format.c (check_format_types): Handle null param.
8185 2015-02-13 Marek Polacek <polacek@redhat.com>
8188 * c-format.c (check_format_types): Don't warn about different
8189 signedness if the original value is in the range of WANTED_TYPE.
8191 2015-02-12 Jason Merrill <jason@redhat.com>
8194 * c-opts.c (c_common_post_options): Change flag_abi_version from 0
8195 to the current highest version.
8196 * c-cppbuiltin.c (c_cpp_builtins): Assert that it isn't 0.
8198 2015-02-04 Jakub Jelinek <jakub@redhat.com>
8202 * c-omp.c (c_finish_omp_atomic): Use TRUNC_DIV_EXPR
8203 instead of RDIV_EXPR. Use build_binary_op instead of
8206 2015-01-30 Joseph Myers <joseph@codesourcery.com>
8208 * c-opts.c, c-pch.c, cppspec.c: All callers of fatal_error changed
8209 to pass input_location as first argument.
8211 2015-01-23 Tom de Vries <tom@codesourcery.com>
8214 * c.opt (fopenacc): Mark as LTO option.
8216 2015-01-23 Tom de Vries <tom@codesourcery.com>
8219 * c.opt (fopenmp): Mark as LTO option.
8221 2015-01-21 Jakub Jelinek <jakub@redhat.com>
8224 * cilk.c (fill_decls_vec): Only put decls into vector v.
8225 (compare_decls): Fix up formatting.
8227 2015-01-21 Igor Zamyatin <igor.zamyatin@intel.com>
8230 * cilk.c: Include vec.h.
8231 (struct cilk_decls): New structure.
8232 (wrapper_parm_cb): Split this function to...
8233 (fill_decls_vec): ...this...
8234 (create_parm_list): ...and this.
8235 (compare_decls): New function.
8236 (for_local_cb): Remove.
8237 (wrapper_local_cb): Ditto.
8238 (build_wrapper_type): For now first traverse and fill vector of
8239 declarations then sort it and then deal with sorted vector.
8240 (cilk_outline): Ditto.
8241 (declare_one_free_variable): Ditto.
8243 2015-01-21 Jason Merrill <jason@redhat.com>
8246 * c-format.c (check_format_arg): Call decl_constant_value.
8248 2015-01-19 Martin Liska <mliska@suse.cz>
8250 * c-common.c (handle_noicf_attribute): New function.
8252 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
8253 Bernd Schmidt <bernds@codesourcery.com>
8254 James Norris <jnorris@codesourcery.com>
8255 Cesar Philippidis <cesar@codesourcery.com>
8256 Ilmir Usmanov <i.usmanov@samsung.com>
8257 Jakub Jelinek <jakub@redhat.com>
8259 * c.opt (fopenacc): New option.
8260 * c-cppbuiltin.c (c_cpp_builtins): Conditionally define _OPENACC.
8261 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
8263 * c-common.h (c_finish_oacc_wait): New prototype.
8264 * c-omp.c: Include "omp-low.h" and "gomp-constants.h".
8265 (c_finish_oacc_wait): New function.
8266 * c-pragma.c (oacc_pragmas): New variable.
8267 (c_pp_lookup_pragma, init_pragma): Handle it.
8268 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_CACHE,
8269 PRAGMA_OACC_DATA, PRAGMA_OACC_ENTER_DATA, PRAGMA_OACC_EXIT_DATA,
8270 PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP, PRAGMA_OACC_PARALLEL,
8271 PRAGMA_OACC_UPDATE, PRAGMA_OACC_WAIT.
8272 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ASYNC,
8273 PRAGMA_OACC_CLAUSE_AUTO, PRAGMA_OACC_CLAUSE_COLLAPSE,
8274 PRAGMA_OACC_CLAUSE_COPY, PRAGMA_OACC_CLAUSE_COPYIN,
8275 PRAGMA_OACC_CLAUSE_COPYOUT, PRAGMA_OACC_CLAUSE_CREATE,
8276 PRAGMA_OACC_CLAUSE_DELETE, PRAGMA_OACC_CLAUSE_DEVICE,
8277 PRAGMA_OACC_CLAUSE_DEVICEPTR, PRAGMA_OACC_CLAUSE_FIRSTPRIVATE,
8278 PRAGMA_OACC_CLAUSE_GANG, PRAGMA_OACC_CLAUSE_HOST,
8279 PRAGMA_OACC_CLAUSE_IF, PRAGMA_OACC_CLAUSE_NUM_GANGS,
8280 PRAGMA_OACC_CLAUSE_NUM_WORKERS, PRAGMA_OACC_CLAUSE_PRESENT,
8281 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPY,
8282 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYIN,
8283 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYOUT,
8284 PRAGMA_OACC_CLAUSE_PRESENT_OR_CREATE, PRAGMA_OACC_CLAUSE_PRIVATE,
8285 PRAGMA_OACC_CLAUSE_REDUCTION, PRAGMA_OACC_CLAUSE_SELF,
8286 PRAGMA_OACC_CLAUSE_SEQ, PRAGMA_OACC_CLAUSE_VECTOR,
8287 PRAGMA_OACC_CLAUSE_VECTOR_LENGTH, PRAGMA_OACC_CLAUSE_WAIT,
8288 PRAGMA_OACC_CLAUSE_WORKER.
8290 2015-01-14 Marcos Diaz <marcos.diaz@tallertechnologies.com>
8292 * c-cppbuiltin.c (c_cpp_builtins): New cpp define __SSP_EXPLICIT__
8293 for the new option fstack-protector_explicit.
8294 * c-common.c (c_common_attribute_table): Add stack_protect attribute.
8295 (handle_stack_protect_attribute): New function.
8297 2015-01-13 Martin Uecker <uecker@eecs.berkeley.edu>
8299 * c.opt: New option -Warray-bounds=.
8301 2015-01-09 Michael Collison <michael.collison@linaro.org>
8303 * array-notation-common.c: Include hash-set.h, machmode.h,
8304 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
8305 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
8306 * c-ada-spec.c: Ditto.
8307 * c-cilkplus.c: Ditto.
8308 * c-common.c: Include input.h due to flattening of tree.h.
8309 Define macro GCC_C_COMMON_C.
8310 * c-common.h: Flatten tree.h header files into c-common.h.
8311 Remove include of tree-core.h.
8312 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
8313 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
8314 fold-const.h, wide-int.h, and inchash.h due to
8315 flattening of tree.h.
8317 * c-format.c: Flatten tree.h header files into c-common.h.
8318 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
8319 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
8320 fold-const.h, wide-int.h, and inchash.h due to
8321 flattening of tree.h.
8322 * c-dump.c: Include hash-set.h, machmode.h,
8323 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
8324 fold-const.h, wide-int.h, and inchash.h due to
8325 flattening of tree.h.
8326 * c-format.c: Include hash-set.h, machmode.h,
8327 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
8328 fold-const.h, wide-int.h, inchash.h and real.h due to
8329 flattening of tree.h.
8330 * c-gimplify.c: Include hash-set.h, machmode.h,
8331 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
8332 fold-const.h, wide-int.h, and inchash.h due to
8333 flattening of tree.h.
8339 * c-ppoutput.c: Ditto.
8340 * c-pragma.c: Ditto.
8341 * c-pretty-print.c: Ditto.
8342 * c-semantics.c: Ditto.
8344 * stub-objc.c: Ditto.
8346 2015-01-08 Jason Merrill <jason@redhat.com>
8348 * c-ubsan.c (ubsan_maybe_instrument_array_ref): Use
8349 do_ubsan_in_current_function.
8350 (ubsan_maybe_instrument_reference_or_call): Likewise.
8351 * c-ubsan.h: Declare it.
8353 2015-01-08 Mike Stump <mikestump@comcast.net>
8355 * c-common.c (c_common_attribute_table): Add no_sanitize_thread.
8357 2015-01-07 Marek Polacek <polacek@redhat.com>
8360 * c-common.c (c_fully_fold_internal): Warn for division and modulo
8361 if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST and is zero.
8363 2015-01-05 Trevor Saunders <tsaunders@mozilla.com>
8366 * c.opt (Wsuggest-override): New option.
8368 2015-01-05 Jakub Jelinek <jakub@redhat.com>
8370 Update copyright years.
8372 2015-01-05 Marek Polacek <polacek@redhat.com>
8375 * c-common.c (warn_array_subscript_with_type_char): Add location_t
8377 * c-common.h (warn_array_subscript_with_type_char): Update
8380 2014-12-20 Edward Smith-Rowland <3dw4rd@verizon.net>
8382 * c-cppbuiltin.c (__cpp_sized_deallocation): Uncomment and move macro.
8383 Control macro with flag_sized_deallocation.
8385 2014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
8387 * c.opt (Wdiscarded-array-qualifiers): New option.
8389 2014-12-19 Jakub Jelinek <jakub@redhat.com>
8391 PR preprocessor/63831
8392 * c-cppbuiltin.c (c_cpp_builtins): Don't define __has_attribute
8393 and __has_cpp_attribute here.
8394 * c-ppoutput.c (init_pp_output): Set cb->has_attribute to
8395 c_common_has_attribute.
8396 * c-common.h (c_common_has_attribute): New prototype.
8397 * c-lex.c (init_c_lex): Set cb->has_attribute to
8398 c_common_has_attribute instead of cb_has_attribute.
8399 (get_token_no_padding): New function.
8400 (cb_has_attribute): Renamed to ...
8401 (c_common_has_attribute): ... this. No longer static. Use
8402 get_token_no_padding, require ()s, don't build TREE_LIST
8403 unnecessarily, fix up formatting, adjust diagnostics, call
8406 2014-12-15 Jason Merrill <jason@redhat.com>
8408 * c.opt (-fsized-deallocation, -Wc++14-compat): New.
8409 (-Wsized-deallocation): New.
8410 * c-opts.c (c_common_post_options): -fsized-deallocation defaults
8411 to on in C++14 and up.
8413 2014-12-11 Jason Merrill <jason@redhat.com>
8415 * c-cppbuiltin.c (c_cpp_builtins): Enable C++14 __cpp_constexpr.
8417 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_runtime_arrays if
8418 we aren't complaining about VLAs.
8420 2014-12-06 Marek Polacek <polacek@redhat.com>
8422 PR tree-optimization/64183
8423 * c-gimplify.c (c_gimplify_expr): Don't convert the RHS of a
8424 shift-expression if it is integer_type_node. Use types_compatible_p.
8426 2014-11-29 Jakub Jelinek <jakub@redhat.com>
8428 * c-common.c (convert_vector_to_pointer_for_subscript): Remove NULL
8429 last argument from create_tmp_var_raw and create_tmp_var calls.
8430 * cilk.c (gimplify_cilk_spawn): Likewise.
8431 * c-omp.c (c_finish_omp_atomic): Likewise.
8433 2014-11-28 Marek Polacek <polacek@redhat.com>
8435 * c-ubsan.c (ubsan_instrument_shift): Use op1_utype for MINUS_EXPR
8436 instead of unsigned_type_node.
8438 2014-11-28 Marek Polacek <polacek@redhat.com>
8441 * c-ubsan.c (ubsan_instrument_shift): Change the type of a MINUS_EXPR
8443 * c-gimplify.c (c_gimplify_expr): Convert right operand of a shift
8444 expression to unsigned_type_node.
8446 2014-11-20 Mark Wielaard <mjw@redhat.com>
8449 * c-opts.c (set_std_c89): Set lang_hooks.name.
8450 (set_std_c99): Likewise.
8451 (set_std_c11): Likewise.
8452 (set_std_cxx98): Likewise.
8453 (set_std_cxx11): Likewise.
8454 (set_std_cxx14): Likewise.
8455 (set_std_cxx1z): Likewise.
8457 2014-11-21 Jakub Jelinek <jakub@redhat.com>
8460 * c-common.h (convert_vector_to_pointer_for_subscript): Change
8461 return type to bool.
8462 * c-common.c: Include gimple-expr.h.
8463 (convert_vector_to_pointer_for_subscript): Change return type to
8464 bool. If *vecp is not lvalue_p and has VECTOR_TYPE, return true
8465 and copy it into a TARGET_EXPR and use that instead of *vecp
8468 2014-11-19 David Malcolm <dmalcolm@redhat.com>
8470 Merger of git branch "gimple-classes-v2-option-3".
8471 * ChangeLog.gimple-classes: New.
8472 * c-gimplify.c (add_block_to_enclosing): Strengthen local "stack"
8473 from being just a vec<gimple> to a vec<gbind *>.
8475 2014-11-18 Jakub Jelinek <jakub@redhat.com>
8478 * c-ubsan.c (ubsan_maybe_instrument_reference_or_call): Change type
8479 argument to ptype, set type to TREE_TYPE (ptype). Don't call
8480 get_pointer_alignment for non-pointers. Use ptype, or if it is
8481 reference type, corresponding pointer type, as type of kind
8483 (ubsan_maybe_instrument_reference,
8484 ubsan_maybe_instrument_member_call): Adjust callers.
8486 2014-11-15 Marek Polacek <polacek@redhat.com>
8489 * array-notation-common.c (is_sec_implicit_index_fn): Return false
8491 (extract_array_notation_exprs): Return for NULL node.
8493 2014-11-12 Joseph Myers <joseph@codesourcery.com>
8495 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Define and
8496 undefine __NO_MATH_ERRNO__ based on changes to -fmath-errno state.
8498 2014-11-12 Jakub Jelinek <jakub@redhat.com>
8501 * c-common.c (check_builtin_function_arguments): Handle
8502 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW.
8504 2014-11-10 Andi Kleen <ak@linux.intel.com>
8507 * c-common.h (check_no_cilk): Declare.
8508 * cilk.c (get_error_location): New function.
8509 (check_no_cilk): Dito.
8511 2014-11-10 Andi Kleen <ak@linux.intel.com>
8513 * cilk.c (recognize_spawn): Use expression location
8516 2014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
8518 * c.opt ([Wshift-count-negative, Wshift-count-overflow]): Add.
8520 2014-11-10 Edward Smith-Rowland <3dw4rd@verizon.net>
8522 * c-cppbuiltin.c (__has_attribute, __has_cpp_attribute): New macros;
8523 (__cpp_rtti, __cpp_exceptions): New macros for C++98;
8524 (__cpp_range_based_for, __cpp_initializer_lists,
8525 __cpp_delegating_constructors, __cpp_nsdmi,
8526 __cpp_inheriting_constructors, __cpp_ref_qualifiers): New macros
8527 for C++11; (__cpp_attribute_deprecated): Remove in favor of
8528 __has_cpp_attribute.
8529 * c-lex.c (cb_has_attribute): New callback CPP function;
8530 (init_c_lex): Set has_attribute callback.
8532 2014-11-04 Richard Biener <rguenther@suse.de>
8534 * c-common.c (shorten_compare): Do not shorten mixed
8535 DFP and non-DFP compares.
8537 2014-11-01 Edward Smith-Rowland <3dw4rd@verizon.net>
8539 * g++.dg/cpp1y/feat-cxx11.C: Commentary and rearrangement of tests.
8540 * g++.dg/cpp1y/feat-cxx11-neg.C: Add aggregate NSDMI test.
8541 Commentary and rearrangement of tests.
8542 * g++.dg/cpp1y/feat-cxx14.C: Enable aggregate NSDMI test.
8543 Commentary and rearrangement of tests.
8544 * g++.dg/cpp1y/feat-cxx98-neg.C: Ditto.
8545 * g++.dg/cpp1y/feat-cxx98.C: Commentary.
8547 2014-10-29 Richard Sandiford <richard.sandiford@arm.com>
8549 * c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant
8550 enum from machine_mode.
8552 2014-10-28 Andrew MacLeod <amacleod@redhat.com>
8554 * c-common.c: Adjust include files.
8555 * c-gimplify.c: Ditto.
8557 * c-pragma.c: Ditto.
8560 2014-10-27 Andrew MacLeod <amacleod@redhat.com>
8562 * c-gimplify.c: Adjust include files.
8564 2014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
8567 * c-opts.c (c_common_diagnostics_set_defaults): Renamed from
8568 c_common_initialize_diagnostics.
8569 * c-common.h: Likewise.
8571 2014-10-24 Marek Polacek <polacek@redhat.com>
8574 * c-pretty-print.c (c_pretty_printer::simple_type_specifier): Don't
8575 print "struct"/"union"/"enum" for typedefed names.
8577 2014-10-23 Marek Polacek <polacek@redhat.com>
8579 * c-ubsan.c (ubsan_instrument_shift): Perform the MINUS_EXPR
8582 2014-10-22 Jakub Jelinek <jakub@redhat.com>
8583 Yury Gribov <y.gribov@samsung.com>
8585 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
8586 ubsan_instrument_vla): Check bits in flag_sanitize_recover bitmask
8587 instead of flag_sanitize_recover as bool flag.
8589 2014-10-21 Kirill Yukhin <kirill.yukhin@intel.com>
8591 * cilk.c: Revert previous change.
8593 2014-10-20 Igor Zamyatin <igor.zamyatin@intel.com>
8596 * cilk.c: Include vec.h.
8597 (struct cilk_decls): New structure.
8598 (wrapper_parm_cb): Split this function to...
8599 (fill_decls_vec): ...this...
8600 (create_parm_list): ...and this.
8601 (compare_decls): New function.
8602 (for_local_cb): Remove.
8603 (wrapper_local_cb): Ditto.
8604 (build_wrapper_type): For now first traverse and fill vector of
8605 declarations then sort it and then deal with sorted vector.
8606 (cilk_outline): Ditto.
8607 (declare_one_free_variable): Ditto.
8609 2014-10-17 Marek Polacek <polacek@redhat.com>
8611 * c-opts.c (c_common_post_options): Set warn_implicit_int.
8612 * c.opt (Wimplicit-int): Initialize to -1.
8614 2014-10-16 Andrew MacLeod <amacleod@redhat.com>
8616 * c-pragma.c: Adjust include files.
8617 * c-semantics.c: Likewise.
8619 2014-10-16 DJ Delorie <dj@redhat.com>
8621 * c-cppbuiltin.c (cpp_atomic_builtins): Don't assume pointers are
8624 2014-10-14 Jason Merrill <jason@redhat.com>
8627 * c-common.h (CPP_PREPARSED_EXPR): New.
8628 (N_CP_TTYPES): Adjust.
8630 2014-10-15 Marek Polacek <polacek@redhat.com>
8632 * c-opts.c (c_common_init_options): Make -std=gnu11 the default for C.
8634 2014-10-14 DJ Delorie <dj@redhat.com>
8636 * c-pretty-print.c (pp_c_integer_constant): Check for all __intN
8637 types, not just __int128.
8638 * c-cppbuiltin.c (c_cpp_builtins): Add builtins for all __intN
8639 types, not just __int128.
8640 (cpp_atomic_builtins): Round pointer sizes up.
8641 (type_suffix): Use type precision, not specific types.
8642 * c-common.c (c_common_reswords): Remove __int128 special case.
8643 (c_common_type_for_size): Check for all __intN types, not just
8645 (c_common_type_for_mode): Likewise.
8646 (c_common_signed_or_unsigned_type): Likewise.
8647 (c_build_bitfield_integer_type): Likewise.
8648 (c_common_nodes_and_builtins): Likewise.
8649 (keyword_begins_type_specifier): Likewise.
8650 * c-common.h (rid): Remove RID_INT128 and add RID_INT_N_* for all
8653 2014-10-12 Trevor Saunders <tsaunders@mozilla.com>
8655 * c-common.c: Use hash_table instead of hashtab.
8657 2014-10-06 Edward Smith-Rowland <3dw4rd@verizon.net>
8659 * c-cppbuiltin.c: Move __cpp_attribute_deprecated to the
8662 2014-10-03 Marc Glisse <marc.glisse@inria.fr>
8667 * c-common.c (warn_logical_operator): Punt for vectors.
8669 2014-10-01 Edward Smith-Rowland <3dw4rd@verizon.net>
8671 Implement SD-6: SG10 Feature Test Recommendations
8672 * c-cppbuiltin.c (c_cpp_builtins()): Define language feature
8673 macros and the __has_header macro.
8675 2014-09-30 Jason Merrill <jason@redhat.com>
8677 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_ASSIGNABLE and
8678 RID_IS_TRIVIALLY_CONSTRUCTIBLE.
8679 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
8681 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_COPYABLE.
8682 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
8684 * c-common.h (enum rid): Remove RID_IS_CONVERTIBLE_TO.
8685 * c-common.c (c_common_reswords): Remove __is_convertible_to.
8687 2014-09-24 Marek Polacek <polacek@redhat.com>
8691 * c-common.h (struct c_common_resword): Don't define CPP_KEYWORD.
8693 2014-09-23 Andi Kleen <ak@linux.intel.com>
8695 * c-common.c (handle_no_reorder_attribute): New function.
8696 (c_common_attribute_table): Add no_reorder attribute.
8698 2014-09-22 Joseph Myers <joseph@codesourcery.com>
8700 * c-cppbuiltin.c (c_cpp_builtins): Define
8701 __LIBGCC_*_EXCESS_PRECISION__ macros for supported floating-point
8704 2014-09-18 Joseph Myers <joseph@codesourcery.com>
8706 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_*_FUNC_EXT__
8707 for supported floating-point modes.
8709 2014-09-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
8711 * c.opt (Wpsabi): Use LangEnabledBy.
8712 * c-opts.c (c_common_handle_option): Do not handle here.
8714 2014-09-12 Joseph Myers <joseph@codesourcery.com>
8716 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_HAS_%s_MODE__
8717 macros for floating-point modes.
8719 2014-09-11 Marc Glisse <marc.glisse@inria.fr>
8722 * c-cppbuiltin.c (builtin_define_float_constants): Correct
8723 __*_DENORM_MIN__ without denormals.
8725 2014-09-10 Jakub Jelinek <jakub@redhat.com>
8727 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
8728 ubsan_instrument_vla, ubsan_instrument_return): Adjust
8729 ubsan_create_data callers.
8730 (ubsan_instrument_bounds): Don't emit UBSAN_BOUNDS at all if
8731 index is constant or BIT_AND_EXPR with constant mask and is
8732 small enough for the bound.
8733 * c-gimplify.c (ubsan_walk_array_refs_r): For ADDR_EXPR of
8734 ARRAY_REF, make sure the inner ARRAY_REF is not walked again.
8736 2014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
8738 * c.opt: Add CppReason to various flags.
8739 (Wdate-time): Re-sort.
8740 * c-common.c: Include c-common.h earlier.
8741 (struct reason_option_codes_t): Delete.
8742 (c_option_controlling_cpp_error): Prefix global type and struct
8745 2014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
8747 * c.opt (Wnormalized): New.
8748 (Wnormalized=): Use Enum and Reject Negative.
8749 * c-opts.c (c_common_handle_option): Do not handle Wnormalized here.
8751 2014-09-08 Joseph Myers <joseph@codesourcery.com>
8753 * c-cppbuiltin.c (c_cpp_builtins): Define macros for mantissa
8754 digits of floating-point modes if -fbuilding-libgcc.
8756 2014-09-05 Joseph Myers <joseph@codesourcery.com>
8758 * c-cppbuiltin.c (c_cpp_builtins): Also define
8759 __LIBGCC_EH_TABLES_CAN_BE_READ_ONLY__,
8760 __LIBGCC_EH_FRAME_SECTION_NAME__, __LIBGCC_JCR_SECTION_NAME__,
8761 __LIBGCC_CTORS_SECTION_ASM_OP__, __LIBGCC_DTORS_SECTION_ASM_OP__,
8762 __LIBGCC_TEXT_SECTION_ASM_OP__, __LIBGCC_INIT_SECTION_ASM_OP__,
8763 __LIBGCC_INIT_ARRAY_SECTION_ASM_OP__,
8764 __LIBGCC_STACK_GROWS_DOWNWARD__,
8765 __LIBGCC_DONT_USE_BUILTIN_SETJMP__,
8766 __LIBGCC_DWARF_ALT_FRAME_RETURN_COLUMN__,
8767 __LIBGCC_DWARF_FRAME_REGISTERS__,
8768 __LIBGCC_EH_RETURN_STACKADJ_RTX__, __LIBGCC_JMP_BUF_SIZE__,
8769 __LIBGCC_STACK_POINTER_REGNUM__ and
8770 __LIBGCC_VTABLE_USES_DESCRIPTORS__ for -fbuilding-libgcc.
8771 (builtin_define_with_value): Handle backslash-escaping in string
8774 2014-09-05 Richard Biener <rguenther@suse.de>
8777 * c-format.c (check_format_arg): Properly handle
8778 effectively signed POINTER_PLUS_EXPR offset.
8780 2014-09-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
8782 * c.opt (Wc90-c99-compat,Wc++-compat,Wcomment,Wendif-labels,
8783 Winvalid-pch,Wlong-long,Wmissing-include-dirs,Wmultichar,Wpedantic,
8784 (Wdate-time,Wtraditional,Wundef,Wvariadic-macros): Add CPP, Var
8786 * c-opts.c (c_common_handle_option): Do not handle here.
8787 (sanitize_cpp_opts): Likewise.
8788 * c-common.c (struct reason_option_codes_t): Handle
8789 CPP_W_C90_C99_COMPAT and CPP_W_PEDANTIC.
8791 2014-09-03 Marek Polacek <polacek@redhat.com>
8793 * c.opt (Wlogical-not-parentheses): Enable by -Wall.
8795 2014-09-02 Jakub Jelinek <jakub@redhat.com>
8796 Balaji V. Iyer <balaji.v.iyer@intel.com>
8797 Igor Zamyatin <igor.zamyatin@intel.com>
8799 * c-cilkplus.c (cilk_for_number_of_iterations): New function.
8800 * c-common.c (c_common_reswords): Added _Cilk_for.
8801 * c-common.h (enum rid): Added RID_CILK_FOR.
8802 (cilk_for_number_of_iterations): Add declaration.
8803 * c-omp.c (c_finish_omp_for): Added checks for CILK_SIMD and
8805 * c-pragma.c (init_pragma): Register "grainsize" pragma.
8806 * c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_GRAINSIZE.
8808 2014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
8810 * c.opt (Wbuiltin-macro-redefined,Wdeprecated,Wendif-labels,
8811 Winvalid-pch,Wliteral-suffix,Wmissing-include-dirs,Wtrigraphs,
8812 Wundef): Use CPP, Var and Init.
8813 * c-opts.c (c_common_handle_option): Do not handle the above flags here.
8815 2014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
8817 * c.opt (Wbuiltin-macro-redefined): Use CPP, Var and Init.
8818 * c-opts.c (c_common_handle_option): Do not handle here.
8820 2014-08-25 Jason Merrill <jason@redhat.com>
8822 * c.opt: Change -std=c++1y and -std=gnu++1y to be aliases for
8823 -std=c++14 and -std=gnu++14, rather than the reverse.
8824 * c-opts.c (c_common_handle_option): Change OPT_std_c__1y and
8825 OPT_std_gnu__1y to OPT_std_c__14 and OPT_std_gnu__14.
8826 * c-common.h (cxx_dialect): Remove cxx1y.
8828 2014-08-23 Edward Smith-Rowland <3dw4rd@verizon.net>
8830 * c-common.h (enum cxx_dialect): Add cxx14.
8831 * c-opts.c (set_std_cxx1y): Rename to set_std_cxx14; Use cxx14.
8832 * c-ubsan.c (ubsan_instrument_shift): Change comment and logic from
8833 cxx_dialect == cxx11 || cxx_dialect == cxx1y to cxx_dialect >= cxx11.
8835 2014-08-22 Jason Merrill <jason@redhat.com>
8837 * c.opt (std=gnu++17): Fix alias.
8839 2014-08-22 Marek Polacek <polacek@redhat.com>
8842 * c-common.c (warn_logical_not_parentheses): Don't check LHS. Don't
8843 check for vector types. Drop LHS argument.
8844 * c-common.h (warn_logical_not_parentheses): Adjust.
8846 2014-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
8848 * c.opt (Wcomment): Use CPP, Var and LangEnabledBy.
8849 (Wmultichar): Likewise.
8850 (Wdate-time): Use C-family languages instead of Common. Use CPP
8852 * c-opts.c (c_common_handle_option): Do not handle the above
8854 (sanitize_cpp_opts): Likewise.
8856 2014-08-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
8859 * c-opts.c: Include tree-diagnostics.h.
8860 (c_diagnostic_finalizer): New.
8861 (c_common_initialize_diagnostics): Use it.
8863 2014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
8865 PR preprocessor/51303
8866 * c-common.c (struct reason_option_codes_t option_codes):
8867 Add CPP_W_MISSING_INCLUDE_DIRS. Sort alphabetically.
8869 2014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
8873 * c.opt (Wvariadic-macros): Use CPP and LangEnabledBy.
8874 * c-opts.c (c_common_handle_option): Call cpp_handle_option_auto.
8875 (c_common_post_options): Call init_global_opts_from_cpp.
8876 (sanitize_cpp_opts): Do not handle Wvariadic-macros here.
8878 2014-08-19 Marek Polacek <polacek@redhat.com>
8881 * c-common.c (maybe_warn_bool_compare): New function.
8882 * c-common.h (maybe_warn_bool_compare): Declare.
8883 * c.opt (Wbool-compare): New option.
8885 2014-08-19 Marek Polacek <polacek@redhat.com>
8887 * c.opt (Wc99-c11-compat): New option.
8889 2014-08-19 Marek Polacek <polacek@redhat.com>
8891 * c-opts.c (sanitize_cpp_opts): Make warn_long_long be set according
8892 to warn_c90_c99_compat.
8893 * c.opt (Wc90-c99-compat, Wdeclaration-after-statement): Initialize
8896 2014-08-19 Manuel López-Ibáñez <manu@gcc.gnu.org>
8897 Steven Bosscher <steven@gcc.gnu.org>
8900 * c-format.c: Add extra_arg_loc and format_string_loc to struct
8901 format_check_results.
8902 (check_function_format): Use true and add comment for boolean
8904 (finish_dollar_format_checking): Use explicit location when warning.
8905 (check_format_info): Likewise.
8906 (check_format_arg): Set extra_arg_loc and format_string_loc.
8907 (check_format_info_main): Use explicit location when warning.
8908 (check_format_types): Pass explicit location.
8909 (format_type_warning): Likewise.
8911 2014-08-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
8914 * c-format.c: Handle Fortran flags.
8916 2014-08-12 Igor Zamyatin <igor.zamyatin@intel.com>
8919 * array-notation-common.c (find_rank): Added handling for other
8920 types of references.
8922 2014-08-10 Marek Polacek <polacek@redhat.com>
8925 * c-opts.c (sanitize_cpp_opts): Pass warn_c90_c99_compat to libcpp.
8926 * c.opt (Wc90-c99-compat): Add option.
8928 2014-08-07 Trevor Saunders <tsaunders@mozilla.com>
8930 * c-gimplify.c, cilk.c: Remove includes of pointer-set.h.
8932 2014-08-03 Marek Polacek <polacek@redhat.com>
8934 * c-common.c (check_case_value): Add location_t parameter. Use it.
8935 (c_add_case_label): Pass loc to check_case_value.
8937 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
8939 * cilk.c: Use hash_map instead of pointer_map.
8941 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
8943 * c-gimplify.c: Use hash_set instead of pointer_set.
8945 2014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
8948 * array-notation-common.c (extract_array_notation_exprs): Handling
8951 2014-08-01 Jakub Jelinek <jakub@redhat.com>
8953 * c-common.h (min_align_of_type): Removed prototype.
8954 * c-common.c (min_align_of_type): Removed.
8955 * c-ubsan.h (ubsan_maybe_instrument_reference,
8956 ubsan_maybe_instrument_member_call): New prototypes.
8957 * c-ubsan.c: Include stor-layout.h and builtins.h.
8958 (ubsan_maybe_instrument_reference_or_call,
8959 ubsan_maybe_instrument_reference, ubsan_maybe_instrument_call): New
8962 2014-07-31 Marc Glisse <marc.glisse@inria.fr>
8965 * c.opt (-Wreturn-local-addr): Move to common.opt.
8967 2014-07-30 Jason Merrill <jason@redhat.com>
8972 * c.opt (-fuse-all-virtuals): New.
8974 2014-07-30 Tom Tromey <tromey@redhat.com>
8977 * c.opt (Wdesignated-init): New option.
8978 * c-common.c (c_common_attribute_table): Add "designated_init".
8979 (handle_designated_init): New function.
8981 2014-07-24 Marek Polacek <polacek@redhat.com>
8984 * c-opts.c (c_finish_options): If -imacros is in effect, return.
8986 2014-07-16 Dodji Seketeli <dodji@redhat.com>
8988 PR preprocessor/60723 - missing system-ness marks for macro tokens
8989 * c-ppoutput.c (struct print::prev_was_system_token): New data
8991 (init_pp_output): Initialize it.
8992 (maybe_print_line_1, maybe_print_line, print_line_1, print_line)
8993 (do_line_change): Return a flag saying if a line marker was
8995 (scan_translation_unit): Detect if the system-ness of the token we
8996 are about to emit is different from the one of the previously
8997 emitted token. If so, emit a line marker. Avoid emitting useless
8998 adjacent line markers. Avoid emitting line markers for tokens
8999 originating from the expansion of built-in macros.
9000 (scan_translation_unit_directives_only): Adjust.
9002 2014-07-15 Marek Polacek <polacek@redhat.com>
9004 * c-ubsan.c (ubsan_instrument_bounds): Don't instrument if
9005 TYPE_MAX_VALUE is NULL.
9007 2014-07-14 Jakub Jelinek <jakub@redhat.com>
9010 * c.opt (Wmemset-transposed-args): New warning.
9012 2014-07-10 Jason Merrill <jason@redhat.com>
9016 * c.opt (-fuse-all-virtuals): New.
9018 2014-07-09 Richard Biener <rguenther@suse.de>
9021 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
9022 using unsigned arithmetic if overflow does not wrap instead of
9023 if overflow is undefined.
9025 2014-07-06 Marek Polacek <polacek@redhat.com>
9028 * c.opt (Wsizeof-array-argument): New option.
9030 2014-07-03 Jakub Jelinek <jakub@redhat.com>
9032 * c-ada-spec.c (dump_ada_nodes): Don't call qsort if
9033 comments->count <= 1, as comments->entries might be NULL.
9035 2014-07-01 Marek Polacek <polacek@redhat.com>
9037 * c.opt (Wint-conversion): New option.
9039 2014-07-01 Marek Polacek <polacek@redhat.com>
9042 * c.opt (Wincompatible-pointer-types): New option.
9044 2014-06-30 Paolo Carlini <paolo.carlini@oracle.com>
9047 * c-common.c (handle_noreturn_attribute, handle_const_attribute):
9048 Do not discard TYPE_QUALS of type.
9050 2014-06-26 Jason Merrill <jason@redhat.com>
9052 * c-common.h (enum cxx_dialect): Add cxx1z.
9053 * c.opt (std=c++1z, std=c++17, std=gnu++1z, std=gnu++17): New.
9054 * c-opts.c (c_common_handle_option, set_std_cxx1z): Handle it.
9056 2014-06-26 Teresa Johnson <tejohnson@google.com>
9058 * c-common.h (get_dump_info): Declare.
9059 * c-gimplify.c (c_genericize): Use saved dump files.
9060 * c-opts.c (c_common_parse_file): Begin and end dumps
9061 once around parsing invocation.
9062 (get_dump_info): New function.
9064 2014-06-23 Marek Polacek <polacek@redhat.com>
9065 Andrew MacLeod <amacleod@redhat.com>
9068 * c-common.c (get_atomic_generic_size): Don't segfault if the
9069 type doesn't have a size.
9071 2014-06-20 Marek Polacek <polacek@redhat.com>
9073 * c-gimplify.c: Include "c-ubsan.h" and "pointer-set.h".
9074 (ubsan_walk_array_refs_r): New function.
9075 (c_genericize): Instrument array bounds.
9076 * c-ubsan.c: Include "internal-fn.h".
9077 (ubsan_instrument_division): Mark instrumented arrays as having
9078 side effects. Adjust ubsan_type_descriptor call.
9079 (ubsan_instrument_shift): Likewise.
9080 (ubsan_instrument_vla): Adjust ubsan_type_descriptor call.
9081 (ubsan_instrument_bounds): New function.
9082 (ubsan_array_ref_instrumented_p): New function.
9083 (ubsan_maybe_instrument_array_ref): New function.
9084 * c-ubsan.h (ubsan_instrument_bounds): Declare.
9085 (ubsan_array_ref_instrumented_p): Declare.
9086 (ubsan_maybe_instrument_array_ref): Declare.
9088 2014-06-20 Hale Wang <hale.wang@arm.com>
9091 * c.opt (fshort-enums): Add to LTO.
9092 * c.opt (fshort-wchar): Likewise.
9094 2014-06-16 Marek Polacek <polacek@redhat.com>
9097 * c.opt (Wswitch-bool): Add Var.
9099 2014-06-12 Jakub Jelinek <jakub@redhat.com>
9102 * c-omp.c (c_omp_split_clauses): Don't crash on firstprivate in
9103 #pragma omp target teams or
9104 #pragma omp {,target }teams distribute simd.
9106 2014-06-12 Jason Merrill <jason@redhat.com>
9108 * c.opt (Wabi=, fabi-compat-version): New.
9109 * c-opts.c (c_common_handle_option): Handle -Wabi=.
9110 (c_common_post_options): Handle flag_abi_compat_version default.
9111 Disallow -fabi-compat-version=1.
9112 * c-common.h (abi_version_crosses): New.
9114 2014-06-11 Jan Hubicka <hubicka@ucw.cz>
9116 * c-common.c (handle_section_attribute): Update handling for
9117 section names that are no longer trees.
9119 2014-06-10 Jakub Jelinek <jakub@redhat.com>
9122 * c-pragma.c (omp_pragmas_simd): Move PRAGMA_OMP_TASK...
9123 (omp_pragmas): ... back here.
9125 2014-06-05 Marek Polacek <polacek@redhat.com>
9128 * c-common.c (warn_logical_not_parentheses): New function.
9129 * c-common.h (warn_logical_not_parentheses): Declare.
9130 * c.opt (Wlogical-not-parentheses): New option.
9132 2014-06-04 Marek Polacek <polacek@redhat.com>
9135 * c-common.c (check_case_bounds): Add location parameter.
9137 (c_add_case_label): Pass loc to check_case_bounds.
9139 2014-06-03 Marek Polacek <polacek@redhat.com>
9142 * c.opt (Wswitch-bool): New option.
9144 2014-05-22 Thomas Schwinge <thomas@codesourcery.com>
9146 * c-common.h (c_omp_sharing_predetermined, c_omp_remap_decl):
9148 (record_types_used_by_current_var_decl): Move prototype to where
9151 * c-common.c (DEF_FUNCTION_TYPE_0, DEF_FUNCTION_TYPE_6)
9152 (DEF_FUNCTION_TYPE_7, DEF_FUNCTION_TYPE_8)
9153 (DEF_FUNCTION_TYPE_VAR_5): Cosmetic fixes.
9155 2014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
9157 * c-common.h (CTI_VOID_ZERO, void_zero_node): Delete.
9158 * c-common.c (c_common_nodes_and_builtins): Don't initialize
9160 * c-pretty-print.c (pp_c_void_constant): New function.
9161 (c_pretty_printer::constant, c_pretty_printer::primary_expression)
9162 (c_pretty_printer::expression): Handle VOID_CST.
9163 * cilk.c (extract_free_variables): Likewise.
9164 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift)
9165 (ubsan_instrument_vla): Use void_node instead of void_zero_node.
9167 2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
9169 * c-common.h (sorted_fields_type): Remove variable_size GTY attribute.
9170 * c-pragma.c (push_alignment): Adjust.
9171 (handle_pragma_push_options): Likewise.
9173 2014-05-09 Marek Polacek <polacek@redhat.com>
9176 * c-common.c (check_user_alignment): Return -1 if alignment is error
9178 (handle_aligned_attribute): Don't call default_conversion on
9180 (handle_vector_size_attribute): Likewise.
9181 (handle_tm_wrap_attribute): Handle case when wrap_decl is error node.
9182 (handle_sentinel_attribute): Call default_conversion and allow even
9183 integral types as an argument.
9185 2014-05-08 Marek Polacek <polacek@redhat.com>
9188 * c-common.c (min_align_of_type): New function factored out from...
9189 (c_sizeof_or_alignof_type): ...here.
9190 * c-common.h (min_align_of_type): Declare.
9192 2014-05-08 Marek Polacek <polacek@redhat.com>
9195 * c-common.c (check_main_parameter_types): Warn for _Atomic-qualified
9196 parameter type of main.
9198 2014-05-07 DJ Delorie <dj@redhat.com>
9200 * c-cppbuiltin.c (print_bits_of_hex): New.
9201 (builtin_define_type_minmax): Print values using hex so as not to
9202 require a pre-computed list of string values.
9204 2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
9205 Mike Stump <mikestump@comcast.net>
9206 Richard Sandiford <rdsandiford@googlemail.com>
9208 * c-ada-spec.c: Include wide-int.h.
9209 (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Remove.
9210 (dump_generic_ada_node): Use wide-int interfaces.
9211 * c-common.c: Include wide-int-print.h.
9212 (shorten_compare): Use wide-int interfaces and tree_int_cst_lt.
9213 (pointer_int_sum): Use wide-int interfaces.
9214 (c_common_nodes_and_builtins): Use make_int_cst.
9215 (match_case_to_enum_1): Use tree_fits_uhwi_p and tree_fits_shwi_p.
9216 (handle_alloc_size_attribute): Use wide-int interfaces.
9217 (get_nonnull_operand): Likewise.
9218 * c-format.c (get_constant): Use tree_fits_uhwi_p.
9219 * c-lex.c: Include wide-int.h.
9220 (narrowest_unsigned_type): Take a widest_int rather than two
9222 (narrowest_signed_type): Likewise.
9223 (interpret_integer): Update accordingly. Use wide-int interfaces.
9224 (lex_charconst): Use wide-int interfaces.
9225 * c-pretty-print.c: Include wide-int.h.
9226 (pp_c_integer_constant): Use wide-int interfaces.
9227 * cilk.c (declare_one_free_variable): Use tree_int_cst_lt instead of
9228 INT_CST_LT_UNSIGNED.
9230 2014-05-06 Richard Biener <rguenther@suse.de>
9232 * c-opts.c (c_common_post_options): For -freestanding,
9233 -fno-hosted and -fno-builtin disable pattern recognition
9234 if not enabled explicitely.
9236 2014-05-02 Marek Polacek <polacek@redhat.com>
9238 * c.opt (Wsizeof-pointer-memaccess): Describe option.
9240 2014-05-01 Marek Polacek <polacek@redhat.com>
9243 * c.opt (Wdiscarded-qualifiers): Add.
9245 2014-04-30 Marek Polacek <polacek@redhat.com>
9247 * c-ubsan.c (ubsan_instrument_division): Handle REAL_TYPEs. Perform
9248 INT_MIN / -1 sanitization only for integer types.
9250 2014-04-25 Marek Polacek <polacek@redhat.com>
9253 * c-common.c (handle_noinline_attribute): Warn if the attribute
9254 conflicts with always_inline attribute.
9255 (handle_always_inline_attribute): Warn if the attribute conflicts
9256 with noinline attribute.
9258 2014-04-25 Marek Polacek <polacek@redhat.com>
9261 * c-common.c (check_main_parameter_types): Warn about variadic main.
9263 2014-04-24 Mike Stump <mikestump@comcast.net>
9265 * c.opt (Wshadow-ivar): Default to on.
9267 2014-04-24 Dimitris Papavasiliou <dpapavas@gmail.com>
9269 * c.opt (Wshadow-ivar, flocal-ivars, fivar-visibility): Add.
9271 2014-04-23 Marek Polacek <polacek@redhat.com>
9273 * c-common.c (handle_tm_wrap_attribute): Tweak error message.
9275 2014-04-22 Jakub Jelinek <jakub@redhat.com>
9278 * c-ubsan.c (ubsan_instrument_return): Return __builtin_trap ()
9279 if flag_sanitize_undefined_trap_on_error.
9280 (ubsan_instrument_division, ubsan_instrument_shift,
9281 ubsan_instrument_vla): Likewise. Use __ubsan_handle_*_abort ()
9282 if !flag_sanitize_recover.
9284 2014-04-22 Marc Glisse <marc.glisse@inria.fr>
9287 * c-common.c (registered_builtin_types): Make non-static.
9288 * c-common.h (registered_builtin_types): Declare.
9290 2014-04-14 Richard Biener <rguenther@suse.de>
9291 Marc Glisse <marc.glisse@inria.fr>
9294 * c-common.c (convert_vector_to_pointer_for_subscript): Properly
9295 apply may-alias the scalar pointer type when applicable.
9297 2014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
9300 * cilk.c (cilk_set_spawn_marker): Remove FUNCTION_DECL
9301 as possible argument for Cilk_spawn.
9303 2014-04-11 Tobias Burnus <burnus@net-b.de>
9306 * c.opt (Wformat-signedness): Add
9307 * c-format.c(check_format_types): Use it.
9309 2014-04-11 Jason Merrill <jason@redhat.com>
9312 * c-common.c (sync_resolve_size, get_atomic_generic_size): Call
9313 default_conversion for an array argument.
9315 2014-04-08 Marek Polacek <polacek@redhat.com>
9318 * c-ubsan.c: Include asan.h.
9319 (ubsan_instrument_return): Call initialize_sanitizer_builtins.
9321 2014-04-03 Nathan Sidwell <nathan@codesourcery.com>
9323 * c.opt (Wnon-virtual-dtor): Auto set when Weffc++.
9325 2014-04-02 Marek Polacek <polacek@redhat.com>
9327 * c-common.h (c_expand_expr): Remove declaration.
9329 2014-03-28 Jakub Jelinek <jakub@redhat.com>
9332 * c-common.c (add_atomic_size_parameter): When creating new
9333 params vector, push the size argument first.
9335 2014-03-26 Jakub Jelinek <jakub@redhat.com>
9337 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
9338 ubsan_instrument_vla, ubsan_instrument_return): Adjust
9339 ubsan_create_data callers.
9341 2014-03-22 Jakub Jelinek <jakub@redhat.com>
9344 * c-opts.c (c_finish_options): Restore cb_file_change call to
9347 2014-03-13 Jakub Jelinek <jakub@redhat.com>
9350 * c-pragma.c (apply_pragma_weak): Only look at
9351 TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl)) if
9352 DECL_ASSEMBLER_NAME_SET_P (decl).
9353 (maybe_apply_pending_pragma_weaks): Exit early if
9354 vec_safe_is_empty (pending_weaks) rather than only when
9356 (maybe_apply_pragma_weak): Likewise. If !DECL_ASSEMBLER_NAME_SET_P,
9357 set assembler name back to NULL afterwards.
9359 2014-03-11 Jason Merrill <jason@redhat.com>
9361 * c.opt: Add -std=gnu++14.
9363 2014-03-11 Ian Bolton <ian.bolton@arm.com>
9365 * c-opts.c (c_common_post_options): Don't override
9366 -ffp-contract=fast if unsafe-math-optimizations is on.
9368 2014-03-08 Paulo Matos <paulo@matos-sorge.com>
9370 * c.opt: Enable LTO FE for fshort-double.
9372 2014-03-07 Jason Merrill <jason@redhat.com>
9374 * c.opt: Add -std=c++14.
9376 2014-03-06 Marek Polacek <polacek@redhat.com>
9379 * cilk.c (contains_cilk_spawn_stmt): New function.
9380 (contains_cilk_spawn_stmt_walker): Likewise.
9381 (recognize_spawn): Give error on invalid use of _Cilk_spawn.
9382 * c-common.h (contains_cilk_spawn_stmt): Add declaration.
9384 2014-03-03 Jakub Jelinek <jakub@redhat.com>
9386 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_SIMD.
9387 (init_pragma): Call cpp_register_deferred_pragma for PRAGMA_CILK_SIMD
9388 even when flag_preprocess_only.
9390 2014-02-26 Jason Merrill <jason@redhat.com>
9394 * c-common.c (shorten_compare): Don't check
9395 c_inhibit_evaluation_warnings.
9397 2014-02-19 Jakub Jelinek <jakub@redhat.com>
9400 * c-common.c (c_common_nodes_and_builtins): When initializing
9401 c_uint{16,32,64}_type_node, also set corresponding
9402 uint{16,32,64}_type_node to the same value.
9405 * c-pragma.c (init_pragma): Don't call cpp_register_deferred_pragma
9406 for PRAGMA_IVDEP if flag_preprocess_only.
9408 2014-02-12 Jakub Jelinek <jakub@redhat.com>
9411 * c-common.c (merge_tlist): If copy is true, call new_tlist,
9412 if false, add ADD itself, rather than vice versa.
9413 (verify_tree): For COND_EXPR, don't call merge_tlist with non-zero
9414 copy. For SAVE_EXPR, only call merge_tlist once.
9416 2014-02-08 Jakub Jelinek <jakub@redhat.com>
9419 * c-common.c (handle_alloc_size_attribute): Use tree_fits_uhwi_p
9421 (handle_alloc_align_attribute, handle_assume_aligned_attribute): New
9423 (c_common_attribute_table): Add alloc_align and assume_aligned
9426 2014-02-06 Marek Polacek <polacek@redhat.com>
9429 * c-common.c (warn_for_sign_compare): Call warning_at with location
9432 2014-02-05 Marek Polacek <polacek@redhat.com>
9435 * c-omp.c (c_finish_omp_atomic): Remove unreachable return
9438 2014-02-04 Marek Polacek <polacek@redhat.com>
9441 * c-common.c (conversion_warning): Unwrap C_MAYBE_CONST_EXPR and/or
9444 2014-02-03 Marc Glisse <marc.glisse@inria.fr>
9448 * c-common.c (handle_aligned_attribute, handle_alloc_size_attribute,
9449 handle_vector_size_attribute, handle_nonnull_attribute): Call
9450 default_conversion on the attribute argument.
9451 (handle_nonnull_attribute): Increment the argument number.
9453 2014-01-31 Marek Polacek <polacek@redhat.com>
9456 * c-common.c (add_atomic_size_parameter): Pass vNULL to
9457 build_function_call_vec.
9458 (resolve_overloaded_builtin): Likewise.
9459 * c-common.h (build_function_call_vec): Adjust declaration.
9461 2014-01-30 Marek Polacek <polacek@redhat.com>
9464 * c-common.h (unsafe_conversion_p): Adjust declaration.
9465 (warnings_for_convert_and_check): Likewise.
9466 (convert_and_check): Likewise.
9467 * c-common.c (unsafe_conversion_p): Add location parameter. Call
9468 expansion_point_location_if_in_system_header on it.
9469 (warnings_for_convert_and_check): Add location parameter. Call
9470 expansion_point_location_if_in_system_header on it. Use it.
9471 (convert_and_check): Add location parameter. Use it.
9472 (conversion_warning): Likewise.
9473 (c_add_case_label): Adjust convert_and_check calls.
9474 (scalar_to_vector): Adjust unsafe_conversion_p calls.
9476 2014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
9478 * c-common.c (c_define_builtins): Replaced flag_enable_cilkplus with
9480 * c-pragma.c (init_pragma): Likewise.
9483 2014-01-23 Marek Polacek <polacek@redhat.com>
9486 * c-common.c (shorten_compare): Add location_t parameter.
9487 * c-common.h (shorten_binary_op): Adjust declaration.
9489 2014-01-23 Marek Polacek <polacek@redhat.com>
9492 * c-common.c (pointer_to_zero_sized_aggr_p): New function.
9493 * c-common.h: Declare it.
9495 2014-01-20 Eric Botcazou <ebotcazou@adacore.com>
9497 * c-ada-spec.h (dump_ada_specs): Revert prototype change.
9498 * c-ada-spec.c (dump_ads): Likewise.
9499 (cpp_check): Likewise.
9500 (dump_ada_specs): Likewise.
9502 2014-01-15 Laurent Alfonsi <laurent.alfonsi@st.com>
9505 * c-common.c (handle_no_instrument_function_attribute): Allow
9506 no_instrument_function attribute in class member
9507 definition/declaration.
9509 2014-01-15 Jakub Jelinek <jakub@redhat.com>
9512 * c-omp.c (c_finish_omp_atomic): Set in_late_binary_op around
9513 build_modify_expr with non-NOP_EXPR opcode. Handle return from it
9514 being COMPOUND_EXPR.
9515 (c_finish_omp_for): Handle incr being COMPOUND_EXPR with first
9516 operand a SAVE_EXPR and second MODIFY_EXPR.
9518 2014-01-09 Jakub Jelinek <jakub@redhat.com>
9521 * c-pch.c (c_common_write_pch): Call
9522 prepare_target_option_nodes_for_pch.
9524 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
9526 Update copyright years
9528 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
9530 * array-notation-common.c, c-cilkplus.c: Use the standard form for
9531 the copyright notice.
9533 2013-12-28 Eric Botcazou <ebotcazou@adacore.com>
9535 * c-ada-spec.c (print_constructor): New function.
9536 (print_destructor): Retrieve the origin of the destructor.
9537 (print_ada_declaration): Revamp handling of constructors/destructors.
9539 2013-12-23 Stuart Hastings <stuart@apple.com>
9540 Bill Maddox <maddox@google.com>
9541 Jason Merrill <jason@redhat.com>
9543 * c.opt: Add -fdeclone-ctor-dtor.
9544 * c-opts.c (c_common_post_options): Default to on iff -Os.
9546 2013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
9548 * c-common.c (c_common_attribute_table): Added "cilk simd function"
9550 * c-pragma.h (enum pragma_cilk_clause): Remove.
9551 (enum pragma_omp_clause): Added the following fields:
9552 PRAGMA_CILK_CLAUSE_NOMASK, PRAGMA_CILK_CLAUSE_MASK,
9553 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_NONE,
9554 PRAGMA_CILK_CLAUSE_LINEAR, PRAGMA_CILK_CLAUSE_PRIVATE,
9555 PRAGMA_CILK_CLAUSE_FIRSTPRIVATE, PRAGMA_CILK_CLAUSE_LASTPRIVATE,
9556 PRAGMA_CILK_CLAUSE_UNIFORM.
9559 2013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
9561 * cilk.c (cilk_outline): Made this function non-static.
9562 (gimplify_cilk_spawn): Removed pre_p and post_p arguments.
9563 (create_cilk_wrapper): Added a new parameter: a function pointer.
9564 (c_install_body_w_frame_cleanup): Remove
9565 (extract_free_variables): Added VEC_INIT_EXPR and CONSTRUCTOR case.
9566 * c-common.h (cilk_outline): New prototype.
9567 (gimplify_cilk_spawn): Removed two parameters.
9568 (cilk_install_body_with_frame_cleanup): New prototype.
9569 * c-gimplify.c (c_gimplify_expr): Added MODIFY_EXPR, CALL_EXPR and
9570 CILK_SPAWN_STMT case.
9572 2013-12-11 Bernd Schmidt <bernds@codesourcery.com>
9574 * c-common.c (c_fully_fold_internal): Handle ADDR_SPACE_CONVERT_EXPR.
9576 * c-common.h (enum c_tree_index): Remove CTI_INT_ARRAY_TYPE.
9577 (int_array_type_node): Remove.
9578 * c-common.c (c_common_nodes_and_builtins): Don't build it.
9580 2013-12-05 Marek Polacek <polacek@redhat.com>
9583 * c-common.c (c_sizeof_or_alignof_type): Move a declaration into
9584 [ADJUST_FIELD_ALIGN].
9586 2013-12-04 Joseph Myers <joseph@codesourcery.com>
9589 * c-common.c (c_sizeof_or_alignof_type): Add parameter min_alignof
9590 and check field alignment if set.
9591 * c-common.h (c_sizeof_or_alignof_type): Update prototype.
9592 (c_sizeof, c_alignof): Update calls to c_sizeof_or_alignof_type.
9594 2013-12-04 Jakub Jelinek <jakub@redhat.com>
9595 Marek Polacek <polacek@redhat.com>
9597 * c-gimplify.c (c_gimplify_expr): If doing the integer-overflow
9598 sanitization, call unsigned_type_for only when !TYPE_OVERFLOW_WRAPS.
9600 2013-11-29 H.J. Lu <hongjiu.lu@intel.com>
9603 * cilk.c (gimplify_cilk_spawn): Properly handle function without
9606 2013-11-29 Jakub Jelinek <jakub@redhat.com>
9609 * c-common.c (get_priority): If TREE_VALUE (args) is IDENTIFIER_NODE,
9610 goto invalid. If it is error_mark_node, don't issue further
9613 2013-11-28 Sergey Ostanevich <sergos.gnu@gmail.com>
9615 * c.opt (Wopenmp-simd): New.
9617 2013-11-22 Jakub Jelinek <jakub@redhat.com>
9619 * c-ubsan.h (ubsan_instrument_return): New prototype.
9620 * c-ubsan.c (ubsan_instrument_return): New function.
9622 2013-11-22 Andrew MacLeod <amacleod@redhat.com>
9624 * c-common.c: Add required include files from gimple.h.
9625 * c-gimplify.c: Likewise.
9628 2013-11-22 David Malcolm <dmalcolm@redhat.com>
9630 * c-common.c (unsafe_conversion_p): Remove use of
9631 EXPR_LOC_OR_HERE macro.
9632 (conversion_warning): Likewise.
9633 (warnings_for_convert_and_check): Likewise.
9634 (warn_for_collisions_1): Likewise.
9635 (shorten_compare): Likewise, and remove use of in_system_header
9636 macro, using the location from the former.
9637 * c-lex.c (dump_one_header): Remove use of input_filename macro.
9638 (cb_def_pragma): Remove use of in_system_header macro.
9639 (lex_string): Likewise.
9640 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
9642 2013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
9643 Mike Stump <mikestump@comcast.net>
9644 Richard Sandiford <rdsandiford@googlemail.com>
9646 * c-ada-spec.c (is_simple_enum): Use tree_to_shwi and tree_to_uhwi
9647 instead of TREE_INT_CST_LOW, in cases where there is a protecting
9648 tree_fits_shwi_p or tree_fits_uhwi_p.
9649 (dump_generic_ada_node): Likewise.
9650 * c-format.c (check_format_arg): Likewise.
9651 * c-pretty-print.c (pp_c_integer_constant): Likewise.
9653 2013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
9655 * c-common.c (check_function_arguments_recurse): Use tree_to_uhwi.
9657 2013-11-19 Joshua J Cogliati <jrincayc@yahoo.com>
9660 * c-common.c (unsafe_conversion_p): Make this function
9661 return an enumeration with more detail.
9662 (conversion_warning): Use the new return type of
9663 unsafe_conversion_p to separately warn either about conversions
9664 that lower floating point number precision or about the other
9665 kinds of conversions.
9666 * c-common.h (enum conversion_safety): New enumeration.
9667 (unsafe_conversion_p): switching return type to
9668 conversion_safety enumeration.
9669 * c.opt: Adding new warning -Wfloat-conversion and
9670 enabling it with -Wconversion.
9672 2013-11-19 Basile Starynkevitch <basile@starynkevitch.net>
9674 * c-opts.c: Include plugin.h.
9675 (cb_file_change): Invoke plugin event PLUGIN_INCLUDE_FILE.
9677 2013-11-19 Marek Polacek <polacek@redhat.com>
9679 * c-ubsan.c (ubsan_instrument_division): Adjust ubsan_create_data
9681 (ubsan_instrument_shift): Likewise.
9682 (ubsan_instrument_vla): Likewise.
9684 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
9686 * c-common.c (convert_vector_to_pointer_for_subscript): Remove
9687 cast to unsigned type.
9689 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
9691 * c-common.c (fold_offsetof_1): Use tree_to_uhwi rather than
9693 (complete_array_type): Update comment to refer to tree_to_[su]hwi
9694 rather than tree_low_cst.
9696 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
9698 * c-common.c, c-cppbuiltin.c: Replace tree_low_cst (..., 1) with
9699 tree_to_uhwi throughout.
9701 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
9703 * c-common.c, c-format.c, c-omp.c, c-pretty-print.c: Replace
9704 tree_low_cst (..., 0) with tree_to_shwi throughout.
9706 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
9708 * c-ada-spec.c, c-common.c, c-pretty-print.c: Replace
9709 host_integerp (..., 1) with tree_fits_uhwi_p throughout.
9711 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
9713 * c-ada-spec.c, c-common.c, c-format.c, c-pretty-print.c: Replace
9714 host_integerp (..., 0) with tree_fits_shwi_p throughout.
9716 2013-11-15 Aldy Hernandez <aldyh@redhat.com>
9718 * c-cilkplus.c: New file.
9719 * c-common.c (readonly_error): Add location argument.
9720 * c-common.h (readonly_error): Same.
9721 (c_finish_cilk_clauses): Protoize.
9722 (c_check_cilk_loop): Same.
9723 c-omp.c (c_finish_omp_for): Handle CILK_SIMD nodes.
9724 Do not fail on error_mark_node.
9725 Abstract increment canonicalization to here...
9726 (c_omp_for_incr_canonicalize_ptr): New.
9727 c-pragma.c (init_pragma): Register "simd" pragma.
9728 c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_SIMD.
9729 (enum pragma_cilk_clause): New.
9731 2013-11-15 Richard Sandiford <rdsandiford@googlemail.com>
9733 * c-pretty-print.c (pp_c_character_constant): Remove unnecessary
9734 wchar_type and host_integerp checks.
9736 2013-11-14 Andrew MacLeod <amacleod@redhat.com>
9738 * c-common.c: Likewise.
9739 * c-gimplify.c: Likewise.
9742 2013-11-14 Diego Novillo <dnovillo@google.com>
9744 * c-common.c: Include fold-const.h.
9745 Include stor-layout.h.
9747 Include stringpool.h.
9750 Include trans-mem.h.
9751 * c-cppbuiltin.c: Include stor-layout.h.
9752 Include stringpool.h.
9753 * c-format.c: Include stringpool.h.
9754 * c-lex.c: Include stringpool.h.
9755 Include stor-layout.h.
9756 * c-pragma.c: Include stringpool.h.
9759 Include gcc-symtab.h.
9760 * c-pretty-print.c: Include stor-layout.h.
9762 * cilk.c: Include stringpool.h.
9765 2013-11-13 Joseph Myers <joseph@codesourcery.com>
9767 * c-common.h (enum rid): Add RID_AUTO_TYPE.
9768 * c-common.c (c_common_reswords): Add __auto_type.
9769 (keyword_begins_type_specifier): Handle RID_AUTO_TYPE.
9771 2013-11-12 Andrew MacLeod <amacleod@redhat.com>
9773 * c-common.c: Include gimplify.h.
9774 * c-gimplify.c: Likewise.
9776 * c-omp.c: Include gimple-expr.h instead of gimple.h.
9777 * c-ubsan.c: Don't include gimple.h.
9779 2013-11-12 Joseph Myers <joseph@codesourcery.com>
9781 * c-common.c (c_common_reswords): Add _Thread_local.
9783 2013-11-09 Joseph Myers <joseph@codesourcery.com>
9785 * c-common.c (atomic_size_supported_p): New function.
9786 (resolve_overloaded_atomic_exchange)
9787 (resolve_overloaded_atomic_compare_exchange)
9788 (resolve_overloaded_atomic_load, resolve_overloaded_atomic_store):
9789 Use it instead of comparing size with a local list of sizes.
9791 2013-11-07 Andrew MacLeod <amacleod@redhat.com>
9792 Joseph Myers <joseph@codesourcery.com>
9794 * c-common.h (enum rid): Add RID_ATOMIC.
9795 * c-common.c (c_common_reswords): Add _Atomic.
9796 (sync_resolve_params): Use TYPE_MAIN_VARIANT on pointer argument.
9797 (keyword_is_type_qualifier): Accept RID_ATOMIC.
9798 * c-format.c (check_format_types): Check for extra _Atomic
9799 qualifiers in format argument.
9800 * c-pretty-print.c (pp_c_cv_qualifiers): Handle atomic qualifier.
9801 (pp_c_type_qualifier_list): Mention _Atomic in comment.
9803 2013-11-06 Tobias Burnus <burnus@net-b.de>
9805 * c-common.c (reason_option_codes_t): Add CPP_W_DATE_TIME.
9807 2013-11-06 Joseph Myers <joseph@codesourcery.com>
9809 * c-opts.c (c_common_post_options): Set -ffp-contract=off in C
9811 * c-cppbuiltin.c (cpp_iec_559_value): Consider -ffp-contract=fast
9812 to mean lack of IEEE 754 support.
9814 2013-11-05 Tobias Burnus <burnus@net-b.de>
9816 * c.opt (-Wdate-time): New option
9817 * c-opts.c (sanitize_cpp_opts): Pass on to libcpp.
9819 2013-11-05 Joseph Myers <joseph@codesourcery.com>
9821 * c-cppbuiltin.c (cpp_iec_559_value): Test
9822 flag_excess_precision_cmdline not flag_excess_precision.
9824 2013-11-05 Tobias Burnus <burnus@net-b.de>
9826 * c.opt (fopenmp-simd): New option.
9827 * c-pragma.c (omp_pragmas): Move pragmas which can contain simd to ...
9828 (omp_pragmas): ... this new struct.
9829 (c_pp_lookup_pragma): Also walk omp_pragmas.
9830 (init_pragma): Init pragmas for -fopenmp-simd.
9832 2013-11-04 Marek Polacek <polacek@redhat.com>
9835 * c-common.c (invalid_indirection_error): Handle RO_ARROW_STAR case.
9837 2013-11-04 Joseph Myers <joseph@codesourcery.com>
9839 * c-cppbuiltin.c (cpp_iec_559_value, cpp_iec_559_complex_value):
9841 (c_cpp_builtins): Define __GCC_IEC_559 and __GCC_IEC_559_COMPLEX.
9843 2013-11-04 Eric Botcazou <ebotcazou@adacore.com>
9845 * c-ada-spec.h (cpp_operation): Add IS_TRIVIAL.
9846 (dump_ada_specs): Adjust prototype of second callback.
9847 * c-ada-spec.c (cpp_check): New global variable.
9848 (dump_ada_nodes): Remove cpp_check parameter and do not pass it down.
9849 (print_generic_ada_decl): Likewise.
9850 (has_static_fields): Change return type to bool and add guard.
9851 (has_nontrivial_methods): New predicate.
9852 (is_tagged_type): Change return type to bool.
9853 (separate_class_package): Call has_nontrivial_methods.
9854 (pp_ada_tree_identifier): Minor tweaks.
9855 (dump_ada_function_declaration): Adjust calls to dump_generic_ada_node.
9856 (dump_ada_array_domains): Likewise.
9857 (dump_ada_array_type): Likewise.
9858 (dump_template_types): Remove cpp_check parameter and do not pass it to
9859 dump_generic_ada_node.
9860 (dump_ada_template): Likewise.
9861 (dump_generic_ada_node): Remove cpp_check parameter and do not pass it
9863 (print_ada_methods): Change return type to integer. Remove cpp_check
9864 parameter and do not pass it down.
9865 (dump_nested_types): Remove cpp_check parameter and do not pass it to
9866 dump_generic_ada_node.
9867 (print_ada_declaration): Likewise. Test RECORD_OR_UNION_TYPE_P before
9869 (print_ada_struct_decl): Remove cpp_check parameter and do not pass it
9870 down. Use has_nontrivial_methods to recognize C++ classes. Use return
9871 value of print_ada_methods.
9872 (dump_ads): Rename cpp_check parameter to check and adjust prototype.
9873 Set cpp_check to it before invoking dump_ada_nodes.
9874 (dump_ada_specs): Likewise.
9876 2013-11-03 Marek Polacek <polacek@redhat.com>
9878 * c-ubsan.c: Don't include hash-table.h.
9879 (ubsan_instrument_vla): New function.
9880 * c-ubsan.h: Declare it.
9882 2013-10-31 David Malcolm <dmalcolm@redhat.com>
9884 Automated part of renaming of symtab_node_base to symtab_node.
9886 Patch autogenerated by rename_symtab.py from
9887 https://github.com/davidmalcolm/gcc-refactoring-scripts
9888 revision 58bb219cc090b2f4516a9297d868c245495ee622
9890 * c-pragma.c (maybe_apply_pending_pragma_weaks): Rename
9891 symtab_node_base to symtab_node.
9893 2013-10-31 Edward Smith-Rowland <3dw4rd@verizon.net>
9895 Implement C++14 digit separators.
9896 * c-lex.c (interpret_float): Remove digit separators from scratch string
9897 before building real literal.
9899 2013-10-30 Jakub Jelinek <jakub@redhat.com>
9901 * cilk.c (create_cilk_helper_decl): Use HOST_WIDE_INT_PRINT_DEC.
9903 2013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
9905 * c-common.c (c_common_reswords[]): Added _Cilk_spawn and _Cilk_sync
9907 (c_define_builtins): Called cilk_init_builtins if Cilk Plus is
9909 * c-common.h (enum rid): Added RID_CILK_SPAWN and RID_CILK_SYNC.
9910 (insert_cilk_frame): New prototype.
9911 (cilk_init_builtins): Likewise.
9912 (gimplify_cilk_spawn): Likewise.
9913 (c_cilk_install_body_w_frame_cleanup): Likewise.
9914 (cilk_detect_spawn_and_unwrap): Likewise.
9915 (cilk_set_spawn_marker): Likewise.
9916 (build_cilk_sync): Likewise.
9917 (build_cilk_spawn): Likewise.
9920 2013-10-29 David Malcolm <dmalcolm@redhat.com>
9922 Patch autogenerated by refactor_symtab.py from
9923 https://github.com/davidmalcolm/gcc-refactoring-scripts
9924 revision 58bb219cc090b2f4516a9297d868c245495ee622
9926 * c-gimplify.c (c_genericize): Update for conversion of symtab types
9927 to a true class hierarchy.
9928 * c-pragma.c (maybe_apply_pending_pragma_weaks): Likewise.
9930 2013-10-27 Richard Sandiford <rdsandiford@googlemail.com>
9932 * c-lex.c (interpret_integer): Remove call to cpp_num_sign_extend.
9934 2013-10-26 Jeff Law <law@redhat.com>
9936 * c-common.c (c_define_builtins): Remove mudflap support.
9937 * c.opt: Ignore and warn for mudflap options.
9939 2013-10-24 Tobias Burnus <burnus@net-b.de>
9942 * c-pragma.c (init_pragma) Add #pragma ivdep handling.
9943 * c-pragma.h (pragma_kind): Add PRAGMA_IVDEP.
9945 2013-10-23 Jason Merrill <jason@redhat.com>
9947 * c-format.c (gcc_cxxdiag_char_table): Add %X.
9949 2013-10-11 Jakub Jelinek <jakub@redhat.com>
9951 * c-common.h (omp_clause_mask::operator !=): New method.
9952 * c-omp.c (c_omp_split_clauses): Use if ((mask & something) != 0)
9953 instead of if (mask & something) tests everywhere.
9955 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP to
9956 201307 instead of 201107.
9957 * c-common.c (DEF_FUNCTION_TYPE_8): Define.
9958 (c_common_attribute_table): Add "omp declare target" and
9959 "omp declare simd" attributes.
9960 (handle_omp_declare_target_attribute,
9961 handle_omp_declare_simd_attribute): New functions.
9962 * c-omp.c: Include c-pragma.h.
9963 (c_finish_omp_taskgroup): New function.
9964 (c_finish_omp_atomic): Add swapped argument, if true,
9965 build the operation first with rhs, lhs arguments and use NOP_EXPR
9967 (c_finish_omp_for): Add code argument, pass it down to make_code.
9968 (c_omp_split_clauses): New function.
9969 (c_split_parallel_clauses): Removed.
9970 (c_omp_declare_simd_clause_cmp, c_omp_declare_simd_clauses_to_numbers,
9971 c_omp_declare_simd_clauses_to_decls): New functions.
9972 * c-common.h (omp_clause_mask): New type.
9973 (OMP_CLAUSE_MASK_1): Define.
9974 (omp_clause_mask::omp_clause_mask, omp_clause_mask::operator &=,
9975 omp_clause_mask::operator |=, omp_clause_mask::operator ~,
9976 omp_clause_mask::operator |, omp_clause_mask::operator &,
9977 omp_clause_mask::operator <<, omp_clause_mask::operator >>,
9978 omp_clause_mask::operator ==): New methods.
9979 (enum c_omp_clause_split): New.
9980 (c_finish_omp_taskgroup): New prototype.
9981 (c_finish_omp_atomic): Add swapped argument.
9982 (c_finish_omp_for): Add code argument.
9983 (c_omp_split_clauses): New prototype.
9984 (c_split_parallel_clauses): Removed.
9985 (c_omp_declare_simd_clauses_to_numbers,
9986 c_omp_declare_simd_clauses_to_decls): New prototypes.
9987 * c-pragma.c (omp_pragmas): Add new OpenMP 4.0 constructs.
9988 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_CANCEL,
9989 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_DECLARE_REDUCTION,
9990 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_SIMD,
9991 PRAGMA_OMP_TARGET, PRAGMA_OMP_TASKGROUP and PRAGMA_OMP_TEAMS.
9992 Remove PRAGMA_OMP_PARALLEL_FOR and PRAGMA_OMP_PARALLEL_SECTIONS.
9993 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ALIGNED,
9994 PRAGMA_OMP_CLAUSE_DEPEND, PRAGMA_OMP_CLAUSE_DEVICE,
9995 PRAGMA_OMP_CLAUSE_DIST_SCHEDULE, PRAGMA_OMP_CLAUSE_FOR,
9996 PRAGMA_OMP_CLAUSE_FROM, PRAGMA_OMP_CLAUSE_INBRANCH,
9997 PRAGMA_OMP_CLAUSE_LINEAR, PRAGMA_OMP_CLAUSE_MAP,
9998 PRAGMA_OMP_CLAUSE_NOTINBRANCH, PRAGMA_OMP_CLAUSE_NUM_TEAMS,
9999 PRAGMA_OMP_CLAUSE_PARALLEL, PRAGMA_OMP_CLAUSE_PROC_BIND,
10000 PRAGMA_OMP_CLAUSE_SAFELEN, PRAGMA_OMP_CLAUSE_SECTIONS,
10001 PRAGMA_OMP_CLAUSE_SIMDLEN, PRAGMA_OMP_CLAUSE_TASKGROUP,
10002 PRAGMA_OMP_CLAUSE_THREAD_LIMIT, PRAGMA_OMP_CLAUSE_TO and
10003 PRAGMA_OMP_CLAUSE_UNIFORM.
10005 2013-10-09 Marc Glisse <marc.glisse@inria.fr>
10007 PR tree-optimization/20318
10008 * c-common.c (handle_returns_nonnull_attribute): New function.
10009 (c_common_attribute_table): Add returns_nonnull.
10011 2013-10-03 Marc Glisse <marc.glisse@inria.fr>
10014 * c.opt (fcheck-new): Move to common.opt.
10016 2013-09-25 Marek Polacek <polacek@redhat.com>
10017 Jakub Jelinek <jakub@redhat.com>
10020 * c-ubsan.c (ubsan_instrument_shift): Don't instrument
10021 an expression if we can prove it is correct.
10022 (ubsan_instrument_division): Likewise. Remove unnecessary
10025 2013-09-18 Marek Polacek <polacek@redhat.com>
10028 * c-common.c (handle_no_sanitize_undefined_attribute): New function.
10030 (struct attribute_spec c_common_att): Add no_sanitize_undefined.
10032 2013-09-14 Iain Sandoe <iain@codesourcery.com>
10035 * c.opt (fgnu-runtime, fnext-runtime, fobjc-abi-version,
10036 fobjc-gc, freplace-objc-classes): Accept for LTO.
10038 2013-09-13 Jacek Caban <jacek@codeweavers.com>
10040 * c-target.def: New hook
10042 2013-09-09 Paolo Carlini <paolo.carlini@oracle.com>
10045 * c.opt (Wdelete-incomplete): Add.
10047 2013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
10049 * c-common.c (same_scalar_type_ignoring_signedness): Delete.
10050 (vector_types_compatible_elements_p): New function.
10051 * c-common.h: (same_scalar_type_ignoring_signedness): Delete
10053 (vector_types_compatible_elements_p): Declare.
10055 2013-09-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
10057 * c-pretty-print.h (c_pretty_printer::simple_type_specifier): Now
10058 a virtual member function.
10059 (pp_simple_type_specifier): Remove.
10060 (pp_c_type_specifier): Likewise.
10061 * c-pretty-print.c (c_pretty_printer::simple_type_specifier):
10062 Rename from pp_c_type_specifier. Adjust.
10063 (c_pretty_printer::c_pretty_printer): Do not assign to
10064 simple_type_specifier.
10066 2013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
10068 * c-pretty-print.h (c_pretty_printer::type_id): Now a virtual
10070 (c_pretty_printer::storage_class_specifier): Likewise.
10071 (c_pretty_printer::initializer): Likewise.
10072 (pp_declaration): Remove.
10073 (pp_declaration_specifiers): Likewise.
10074 (pp_abstract_declarator): Likewise.
10075 (pp_declarator): Likewise.
10076 (pp_type_id): Likewise.
10077 (pp_statement): Likewise.
10078 (pp_constant): Likewise.
10079 (pp_id_expression): Likewise.
10080 (pp_primary_expression): Likewise.
10081 (pp_unary_expression): Likewise.
10082 (pp_multiplicative_expression): Likewise.
10083 (pp_conditional_expression): Likewise.
10084 (pp_assignment_expression): Likewise.
10085 (pp_expression): Likewise.
10086 (pp_c_type_id): Likewise.
10087 (pp_c_storage_class_specifier): Likewise.
10088 * c-pretty-print.c (pp_c_type_cast): Tidy.
10089 (pp_c_pointer): Likewise.
10090 (pp_c_type_specifier): Likewise.
10091 (pp_c_parameter_type_list): Likewise.
10092 (pp_c_function_definition): Likewise.
10093 (pp_c_init_declarator): Likewise.
10094 (pp_c_initializer_list): Likewise.
10095 (pp_c_constructor_elts): Likewise.
10096 (c_pretty_printer::direct_abstract_declarator): Likewise.
10097 (c_pretty_printer::declaration_specifiers): Likewise.
10098 (c_pretty_printer::primary_expression): Likewise.
10099 (c_pretty_printer::postfix_expression): Likewise.
10100 (c_pretty_printer::type_id): Rename from pp_c_type_id.
10101 (c_pretty_printer::storage_class_specifier): Rename from
10102 pp_c_storage_class_specifier.
10103 (c_pretty_printer::initializer): Rename from pp_c_initializer.
10104 (c_pretty_printer::c_pretty_printer): Do not assign to type_id,
10105 storage_class_specifier, initializer, offset_list, flags.
10107 2013-08-30 Marek Polacek <polacek@redhat.com>
10109 * c-ubsan.c: New file.
10110 * c-ubsan.h: New file.
10112 2013-08-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
10114 * c-pretty-print.h (c_pretty_printer::declaration): Now a virtual
10116 (c_pretty_printer::declaration_specifiers): Likewise.
10117 (c_pretty_printer::declarator): Likewise.
10118 (c_pretty_printer::abstract_declarator): Likewise.
10119 (c_pretty_printer::direct_abstract_declarator): Likewise.
10120 (c_pretty_printer::direct_declarator): Likewise.
10121 (c_pretty_printer::function_specifier): Likewise.
10122 (pp_declaration): Adjust.
10123 (pp_declaration_specifiers): Likewise.
10124 (pp_abstract_declarator): Likewise.
10125 (pp_direct_declarator): Likewise.
10126 (pp_function_specifier): Likewise.
10127 (pp_direct_abstract_declarator): Remove as unused.
10128 (pp_c_declaration): Remove.
10129 (pp_c_declaration_specifiers): Likewise.
10130 (pp_c_declarator): Likewise.
10131 (pp_c_direct_declarator): Likewise.
10132 (pp_c_function_specifier): Likewise.
10133 (pp_c_direct_abstract_declarator): Likewise.
10134 * c-pretty-print.c (c_pretty_printer::abstract_declarator): Rename
10135 from pp_c_abstract_declarator. Adjust.
10136 (c_pretty_printer::direct_abstract_declarator): Rename from
10137 pp_c_direct_abstract_declarator. Adjust.
10138 (c_pretty_printer::function_specifier): Rename from
10139 pp_c_function_specifier. Adjust.
10140 (c_pretty_printer::declaration_specifiers): Rename from
10141 pp_c_declaration_specifiers. Adjust.
10142 (c_pretty_printer::direct_declarator): Rename from
10143 pp_c_direct_declarator. Adjust.
10144 (c_pretty_printer::declarator): Rename from pp_c_declarator. Adjust.
10145 (c_pretty_printer::declaration): Rename from pp_c_declaration. Adjust.
10146 (c_pretty_printer::c_pretty_printer): Do not assign to
10147 declaration, declaration_specifiers, declarator,
10148 direct_declarator, direct_abstract_declarator, function_specifier.
10150 2013-08-26 Gabriel Dos Reis <gdre@integrable-solutions.net>
10152 * c-pretty-print.h (c_pretty_printer::unary_expression): Now a
10153 virtual member function.
10154 (c_pretty_printer::multiplicative_expression): Likewise.
10155 (c_pretty_printer::conditional_expression): Likewise.
10156 (c_pretty_printer::assignment_expression): Likewise.
10157 (c_pretty_printer::expression): Likewise.
10158 (pp_unary_expression): Adjust.
10159 (pp_multiplicative_expression): Likewise.
10160 (pp_assignment_expression): Likewise.
10161 (pp_conditional_expression): Likewise.
10162 (pp_expression): Likewise.
10163 * c-pretty-print.c (c_pretty_printer::unary_expression): Rename
10164 from pp_c_unary_expression. Adjust.
10165 (c_pretty_printer::multiplicative_expression): Rename from
10166 pp_c_multiplicative_expression. Adjust.
10167 (c_pretty_printer::conditional_expression): Rename from
10168 pp_c_conditional_expression. Adjust.
10169 (c_pretty_printer::assignment_expression): Rename from
10170 pp_c_assignment_expression. Adjust.
10171 (c_pretty_printer::expression): Rename from pp_c_expression. Adjust.
10172 (c_pretty_printer::c_pretty_printer): Do not assign to
10173 unary_expression, multiplicative_expression,
10174 conditional_expression, expression.
10176 2013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
10178 * c-pretty-print.h (c_pretty_printer::postfix_expression): Now a
10179 virtual member function.
10180 (pp_postfix_expression): Adjust.
10181 (pp_c_postfix_expression): Remove.
10182 * c-pretty-print.c (c_pretty_printer::postfix_expression): Rename
10183 from pp_c_postfix_expression. Adjust.
10184 (c_pretty_printer::c_pretty_printer): Do not assign to
10185 postfix_expression.
10187 2013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
10189 * c-pretty-print.h (c_pretty_printer::primary_expression): Now a
10190 virtua member function.
10191 (pp_primary_expression): Adjust.
10192 (pp_c_primary_expression): Remove.
10193 * c-pretty-print.c (c_pretty_printer::primary_expression): Rename
10194 from pp_c_primary_expression. Adjust.
10195 (pp_c_initializer_list): Use pp_primary_expression.
10196 (c_pretty_printer::c_pretty_printer): Do not assign to
10197 primary_expression.
10199 2013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
10201 * c-pretty-print.h (c_pretty_printer::translate_string): Declare.
10202 * c-pretty-print.c (M_): Remove.
10203 (c_pretty_printer::translate_string): Define.
10204 (pp_c_type_specifier): Use it.
10205 (pp_c_primary_expression): Likewise.
10206 (pp_c_expression): Likewise.
10208 2013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
10210 * c-pretty-print.h (c_pretty_printer::id_expression): Now a
10212 (pp_c_id_expression): Remove.
10213 (pp_id_expression): Adjust.
10214 * c-pretty-print.c (c_pretty_printer::id_expression): Rename from
10215 pp_c_id_expression. Adjust.
10216 (pp_c_postfix_expression): Use pp_id_expression.
10217 (c_pretty_printer::c_pretty_printer): Do not assign to id_expression.
10219 2013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
10221 * c-pretty-print.h (c_pretty_printer::constant): Now a virtual
10223 (pp_constant): Adjust.
10224 (pp_c_constant): Remove.
10225 * c-pretty-print.c (c_pretty_printer::constant): Rename from
10226 pp_c_constant. Adjust.
10228 (pp_c_primary_expression): Call pp_constant in lieu of pp_c_constant.
10229 (c_pretty_printer::c_pretty_printer): Remove assignment to constant.
10231 2013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
10233 * c-pretty-print.h (pp_c_pretty_printer_init): Remove.
10234 (c_pretty_printer::c_pretty_printer): Declare.
10235 * c-pretty-print.c (pretty_printer::c_pretty_printer): Rename from
10236 c_pretty_printer_init. Adjust.
10237 (print_c_tree): Do not call c_pretty_printer_init.
10238 * c-ada-spec.c (dump_ads): Remove call to pp_construct.
10240 2013-08-09 Arnaud Charlet <charlet@adacore.com>
10242 * c-ada-spec.c (print_ada_declaration): Prevent accessing null asm name
10244 2013-08-05 Paolo Carlini <paolo.carlini@oracle.com>
10247 * c-common.c (pointer_int_sum): Add bool parameter.
10248 * c-common.h (pointer_int_sum): Adjust declaration.
10250 2013-08-05 Gabriel Dos Reis <gdr@integrable-solutions.net>
10252 * c-pretty-print.c (print_c_tree): Simplify. Use non-static local
10253 c_pretty_printer variable.
10255 2013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
10257 * c-pretty-print.h (c_pretty_printer): Derive from pretty_printer.
10259 (pp_c_base): Likewise. Adjust users.
10260 * c-pretty-print.c (pp_c_maybe_whitespace): Adjust.
10261 (pp_c_whitespace): Do not call pp_base.
10262 (pp_c_left_paren): Likewise.
10263 (pp_c_right_paren): Likewise.
10264 (pp_c_left_brace): Likewise.
10265 (pp_c_right_brace): Likewise.
10266 (pp_c_left_bracket): Likewise.
10267 (pp_c_right_bracket): Likewise.
10268 (pp_c_dot): Likewise.
10269 (pp_c_ampersand): Likewise.
10270 (pp_c_star): Likewise.
10271 (pp_c_arrow): Likewise.
10272 (pp_c_semicolon): Likewise.
10273 (pp_c_complement): Likewise.
10274 (pp_c_exclamation): Likewise.
10275 (pp_c_direct_declarator): Likewise.
10276 (pp_c_ws_string): Likewise.
10277 (pp_c_identifier): Likewise.
10278 (pp_c_statement): Likewise.
10279 (print_c_tree): Likewise.
10281 2013-08-04 Ed Smith-Rowland <3dw4rd@verizon.net>
10284 * c-common.c (c_parse_error): Catch user-defined literal tokens and
10285 provide useful error strings.
10287 2013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
10289 * c-ada-spec.c (pp_ada_tree_identifier): Use specialized pretty
10290 printer functions instead of pp_string or operators and punctuators.
10291 (dump_generic_ada_node): Likewise.
10292 * c-pretty-print.c (pp_c_type_specifier): Likewise.
10293 (pp_c_relational_expression): Likewise.
10294 (pp_c_logical_or_expression): Likewise.
10296 2013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
10298 * c-ada-spec.c (print_ada_macros): Use specialized pretty printer
10299 functions instead of pp_character.
10300 (pp_ada_tree_identifier): Likewise.
10301 (dump_ada_double_name): Likewise.
10302 (dump_ada_function_declaration): Likewise.
10303 (dump_ada_array_domains): Likewise.
10304 (dump_template_types): Likewise.
10305 (dump_generic_ada_node): Likewise.
10306 (print_ada_declaration): Likewise.
10307 (print_ada_struct_decl): Likewise.
10308 * c-pretty-print.c (pp_c_integer_constant): Likewise.
10310 2013-07-23 Tom Tromey <tromey@redhat.com>
10312 * c-common.h (enum rid) <RID_GENERIC>: New constant.
10313 * c-common.c (c_common_reswords): Add _Generic.
10315 2013-07-21 OndÅ
\99ej BÃlka <neleai@seznam.cz>
10317 * c-common.c: Fix typos.
10318 * c-common.h: Likewise.
10320 2013-07-13 Lubos Lunak <l.lunak@suse.cz>
10323 * c-common.c (c_common_attribute_table): Add warn_unused.
10324 (handle_warn_unused_attribute): New.
10326 2013-07-10 Jakub Jelinek <jakub@redhat.com>
10328 * c-ppoutput.c (scan_translation_unit): Call account_for_newlines
10329 for all CPP_TOKEN_FLD_STR tokens, not just CPP_COMMENT.
10331 2013-07-10 Paolo Carlini <paolo.carlini@oracle.com>
10334 * c.opt: Add Wconditionally-supported.
10336 2013-07-08 Graham Stott <graham.stott@btinternet.com>
10338 * array-notation-common.c (length_mismatch_in_expr_p): Delete
10339 unused variables l_length and l_node.
10341 2013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
10344 * c-common.c (complete_array_type): Delay folding first index
10345 like other indices. When folding, check for index overflow.
10347 2013-06-27 Marc Glisse <marc.glisse@inria.fr>
10350 * c-common.h (c_build_vec_perm_expr): New complain argument.
10351 * c-common.c (c_build_vec_perm_expr): Likewise.
10352 Use save_expr also in C++.
10354 2013-06-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
10356 * c-common.c (c_common_nodes_and_builtins): Use cxx11 in lieu of cxx0x.
10357 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
10358 * c-opts.c (c_common_post_options): Likewise.
10360 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
10362 * array-notation-common.c (length_mismatch_in_expr): Changed the
10363 parameter type's from a dynamic array to a vec_tree. Also removed
10364 the size parameters.
10365 * c-common.h (length_mismatch_in_expr_p): Fixed prototype's as per
10368 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
10370 * c-common.h (struct cilkplus_an_parts): New structure.
10371 (struct cilkplus_an_loop_parts): Likewise.
10372 (cilkplus_extract_an_triplets): New prototype.
10373 (fix_sec_implicit_args): Likewise.
10374 * array-notation-common.c (cilkplus_extract_an_triplets): New function.
10375 (fix_sec_implicit_args): Likewise.
10377 2013-06-20 Balaji V. Iyer <balaji.v.iyer@intel.com>
10379 * array-notation-common.c (find_inv_trees): Removed an unwanted
10381 * c-common.h (struct inv_list::additional_tcodes): Changed type from
10382 enum rid to enum tree_code.
10384 2013-06-11 Jan Hubicka <jh@suse.cz>
10386 * c-common.c (handle_alias_ifunc_attribute): Do not set
10387 DECL_EXTERNAL for weakref variables.
10388 * c-pragma.c (handle_pragma_weak): Make sure aliases
10389 are not declared as external.
10391 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
10393 * array-notation-common.c (length_mismatch_in_expr_p): Moved this
10394 function from c/c-array-notation.c.
10395 (is_cilkplus_reduce_builtin): Likewise.
10396 (find_rank): Likewise.
10397 (extract_array_notation_exprs): Likewise.
10398 (replace_array_notations): Likewise.
10399 (find_inv_trees): Likewise.
10400 (replace_inv_trees): Likewise.
10401 (contains_array_notation_expr): Likewise.
10402 (find_correct_array_notation_type): Likewise.
10403 * c-common.h (struct inv_list): Moved this struct from the file
10404 c/c-array-notation.c and added a new field called additional tcodes.
10405 (length_mismatch_in_expr_p): New prototype.
10406 (is_cilkplus_reduce_builtin): Likewise.
10407 (find_rank): Likewise.
10408 (extract_array_notation_exprs): Likewise.
10409 (replace_array_notation): Likewise.
10410 (find_inv_trees): Likewise.
10411 (replace_inv_trees): Likewise.
10412 (find_correct_array_notation_type): Likewise.
10414 2013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
10416 * c-common.c (c_define_builtins): When cilkplus is enabled, the
10417 function array_notation_init_builtins is called.
10418 (c_common_init_ts): Added ARRAY_NOTATION_REF as typed.
10419 * c-common.def (ARRAY_NOTATION_REF): New tree.
10420 * c-common.h (build_array_notation_expr): New function declaration.
10421 (build_array_notation_ref): Likewise.
10422 (extract_sec_implicit_index_arg): New extern declaration.
10423 (is_sec_implicit_index_fn): Likewise.
10424 (ARRAY_NOTATION_CHECK): New define.
10425 (ARRAY_NOTATION_ARRAY): Likewise.
10426 (ARRAY_NOTATION_START): Likewise.
10427 (ARRAY_NOTATION_LENGTH): Likewise.
10428 (ARRAY_NOTATION_STRIDE): Likewise.
10429 * c-pretty-print.c (pp_c_postifix_expression): Added a new case for
10430 ARRAY_NOTATION_REF.
10431 (pp_c_expression): Likewise.
10432 * c.opt (flag_enable_cilkplus): New flag.
10433 * array-notation-common.c: New file.
10435 2013-05-14 Jakub Jelinek <jakub@redhat.com>
10438 * c-common.c (verify_tree): Don't recurse into SIZEOF_EXPR.
10440 2013-05-10 Marc Glisse <marc.glisse@inria.fr>
10442 * c-common.c (vector_types_convertible_p): No TYPE_PRECISION for
10445 2013-05-07 Han Shen <shenhan@google.com>
10447 * c-cppbuiltin.c (c_cpp_builtins): Added "__SSP_STRONG__=3".
10449 2013-04-29 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
10451 * c-common.c (check_user_alignment): Emit error for negative values.
10453 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
10455 * c-opts.c (set_std_cxx11): Use CLK_CXX1Y and CLK_GNUCXX1Y.
10457 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
10459 * c-cppbuiltin.c (c_cpp_builtins): Do not define
10460 __GXX_EXPERIMENTAL_CXX1Y__.
10462 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
10463 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
10465 * c.opt ([Wpointer-arith]): Enabled by -Wpedantic, as documented.
10466 * c-common.c (pointer_int_sum): Change -Wpointer-arith pedwarns
10467 to simply use OPT_Wpointer_arith.
10468 (c_sizeof_or_alignof_type): Likewise.
10470 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
10472 * c-cppbuiltin.c (c_cpp_builtins): Define __GXX_EXPERIMENTAL_CXX1Y__.
10474 2013-04-12 Jakub Jelinek <jakub@redhat.com>
10476 * c-format.c (gcc_diag_char_table, gcc_tdiag_char_table,
10477 gcc_cdiag_char_table, gcc_cxxdiag_char_table): Add %r and %R format
10480 2013-04-07 Steven Bosscher <steven@gcc.gnu.org>
10482 * c-pragma.c (add_to_renaming_pragma_list): Fix leading comment.
10484 2013-04-03 Paolo Carlini <paolo.carlini@oracle.com>
10486 * c-common.c (pointer_int_sum): Remove dead code.
10488 2013-03-09 Richard Sandiford <rdsandiford@googlemail.com>
10490 PR middle-end/56524
10491 * c-common.c (handle_optimize_attribute): Don't call
10492 save_optabs_if_changed.
10494 2013-03-05 Jakub Jelinek <jakub@redhat.com>
10496 PR middle-end/56461
10497 * c-pch.c (pch_init): Free target_validity at the end.
10499 2013-03-04 Jakub Jelinek <jakub@redhat.com>
10501 * c-pretty-print.c (pp_c_pretty_printer_init): Clear pp->flags.
10503 2013-02-28 Konstantin Serebryany <konstantin.s.serebryany@gmail.com>
10504 Jakub Jelinek <jakub@redhat.com>
10507 * c-common.c (handle_no_sanitize_address_attribute): New function.
10508 (c_common_attribute_table): Add no_sanitize_address attribute.
10509 (handle_no_address_safety_analysis_attribute): Add
10510 no_sanitize_address attribute, not no_address_safety_analysis
10513 2013-02-18 Aldy Hernandez <aldyh@redhat.com>
10516 * c-common.c (handle_optimize_attribute): Call
10517 save_optabs_if_changed.
10519 2013-02-18 Jakub Jelinek <jakub@redhat.com>
10520 Steven Bosscher <steven@gcc.gnu.org>
10523 * c-opts.c (c_common_post_options): If debug info is enabled
10524 and non-dwarf*, refuse to load PCH files and when writing PCH
10527 2013-02-05 Jakub Jelinek <jakub@redhat.com>
10529 PR middle-end/56167
10530 * c-common.c (handle_error_attribute): Fix condition.
10532 2013-01-30 Jakub Jelinek <jakub@redhat.com>
10535 * c-common.c (handle_target_attribute): Revert 2012-12-26 change.
10537 2013-01-18 Jason Merrill <jason@redhat.com>
10540 * c.opt (-fextern-tls-init): New.
10541 * c-opts.c (c_common_post_options): Handle it.
10543 2013-01-09 Jakub Jelinek <jakub@redhat.com>
10546 * c-common.c (c_fully_fold_internal): Warn for LSHIFT_EXPR and
10547 RSHIFT_EXPR, if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST
10548 and is either negative or bigger or equal to type precision
10549 of the first operand.
10551 2012-12-03 Marek Polacek <polacek@redhat.com>
10554 * c-common.c (check_user_alignment): Swap order of tests,
10555 check TREE_CODE first.
10557 2012-11-29 Ed Smith-Rowland <3dw4rd@verizon.net>
10560 * c-common.h (overflow_type): New enum.
10561 (build_userdef_literal): Add overflow_type argument.
10562 (tree_userdef_literal): Add overflow_type.
10563 (USERDEF_LITERAL_OVERFLOW): New access macro.
10564 * c-common.c (build_userdef_literal): Add overflow_type
10566 * c-lex.c (c_lex_with_flags): Add overflow_type to
10567 build_userdef_literal calls.
10568 (interpret_integer, interpret_float): Add overflow_type argument.
10570 2012-11-28 Richard Biener <rguenther@suse.de>
10573 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
10574 here and use a type with proper overflow behavior for types that would
10575 need to be promoted for the arithmetic.
10577 2012-11-23 Jakub Jelinek <jakub@redhat.com>
10580 * c-common.c (handle_no_address_safety_analysis_attribute): New
10582 (c_common_attribute_table): Add no_address_safety_analysis.
10584 2012-11-16 Simon Baldwin <simonb@google.com>
10586 * c.opt: Add f[no-]canonical-system-headers.
10587 * c-opts.c (c_common_handle_option): Handle
10588 OPT_fcanonical_system_headers.
10590 2012-11-09 Ed Smith-Rowland <3dw4rd@verizon.net>
10593 * c-opts.c (c_common_handle_option): Set new flags.
10594 * c.opt: Describe new flags.
10596 2012-11-09 Jason Merrill <jason@redhat.com>
10598 * c.opt (Wabi-tag): New.
10600 2012-11-09 Andi Kleen <ak@linux.intel.com>
10603 * c-common.c (get_atomic_generic_size): Mask with
10606 2012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
10609 * c.opt (Wformat): Make it Alias Wformat=1.
10610 (Wformat-contains-nul,Wformat-extra-args,Wformat-nonliteral,
10611 Wformat-security,Wformat-y2k,Wformat-zero-length): Use
10613 (Wformat=): RejectNegative. Use LangEnabledBy.
10614 (Wnonnull): Use LangEnabledBy.
10615 * c-opts.c (c_common_handle_option): Do not handle Wformat here.
10616 * c-format.c (set_Wformat): Delete.
10617 (decode_format_attr): Replace OPT_Wformat with OPT_Wformat_.
10618 (maybe_read_dollar_number): Likewise.
10619 (avoid_dollar_number): Likewise.
10620 (finish_dollar_format_checking): Likewise.
10621 (check_format_info): Likewise.
10622 (check_format_info_main): Likewise.
10623 (check_format_types): Likewise.
10624 (format_type_warning): Likewise.
10625 * c-common.c (int): Likewise.
10626 (check_function_sentinel): Likewise.
10627 * c-common.h (warn_format,set_Wformat): Do not declare here.
10629 2012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
10632 * c.opt(Warray-bounds,Wdelete-non-virtual-dtor,Wenum-compare,
10633 Wmain,Woverlength-strings, Wunknown-pragmas,Wunused-macros):
10635 (Wswitch,Wswitch-default,Wswitch-enum): Likewise. Move here from
10637 (Wvariadic-macros): Init(1).
10638 * c-opts.c (c_common_handle_option): Do not handle them
10640 (c_common_post_options): Likewise.
10641 (sanitize_cpp_opts): warn_unused_macros is now
10642 cpp_warn_unused_macros.
10643 (push_command_line_include): Likewise.
10644 * c-common.c (warn_unknown_pragmas): Do not define.
10645 * c-common.h (warn_unknown_pragmas): Do not declare.
10647 2012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
10650 * c-common.c (conversion_warning): Handle conditional expressions.
10652 2012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
10655 * c.opt (Wreturn_local_addr): Define new option.
10657 2012-10-25 Jason Merrill <jason@redhat.com>
10659 * c.opt (Wvirtual-move-assign): New.
10661 * c.opt (Winherited-variadic-ctor): New.
10663 2012-10-25 Marc Glisse <marc.glisse@inria.fr>
10666 * c-common.c (scalar_to_vector): Handle VEC_COND_EXPR.
10668 2012-10-23 Joseph Myers <joseph@codesourcery.com>
10670 * c-common.h (pch_cpp_save_state): Declare.
10671 * c-target.def (c_preinclude): New hook.
10672 * c-opts.c (done_preinclude): New.
10673 (push_command_line_include): Handle default preincluded header.
10674 (cb_file_change): Call pch_cpp_save_state when calling
10675 push_command_line_include.
10676 * c-pch.c (pch_ready_to_save_cpp_state, pch_cpp_state_saved)
10677 (pch_cpp_save_state): New.
10678 (pch_init): Call pch_cpp_save_state conditionally, instead of
10679 calling cpp_save_state.
10681 2012-10-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
10685 * c.opt (Waddress,Wchar-subscripts,Wsign-conversion,Wimplicit,
10686 Wimplicit-function-declaration,Wimplicit-int,Wsizeof-pointer-memaccess,
10687 Wnarrowing,Wparentheses,Wpointer-sign,Wreturn-type,Wsequence-point,
10688 Wsign-compare,Wuninitialized,Wmaybe-uninitialized,Wunused,
10689 Wvolatile-register-var): Add LangEnabledBy or EnabledBy.
10690 * c-opts.c (c_common_handle_option): Remove explicit handling from
10692 (c_common_post_options): Likewise.
10694 2012-10-18 Eric Botcazou <ebotcazou@adacore.com>
10696 * c-ada-spec.c (LOCATION_COL): Delete.
10697 (compare_location): New function.
10698 (compare_node): Use it.
10699 (compare_comment): Likewise.
10701 2012-10-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
10705 * c.opt (Wstrict-aliasing=,Wstrict-overflow=): Use LangEnabledBy.
10706 * c-opts.c (c_common_handle_option): Do not set them here. Add
10708 (c_common_post_options): Likewise.
10710 2012-10-16 Eric Botcazou <ebotcazou@adacore.com>
10712 * c-ada-spec.c (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Define.
10713 (dump_generic_ada_node) <INTEGER_CST>: Deal with sizetype specially.
10714 Remove POINTER_TYPE handling, add large unsigned handling and use
10715 ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX for big numbers.
10717 2012-10-12 Jakub Jelinek <jakub@redhat.com>
10720 * c-common.h (sizeof_pointer_memaccess_warning): Adjust prototype.
10721 * c-common.c (sizeof_pointer_memaccess_warning): Take array of 3
10722 locs and array of 3 trees instead of just single loc and single
10723 sizeof_arg tree. Handle __builtin___*_chk builtins too, and
10724 also stpncpy, bcopy, bcmp, bzero, snprintf and vsnprintf builtins.
10725 For *cmp* builtins that take two sources strings report warnings
10726 about first and second source, not about destination and source.
10728 2012-10-12 Marc Glisse <marc.glisse@inria.fr>
10731 * c-common.h (enum ref_operator) [RO_ARROW_STAR]: New.
10733 2012-10-11 Eric Botcazou <ebotcazou@adacore.com>
10735 * c-ada-spec.c (dump_ada_template): Bail out for template declarations
10736 declaring something coming from another file.
10738 2012-10-10 Arnaud Charlet <charlet@adacore.com>
10741 * c-ada-spec.c (print_ada_struct_decl): Increase buf size.
10743 2012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
10746 * c-common.c (warn_about_parentheses): Add location_t parameter;
10747 use EXPR_LOC_OR_LOC.
10748 * c-common.h: Update declaration.
10750 2012-10-09 Marc Glisse <marc.glisse@inria.fr>
10753 * c-common.c (scalar_to_vector): Moved from c-typeck.c. Support
10754 more operations. Make error messages optional.
10755 * c-common.h (enum stv_conv): Moved from c-typeck.c.
10756 (scalar_to_vector): Declare.
10758 2012-10-08 Jason Merrill <jason@redhat.com>
10760 * c-common.c (c_common_reswords): Add thread_local.
10762 2012-10-08 Dodji Seketeli <dodji@redhat.com>
10764 PR c++/53528 C++11 attribute support
10765 * c-common.h (bitfield_p, cxx_fundamental_alignment_p): Declare
10767 * c-common.c (check_cxx_fundamental_alignment_constraints): New
10769 (handle_aligned_attribute): In choose strictest alignment
10770 among many. Use new check_cxx_fundamental_alignment_constraints.
10771 (handle_transparent_union_attribute): In c++11 attribute syntax,
10772 don't look through typedefs.
10774 2012-10-04 Arnaud Charlet <charlet@adacore.com>
10776 * c-ada-spec.c (print_ada_declaration): Remove handling of TDF_RAW.
10777 * c.opt (-fdump-ada-spec, -fdump-ada-spec-slim): Move switch definition
10780 2012-09-25 Dehao Chen <dehao@google.com>
10782 PR middle-end/54645
10783 * c-pch.c (c_common_read_pch): Rebuild the location_adhoc_data
10784 map when read in the pch.
10786 2012-09-18 Arnaud Charlet <charlet@adacore.com>
10788 * c-ada-spec.c: Style fixes.
10790 2012-09-18 Thomas Quinot <quinot@adacore.com>
10792 * c.opt (-fada-spec-parent): Define new command line switch.
10793 * c-ada-spec.c (get_ada_package): When -fada-spec-parent
10794 is specified, generate binding spec as a child of the specified unit.
10796 2012-09-13 Paolo Carlini <paolo.carlini@oracle.com>
10797 Manuel López-Ibáñez <manu@gcc.gnu.org>
10800 * c.opt ([Winit-self]): Enabled by -Wall in C++.
10802 2012-08-23 Arnaud Charlet <charlet@adacore.com>
10804 * c-ada-spec.c (dump_generic_ada_node): Fix handling of name_only
10805 for pointers, and add missing Convention C pragma.
10806 (print_ada_struct_decl): Add missing aliased keyword.
10807 (dump_ads): Add pragma Ada_2005 and Style_Checks (Off).
10809 2012-08-17 Jakub Jelinek <jakub@redhat.com>
10811 * c-common.c (sizeof_pointer_memaccess_warning): New function.
10812 * c.opt (-Wsizeof-pointer-memaccess): Add new option.
10813 * c-opts.c (c_common_handle_option): Enable it for -Wall.
10814 * c-common.h (sizeof_pointer_memaccess_warning): Add prototype.
10815 * c-common.def (SIZEOF_EXPR): Moved here from cp-tree.def.
10817 2012-08-10 Richard Guenther <rguenther@suse.de>
10819 * c-pretty-print.c (pp_c_expression): Handle anonymous SSA names.
10821 2012-08-07 Steven Bosscher <steven@gcc.gnu.org>
10823 * c-pretty-print.c (pp_c_function_definition): Use pp_newline_and_flush
10824 instead of separate pp_newline and pp_flush.
10825 (print_c_tree): Likewise.
10827 2012-07-26 Richard Henderson <rth@redhat.com>
10829 * c-common.c (handle_hot_attribute): Allow labels.
10830 (handle_cold_attribute): Likewise.
10832 2012-07-20 Jakub Jelinek <jakub@redhat.com>
10835 * c-common.c (check_function_nonnull): Handle multiple nonnull
10836 attributes properly.
10838 2012-07-16 Steven Bosscher <steven@gcc.gnu.org>
10840 * c-gimplify.c: Include dumpfile.h instead of tree-dump.h.
10841 * c-ada-spec.c: Likewise.
10842 * c-dump.c (dump_stmt): Move to cp/dump.c, the only user.
10844 2012-07-14 Steven Bosscher <steven@gcc.gnu.org>
10846 * c-pch.c (CHECK_NO_ASM_OUT_DURING_PCH): Do not define.
10847 Remove code conditional on it.
10849 2012-07-11 Steven Bosscher <steven@gcc.gnu.org>
10851 * c-gimplify.c: Do not include basic-block.h.
10852 * c-common.c: Do not include linfuncs.h.
10854 2012-07-08 Steven Bosscher <steven@gcc.gnu.org>
10856 * c-common.h: Include tree.h.
10858 2012-07-02 Jason Merrill <jason@redhat.com>
10861 * c-common.c (get_priority): Call default_conversion.
10863 2012-07-01 Uros Bizjak <ubizjak@gmail.com>
10865 * c-pch.c (c_common_write_pch): Remove unused variables.
10867 2012-06-29 Steven Bosscher <steven@gcc.gnu.org>
10869 * cppspec.c: Moved from gcc/ to here.
10871 2012-06-27 Kai Tietz <ktietz@redhat.com>
10873 PR preprocessor/37215
10874 * c-ppoutput.c (preprocess_file): Check for nonempty buffer.
10876 2012-06-21 Steven Bosscher <steven@gcc.gnu.org>
10878 * c-common.h (c_common_print_pch_checksum): Remove.
10879 * c-pch.c: Do not include output.h.
10880 (CHECK_NO_ASM_OUT_DURING_PCH): Define and add FIXME.
10881 (asm_out_file): Define iff CHECK_NO_ASM_OUT_DURING_PCH isdefined.
10882 (asm_file_startpos): Define iff CHECK_NO_ASM_OUT_DURING_PCH is defined.
10883 (struct c_pch_header): Remove.
10884 (get_ident): Update gpch version.
10885 (pch_init): Do not print executable_checksum to asm_out_file.
10886 Do not fail if there is no asm_out_file to read back from. Set
10887 asm_file_startpos only if CHECK_NO_ASM_OUT_DURING_PCH is defined.
10888 (c_common_write_pch): Verify that nothing was written to asm_out_file
10889 since pch_init was called. Do not write a c_pch_header, and do not
10890 copy from asm_out_file to the PCH.
10891 (c_common_read_pch): Do not read a c_pch_header, and do not restore
10892 the content of asm_out_file from the PCH.
10893 (c_common_print_pch_checksum): Remove.
10894 * c-opts.c (c_common_init): Print out executable_checksum directly.
10896 2012-06-19 Steven Bosscher <steven@gcc.gnu.org>
10898 * c-target.def (objc_declare_unresolved_class_reference,
10899 objc_declare_class_definition): Add new hooks.
10901 2012-06-19 Steven Bosscher <steven@gcc.gnu.org>
10903 * c-lex.c: Do not include output.h.
10904 (cb_ident): Try to put out .ident with targetm.asm_out.output_ident.
10905 Remove uses of ASM_OUTPUT_IDENT.
10907 2012-06-15 Marc Glisse <marc.glisse@inria.fr>
10910 * c-common.h (c_build_vec_perm_expr): Move decl here.
10911 * c-common.c (c_build_vec_perm_expr): Move definition
10914 2012-06-06 Steven Bosscher <steven@gcc.gnu.org>
10916 * c.opt (fconserve-space): Turn into a no-op.
10918 2012-06-04 Sterling Augustine <saugustine@google.com>
10920 * c-pretty-print.h (pp_c_flag_gnu_v3): New enumerator.
10921 * c-pretty-print.c (pp_c_specifier_qualifier_list): Check it at
10922 both the start and end of the function.
10924 2012-06-04 Steven Bosscher <steven@gcc.gnu.org>
10926 * c-common.c: Do not include output.h.
10927 * c-pragma.c: Likewise.
10929 2012-06-04 Steven Bosscher <steven@gcc.gnu.org>
10931 * error.c (dump_decl): Check pp_c_flag_gnu_v3.
10932 (decl_as_dwarf_string, lang_decl_dwarf_name): New functions.
10933 (lang_decl_name): Handle namespace decls.
10935 2012-05-31 Steven Bosscher <steven@gcc.gnu.org>
10937 * c-ada-spec.c: Do not include output.h.
10938 * c-semantics.c: Likewise.
10940 2012-05-29 Joseph Myers <joseph@codesourcery.com>
10942 * c-common.c: Fix typo.
10944 2012-05-29 Michael Matz <matz@suse.de>
10946 * c-common.h (c_expand_decl): Remove prototype.
10948 2012-05-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
10950 * c.opt (Wmissing-braces): Use LangEnabledBy(C ObjC,Wall).
10951 * c-opts.c (c_common_handle_option): Remove code handling
10952 warn_missing_braces.
10954 2012-05-28 Paolo Carlini <paolo.carlini@oracle.com>
10957 * c-opts.c (c_common_handle_option): For C++ -Wall doesn't enable
10960 2012-05-22 Dodji Seketeli <dodji@redhat.com>
10963 * c.opt (Wunused-local-typedefs): Use EnabledBy(Wunused).
10965 2012-05-17 Manuel López-Ibáñez <manu@gcc.gnu.org>
10967 * c.opt (--pedantic-errors,-pedantic-errors): Do not handle here.
10968 * c-opts.c (c_common_handle_option): Do not handle explicitly
10969 Wreturn-type, Wwrite-strings, warn_ecpp, and -pedantic-errors.
10971 2012-05-16 Dodji Seketeli <dodji@redhat.com>
10973 PR preprocessor/7263
10974 * c-lex.c (c_lex_with_flags): Pass a virtual location to the call
10975 to cpp_classify_number. For diagnostics, use the precise location
10976 instead of the global input_location.
10978 2012-05-15 Paolo Carlini <paolo.carlini@oracle.com>
10981 * c-common.c (shorten_compare): Check c_inhibit_evaluation_warnings.
10983 2012-05-14 Bernd Schmidt <bernds@codesourcery.com>
10985 * c-common.c (DEF_ATTR_STRING): Define and undefine as necessary.
10987 2012-05-14 Manuel López-Ibáñez <manu@gcc.gnu.org>
10990 * c.opt (Wc++0X-compat,Wdelete-non-virtual-dtor,Wjump-misses-init,
10991 Wreorder): Use LangEnabledBy.
10992 * c-opts.c (c_common_handle_option): Do not enable them
10993 explicitly. Call lang-specific generated functions.
10994 (c_common_post_options): Do not set them here.
10996 2012-05-13 Manuel López-Ibáñez <manu@gcc.gnu.org>
10998 * c.opt (Wclobbered,Wempty-body,Wignored-qualifiers,
10999 Wmissing-field-initializers,Wmissing-parameter-type,
11000 Wold-style-declaration,Woverride-init): Use EnabledBy.
11001 * c-opts.c (c_common_post_options): Do not set here explicitly.
11003 2012-05-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
11006 * c-opts.c (c_common_handle_option): Use handle_generated_option
11007 to enable sub-options.
11009 2012-05-10 Paolo Carlini <paolo.carlini@oracle.com>
11012 * c-common.c (warnings_for_convert_and_check): Use warning_at.
11014 2012-05-10 Richard Guenther <rguenther@suse.de>
11016 * c-common.c (c_sizeof_or_alignof_type): Remove assert and
11017 adjust commentary about TYPE_IS_SIZETYPE types.
11019 2012-05-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
11022 * c-common.c (warn_logical_operator): Check that argument of
11023 integer_zerop is not NULL.
11025 2012-05-05 Manuel López-Ibáñez <manu@gcc.gnu.org>
11028 * c-common.c (warn_logical_operator): Do not warn if either side
11029 is already true or false.
11031 2012-05-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
11034 * c-common.c (expr_original_type): New.
11035 (shorten_compare): Do not warn for enumeration types.
11037 2012-05-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
11039 * c.opt (fpermissive): Add Var(flag_permissive).
11041 2012-04-30 Marc Glisse <marc.glisse@inria.fr>
11044 * c-common.c (convert_vector_to_pointer_for_subscript): New function.
11045 * c-common.h (convert_vector_to_pointer_for_subscript): Declare it.
11047 2012-04-30 Dodji Seketeli <dodji@redhat.com>
11049 Add -Wvarargs option
11050 * c.opt (Wvarargs): Define new option.
11052 2012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
11054 * c-common.c (check_function_arguments): Replace
11055 Wmissing-format-attribute with Wsuggest-attribute=format.
11057 2012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
11059 * c.opt (Wsuggest-attribute=format): New. Alias of
11060 Wmissing-format-attribute.
11061 * c-format.c (decode_format_type): Replace
11062 Wmissing-format-attribute with Wsuggest-attribute=format.
11063 (check_function_format): Likewise.
11065 2012-04-27 Ollie Wild <aaw@google.com>
11067 * c-common.c: Add CPP_W_LITERAL_SUFFIX mapping.
11068 * c-opts.c (c_common_handle_option): Handle OPT_Wliteral_suffix.
11069 * c.opt: Add Wliteral-suffix.
11071 2012-04-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
11074 * c.opt (Wpedantic): New.
11075 (pedantic): Alias Wpedantic.
11076 * c-opts.c (c_common_handle_option): Replace -pedantic with -Wpedantic.
11077 (c_common_post_options): Likewise.
11078 (sanitize_cpp_opts): Likewise.
11079 * c-lex.c (interpret_float): Likewise.
11080 * c-format.c (check_format_types): Likewise.
11081 * c-common.c (pointer_int_sum): Likewise.
11082 (c_sizeof_or_alignof_type): Likewise.
11083 (c_add_case_label): Likewise.
11084 (c_do_switch_warnings): Likewise.
11085 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
11087 2012-04-15 Jason Merrill <jason@redhat.com>
11090 * c-format.c (CPLUSPLUS_STD_VER): C++11 inherits from C99.
11091 (C_STD_NAME): Distinguish between C++98 and C++11.
11093 2012-04-11 Eric Botcazou <ebotcazou@adacore.com>
11096 * c-common.h (uint16_type_node): Rename into...
11097 (c_uint16_type_node): ...this.
11098 * c-common.c (c_common_nodes_and_builtins): Adjust for above renaming.
11099 * c-cppbuiltin.c (builtin_define_stdint_macros): Likewise.
11101 2012-04-10 Manuel López-Ibáñez <manu@gcc.gnu.org>
11103 * c-common.c (warn_if_unused_value): Move definition to here.
11104 * c-common.h (warn_if_unused_value): Move declaration to here.
11106 2012-03-23 William Bader <williambader@hotmail.com>
11108 * c-lex.c (c_lex_with_flags): Avoid declarations after stmts.
11110 2012-03-20 Jason Merrill <jason@redhat.com>
11112 * c-common.h (enum cxx_dialect): Add cxx1y.
11113 * c-common.c (c_common_nodes_and_builtins): Use >= for cxx_dialect
11115 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
11116 * c-opts.c (c_common_post_options): Likewise.
11117 (set_std_cxx1y): New.
11118 (c_common_handle_option): Call it.
11119 * c.opt (-std=c++1y, -std=gnu++1y): New flags.
11121 2012-03-19 Paolo Carlini <paolo.carlini@oracle.com>
11124 * c.opt ([Wuseless-cast]): Add.
11126 2012-03-16 Richard Guenther <rguenther@suse.de>
11128 * c-pretty-print.c (pp_c_initializer_list): Adjust.
11130 2012-03-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
11133 * c.opt (ftemplate-backtrace-limit) Add.
11135 2012-03-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11137 * c-cppbuiltin.c (c_cpp_builtins): Remove #pragma extern_prefix
11139 * c-pragma.c (handle_pragma_extern_prefix): Remove.
11140 (init_pragma): Don't register extern_prefix.
11142 2012-03-12 Richard Guenther <rguenther@suse.de>
11144 * c-common.c (c_common_get_narrower): Use c_common_type_for_size.
11145 (builtin_type_for_size): Likewise.
11147 2012-02-13 Jakub Jelinek <jakub@redhat.com>
11150 * c-common.c (sync_resolve_params): Don't decide whether to convert
11151 or not based on TYPE_SIZE comparison, convert whenever arg_type
11152 is unsigned INTEGER_TYPE.
11154 2012-02-06 Paolo Carlini <paolo.carlini@oracle.com>
11157 * c.opt ([Wunused-local-typedefs]): Fix description.
11159 2012-01-24 Mike Stump <mikestump@comcast.net>
11161 * c-common.c (c_common_type_for_mode): Match signed/unsigned types
11164 2012-01-18 Richard Guenther <rguenther@suse.de>
11166 * c-opts.c (c_common_post_options): Reset LTO flags if
11167 we are about to generate a PCH.
11169 2012-01-17 Paolo Carlini <paolo.carlini@oracle.com>
11172 * c-pretty-print.c (pp_c_integer_constant): For unsigned constants
11173 use pp_unsigned_wide_integer.
11175 2012-01-10 Richard Guenther <rguenther@suse.de>
11177 PR middle-end/51806
11178 * c-opts.c (c_common_handle_option): Move -Werror handling
11179 to language independent code.
11181 2012-01-05 Richard Guenther <rguenther@suse.de>
11183 PR middle-end/51764
11184 * c.opt (Wmudflap, fmudflap, fmudflapth, fmudflapir): Move here
11187 2011-12-30 Paolo Carlini <paolo.carlini@oracle.com>
11190 * c-common.c (c_sizeof_or_alignof_type): In C++ allow for alignof
11191 of array types with an unknown bound.
11193 2011-12-20 Joseph Myers <joseph@codesourcery.com>
11195 * c-common.c (flag_isoc99): Update comment to refer to C11.
11196 (flag_isoc1x): Change to flag_isoc11.
11197 * c-common.h (flag_isoc99): Update comment to refer to C11.
11198 (flag_isoc1x): Change to flag_isoc11.
11199 * c-cppbuiltin.c (cpp_atomic_builtins): Change comment to refer to
11201 * c-opts.c (set_std_c1x): Change to set_std_c11.
11202 (c_common_handle_option): Handle OPT_std_c11 and OPT_std_gnu11.
11204 (set_std_c89, set_std_c99, set_std_c11): Use flag_isoc11.
11205 (set_std_c1): Use CLK_STDC11 and CLK_GNUC11.
11206 * c.opt (std=c1x): Change to std=c11. Document as non-draft
11208 (std=c1x, std=iso9899:2011): Add as aliases of std=c11.
11209 (std=gnu1x): Change to std=gnu11. Refer to non-draft standard.
11210 (std=gnu1x): Make alias of std=gnu11.
11212 2011-12-19 Jason Merrill <jason@redhat.com>
11215 * c-common.c (handle_transparent_union_attribute): Check the first
11216 field if the type is complete.
11218 2011-12-15 Jonathan Wakely <jwakely.gcc@gmail.com>
11221 * c-common.c (RID_IS_FINAL): Add.
11222 * c-common.h (RID_IS_FINAL): Add.
11224 2011-11-30 Iain Sandoe <iains@gcc.gnu.org>
11226 * c.opt (fgnu-runtime): Provide full description.
11227 (fnext-runtime): Likewise.
11228 * c-opts.c (OPT_fgnu_runtime, OPT_fnext_runtime) Remove.
11230 2011-11-28 Andrew MacLeod <amacleod@redhat.com>
11232 * c-cpp-builtin.c (cpp_atomic_builtins):New. Emit all atomic
11233 predefines in one place. Add LOCK_FREE predefines.
11234 (c_cpp_builtins): Move Legacy HAVE_SYNC predefines to
11237 2011-11-24 Andrew MacLeod <amacleod@redhat.com>
11240 * c-common.c (get_atomic_generic_size): Check for various error
11242 (resolve_overloaded_atomic_exchange,
11243 resolve_overloaded_atomic_compare_exchange,
11244 resolve_overloaded_atomic_load, resolve_overloaded_atomic_store): Return
11245 error_mark_node for error conditions.
11247 2011-11-08 Richard Guenther <rguenther@suse.de>
11249 PR middle-end/51010
11250 * c-pretty-print.c (pp_c_expression): Handle SSA_NAMEs.
11252 2011-11-07 Richard Henderson <rth@redhat.com>
11253 Aldy Hernandez <aldyh@redhat.com>
11254 Torvald Riegel <triegel@redhat.com>
11256 Merged from transactional-memory.
11258 * c-common.c (handle_tm_wrap_attribute,
11259 handle_tm_attribute, ignore_attribute, parse_tm_stmt_attr): New.
11260 (struct c_common_reswords): Added __transaction* keywords.
11261 (struct c_common_attribute_table): Added transaction* and tm_regparm
11263 * c-common.h: Added RID_TRANSACTION*. Added TM_ATTR* and TM_STMT*
11265 (parse_tm_stmt_attr, tm_attr_to_mask, tm_mask_to_attr,
11266 find_tm_attribute): Declare.
11268 2011-11-07 Jason Merrill <jason@redhat.com>
11271 * c-common.c, c-common.h: Revert yesterday's changes.
11273 2011-11-06 Jason Merrill <jason@redhat.com>
11276 * c-common.c (decl_has_visibility_attr): Split out from...
11277 (c_determine_visibility): ...here.
11278 * c-common.h: Declare it.
11280 2011-11-06 Joseph Myers <joseph@codesourcery.com>
11282 * c-common.c (c_common_reswords): Add _Alignas and _Alignof.
11283 (c_sizeof_or_alignof_type): Diagnose alignof applied to a function
11285 (check_user_alignment): New. Split out of
11286 handle_aligned_attribute. Disallow integer constants with
11287 noninteger types. Conditionally allow zero.
11288 (handle_aligned_attribute): Use check_user_alignment.
11289 * c-common.h (RID_ALIGNAS, check_user_alignment): New.
11291 2011-11-06 Andrew MacLeod <amacleod@redhat.com>
11292 Richard Henderson <rth@redhat.com>
11294 Merged from cxx-mem-model.
11296 * c-cppbuiltin.c (c_cpp_builtins): Test both atomic and sync patterns.
11297 * c-common.c (sync_resolve_params, sync_resolve_return): Only tweak
11298 parameters that are the same type size.
11299 (get_atomic_generic_size): New. Find size of generic
11300 atomic function parameters and do typechecking.
11301 (add_atomic_size_parameter): New. Insert size into parameter list.
11302 (resolve_overloaded_atomic_exchange): Restructure __atomic_exchange to
11303 either __atomic_exchange_n or external library call.
11304 (resolve_overloaded_atomic_compare_exchange): Restructure
11305 __atomic_compare_exchange to either _n variant or external library call.
11306 (resolve_overloaded_atomic_load): Restructure __atomic_load to either
11307 __atomic_load_n or an external library call.
11308 (resolve_overloaded_atomic_store): Restructure __atomic_store to either
11309 __atomic_store_n or an external library call.
11310 (resolve_overloaded_builtin): Handle new __atomic builtins.
11312 2011-11-04 Eric Botcazou <ebotcazou@adacore.com>
11315 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Call fold_offsetof_1.
11316 (fold_offsetof_1): Make global. Remove STOP_REF argument and adjust.
11317 <INDIRECT_REF>: Return the argument.
11318 <ARRAY_REF>: Remove special code for negative offset.
11319 Call fold_build_pointer_plus instead of size_binop.
11320 (fold_offsetof): Remove STOP_REF argument and adjust.
11321 * c-common.h (fold_offsetof_1): Declare.
11322 (fold_offsetof): Remove STOP_REF argument.
11324 2011-11-02 Paolo Carlini <paolo.carlini@oracle.com>
11327 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
11328 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
11329 Wnarrowing for C++0x and C++98.
11330 * c.opt ([Wnarrowing]): Update.
11332 2011-11-01 Paolo Carlini <paolo.carlini@oracle.com>
11335 * c.opt: Add Wzero-as-null-pointer-constant.
11337 2011-10-31 Jason Merrill <jason@redhat.com>
11339 * c.opt (-fdeduce-init-list): Off by default.
11342 * c-common.h (cxx_dialect): Add cxx11 and cxx03.
11343 * c.opt: Add -std=c++11, -std=gnu++11, -std=gnu++03,
11344 and -Wc++11-compat.
11345 * c-opts.c (set_std_cxx11): Rename from set_std_cxx0x.
11347 2011-10-27 Roberto Agostino Vitillo <ravitillo@lbl.gov>
11350 * c.opt (fvisibility-inlines-hidden): Description change.
11352 2011-10-26 Ed Smith-Rowland <3dw4rd@verizon.net>
11354 Implement C++11 user-defined literals.
11355 * c-common.c (build_userdef_literal): New.
11356 * c-common.def: New tree code.
11357 * c-common.h (tree_userdef_literal): New tree struct and accessors.
11358 * c-lex.c (interpret_float): Add suffix parm.
11359 (c_lex_with_flags): Build literal tokens.
11361 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
11365 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
11368 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
11369 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
11370 Wnarrowing for C++0x and C++98.
11371 * c.opt ([Wnarrowing]): Update.
11373 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
11376 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
11377 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
11378 Wnarrowing for C++0x and C++98.
11379 * c.opt ([Wnarrowing]): Update.
11381 2011-10-21 Paolo Carlini <paolo.carlini@oracle.com>
11384 * c-common.c (conversion_warning): Remove code looking for
11385 artificial operands.
11387 2011-10-18 Dodji Seketeli <dodji@redhat.com>
11390 * c-lex.c (fe_file_change): Use LINEMAP_SYSP when
11391 !NO_IMPLICIT_EXTERN_C.
11393 2011-10-17 Michael Spertus <mike_spertus@symantec.com>
11395 * c-common.c (c_common_reswords): Add __bases,
11397 * c-common.h: Add RID_BASES and RID_DIRECT_BASES.
11399 2011-10-17 Paolo Carlini <paolo.carlini@oracle.com>
11402 * c.opt ([Wnonnull]): Add C++ and Objective-C++.
11404 2011-10-15 Tom Tromey <tromey@redhat.com>
11405 Dodji Seketeli <dodji@redhat.com>
11407 * c.opt (fdebug-cpp): New option.
11408 * c-opts.c (c_common_handle_option): Handle the option.
11409 * c-ppoutput.c (maybe_print_line_1): New static function. Takes an
11410 output stream in parameter. Factorized from ...
11411 (maybe_print_line): ... this. Dump location debug information when
11412 -fdebug-cpp is in effect.
11413 (print_line_1): New static function. Takes an output stream in
11414 parameter. Factorized from ...
11415 (print_line): ... here. Dump location information when -fdebug-cpp
11417 (scan_translation_unit): Dump location information when
11418 -fdebug-cpp is in effect.
11420 2011-10-15 Tom Tromey <tromey@redhat.com>
11421 Dodji Seketeli <dodji@redhat.com>
11423 * c.opt (ftrack-macro-expansion): New option. Handle it with and
11425 * c-opts.c (c_common_handle_option)<case
11426 OPT_ftrack_macro_expansion_, case OPT_ftrack_macro_expansion>: New
11427 cases. Handle -ftrack-macro-expansion with and without argument.
11429 2011-10-15 Tom Tromey <tromey@redhat.com>
11430 Dodji Seketeli <dodji@redhat.com>
11432 * c-ppoutput.c (scan_translation_unit, maybe_print_line)
11433 (print_line, cb_define, do_line_change): Adjust to avoid touching
11434 the internals of struct line_map. Use the public API instead.
11435 * c-pch.c (c_common_read_pch): Likewise.
11436 * c-lex.c (fe_file_change): Likewise.
11438 2011-10-14 Paolo Carlini <paolo.carlini@oracle.com>
11441 * c.opt ([Wformat-zero-length]): Add C++ and Objective-C++.
11443 2011-10-11 Paolo Carlini <paolo.carlini@oracle.com>
11446 * c-pretty-print.c (pp_c_floating_constant): Output
11447 max_digits10 (in the ISO C++ WG N1822 sense) decimal digits.
11449 2011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
11451 * c-common.c (def_builtin_1): Delete old interface with two
11452 parallel arrays to hold standard builtin declarations, and replace
11453 it with a function based interface that can support creating
11454 builtins on the fly in the future. Change all uses, and poison
11455 the old names. Make sure 0 is not a legitimate builtin index.
11456 * c-omp.c (c_finish_omp_barrier): Ditto.
11457 (c_finish_omp_taskwait): Ditto.
11458 (c_finish_omp_flush): Ditto.
11460 2011-10-11 Tristan Gingold <gingold@adacore.com>
11462 * c.opt: (fallow-parameterless-variadic-functions): New.
11464 2011-09-08 Dodji Seketeli <dodji@redhat.com>
11466 PR c++/33255 - Support -Wunused-local-typedefs warning
11467 * c-common.h (struct c_language_function::local_typedefs): New
11469 (record_locally_defined_typedef, maybe_record_typedef_use)
11470 (maybe_warn_unused_local_typedefs): Declare new functions.
11471 * c-common.c (record_locally_defined_typedef)
11472 (maybe_record_typedef_use)
11473 (maybe_warn_unused_local_typedefs): Define new functions.
11474 * c.opt: Declare new -Wunused-local-typedefs flag.
11476 2011-09-06 Eric Botcazou <ebotcazou@adacore.com>
11478 PR middle-end/50266
11479 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Fold offsetof-like
11482 2011-09-05 Richard Guenther <rguenther@suse.de>
11484 * c-common.c (complete_array_type): Use ssize_int (-1) instead
11485 of integer_minus_one_node for empty array upper bounds.
11487 2011-08-28 Dodji Seketeli <dodji@redhat.com>
11489 * c-pch.c (c_common_read_pch): Call linemap_add with LC_ENTER as
11490 it's the first time it's being called on this main TU.
11492 2011-08-24 Richard Guenther <rguenther@suse.de>
11495 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Fix conditional.
11497 2011-08-22 Gabriel Charette <gchare@google.com>
11499 * c-opts.c (c_finish_options): Force BUILTINS_LOCATION for tokens
11500 defined in cpp_init_builtins and c_cpp_builtins.
11502 2011-08-19 Joseph Myers <joseph@codesourcery.com>
11504 * c-common.c (c_common_reswords): Add __builtin_complex.
11505 * c-common.h (RID_BUILTIN_COMPLEX): New.
11507 2011-08-18 Joseph Myers <joseph@codesourcery.com>
11509 * c-common.c (c_common_reswords): Add _Noreturn.
11510 (keyword_is_function_specifier): Handle RID_NORETURN.
11511 * c-common.h (RID_NORETURN): New.
11513 2011-08-10 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
11515 * c-common.c (unsafe_conversion_p): New function. Check if it is
11516 unsafe to convert an expression to the type.
11517 (conversion_warning): Adjust, use unsafe_conversion_p.
11518 * c-common.h (unsafe_conversion_p): New function declaration.
11520 2011-08-02 Jakub Jelinek <jakub@redhat.com>
11522 * c-common.h (c_finish_omp_atomic): Adjust prototype.
11523 (c_finish_omp_taskyield): New prototype.
11524 * c-omp.c (c_finish_omp_atomic): Add OPCODE, V, LHS1 and RHS1
11525 arguments. Handle OMP_ATOMIC_READ, OMP_ATOMIC_CAPTURE_OLD and
11526 OMP_ATOMIC_CAPTURE_NEW in addition to OMP_ATOMIC. If LHS1
11527 or RHS1 have side-effects, evaluate those too in the right spot,
11528 if it is a decl and LHS is also a decl, error out if they
11530 (c_finish_omp_taskyield): New function.
11531 * c-cppbuiltin.c (c_cpp_builtins): Change _OPENMP to 201107.
11532 * c-pragma.c (omp_pragmas): Add taskyield.
11533 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKYIELD.
11534 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_FINAL and
11535 PRAGMA_OMP_CLAUSE_MERGEABLE.
11537 2011-07-25 Dodji Seketeli <dodji@redhat.com>
11539 * c-common.h (set_underlying_type): Remove parm name from
11542 2011-07-25 Romain Geissler <romain.geissler@gmail.com>
11544 * c-pretty-print.h: Search c-common.h in c-family.
11546 2011-07-22 Jason Merrill <jason@redhat.com>
11549 * c.opt (Wnarrowing): New.
11552 * c-common.h: Declare c_linkage_bindings.
11553 * c-pragma.c (handle_pragma_redefine_extname): Use it.
11556 * c-opts.c (set_std_cxx0x): Set flag_isoc94 and flag_isoc99.
11557 * c-pretty-print.c (pp_c_cv_qualifiers): Check c_dialect_cxx as well
11558 as flag_isoc99 for 'restrict'.
11559 (pp_c_specifier_qualifier_list): Likewise for _Complex.
11561 2011-07-21 Ian Lance Taylor <iant@google.com>
11563 PR middle-end/49705
11564 * c-common.c (c_disable_warnings): New static function.
11565 (c_enable_warnings): New static function.
11566 (c_fully_fold_internal): Change local unused_p to bool. Call
11567 c_disable_warnings and c_enable_warnings rather than change
11568 c_inhibit_evaluation_warnings.
11570 2011-07-20 Jason Merrill <jason@redhat.com>
11572 PR c++/6709 (DR 743)
11573 PR c++/42603 (DR 950)
11574 * c-common.h (CPP_KEYWORD, CPP_TEMPLATE_ID): Move from cp/parser.h.
11575 (CPP_NESTED_NAME_SPECIFIER, N_CP_TTYPES): Likewise.
11576 (CPP_DECLTYPE): New.
11577 * c-common.c (c_parse_error): Handle CPP_DECLTYPE.
11579 2011-07-19 Richard Guenther <rguenther@suse.de>
11581 * c-common.c (pointer_int_sum): Use fold_build_pointer_plus.
11582 * c-omp.c (c_finish_omp_for): Likewise.
11584 2011-07-12 Eric Botcazou <ebotcazou@adacore.com>
11586 * c-ada-spec.c (dump_nested_types): Put semi-colon after empty loop
11587 body on the next line.
11589 2011-07-08 Jason Merrill <jason@redhat.com>
11592 * c-omp.c (check_omp_for_incr_expr): Handle preevaluation.
11595 * c-common.c (c_apply_type_quals_to_decl): Don't check
11596 TYPE_NEEDS_CONSTRUCTING.
11598 2011-07-06 Richard Guenther <rguenther@suse.de>
11600 * c-common.c (c_common_nodes_and_builtins):
11601 Merge calls to build_common_tree_nodes and build_common_tree_nodes_2.
11603 2011-07-05 Richard Guenther <rguenther@suse.de>
11605 * c-common.c (c_common_nodes_and_builtins): Build all common
11608 2011-06-27 Jakub Jelinek <jakub@redhat.com>
11610 * c-common.h (c_tree_chain_next): New static inline function.
11612 * c-common.c (check_builtin_function_arguments): Handle
11613 BUILT_IN_ASSUME_ALIGNED.
11615 2011-06-21 Andrew MacLeod <amacleod@redhat.com>
11617 * c-common.c: Add sync_ or SYNC__ to builtin names.
11618 * c-omp.c: Add sync_ or SYNC__ to builtin names.
11620 2011-06-20 Pierre Vittet <piervit@pvittet.com>
11622 * c-pragma.h (pragma_handler_1arg, pragma_handler_2arg): New
11624 (gen_pragma_handler): New union.
11625 (internal_pragma_handler): New type.
11626 (c_register_pragma_with_data)
11627 (c_register_pragma_with_expansion_and_data): New functions.
11629 * c-pragma.c (registered_pragmas, c_register_pragma_1)
11630 (c_register_pragma, c_register_pragma_with_expansion)
11631 (c_invoke_pragma_handler): Changed to work with
11632 internal_pragma_handler.
11633 (c_register_pragma_with_data)
11634 (c_register_pragma_with_expansion_and_data): New functions.
11636 2011-06-14 Joseph Myers <joseph@codesourcery.com>
11638 * c-common.c: Include common/common-target.h.
11639 (handle_section_attribute): Use
11640 targetm_common.have_named_sections.
11641 * c-cppbuiltin.c: Include common/common-target.h.
11642 (c_cpp_builtins): Use targetm_common.except_unwind_info.
11644 2011-06-10 Richard Guenther <rguenther@suse.de>
11646 * c-pretty-print.c (pp_c_type_specifier): Use pp_c_identifier
11647 to print a IDENTIFIER_NODE.
11649 2011-06-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11650 Joseph Myers <joseph@codesourcery.com>
11652 * c.opt (fbuilding-libgcc): New option.
11653 * c-cppbuiltin.c (c_cpp_builtins): Define
11654 __LIBGCC_TRAMPOLINE_SIZE__ if flag_building_libgcc.
11656 2011-06-07 Jason Merrill <jason@redhat.com>
11658 * c-common.c (max_tinst_depth): Lower default to 900.
11660 * c-format.c (gcc_cxxdiag_char_table): Add 'S' format.
11662 2011-06-07 Richard Guenther <rguenther@suse.de>
11664 * c-common.c (c_common_nodes_and_builtins): Do not set
11665 size_type_node or call set_sizetype.
11667 2011-06-07 Dodji Seketeli <dodji@redhat.com>
11670 * c-pretty-print.c (pp_c_integer_constant): Consider the canonical
11671 type when using pointer comparison to compare types.
11673 2011-06-02 Jonathan Wakely <jwakely.gcc@gmail.com>
11675 * c.opt: Add -Wdelete-non-virtual-dtor.
11676 * c-opts.c (c_common_handle_option): Include it in -Wall.
11678 2011-05-30 Nathan Froyd <froydnj@gcc.gnu.org>
11683 2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
11685 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
11688 2011-05-27 Jakub Jelinek <jakub@redhat.com>
11691 * c-common.c (c_common_truthvalue_conversion) <case COND_EXPR>: For
11692 C++ don't call c_common_truthvalue_conversion on void type arms.
11694 2011-05-27 Nathan Froyd <froydnj@codesourcery.com>
11696 * c-common.h (struct stmt_tree_s) [x_cur_stmt_list]: Change to a VEC.
11697 (stmt_list_stack): Define.
11698 (cur_stmt_list): Adjust for new type of x_cur_stmt_list.
11699 * c-semantics.c (push_stmt_list, pop_stmt_list): Likewise.
11701 2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
11703 * c-common.c (warning_candidate_p): Check for BLOCKs.
11705 2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
11707 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
11710 2011-05-25 Jakub Jelinek <jakub@redhat.com>
11712 * c-common.c (def_fn_type): Remove extra va_end.
11714 2011-05-23 Jason Merrill <jason@redhat.com>
11717 * c-common.c (c_common_get_narrower): New.
11718 (shorten_binary_op, shorten_compare, warn_for_sign_compare): Use it.
11720 2011-05-23 Nathan Froyd <froydnj@codesourcery.com>
11722 * c-common.h (check_function_arguments): Tweak prototype of
11723 check_function_arguments.
11724 * c-common.c (check_function_arguments): Likewise. Adjust
11725 calls to check_function_nonnull, check_function_format, and
11726 check_function_sentinel.
11727 (check_function_sentinel): Take a FUNCTION_TYPE rather than
11728 separate attributes and typelist arguments. Use
11729 FOREACH_FUNCTION_ARGS to iterate over argument types.
11731 2011-05-15 Paolo Carlini <paolo.carlini@oracle.com>
11733 * c-common.c (c_common_reswords): Reorder.
11734 * c-common.h (rid): Likewise.
11736 2011-05-10 Nathan Froyd <froydnj@codesourcery.com>
11738 * c-common.c (def_fn_type): Don't call build_function_type, call
11739 build_function_type_array or build_varargs_function_type_array
11741 (c_common_nodes_and_builtins): Likewise.
11743 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
11745 * c-common.c (c_add_case_label): Omit the loc argument to
11747 * c-common.h (build_case_label): Remove.
11748 * c-semantics.c (build_case_label): Remove.
11750 2011-05-05 Joseph Myers <joseph@codesourcery.com>
11752 * c-objc.h (objc_start_method_definition): Update prototype.
11753 * stub-objc.c (objc_start_method_definition): Add extra parameter.
11755 2011-05-04 Nathan Froyd <froydnj@codesourcery.com>
11757 * c-common.c (check_main_parameter_types): Reindent. Don't use
11758 TYPE_ARG_TYPES directly.
11759 (handle_nonnull_attribute): Likewise.
11760 (sync_resolve_params): Likewise.
11761 * c-format.c (handle_format_arg_attribute): Likewise. Adjust call
11762 to check_format_string.
11763 (handle_format_attribute): Likewise.
11764 (check_format_string): Take a function type to examine instead of
11765 a type list. Use a function_arg_iterator to step through argument
11768 2011-05-04 Richard Guenther <rguenther@suse.de>
11770 * c-common.c (fix_string_type): Use size_int for index type bounds.
11771 (start_fname_decls): Do not pass NULL to build_int_cst.
11772 (c_init_attributes): Likewise.
11773 * c-lex.c (c_lex_with_flags): Likewise.
11775 2011-04-27 Jason Merrill <jason@redhat.com>
11777 * c-common.c (make_tree_vector_from_list): New.
11778 * c-common.h: Declare it.
11780 2011-04-26 Richard Guenther <rguenther@suse.de>
11782 PR preprocessor/48248
11783 * c-ppoutput.c (maybe_print_line): Always optimize newlines
11784 for output size with -P.
11786 2011-04-25 Paolo Carlini <paolo.carlini@oracle.com>
11788 * c-common.c (struct c_common_resword): Add __underlying_type.
11789 * c-common.h (enum rid): Add RID_UNDERLYING_TYPE.
11791 2011-04-20 Jim Meyering <meyering@redhat.com>
11793 * c-format.c (init_dollar_format_checking): Remove useless
11796 2011-04-15 Nicola Pero <nicola.pero@meta-innovation.com>
11798 * c-objc.h (objc_get_interface_ivars): Removed.
11799 (objc_detect_field_duplicates): New.
11800 * stub-objc.c: Likewise.
11802 2011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
11804 * stub-objc.c (objc_declare_protocols): Renamed to
11805 objc_declare_protocol.
11806 * c-objc.h: Likewise.
11808 2011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
11810 * stub-objc.c (objc_declare_class): Updated argument name.
11812 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
11814 * c-common.h (c_common_init_ts): Declare.
11815 * c-common.c (c_common_init_ts): Define.
11817 2011-04-12 Nicola Pero <nicola.pero@meta-innovation.com>
11819 * c-objc.h (objc_build_message_expr): Updated prototype.
11820 * stub-objc.c (objc_build_message_expr): Likewise.
11822 2011-04-12 Martin Jambor <mjambor@suse.cz>
11824 * c-gimplify.c (c_genericize): Call cgraph_get_create_node instead
11827 2011-04-11 Richard Guenther <rguenther@suse.de>
11829 * c-common.c (complete_array_type): Build a range type of
11832 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
11834 * c-common.c (handle_sentinel_attribute): Don't use TYPE_ARG_TYPES.
11835 (handle_type_generic_attribute): Likewise.
11837 2011-04-07 Jason Merrill <jason@redhat.com>
11840 * c-common.c (c_common_truthvalue_conversion): Don't ignore
11841 conversion from C++0x scoped enum.
11843 2011-04-06 Joseph Myers <joseph@codesourcery.com>
11845 * c-target-def.h: New file.
11846 * c-target.def: New file.
11847 * c-target.h: New file.
11848 * c-common.c (targetcm): Don't define here.
11849 * c-common.h (default_handle_c_option): Declare.
11850 * c-format.c: Include c-target.h instead of target.h.
11851 * c-opts.c: Include c-target.h instead of target.h. Explicitly
11853 (default_handle_c_option): Move from targhooks.c.
11855 2011-03-29 Jakub Jelinek <jakub@redhat.com>
11857 PR preprocessor/48248
11858 * c-ppoutput.c (print): Add src_file field.
11859 (init_pp_output): Initialize it.
11860 (maybe_print_line): Don't optimize by adding up to 8 newlines
11861 if map->to_file and print.src_file are different file.
11862 (print_line): Update print.src_file.
11864 2011-03-25 Kai Tietz <ktietz@redhat.com>
11866 * c-ada-spec.c (compare_comment): Use filename_cmp
11867 instead of strcmp for filename.
11869 2011-03-25 Jeff Law <law@redhat.com>
11871 * c-common.c (def_fn_type): Add missing va_end.
11873 2011-03-25 Jason Merrill <jason@redhat.com>
11875 * c.opt: Add -std=c++03.
11877 2011-03-22 Eric Botcazou <ebotcazou@adacore.com>
11879 * c-ada-spec.c (dump_ada_template): Skip non-class instances.
11881 2011-03-17 Kai Tietz <ktietz@redhat.com>
11884 * c-pretty-print.c (pp_c_specifier_qualifier_list):
11885 Display allowed attributes for function pointer types.
11886 (pp_c_attributes_display): New function to display
11887 attributes having affects_type_identity flag set to true.
11888 * c-pretty-print.h (pp_c_attributes_display): New prototype.
11890 * c-common.c (c_common_attribute_table):
11892 (c_common_format_attribute_table): Likewise.
11894 2011-03-18 Jason Merrill <jason@redhat.com>
11896 * c.opt (fconstexpr-depth): Add Var(max_constexpr_depth).
11897 * c-common.h: Don't declare it here.
11898 * c-common.c: Or define it here.
11899 * c-opts.c (c_common_handle_option): Or set it here.
11902 * c-common.c (handle_transparent_union_attribute): Don't
11903 make a duplicate type in C++.
11905 2011-03-15 Jason Merrill <jason@redhat.com>
11907 * c-common.c (max_constexpr_depth): New.
11908 * c-common.h: Declare it.
11909 * c-opts.c (c_common_handle_option): Set it.
11910 * c.opt (fconstexpr-depth): New option.
11912 2011-03-11 Jason Merrill <jason@redhat.com>
11914 * c-common.c (attribute_takes_identifier_p): Add missing const.
11917 * c-common.c (attribute_takes_identifier_p): Assume that an
11918 unknown attribute takes an identifier.
11920 2011-03-07 Nathan Froyd <froydnj@codesourcery.com>
11923 * c-common.c (c_type_hash): Call list_length instead of iterating
11924 through DECL_CHAIN. Rename 'i' to 'n_elements'.
11926 2011-02-19 Jakub Jelinek <jakub@redhat.com>
11929 * c-common.c (c_fully_fold_internal): Handle VIEW_CONVERT_EXPR.
11931 2011-02-17 Iain Sandoe <iains@gcc.gnu.org>
11933 * c.opt (fobjc-abi-version=) New.
11934 (fobjc-nilcheck): New.
11936 2011-02-03 Nathan Froyd <froydnj@codesourcery.com>
11939 * c-common.h (keyword_is_decl_specifier): Declare.
11940 * c-common.c (keyword_is_decl_specifier): Define.
11941 (keyword_is_function_specifier): New function.
11943 2011-01-26 Jakub Jelinek <jakub@redhat.com>
11946 * c-lex.c (interpret_float): If CPP_N_IMAGINARY, ensure
11947 EXCESS_PRECISION_EXPR is created with COMPLEX_TYPE instead of
11950 2011-01-26 Arnaud Charlet <charlet@adacore.com>
11952 * c-ada-spec.c (dump_generic_ada_node): Avoid dereferencing null type.
11954 2011-01-26 Jakub Jelinek <jakub@redhat.com>
11957 * c-opts.c (c_common_post_options): Call c_common_no_more_pch
11958 after init_c_lex if pch_file is set.
11960 2011-01-26 Dave Korn <dave.korn.cygwin@gmail.com>
11963 * c.opt (-fkeep-inline-dllexport): New switch.
11965 2011-01-12 Richard Guenther <rguenther@suse.de>
11967 PR middle-end/32511
11968 * c-common.c (handle_weak_attribute): Warn instead of error
11969 on declaring an inline function weak.
11971 2011-01-05 Tom Tromey <tromey@redhat.com>
11973 * c-common.h (lvalue_error): Update.
11974 * c-common.c (lvalue_error): Add 'loc' argument. Call error_at,
11977 2010-12-29 Nicola Pero <nicola.pero@meta-innovation.com>
11980 * c-objc.h (objc_finish_message_expr): Added argument to
11983 2010-12-22 Nathan Froyd <froydnj@codesourcery.com>
11985 * c-common.c (handle_nonnull_attribute, handle_sentinel_attribute):
11988 2010-12-18 Nicola Pero <nicola.pero@meta-innovation.com>
11990 * c-objc.h (objc_maybe_warn_exceptions): New.
11991 * stub-objc.c (objc_maybe_warn_exceptions): New.
11993 2010-12-10 Nathan Froyd <froydnj@codesourcery.com>
11995 * c-common.h (readonly_error): Declare.
11996 * c-common.c (readonly_error): Define.
11998 2010-12-09 Nathan Froyd <froydnj@codesourcery.com>
12000 * c-common.h (invalid_indirection_error): Declare.
12001 * c-common.c (invalid_indirection_error): Define.
12003 2010-12-03 Richard Guenther <rguenther@suse.de>
12006 * c-pretty-print.c (pp_c_postfix_expression): Handle MEM_REF.
12007 (pp_c_unary_expression): Likewise.
12008 (pp_c_expression): Likewise.
12010 2010-11-30 Nicola Pero <nicola.pero@meta-innovation.com>
12012 * c-common.h (objc_finish_function): New.
12013 (objc_non_volatilized_type): Removed.
12014 (objc_type_quals_match): Removed.
12015 * stub-objc.c (objc_finish_function): New.
12016 (objc_non_volatilized_type): Removed.
12017 (objc_type_quals_match): Removed.
12019 2010-11-30 Joseph Myers <joseph@codesourcery.com>
12021 * c-common.h (parse_optimize_options): Declare.
12022 * c-cppbuiltin.c, c-format.c, c-gimplify.c, c-lex.c, c-omp.c,
12023 c-pch.c, c-pragma.c, c-semantics.c: Don't include toplev.h.
12025 2010-11-29 Joseph Myers <joseph@codesourcery.com>
12027 * c-opts.c (check_deps_environment_vars): Use getenv instead of
12029 * c-pch.c (O_BINARY): Don't define here.
12030 * c-pragma.h: Include "cpplib.h" instead of <cpplib.h>.
12032 2010-11-25 Joseph Myers <joseph@codesourcery.com>
12034 * c-cppbuiltin.c (c_cpp_builtins): Pass &global_options to
12035 targetm.except_unwind_info.
12037 2010-11-23 Joseph Myers <joseph@codesourcery.com>
12039 * c-opts.c (c_common_handle_option): Pass location to
12040 set_struct_debug_option.
12042 2010-11-23 Joseph Myers <joseph@codesourcery.com>
12044 * c-common.c (visibility_options): Move from ../opts.c.
12045 * c-common.h (struct visibility_flags, visibility_options):
12047 * c-opts.c (finish_options): Rename to c_finish_options.
12048 (c_common_init): Update call to finish_options.
12050 2010-11-22 Nicola Pero <nicola.pero@meta-innovation.com>
12053 * c-lex.c (lex_string): Check that each string in an Objective-C
12054 string concat sequence starts with either one or zero '@', and
12055 that there are no spurious '@' signs at the end.
12057 2010-11-20 Joseph Myers <joseph@codesourcery.com>
12059 * c-pragma.c: Remove conditionals on HANDLE_PRAGMA_PACK,
12060 HANDLE_PRAGMA_PACK_PUSH_POP, HANDLE_PRAGMA_WEAK and
12061 HANDLE_PRAGMA_VISIBILITY.
12062 * c-pragma.h (HANDLE_PRAGMA_WEAK, HANDLE_PRAGMA_PACK,
12063 HANDLE_PRAGMA_VISIBILITY): Don't define.
12064 (HANDLE_SYSV_PRAGMA, HANDLE_PRAGMA_PACK_PUSH_POP): Don't test.
12066 2010-11-20 Nathan Froyd <froydnj@codesourcery.com>
12071 * c-common.h (keyword_begins_type_specifier): Declare.
12072 (keyword_is_storage_class_specifier): Declare.
12073 (keyword_is_type_qualifier): Declare.
12074 * c-common.c (keyword_begins_type_specifier): New function.
12075 (keyword_is_storage_class_specifier): New function.
12076 (keyword_is_type_qualifier): Declare.
12078 2010-11-19 Joseph Myers <joseph@codesourcery.com>
12081 * c-common.c (in_late_binary_op): Define.
12082 (c_common_truthvalue_conversion): Check in_late_binary_op before
12083 calling c_save_expr.
12084 * c-common.h (in_late_binary_op): Declare.
12086 2010-11-19 Joseph Myers <joseph@codesourcery.com>
12088 * c-opts.c (c_common_handle_option): Update calls to
12089 set_struct_debug_option.
12091 2010-11-19 Nicola Pero <nicola.pero@meta-innovation.com>
12093 * c-common.h (objc_declare_protocols): Added additional argument.
12094 * stub-objc.c (objc_declare_protocol): Same change.
12096 2010-11-18 Nathan Froyd <froydnj@codesourcery.com>
12099 * c-common.h (build_real_imag_expr): Declare.
12100 * c-semantics.c (build_real_imag_expr): Define.
12102 2010-11-17 Joseph Myers <joseph@codesourcery.com>
12104 * c-opts.c (c_common_parse_file): Take no arguments.
12105 * c-common.h (c_common_parse_file): Update prototype.
12107 2010-11-16 Jakub Jelinek <jakub@redhat.com>
12110 * c-common.c (warning_candidate_p): Don't track non-const calls
12113 2010-11-15 Ian Lance Taylor <iant@google.com>
12115 * c-lex.c (init_c_lex): Set macro debug callbacks if
12116 flag_dump_go_spec is set.
12118 2010-11-15 Nicola Pero <nicola.pero@meta-innovation.com>
12120 * c-common.h (objc_build_incr_expr_for_property_ref): New.
12121 * stub-objc.c (objc_build_incr_expr_for_property_ref): New.
12123 2010-11-15 Nathan Froyd <froydnj@codesourcery.com>
12125 PR preprocessor/45038
12126 * c-cppbuiltin.c (c_cpp_builtins): Use different format for C++
12129 2010-11-12 Joseph Myers <joseph@codesourcery.com>
12131 * c-common.h (c_family_lang_mask): Declare.
12132 * c-opts.c (c_family_lang_mask): Make extern.
12133 * c-pragma.c (handle_pragma_diagnostic): Use
12134 control_warning_option.
12136 2010-11-12 Joseph Myers <joseph@codesourcery.com>
12138 * c-common.c (parse_optimize_options): Update call to
12140 * c-common.h (c_common_handle_option): Update prototype.
12141 * c-opts.c (c_common_handle_option): Take location_t parameter and
12142 pass it to other functions.
12144 2010-11-11 Joseph Myers <joseph@codesourcery.com>
12146 * c-opts.c (warning_as_error_callback): Remove.
12147 (c_common_initialize_diagnostics): Don't call
12148 register_warning_as_error_callback.
12149 (c_common_handle_option): Handle -Werror=normalized= here.
12151 2010-11-10 Joseph Myers <joseph@codesourcery.com>
12153 * c-common.c (handle_mode_attribute): Use %' and word "signedness"
12155 * c-opts.c (c_common_parse_file): Start diagnostics with lowercase
12157 * c-pragma.c (handle_pragma_target, handle_pragma_optimize):
12158 Remove trailing '.' from diagnostics.
12159 * c.opt (Wwrite-strings_: Avoid '`' in help text.
12161 2010-11-10 Joseph Myers <joseph@codesourcery.com>
12163 * c-common.c (parse_optimize_options): Pass global_dc to
12165 * c-opts.c (c_common_handle_option): Pass &global_options to
12166 set_Wstrict_aliasing.
12167 * c.opt (v): Don't mark Common or document here.
12169 2010-11-06 Iain Sandoe <iains@gcc.gnu.org>
12172 * c-format.c (format_type): New type gcc_objc_string_format_type.
12173 (valid_stringptr_type_p): New.
12174 (handle_format_arg_attribute): Use valid_stringptr_type_p ().
12175 (check_format_string): Pass expected type, use
12176 valid_stringptr_type_p (), check that the format string types are
12177 consistent with the format specification.
12178 (decode_format_attr): Warn if NSString is used outside objective-c.
12179 (format_types_orig): Add NSString.
12180 (format_name): New.
12181 (format_flags): New.
12182 (check_format_arg): Handle format strings requiring an external parser.
12183 first_target_format_type: New variable.
12184 (handle_format_attribute): Set up first_target_format_type, pass the
12185 expected format arg string type to check_format_string().
12186 * c-common.h (FMT_FLAG_PARSE_ARG_CONVERT_EXTERNAL): New flag.
12187 * stub-objc.c (objc_string_ref_type_p): New.
12188 (objc_check_format_arg): New.
12190 2010-11-04 Nicola Pero <nicola.pero@meta-innovation.com>
12192 Fixed using the Objective-C 2.0 dot-syntax with class names.
12193 * c-common.h (objc_build_class_component_ref): New.
12194 * stub-objc.c (objc_build_class_component_ref): New.
12196 2010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
12198 * c.opt (Wproperty-assign-default): New option.
12200 2010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
12202 Implemented -fobjc-std=objc1 flag.
12203 * c.opt (fobjc-std=objc1): New option.
12205 2010-11-01 Nicola Pero <nicola.pero@meta-innovation.com>
12207 Implemented format and noreturn attributes for Objective-C methods.
12208 * c-common.c (handle_noreturn_attribute): Recognize 'noreturn'
12209 attribute for Objective-C methods.
12211 2010-10-31 Jason Merrill <jason@redhat.com>
12213 * c-common.c (conversion_warning, warn_for_collisions_1): Use
12216 2010-10-30 Nicola Pero <nicola.pero@meta-innovation.com>
12218 Implemented Objective-C 2.0 @property, @synthesize and @dynamic.
12219 * c-common.h (enum rid): Removed RID_COPIES and RID_IVAR.
12220 (objc_add_property_declaration): Removed arguments for copies and
12222 (objc_build_getter_call): Renamed to
12223 objc_maybe_build_component_ref.
12224 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
12225 (objc_is_property_ref): New.
12226 * c-common.c (c_common_reswords): Removed copies and ivar.
12227 * stub-objc.c (objc_add_property_declaration): Removed arguments
12228 for copies and ivar.
12229 (objc_build_getter_call): Renamed to
12230 objc_maybe_build_component_ref.
12231 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
12232 (objc_is_property_ref): New.
12234 2010-10-29 Arnaud Charlet <charlet@adacore.com>
12235 Matthew Gingell <gingell@adacore.com>
12237 * c-ada-spec.c (separate_class_package): New function.
12238 (pp_ada_tree_identifier): Prefix references to C++ classes with the
12239 name of their enclosing package.
12240 (print_ada_declaration): Use separate_class_package.
12242 2010-10-27 Jason Merrill <jason@redhat.com>
12244 * c-common.c (c_common_reswords): Add __is_literal_type.
12245 * c-common.h (enum rid): Add RID_IS_LITERAL_TYPE.
12247 * c-common.c (check_case_value): Remove special C++ code.
12249 2010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
12251 * c-common.h (enum rid): Added RID_READWRITE, RID_ASSIGN,
12252 RID_RETAIN, RID_COPY and RID_NONATOMIC. Updated RID_FIRST_PATTR
12253 and RID_LAST_PATTR.
12254 (objc_add_property_declaration): Added additional arguments.
12255 (objc_property_attribute_kind): Removed.
12256 (objc_set_property_attr): Removed.
12257 * c-common.c (c_common_reswords): Added readwrite, assign, retain,
12258 copy and nonatomic.
12259 * stub-objc.c (objc_add_property_declaration): Added additional
12261 (objc_set_property_attr): Removed.
12263 2010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
12265 * c-common.h (objc_add_property_variable): Renamed to
12266 objc_add_property_declaration. Added location argument.
12267 * stub-objc.c (objc_add_property_variable): Same change.
12269 2010-10-23 Nicola Pero <nicola.pero@meta-innovation.com>
12271 * c-common.h (objc_maybe_printable_name): New.
12272 * stub-objc.c (objc_maybe_printable_name): New.
12274 2010-10-22 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
12275 Andrew Pinski <pinskia@gmail.com>
12277 * c-common.h (c_common_mark_addressable_vec): Declare.
12278 * c-common.c (c_common_mark_addressable_vec): New function.
12280 2010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
12282 * c-common.h (objc_set_method_type): Removed.
12283 (objc_add_method_declaration): Added boolean argument.
12284 (objc_start_method_definition): Same change.
12285 (objc_build_method_signature): Same change.
12286 * stub-objc.c (objc_set_method_type): Removed.
12287 (objc_add_method_declaration): Added boolean argument.
12288 (objc_start_method_definition): Same change.
12289 (objc_build_method_signature): Same change.
12291 2010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
12293 * c-common.h (finish_file): Removed.
12294 (objc_write_global_declarations): New.
12295 * c-opts.c (c_common_parse_file): Do not call finish_file.
12296 * stub-objc.c (objc_write_global_declarations): New.
12298 2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
12300 Implemented parsing @synthesize and @dynamic for
12301 Objective-C/Objective-C++.
12302 * c-common.h (enum rid): Add RID_AT_SYNTHESIZE and RID_AT_DYNAMIC.
12303 (objc_add_synthesize_declaration): New.
12304 (objc_add_dynamic_declaration): New.
12305 * c-common.c (c_common_reswords): Add synthesize and dynamic.
12306 * stub-objc.c (objc_add_synthesize_declaration): New.
12307 (objc_add_dynamic_declaration): New.
12309 2010-10-18 Michael Meissner <meissner@linux.vnet.ibm.com>
12312 * c-cppbuiltin.c (mode_has_fma): Move function here from
12313 builtins.c. Don't use the fma optab, instead just use the
12314 HAVE_fma* macros, so that __FP_FAST_FMA* will be defined when
12317 2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
12319 Merge from 'apple/trunk' branch on FSF servers.
12321 2005-11-08 Fariborz Jahanian <fjahanian@apple.com>
12324 * c-common.h (objc_non_volatilized_type): New declaration
12325 * stub-objc.c (objc_non_volatilized_type): New stub.
12327 2010-10-17 Nicola Pero <nicola.pero@meta-innovation.com>
12329 Merge from 'apple/trunk' branch on FSF servers.
12331 2006-03-27 Fariborz Jahanian <fjahanian@apple.com>
12334 * c-common.h (objc_diagnose_private_ivar): New decl.
12335 * stub-objc.c (objc_diagnose_private_ivar): New stub.
12337 2010-10-17 Iain Sandoe <iains@gcc.gnu.org>
12339 * c-common.c (c_common_reswords): Add package, RID_AT_PACKAGE.
12340 * c-common.h (enum rid): Add RID_AT_PACKAGE.
12341 (objc_ivar_visibility_kind): New enum.
12342 (objc_set_visibility): Adjust prototype to use visibility enum.
12343 * stub-objc.c (objc_set_visibility): Adjust stub to use
12346 2010-10-14 Michael Meissner <meissner@linux.vnet.ibm.com>
12348 * c-cppbuiltin.c (builtin_define_float_constants): Emit
12349 __FP_FAST_FMA, __FP_FAST_FMAF, and __FP_FAST_FMAL if the machine
12350 has the appropriate fma builtins.
12351 (c_cpp_builtins): Adjust call to builtin_define_float_constants.
12353 2010-10-14 Iain Sandoe <iains@gcc.gnu.org>
12355 merge from FSF apple 'trunk' branch.
12356 2006 Fariborz Jahanian <fjahanian@apple.com>
12358 Radars 4436866, 4505126, 4506903, 4517826
12359 * c-common.c (c_common_resword): Define @property and its attributes.
12360 * c-common.h: Define property attribute enum entries.
12361 (OBJC_IS_PATTR_KEYWORD): New.
12362 (objc_property_attribute_kind): New enum.
12363 Declare objc_set_property_attr (), objc_add_property_variable (),
12364 objc_build_getter_call () and objc_build_setter_call ().
12365 * stub-objc.c (objc_set_property_attr): New stub.
12366 (objc_add_property_variable): Likewise.
12367 (objc_build_getter_call): Likewise.
12368 (objc_build_setter_call) Likewise.
12370 2010-10-13 Iain Sandoe <iains@gcc.gnu.org>
12372 merge from FSF apple 'trunk' branch.
12373 2006-04-26 Fariborz Jahanian <fjahanian@apple.com>
12375 Radar 3803157 (method attributes)
12376 * c-common.c (handle_deprecated_attribute): Recognize
12377 objc methods as valid declarations.
12378 * c-common.h: Declare objc_method_decl ().
12379 * stub-objc.c (objc_method_decl): New stub.
12381 2010-10-08 Joseph Myers <joseph@codesourcery.com>
12383 * c-common.c (parse_optimize_options): Call
12384 decode_cmdline_options_to_array_default_mask before
12385 decode_options. Update arguments to decode_options.
12386 * c-common.h (c_common_init_options_struct): Declare.
12387 * c-opts.c (c_common_init_options_struct): New. Split out from
12388 c_common_init_options.
12390 2010-10-06 Nicola Pero <nicola.pero@meta-innovation.com>
12392 Implemented fast enumeration for Objective-C.
12393 * c-common.h (objc_finish_foreach_loop): New.
12394 * stub-objc.c (objc_finish_foreach_loop): New.
12396 2010-10-05 Joseph Myers <joseph@codesourcery.com>
12398 * c-common.h (struct diagnostic_context): Don't declare here.
12399 (c_common_initialize_diagnostics): Declare using
12400 diagnostic_context typedef.
12401 * c-opts.c (c_common_handle_option): Pass global_dc to
12402 handle_generated_option.
12404 2010-10-04 Joseph Myers <joseph@codesourcery.com>
12406 * c-opts.c (c_common_handle_option): Pass &global_options_set to
12407 handle_generated_option.
12409 2010-10-03 Ian Lance Taylor <iant@google.com>
12411 * c.opt (-fplan9-extensions): New option.
12413 2010-10-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
12415 * c-cppbuiltin.c (define__GNUC__, builtin_define_type_precision):
12417 (c_cpp_builtins): Call functions from cppbuiltin.c instead
12418 of duplicating code.
12420 2010-09-30 Iain Sandoe <iains@gcc.gnu.org>
12422 * c-common.c: Add two new entries for @optional
12423 and @required keywords.
12425 merge from FSF 'apple/trunk' branch.
12426 2006-01-30 Fariborz Jahanian <fjahanian@apple.com>
12429 * c-common.h (RID_AT_OPTIONAL, RID_AT_REQUIRED): Two new
12430 objective-c keywords.
12431 (objc_set_method_opt): New declaration.
12432 * stub-objc.c (objc_set_method_opt): New stub.
12434 2010-09-30 Joseph Myers <joseph@codesourcery.com>
12436 * c-common.c (handle_optimize_attribute): Pass &global_options to
12437 cl_optimization_save and cl_optimization_restore.
12438 * c-opts.c (c_common_handle_option): Pass &global_options to
12439 handle_generated_option.
12440 * c-pragma.c (handle_pragma_diagnostic): Use option_flag_var.
12441 (handle_pragma_pop_options, handle_pragma_reset_options): Pass
12442 &global_options to cl_optimization_restore.
12444 2010-09-30 Nicola Pero <nicola.pero@meta-innovation.com>
12446 * c-lex.c (c_lex_with_flags): Updated comments for CPP_AT_NAME
12447 Objective-C/Objective-C++ keywords.
12449 2010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
12451 Merge from 'apple/trunk' branch on FSF servers.
12453 2005-10-04 Fariborz Jahanian <fjahanian@apple.com>
12456 * c-common.h (objc_check_global_decl): New declaration.
12457 * stub-objc.c (objc_check_global_decl): New stub.
12459 2010-09-29 Joseph Myers <joseph@codesourcery.com>
12461 * c.opt: Don't use VarExists.
12463 2010-09-29 Joseph Myers <joseph@codesourcery.com>
12465 * c-common.c (c_cpp_error): Update names of diagnostic_context
12467 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Update names of
12468 cl_optimization members.
12469 * c-opts.c (warning_as_error_callback, c_common_handle_option,
12470 sanitize_cpp_opts, finish_options): Update names of cpp_options
12473 2010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
12475 * c-common.h (OBJC_IS_CXX_KEYWORD): New macro. Updated comments.
12476 (objc_is_reserved_word): Removed.
12477 * c-common.c: Updated comments.
12478 * c-lex.c (c_lex_with_flags): Use OBJC_IS_CXX_KEYWORD instead of
12479 objc_is_reserved_word.
12480 * stub-objc.c (objc_is_reserved_word): Removed.
12482 2010-09-28 Iain Sandoe <iains@gcc.gnu.org>
12484 * c-common.h (objc_add_method_declaration): Adjust prototype to
12485 include attributes.
12486 (objc_start_method_definition): Likewise.
12487 (objc_build_keyword_decl): Likewise.
12488 * stub-objc.c:(objc_add_method_declaration): Handle attributes.
12489 (objc_start_method_definition): Likewise.
12490 (objc_build_keyword_decl): Likewise.
12492 2010-09-28 Iain Sandoe <iains@gcc.gnu.org>
12494 * c-common.h (objc_start_class_interface): Adjust prototype.
12495 (objc_start_category_interface): Likewise.
12496 (objc_start_protocol): Likewise.
12497 * stub-objc.c (objc_start_protocol): Adjust for extra argument.
12498 (objc_start_class_interface): Likewise.
12499 (objc_start_category_interface): Likewise.
12501 2010-09-27 Ian Lance Taylor <iant@google.com>
12503 * c-common.c (c_common_attribute_table): Add no_split_stack.
12504 (handle_no_split_stack_attribute): New static function.
12506 2010-09-27 Nicola Pero <nicola.pero@meta-innovation.com>
12508 Merge from 'apple/trunk' branch on FSF servers.
12510 2005-12-15 Fariborz Jahanian <fjahanian@apple.com>
12513 * c-common.h (objc_have_common_type): New declaration.
12514 * stub-objc.c (objc_have_common_type): New stub.
12516 2005-06-22 Ziemowit Laski <zlaski@apple.com>
12519 * c-common.h (objc_common_type): New prototype.
12520 * stub-objc.c (objc_common_type): New stub.
12522 2010-09-24 Jan Hubicka <jh@suse.cz>
12524 * c-common.c (handle_leaf_attribute): New function.
12525 (struct attribute_spec c_common_att): Add leaf.
12527 2010-09-22 Joseph Myers <joseph@codesourcery.com>
12529 * c.opt (-all-warnings, -ansi, -assert, -assert=, -comments,
12530 -comments-in-macros, -define-macro, -define-macro=, -dependencies,
12531 -dump, -dump=, -imacros, -imacros=, -include, -include=,
12532 -include-barrier, -include-directory, -include-directory=,
12533 -include-directory-after, -include-directory-after=,
12534 -include-prefix, -include-prefix=, -include-with-prefix,
12535 -include-with-prefix=, -include-with-prefix-after,
12536 -include-with-prefix-after=, -include-with-prefix-before,
12537 -include-with-prefix-before=, -no-integrated-cpp,
12538 -no-line-commands, -no-standard-includes, -no-warnings, -output,
12539 -output=, -pedantic, -pedantic-errors, -preprocess,
12540 -print-missing-file-dependencies, -trace-includes, -traditional,
12541 -traditional-cpp, -trigraphs, -undefine-macro, -undefine-macro=,
12542 -user-dependencies, -verbose, -write-dependencies,
12543 -write-user-dependencies, no-integrated-cpp, traditional): New.
12545 2010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
12548 * c-common.h (objc_start_method_definition): Return bool instead
12550 * stub-objc.c (objc_start_method_definition): Return bool instead
12553 2010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
12556 * c-common.h (objc_get_interface_ivars): New declaration.
12557 * stub-objc.c (objc_get_interface_ivars): New stub.
12559 2010-09-15 Ian Lance Taylor <iant@google.com>
12561 * c-common.c (parse_optimize_options): Do not capitalize warning
12562 messages. Remove period at end of warning message.
12564 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
12566 * c-common.c (handle_alias_ifunc_attribute): New, broken out of ...
12567 (handle_alias_attribute): ... here.
12568 (handle_ifunc_attribute): New.
12570 2010-09-06 Mark Mitchell <mark@codesourcery.com>
12572 * c-common.h (do_warn_double_promotion): Declare.
12573 * c-common.c (do_warn_double_promotion): Define.
12575 2010-09-05 Mark Mitchell <mark@codesourcery.com>
12577 * c.opt (Wdouble-promotion): New.
12579 2010-09-02 Joseph Myers <joseph@codesourcery.com>
12581 * c.opt (falt-external-templates, fhuge-objects, fvtable-gc,
12582 fvtable-thunks, fxref): Mark no longer supported in help text.
12584 2010-09-02 Joseph Myers <joseph@codesourcery.com>
12586 * c.opt (Wimport, fall-virtual, falt-external-templates,
12587 fdefault-inline, fenum-int-equiv, fexternal-templates,
12588 fguiding-decls, fhonor-std, fhuge-objects, flabels-ok,
12589 fname-mangling-version-, fnew-abi, fnonnull-objects,
12590 foptional-diags, fsquangle, fstrict-prototype, fthis-is-variable,
12591 fvtable-gc, fvtable-thunks, fxref): Mark with Ignore and Warn as
12593 (fhandle-exceptions): Mark with Alias and Warn.
12594 * c-opts.c (c_common_handle_option): Don't handle options marked
12597 2010-09-02 Joseph Myers <joseph@codesourcery.com>
12599 * c.opt (Wcomments, Werror-implicit-function-declaration,
12600 ftemplate-depth-, std=c89, std=c9x, std=gnu89, std=gnu9x,
12601 std=iso9899:1990, std=iso9899:1999, std=iso9899:199x): Mark as
12603 * c-common.c (option_codes): Use OPT_Wcomment instead of
12605 * c-opts.c (warning_as_error_callback, c_common_handle_option):
12606 Don't handle options marked as aliases.
12608 2010-08-25 Richard Guenther <rguenther@suse.de>
12610 * c-common.c (c_common_get_alias_set): Remove special
12611 handling for pointers.
12613 2010-08-20 Nathan Froyd <froydnj@codesourcery.com>
12615 * c-common.c: Use FOR_EACH_VEC_ELT.
12616 * c-gimplify.c: Likewise.
12617 * c-pragma.c: Likewise.
12619 2010-08-16 Joseph Myers <joseph@codesourcery.com>
12621 * c.opt (MDX): Change back to MD. Mark NoDriverArg instead of
12623 (MMDX): Change back to MMD. Mark NoDriverArg instead of
12625 * c-opts.c (c_common_handle_option): Use OPT_MD and OPT_MMD
12626 instead of OPT_MDX and OPT_MMDX.
12628 2010-08-16 Joseph Myers <joseph@codesourcery.com>
12630 * c.opt (MDX, MMDX, lang-asm): Mark RejectDriver.
12632 2010-08-12 Joseph Myers <joseph@codesourcery.com>
12634 * c.opt (MD, MMD): Change to MDX and MMDX.
12635 * c-opts.c (c_common_handle_option): Use OPT_MMD and OPT_MMDX.
12637 2010-08-11 Joseph Myers <joseph@codesourcery.com>
12639 * c-opts.c (c_common_handle_option): Call handle_generated_option
12640 instead of handle_option.
12642 2010-08-08 Nathan Froyd <froydnj@codesourcery.com>
12644 * c-pragma.c (add_to_renaming_pragma_list): Fix call to VEC_safe_push.
12645 (maybe_apply_renaming_pragma): Delete unneeded declarations.
12647 2010-08-08 Nathan Froyd <froydnj@codesourcery.com>
12649 * c-pragma.c (pending_redefinition): Declare. Declare a VEC of it.
12650 (pending_redefine_extname): Change type to a VEC.
12651 (add_to_renaming_pragma_list): Update for new type of
12652 pending_redefine_extname.
12653 (maybe_apply_renaming_pragma): Likewise.
12655 2010-08-04 Arnaud Charlet <charlet@adacore.com>
12657 * c-ada-spec.c (dump_ada_template): Mark underlying instance type as
12659 (dump_generic_ada_node): Code clean up. Use TREE_VISITED flag to
12660 decide whether a type has already been declared/seen.
12661 Do not go to the original type.
12662 (dump_nested_types): New parameter forward.
12663 Generate forward declaration if needed and mark type as visited.
12664 (print_ada_declaration): Call dump_nested_types if not already done.
12665 Mark types as visited.
12667 2010-08-03 Joseph Myers <joseph@codesourcery.com>
12669 * c.opt (-print-pch-checksum): Remove option.
12670 * c-opts.c (c_common_handle_option): Don't handle
12671 OPT_print_pch_checksum.
12673 2010-07-27 Joseph Myers <joseph@codesourcery.com>
12675 * c-common.h (c_common_handle_option): Update prototype and return
12677 * c-opts.c (c_common_handle_option): Update prototype and return
12678 value type. Update calls to handle_option and
12679 enable_warning_as_error.
12681 2010-07-27 Jakub Jelinek <jakub@redhat.com>
12684 * c-pretty-print.c (pp_c_expression): Handle C_MAYBE_CONST_EXPR.
12686 2010-07-27 Joseph Myers <joseph@codesourcery.com>
12688 * c-common.h (c_common_missing_argument): Remove.
12689 * c-opts.c (c_common_missing_argument): Remove.
12690 * c.opt (A, D, F, I, MD, MMD, MQ, MT, U, fconstant-string-class=,
12691 idirafter, imacros, include, isysroot, isystem, iquote): Add
12693 * c-objc-common.h (LANG_HOOKS_MISSING_ARGUMENT): Remove.
12695 2010-07-27 Joseph Myers <joseph@codesourcery.com>
12697 * c-common.h (c_common_option_lang_mask,
12698 c_common_initialize_diagnostics, c_common_complain_wrong_lang_p):
12700 (c_common_init_options): Update prototype.
12701 * c-opts.c (c_common_option_lang_mask): New.
12702 (c_common_initialize_diagnostics): Split out of
12703 c_common_init_options.
12704 (accept_all_c_family_options, c_common_complain_wrong_lang_p):
12706 (c_common_init_options): Update prototype. Use decoded options in
12707 search for -lang-asm.
12709 2010-07-15 Nathan Froyd <froydnj@codesourcery.com>
12711 * c-common.c: Carefully replace TREE_CHAIN with DECL_CHAIN.
12712 * c-format.c: Likewise.
12714 2010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
12716 * c-common.h: Include diagnostic-core.h. Error if already
12718 * c-semantics.c: Do not define GCC_DIAG_STYLE here.
12720 2010-07-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
12722 * c-common.c (IN_GCC_FRONTEND): Do not undef.
12723 Do not include expr.h
12724 (vector_mode_valid_p): Move here.
12726 2010-06-21 DJ Delorie <dj@redhat.com>
12728 * c-pragma.c (handle_pragma_diagnostic): Add push/pop,
12729 allow these pragmas anywhere.
12731 2010-06-14 Jakub Jelinek <jakub@redhat.com>
12734 * c-cppbuiltin.c: Include gt-c-family-c-cppbuiltin.h.
12735 (lazy_hex_fp_values, lazy_hex_fp_value_count): Add GTY(()) markers.
12736 (lazy_hex_fp_value, builtin_define_with_hex_fp_value): Use
12737 ggc_strdup instead of xstrdup.
12739 2010-06-10 Jakub Jelinek <jakub@redhat.com>
12741 * c-cppbuiltin.c: Include cpp-id-data.h.
12742 (lazy_hex_fp_values, lazy_hex_fp_value_count): New variables.
12743 (lazy_hex_fp_value): New function.
12744 (builtin_define_with_hex_fp_value): Provide definitions lazily.
12746 2010-06-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
12748 * c-gimplify.c: Do not include tree-flow.h
12750 2010-06-29 Joern Rennecke <joern.rennecke@embecosm.com>
12753 * c-common.c: Rename targetm member:
12754 targetm.enum_va_list -> targetm.enum_va_list_p
12756 2010-06-28 Anatoly Sokolov <aesok@post.ru>
12758 * c-common.c (shorten_compare): Adjust call to force_fit_type_double.
12760 2010-06-28 Steven Bosscher <steven@gcc.gnu.org>
12762 * c-cppbuiltin.c: Do not include except.h.
12764 2010-06-24 Andi Kleen <ak@linux.intel.com>
12766 * c-common.c (warn_for_omitted_condop): New.
12767 * c-common.h (warn_for_omitted_condop): Add prototype.
12769 2010-06-21 Joseph Myers <joseph@codesourcery.com>
12771 * c.opt (lang-objc): Remove.
12772 * c-opts.c (c_common_handle_option): Don't handle OPT_lang_objc.
12774 2010-06-21 Joern Rennecke <joern.rennecke@embecosm.com>
12776 * c-opts.c: Include "tm_p.h".
12778 2010-06-20 Joseph Myers <joseph@codesourcery.com>
12780 * c-common.c (parse_optimize_options): Update call to
12783 2010-06-18 Nathan Froyd <froydnj@codesourcery.com>
12785 * c-common.c (record_types_used_by_current_var_decl): Adjust for
12786 new type of types_used_by_cur_var_decl.
12788 2010-06-17 Joern Rennecke <joern.rennecke@embecosm.com>
12791 * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Add cast
12792 for C++ standard compliance.
12794 2010-06-16 Jason Merrill <jason@redhat.com>
12796 * c.opt: Add -Wnoexcept.
12798 2010-06-16 Richard Guenther <rguenther@suse.de>
12801 * c-common.c (c_common_truthvalue_conversion): Remove
12802 premature and wrong optimization concering ADDR_EXPRs.
12804 2010-06-15 Arnaud Charlet <charlet@adacore.com>
12806 * c-ada-spec.c (dump_sloc): Remove column info.
12807 (is_simple_enum): New function.
12808 (dump_generic_ada_node, print_ada_declaration): Map C enum types to Ada
12809 enum types when relevant.
12811 2010-06-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
12813 * c-common.c (conversion_warning): Warn at expression
12816 2010-06-10 Joseph Myers <joseph@codesourcery.com>
12818 * c-opts.c (c_common_handle_option): Don't handle
12821 2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
12823 * c-pragma.c (push_alignment): Use typed GC allocation.
12824 (handle_pragma_push_options): Likewise.
12826 * c-common.c (parse_optimize_options): Likewise.
12828 * c-common.h (struct sorted_fields_type): Add variable_size GTY
12831 2010-06-07 Joseph Myers <joseph@codesourcery.com>
12833 * c-common.c (flag_preprocess_only, flag_undef, flag_no_builtin,
12834 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
12835 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
12836 flag_signed_bitfields, warn_strict_null_sentinel,
12837 flag_nil_receivers, flag_zero_link, flag_replace_objc_classes,
12838 flag_gen_declaration, flag_no_gnu_keywords,
12839 flag_implement_inlines, flag_implicit_templates,
12840 flag_implicit_inline_templates, flag_optional_diags,
12841 flag_elide_constructors, flag_default_inline, flag_rtti,
12842 flag_conserve_space, flag_access_control, flag_check_new,
12843 flag_new_for_scope, flag_weak, flag_working_directory,
12844 flag_use_cxa_atexit, flag_use_cxa_get_exception_ptr,
12845 flag_enforce_eh_specs, flag_threadsafe_statics,
12846 flag_pretty_templates): Remove.
12847 * c-common.h (flag_preprocess_only, flag_nil_receivers,
12848 flag_objc_exceptions, flag_objc_sjlj_exceptions, flag_zero_link,
12849 flag_replace_objc_classes, flag_undef, flag_no_builtin,
12850 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
12851 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
12852 flag_const_strings, flag_signed_bitfields, flag_gen_declaration,
12853 flag_no_gnu_keywords, flag_implement_inlines,
12854 flag_implicit_templates, flag_implicit_inline_templates,
12855 flag_optional_diags, flag_elide_constructors, flag_default_inline,
12856 flag_rtti, flag_conserve_space, flag_access_control,
12857 flag_check_new, flag_new_for_scope, flag_weak,
12858 flag_working_directory, flag_use_cxa_atexit,
12859 flag_use_cxa_get_exception_ptr, flag_enforce_eh_specs,
12860 flag_threadsafe_statics, flag_pretty_templates,
12861 warn_strict_null_sentinel): Remove.
12862 * c.opt (E, Wstrict-null-sentinel, faccess-control, fasm,
12863 fbuiltin, fcheck-new, fconserve-space, felide-constructors,
12864 fenforce-eh-specs, ffor-scope, fgnu-keywords, fimplement-inlines,
12865 fimplicit-inline-templates, fimplicit-templates,
12866 flax-vector-conversions, fms-extensions, fnil-receivers,
12867 fnonansi-builtins, fpretty-templates, freplace-objc-classes,
12868 frtti, fshort-double, fshort-enums, fshort-wchar,
12869 fsigned-bitfields, fsigned-char, fstats, fthreadsafe-statics,
12870 funsigned-bitfields, funsigned-char, fuse-cxa-atexit,
12871 fuse-cxa-get-exception-ptr, fweak, fworking-directory, fzero-link,
12872 gen-decls, undef): Use Var.
12873 (fdefault-inline, foptional-diags): Document as doing nothing.
12874 * c-opts.c (c_common_handle_option): Remove cases for options now
12875 using Var. Mark ignored options as such.
12877 2010-06-05 Steven Bosscher <steven@gcc.gnu.org>
12879 * c-common.c: Moved to here from parent directory.
12880 * c-common.def: Likewise.
12881 * c-common.h: Likewise.
12882 * c-cppbuiltin.c: Likewise.
12883 * c-dump.c: Likewise.
12884 * c-format.c: Likewise.
12885 * c-format.h : Likewise.
12886 * c-gimplify.c: Likewise.
12887 * c-lex.c: Likewise.
12888 * c-omp.c: Likewise.
12890 * c-opts.c: Likewise.
12891 * c-pch.c: Likewise.
12892 * c-ppoutput.c: Likewise.
12893 * c-pragma.c: Likewise.
12894 * c-pragma.h: Likewise.
12895 * c-pretty-print.c: Likewise.
12896 * c-pretty-print.h: Likewise.
12897 * c-semantics.c: Likewise.
12898 * stub-objc.c: Likewise.
12900 * c-common.c: Include gt-c-family-c-common.h.
12901 * c-pragma.c: Include gt-c-family-c-pragma.h.
12903 Copyright (C) 2010-2022 Free Software Foundation, Inc.
12905 Copying and distribution of this file, with or without modification,
12906 are permitted in any medium without royalty provided the copyright
12907 notice and this notice are preserved.