1 2022-05-16 Jason Merrill <jason@redhat.com>
4 * c-attribs.cc (handle_mode_attribute): Don't fix broken typedefs
7 2022-05-16 Martin Liska <mliska@suse.cz>
9 * c-common.cc (ARRAY_SIZE): Use ARRAY_SIZE.
10 (c_common_nodes_and_builtins): Likewise.
11 * c-format.cc (check_tokens): Likewise.
12 (check_plain): Likewise.
13 * c-pragma.cc (c_pp_lookup_pragma): Likewise.
14 (init_pragma): Likewise.
15 * known-headers.cc (get_string_macro_hint): Likewise.
16 (get_stdlib_header_for_name): Likewise.
17 * c-attribs.cc: Likewise.
19 2022-05-13 Richard Biener <rguenther@suse.de>
21 * c-omp.cc: Remove gimple-fold.h include.
23 2022-05-12 Jakub Jelinek <jakub@redhat.com>
25 * c-common.h (enum rid): Add RID_OMP_ALL_MEMORY.
26 * c-omp.cc (c_finish_omp_depobj): Don't build_fold_addr_expr
29 2022-05-11 Martin Liska <mliska@suse.cz>
32 * c-opts.cc (c_common_handle_option): Change option name.
33 * c.opt: Remove Joined and use Separate option.
35 2022-05-09 Alex Coplan <alex.coplan@arm.com>
37 * c-common.h (get_dump_info): Delete.
38 * c-gimplify.cc (c_genericize): Get TDI_original dump file info
39 from the global dump_manager instead of the (now obsolete)
41 * c-opts.cc (original_dump_file): Delete.
42 (original_dump_flags): Delete.
43 (c_common_parse_file): Switch to using global dump_manager to
44 manage the original dump file; fix leak of dump file.
45 (get_dump_info): Delete.
47 2022-05-07 Marek Polacek <polacek@redhat.com>
51 * c-attribs.cc (positional_argument): Pass POS by reference. Deal
52 with FN being either a function declaration or function type. Use
53 maybe_adjust_arg_pos_for_attribute.
54 * c-common.cc (check_function_arguments): Maybe pass FNDECL down to
55 check_function_format.
56 * c-common.h (maybe_adjust_arg_pos_for_attribute): Declare.
57 (positional_argument): Adjust.
58 * c-format.cc (get_constant): Rename to ...
59 (validate_constant): ... this. Take EXPR by reference. Return bool
61 (handle_format_arg_attribute): Don't overwrite FORMAT_NUM_EXPR by the
62 return value of validate_constant.
63 (decode_format_attr): Don't overwrite FORMAT_NUM_EXPR and
64 FIRST_ARG_NUM_EXPR by the return value of validate_constant.
65 (check_function_format): Adjust a parameter name.
66 (handle_format_attribute): Maybe pass FNDECL down to decode_format_attr.
68 2022-05-04 Marek Polacek <polacek@redhat.com>
70 * c-warn.cc (warnings_for_convert_and_check): Convert constants of type
73 2022-04-30 Jason Merrill <jason@redhat.com>
76 * c-attribs.cc (handle_mode_attribute): Copy attributes, aligned,
78 * c-common.cc (set_underlying_type): Add assert.
80 2022-04-26 Patrick Palka <ppalka@redhat.com>
83 * c-common.cc (verify_tree) [restart]: Move up to before the
86 2022-04-11 Jakub Jelinek <jakub@redhat.com>
89 * c-common.cc (c_common_nodes_and_builtins): After registering __int%d
90 and __int%d__ builtin types, initialize corresponding ridpointers
93 2022-03-30 Marek Polacek <polacek@redhat.com>
96 * c-warn.cc (conversion_warning) <case COND_EXPR>: Don't call
97 conversion_warning when OP1 is null.
99 2022-03-30 Thomas Schwinge <thomas@codesourcery.com>
101 * c.opt (Wc++11-extensions, Wc++14-extensions, Wc++17-extensions)
102 (Wc++20-extensions, Wc++23-extensions): Remove 'LangEnabledBy'
105 2022-03-30 Thomas Schwinge <thomas@codesourcery.com>
107 * c.opt (Wuse-after-free): Remove.
109 2022-03-30 Thomas Schwinge <thomas@codesourcery.com>
111 * c.opt (Warray-bounds): Remove.
113 2022-03-26 Thomas Schwinge <thomas@codesourcery.com>
115 * c.opt: Properly quote comment.
117 2022-03-25 Eric Botcazou <ebotcazou@adacore.com>
119 * c-ada-spec.cc (dump_ada_import): Deal with the "section" attribute
120 (dump_ada_node) <POINTER_TYPE>: Do not modify and pass the name, but
121 the referenced type instead. Deal with the anonymous original type
122 of a typedef'ed type. In the actual access case, follow the chain
123 of external subtypes.
124 <TYPE_DECL>: Tidy up control flow.
126 2022-03-21 Qian Jianhua <qianjh@cn.fujitsu.com>
128 * c-ada-spec.cc: Change array length
130 2022-03-19 Arthur Cohen <arthur.cohen@embecosm.com>
132 * c-common.cc (c_family_tests): Call the new tests.
133 * c-common.h (c_diagnostic_tests): Declare.
134 (c_opt_problem_cc_tests): Likewise.
136 2022-03-19 Jakub Jelinek <jakub@redhat.com>
139 * c-pretty-print.cc (c_fold_indirect_ref_for_warn): For C++ don't
140 return COMPONENT_REFs with FIELD_DECLs whose containing scope can't
143 2022-03-16 Christophe Lyon <christophe.lyon@arm.com>
144 Roger Sayle <roger@nextmovesoftware.com>
147 * c-attribs.cc (decl_or_type_attrs): Add error_mark_node check.
149 2022-03-16 Patrick Palka <ppalka@redhat.com>
152 * c.opt: Add -ffold-simple-inlines.
154 2022-03-13 Tobias Burnus <tobias@codesourcery.com>
156 * c-target.def (check_string_object_format_arg): Fix description typo.
158 2022-03-12 Thomas Schwinge <thomas@codesourcery.com>
161 * c-common.h (c_omp_map_clause_name): Remove.
162 * c-omp.cc (c_omp_map_clause_name): Remove.
164 2022-03-09 Jakub Jelinek <jakub@redhat.com>
167 * c-opts.cc (c_common_post_options): Don't enable
168 -Wshift-negative-value from -Wextra for C++20 or later.
169 * c-ubsan.cc (ubsan_instrument_shift): Adjust comments.
170 * c-warn.cc (maybe_warn_shift_overflow): Use TYPE_OVERFLOW_WRAPS
171 instead of TYPE_UNSIGNED.
173 2022-03-07 Jakub Jelinek <jakub@redhat.com>
175 * c-attribs.cc: Fix up duplicated word issue in a comment.
177 2022-03-01 Martin Liska <mliska@suse.cz>
180 * c-attribs.cc (handle_target_clones_attribute): Use
181 get_target_clone_attr_len and report warning soon.
183 2022-02-17 Jonathan Wakely <jwakely@redhat.com>
185 * c-pragma.cc (handle_pragma_pack): Remove parameter name.
186 (handle_pragma_weak): Likewise.
187 (handle_pragma_scalar_storage_order): Likewise.
188 (handle_pragma_redefine_extname): Likewise.
189 (handle_pragma_visibility): Likewise.
190 (handle_pragma_diagnostic): Likewise.
191 (handle_pragma_target): Likewise.
192 (handle_pragma_optimize): Likewise.
193 (handle_pragma_push_options): Likewise.
194 (handle_pragma_pop_options): Likewise.
195 (handle_pragma_reset_options): Likewise.
196 (handle_pragma_message): Likewise.
197 (handle_pragma_float_const_decimal64): Likewise.
199 2022-02-16 Jakub Jelinek <jakub@redhat.com>
202 * c-omp.cc (c_finish_omp_atomic): For MIN_EXPR/MAX_EXPR, try first
203 build_binary_op with LT_EXPR and only if that doesn't return
204 error_mark_node call build_modify_expr.
206 2022-02-16 Jakub Jelinek <jakub@redhat.com>
209 * c-common.cc (shorten_compare): Convert original arguments to
210 the original *restype_ptr when mixing binary and decimal float.
212 2022-02-14 Richard Biener <rguenther@suse.de>
215 * c-pretty-print.cc (c_pretty_printer::postfix_expression): Handle
216 internal function calls.
218 2022-02-11 Richard Biener <rguenther@suse.de>
220 * c-attribs.cc (c_common_attribute_table): Add entry for
222 (handle_vector_mask_attribute): New.
224 2022-02-10 Marcel Vollweiler <marcel@codesourcery.com>
226 * c-omp.cc (c_omp_split_clauses): Added OMP_CLAUSE_HAS_DEVICE_ADDR case.
227 * c-pragma.h (enum pragma_kind): Added 5.1 in comment.
228 (enum pragma_omp_clause): Added PRAGMA_OMP_CLAUSE_HAS_DEVICE_ADDR.
230 2022-02-09 Jason Merrill <jason@redhat.com>
232 * c-cppbuiltin.cc (c_cpp_builtins): Update values
233 of __cpp_constexpr and __cpp_concepts for C++20.
235 2022-01-24 Marek Polacek <polacek@redhat.com>
237 PR preprocessor/104030
238 * c.opt (Wbidi-chars): Mark as EnumSet. Also accept =ucn.
240 2022-01-21 Jakub Jelinek <jakub@redhat.com>
243 * c-common.h (check_function_arguments_recurse): Add for_format
245 * c-common.cc (check_function_nonnull): Pass false to
246 check_function_arguments_recurse's last argument.
247 (check_function_arguments_recurse): Add for_format argument,
248 if true, don't stop on warning_suppressed_p.
249 * c-format.cc (check_format_info): Pass true to
250 check_function_arguments_recurse's last argument.
252 2022-01-19 David Malcolm <dmalcolm@redhat.com>
254 * c-common.cc (c_common_c_tests): Rename to...
255 (c_common_cc_tests): ...this.
256 (c_family_tests): Update calls for .c to .cc renaming.
257 * c-common.h (c_format_c_tests): Rename to...
258 (c_format_cc_tests): ...this.
259 (c_indentation_c_tests): Rename to...
260 (c_indentation_cc_tests): ...this.
261 (c_pretty_print_c_tests): Rename to...
262 (c_pretty_print_cc_tests): ...this.
263 * c-format.cc (c_format_c_tests): Rename to...
264 (c_format_cc_tests): ...this.
265 * c-indentation.cc (c_indentation_c_tests): Rename to...
266 (c_indentation_cc_tests): ...this.
267 * c-pretty-print.cc (c_pretty_print_c_tests): Rename to...
268 (c_pretty_print_cc_tests): ...this.
270 2022-01-17 Martin Liska <mliska@suse.cz>
272 * c-ada-spec.cc: Rename .c names to .cc.
273 * c-ada-spec.h: Likewise.
274 * c-common.cc (c_build_vec_convert): Likewise.
275 (warning_candidate_p): Likewise.
276 * c-common.h (enum rid): Likewise.
277 (build_real_imag_expr): Likewise.
278 (finish_label_address_expr): Likewise.
279 (c_get_substring_location): Likewise.
280 (c_build_bind_expr): Likewise.
281 (conflict_marker_get_final_tok_kind): Likewise.
282 (c_parse_error): Likewise.
283 (check_missing_format_attribute): Likewise.
284 (invalid_array_size_error): Likewise.
285 (warn_for_multistatement_macros): Likewise.
286 (build_attr_access_from_parms): Likewise.
287 * c-cppbuiltin.cc (c_cpp_builtins): Likewise.
288 * c-format.cc: Likewise.
289 * c-gimplify.cc (c_gimplify_expr): Likewise.
290 * c-indentation.h: Likewise.
291 * c-objc.h (objc_prop_attr_kind_for_rid): Likewise.
292 * c-omp.cc (c_omp_predetermined_mapping): Likewise.
293 * c-opts.cc (c_common_post_options): Likewise.
294 (set_std_cxx23): Likewise.
295 * c-pragma.cc (handle_pragma_redefine_extname): Likewise.
296 * c-pretty-print.h: Likewise.
298 2022-01-17 Martin Liska <mliska@suse.cz>
300 * c-ada-spec.c: Moved to...
301 * c-ada-spec.cc: ...here.
302 * c-attribs.c: Moved to...
303 * c-attribs.cc: ...here.
304 * c-common.c: Moved to...
305 * c-common.cc: ...here.
306 * c-cppbuiltin.c: Moved to...
307 * c-cppbuiltin.cc: ...here.
308 * c-dump.c: Moved to...
309 * c-dump.cc: ...here.
310 * c-format.c: Moved to...
311 * c-format.cc: ...here.
312 * c-gimplify.c: Moved to...
313 * c-gimplify.cc: ...here.
314 * c-indentation.c: Moved to...
315 * c-indentation.cc: ...here.
316 * c-lex.c: Moved to...
318 * c-omp.c: Moved to...
320 * c-opts.c: Moved to...
321 * c-opts.cc: ...here.
322 * c-pch.c: Moved to...
324 * c-ppoutput.c: Moved to...
325 * c-ppoutput.cc: ...here.
326 * c-pragma.c: Moved to...
327 * c-pragma.cc: ...here.
328 * c-pretty-print.c: Moved to...
329 * c-pretty-print.cc: ...here.
330 * c-semantics.c: Moved to...
331 * c-semantics.cc: ...here.
332 * c-ubsan.c: Moved to...
333 * c-ubsan.cc: ...here.
334 * c-warn.c: Moved to...
335 * c-warn.cc: ...here.
336 * cppspec.c: Moved to...
337 * cppspec.cc: ...here.
338 * stub-objc.c: Moved to...
339 * stub-objc.cc: ...here.
341 2022-01-15 Martin Sebor <msebor@redhat.com>
344 * c.opt (-Wdangling-pointer): New option.
346 2022-01-15 Martin Sebor <msebor@redhat.com>
348 PR tree-optimization/80532
349 * c.opt (-Wuse-after-free): New options.
351 2022-01-14 David Malcolm <dmalcolm@redhat.com>
353 * c-attribs.c (c_common_attribute_table): Add "tainted_args".
354 (handle_tainted_args_attribute): New.
356 2022-01-13 Anthony Sharp <anthonysharp15@gmail.com>
357 Jason Merrill <jason@redhat.com>
360 * c.opt: Added -Wmissing-template-keyword.
362 2022-01-13 Richard Biener <rguenther@suse.de>
365 * c-common.c (c_common_mark_addressable_vec): Handle TARGET_EXPR.
367 2022-01-12 Martin Liska <mliska@suse.cz>
370 * c-attribs.c (handle_optimize_attribute): Do not call
371 cl_optimization_compare if we seen an error.
373 2022-01-11 Jakub Jelinek <jakub@redhat.com>
377 * c-warn.c (conversion_warning): Handle BIT_AND_EXPR, BIT_IOR_EXPR
380 2022-01-10 Richard Biener <rguenther@suse.de>
383 * c-common.c (c_build_shufflevector): Wrap the BIT_FIELD_REF
384 in a TARGET_EXPR to force a temporary.
386 2022-01-06 Marek Polacek <polacek@redhat.com>
389 * c-pragma.c (handle_pragma_scalar_storage_order): Use %< %> in
391 (handle_pragma_diagnostic): Likewise.
393 2022-01-03 Marek Polacek <polacek@redhat.com>
396 * c-format.c (check_tokens): Accept "decl-specifier*".
398 2022-01-03 Jakub Jelinek <jakub@redhat.com>
401 * c-attribs.c (handle_non_overlapping_attribute): New function.
402 (c_common_attribute_table): Add "non overlapping" attribute.
404 2021-12-30 Jakub Jelinek <jakub@redhat.com>
407 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Perform
408 cpp_define_unused/cpp_undef calls with forced token locations
411 2021-12-27 Patrick Palka <ppalka@redhat.com>
414 * c-common.c (pointer_int_sum): When quiet, return
415 error_mark_node for an incomplete pointed-to type and don't
416 call size_in_bytes_loc.
418 2021-12-17 Jason Merrill <jason@redhat.com>
421 * c-opts.c (c_common_post_options): Update defaults.
423 2021-12-16 Martin Liska <mliska@suse.cz>
426 * c-pragma.c (handle_pragma_pop_options): Do not check
427 global options modification when an error is seen in parsing
428 of options (pragmas or attributes).
430 2021-12-12 Jonathan Wakely <jwakely@redhat.com>
432 * known-headers.cc: Define INCLUDE_MEMORY instead of
434 * name-hint.h: Likewise.
435 (class name_hint): Use std::unique_ptr instead of gnu::unique_ptr.
437 2021-12-09 Jakub Jelinek <jakub@redhat.com>
440 * c-pch.c (c_common_no_more_pch): Pass a temporary void * var
441 with NULL value instead of NULL to host_hooks.gt_pch_use_address.
443 2021-12-03 Jakub Jelinek <jakub@redhat.com>
446 * c-pch.c (struct c_pch_validity): Remove pch_init member.
447 (pch_init): Don't initialize v.pch_init.
448 (c_common_valid_pch): Don't warn and punt if .text addresses change.
450 2021-12-01 Jason Merrill <jason@redhat.com>
453 * c.opt: Add -fconstexpr-fp-except.
455 2021-11-29 Richard Biener <rguenther@suse.de>
457 * c-format.c (check_format_string): Remove spurious
460 2021-11-29 Richard Biener <rguenther@suse.de>
462 * c-opts.c (c_common_post_options): Remove unreachable return.
463 * c-pragma.c (handle_pragma_target): Likewise.
464 (handle_pragma_optimize): Likewise.
466 2021-11-25 Jakub Jelinek <jakub@redhat.com>
469 * c-opts.c (c_common_post_options): Enable -Wcomma-subscript by
470 default for C++23 regardless of warn_deprecated.
471 * c-cppbuiltin.c (c_cpp_builtins): Predefine
472 __cpp_multidimensional_subscript=202110L for C++23.
474 2021-11-23 Martin Sebor <msebor@redhat.com>
477 * c.opt: Add -Winfinite-recursion.
479 2021-11-19 Martin Sebor <msebor@redhat.com>
483 * c-common.c (decl_with_nonnull_addr_p): Call maybe_nonzero_address
484 and improve handling tof defined symbols.
486 2021-11-19 Martin Liska <mliska@suse.cz>
489 2021-11-18 Martin Liska <mliska@suse.cz>
491 * c-gimplify.c (genericize_c_loop): Use option directly.
493 2021-11-18 Matthias Kretz <m.kretz@gsi.de>
495 * c-common.c (c_common_reswords): Add __builtin_assoc_barrier.
496 * c-common.h (enum rid): Add RID_BUILTIN_ASSOC_BARRIER.
498 2021-11-18 Martin Liska <mliska@suse.cz>
500 * c-gimplify.c (genericize_c_loop): Use option directly.
502 2021-11-17 Martin Uecker <uecker@gcc.gnu.org>
506 * c-common.c (pointer_int_sum): Make sure pointer expressions
507 are evaluated first when the size expression depends on for
508 variably-modified types.
510 2021-11-17 Marek Polacek <polacek@redhat.com>
512 PR preprocessor/103026
513 * c.opt (Wbidi-chars, Wbidi-chars=): New option.
515 2021-11-16 Jason Merrill <jason@redhat.com>
517 * c-common.c (release_tree_vector): Only cache vecs smaller than
520 2021-11-15 Jason Merrill <jason@redhat.com>
522 * c.opt: Add -fimplicit-constexpr.
523 * c-cppbuiltin.c: Define __cpp_implicit_constexpr.
524 * c-opts.c (c_common_post_options): Disable below C++14.
526 2021-11-15 Jakub Jelinek <jakub@redhat.com>
528 * c-omp.c (c_omp_split_clauses) <case OMP_CLAUSE_THREAD_LIMIT>:
529 Duplicate to both OMP_TARGET and OMP_TEAMS.
531 2021-11-10 Marek Polacek <polacek@redhat.com>
534 * c-pragma.c (handle_pragma_diagnostic): Handle #pragma GCC diagnostic
537 2021-11-09 David Malcolm <dmalcolm@redhat.com>
539 * c-pragma.c (GCC_BAD_AT): New macro.
540 (GCC_BAD2_AT): New macro.
541 (handle_pragma_pack): Use the location of the pertinent token when
542 issuing diagnostics about invalid constants/actions, and trailing
544 (handle_pragma_target): Likewise for non-string "GCC option".
545 (handle_pragma_message): Likewise for trailing junk.
547 2021-11-03 Joseph Myers <joseph@codesourcery.com>
550 * c-common.c (convert_and_check): Add argument init_const. Call
551 convert_init if init_const.
552 * c-common.h (convert_and_check): Update prototype.
553 (convert_init): New prototype.
555 2021-11-01 David Malcolm <dmalcolm@redhat.com>
557 * c-lex.c (c_lex_with_flags): When complaining about non-printable
558 CPP_OTHER tokens, set the "escape on output" flag.
560 2021-10-27 Jakub Jelinek <jakub@redhat.com>
562 * c-omp.c (c_omp_check_loop_iv_r): Don't clear 3rd bit for
564 (c_omp_check_nonrect_loop_iv): Handle POINTER_PLUS_EXPR.
565 (c_omp_check_loop_iv): Set kind even if the iterator is non-integral.
567 2021-10-27 Jakub Jelinek <jakub@redhat.com>
570 * c-common.h (c_omp_check_loop_iv_exprs): Add enum tree_code argument.
571 * c-omp.c (c_omp_check_loop_iv_r): For trees other than decls,
572 TREE_VEC, PLUS_EXPR, MINUS_EXPR, MULT_EXPR, POINTER_PLUS_EXPR or
573 conversions temporarily clear the 3rd bit from d->kind while walking
575 (c_omp_check_loop_iv_exprs): Add CODE argument. Or in 4 into data.kind
576 if possibly non-rectangular.
578 2021-10-21 Jakub Jelinek <jakub@redhat.com>
581 * c-omp.c (c_omp_predefined_variable): Return true also for
582 ubsan_create_data created artificial variables.
584 2021-10-14 Joseph Myers <joseph@codesourcery.com>
586 * c-format.c (printf_length_specs, scanf_length_specs)
587 (print_char_table, scan_char_table): Support DFP formats for C2X.
588 * c-format.h (TEX_D32, TEX_D64, TEX_D128): Remove.
589 (T2X_D32, T2X_D64, T2X_D128): New macros.
591 2021-10-14 Kwok Cheung Yeung <kcy@codesourcery.com>
593 * c-omp.c (c_omp_check_context_selector): Rename to
594 omp_check_context_selector and move to omp-general.c.
595 (c_omp_mark_declare_variant): Rename to omp_mark_declare_variant and
596 move to omp-general.c.
598 2021-10-12 Joseph Myers <joseph@codesourcery.com>
600 * c-format.c (print_char_table): Add %b and %B formats.
601 (scan_char_table): Add %b format.
602 * c-format.h (T2X_UI, T2X_UL, T2X_ULL, T2X_US, T2X_UC, T2X_ST)
603 (T2X_UPD, T2X_UIM): New macros.
605 2021-10-12 Jakub Jelinek <jakub@redhat.com>
607 * c-omp.c (c_finish_omp_atomic): Use
608 clear_padding_type_may_have_padding_p.
610 2021-10-08 Martin Liska <mliska@suse.cz>
612 * c-opts.c (c_common_post_options): Use new macro
615 2021-10-07 Martin Liska <mliska@suse.cz>
617 * c-common.c (parse_optimize_options): Make
618 save_opt_decoded_options a pointer type.
620 2021-10-06 Jakub Jelinek <jakub@redhat.com>
622 PR tree-optimization/102571
623 * c-omp.c (c_finish_omp_atomic): Optimize the case where type has
624 padding, but the non-padding bits are contiguous set of bytes
625 by adjusting the memcmp call arguments instead of emitting
626 __builtin_clear_padding and then comparing all the type's bytes.
628 2021-10-06 Jakub Jelinek <jakub@redhat.com>
631 * c-cppbuiltin.c (c_cpp_builtins): For -std=c++23 predefine
632 __cpp_constexpr to 202110L rather than 201907L.
634 2021-10-04 Marek Polacek <polacek@redhat.com>
637 * c-common.h (do_warn_array_compare): Declare.
638 * c-warn.c (do_warn_array_compare): New.
639 * c.opt (Warray-compare): New option.
641 2021-10-02 Iain Sandoe <iain@sandoe.co.uk>
643 * c-format.c: Remove a test of TARGET_FORMAT_TYPES with
644 NULL, this is not needed.
646 2021-10-01 Martin Sebor <msebor@redhat.com>
649 * c-common.c (decl_with_nonnull_addr_p): Handle members.
650 Check and perform warning suppression.
651 (c_common_truthvalue_conversion): Enhance warning suppression.
653 2021-10-01 Martin Liska <mliska@suse.cz>
656 * c-common.c (parse_optimize_options): decoded_options[0] is
657 used for program name, so merged_decoded_options should also
660 2021-10-01 Jakub Jelinek <jakub@redhat.com>
661 Richard Biener <rguenther@suse.de>
664 * c-ubsan.c (ubsan_instrument_division): Check the right
665 flag_sanitize_recover bit, depending on which sanitization
666 is done. Sanitize INT_MIN / -1 under SANITIZE_SI_OVERFLOW
667 rather than SANITIZE_DIVIDE. If both SANITIZE_SI_OVERFLOW
668 and SANITIZE_DIVIDE is enabled, neither check is known
669 to be false and flag_sanitize_recover bits for those two
670 aren't the same, emit both __ubsan_handle_divrem_overflow
671 and __ubsan_handle_divrem_overflow_abort calls.
673 2021-10-01 Martin Liska <mliska@suse.cz>
675 * c-common.c (parse_optimize_options): Combine optimize
676 options with what was provided on the command line.
678 2021-10-01 Jakub Jelinek <jakub@redhat.com>
680 * c-omp.c (c_omp_split_clauses): Also copy
681 OMP_CLAUSE_ORDER_REPRODUCIBLE.
683 2021-09-27 Martin Liska <mliska@suse.cz>
685 * c-opts.c (c_common_init_options_struct): Set also
686 x_flag_default_complex_method.
688 2021-09-22 Jakub Jelinek <jakub@redhat.com>
690 * c-omp.c (c_omp_split_clauses): Copy over OMP_CLAUSE_ALLOCATE_ALIGN.
692 2021-09-20 Matthias Kretz <m.kretz@gsi.de>
694 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Define or
695 undefine __RECIPROCAL_MATH__, __NO_SIGNED_ZEROS__,
696 __NO_TRAPPING_MATH__, __ASSOCIATIVE_MATH__, and
697 __ROUNDING_MATH__ according to the new optimization flags.
699 2021-09-18 Jakub Jelinek <jakub@redhat.com>
701 * c-omp.c (c_omp_split_clauses): Split order clause also to
702 distribute construct. Copy over OMP_CLAUSE_ORDER_UNCONSTRAINED.
704 2021-09-17 Jakub Jelinek <jakub@redhat.com>
706 * c-omp.c (c_finish_omp_atomic): Avoid creating
707 TARGET_EXPR if test is true, use create_tmp_var_raw instead of
708 create_tmp_var and add a zero initializer to TARGET_EXPRs that
709 had NULL initializer. When omitting operands after v = x,
710 use type of v rather than type of x. Fix type of vtmp
713 2021-09-13 Jason Merrill <jason@redhat.com>
715 * c.opt: Add -Winterference-size.
716 * c-cppbuiltin.c (cpp_atomic_builtins): Add __GCC_DESTRUCTIVE_SIZE
717 and __GCC_CONSTRUCTIVE_SIZE.
719 2021-09-10 Jakub Jelinek <jakub@redhat.com>
721 * c-common.h (c_finish_omp_atomic): Add r and weak arguments.
722 * c-omp.c: Include gimple-fold.h.
723 (c_finish_omp_atomic): Add r and weak arguments. Add support for
726 2021-09-09 qing zhao <qing.zhao@oracle.com>
728 * c-attribs.c (handle_uninitialized_attribute): New function.
729 (c_common_attribute_table): Add "uninitialized" attribute.
731 2021-09-08 liuhongt <hongtao.liu@intel.com>
733 * c-common.c (excess_precision_mode_join): Update below comments.
734 (c_ts18661_flt_eval_method): Set excess_precision_type to
735 EXCESS_PRECISION_TYPE_FLOAT16 when -fexcess-precision=16.
736 * c-cppbuiltin.c (cpp_atomic_builtins): Update below comments.
737 (c_cpp_flt_eval_method_iec_559): Set excess_precision_type to
738 EXCESS_PRECISION_TYPE_FLOAT16 when -fexcess-precision=16.
740 2021-09-07 Marcel Vollweiler <marcel@codesourcery.com>
742 * c-omp.c (c_finish_omp_flush): Handle MEMMODEL_SEQ_CST.
744 2021-09-03 Eric Botcazou <ebotcazou@adacore.com>
746 * c-ada-spec.c (dump_ads): Generate pragmas to disable style checks
747 and -gnatwu warning for the package specification.
749 2021-09-01 Iain Sandoe <iain@sandoe.co.uk>
751 * c-attribs.c (handle_unavailable_attribute): New.
753 2021-08-30 Jason Merrill <jason@redhat.com>
755 * c.opt: Add -Wmissing-requires.
757 2021-08-25 Lewis Hyatt <lhyatt@gmail.com>
760 * c-opts.c (c_common_input_charset_cb): New function.
761 (c_common_post_options): Call new function
762 diagnostic_initialize_input_context().
764 2021-08-20 Tobias Burnus <tobias@codesourcery.com>
766 * c-format.c (gcc_gfc_length_specs): Add 'll' and 'w'.
767 (gcc_gfc_char_table): Add T9L_LL and T9L_ULL to
768 "di" and "u", respecitively; fill with BADLEN to match
770 (get_init_dynamic_hwi): Split off from ...
771 (init_dynamic_diag_info): ... here. Call it.
772 (init_dynamic_gfc_info): Call it.
774 2021-08-20 Jakub Jelinek <jakub@redhat.com>
776 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_ERROR.
777 * c-pragma.c (omp_pragmas): Add error directive.
778 * c-omp.c (omp_directives): Uncomment error directive entry.
780 2021-08-18 Jakub Jelinek <jakub@redhat.com>
782 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_NOTHING.
783 * c-pragma.c (omp_pragmas): Add nothing directive.
784 * c-omp.c (omp_directives): Uncomment nothing directive entry.
786 2021-08-17 Jakub Jelinek <jakub@redhat.com>
789 * c-common.h (enum rid): Add RID_IS_LAYOUT_COMPATIBLE.
790 * c-common.c (c_common_reswords): Add __is_layout_compatible.
792 2021-08-17 Matt Jacobson <mhjacobson@me.com>
794 * c-opts.c (c_common_post_options): Default to
795 flag_objc_sjlj_exceptions = 1 only when flag_objc_abi < 2.
797 2021-08-17 Jakub Jelinek <jakub@redhat.com>
799 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_SCOPE.
800 * c-pragma.c (omp_pragmas): Add scope construct.
801 * c-omp.c (omp_directives): Uncomment scope directive entry.
803 2021-08-16 Sebastian Huber <sebastian.huber@embedded-brains.de>
805 * c-cppbuiltin.c (c_cpp_builtins): Define
806 __LIBGCC_GCOV_TYPE_SIZE if flag_building_libgcc is true.
808 2021-08-12 Jakub Jelinek <jakub@redhat.com>
810 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_MASKED.
811 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_FILTER.
812 * c-pragma.c (omp_pragmas_simd): Add masked construct.
813 * c-common.h (enum c_omp_clause_split): Add C_OMP_CLAUSE_SPLIT_MASKED
815 (c_finish_omp_masked): Declare.
816 * c-omp.c (c_finish_omp_masked): New function.
817 (c_omp_split_clauses): Handle combined masked constructs.
819 2021-07-30 Jakub Jelinek <jakub@redhat.com>
822 * c-common.h (enum rid): Add RID_IS_POINTER_INTERCONVERTIBLE_BASE_OF.
823 * c-common.c (c_common_reswords): Add
824 __is_pointer_interconvertible_base_of.
826 2021-07-29 Richard Biener <rguenther@suse.de>
829 * c-common.c (c_common_mark_addressable_vec): Look through
830 C_MAYBE_CONST_EXPR even if not at the toplevel.
832 2021-07-27 Martin Sebor <msebor@redhat.com>
835 * c-warn.c (warn_parm_ptrarray_mismatch): Use OEP_DECL_NAME.
837 2021-07-23 Jakub Jelinek <jakub@redhat.com>
839 * c-lex.c (c_common_has_attribute): Call canonicalize_attr_name also
840 on attr_id. Return 1 for omp::directive or omp::sequence in C++11
843 2021-07-23 Jakub Jelinek <jakub@redhat.com>
845 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP__START_ and
846 PRAGMA_OMP__LAST_ enumerators.
848 2021-07-21 Thomas Schwinge <thomas@codesourcery.com>
849 Joseph Myers <joseph@codesourcery.com>
850 Cesar Philippidis <cesar@codesourcery.com>
852 * c-pragma.h (pragma_omp_clause): Add 'PRAGMA_OACC_CLAUSE_NOHOST'.
854 2021-07-20 Martin Sebor <msebor@redhat.com>
856 * c-common.c (c_build_shufflevector): Adjust by-value argument to
858 * c-common.h (c_build_shufflevector): Same.
860 2021-07-16 Andrew Pinski <apinski@marvell.com>
863 * c-common.c (parse_optimize_options): Use the correct
866 2021-07-15 Martin Sebor <msebor@redhat.com>
870 * c-warn.c (warn_parm_array_mismatch): Use OEP_DECL_NAME.
872 2021-07-14 Jason Merrill <jason@redhat.com>
874 * c-opts.c (c_common_post_options): Set -fdelete-dead-exceptions.
876 2021-07-06 Martin Sebor <msebor@redhat.com>
878 * c-format.c (gcc_tdiag_char_table): Remove support for %G and %K.
879 (gcc_cdiag_char_table): Same.
880 (gcc_cxxdiag_char_table): Same.
882 2021-07-02 Jakub Jelinek <jakub@redhat.com>
884 * c-common.h (enum c_omp_directive_kind): New enum.
885 (struct c_omp_directive): New type.
886 (c_omp_categorize_directive): Declare.
887 * c-omp.c (omp_directives): New variable.
888 (c_omp_categorize_directive): New function.
890 2021-07-01 Eric Botcazou <ebotcazou@adacore.com>
892 * c-ada-spec.c (packed_layout): New global variable.
893 (dump_ada_declaration): Set it upon seeing a packed record type.
894 Do not put the "aliased" keyword if it is set.
895 (dump_ada_structure): Add Pack aspect if it is set and clear it.
897 2021-07-01 Eric Botcazou <ebotcazou@adacore.com>
899 * c-ada-spec.c (check_name): Rename into...
900 (check_type_name_conflict): ...this. Minor tweak.
901 (dump_ada_function_declaration): Adjust to above renaming.
902 (dump_ada_array_domains): Fix oversight.
903 (dump_ada_declaration): Call check_type_name_conflict for variables.
905 2021-06-25 Martin Sebor <msebor@redhat.com>
907 * c-common.c (c_wrap_maybe_const): Remove TREE_NO_WARNING.
908 (c_common_truthvalue_conversion): Replace direct uses of
909 TREE_NO_WARNING with warning_suppressed_p, suppress_warning, and
911 (check_function_arguments_recurse): Same.
912 * c-gimplify.c (c_gimplify_expr): Same.
913 * c-warn.c (overflow_warning): Same.
914 (warn_logical_operator): Same.
915 (warn_if_unused_value): Same.
916 (do_warn_unused_parameter): Same.
918 2021-06-24 Jakub Jelinek <jakub@redhat.com>
920 * c-common.h (enum c_omp_region_type): Add C_ORT_TARGET and
922 * c-omp.c (c_omp_split_clauses): For OMP_CLAUSE_IN_REDUCTION on
923 combined target constructs also add map (always, tofrom:) clause.
925 2021-06-15 Robin Dapp <rdapp@linux.ibm.com>
927 * c-attribs.c (common_handle_aligned_attribute): Remove short
928 circuit and dead code.
930 2021-06-14 Jonathan Wakely <jwakely@redhat.com>
933 * known-headers.cc (get_stdlib_header_for_name): Add known
934 headers for EXIT_FAILURE, EXIT_SUCCESS, abort, atexit, calloc,
937 2021-06-12 Jason Merrill <jason@redhat.com>
939 * c-attribs.c (handle_unused_attribute): Handle FIELD_DECL.
941 2021-06-11 Jakub Jelinek <jakub@redhat.com>
944 * c-cppbuiltin.c (c_cpp_builtins): Predefine __cpp_if_consteval for
945 -std=c++2b for P1938R3 consteval if support.
947 2021-06-09 Jason Merrill <jason@redhat.com>
950 * c-warn.c (warn_for_sign_compare): Remove C++ enum mismatch
953 2021-06-07 Martin Liska <mliska@suse.cz>
955 * c-target.def: Split long lines and replace them
958 2021-06-04 Martin Sebor <msebor@redhat.com>
961 * c-attribs.c (positional_argument): Bail on erroneous types.
963 2021-06-04 Martin Sebor <msebor@redhat.com>
965 * c-warn.c (warn_parm_array_mismatch): Check TREE_PURPOSE to test
966 for element presence.
968 2021-06-03 Eric Botcazou <ebotcazou@adacore.com>
970 * c-ada-spec.c (dump_ada_macros): Minor tweaks.
971 (dump_ada_decl_name): Likewise.
972 (dump_anonymous_type_name): Remove parent parameter and adjust.
973 (dump_sloc): Minor tweak.
974 (dump_ada_array_type): Remove type parameter and adjust.
975 (dump_ada_enum_type): Remove parent parameter and adjust.
976 (dump_ada_node): Adjust calls to above functions.
977 (dumped_anonymous_types): New global variable.
978 (dump_nested_types_1): Rename into...
979 (dump_nested_types): ...this.
980 (dump_nested_type): Remove parent and dumped_types parameters.
981 <ARRAY_TYPE>: Replace dumped_types with dumped_anonymous_types.
982 Adjust calls to dump_anonymous_type_name and dump_ada_array_type.
983 (dump_ada_specs): Initialize and free dumped_anonymous_types.
985 2021-06-03 Eric Botcazou <ebotcazou@adacore.com>
987 * c-ada-spec.c (pp_ada_tree_identifier): Tidy up.
988 (dump_ada_node) <POINTER_TYPE>: Deal specially with external subtypes.
990 2021-06-03 Eric Botcazou <ebotcazou@adacore.com>
992 * c-ada-spec.c (dump_ada_enum_type): Dump a prefix for constants.
993 (htable_t): New typedef.
994 (overloaded_names): Use it.
995 (add_name): New function.
996 (init_overloaded_names): Use add_name to populate the table and add
997 special cases for sigaction and stat.
998 (overloaded_name_p): Rename into...
999 (overloading_index): ...this. Do not initialize overloaded_names table
1000 here. Return the index or zero.
1001 (dump_ada_declaration): Minor tweaks. Do not skip overloaded functions
1002 but add an overloading suffix instead.
1003 (dump_ada_specs): Initialize overloaded_names tables here.
1005 2021-06-01 Martin Liska <mliska@suse.cz>
1008 * c-attribs.c (handle_optimize_attribute): Limit sanity check
1009 to a situation where we are not in processing of an optimize
1011 * c-pragma.c (handle_pragma_pop_options): Restore target
1014 2021-05-31 Indu Bhagat <indu.bhagat@oracle.com>
1017 * c-pch.c (c_common_valid_pch): Use xstrdup for debug format set names.
1019 2021-05-31 Richard Biener <rguenther@suse.de>
1022 * c-common.c: Include tree-vector-builder.h and
1024 (c_common_reswords): Add __builtin_shufflevector.
1025 (c_build_shufflevector): New funtion.
1026 * c-common.h (enum rid): Add RID_BUILTIN_SHUFFLEVECTOR.
1027 (c_build_shufflevector): Declare.
1029 2021-05-28 Jakub Jelinek <jakub@redhat.com>
1032 * c-omp.c (c_omp_split_clauses): For reduction clause if combined with
1033 target add a map tofrom clause with OMP_CLAUSE_MAP_IMPLICIT.
1035 2021-05-28 Tobias Burnus <tobias@codesourcery.com>
1037 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_AFFINITY.
1039 2021-05-25 Martin Liska <mliska@suse.cz>
1041 PR tree-optimization/92860
1043 * c-attribs.c (handle_optimize_attribute): Save target node
1044 before calling parse_optimize_options and save it in case
1046 * c-pragma.c (handle_pragma_target): Similarly for pragma.
1047 (handle_pragma_pop_options): Likewise here.
1049 2021-05-25 Martin Liska <mliska@suse.cz>
1051 * c-attribs.c (handle_no_sanitize_coverage_attribute): New.
1053 2021-05-25 Jakub Jelinek <jakub@redhat.com>
1056 * c-omp.c (c_omp_split_clauses): Copy reduction to teams when teams is
1057 combined with simd and not with taskloop or for.
1059 2021-05-21 Jakub Jelinek <jakub@redhat.com>
1062 * c-omp.c (c_omp_split_clauses): Set OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT
1063 on firstprivate clause copy going to target construct, and for
1064 target simd set also OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT_TARGET bit.
1066 2021-05-20 Jonathan Wakely <jwakely@redhat.com>
1068 * c.opt (Wc++11-extensions, Wc++14-extensions)
1069 (Wc++17-extensions, Wc++20-extensions, Wc++23-extensions): New
1072 2021-05-20 Indu Bhagat <indu.bhagat@oracle.com>
1074 * c-lex.c (init_c_lex): Use dwarf_debuginfo_p.
1076 2021-05-20 Indu Bhagat <indu.bhagat@oracle.com>
1078 * c-opts.c (c_common_post_options): Adjust access to debug_type_names.
1079 * c-pch.c (struct c_pch_validity): Use type uint32_t.
1080 (pch_init): Renamed member.
1081 (c_common_valid_pch): Adjust access to debug_type_names.
1083 2021-05-19 Martin Sebor <msebor@redhat.com>
1086 * c-attribs.c (build_attr_access_from_parms): Handle arbitrarily many
1089 2021-05-18 Richard Biener <rguenther@suse.de>
1092 * c-attribs.c (type_valid_for_vector_size): Reject too large nunits.
1093 Reword existing nunit diagnostic.
1095 2021-05-17 Joern Rennecke <joern.rennecke@embecosm.com>
1097 * c-common.c (braced_list_to_string): Return CTOR unchanged
1098 if host and target character sizes don't match.
1100 2021-05-14 Martin Liska <mliska@suse.cz>
1102 * c.opt: Add Warning keyword for 2 options.
1104 2021-05-13 Martin Liska <mliska@suse.cz>
1106 PR middle-end/100504
1107 * c-attribs.c (handle_target_clones_attribute): Expect a string
1108 argument to target_clone argument.
1110 2021-05-11 Joseph Myers <joseph@codesourcery.com>
1112 * c-lex.c (interpret_float): Handle digit separators for C2X.
1114 2021-05-10 Martin Liska <mliska@suse.cz>
1116 * c-ada-spec.c (print_destructor): Use startswith
1117 function instead of strncmp.
1118 (dump_ada_declaration): Likewise.
1119 * c-common.c (disable_builtin_function): Likewise.
1120 (def_builtin_1): Likewise.
1121 * c-format.c (check_tokens): Likewise.
1122 (check_plain): Likewise.
1123 (convert_format_name_to_system_name): Likewise.
1125 2021-04-28 Patrick McGehearty <patrick.mcgehearty@oracle.com>
1127 * c-cppbuiltin.c (c_cpp_builtins): Add supporting macros for new
1130 2021-04-26 Thomas Schwinge <thomas@codesourcery.com>
1131 Nathan Sidwell <nathan@codesourcery.com>
1132 Tom de Vries <vries@codesourcery.com>
1133 Julian Brown <julian@codesourcery.com>
1134 Kwok Cheung Yeung <kcy@codesourcery.com>
1136 * c.opt (Wopenacc-parallelism): New.
1138 2021-04-19 Thomas Schwinge <thomas@codesourcery.com>
1140 * c.opt (fopenacc-kernels=): Remove.
1142 2021-04-08 Jakub Jelinek <jakub@redhat.com>
1144 * c-warn.c (do_warn_double_promotion): Fix comment typo,
1145 occured -> occurred.
1146 (check_alignment_of_packed_member): Fix a comment typo,
1148 (warn_parm_ptrarray_mismatch): Fix comment typos, os -> of
1149 and onless -> unless.
1150 (warn_parm_array_mismatch): Fix comment typos, declaratation
1151 -> declaration and woud -> would. Fix up comment indentation.
1153 2021-04-08 Martin Sebor <msebor@redhat.com>
1156 * c.opt (Wmismatched-new-delete): Correct spelling.
1158 2021-04-05 Eric Botcazou <ebotcazou@adacore.com>
1160 * c-ada-spec.c (is_simple_enum): Minor tweaks.
1161 (dump_ada_enum_type): Add TYPE and PARENT parameters. For non-simple
1162 enumeral types use again the type name for the enumeration constants.
1163 (dump_ada_node): Adjust call to dump_ada_enum_type.
1164 (dump_nested_type): Likewise.
1166 2021-04-01 Jason Merrill <jason@redhat.com>
1169 * c-opts.c (c_common_post_options): Bump latest_abi_version.
1171 2021-03-25 Jakub Jelinek <jakub@redhat.com>
1174 * c-warn.c (do_warn_duplicated_branches): Pass also
1175 OEP_ADDRESS_OF_SAME_FIELD to operand_equal_p.
1177 2021-03-20 Jakub Jelinek <jakub@redhat.com>
1180 * c-gimplify.c (c_genericize_control_stmt): Handle STATEMENT_LIST.
1182 2021-03-05 Eric Botcazou <ebotcazou@adacore.com>
1184 * c-ada-spec.c (dump_ada_declaration) <TYPE_DECL>: Dump nested types
1185 after entering the separate class package, if any.
1187 2021-03-04 Richard Biener <rguenther@suse.de>
1189 * c-pretty-print.c (c_pretty_printer::direct_abstract_declarator):
1192 2021-03-04 Jakub Jelinek <jakub@redhat.com>
1195 * c-ppoutput.c (print): Change src_line type from int to unsigned.
1196 (token_streamer::stream) Likewise.
1197 (maybe_print_line_1): Likewise. Don't strcmp src_file if src_loc is
1200 2021-03-03 Jakub Jelinek <jakub@redhat.com>
1203 * c-common.c (build_va_arg): Call c_common_mark_addressable_vec
1204 instead of mark_addressable. Fix a comment typo -
1205 neutrallly -> neutrally.
1207 2021-02-28 Jakub Jelinek <jakub@redhat.com>
1210 * c-attribs.c (handle_malloc_attribute): Fix a typo in inform
1211 message - refernced -> referenced. Remove superfluous space before
1212 closing paren of function calls.
1214 2021-02-25 Nathan Sidwell <nathan@acm.org>
1217 * c.opt (-flang-info-module-cmi): Renamed option.
1219 2021-02-19 Nathan Sidwell <nathan@acm.org>
1221 * c.opt (flang-info-module-read, flang-info-module-read=): New.
1223 2021-02-18 H.J. Lu <hjl.tools@gmail.com>
1226 * c-attribs.c (c_common_attribute_table): Add the "retain"
1228 (handle_retain_attribute): New function.
1230 2021-02-16 Marek Polacek <polacek@redhat.com>
1233 * c-attribs.c (handle_assume_aligned_attribute): Check that the
1234 alignment argument is non-negative. Tweak a warning message.
1236 2021-02-12 Martin Sebor <msebor@redhat.com>
1239 * c-warn.c (warn_parm_array_mismatch): Free strings returned from
1240 print_generic_expr_to_str.
1242 2021-02-10 Richard Biener <rguenther@suse.de>
1244 * c-common.c (parse_optimize_options): Free decoded_options.
1246 2021-02-04 emsr <3dw4rd@verizon.net>
1248 * c-cppbuiltin.c (c_cpp_builtins): __cpp_size_t_suffix=202011L.
1250 2021-02-03 Ed Smith-Rowland <3dw4rd@verizon.net>
1252 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_size_t_suffix.
1253 * c-lex.c (interpret_integer): Set node type for size literal.
1255 2021-01-28 Jakub Jelinek <jakub@redhat.com>
1257 * c.opt (-std=c++2a, -std=c++20, -std=gnu++2a, -std=gnu++20): Remove
1258 draft from description.
1259 (-std=c++2b): Fix a pasto, 2020 -> 2023.
1261 2021-01-26 Paul Fee <paul.f.fee@gmail.com>
1263 * c-common.h (cxx_dialect): Add cxx23 as a dialect.
1264 * c.opt: Add options for -std=c++23, std=c++2b, -std=gnu++23
1266 * c-opts.c (set_std_cxx23): New.
1267 (c_common_handle_option): Set options when -std=c++23 is enabled.
1268 (c_common_post_options): Adjust comments.
1269 (set_std_cxx20): Likewise.
1271 2021-01-25 Martin Sebor <msebor@redhat.com>
1274 * c-common.c (check_nonnull_arg): Adjust warning text.
1276 2021-01-17 Martin Sebor <msebor@redhat.com>
1278 * c-pretty-print.c (c_pretty_printer::primary_expression): Don't
1279 assume SSA_NAME_IDENTIFIER evaluates to nonzero.
1281 2021-01-16 Kwok Cheung Yeung <kcy@codesourcery.com>
1283 * c-pragma.h (pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_DETACH.
1284 Redefine PRAGMA_OACC_CLAUSE_DETACH.
1286 2021-01-15 Jakub Jelinek <jakub@redhat.com>
1288 PR tree-optimization/98597
1289 * c-pretty-print.c: Include options.h.
1290 (c_fold_indirect_ref_for_warn): New function.
1291 (print_mem_ref): Use it. If it returns something that has compatible
1292 type and is TBAA compatible with zero offset, print it and return,
1293 otherwise print it using offsetof syntax or array ref syntax. Fix up
1294 printing if MEM_REFs first operand is ADDR_EXPR, or when the first
1295 argument has pointer to array type. Print pointers using the standard
1298 2021-01-12 Martin Sebor <msebor@redhat.com>
1302 * c-pretty-print.c (print_mem_ref): Avoid assuming MEM_REF operand
1303 has pointer type. Remove redundant code. Avoid calling
1304 gimple_canonical_types_compatible_p.
1306 2021-01-07 Martin Sebor <msebor@redhat.com>
1309 * c-pretty-print.c (print_mem_ref): Strip array from access type.
1310 Avoid assuming acces type's size is constant. Correct condition
1311 guarding the printing of a parenthesis.
1313 2021-01-06 Martin Sebor <msebor@redhat.com>
1316 * c-pretty-print.c (c_pretty_printer::primary_expression): For
1317 SSA_NAMEs print VLA names and GIMPLE defining statements.
1318 (print_mem_ref): New function.
1319 (c_pretty_printer::unary_expression): Call it.
1321 2021-01-06 Richard Biener <rguenther@suse.de>
1323 PR tree-optimization/95582
1324 * c-attribs.c (c_common_attribute_table): Add entry for
1325 signed_bool_precision.
1326 (handle_signed_bool_precision_attribute): New.
1328 2020-12-24 Iain Sandoe <iain@sandoe.co.uk>
1330 * c.opt: Add -stdlib= option and enumerations for
1331 libstdc++ and libc++.
1333 2020-12-16 Martin Liska <mliska@suse.cz>
1335 * c.opt: Remove usage of Report.
1337 2020-12-14 Martin Sebor <msebor@redhat.com>
1342 * c-attribs.c (maybe_add_noinline): New function.
1343 (handle_malloc_attribute): Call it. Use ATTR_FLAG_INTERNAL.
1344 Implicitly add attribute noinline to functions not declared inline
1347 2020-12-09 Tobias Burnus <tobias@codesourcery.com>
1349 * c-pragma.c (omp_pragmas): Add 'allocate'.
1350 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_ALLOCATE.
1352 2020-12-08 Jakub Jelinek <jakub@redhat.com>
1355 * c-pragma.c (omp_pragmas): Remove "master".
1356 (omp_pragmas_simd): Add "master".
1358 2020-12-07 Marek Polacek <polacek@redhat.com>
1361 * c-common.c (verify_tree_lim_r): New function.
1362 (verify_sequence_points): Use it. Use nullptr instead of 0.
1364 2020-12-03 Martin Sebor <msebor@redhat.com>
1368 * c-attribs.c (handle_dealloc_attribute): New function.
1369 (handle_malloc_attribute): Handle argument forms of attribute.
1370 * c.opt (-Wmismatched-dealloc): New option.
1371 (-Wmismatched-new-delete): New option.
1373 2020-12-03 Jakub Jelinek <jakub@redhat.com>
1376 * c-common.h (enum rid): Add RID_BUILTIN_BIT_CAST.
1377 * c-common.c (c_common_reswords): Add __builtin_bit_cast.
1379 2020-12-01 JeanHeyd Meneide <phdofthehouse@gmail.com>
1381 * c-cppbuiltin.c (c_cpp_builtins): Add predefined
1382 {__GNUC_EXECUTION_CHARSET_NAME} and
1383 _WIDE_EXECUTION_CHARSET_NAME} macros.
1385 2020-12-01 Nathan Sidwell <nathan@acm.org>
1387 * c-common.c (module, import, export): New internal tokens (with
1389 * c-common.h (RID__MODULE, RID__IMPORT & RID__EXPORT): Enumerate
1391 (D_CXX_MODULES, D_CXX_MODULES_FLAGS): Enable them.
1392 * c-cppbuiltin.c (c_cpp_builtins): Feature macro.
1394 2020-12-01 Nathan Sidwell <nathan@acm.org>
1396 * c-opts.c (c_common_init_options): Ask for module dependencies.
1397 (c_common_handle_option): Handle -Mmodules -Mno-modules.
1398 * c-pch.c (c_common_valid_pch): ... does not play with C++
1400 * c.opt (Mmodules, Mno-modules): New preprocessor dependency
1402 (fmodules-ts, fmodule-header, fmodule-implicit-inline)
1403 (fmodule-only, fmodule-mapper, fmodule-lazy)
1404 (fmodule-version-ignore, Winvalid-imported-macros)
1405 (flang-info-include-translate, flang-info-include-translate-not):
1408 2020-11-28 Eric Botcazou <ebotcazou@adacore.com>
1410 * c-ada-spec.c (dump_nested_type) <RECORD_TYPE>: Remove obsolete code.
1411 (dump_ada_structure): Also deal with convention, unchecked union and
1412 bit-field for nested types. In the latter case, print an Alignment
1413 aspect along with the Pack aspect.
1415 2020-11-25 Martin Sebor <msebor@redhat.com>
1418 * c-attribs.c (handle_patchable_function_entry_attribute): Avoid
1421 2020-11-24 Martin Sebor <msebor@redhat.com>
1423 * c-warn.c (warn_parm_array_mismatch): Avoid invalid redeclarations.
1425 2020-11-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
1427 * c-attribs.c (handle_special_var_sec_attribute): New.
1428 (handle_noinit_attribute): Remove.
1429 (attr_noinit_exclusions): Rename to...
1430 (attr_section_exclusions): ...this, and add "persistent" attribute
1432 (c_common_attribute_table): Add "persistent" attribute.
1434 2020-11-21 Aaron Sawdey <acsawdey@linux.ibm.com>
1436 * c-pretty-print.c (c_pretty_printer::simple_type_specifier):
1437 Treat opaque types like other types.
1438 (c_pretty_printer::direct_abstract_declarator): Opaque types are
1441 2020-11-20 Martin Sebor <msebor@redhat.com>
1443 * c-warn.c (warn_parm_array_mismatch): Bail on invalid redeclarations
1444 with fewer arguments.
1446 2020-11-20 Martin Sebor <msebor@redhat.com>
1449 * c-attribs.c (handle_access_attribute): Handle ATTR_FLAG_INTERNAL.
1450 Error out on invalid modes.
1452 2020-11-20 Jakub Jelinek <jakub@redhat.com>
1455 * c-common.c (check_builtin_function_arguments): Handle
1456 BUILT_IN_CLEAR_PADDING.
1458 2020-11-18 Nathan Sidwell <nathan@acm.org>
1460 * c-lex.c (c_lex_with_flags): CPP_HEADER_NAMEs can now be seen.
1462 2020-11-17 Nathan Sidwell <nathan@acm.org>
1464 * c-common.h (enum c_tree_index): Reorder to place lazy fields
1465 after newly-added CTI_MODULE_HWM.
1467 2020-11-17 Joseph Myers <joseph@codesourcery.com>
1469 * c-cppbuiltin.c (builtin_define_float_constants): Define
1470 "*_IS_IEC_60559__" macros.
1472 2020-11-17 Nathan Sidwell <nathan@acm.org>
1474 * c-lex.c: #include "langhooks.h".
1475 (cb_undef): Maybe call preprocess_undef lang hook.
1476 * c-opts.c (c_common_post_options): Maybe call preprocess_options
1478 (push_command_line_include): Maybe call preprocess_main_file lang
1480 (cb_file_change): Likewise.
1481 * c-ppoutput.c: #include "langhooks.h.
1482 (scan_translation_unit): Maybe call preprocess_token lang hook.
1483 (class do_streamer): New, derive from token_streamer.
1484 (directives_only_cb): Data pointer is do_streamer, call
1485 preprocess_token lang hook.
1486 (scan_translation_unit_directives_only): Use do_streamer.
1487 (print_line_1): Move src_line recording to after string output.
1488 (cb_undef): Maybe call preprocess_undef lang hook.
1490 2020-11-17 Nathan Sidwell <nathan@acm.org>
1492 * c-ppoutput.c (scan_translation_unit): Use token_streamer, remove
1493 code duplicating that functionality.
1495 2020-11-17 Jakub Jelinek <jakub@redhat.com>
1498 * c-common.c (check_builtin_function_arguments)
1499 <case BUILT_IN_ADD_OVERFLOW>: Diagnose when last argument is pointer
1500 to _Atomic. For the TYPE_READONLY case, adjust message to be usable
1501 for more builtins and argument positions.
1503 2020-11-16 Iain Sandoe <iain@sandoe.co.uk>
1506 * stub-objc.c: Include c-common.h to declare enum rid.
1508 2020-11-13 Jakub Jelinek <jakub@redhat.com>
1511 * c-cppbuiltin.c: Include configargs.h.
1512 (c_cpp_builtins): For C++11 and later if THREAD_MODEL_SPEC is not
1513 defined, predefine __STDCPP_THREADS__ to 1 unless thread_model is
1516 2020-11-13 Gergö Barany <gergo@codesourcery.com>
1517 Thomas Schwinge <thomas@codesourcery.com>
1519 * c.opt (fopenacc-kernels): Add.
1521 2020-11-13 Jason Merrill <jason@redhat.com>
1523 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_using_enum.
1525 2020-11-13 Piotr H. Dabrowski <phd@phd.re>
1528 * c-cppbuiltin.c: c_cpp_builtins_optimize_pragma(): use cpp_define_unused()
1530 2020-11-13 Martin Liska <mliska@suse.cz>
1532 * c-attribs.c (build_attr_access_from_parms): Format properly.
1534 2020-11-13 Iain Sandoe <iain@sandoe.co.uk>
1537 * c-common.c (c_common_reswords): null_unspecified, nullable,
1538 nonnull, null_resettable: New keywords.
1539 * c-common.h (enum rid): RID_NULL_UNSPECIFIED, RID_NULLABLE,
1540 RID_NONNULL, RID_NULL_RESETTABLE: New.
1541 (OBJC_IS_PATTR_KEYWORD): Include nullability keywords in the
1542 ranges accepted for property attributes.
1543 * c-attribs.c (handle_objc_nullability_attribute): New.
1544 * c-objc.h (enum objc_property_attribute_group): Add
1545 OBJC_PROPATTR_GROUP_NULLABLE.
1546 (enum objc_property_attribute_kind):Add
1547 OBJC_PROPERTY_ATTR_NULL_UNSPECIFIED, OBJC_PROPERTY_ATTR_NULLABLE,
1548 OBJC_PROPERTY_ATTR_NONNULL, OBJC_PROPERTY_ATTR_NULL_RESETTABLE.
1550 2020-11-13 Iain Sandoe <iain@sandoe.co.uk>
1553 * c-attribs.c (handle_objc_root_class_attribute): New
1554 * c-objc.h (objc_start_class_interface): Add a location
1555 value for the position of the class name.
1556 * c.opt: Add Wobjc-root-class.
1557 * stub-objc.c (objc_start_class_interface): Add a location
1558 value for the position of the class name.
1560 2020-11-12 Joseph Myers <joseph@codesourcery.com>
1562 * c-lex.c (c_common_has_attribute): Take argument std_syntax.
1563 Allow scope for C. Handle standard attributes for C. Do not
1564 accept unscoped attributes if std_syntax and not handled as
1565 standard attributes.
1566 * c-common.h (c_common_has_attribute): Update prototype.
1568 2020-11-12 Nicholas Guriev <guriev-ns@ya.ru>
1571 * c-pch.c (c_common_valid_pch): Use cpp_warning with CPP_W_INVALID_PCH
1572 reason to fix -Werror=invalid-pch and -Wno-error=invalid-pch switches.
1574 2020-11-11 Patrick Palka <ppalka@redhat.com>
1577 * c-opts.c (c_common_post_options): Update latest_abi_version.
1579 2020-11-10 Jakub Jelinek <jakub@redhat.com>
1582 * c-common.h (warn_if_unused_value): Add quiet argument defaulted
1584 * c-warn.c (warn_if_unused_value): Likewise. Pass it down
1585 recursively and just return true instead of warning if it is true.
1586 Handle COMPLEX_EXPR.
1588 2020-11-10 Chung-Lin Tang <cltang@codesourcery.com>
1590 * c-common.h (c_omp_adjust_map_clauses): New declaration.
1591 * c-omp.c (struct map_clause): Helper type for c_omp_adjust_map_clauses.
1592 (c_omp_adjust_map_clauses): New function.
1594 2020-11-09 Marek Polacek <polacek@redhat.com>
1597 * c-common.c (attribute_fallthrough_p): Tweak the warning
1600 2020-11-09 Patrick Palka <ppalka@redhat.com>
1602 * c-pragma.c (handle_pragma_diagnostic): Split the
1603 unknown-option -Wpragmas diagnostic into a warning and a
1604 subsequent note containing a spelling suggestion. Avoid
1605 computing the suggestion if -Wpragmas warnings are being
1608 2020-11-09 Patrick Palka <ppalka@redhat.com>
1611 * c-indentation.c (get_visual_column): Remove location_t
1612 parameter. Move the column-tracking diagnostic code from here
1614 (should_warn_for_misleading_indentation): ... here, before the
1615 early exit for when the loci are not all distinct. Don't pass a
1616 location_t argument to get_visual_column.
1617 (assert_get_visual_column_succeeds): Don't pass a location_t
1618 argument to get_visual_column.
1619 (assert_get_visual_column_fails): Likewise.
1621 2020-11-08 Iain Sandoe <iain@sandoe.co.uk>
1623 * c-common.h (OBJC_IS_PATTR_KEYWORD): Add class to the list
1624 of keywords accepted in @property attribute contexts.
1625 * c-objc.h (enum objc_property_attribute_group): Add
1626 OBJC_PROPATTR_GROUP_CLASS.
1627 (enum objc_property_attribute_kind): Add
1628 OBJC_PROPERTY_ATTR_CLASS.
1630 2020-11-07 Iain Sandoe <iain@sandoe.co.uk>
1632 * c-common.c (c_common_reswords): Add 'atomic' property
1634 * c-common.h (enum rid): Add RID_PROPATOMIC for atomic
1635 property attributes.
1637 2020-11-07 Iain Sandoe <iain@sandoe.co.uk>
1639 * c-attribs.c (handle_nsobject_attribute): New.
1640 * c.opt: Add WNSObject-attribute.
1642 2020-11-06 Iain Sandoe <iain@sandoe.co.uk>
1644 * c-objc.h (enum objc_property_attribute_group): New
1645 (enum objc_property_attribute_kind): New.
1646 (OBJC_PROPATTR_GROUP_MASK): New.
1647 (struct property_attribute_info): Small class encapsulating
1648 parser output from property attributes.
1649 (objc_prop_attr_kind_for_rid): New
1650 (objc_add_property_declaration): Simplify interface.
1651 * stub-objc.c (enum rid): Dummy type.
1652 (objc_add_property_declaration): Simplify interface.
1653 (objc_prop_attr_kind_for_rid): New.
1655 2020-11-06 Nathan Sidwell <nathan@acm.org>
1657 * c-ada-spec.c (collect_ada_nodes): Rename
1658 DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
1659 (collect_ada_node): Likewise.
1660 (dump_forward_type): Likewise.
1661 * c-common.c (set_underlying_type): Rename
1662 DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
1663 (user_facing_original_type, c_common_finalize_early_debug): Likewise.
1665 2020-11-06 Jakub Jelinek <jakub@redhat.com>
1667 * c-common.c (verify_sequence_points): Remove DEBUG_FUNCTION.
1669 2020-11-05 Marek Polacek <polacek@redhat.com>
1672 * c.opt (Wexceptions): New option.
1674 2020-11-05 Marek Polacek <polacek@redhat.com>
1677 * c.opt (Wvexing-parse): New option.
1679 2020-11-04 Jakub Jelinek <jakub@redhat.com>
1682 * c-omp.c (c_omp_split_clauses): Look through array reductions to find
1683 underlying decl to clear in the allocate_head bitmap.
1685 2020-11-04 Iain Sandoe <iain@sandoe.co.uk>
1687 * c-objc.h (objc_non_constant_expr_p): New.
1688 * stub-objc.c (objc_non_constant_expr_p): New.
1690 2020-11-03 Nathan Sidwell <nathan@acm.org>
1692 * c.opt (MQ,MT): Reword description to be make-agnostic.
1694 2020-11-02 Nathan Sidwell <nathan@acm.org>
1696 * c-opts.c (c_common_post_options): Move var decl to its
1697 initialization point.
1699 2020-11-01 Iain Sandoe <iain@sandoe.co.uk>
1701 * c-lex.c (c_lex_with_flags): When combining '@' with a
1702 keyword for Objective-C, combine the location ranges too.
1704 2020-10-30 Qing Zhao <qing.zhao@oracle.com>
1705 H.J.Lu <hjl.tools@gmail.com>
1707 * c-attribs.c (c_common_attribute_table): Add new attribute
1708 zero_call_used_regs.
1709 (handle_zero_call_used_regs_attribute): New function.
1711 2020-10-28 Marek Polacek <polacek@redhat.com>
1714 * c-opts.c (c_common_post_options): In C++20, turn on
1715 -Wdeprecated-enum-enum-conversion and
1716 -Wdeprecated-enum-float-conversion.
1717 * c.opt (Wdeprecated-enum-enum-conversion,
1718 Wdeprecated-enum-float-conversion): New options.
1719 (Wenum-conversion): Allow for C++ too.
1721 2020-10-28 Jakub Jelinek <jakub@redhat.com>
1723 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ALLOCATE.
1724 * c-omp.c: Include bitmap.h.
1725 (c_omp_split_clauses): Handle OMP_CLAUSE_ALLOCATE.
1727 2020-10-26 Ville Voutilainen <ville.voutilainen@gmail.com>
1729 * c-common.c (__is_nothrow_assignable): New.
1730 (__is_nothrow_constructible): Likewise.
1731 * c-common.h (RID_IS_NOTHROW_ASSIGNABLE): New.
1732 (RID_IS_NOTHROW_CONSTRUCTIBLE): Likewise.
1734 2020-10-23 Jan Hubicka <hubicka@ucw.cz>
1736 * c-common.c (c_common_finalize_early_debug): Update for new thunk api.
1738 2020-10-23 Marek Polacek <polacek@redhat.com>
1741 * c-common.c (verify_tree): Handle PAREN_SIZEOF_EXPR.
1742 (c_common_init_ts): Likewise.
1743 * c-common.def (PAREN_SIZEOF_EXPR): New tree code.
1744 * c-common.h (maybe_warn_sizeof_array_div): Declare.
1745 * c-warn.c (sizeof_pointer_memaccess_warning): Unwrap NOP_EXPRs.
1746 (maybe_warn_sizeof_array_div): New function.
1747 * c.opt (Wsizeof-array-div): New option.
1749 2020-10-23 Martin Sebor <msebor@redhat.com>
1752 * c-warn.c (warn_parm_ptrarray_mismatch): Move null test earlier.
1754 2020-10-22 Martin Liska <mliska@suse.cz>
1757 * c-attribs.c (handle_no_stack_protect_function_attribute): New.
1758 (handle_stack_protect_attribute): Add error message for a
1759 no_stack_protector function.
1761 2020-10-22 Martin Liska <mliska@suse.cz>
1763 * c-cppbuiltin.c (c_cpp_builtins): Use the stack_protector enum.
1765 2020-10-22 Jan Hubicka <hubicka@ucw.cz>
1767 * c-gimplify.c: Include tree-nested.h
1768 (c_genericize): Update for new nested function info.
1770 2020-10-14 Martin Sebor <msebor@redhat.com>
1773 * c-attribs.c (build_attr_access_from_parms): Wrap chain of VLA
1774 bounds in an extra list.
1776 2020-10-05 Richard Biener <rguenther@suse.de>
1777 Jakub Jelinek <jakub@redhat.com>
1780 * c-pretty-print.c: Include langhooks.h.
1781 (c_pretty_printer::postfix_expression): Handle TARGET_MEM_REF as
1783 (c_pretty_printer::expression): Handle TARGET_MEM_REF as
1785 (c_pretty_printer::unary_expression): Handle TARGET_MEM_REF.
1787 2020-09-30 Martin Sebor <msebor@redhat.com>
1790 * c-attribs.c (append_access_attr): Use the function declaration
1791 location for a warning about an attribute access argument.
1793 2020-09-29 Marek Polacek <polacek@redhat.com>
1796 * c.opt (Wrange-loop-construct): New option.
1798 2020-09-23 Martin Sebor <msebor@redhat.com>
1801 * c-warn.c (warn_parm_ptrarray_mismatch): Handle more invalid input.
1803 2020-09-23 Marek Polacek <polacek@redhat.com>
1806 * c-gimplify.c (c_genericize): Only call do_warn_duplicated_branches_r
1807 after loops and other structured control constructs have been lowered.
1809 2020-09-22 Jakub Jelinek <jakub@redhat.com>
1811 * c.opt (Wbuiltin-declaration-mismatch): Fix typo in variable name:
1812 warn_builtin_declaraion_mismatch -> warn_builtin_declaration_mismatch.
1814 2020-09-21 Marek Polacek <polacek@redhat.com>
1816 * c.opt (Wctad-maybe-unsupported): New option.
1818 2020-09-19 Martin Sebor <msebor@redhat.com>
1821 * c-common.h (warn_parm_array_mismatch): Declare new function.
1822 (has_attribute): Move declaration of an existing function.
1823 (build_attr_access_from_parms): Declare new function.
1824 * c-warn.c (parm_array_as_string): Define new function.
1825 (plus_one): Define new function.
1826 (warn_parm_ptrarray_mismatch): Define new function.
1827 (warn_parm_array_mismatch): Define new function.
1828 (vla_bound_parm_decl): New function.
1829 * c.opt (-Warray-parameter, -Wvla-parameter): New options.
1830 * c-pretty-print.c (pp_c_type_qualifier_list): Don't print array type
1832 (c_pretty_printer::direct_abstract_declarator): ...but instead print
1833 them in brackets here. Also print [static]. Strip extraneous
1834 expressions from VLA bounds.
1836 2020-09-19 Martin Sebor <msebor@redhat.com>
1839 * c-attribs.c (c_common_attribute_table): Add "arg spec" attribute.
1840 (handle_argspec_attribute): New function.
1841 (get_argument, get_argument_type): New functions.
1842 (append_access_attrs): Add overload. Handle internal attribute
1843 representation in addition to external.
1844 (handle_access_attribute): Handle internal attribute representation
1845 in addition to external.
1846 (build_attr_access_from_parms): New function.
1848 2020-09-19 Sandra Loosemore <sandra@codesourcery.com>
1850 * c-gimplify.c (genericize_c_loop): Rewrite to match
1851 c_finish_loop in c-typeck.c.
1853 2020-09-19 Sandra Loosemore <sandra@codesourcery.com>
1855 * c-common.c (c_block_may_fallthrough): New, split from
1856 cxx_block_may_fallthrough in the cp front end.
1857 (c_common_init_ts): Move handling of loop and switch-related
1858 statements here from the cp front end.
1859 * c-common.def (FOR_STMT, WHILE_STMT, DO_STMT): Move here from
1861 (BREAK_STMT, CONTINUE_STMT, SWITCH_STMT): Likewise.
1862 * c-common.h (c_block_may_fallthru): Declare.
1863 (bc_state_t): Move here from cp front end.
1864 (save_bc_state, restore_bc_state): Declare.
1865 (c_genericize_control_stmt): Declare.
1866 (WHILE_COND, WHILE_BODY): Likewise.
1867 (DO_COND, DO_BODY): Likewise.
1868 (FOR_INIT_STMT, FOR_COND, FOR_EXPR, FOR_BODY, FOR_SCOPE): Likewise.
1869 (SWITCH_STMT_COND, SWITCH_STMT_BODY): Likewise.
1870 (SWITCH_STMT_TYPE, SWITCH_STMT_SCOPE): Likewise.
1871 (SWITCH_STMT_ALL_CASES_P, SWITCH_STMT_NO_BREAK_P): Likewise.
1872 (LABEL_DECL_BREAK, LABEL_DECL_CONTINUE): Likewise.
1873 * c-dump.c (dump_stmt): Copy from cp front end.
1874 (c_dump_tree): Move code to handle structured loop and switch
1875 tree nodes here from cp front end.
1876 * c-gimplify.c: Adjust includes.
1877 (enum bc_t, bc_label, begin_bc_block, finish_bc_block): Move from
1879 (save_bc_state, restore_bc_state): New functions using old code
1881 (get_bc_label, expr_loc_or_loc): Move from cp front end.
1882 (genericize_c_loop): Move from cp front end.
1883 (genericize_for_stmt, genericize_while_stmt): Likewise.
1884 (genericize_do_stmt, genericize_switch_stmt): Likewise.
1885 (genericize_continue_stmt, genericize_break_stmt): Likewise.
1886 (genericize_omp_for_stmt): Likewise.
1887 (c_genericize_control_stmt): New function using code split from
1889 (c_genericize_control_r): New.
1890 (c_genericize): Call walk_tree with c_genericize_control_r.
1891 * c-pretty-print.c (c_pretty_printer::statement): Move code to handle
1892 structured loop and switch tree nodes here from cp front end.
1894 2020-09-17 Patrick Palka <ppalka@redhat.com>
1897 * c-indentation.c (should_warn_for_misleading_indentation): Move
1898 declarations of local variables closer to their first use.
1899 Handle virtual token locations by resolving them to their
1900 respective macro expansion points. If all three tokens are
1901 produced from the same macro expansion, then instead use their
1902 loci within the macro definition.
1904 2020-09-16 Martin Sebor <msebor@redhat.com>
1908 * c-attribs.c (validate_attr_args): New function.
1909 (validate_attr_arg): Same.
1910 (handle_section_attribute): Call it. Introduce a local variable.
1911 (handle_alloc_size_attribute): Same.
1912 (handle_alloc_align_attribute): Same.
1914 2020-09-14 Jakub Jelinek <jakub@redhat.com>
1916 * c-attribs.c (handle_optimize_attribute): Adjust
1917 cl_optimization_save, cl_optimization_restore and
1918 build_optimization_node callers.
1919 * c-pragma.c (handle_pragma_optimize): Adjust
1920 build_optimization_node caller.
1921 (handle_pragma_push_options): Adjust
1922 build_optimization_node and build_target_option_node callers.
1923 (handle_pragma_pop_options, handle_pragma_reset_options):
1924 Adjust cl_optimization_restore callers.
1926 2020-08-28 Martin Sebor <msebor@redhat.com>
1928 * c.opt (Wstringop-overread): New option.
1930 2020-08-11 Jakub Jelinek <jakub@redhat.com>
1933 * c-common.c (get_atomic_generic_size): Require that first argument's
1934 type points to a complete type and use tree_fits_uhwi_p instead of
1935 just INTEGER_CST TREE_CODE check for the TYPE_SIZE_UNIT.
1937 2020-07-31 Martin Sebor <msebor@redhat.com>
1940 * c-common.c (check_function_arguments_recurse): Return early when
1941 no-warning bit is set.
1943 2020-07-31 Richard Biener <rguenther@suse.de>
1946 * c-common.h (c_common_finalize_early_debug): Declare.
1947 * c-common.c: Include debug.h.
1948 (c_common_finalize_early_debug): finalize_early_debug langhook
1949 implementation generating debug for extern declarations.
1951 2020-07-27 Nathan Sidwell <nathan@acm.org>
1953 * c-common.c (try_to_locate_new_include_insertion_point): Use
1954 strcmp, not pointer equality.
1956 2020-07-25 Martin Sebor <msebor@redhat.com>
1959 * c-common.c (check_nonnull_arg): Print note only when warning was
1962 2020-07-22 Tobias Burnus <tobias@codesourcery.com>
1964 * c-omp.c (c_finish_omp_critical): Check for no name but
1965 nonzero hint provided.
1967 2020-07-20 Jason Merrill <jason@redhat.com>
1969 * c-cppbuiltin.c (c_cpp_builtins): Update
1970 __cpp_nontype_template_args for C++20.
1972 2020-07-20 Martin Sebor <msebor@redhat.com>
1975 * c.opt: Remove stray text.
1977 2020-07-14 Lewis Hyatt <lhyatt@gmail.com>
1980 * c-indentation.c (should_warn_for_misleading_indentation): Get
1981 global tabstop from the new source.
1982 * c-opts.c (c_common_handle_option): Remove handling of -ftabstop, which
1983 is now a common option.
1986 2020-07-08 Eric Botcazou <ebotcazou@adacore.com>
1988 * c.opt (Wscalar-storage-order): Add explicit variable.
1990 2020-07-07 Nathan Sidwell <nathan@acm.org>
1992 * c-opts.c (c_common_post_options): Add 'injecting' arg to
1994 (c_finish_options): Add linemap_line_start calls for builtin and cmd
1995 maps. Force token position to line_table's highest line.
1996 * c-ppoutput.c (print_line_1): Refactor, print line zero.
1997 (cb_define): Always increment source line.
1999 2020-07-06 Martin Sebor <msebor@redhat.com>
2002 * c-common.c (check_function_nonnull): Avoid checking syntesized calls
2003 to stub lambda objects with null this pointer.
2004 (check_nonnull_arg): Handle C++ nullptr.
2006 2020-07-02 Jason Merrill <jason@redhat.com>
2007 Jakub Jelinek <jakub@redhat.com>
2009 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_consteval.
2011 2020-06-30 Jakub Jelinek <jakub@redhat.com>
2014 * c-common.c (check_function_arguments_recurse): Don't crash on
2015 calls to internal functions.
2017 2020-06-28 Martin Sebor <msebor@redhat.com>
2020 * c-common.c (struct nonnull_arg_ctx): Add members.
2021 (check_function_nonnull): Use nonnull_arg_ctx as argument. Handle
2022 C++ member functions specially. Consider the this pointer implicitly
2024 (check_nonnull_arg): Use location of argument when available.
2025 (check_function_arguments): Use nonnull_arg_ctx as argument.
2027 2020-06-27 Jakub Jelinek <jakub@redhat.com>
2030 * c-common.c (pointer_int_sum): Use TYPE_OVERFLOW_UNDEFINED instead of
2031 !TYPE_UNSIGNED check to see if we can apply distributive law and handle
2032 smaller precision intop operands separately.
2034 2020-06-26 Marek Polacek <polacek@redhat.com>
2036 * c-opts.c (c_common_init_options): Default to gnu++17.
2038 2020-06-17 Jonathan Wakely <jwakely@redhat.com>
2041 * c-common.c (get_atomic_generic_size): Check cv-qualifiers in
2044 2020-06-16 Jakub Jelinek <jakub@redhat.com>
2046 * c-common.h (c_omp_check_loop_iv_exprs): Add an int argument.
2047 * c-omp.c (struct c_omp_check_loop_iv_data): Add maybe_nonrect and
2049 (c_omp_is_loop_iterator): New function.
2050 (c_omp_check_loop_iv_r): Use it. Add support for silent scanning
2051 if outer loop iterator is present. Perform duplicate checking through
2052 hash_set in the function rather than expecting caller to do that.
2053 Pass NULL instead of d->ppset to walk_tree_1.
2054 (c_omp_check_nonrect_loop_iv): New function.
2055 (c_omp_check_loop_iv): Use it. Fill in new members, allow
2056 non-rectangular loop forms, diagnose multiple associated loops with
2057 the same iterator. Pass NULL instead of &pset to walk_tree_1.
2058 (c_omp_check_loop_iv_exprs): Likewise.
2060 2020-06-10 Martin Liska <mliska@suse.cz>
2062 PR tree-optimization/92860
2063 * c-attribs.c (handle_optimize_attribute):
2064 Save global options and compare it after parsing of function
2066 * c-pragma.c (opt_stack::saved_global_options): New field.
2067 (handle_pragma_push_options): Save global_options.
2068 (handle_pragma_pop_options): Compare them after pop.
2070 2020-06-09 Jakub Jelinek <jakub@redhat.com>
2073 * c-pretty-print.c (c_pretty_printer::unary_expression): Handle the
2074 case when MEM_REF's first argument has type pointer to incomplete type.
2076 2020-06-05 Jason Merrill <jason@redhat.com>
2078 * c-pretty-print.c (pp_c_additive_expression): Handle negative
2079 operand to POINTER_PLUS_EXPR.
2081 2020-06-04 Martin Sebor <msebor@redhat.com>
2085 * c-attribs.c (append_access_attrs): Handle attr_access::none.
2086 (handle_access_attribute): Same.
2088 2020-06-03 Mark Wielaard <mark@klomp.org>
2090 * known-headers.cc (get_cp_stdlib_header_for_string_macro_name):
2092 * known-headers.h (get_cp_stdlib_header_for_string_macro_name):
2093 New function declaration.
2095 2020-06-03 Mark Wielaard <mark@klomp.org>
2097 * known-headers.cc (get_string_macro_hint): New function.
2098 (get_stdlib_header_for_name): Use get_string_macro_hint.
2099 (get_c_stdlib_header_for_string_macro_name): New function.
2100 * known-headers.h (get_c_stdlib_header_for_string_macro_name):
2101 New function declaration.
2103 2020-06-03 Tobias Burnus <tobias@codesourcery.com>
2105 * c-common.h (c_omp_predetermined_mapping): Declare.
2106 * c-omp.c (c_omp_predetermined_mapping): New.
2108 2020-05-22 Mark Wielaard <mark@klomp.org>
2110 * known-headers.cc (get_stdlib_header_for_name): Add a new
2111 stdlib_hint array for stdbool and stdint.
2113 2020-05-22 Mark Wielaard <mark@klomp.org>
2115 * known-headers.cc (get_stdlib_header_for_name): Return
2116 "<stdbool.h>" for "bool", "true" or "false" when STDLIB_C and
2119 2020-05-20 Nathan Sidwell <nathan@acm.org>
2121 * c-common.c (try_to_locate_new_include_insertion_point): Revert change.
2123 * c-common.c (try_to_locate_new_include_insertion_point): Use
2124 strcmp to compare filenames.
2125 * c-lex.c (init_c_lex): Move declaration to initialization.
2126 * c-opts.c (handle_deferred_opts): Move cpp_get_deps call into
2127 deferred count loop.
2129 2020-05-15 Jason Merrill <jason@redhat.com>
2131 * c-opts.c (set_std_cxx20): Set flag_coroutines.
2133 2020-05-13 Jason Merrill <jason@redhat.com>
2135 * c.opt (std=c++20): Make c++2a the alias.
2136 (std=gnu++20): Likewise.
2137 * c-common.h (cxx_dialect): Change cxx2a to cxx20.
2139 * c-cppbuiltin.c: Adjust.
2140 * c-ubsan.c: Adjust.
2143 2020-05-12 Eric Botcazou <ebotcazou@adacore.com>
2145 * c-ada-spec.c (dump_ads): Output pragma Warnings ("U"); on entry.
2147 2020-05-08 Nathan Sidwell <nathan@acm.org>
2149 Reimplement directives only processing.
2150 * c-ppoutput.c (token_streamer): Ne.
2151 (directives_only_cb): New. Swallow ...
2152 (print_lines_directives_only): ... this.
2153 (scan_translation_unit_directives_only): Reimplment using the
2154 published interface.
2156 2020-05-07 Marek Polacek <polacek@redhat.com>
2158 * c-format.c (badwords): Add "nonstatic".
2160 202-05-07 Jakub Jelinek <jakub@redhat.com>
2163 * c-common.c (speculation_safe_value_resolve_params): Return false if
2164 error_operand_p (val2).
2165 (resolve_overloaded_builtin) <case BUILT_IN_SPECULATION_SAFE_VALUE_N>:
2166 Remove extraneous semicolon.
2168 2020-05-06 qing zhao <qing.zhao@oracle.com>
2171 * c-indentation.c (get_visual_column): Add a hint to use the new
2172 -flarge-source-files option.
2174 2020-05-05 Stefan Schulze Frielinghaus <stefansf@linux.ibm.com>
2176 * c-attribs.c (handle_vector_size_attribute): Add attribute
2177 nonnull for argument args in order to silence warning of
2178 uninitialized variable usage. Since this is local to the
2179 compilation unit and thus cannot be checked at call sides by the
2180 compiler, added an assert statement in order to verify this.
2182 2020-05-01 H.J. Lu <hongjiu.lu@intel.com>
2185 * c-attribs.c (handle_patchable_function_entry_attribute): Limit
2186 value to USHRT_MAX (65535).
2188 2020-04-29 Jakub Jelinek <jakub@redhat.com>
2190 * c-format.c (PP_FORMAT_CHAR_TABLE): Add %{ and %}.
2192 2020-04-27 Jakub Jelinek <jakub@redhat.com>
2195 * c-common.c (resolve_overloaded_builtin): Return error_mark_node for
2196 fncode == BUILT_IN_NONE before initialization of first_param.
2198 2020-04-23 Marek Polacek <polacek@redhat.com>
2201 * c-attribs.c (find_tm_attribute): Use get_attribute_name instead of
2204 2020-04-14 Patrick Palka <ppalka@redhat.com>
2207 * c-pretty-print.c (pp_c_pointer) <case REFERENCE_TYPE>: Print a double
2208 ampersand if it's an rvalue reference type.
2210 2020-04-13 Martin Sebor <msebor@redhat.com>
2213 * c-pretty-print.c (c_pretty_printer::direct_abstract_declarator): Avoid
2214 printing array bound for flexible array members.
2216 2020-04-13 Iain Sandoe <iain@sandoe.co.uk>
2218 * c-cppbuiltin.c (c_cpp_builtins): Update coroutines builtin
2221 2020-04-02 Richard Biener <rguenther@suse.de>
2224 * c-opts.c (c_common_post_options): Enable -ffinite-loops
2225 for -O2 and C++11 or newer.
2227 2020-03-28 Patrick Palka <ppalka@redhat.com>
2229 * c.opt: Add -fconcepts-diagnostics-depth.
2231 2020-03-27 Martin Sebor <msebor@redhat.com>
2234 * c-attribs.c (handle_copy_attribute): Avoid passing expressions
2235 to decl_attributes. Make handling of different kinds of entities
2238 2020-03-27 Martin Sebor <msebor@redhat.com>
2241 * c-attribs.c (handle_access_attribute): Avoid setting TYPE_ATTRIBUTES
2244 2020-03-23 Jakub Jelinek <jakub@redhat.com>
2247 * c-warn.c (warnings_for_convert_and_check): For expr and/or
2248 result being COMPOUND_EXPRs, skip to ultimate rhs.
2250 2020-03-20 Richard Sandiford <richard.sandiford@arm.com>
2253 * c-common.c (c_common_type_for_mode): Before using a registered
2254 built-in type, check that the vectorness of the type matches
2255 the vectorness of the mode.
2257 2020-03-17 Jakub Jelinek <jakub@redhat.com>
2259 * c-common.c (resolve_overloaded_builtin): Fix up duplicated word
2260 issue in a diagnostic message.
2262 2020-03-15 Lewis Hyatt <lhyatt@gmail.com>
2264 * c.opt: Avoid redundancy in the help text.
2266 2020-03-02 Marek Polacek <polacek@redhat.com>
2268 PR c++/93958 - add missing -std=gnu++20.
2269 * c.opt: Add -std=gnu++20.
2271 2020-03-01 Martin Sebor <msebor@redhat.com>
2274 * c-attribs.c (append_access_attrs): Correctly handle attribute.
2275 (handle_access_attribute): Same.
2277 2020-02-25 Jakub Jelinek <jakub@redhat.com>
2280 * c-pragma.c (handle_pragma_diagnostic): Add missing ? after
2281 "did you mean" hint in diagnostics.
2283 2020-02-15 Jason Merrill <jason@redhat.com>
2285 * c.opt: Add -std=c++20.
2287 2020-02-14 Eric Botcazou <ebotcazou@adacore.com>
2289 * c-ada-spec.c: Include bitmap.h.
2290 (dump_ada_double_name): Rename into...
2291 (dump_anonymous_type_name): ...this. Always use the TYPE_UID.
2292 (dump_ada_array_type): Adjust to above renaming. Robustify.
2293 (dump_nested_types_1): New function copied from... Add dumped_types
2294 parameter and pass it down to dump_nested_type.
2295 (dump_nested_types): ...this. Remove parent parameter. Just call
2296 dump_nested_types_1 on an automatic bitmap.
2297 (dump_nested_type): Add dumped_types parameter.
2298 <ARRAY_TYPE>: Do not dump it if already present in dumped_types.
2299 Adjust recursive calls and adjust to above renaming.
2300 (dump_ada_declaration): Adjust call to dump_nested_types.
2301 Tidy up and adjust to above renaming.
2302 (dump_ada_specs): Initialize and release bitmap obstack.
2304 2020-02-10 Martin Sebor <msebor@redhat.com>
2307 * c-attribs.c (handle_access_attribute): Correct off-by-one mistakes.
2309 2020-02-10 Jakub Jelinek <jakub@redhat.com>
2312 * c-format.c (check_plain): Fix up last argument of strncasecmp.
2313 Remove useless extra test.
2315 2020-02-03 Julian Brown <julian@codesourcery.com>
2316 Tobias Burnus <tobias@codesourcery.com>
2318 * c-cppbuiltin.c (c_cpp_builtins): Update _OPENACC define to 201711.
2320 2020-01-29 Jason Merrill <jason@redhat.com>
2323 * c-attribs.c (check_cxx_fundamental_alignment_constraints): Remove.
2325 2020-01-23 Jason Merrill <jason@redhat.com>
2327 * c-warn.c (conversion_warning): Change -Wsign-conversion handling.
2329 2020-01-23 Martin Sebor <msebor@redhat.com>
2332 * c-common.c (check_function_arguments): Avoid overlap checking
2333 of sprintf functions.
2335 2020-01-22 Jason Merrill <jason@redhat.com>
2337 PR testsuite/93391 - PR 40752 test fails with unsigned plain char.
2339 * c-warn.c (conversion_warning): Check operands only after checking
2340 the whole expression. Don't check second operand of + for sign.
2342 2020-01-21 Jason Merrill <jason@redhat.com>
2343 Manuel López-Ibáñez <manu@gcc.gnu.org>
2345 PR c++/40752 - useless -Wconversion with short +=.
2346 * c.opt (-Warith-conversion): New.
2347 * c-warn.c (conversion_warning): Recurse for operands of
2348 operators. Only warn about the whole expression with
2351 2020-01-21 Jason Merrill <jason@redhat.com>
2353 * c-common.c (unsafe_conversion_p): Don't warn, return UNSAFE_SIGN.
2354 * c-warn.c (conversion_warning): Warn about UNSAFE_SIGN.
2356 2020-01-20 Nathan Sidwell <nathan@acm.org>
2358 PR preprocessor/80005
2359 * c-cppbuiltins.c (c_cpp_builtins): Don't define __has_include{,_next}.
2361 2020-01-18 Iain Sandoe <iain@sandoe.co.uk>
2363 * c-common.c (co_await, co_yield, co_return): New.
2364 * c-common.h (RID_CO_AWAIT, RID_CO_YIELD,
2365 RID_CO_RETURN): New enumeration values.
2366 (D_CXX_COROUTINES): Bit to identify coroutines are active.
2367 (D_CXX_COROUTINES_FLAGS): Guard for coroutine keywords.
2368 * c-cppbuiltin.c (__cpp_coroutines): New cpp define.
2369 * c.opt (fcoroutines): New command-line switch.
2371 2020-01-10 David Malcolm <dmalcolm@redhat.com>
2373 * c-format.c (local_event_ptr_node): New.
2374 (PP_FORMAT_CHAR_TABLE): Add entry for "%@".
2375 (init_dynamic_diag_info): Initialize local_event_ptr_node.
2376 * c-format.h (T_EVENT_PTR): New define.
2378 2020-01-10 Martin Sebor <msebor@redhat.com>
2381 * c-attribs.c (append_access_attrs): Validate against the translated
2382 access string rather than the human-readable representation.
2384 2020-01-01 Jakub Jelinek <jakub@redhat.com>
2386 Update copyright years.
2388 2019-12-20 Eric Botcazou <ebotcazou@adacore.com>
2390 * c-ada-spec.h (decl_sloc): Delete.
2391 * c-ada-spec.c (decl_sloc): Make static.
2393 2019-12-19 Julian Brown <julian@codesourcery.com>
2395 * c-common.h (c_omp_map_clause_name): Add prototype.
2396 * c-omp.c (c_omp_map_clause_name): New function.
2397 * c-pragma.h (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ATTACH and
2398 PRAGMA_OACC_CLAUSE_DETACH.
2400 2019-12-19 Julian Brown <julian@codesourcery.com>
2401 Maciej W. Rozycki <macro@codesourcery.com>
2402 Tobias Burnus <tobias@codesourcery.com>
2403 Thomas Schwinge <thomas@codesourcery.com>
2405 * c-pragma.h (pragma_omp_clause): Add
2406 PRAGMA_OACC_CLAUSE_NO_CREATE.
2408 2019-12-17 Martin Sebor <msebor@redhat.com>
2411 * c.opt (-Wmismatched-tags, -Wredundant-tags): New options.
2413 2019-12-11 David Malcolm <dmalcolm@redhat.com>
2415 * c-pretty-print.c (c_pretty_printer::clone): New vfunc
2417 * c-pretty-print.h (c_pretty_printer::clone): New vfunc decl.
2419 2019-12-09 David Malcolm <dmalcolm@redhat.com>
2421 * c-format.c (range_label_for_format_type_mismatch::get_text):
2422 Replace label_text ctor called with true with label_text::take.
2424 2019-12-09 David Malcolm <dmalcolm@redhat.com>
2426 * c-format.c (selftest::test_type_mismatch_range_labels): Remove
2427 initial newline from expected outputs.
2428 * c-opts.c (c_diagnostic_finalizer): Add pp_newline call before
2429 call to diagnostic_show_locus.
2431 2019-12-06 Jakub Jelinek <jakub@redhat.com>
2433 * c-cppbuiltin.c (c_cpp_builtins): Don't define __cpp_consteval for
2436 2019-12-05 Marek Polacek <polacek@redhat.com>
2437 Jakub Jelinek <jakub@redhat.com>
2439 PR c++/91353 - P1331R2: Allow trivial default init in constexpr contexts.
2440 * c-cppbuiltin.c (c_cpp_builtins): Adjust the value of __cpp_constexpr.
2442 2019-12-05 Marek Polacek <polacek@redhat.com>
2444 PR c++/92271 - make __is_same alias for __is_same_as.
2445 * c-common.c: Add __is_same, an alias for __is_same_as.
2447 2019-12-03 Marek Polacek <polacek@redhat.com>
2449 PR c++/91363 - P0960R3: Parenthesized initialization of aggregates.
2450 * c-cppbuiltin.c (c_cpp_builtins): Predefine
2451 __cpp_aggregate_paren_init=201902 for -std=c++2a.
2453 2019-11-30 Jan Hubicka <hubicka@ucw.cz>
2455 * c-attribs.c (handle_symver_attribute): New function
2456 (c_common_attributes): Add symver.
2458 2019-11-30 Richard Sandiford <richard.sandiford@arm.com>
2460 * c-common.c (pointer_int_sum): Use verify_type_context to check
2461 whether the target allows pointer arithmetic for the types involved.
2462 (c_sizeof_or_alignof_type, c_alignof_expr): Use verify_type_context
2463 to check whether the target allows sizeof and alignof operations
2464 for the types involved.
2466 2019-11-27 Jason Merrill <jason@redhat.com>
2468 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_deduction_guides.
2470 2019-11-26 Jakub Jelinek <jakub@redhat.com>
2473 * c-attribs.c (handle_mode_attribute): Add mode attribute to
2476 2019-11-25 Joseph Myers <joseph@codesourcery.com>
2479 * c-common.c (c_common_type_for_mode): Handle decimal
2480 floating-point types being NULL_TREE.
2481 * c-format.c (get_format_for_type_1): Handle specified types being
2483 * c-lex.c (interpret_float): Give an error for decimal
2484 floating-point constants when decimal floating-point not
2487 2019-11-23 Jakub Jelinek <jakub@redhat.com>
2490 * c-attribs.c (append_access_attrs): Avoid buffer overflow. Avoid
2491 memory leak. Use XNEWVEC macro. Use auto_diagnostic_group to
2492 group warning with inform together.
2493 (handle_access_attribute): Formatting fix.
2495 2019-11-22 Jakub Jelinek <jakub@redhat.com>
2498 * c-common.h (identifier_global_tag): Declare.
2499 * c-format.c (get_pointer_to_named_type): Renamed to ...
2500 (get_named_type): ... this. Use identifier_global_tag instead of
2501 identifier_global_value, handle the return value being a TYPE_P.
2502 (init_dynamic_diag_info): Adjust get_pointer_to_named_type callers
2503 to call get_named_type instead. Formatting fixes.
2505 Implement P1902R1, Missing feature-test macros 2017-2019.
2506 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_init_captures
2507 and __cpp_generic_lambdas for -std=c++2a. Define
2508 __cpp_designated_initializers, __cpp_constexpr_in_decltype and
2509 __cpp_consteval for -std=c++2a. Remove a FIXME comment about
2510 __cpp_concepts for -std=c++2a.
2512 2019-11-22 Martin Sebor <msebor@redhat.com>
2515 * c-attribs.c (handle_access_attribute): New function.
2516 (c_common_attribute_table): Add new attribute.
2517 (get_argument_type): New function.
2518 (append_access_attrs): New function.
2519 (get_nonnull_operand): Rename...
2520 (get_attribute_operand): ...to this.
2521 * c-common.c (get_nonnull_operand): Rename...
2522 (get_attribute_operand): ...to this.
2524 2019-11-21 Joseph Myers <joseph@codesourcery.com>
2526 * c-attribs.c (handle_fallthrough_attribute): Use pedwarn instead
2529 2019-11-19 Joseph Myers <joseph@codesourcery.com>
2531 * c-common.c (attribute_fallthrough_p): In C, use pedwarn not
2532 warning for standard attributes mixed with fallthrough attributes.
2534 2019-11-15 Joseph Myers <joseph@codesourcery.com>
2536 * c-attribs.c (handle_fallthrough_attribute): Remove static.
2537 * c-common.h (handle_fallthrough_attribute): Declare.
2539 2019-11-15 Joseph Myers <joseph@codesourcery.com>
2541 * c-attribs.c (handle_deprecated_attribute): Remove static.
2542 * c-common.h (handle_deprecated_attribute): Declare.
2544 2019-11-14 Joseph Myers <joseph@codesourcery.com>
2546 * c-lex.c (lex_charconst): Make CPP_UTF8CHAR constants unsigned
2549 2019-11-14 Jakub Jelinek <jakub@redhat.com>
2551 * c-omp.c (c_omp_check_context_selector): Add nvidia to the list of
2554 * c-omp.c (c_omp_check_context_selector): Handle name lists
2555 containing string literals. Don't diagnose atomic_default_mem_order
2556 with multiple props.
2558 2019-11-13 Joseph Myers <joseph@codesourcery.com>
2560 * c-cppbuiltin.c (builtin_define_float_constants): Also define
2561 NORM_MAX constants. Update call to get_max_float.
2562 (LAZY_HEX_FP_VALUES_CNT): Update value to include NORM_MAX
2565 2019-11-13 Eric Botcazou <ebotcazou@adacore.com>
2567 * c-ada-spec.c (get_underlying_decl): Do not look through typedefs.
2568 (dump_forward_type): Do not generate a declaration for function types.
2569 (dump_nested_type) <ARRAY_TYPE>: Do not generate a nested declaration
2570 of the component type if it is declared in another file.
2572 2019-11-12 Martin Liska <mliska@suse.cz>
2574 * c-opts.c (c_common_post_options):
2575 Use SET_OPTION_IF_UNSET.
2577 2019-11-12 Maciej W. Rozycki <macro@codesourcery.com>
2578 Frederik Harwath <frederik@codesourcery.com>
2581 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_SERIAL enumeration
2583 * c-pragma.c (oacc_pragmas): Add "serial" entry.
2585 2019-11-08 Richard Sandiford <richard.sandiford@arm.com>
2587 * c-common.h (gnu_vector_type_p): New function.
2588 * c-common.c (c_build_vec_perm_expr): Require __builtin_shuffle
2589 vectors to satisfy gnu_vector_type_p.
2590 (c_build_vec_convert): Likewise __builtin_convertvector.
2591 (convert_vector_to_array_for_subscript): Likewise when applying
2592 implicit vector to array conversion.
2593 (scalar_to_vector): Likewise when converting vector-scalar
2594 operations to vector-vector operations.
2596 2019-11-08 Joseph Myers <joseph@codesourcery.com>
2598 * c.opt (Wold-style-definition): Initialize to -1.
2599 * c-opts.c (c_common_post_options): Set warn_old_style_definition
2600 to flag_isoc2x if not set explicitly.
2602 2019-11-07 Joseph Myers <joseph@codesourcery.com>
2604 * c-attribs.c (parse_tm_stmt_attr): Handle scoped attributes.
2606 2019-11-05 Jason Merrill <jason@redhat.com>
2608 * c-opts.c (c_common_post_options): -fconcepts-ts implies
2611 2019-11-04 Kamlesh Kumar <kamleshbhalui@gmail.com>
2613 * c-opts.c (c_common_post_options): Update
2616 2019-11-02 Jakub Jelinek <jakub@redhat.com>
2618 * c-common.h (c_omp_get_context_selector): Remove.
2619 * c-omp.c (c_omp_get_context_selector): Moved to omp-general.c
2620 and renamed to omp_get_context_selector.
2622 * c-omp.c (c_omp_mark_declare_variant): Use
2623 omp_context_selector_set_compare.
2625 PR c++/88335 - Implement P1073R3: Immediate functions
2626 * c-common.h (enum rid): Add RID_CONSTEVAL.
2627 * c-common.c (c_common_reswords): Add consteval.
2629 2019-11-01 Martin Sebor <msebor@redhat.com>
2635 * c-pretty-print.c (direct_abstract_declarator): Print
2636 bound in zero-length arrays.
2637 * c.opt (-Wzero-length-bounds): New option.
2639 2019-10-30 Nathan Sidwell <nathan@acm.org>
2641 * c-cppbuiltin.c (c_cpp_builtins): Add 'L' suffix to feature
2644 2019-10-28 Martin Sebor <msebor@redhat.com>
2647 * c-common.c (c_common_nodes_and_builtins): Call c_define_builtins
2648 even when only preprocessing.
2649 * c-common.h (names_builtin_p): Declare new function.
2650 * c-lex.c (init_c_lex): Set has_builtin.
2651 (c_common_has_builtin): Define a new function.
2652 * c-ppoutput.c (init_pp_output): Set has_builtin.
2654 2019-10-24 Jakub Jelinek <jakub@redhat.com>
2656 * c-common.h (c_omp_context_selector_matches): Remove.
2657 * c-omp.c (c_omp_context_selector_matches): Remove.
2658 * c-attribs.c (c_common_attribute_table): Add
2659 "omp declare target {host,nohost,block}" attributes.
2661 2019-10-17 JeanHeyd Meneide <phdofthehouse@gmail.com>
2663 * c-lex.c (c_common_has_attribute): Update nodiscard value.
2665 2019-10-14 Richard Sandiford <richard.sandiford@arm.com>
2667 * c-common.h (user_facing_original_type_p): Declare.
2668 * c-common.c: Include c-spellcheck.h.
2669 (user_facing_original_type_p): New function.
2671 2019-10-12 Jakub Jelinek <jakub@redhat.com>
2673 * c-common.h (c_omp_mark_declare_variant,
2674 c_omp_context_selector_matches): Declare.
2675 * c-omp.c: Include attribs.h, gimplify.h, cgraph.h, symbol-summary.h
2677 (c_omp_get_context_selector): Support second argument NULL.
2678 (c_omp_mark_declare_variant, c_omp_context_selector_matches): New
2680 * c-attribs.c (c_common_attribute_table): Remove "omp declare variant"
2681 attribute, add "omp declare variant base" and
2682 "omp declare variant variant" attributes.
2684 2019-10-11 Joseph Myers <joseph@codesourcery.com>
2686 * c.opt (Wc11-c2x-compat): Add CPP(cpp_warn_c11_c2x_compat)
2687 CppReason(CPP_W_C11_C2X_COMPAT).
2689 2019-10-11 Joseph Myers <joseph@codesourcery.com>
2691 * c-common.c (c_common_reswords): Do not use D_EXT for _Decimal32,
2692 _Decimal64 and _Decimal128.
2694 2019-10-10 Joseph Myers <joseph@codesourcery.com>
2696 * c-cppbuiltin.c (c_cpp_builtins): Do not define macros for DFP
2697 types if DFP not supported.
2699 2019-10-10 Jakub Jelinek <jakub@redhat.com>
2701 * c-common.h (c_omp_check_context_selector,
2702 c_omp_get_context_selector): Declare.
2703 * c-omp.c (c_omp_declare_simd_clauses_to_numbers): Fix spelling
2704 in diagnostic message.
2705 (c_omp_check_context_selector, c_omp_get_context_selector): New
2707 * c-attribs.c (c_common_attribute_table): Add "omp declare variant"
2709 (handle_omp_declare_variant_attribute): New function.
2711 2019-10-09 Martin Sebor <msebor@redhat.com>
2713 PR tree-optimization/90879
2714 * c.opt (-Wstring-compare): New option.
2716 2019-10-08 Andrew Sutton <asutton@lock3software.com>
2717 Jason Merrill <jason@redhat.com>
2719 Update the concepts implementation to conform to the C++20
2720 specification, improve compile times, and generally clean up
2723 * c-cppbuiltin.c (c_cpp_builtins): Use new feature test values for
2724 concepts when -std=c++2a. Bump __cpp_concepts to 201907.
2725 * c.opt: Add -Wconcepts-ts.
2726 * c-opts.c (c_common_post_options): Warn when -fconcepts is used
2727 with -std=c++2a. Disable warning for -fconcepts in C++20 mode.
2728 (set_std_cxx2a): Enable concepts by default.
2730 2019-10-08 Joseph Myers <joseph@codesourcery.com>
2732 * c-opts.c (c_common_post_options): Set
2733 -fno-fp-int-builtin-inexact for C2X.
2735 2019-10-05 Jakub Jelinek <jakub@redhat.com>
2737 PR c++/91369 - Implement P0784R7: constexpr new
2738 * c-cppbuiltin.c (c_cpp_builtins): Predefine
2739 __cpp_constexpr_dynamic_alloc=201907 for -std=c++2a.
2741 2019-10-04 Joseph Myers <joseph@codesourcery.com>
2744 * c-format.c (C_STD_VER): Handle C2x.
2745 (C_STD_NAME): Likewise.
2746 (strftime_flag_specs): Add 'O' modifier with 'p' flag.
2747 (time_char_table): Use separate entry for 'B' and 'b', with 'O'
2748 modifier allowed and 'p' flag.
2749 * c-format.h (enum format_std_version): Add STD_C2X.
2750 (struct format_char_info): Mention 'p' in comment on flags2.
2752 2019-10-01 David Malcolm <dmalcolm@redhat.com>
2754 * c-opts.c (c_diagnostic_finalizer): Temporarily clear prefix when
2755 calling diagnostic_show_locus, rather than destroying it afterwards.
2757 2019-10-01 Jakub Jelinek <jakub@redhat.com>
2760 * c-warn.c (check_alignment_of_packed_member): Ignore FIELD_DECLs
2761 with NULL DECL_FIELD_OFFSET.
2763 2019-10-01 Richard Sandiford <richard.sandiford@arm.com>
2765 * c-pretty-print.c (pp_c_specifier_qualifier_list): If a vector type
2766 has a type name, use it in preference to the __vector syntax.
2768 2019-09-30 Richard Sandiford <richard.sandiford@arm.com>
2770 * c-pretty-print.c (pp_c_parameter_type_list): Avoid printing
2771 two spaces between a comma and "...".
2773 2019-09-27 Jakub Jelinek <jakub@redhat.com>
2776 * c-common.h (c_omp_predefined_variable): Declare.
2777 * c-omp.c (c_omp_predefined_variable): New function.
2778 (c_omp_predetermined_sharing): Return OMP_CLAUSE_DEFAULT_SHARED
2779 for predefined variables.
2781 2019-09-27 Richard Sandiford <richard.sandiford@arm.com>
2783 * c-common.h (build_function_call_vec): Take the original
2784 function decl as an optional final parameter.
2785 (check_builtin_function_arguments): Take the original function decl.
2786 * c-common.c (check_builtin_function_arguments): Likewise.
2787 Handle all built-in functions, not just BUILT_IN_NORMAL ones.
2788 Use targetm.check_builtin_call to check BUILT_IN_MD functions.
2790 2019-09-15 Jason Merrill <jason@redhat.com>
2792 * c-warn.c (warn_logical_operator): Strip location wrappers. Don't
2793 fold_for_warn in "|| mask" warning.
2795 2019-09-10 Martin Liska <mliska@suse.cz>
2797 * c.opt: Use newly added WarnRemoved.
2799 2019-09-09 Martin Liska <mliska@suse.cz>
2801 * c.opt: Update comment of removed
2802 options that are preserved only for backward
2805 2019-09-06 Martin Liska <mliska@suse.cz>
2808 * c-common.c: Remove definition of flag_use_repository.
2809 * c-common.h: Likewise.
2810 * c-opts.c (c_common_handle_option):
2811 Do not handle OPT_frepo option.
2812 * c.opt: Mark the option with Deprecated.
2814 2019-09-04 Marek Polacek <polacek@redhat.com>
2816 * c.opt (fdeduce-init-list): Ignored.
2818 2019-09-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2821 * c.opt (Wenum-conversion): New option.
2823 2019-09-03 Jozef Lawrynowicz <jozef.l@mittosystems.com>
2825 * c-attribs.c (handle_section_attribute): Call the
2826 handle_generic_attribute target hook after performing target
2827 independent processing.
2828 (handle_noinit_attribute): Likewise.
2830 2019-09-03 Ian Lance Taylor <iant@golang.org>
2832 * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Always expand
2833 when using -fgo-dump-spec.
2835 2019-09-02 Martin Liska <mliska@suse.cz>
2838 * c-common.c (fname_as_string): Use cxx_printable_name for
2839 __PRETTY_FUNCTION__ same as was used before r265711.
2841 2019-08-28 Marek Polacek <polacek@redhat.com>
2843 Implement P1152R4: Deprecating some uses of volatile.
2845 * c-opts.c (c_common_post_options): Enable -Wvolatile by
2846 default for C++2a, unless -Wno-deprecated.
2847 * c.opt (Wvolatile): New warning.
2849 2019-08-28 Marek Polacek <polacek@redhat.com>
2851 PR c++/91360 - Implement C++20 P1143R2: constinit.
2852 * c-common.c (c_common_reswords): Add constinit and __constinit.
2853 (keyword_is_decl_specifier): Handle RID_CONSTINIT.
2854 * c-common.h (enum rid): Add RID_CONSTINIT, RID_FIRST_CXX20, and
2857 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_constinit.
2858 * c-format.c (cxx_keywords): Add "constinit".
2859 * c.opt (Wc++2a-compat, Wc++20-compat): New options.
2861 2019-08-27 Jakub Jelinek <jakub@redhat.com>
2864 * c-common.c (verify_tree): For LSHIFT_EXPR, RSHIFT_EXPR,
2865 COMPONENT_REF and ARRAY_REF in cxx_dialect >= cxx17 mode handle it
2866 like COMPOUND_EXPR rather than normal expression.
2868 2019-08-23 Iain Sandoe <iain@sandoe.co.uk>
2871 * c-lex.c (c_lex_with_flags): Don't call
2872 c_common_no_more_pch () from here.
2874 2019-08-23 Jakub Jelinek <jakub@redhat.com>
2877 * c-common.c (c_ts18661_flt_eval_method): Use flag_excess_precision
2878 instead of flag_excess_precision_cmdline.
2879 * c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): Likewise.
2880 * c-opts.c (c_common_post_options): Likewise.
2882 2019-08-22 Martin Sebor <msebor@redhat.com>
2885 * c-common.c (braced_list_to_string): Add argument and overload.
2886 Handle flexible length arrays and unions.
2888 2019-08-21 Eric Botcazou <ebotcazou@adacore.com>
2890 * c-ada-spec.c (dump_ada_function_declaration): Be prepared for broken
2891 function declarations where arguments are missing. Rename variables.
2893 2019-08-15 Richard Biener <rguenther@suse.de>
2895 * c-common.c (c_stddef_cpp_builtins): When the GIMPLE FE is
2896 enabled, define __SIZETYPE__.
2898 2019-08-14 Christophe Lyon <christophe.lyon@linaro.org>
2900 * c-attribs.c (c_common_attribute_table): Add "noinit" entry. Add
2901 exclusion with "section" attribute.
2902 (attr_noinit_exclusions): New table.
2903 (handle_noinit_attribute): New function.
2905 2019-08-13 Richard Sandiford <richard.sandiford@arm.com>
2908 * c-common.c (resolve_overloaded_builtin): Use
2909 copy_decl_built_in_function.
2911 2019-08-13 Martin Sebor <msebor@redhat.com>
2914 * c-format.c (printf_length_specs): Set FMT_LEN_w for "w".
2915 (asm_fprintf_length_spec): Same.
2916 * c-format.h (format_lengths): Add FMT_LEN_w.
2918 2019-08-10 Jakub Jelinek <jakub@redhat.com>
2920 * c-pragma.h (enum pragma_omp_clause): Add
2921 PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
2923 2019-08-07 Jakub Jelinek <jakub@redhat.com>
2925 * c-pragma.h (enum pragma_omp_clause): Add
2926 PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR. Set PRAGMA_OACC_CLAUSE_USE_DEVICE
2927 equal to PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR instead of being a separate
2930 2019-08-05 Marek Polacek <polacek@redhat.com>
2932 PR c++/91338 - Implement P1161R3: Deprecate a[b,c].
2933 * c-opts.c (c_common_post_options): Enable -Wcomma-subscript by
2934 default for C++2a, unless -Wno-deprecated.
2935 * c.opt (Wcomma-subscript): New warning.
2937 2019-07-20 Jakub Jelinek <jakub@redhat.com>
2939 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_LOOP.
2940 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_BIND.
2941 * c-pragma.c (omp_pragmas_simd): Add PRAGMA_OMP_LOOP entry.
2942 * c-common.h (enum c_omp_clause_split): Add C_OMP_CLAUSE_SPLIT_LOOP.
2943 * c-omp.c (c_omp_split_clauses): Add support for 4 new combined
2944 constructs with the loop construct.
2946 2019-07-13 Jakub Jelinek <jakub@redhat.com>
2949 * c-omp.c (c_omp_split_clauses): Fix a pasto in
2950 OMP_CLAUSE_REDUCTION_TASK handling.
2952 2019-07-12 Jakub Jelinek <jakub@redhat.com>
2954 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ORDER.
2955 * c-omp.c (c_omp_split_clauses): Handle splitting of OMP_CLAUSE_ORDER.
2957 2019-07-09 Martin Sebor <msebor@redhat.com>
2960 * c-opts.c (handle_deferred_opts): Change class-key of PODs to struct
2961 and others to class.
2962 * c-pretty-print.h: Same.
2964 2019-07-09 Martin Sebor <msebor@redhat.com>
2967 * c-format.c (check_argument_type): Change class-key from class to
2968 struct and vice versa to match convention and avoid -Wclass-is-pod
2969 and -Wstruct-no-pod.
2970 * c-pretty-print.h: Same.
2972 2019-07-03 Martin Liska <mliska@suse.cz>
2974 * c-common.c (try_to_locate_new_include_insertion_point): Remove
2977 2019-07-03 Jakub Jelinek <jakub@redhat.com>
2979 * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_REDUCTION_INSCAN
2980 clauses on OMP_FOR rather than OMP_PARALLEL when OMP_FOR is combined
2983 2019-07-02 qing zhao <qing.zhao@oracle.com>
2985 PR preprocessor/90581
2986 * c-opts.c (c_common_handle_option): Handle -fmax-include-depth.
2987 * c.opt: Add new option -fmax-include-depth.
2989 2019-06-26 Jason Merrill <jason@redhat.com>
2991 PR c++/55442 - memory-hog with highly recursive constexpr.
2992 * c.opt (fconstexpr-loop-limit): New.
2994 2019-06-25 Jakub Jelinek <jakub@redhat.com>
2997 * c-omp.c (c_finish_omp_atomic): Allow tree_invariant_p in addition
2998 to SAVE_EXPR in first operand of a COMPOUND_EXPR.
3000 2019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
3002 * c-common.c (c_common_nodes_and_builtins): Define
3003 alternate "__intN__" name for "__intN" types.
3005 2019-06-24 Jan Hubicka <jh@suse.cz>
3007 * c-common.c (braced_lists_to_strings): Check that
3008 type is array or integer prior checking string flag.
3010 2019-06-21 Matthew Beliveau <mbelivea@redhat.com>
3012 PR c++/90875 - added -Wswitch-outside-range option
3013 * c.opt (Wswitch-outside-range): Added new option.
3014 * c-warn.c (c_do_switch_warnings): Use OPT_Wswitch-outside-range.
3016 2019-06-21 Marek Polacek <polacek@redhat.com>
3018 PR c++/90953 - ICE with -Wmissing-format-attribute.
3019 * c-common.c (check_function_arguments_recurse): Use
3021 (check_missing_format_attribute): Likewise.
3023 2019-06-19 Marek Polacek <polacek@redhat.com>
3025 PR c++/60364 - noreturn after first decl not diagnosed.
3026 * c-attribs.c (handle_noreturn_attribute): No longer static.
3027 * c-common.h (handle_noreturn_attribute, attr_noreturn_exclusions):
3029 * c-format.c (check_function_format): Use get_attribute_name.
3031 2019-06-19 Martin Sebor <msebor@redhat.com>
3033 PR translation/90156
3034 * c-format.c (function_format_info::format_type): Adjust type.
3035 (function_format_info::is_raw): New member.
3036 (decode_format_type): Adjust signature. Handle "raw" diag attributes.
3037 (decode_format_attr): Adjust call to decode_format_type.
3038 Avoid a redundant call to convert_format_name_to_system_name.
3039 Avoid abbreviating the word "arguments" in a diagnostic.
3040 (format_warning_substr): New function.
3041 (avoid_dollar_number): Quote dollar sign in a diagnostic.
3042 (finish_dollar_format_checking): Same.
3043 (check_format_info): Same.
3044 (struct baltoks_t): New.
3045 (c_opers, c_keywords, cxx_keywords, badwords, contrs): New arrays.
3046 (maybe_diag_unbalanced_tokens, check_tokens, check_plain): New
3048 (check_format_info_main): Call check_plain. Use baltoks_t. Call
3049 maybe_diag_unbalanced_tokens.
3050 (handle_format_attribute): Spell out the word "arguments" in
3053 2019-06-11 Matthew Beliveau <mbelivea@redhat.com>
3055 PR c++/90449 - add -Winaccessible-base option.
3056 * c.opt (Winaccessible-base): New option.
3058 2019-06-10 Jakub Jelinek <jakub@redhat.com>
3060 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_SCAN.
3061 * c-pragma.c (omp_pragmas_simd): Add #pragma omp scan.
3062 * c-omp.c (c_omp_split_clauses): Diagnose inscan reductions on
3063 combined/composite constructs where it is not allowed. Copy over
3064 OMP_CLAUSE_REDUCTION_INSCAN.
3066 2019-06-05 Martin Sebor <msebor@redhat.com>
3068 * c-attribs.c (handle_mode_attribute): Adjust quoting and hyphenation.
3069 (handle_alias_ifunc_attribute): Same.
3070 (handle_copy_attribute): Same.
3071 (handle_weakref_attribute): Same.
3072 (handle_nonnull_attribute): Same.
3073 * c-warn.c (warn_for_sign_compare): Same.
3074 (warn_for_restrict): Same.
3077 2019-06-05 Martin Sebor <msebor@redhat.com>
3079 * c-pragma.c (handle_pragma_weak): Adjust quoting in a diagnostic.
3080 * c.opt (-Wformat-diag): Remove a spurious period.
3082 2019-05-29 Jakub Jelinek <jakub@redhat.com>
3085 * c-common.c (check_builtin_function_arguments)
3086 <case BUILTIN_*_OVERFLOW>: Diagnose pointer to const qualified integer
3089 2019-05-23 Eric Botcazou <ebotcazou@adacore.com>
3091 * c-ada-spec.c (compare_node): Compare the DECL_UIDs as a last resort.
3093 2019-05-22 Martin Liska <mliska@suse.cz>
3096 * c-attribs.c (handle_copy_attribute): Do not copy
3097 target_clones attribute.
3099 2019-05-21 Eric Botcazou <ebotcazou@adacore.com>
3101 * c-ada-spec.h (enum cpp_operation): Add IS_ASSIGNMENT_OPERATOR.
3102 * c-ada-spec.c (print_assignment_operator): New function.
3103 (dump_ada_declaration) <FUNCTION_DECL>: Call it do dump explicit copy
3104 assignment operators declared as methods and filter out the others.
3106 2019-05-17 Thomas Schwinge <thomas@codesourcery.com>
3109 * c-attribs.c (c_common_attribute_table): Set min_len to -1 for
3110 "omp declare target".
3112 2019-05-16 Martin Sebor <msebor@redhat.com>
3114 * c-attribs.c (handle_no_sanitize_attribute): Quote identifiers,
3115 keywords, operators, and types in diagnostics.
3116 (handle_scalar_storage_order_attribute): Same.
3117 (handle_mode_attribute): Same.
3118 (handle_visibility_attribute): Same.
3119 (handle_assume_aligned_attribute): Same.
3120 (handle_no_split_stack_attribute): Same.
3121 * c-common.c (shorten_compare): Same.
3122 (c_common_truthvalue_conversion): Same.
3123 (cb_get_source_date_epoch): Same.
3124 * c-lex.c (cb_def_pragma): Quote keywords, operators, and types
3126 (interpret_float): Same.
3127 * c-omp.c (c_finish_omp_for): Same.
3128 * c-opts.c (c_common_post_options): Same.
3129 * c-pch.c (c_common_pch_pragma): Same.
3130 * c-pragma.c (pop_alignment): Same.
3131 (handle_pragma_pack): Same.
3132 (apply_pragma_weak): Same.
3133 (handle_pragma_weak): Same.
3134 (handle_pragma_scalar_storage_order): Same.
3135 (handle_pragma_redefine_extname): Same.
3136 (add_to_renaming_pragma_list): Same.
3137 (maybe_apply_renaming_pragma): Same.
3138 (push_visibility): Same.
3139 (handle_pragma_visibility): Same.
3140 (handle_pragma_optimize): Same.
3141 (handle_pragma_message): Same.
3142 * c-warn.c (warn_for_omitted_condop): Same.
3143 (lvalue_error): Same.
3145 2019-05-15 Richard Biener <rguenther@suse.de>
3148 * c-common.c (c_common_mark_addressable_vec): Also mark
3149 a COMPOUND_LITERAL_EXPR_DECL addressable similar to
3152 2019-05-06 Nathan Sidwell <nathan@acm.org>
3154 * c-opts.c (handle_defered_opts): Rename struct deps to struc mkdeps.
3156 2019-04-30 Nathan Sidwell <nathan@acm.org>
3158 * c-common.c (c_common_init_ts): Use MARK_TS_EXP. Mark SIZEOF_EXPR.
3160 2019-04-30 Martin Liska <mliska@suse.cz>
3162 * c-pragma.c (handle_pragma_diagnostic): Provide hints
3163 for unknown options.
3165 2019-04-26 Richard Sandiford <richard.sandiford@arm.com>
3167 * c-warn.c (strict_aliasing_warning): Apply COMPLETE_TYPE_P to
3168 the pointer target rather than the pointer itself.
3170 2019-04-19 Jakub Jelinek <jakub@redhat.com>
3173 * c-common.h (c_add_case_label): Remove orig_type and outside_range_p
3175 (c_do_switch_warnings): Remove outside_range_p argument.
3176 * c-common.c (check_case_bounds): Removed.
3177 (c_add_case_label): Remove orig_type and outside_range_p arguments.
3178 Don't call check_case_bounds. Fold low_value as well as high_value.
3179 * c-warn.c (c_do_switch_warnings): Remove outside_range_p argument.
3180 Check for case labels outside of range of original type here and
3183 2019-04-12 Jakub Jelinek <jakub@redhat.com>
3185 PR translation/90041
3186 * c.opt (-fhandle-exceptions): Use %< and %> around option names
3187 in the Warn diagnostics.
3190 * c-attribs.c (handle_patchable_function_entry_attribute): Add
3191 function comment. Warn if arguments of the attribute are not positive
3194 2019-04-09 Eric Botcazou <ebotcazou@adacore.com>
3196 * c-ada-spec.c (print_destructor): Deal with deleting destructors.
3197 (dump_ada_declaration) <FUNCTION_DECL>: Likewise.
3199 2019-04-07 Eric Botcazou <ebotcazou@adacore.com>
3201 * c-ada-spec.c (is_float128): New predicate extracted from...
3202 (dump_ada_node) <COMPLEX_TYPE>: Use it to recognize __cfloat128.
3203 <REAL_TYPE>: ...here. Call it.
3205 2019-04-05 David Malcolm <dmalcolm@redhat.com>
3208 * c-warn.c (check_address_or_pointer_of_packed_member): Add
3209 auto_diagnostic_group. Guard inform calls by result of
3212 2019-04-05 Marek Polacek <polacek@redhat.com>
3214 PR c++/89973 - -Waddress-of-packed-member ICE with invalid conversion.
3215 * c-warn.c (check_address_or_pointer_of_packed_member): Check the type
3218 2019-04-03 Jason Merrill <jason@redhat.com>
3220 PR c++/86586 - -fcompare-debug=-Wsign-compare.
3221 * c-warn.c (warn_for_sign_compare): Call fold_for_warn.
3223 2019-04-01 Martin Sebor <msebor@redhat.com>
3226 * c-attribs.c (handle_copy_attribute): Handle references and
3227 non-constant expressions.
3229 2019-03-22 Jakub Jelinek <jakub@redhat.com>
3232 * c.opt (-fconstexpr-ops-limit=): New option.
3234 2019-03-21 Jakub Jelinek <jakub@redhat.com>
3236 * c-common.c (per_file_includes_t): Use false as Lazy in hash_set
3239 2019-03-19 Martin Sebor <msebor@redhat.com>
3241 PR tree-optimization/89688
3242 * c-common.c (braced_list_to_string): Make static.
3243 (braced_lists_to_strings): Define new function.
3244 * c-common.h (braced_list_to_string): Remove.
3245 (braced_lists_to_strings): Declare.
3247 2019-03-12 Martin Liska <mliska@suse.cz>
3249 * c-opts.c (c_common_handle_option): Wrap option with %< and %>.
3251 2019-03-11 Martin Liska <mliska@suse.cz>
3253 * c-opts.c (c_common_post_options): Wrap apostrophes
3254 in gcc internal format with %'.
3256 2019-03-11 Martin Liska <mliska@suse.cz>
3258 * c-attribs.c (handle_nocf_check_attribute): Wrap an option name
3259 in a string format message and fix GNU coding style.
3260 * c-common.c (vector_types_convertible_p): Likewise.
3261 (c_build_vec_perm_expr): Likewise.
3262 * c-indentation.c (get_visual_column): Likewise.
3263 * c-opts.c (c_common_handle_option): Likewise.
3264 (c_common_post_options): Likewise.
3265 (sanitize_cpp_opts): Likewise.
3266 * c-pch.c (c_common_pch_pragma): Likewise.
3267 * c-pragma.c (handle_pragma_pack): Likewise.
3269 2019-03-08 Jakub Jelinek <jakub@redhat.com>
3271 PR tree-optimization/89550
3272 * c-common.c (c_common_truthvalue_conversion): Only set
3273 TREE_NO_WARNING if warning_at returned true.
3274 * c-warn.c (overflow_warning, warn_logical_operator): Likewise.
3276 2019-02-25 Sandra Loosemore <sandra@codesourcery.com>
3277 Martin Sebor <msebor@gmail.com>
3279 * c.opt (Wmissing-attributes): Clean up doc string.
3281 2019-02-25 Jakub Jelinek <jakub@redhat.com>
3284 * c-format.c (maybe_read_dollar_number): Compute nargnum in
3285 HOST_WIDE_INT type to avoid overflows and change overflow_flag
3288 2019-02-22 Richard Biener <rguenther@suse.de>
3290 * c-pch.c (no_checksum): Remove.
3291 (pch_init): Remove assertion that executable_checksum is not
3293 (c_common_valid_pch): Likewise.
3295 2019-02-18 Martin Sebor <msebor@redhat.com>
3298 * c-common.c (invalid_array_size_error): Handle cst_size_not_constant.
3300 2019-02-16 David Malcolm <dmalcolm@redhat.com>
3303 * c-common.c (shorten_compare): Call fold_for_warn on op0 when
3304 implementing -Wtype-limits.
3306 2019-02-11 Martin Sebor <msebor@redhat.com>
3309 * c-common.c (invalid_array_size_error): New function.
3310 (valid_array_size_p): Call it. Handle size as well as type.
3311 * c-common.h (valid_constant_size_p): New function.
3312 (enum cst_size_error): New type.
3314 2019-01-31 David Malcolm <dmalcolm@redhat.com>
3317 * known-headers.cc (get_stdlib_header_for_name): Add
3318 {FLT|DBL|LDBL}_{MAX|MIN} to "hints" array.
3320 2019-01-31 Jakub Jelinek <jakub@redhat.com>
3323 * c-pretty-print.c (pp_c_enumeration_constant): Print always as
3324 a C cast in pp_c_flag_gnu_v3 mode.
3326 2019-01-29 Jakub Jelinek <jakub@redhat.com>
3329 * c-common.c (c_common_nodes_and_builtins): Build type variants for
3330 builtin_structptr_types types even for C.
3332 2019-01-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
3334 * c-warn.c (check_address_or_pointer_of_packed_member): Handle the case
3335 when rhs is of array type correctly. Fix handling of nested structures.
3336 Fix handling of indirect_ref together with nop_expr and/or addr_expr.
3337 (check_and_warn_address_or_pointer_of_packed_member): Fix handling of
3338 type casts within nested compound expressions.
3340 2019-01-22 Jakub Jelinek <jakub@redhat.com>
3343 * c-omp.c (c_finish_omp_atomic): For bitfield atomics, update type
3344 variable after using BIT_FIELD_REF.
3346 2019-01-18 H.J. Lu <hongjiu.lu@intel.com>
3350 * c-common.h (warn_for_address_or_pointer_of_packed_member):
3351 Remove the boolean argument.
3352 * c-warn.c (check_address_of_packed_member): Renamed to ...
3353 (check_address_or_pointer_of_packed_member): This. Also
3354 warn pointer conversion.
3355 (check_and_warn_address_of_packed_member): Renamed to ...
3356 (check_and_warn_address_or_pointer_of_packed_member): This.
3357 Also warn pointer conversion.
3358 (warn_for_address_or_pointer_of_packed_member): Remove the
3359 boolean argument. Don't check pointer conversion here.
3361 2019-01-15 Richard Sandiford <richard.sandiford@arm.com>
3364 * c.opt (Wdeprecated): Move documentation and variable to common.opt.
3366 2019-01-14 Jakub Jelinek <jakub@redhat.com>
3368 * c-cppbuiltin.c (c_cpp_builtin): Define __cpp_guaranteed_copy_elision
3369 and __cpp_nontype_template_parameter_auto. Add a comment that
3370 __cpp_template_auto is deprecated.
3372 2019-01-14 Tom Honermann <tom@honermann.net>
3374 Implement P0482R5, char8_t: A type for UTF-8 characters and strings
3375 * c-common.c (c_common_reswords): Add char8_t.
3376 (fix_string_type): Use char8_t for the type of u8 string literals.
3377 (c_common_get_alias_set): char8_t doesn't alias.
3378 (c_common_nodes_and_builtins): Define char8_t as a builtin type in
3380 (c_stddef_cpp_builtins): Add __CHAR8_TYPE__.
3381 (keyword_begins_type_specifier): Add RID_CHAR8.
3382 * c-common.h (rid): Add RID_CHAR8.
3383 (c_tree_index): Add CTI_CHAR8_TYPE and CTI_CHAR8_ARRAY_TYPE.
3384 Define D_CXX_CHAR8_T and D_CXX_CHAR8_T_FLAGS.
3385 Define char8_type_node and char8_array_type_node.
3386 * c-cppbuiltin.c (cpp_atomic_builtins): Predefine
3387 __GCC_ATOMIC_CHAR8_T_LOCK_FREE.
3388 (c_cpp_builtins): Predefine __cpp_char8_t.
3389 * c-lex.c (lex_string): Use char8_array_type_node as the type of
3391 (lex_charconst): Use char8_type_node as the type of CPP_UTF8CHAR.
3392 * c-opts.c: If not otherwise specified, enable -fchar8_t when
3394 * c.opt: Add the -fchar8_t command line option.
3396 2019-01-14 Martin Sebor <msebor@redhat.com>
3399 * c-attribs.c (positional_argument): Call valid_format_string_type_p
3400 and issue errors if it fails.
3401 * c-common.h (valid_format_string_type_p): Declare.
3402 * c-format.c (valid_stringptr_type_p): Rename...
3403 (valid_format_string_type_p): ...to this and make extern.
3404 (handle_format_arg_attribute): Adjust to new name.
3405 (check_format_string): Same.
3407 2019-01-13 H.J. Lu <hongjiu.lu@intel.com>
3409 * c-warn.c (warn_for_address_or_pointer_of_packed_member):
3410 Replace "may may" with "may" in warning message.
3412 2019-01-07 Jakub Jelinek <jakub@redhat.com>
3415 * c-common.h (enum rid): Add RID_BUILTIN_CONVERTVECTOR.
3416 (c_build_vec_convert): Declare.
3417 * c-common.c (c_build_vec_convert): New function.
3419 2019-01-04 Martin Sebor <msebor@redhat.com>
3422 * c-attribs.c (handle_copy_attribute): Avoid copying attribute leaf.
3423 Handle C++ empty throw specification and C11 _Noreturn.
3424 (has_attribute): Also handle C11 _Noreturn.
3426 2019-01-04 Martin Sebor <msebor@redhat.com>
3429 * c-attribs.c (positional_argument): Also accept enumerated types.
3431 2019-01-01 Jakub Jelinek <jakub@redhat.com>
3433 Update copyright years.
3435 2018-12-20 H.J. Lu <hongjiu.lu@intel.com>
3438 * c-common.h (warn_for_address_or_pointer_of_packed_member): New.
3439 * c-warn.c (check_alignment_of_packed_member): New function.
3440 (check_address_of_packed_member): Likewise.
3441 (check_and_warn_address_of_packed_member): Likewise.
3442 (warn_for_address_or_pointer_of_packed_member): Likewise.
3443 * c.opt: Add -Wno-address-of-packed-member.
3445 2018-12-20 David Malcolm <dmalcolm@redhat.com>
3448 * c-warn.c (get_outermost_macro_expansion): New function.
3449 (spelled_the_same_p): Use it to unwind the macro expansions, and
3450 compare the outermost macro in each nested expansion, rather than
3453 2018-12-19 David Malcolm <dmalcolm@redhat.com>
3456 * c-common.h (warn_tautological_cmp): Convert 1st param from
3457 location_t to const op_location_t &.
3458 * c-warn.c (find_array_ref_with_const_idx_r): Call fold_for_warn
3459 when testing for INTEGER_CST.
3460 (warn_tautological_bitwise_comparison): Convert 1st param from
3461 location_t to const op_location_t &; use it to build a
3462 binary_op_rich_location, and use this.
3463 (spelled_the_same_p): New function.
3464 (warn_tautological_cmp): Convert 1st param from location_t to
3465 const op_location_t &. Warn for macro expansions if
3466 spelled_the_same_p. Use binary_op_rich_location.
3468 2018-12-19 David Malcolm <dmalcolm@redhat.com>
3472 * c-common.c (unsafe_conversion_p): Fold any location wrapper.
3473 (verify_tree): Handle location wrappers.
3474 (c_common_truthvalue_conversion): Strip any location wrapper.
3476 (fold_offsetof): Strip any location wrapper.
3477 (complete_array_type): Likewise for initial_value.
3478 (convert_vector_to_array_for_subscript): Call fold_for_warn on the
3479 index before checking for INTEGER_CST.
3480 * c-pretty-print.c (c_pretty_printer::primary_expression): Don't
3481 print parentheses around location wrappers.
3482 * c-warn.c (warn_logical_operator): Call fold_for_warn on op_right
3483 before checking for INTEGER_CST.
3484 (warn_tautological_bitwise_comparison): Call
3485 tree_strip_any_location_wrapper on lhs, rhs, and bitop's operand
3486 before checking for INTEGER_CST.
3487 (readonly_error): Strip any location wrapper.
3488 (warn_array_subscript_with_type_char): Strip location wrappers
3489 before checking for INTEGER_CST. Use the location of the index if
3492 2018-12-06 Jason Merrill <jason@redhat.com>
3494 PR c++/88136 - -Wdeprecated-copy false positives
3495 * c.opt (Wdeprecated-copy-dtor): New.
3496 (Wdeprecated-copy): Move to -Wextra.
3498 2018-11-29 Martin Sebor <msebor@redhat.com>
3502 * c-attribs.c (common_handle_aligned_attribute): Silently avoid setting
3503 alignments to values less than the target requires.
3504 (has_attribute): For attribute aligned consider both the attribute
3505 and the alignment bits.
3506 * c-common.c (c_init_attributes): Optionally issue a warning for
3509 2018-11-28 Martin Sebor <msebor@redhat.com>
3513 * c-warn.c (sizeof_pointer_memaccess_warning): Bail if source
3514 or destination is an error.
3516 2018-11-28 Jakub Jelinek <jakub@redhat.com>
3519 * c-ubsan.c: Include langhooks.h.
3520 (ubsan_instrument_division): Change gcc_assert that main variants
3521 of op0 and op1 types are equal to gcc_checking_assert that the
3522 main variants are compatible types.
3524 2018-11-27 Eric Botcazou <ebotcazou@adacore.com>
3526 * c-ada-spec.c: Include stringpool.h.
3527 (has_static_fields): Return false for incomplete types.
3528 (is_tagged_type): Likewise.
3529 (has_nontrivial_methods): Likewise.
3530 (dump_ada_node) <INTEGER_TYPE>: Deal specifically with __int128.
3531 (struct overloaded_name_hash): New structure.
3532 (struct overloaded_name_hasher): Likewise.
3533 (overloaded_names): New global variable.
3534 (init_overloaded_names): New static function.
3535 (overloaded_name_p): New predicate.
3536 (dump_ada_declaration) <TYPE_DECL>: Tidy up and set TREE_VISITED
3537 on the TYPE_STUB_DECL of the original type of a typedef, if any.
3538 <FUNCTION_DECL>: Bail out for an unsupported overloaded name.
3539 Remove always-true condition and dump forward types.
3540 (dump_ada_specs): Delete overloaded_names.
3542 2018-11-20 Martin Sebor <msebor@redhat.com>
3544 * c-attribs.c (type_for_vector_size): New function.
3545 (type_valid_for_vector_size): Same.
3546 (handle_vector_size_attribute): Move code to the functions above
3548 (validate_attribute, has_attribute): New functions.
3549 * c-common.h (has_attribute): Declare.
3550 (rid): Add RID_HAS_ATTRIBUTE_EXPRESSION.
3551 * c-common.c (c_common_resword): Same.
3553 2018-11-16 Jason Merrill <jason@redhat.com>
3555 * c-lex.c (c_common_has_attribute): Handle likely/unlikely.
3556 * c-attribs.c (attr_cold_hot_exclusions): Make public.
3558 2018-11-16 Jakub Jelinek <jakub@redhat.com>
3561 * c-common.c (fix_string_type): Reject string literals larger than
3562 TYPE_MAX_VALUE (ssizetype) bytes.
3564 2018-11-15 Martin Sebor <msebor@redhat.com>
3568 * c-attribs.c (positional_argument): New function.
3569 (handle_alloc_size_attribute): Use it and simplify.
3570 (handle_alloc_align_attribute): Same.
3571 (handle_assume_aligned_attribute): Same.
3572 (handle_nonnull_attribute): Same.
3573 * c-common.c (check_function_arguments): Pass fntype to
3574 check_function_format.
3575 * c-common.h (check_function_format): Add an argument.
3576 (PosArgFlags, positional_argument): Declare new type and function.
3577 * c-format.c (decode_format_attr): Add arguments.
3578 (check_format_string, get_constant): Same.
3579 (convert_format_name_to_system_name): Adjust.
3581 2018-11-15 David Malcolm <dmalcolm@redhat.com>
3584 * c-opts.c (c_diagnostic_finalizer): Add diagnostic_t param.
3586 2018-11-14 Jakub Jelinek <jakub@redhat.com>
3588 P1236R1 - Signed integers are two's complement
3589 * c-warn.c (maybe_warn_shift_overflow): Don't warn for c++2a.
3590 * c-ubsan.c (ubsan_instrument_shift): Make signed shifts
3591 with in-range second operand well defined for -std=c++2a.
3594 * c-common.c (parse_optimize_options): Allocate option string from
3595 opts_obstack rather than as GC memory. Move the allocation after
3596 warning for invalid option.
3598 2018-11-13 David Malcolm <dmalcolm@redhat.com>
3600 * c-common.c (c_get_substring_location): Update for renaming of
3601 get_source_location_for_substring to get_location_within_string.
3602 * c-lex.c: Replace "source_location" with "location_t".
3603 * c-opts.c: Likewise.
3604 * c-ppoutput.c: Likewise.
3606 2018-11-13 Martin Sebor <msebor@redhat.com>
3609 * c-attribs.c (handle_copy_attribute): Exclude inlining attributes.
3610 (handle_tls_model_attribute): Improve diagnostics.
3612 2018-11-12 Jason Merrill <jason@redhat.com>
3614 * c-cppbuiltin.c (c_cpp_builtins): Define
3615 __cpp_impl_destroying_delete.
3617 * c-cppbuiltin.c (c_cpp_builtins): Change __cpp_explicit_bool to
3618 __cpp_conditional_explicit.
3620 2018-11-09 Martin Sebor <msebor@redhat.com>
3623 * c-attribs.c (handle_copy_attribute): New function.
3625 2018-11-09 Martin Sebor <msebor@redhat.com>
3628 * c-common.c (check_user_alignment): Use MAX_OFILE_ALIGNMENT.
3630 2018-11-08 Jakub Jelinek <jakub@redhat.com>
3632 * c-common.h (c_finish_omp_taskgroup): Add CLAUSES argument.
3633 (c_finish_omp_atomic): Replace bool SEQ_CST argument with
3634 enum omp_memory_order MEMORY_ORDER.
3635 (c_finish_omp_flush): Add MO argument.
3636 (c_omp_depend_t_p, c_finish_omp_depobj): Declare.
3637 (c_finish_omp_for): Add FINAL_P argument.
3638 * c-omp.c: Include memmodel.h.
3639 (c_finish_omp_taskgroup): Add CLAUSES argument. Set
3640 OMP_TASKGROUP_CLAUSES to it.
3641 (c_finish_omp_atomic): Replace bool SEQ_CST argument with
3642 enum omp_memory_order MEMORY_ORDER. Set OMP_ATOMIC_MEMORY_ORDER
3643 instead of OMP_ATOMIC_SEQ_CST.
3644 (c_omp_depend_t_p, c_finish_omp_depobj): New functions.
3645 (c_finish_omp_flush): Add MO argument, if not MEMMODEL_LAST, emit
3646 __atomic_thread_fence call with the given value.
3647 (check_omp_for_incr_expr): Formatting fixes.
3648 (c_finish_omp_for): Add FINAL_P argument. Allow NE_EXPR
3649 even in OpenMP loops, diagnose if NE_EXPR and incr expression
3650 is not constant expression 1 or -1. Transform NE_EXPR loops
3651 with iterators pointers to VLA into LT_EXPR or GT_EXPR loops.
3652 (c_omp_check_loop_iv_r): Look for orig decl of C++ range for
3654 (c_omp_split_clauses): Add support for combined
3655 #pragma omp parallel master and
3656 #pragma omp {,parallel }master taskloop{, simd} constructs.
3657 Handle OMP_CLAUSE_IN_REDUCTION. Handle OMP_CLAUSE_REDUCTION_TASK.
3658 Handle OMP_CLAUSE_NONTEMPORAL. Handle splitting OMP_CLAUSE_IF
3659 also to OMP_SIMD. Copy OMP_CLAUSE_LASTPRIVATE_CONDITIONAL.
3660 (c_omp_predetermined_sharing): Don't return
3661 OMP_CLAUSE_DEFAULT_SHARED for const qualified decls.
3662 * c-pragma.c (omp_pragmas): Add PRAGMA_OMP_DEPOBJ and
3663 PRAGMA_OMP_REQUIRES.
3664 * c-pragma.h (enum pragma_kind): Likewise.
3665 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_NONTEMPORAL
3666 and PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
3668 2018-11-08 David Malcolm <dmalcolm@redhat.com>
3670 * c-format.c (gcc_dump_printf_char_table): Add entry for %f.
3672 2018-11-08 David Malcolm <dmalcolm@redhat.com>
3674 * c-format.c (local_cgraph_node_ptr_node): New variable.
3675 (gcc_dump_printf_char_table): Add entry for %C.
3676 (get_pointer_to_named_type): New function, taken from the handling
3677 code for "gimple *" from...
3678 (init_dynamic_diag_info): ...here. Add handling for
3680 * c-format.h (T_CGRAPH_NODE): New.
3682 2018-10-19 Jason Merrill <jason@redhat.com>
3684 * c-cppbuiltin.c (c_cpp_builtins): Add
3685 __cpp_nontype_template_parameter_class.
3687 2018-10-31 Nathan Sidwell <nathan@acm.org>
3689 * c-opts.c (c_finish_options): Force command line macro
3690 location. Refactor to avoid repeating main debug hook.
3691 (push_command_line_include): Clarify comment.
3693 * c-opts.c (c_finish_options): Adjust cpp_force_token_locations call.
3695 2018-10-30 Martin Sebor <msebor@redhat.com>
3698 * c-format.c (check_format_types): Avoid diagnosing null pointer
3699 arguments to printf-family of functions.
3701 2018-10-30 Marek Polacek <polacek@redhat.com>
3703 Implement P0892R2, explicit(bool).
3704 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_explicit_bool.
3706 2018-10-29 David Malcolm <dmalcolm@redhat.com>
3708 * name-hint.h (name_hint::take_deferred): New member function.
3710 2018-10-29 David Malcolm <dmalcolm@redhat.com>
3713 * c-common.c (check_function_sentinel): Call fold_for_warn on the
3715 (check_function_restrict): Rename param "argarray" to
3716 "unfolded_argarray", and make a copy named "argarray", calling
3717 fold_for_warn on each argument.
3718 (check_function_arguments): Add note about responsibility for
3719 folding the arguments.
3721 2018-10-17 Joseph Myers <joseph@codesourcery.com>
3723 * c-common.c (flag_isoc2x): New variable.
3724 * c-common.h (clk_c): Update comment to reference C2X.
3725 (flag_isoc99, flag_isoc11): Update comments to reference future
3726 standard versions in general.
3727 (flag_isoc2x): Declare.
3728 * c-opts.c (set_std_c2x): New function.
3729 (c_common_handle_option): Handle -std=c2x and -std=gnu2x.
3730 (set_std_c89, set_std_c99, set_std_c11, set_std_c17): Set
3732 * c.opt (Wc11-c2x-compat, std=c2x, std=gnu2x): New options.
3734 2018-10-17 Joseph Myers <joseph@codesourcery.com>
3736 * c.opt (std=c17, std=c18, std=gnu17, std=gnu18, std=iso9899:2017)
3737 (std=iso9899:2018): Document C17 as published in 2018.
3739 2018-10-12 Christophe Lyon <christophe.lyon@linaro.org>
3742 * c-pretty-print.c (c_pretty_printer::constant): Fix typo.
3744 2018-10-11 Will Wray <wjwray@gmail.com>
3747 * c-pretty-print.h (pp_c_type_cast): Prototype.
3748 (pp_c_integer_constant): Likewise.
3749 * c-pretty-print.c (pp_c_type_cast): No longer static.
3750 (pp_c_integer_constant): Likewise.
3751 (pp_c_enumeration_constant): Fix loop termination when finding
3752 name of constant. No longer returns a value. Call
3753 pp_c_integer_constant.
3754 (c_pretty_printer::constant): Update for changes to
3755 pp_c_enumeration_constant.
3757 2018-10-11 Jakub Jelinek <jakub@redhat.com>
3759 * c-lex.c (c_common_has_attribute): Return 201803 instead of 20180312
3760 for no_unique_address.
3762 2018-10-09 David Malcolm <dmalcolm@redhat.com>
3764 * c-common.c (c_option_controlling_cpp_error): Rename to...
3765 (c_option_controlling_cpp_diagnostic): ...this, and convert
3766 "reason" from int to enum.
3767 (c_cpp_error): Rename to...
3768 (c_cpp_diagnostic): ...this, converting level and reason to enums.
3769 * c-common.h (c_cpp_error): Rename to...
3770 (c_cpp_diagnostic): ...this, converting level and reason to enums.
3771 * c-opts.c (c_common_init_options): Update for renaming.
3773 2018-10-08 Richard Sandiford <richard.sandiford@arm.com>
3776 * c-common.c (vector_types_compatible_elements_p): Use
3777 INTEGRAL_TYPE_P instead of checking only for INTEGER_TYPE.
3779 2018-10-04 Vinay Kumar <vinay.kumar@blackfigtech.com>
3781 * c-attribs.c (get_priority): Add a warning flag warn_prio_ctor_dtor
3782 to generate constructor destructor priority warning.
3783 * c.opt (-Wprio-ctor-dtor): New option.
3785 2018-10-01 Jason Merrill <jason@redhat.com>
3787 * c-lex.c (c_common_has_attribute): Add no_unique_address.
3789 2018-10-01 Eric Botcazou <ebotcazou@adacore.com>
3791 * c-ada-spec.c (get_underlying_decl): Get to the main type variant.
3792 (dump_ada_node): Add const keyword.
3794 2018-09-25 Martin Liska <mliska@suse.cz>
3796 * c-common.c (c_common_truthvalue_conversion):
3797 Remove Pascal from documentation.
3799 2018-09-21 Eric Botcazou <ebotcazou@adacore.com>
3801 * c-ada-spec.c: Include diagnostic.h.
3802 (dump_ada_declaration) <RECORD_TYPE>: Issue a warning on packed layout.
3804 2018-09-19 Marek Polacek <polacek@redhat.com>
3806 * c.opt (Wclass-conversion): New.
3808 2018-09-17 David Malcolm <dmalcolm@redhat.com>
3810 * c-format.c (range_label_for_format_type_mismatch::get_text):
3811 Update for new param.
3813 2018-09-17 David Malcolm <dmalcolm@redhat.com>
3815 * c-format.c (format_warning_at_char): Update for introduction of
3816 format_string_diagnostic_t.
3817 (format_type_warning): Likewise.
3819 2018-09-17 Martin Jambor <mjambor@suse.cz>
3822 * c.opt (Wabsolute-value): New.
3824 2018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
3826 * c-common.c (complete_flexible_array_elts): New helper function.
3827 * c-common.h (complete_flexible_array_elts): Declare.
3829 2018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
3831 * c-common.c (braced_list_to_string): Remove eval parameter.
3832 Add some more checks. Always create zero-terminated STRING_CST.
3833 * c-common.h (braced_list_to_string): Adjust prototype.
3835 2018-08-27 David Malcolm <dmalcolm@redhat.com>
3838 * c-common.c (c_cpp_error): Update for conversion of show_caret_p
3840 (maybe_suggest_missing_token_insertion): Likewise.
3841 (maybe_add_include_fixit): Add param "override_location". If set,
3842 and source-printing is enabled, then override the rich_location's
3843 primary location with that of the insertion point for the fix-it
3844 hint, marking it with SHOW_LINES_WITHOUT_RANGE.
3845 * c-common.h (extern void maybe_add_include_fixit): Add bool
3847 * c-format.c (selftest::test_type_mismatch_range_labels): Update
3848 for conversion of show_caret_p to a tri-state.
3849 * c-warn.c (warn_for_restrict): Likewise.
3851 (suggest_missing_header::~suggest_missing_header): Update call to
3852 maybe_add_include_fixit to suggest overriding the location, as it
3855 2018-08-27 Martin Liska <mliska@suse.cz>
3857 * c-common.c (check_function_restrict): Use new function
3858 fndecl_built_in_p and remove check for FUNCTION_DECL if
3860 (check_builtin_function_arguments): Likewise.
3861 (reject_gcc_builtin): Likewise.
3862 * c-warn.c (sizeof_pointer_memaccess_warning): Likewise.
3864 2018-08-26 Marek Polacek <polacek@redhat.com>
3866 PR c++/87029, Implement -Wredundant-move.
3867 * c.opt (Wredundant-move): New option.
3869 2018-08-21 Marek Polacek <polacek@redhat.com>
3871 PR c++/86981, Implement -Wpessimizing-move.
3872 * c.opt (Wpessimizing-move): New option.
3874 2018-08-20 David Malcolm <dmalcolm@redhat.com>
3877 * c-attribs.c (common_handle_aligned_attribute): Add
3878 auto_diagnostic_group instance.
3879 * c-indentation.c (warn_for_misleading_indentation): Likewise.
3880 * c-opts.c (c_common_post_options): Likewise.
3881 * c-warn.c (warn_logical_not_parentheses): Likewise.
3882 (warn_duplicated_cond_add_or_warn): Likewise.
3883 (warn_for_multistatement_macros): Likewise.
3885 2018-08-20 Nathan Sidwell <nathan@acm.org>
3887 * c-ada-spec.c (macro_length, dump_ada_macros): Adjust macro parm
3890 2018-08-17 Nathan Sidwell <nathan@acm.org>
3892 * c-cppbuiltin.c (struct lazy_hex_fp_value_struct): Remove macro
3894 (laxy_hex_fp_value_count): Make unsigned.
3895 (lazy_hex_fp_value): Provided with macro & lazy number. Directly
3896 manipulate the macro.
3897 (builtin_defin_with_hex_fp_value): Adjust callback name, use
3900 2018-08-17 David Malcolm <dmalcolm@redhat.com>
3902 * c-format.c (enum format_type): Add gcc_dump_printf_format_type.
3903 (gcc_dump_printf_length_specs): New.
3904 (gcc_dump_printf_flag_pairs): New.
3905 (gcc_dump_printf_flag_specs): New.
3906 (gcc_dump_printf_char_table): New.
3907 (format_types_orig): Add entry for "gcc_dump_printf".
3908 (init_dynamic_diag_info): Set up length_char_specs and
3909 conversion_specs for gcc_dump_printf_format_type.
3910 (handle_format_attribute): Handle gcc_dump_printf_format_type.
3912 2018-08-17 Nathan Sidwell <nathan@acm.org>
3914 * c-ada-spec.c (macro_length, dump_ada_macros): Constify.
3916 * c-ada-spec.c: Don't #include "cpp-id-data.h"
3917 * c-cppbuiltin.c: Likewise.
3919 2018-08-17 Martin Liska <mliska@suse.cz>
3921 * c.opt: Remove Warn, Init and Report for options with
3922 Ignore/Deprecated flag. Warning is done automatically for
3925 2018-08-16 David Malcolm <dmalcolm@redhat.com>
3928 * c-common.c (selftest::c_family_tests): Call
3929 selftest::c_indentation_c_tests.
3930 * c-common.h (selftest::c_indentation_c_tests): New decl.
3931 * c-indentation.c: Include "selftest.h".
3932 (next_tab_stop): Add "tab_width" param, rather than accessing
3934 (get_visual_column): Likewise. Clarify comment. Bulletproof
3935 against reading past the end of the line.
3936 (get_first_nws_vis_column): Add "tab_width" param.
3937 (detect_intervening_unindent): Likewise.
3938 (should_warn_for_misleading_indentation): Read tab width from
3939 cpp_opts and pass around.
3940 (selftest::test_next_tab_stop): New test.
3941 (selftest::assert_get_visual_column_succeeds): New function.
3942 (ASSERT_GET_VISUAL_COLUMN_SUCCEEDS): New macro.
3943 (selftest::assert_get_visual_column_fails): New function.
3944 (ASSERT_GET_VISUAL_COLUMN_FAILS): New macro.
3945 (selftest::test_get_visual_column): New test.
3946 (selftest::c_indentation_c_tests): New function.
3948 2018-08-16 Nathan Sidwell <nathan@acm.org>
3950 * c-ada-spec.c (count_ada_macro): Use cpp_user_macro_p.
3951 (store_ada_macro): Likewise.
3952 * c-ppoutput.c (cb_used_define, dump_macro): Likewise.
3953 * c-spellcheck.cc (should-suggest_as_macro_p): Likewise,
3955 2018-08-15 David Malcolm <dmalcolm@redhat.com>
3957 * c-format.c: Include "selftest-diagnostic.h" and
3958 "gcc-rich-location.h".
3959 (format_warning_at_char): Pass NULL for new label params of
3961 (class indirection_suffix): New class.
3962 (class range_label_for_format_type_mismatch): New class.
3963 (format_type_warning): Move logic for generating "*" suffix to
3964 class indirection_suffix. Create "fmt_label" and "param_label"
3965 to show their types, and pass them to the
3966 format_warning_at_substring calls.
3967 (selftest::test_type_mismatch_range_labels): New test.
3968 (selftest::c_format_c_tests): Call it.
3970 2018-08-13 Martin Sebor <msebor@redhat.com>
3972 PR tree-optimization/71625
3973 * c-common.c (braced_list_to_string): New function.
3974 * c-common.h (braced_list_to_string): Declare it.
3976 2018-08-08 Nathan Sidwell <nathan@acm.org>
3978 * c-common.c (try_to_locate_new_include_inertion_point): Use
3979 linemap_included_from_linemap.
3980 * c-lex.c (fe_file_change): Use linemap_included_from.
3981 * c-ppoutput.c (pp_file_change): Likewise.
3983 2018-08-01 Martin Sebor <msebor@redhat.com>
3985 PR tree-optimization/86650
3986 * c-format.c (gcc_tdiag_char_table): Update comment for "%G".
3987 (gcc_cdiag_char_table, gcc_cxxdiag_char_table): Same.
3988 (init_dynamic_diag_info): Update from "gcall *" to "gimple *".
3989 * c-format.h (T89_G): Update to be "gimple *" rather than
3991 (local_gcall_ptr_node): Rename...
3992 (local_gimple_ptr_node): ...to this.
3994 2018-07-31 David Malcolm <dmalcolm@redhat.com>
3996 * c-format.c (PP_FORMAT_CHAR_TABLE): New macro, based on existing
3997 table entries for gcc_diag_char_table, and the 'Z' entry from
3998 gcc_tdiag_char_table, changing the "chain" entry for 'Z' from
3999 &gcc_tdiag_char_table[0] to &gcc_diag_char_table[0].
4000 (gcc_diag_char_table): Use PP_FORMAT_CHAR_TABLE, implicitly
4001 adding missing "Z" for this table. Remove erroneous "G" and "K"
4003 (gcc_tdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
4004 (gcc_cdiag_char_table): Use PP_FORMAT_CHAR_TABLE.
4005 (gcc_cxxdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
4007 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
4009 * c-common.c (speculation_safe_resolve_call): New function.
4010 (speculation_safe_resolve_params): New function.
4011 (speculation_safe_resolve_return): New function.
4012 (resolve_overloaded_builtin): Handle __builtin_speculation_safe_value.
4013 * c-cppbuiltin.c (c_cpp_builtins): Add pre-define for
4014 __HAVE_SPECULATION_SAFE_VALUE.
4016 2018-07-20 David Malcolm <dmalcolm@redhat.com>
4018 * c-common.c (c_cpp_error): Remove redundant "line_table"
4019 parameter from call to rich_location::set_range.
4020 (maybe_suggest_missing_token_insertion): Likewise.
4022 2018-07-20 Martin Sebor <msebor@redhat.com>
4025 * c.opt (-Warray-bounds): Remove redundant -Wall.
4027 2018-07-20 Martin Sebor <msebor@redhat.com>
4030 * c-common.h (c_common_handle_option): Change function argument
4032 * c-opts.c (c_common_init_options): Same.
4033 (c_common_handle_option): Same. Remove special handling of
4034 OPT_Walloca_larger_than_ and OPT_Wvla_larger_than_.
4035 * c.opt (-Walloc-size-larger-than, -Walloca-larger-than): Change
4036 options to take a HOST_WIDE_INT argument and accept a byte-size
4038 (-Wvla-larger-than): Same.
4039 (-Wno-alloc-size-larger-than, -Wno-alloca-larger-than): New.
4040 (-Wno-vla-larger-than): Same.
4042 2018-07-12 Jakub Jelinek <jakub@redhat.com>
4044 * c-attribs.c (c_common_attribute_table): Add
4045 "omp declare target implicit" attribute.
4047 2018-07-12 Richard Biener <rguenther@suse.de>
4050 * c-attribs.c (handle_packed_attribute): Do not build a variant
4051 type with TYPE_PACKED, instead ignore the attribute if we may
4052 not apply to the original type.
4054 2018-07-10 Jakub Jelinek <jakub@redhat.com>
4057 * c-omp.c (c_omp_check_loop_iv_r, c_omp_check_loop_iv): Allow declv
4058 to contain TREE_LIST for both the original class iterator and the
4061 2018-07-07 Eric Botcazou <ebotcazou@adacore.com>
4063 * c-ada-spec.c (to_ada_name): Remove index parameter.
4064 (pp_ada_tree_identifier): Likewise.
4065 (dump_ada_macros): Adjust call to to_ada_name.
4066 (struct overloaded_name_hash): Delete.
4067 (struct overloaded_name_hasher): Likewise.
4068 (overloaded_names): Likewise.
4069 (compute_overloading_index): Likewise.
4070 (dump_ada_decl_name): Do not call compute_overloading_index and
4071 adjust calls to pp_ada_tree_identifier.
4072 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
4073 (dump_ada_import): Add spc parameter and switch to aspect syntax.
4074 (dump_ada_function_declaration): Adjust call to pp_ada_tree_identifier.
4075 (dump_ada_enum_type): Remove type and display_convention parameters.
4076 Adjust calls to pp_ada_tree_identifier.
4077 (dump_ada_node): Likewise and for dump_ada_structure.
4078 (dump_nested_type) <ENUMERAL_TYPE>: Adjust call to dump_ada_enum_type
4080 <RECORD_TYPE>: Adjust call to dump_ada_structure and switch to aspect
4082 (print_constructor): Adjust call to pp_ada_tree_identifier.
4083 (print_destructor): Likewise.
4084 (dump_ada_declaration): Switch to aspect syntax.
4085 (dump_ada_structure): Likewise and tidy up. Replace display_convention
4086 parameter with nested parameter.
4087 (dump_ads): Emit pragma Ada_2012 in lieu of pragma Ada_2005.
4088 (dump_ada_specs): Do not delete overloaded_names table.
4090 2018-07-06 Peter Bergner <bergner@linux.ibm.com>
4093 * c-attribs.c (handle_mode_attribute): Call translate_mode_attribute
4096 2018-07-05 Nathan Sidwell <nathan@acm.org>
4098 * c-lex.c (fe_file_change): Check SYSTEM_IMPLICIT_EXTERN_C not
4099 NO_IMPLICIT_EXTERN_C.
4101 2018-06-28 Martin Liska <mliska@suse.cz>
4103 * cppspec.c: Include opt-suggestions.h.
4105 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
4106 Thomas Schwinge <thomas@codesourcery.com>
4107 Cesar Philippidis <cesar@codesourcery.com>
4109 * c-pragma.h (enum pragma_omp_clause): Add
4110 PRAGMA_OACC_CLAUSE_{FINALIZE,IF_PRESENT}. Remove
4111 PRAGMA_OACC_CLAUSE_PRESENT_OR_{COPY,COPYIN,COPYOUT,CREATE}.
4113 2018-06-20 Jakub Jelinek <jakub@redhat.com>
4116 * c-common.c (check_nonnull_arg): Use fold_for_warn. Adjust obsolete
4119 2018-06-18 Martin Sebor <msebor@redhat.com>
4122 * c-warn.c (sizeof_pointer_memaccess_warning): Check for attribute
4125 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
4127 * c-common.c (c_common_truthvalue_conversion): Handle ABSU_EXPR.
4129 2018-06-13 Jason Merrill <jason@redhat.com>
4131 * c-opts.c (c_common_post_options): Warn about useless -Wabi.
4132 (c_common_handle_option) [OPT_Wabi_]: Remove flag_abi_compat_version
4135 PR c++/86094 - wrong code with defaulted move ctor.
4136 * c-opts.c (c_common_post_options): Bump the current ABI version to
4137 13. Set warn_abi_version and flag_abi_compat_version to the current
4138 version rather than 0. Fix defaulting flag_abi_compat_version from
4141 2018-06-12 Martin Sebor <msebor@redhat.com>
4144 * c-warn.c (sizeof_pointer_memaccess_warning): Avoid warning when
4145 sizeof source and destination yields the same value.
4147 2018-06-12 Martin Liska <mliska@suse.cz>
4149 * c.opt: Make MPX-related options as Deprecated.
4151 2018-06-08 David Malcolm <dmalcolm@redhat.com>
4153 * c-pretty-print.c (c_pretty_printer::statement): Use TDF_NONE
4156 2018-06-08 Martin Liska <mliska@suse.cz>
4158 * c-attribs.c (handle_bnd_variable_size_attribute): Remove support
4159 for MPX (macros, related functions, fields in cgraph_node, ...).
4160 (handle_bnd_legacy): Likewise.
4161 (handle_bnd_instrument): Likewise.
4164 2018-06-06 Jakub Jelinek <jakub@redhat.com>
4167 * c-cppbuiltin.c (c_cpp_builtins): Fix a typo, set
4168 __cpp_transactional_memory to 201500 instead of 210500.
4170 2018-06-06 Jason Merrill <jason@redhat.com>
4172 PR c++/85710 - ICE with -Wmemset-elt-size.
4173 * c-warn.c (warn_for_memset): Don't crash on incomplete element type.
4175 2018-06-01 Jason Merrill <jason@redhat.com>
4177 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_deduction_guides to
4180 2018-06-01 Eric Botcazou <ebotcazou@adacore.com>
4182 * c-ada-spec.c (dump_ada_declaration) <TYPE_DECL>: Generate a forward
4183 declaration for a typedef independently of whether the declaration of
4184 the subtype is generated.
4186 2018-05-31 Martin Sebor <msebor@redhat.com>
4189 * c.opt (-Wno-alloc-size-larger-than): New option.
4191 2018-04-22 David Pagan <dave.pagan@oracle.com>
4194 * c-opts.c (c_common_post_options): Set default for warn_return_type
4195 for C++/C++ with ObjC extensions only. For C, makes it possible to
4196 differentiate between default (no option), -Wreturn-type, and
4199 2018-05-29 Jason Merrill <jason@redhat.com>
4201 * c.opt (Winit-list-lifetime): New flag.
4203 2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
4205 * c-lex.c (get_fileinfo): Use splay_tree_compare_strings and
4206 splay_tree_delete_pointers.
4208 2018-05-26 Jakub Jelinek <jakub@redhat.com>
4211 * c-warn.c (diagnose_mismatched_attributes): Remove unnecessary
4212 noinline variable to workaround broken kernel headers.
4214 2018-05-18 Jason Merrill <jason@redhat.com>
4216 * c.opt (Wdeprecated-copy): New flag.
4218 2018-05-17 Martin Liska <mliska@suse.cz>
4220 * c-warn.c (overflow_warning): Do not use
4221 space in between 'G_' and '('.
4223 2018-05-09 Jason Merrill <jason@redhat.com>
4225 * c-common.c (valid_array_size_p): Add complain parameter.
4226 * c-common.h: ...which defaults to true.
4228 2018-05-11 Jakub Jelinek <jakub@redhat.com>
4231 * c-omp.c (c_omp_predetermined_sharing): Return
4232 OMP_CLAUSE_DEFAULT_SHARED for artificial vars with integral type.
4234 2018-05-11 Martin Liska <mliska@suse.cz>
4237 * c-attribs.c (handle_no_sanitize_attribute): Iterate all
4240 2018-05-10 Jakub Jelinek <jakub@redhat.com>
4243 * c-common.h (fold_offsetof_1): Removed.
4244 (fold_offsetof): Add TYPE argument defaulted to size_type_node and
4245 CTX argument defaulted to ERROR_MARK.
4246 * c-common.c (fold_offsetof_1): Renamed to ...
4247 (fold_offsetof): ... this. Remove wrapper function. Add TYPE
4248 argument, convert the pointer constant to TYPE and use size_binop
4249 with PLUS_EXPR instead of fold_build_pointer_plus if type is not
4250 a pointer type. Adjust recursive calls.
4252 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
4255 * c-attribs.c (handle_visibility_attribute): Do not set no_add_attrs.
4257 2018-05-07 Nathan Sidwell <nathan@acm.org>
4259 * c.opt (ffor-scope): Remove functionality, issue warning.
4261 2018-05-03 Nathan Sidwell <nathan@acm.org>
4263 * c.opt (ffriend-injection): Remove functionality, issue warning.
4265 2018-05-01 David Malcolm <dmalcolm@redhat.com>
4268 * c-format.c (struct format_check_results): Add field
4270 (check_format_info): Initialize it, and warn if encountered.
4271 (check_format_arg): Distinguish between wide char and
4272 everything else when detecting arrays of non-char.
4274 2018-04-30 David Malcolm <dmalcolm@redhat.com>
4276 * c-format.c (get_corrected_substring): Update for
4277 location_get_source_line returning a char_span. Use a char_span
4278 when handling the prefix of the correction.
4279 * c-indentation.c (get_visual_column): Update for
4280 location_get_source_line returning a char_span.
4281 (get_first_nws_vis_column): Likewise.
4283 2018-03-29 David Malcolm <dmalcolm@redhat.com>
4286 * known-headers.cc (get_stdlib_header_for_name): Add various names
4287 from <assert.h>, <string.h>, and <memory.h>; add more names from
4290 2018-03-27 Jakub Jelinek <jakub@redhat.com>
4293 * c-common.c (fold_offsetof_1) <case COMPOUND_EXPR>: Assert that
4294 get_base_address of the second operand is a VAR_P, rather than the
4295 operand itself, and use gcc_checking_assert instead of gcc_assert.
4297 2018-03-23 Marek Polacek <polacek@redhat.com>
4300 * c-pretty-print.c (c_pretty_printer::multiplicative_expression)
4301 <case RDIV_EXPR>: Tweak condition.
4303 2018-03-20 Eric Botcazou <ebotcazou@adacore.com>
4305 * c-ada-spec.c (pp_ada_tree_identifier): Deal specifically with _Bool.
4307 2018-03-16 Jakub Jelinek <jakub@redhat.com>
4310 * c-warn.c (conversion_warning): Replace "to to" with "to" in
4314 * c-warn.c (diagnose_mismatched_attributes): Remove trailing space from
4317 2018-03-16 Richard Biener <rguenther@suse.de>
4320 * c-gimplify.c (c_gimplify_expr): Revert previous change. Instead
4321 unshare the possibly folded expression.
4323 2018-03-15 Richard Biener <rguenther@suse.de>
4326 * c-gimplify.c (c_gimplify_expr): Do not fold expressions.
4328 2018-03-13 Martin Sebor <msebor@redhat.com>
4330 PR tree-optimization/84725
4331 * c-attribs.c (handle_nonstring_attribute): Allow attribute nonstring
4332 with all three narrow character types, including their qualified forms.
4334 2018-03-12 Martin Sebor <msebor@redhat.com>
4336 PR tree-optimization/83456
4337 * c-common.c (check_function_restrict): Return bool.
4338 Restore checking of bounded built-in functions.
4339 (check_function_arguments): Also return the result
4340 of warn_for_restrict.
4341 * c-common.c (check_function_restrict): Return bool.
4342 * c-warn.c (warn_for_restrict): Return bool.
4344 2018-03-02 Marek Polacek <polacek@redhat.com>
4347 * c-warn.c (warn_for_sign_compare): Bail out if any of the operands
4350 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
4352 * c-attribs.c (c_common_attribute_table): Remove "cilk simd
4355 2018-03-01 Marek Polacek <polacek@redhat.com>
4358 * c-attribs.c (common_handle_aligned_attribute): Don't use invalid
4359 alignment in computation.
4361 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
4363 * c-ada-spec.c (dump_ada_node) <NULLPTR_TYPE>: New case.
4364 <REAL_TYPE>: Deal specifically with _Float128/__float128.
4366 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
4368 * c-ada-spec.c (dump_ada_double_name) <ENUMERAL_TYPE>: New case.
4369 (is_char_array): Take a type instead of a declaration.
4370 (dump_ada_array_type): Likewise.
4371 (is_simple_enum): Minor tweak.
4372 (dump_ada_enum_type): New function extracted from...
4373 (dump_ada_node) <ENUMERAL_TYPE>: ...here. Invoke it.
4374 <INTEGER_TYPE>: Remove unreachable code.
4375 <RECORD_TYPE>: Likewise. Minor tweaks.
4376 (dump_nested_type) <ARRAY_TYPE>: Adjust to above changes.
4377 <ENUMERAL_TYPE>: New case.
4378 <RECORD_TYPE>: Factor out common code.
4379 (dump_ada_declaration) <ARRAY_TYPE>: Adjust to above changes.
4380 Minor tweaks. Deal with enumeral types.
4381 (dump_ada_structure): Minor tweaks.
4383 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
4385 * c-ada-spec.c (dump_ada_node) <POINTER_TYPE>: Do not use generic
4386 address for incomplete structures.
4387 (dump_forward_type): Do not bail out for incomplete structures.
4388 (dump_ada_declaration): Do not special-case incomplete structures
4389 for subtypes. Dump them as null records for types.
4391 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
4393 * c-ada-spec.c (dump_ada_import): Use boolean and fix formatting.
4394 (is_char_array): Fix formatting.
4395 (dump_template_types): Likewise.
4396 (dump_generic_ada_node): Rename into...
4397 (dump_ada_node): ...this.
4398 <POINTER_TYPE>: Remove superfluous space. Use generic address for
4399 incomplete structures and not for empty structures. Do not use it
4400 when forward declarations are needed.
4401 (dump_forward_type): New function.
4402 (dump_nested_types): Remove FORWARD parameter. Do not consider
4403 TREE_VISITED and do not generate a forward declaration. Only dump
4404 original nested types for nested declaration.
4405 (dump_nested_type) <POINTER_TYPE>: Call dump_forward_type.
4406 <ARRAY_TYPE>: Likewise if the component type is an anonymous pointer.
4407 <RECORD_TYPE>: Do not consider TREE_VISITED.
4408 (dump_ada_declaration): Use booleans and fix formatting throughout.
4409 <TYPE_DECL>: Skip incomplete structures and not empty structures.
4410 Call dump_forward_type instead of dump_nested_types for a typedef.
4411 Remove superfluous check and adjust call to dump_nested_types.
4412 <POINTER_TYPE>: Call dump_forward_type and fall through.
4413 (dump_ada_struct_decl): Rename into...
4414 (dump_ada_structure): ...this. Do not special-case empty structures.
4416 2018-02-27 Martin Sebor <msebor@redhat.com>
4419 * c.opt (-Wmissing-attributes): New option.
4421 2018-02-21 Martin Liska <mliska@suse.cz>
4423 * c.opt (Wcatch-value=): Add IntegerRange.
4425 2018-02-15 Jason Merrill <jason@redhat.com>
4427 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_deduction_guides.
4429 2018-02-09 Nathan Sidwell <nathan@acm.org>
4432 * c-common.h (strict_aliasing_warning): Drop OTYPE arg, insert LOC
4434 * c-warn.c (strict_aliasing_warning): Drop OTYPE arg, require LOC
4437 2018-02-09 Martin Sebor <msebor@redhat.com>
4440 * c.opt (-Wstringop-overflow, -Warray-bounds): Add LTO.
4441 (-Walloc-size-larger-than, -Wformat-truncation=): Same.
4442 (-Wmaybe-uninitialized, -Wnonnull, -Wrestrict): Same.
4443 (-Wstrict-overflow, -Wsuggest-attribute): Same.
4444 (-Wuninitialized): Same.
4446 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
4448 * c-ada-spec.c (dump_ada_declaration): Do not generate the 'constant'
4449 keyword for components.
4451 2018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
4453 * c-common.h (DECL_UNNAMED_BIT_FIELD): New.
4455 2018-02-02 Julia Koval <julia.koval@intel.com>
4457 * c-common.h (omp_clause_mask): Move to wide_int_bitmask.h.
4459 2018-01-29 Marek Polacek <polacek@redhat.com>
4462 * c-format.c (check_function_format): Check current_function_decl.
4464 2018-01-27 Jakub Jelinek <jakub@redhat.com>
4466 * c-cppbuiltin.c (c_cpp_builtins): Use ggc_strdup for the fp_suffix
4468 (LAZY_HEX_FP_VALUES_CNT): Define.
4469 (lazy_hex_fp_values): Allow up to LAZY_HEX_FP_VALUES_CNT lazy hex fp
4470 values rather than just 12.
4471 (builtin_define_with_hex_fp_value): Likewise.
4473 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
4476 * c.opt (-fmacro-prefix-map): New option.
4477 * c-opts.c (c_common_handle_option): Handle it.
4478 * c-lex.c (init_c_lex): Set remap_filename cpp callback.
4479 * c-ppoutput.c (init_pp_output): Likewise.
4481 2018-01-17 David Malcolm <dmalcolm@redhat.com>
4484 * c-common.c (fold_for_warn): Move to c/c-fold.c and cp/expr.c.
4486 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
4488 * c-ada-spec.c (dump_number): Add FLOAT_P parameter.
4489 Skip 'f' and 'F' characters if it is true.
4490 (store_ada_macro): Minor tweak.
4491 (dump_ada_macros) <CPP_COMMENT>: Likewise.
4492 <CPP_WSTRING>: Likewise.
4493 <CPP_STRING>: Output '&' in the buffer if not the first string.
4494 <CPP_NUMBER>: Adjust calls to dump_number.
4496 2018-01-10 David Malcolm <dmalcolm@redhat.com>
4499 * c-common.c: Include "selftest.h".
4500 (get_atomic_generic_size): Perform the test for integral type
4501 before the range test for any integer constant, fixing indentation
4502 of braces. Call fold_for_warn before testing for an INTEGER_CST.
4503 (reject_gcc_builtin): Strip any location wrapper from EXPR.
4504 (selftest::test_fold_for_warn): New function.
4505 (selftest::c_common_c_tests): New function.
4506 (selftest::c_family_tests): Call it, and
4507 selftest::c_pretty_print_c_tests.
4508 * c-common.h (selftest::c_pretty_print_c_tests): New decl.
4509 * c-format.c (check_format_arg): Convert VAR_P check to a
4511 * c-pretty-print.c: Include "selftest.h".
4512 (pp_c_cast_expression): Don't print casts for location wrappers.
4513 (selftest::assert_c_pretty_printer_output): New function.
4514 (ASSERT_C_PRETTY_PRINTER_OUTPUT): New macro.
4515 (selftest::test_location_wrappers): New function.
4516 (selftest::c_pretty_print_c_tests): New function.
4517 * c-warn.c (warn_for_memset): Call fold_for_warn on the arguments.
4519 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
4520 Alan Hayward <alan.hayward@arm.com>
4521 David Sherwood <david.sherwood@arm.com>
4523 * c-common.c (c_common_type_for_mode): Handle MODE_VECTOR_BOOL.
4525 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
4526 Alan Hayward <alan.hayward@arm.com>
4527 David Sherwood <david.sherwood@arm.com>
4529 * c-ubsan.c (ubsan_instrument_shift): Treat GET_MODE_BITSIZE
4532 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
4533 Alan Hayward <alan.hayward@arm.com>
4534 David Sherwood <david.sherwood@arm.com>
4536 * c-common.c (vector_types_convertible_p, c_build_vec_perm_expr)
4537 (convert_vector_to_array_for_subscript): Handle polynomial
4538 TYPE_VECTOR_SUBPARTS.
4539 (c_common_type_for_mode): Check valid_vector_subparts_p.
4540 * c-pretty-print.c (pp_c_initializer_list): Handle polynomial
4543 2018-01-03 Jakub Jelinek <jakub@redhat.com>
4545 Update copyright years.
4547 2017-12-22 Mike Stump <mikestump@comcast.net>
4548 Eric Botcazou <ebotcazou@adacore.com>
4550 * c-pragma.c (init_pragma): Register pragma GCC unroll.
4551 * c-pragma.h (enum pragma_kind): Add PRAGMA_UNROLL.
4553 2017-12-22 Alexandre Oliva <aoliva@redhat.com>
4557 * c-semantics.c (only_debug_stmts_after_p): New.
4558 (pop_stmt_list): Clear side effects in debug-only stmt list.
4559 Check for single nondebug stmt followed by debug stmts only.
4561 2017-12-21 Alexandre Oliva <aoliva@redhat.com>
4564 * c-semantics.c (pop_stmt_list): Propagate side effects from
4565 single nondebug stmt to container list.
4567 2017-12-19 Jakub Jelinek <jakub@redhat.com>
4569 * known-headers.cc (get_stdlib_header_for_name): Replace Yoda
4570 conditions with typical order conditions.
4572 2017-12-18 Marek Polacek <polacek@redhat.com>
4574 * c-warn.c (warn_logical_operator): Return early if -Wlogical-op is
4577 2017-12-17 Martin Sebor <msebor@redhat.com>
4579 * c-attribs.c (common_handle_aligned_attribute): Avoid issuing
4580 an error for attribute warn_if_not_aligned.
4582 2017-12-16 Martin Sebor <msebor@redhat.com>
4584 PR tree-optimization/78918
4585 * c-common.c (check_function_restrict): Avoid checking built-ins.
4586 * c.opt (-Wrestrict): Include in -Wall.
4588 2017-12-15 Jakub Jelinek <jakub@redhat.com>
4590 * c-attribs.c (c_common_attribute_table,
4591 c_common_format_attribute_table): Swap affects_type_identity
4592 and handler fields, adjust comments.
4594 2017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
4596 * c.opt (Wcast-function-type): New warning option.
4597 * c-lex.c (get_fileinfo): Avoid warning.
4598 * c-ppoutput.c (scan_translation_unit_directives_only): Remove cast.
4600 2017-12-14 Qing Zhao <qing.zhao@oracle.com>
4603 * c-cppbuiltin.c (builtin_define_with_hex_fp_value):
4604 Adjust the size of buf1 and buf2, add a new buf to avoid
4605 format-overflow warning.
4607 2017-12-12 Alexandre Oliva <aoliva@redhat.com>
4609 * c-semantics.c (pop_stmt_list): Move begin stmt marker into
4610 subsequent statement list.
4612 2017-12-07 Martin Sebor <msebor@redhat.com>
4616 * c-attribs.c (attr_aligned_exclusions): New array.
4617 (attr_alloc_exclusions, attr_cold_hot_exclusions): Same.
4618 (attr_common_exclusions, attr_const_pure_exclusions): Same.
4619 (attr_gnu_inline_exclusions, attr_inline_exclusions): Same.
4620 (attr_noreturn_exclusions, attr_returns_twice_exclusions): Same.
4621 (attr_warn_unused_result_exclusions): Same.
4622 (handle_hot_attribute, handle_cold_attribute): Simplify.
4623 (handle_const_attribute): Warn on function returning void.
4624 (handle_pure_attribute): Same.
4625 (handle_aligned_attribute): Diagnose conflicting attribute
4627 * c-warn.c (diagnose_mismatched_attributes): Simplify.
4629 2017-12-06 David Malcolm <dmalcolm@redhat.com>
4632 * c-common.c (selftest::c_family_tests): Call
4633 selftest::c_spellcheck_cc_tests.
4634 * c-common.h (selftest::c_spellcheck_cc_tests): New decl.
4635 * c-spellcheck.cc: Include "selftest.h".
4636 (name_reserved_for_implementation_p): New function.
4637 (should_suggest_as_macro_p): New function.
4638 (find_closest_macro_cpp_cb): Move the check for NT_MACRO to
4639 should_suggest_as_macro_p and call it.
4640 (selftest::test_name_reserved_for_implementation_p): New function.
4641 (selftest::c_spellcheck_cc_tests): New function.
4642 * c-spellcheck.h (name_reserved_for_implementation_p): New decl.
4644 2017-12-06 David Malcolm <dmalcolm@redhat.com>
4646 * c-spellcheck.cc: New file, taken from macro-handling code in
4648 * c-spellcheck.h: New file, taken from macro-handling code in
4651 2017-12-01 Jakub Jelinek <jakub@redhat.com>
4653 * c-attribs.c (c_common_attribute_table): Remove "cilk simd function"
4655 (handle_simd_attribute): Don't check for "cilk simd function"
4656 attribute. Reindent, formatting changes.
4658 2017-11-30 Julia Koval <julia.koval@intel.com>
4660 * c-common.h (inv_list): Remove.
4662 2017-11-28 Jakub Jelinek <jakub@redhat.com>
4665 * c-common.c (c_switch_covers_all_cases_p_1,
4666 c_switch_covers_all_cases_p): New functions.
4667 * c-common.h (c_switch_covers_all_cases_p): Declare.
4669 2017-11-28 Julia Koval <julia.koval@intel.com>
4670 Sebastian Peryt <sebastian.peryt@intel.com>
4672 * array-notation-common.c: Delete.
4673 * c-cilkplus.c: Ditto.
4674 * c-common.c (_Cilk_spawn, _Cilk_sync, _Cilk_for): Remove.
4675 * c-common.def (ARRAY_NOTATION_REF): Remove.
4676 * c-common.h (RID_CILK_SPAWN, build_array_notation_expr,
4677 build_array_notation_ref, C_ORT_CILK, c_check_cilk_loop,
4678 c_validate_cilk_plus_loop, cilkplus_an_parts,
4679 cilk_ignorable_spawn_rhs_op,
4680 cilk_recognize_spawn): Remove.
4681 * c-gimplify.c (CILK_SPAWN_STMT): Remove.
4682 * c-omp.c: Remove CILK_SIMD check.
4683 * c-pragma.c: Ditto.
4684 * c-pragma.h: Remove CILK related pragmas.
4685 * c-pretty-print.c (c_pretty_printer::postfix_expression): Remove
4686 ARRAY_NOTATION_REF condition.
4687 (c_pretty_printer::expression): Ditto.
4688 * c.opt (fcilkplus): Remove.
4691 2017-11-21 Marc Glisse <marc.glisse@inria.fr>
4693 * c-pretty-print.c (pp_c_additive_expression,
4694 c_pretty_printer::expression): Handle POINTER_DIFF_EXPR.
4696 2017-11-21 Jakub Jelinek <jakub@redhat.com>
4698 * c-common.c (get_nonnull_operand): Use tree_to_uhwi.
4701 * c-common.c (get_atomic_generic_size): Use TREE_INT_CST_LOW
4702 instead of tree_to_uhwi, formatting fix.
4704 2017-11-20 David Malcolm <dmalcolm@redhat.com>
4707 * known-headers.cc: New file, based on material from c/c-decl.c.
4708 (suggest_missing_header): Copied as-is.
4709 (get_stdlib_header_for_name): New, based on get_c_name_hint but
4710 heavily edited to add C++ support. Add some knowledge about
4711 <limits.h>, <stdint.h>, and <wchar.h>.
4712 * known-headers.h: Likewise.
4714 2017-11-20 David Malcolm <dmalcolm@redhat.com>
4716 * c-common.h (enum lookup_name_fuzzy_kind): Move to name-hint.h.
4717 (lookup_name_fuzzy): Likewise. Convert return type from
4718 const char * to name_hint. Add location_t param.
4719 * name-hint.h: New header.
4721 2017-11-19 Jakub Jelinek <jakub@redhat.com>
4725 * c-common.h (c_fully_fold): Add LVAL argument defaulted to false.
4727 2017-11-16 Joseph Myers <joseph@codesourcery.com>
4729 * c.opt (-std=c17, std=gnu17, -std=iso9899:2017): Refer to 2018
4730 expected publication date of C17.
4731 (-std=c18, -std=gnu18, -std=iso9899:2018): New option aliases.
4733 2017-11-15 Joseph Myers <joseph@codesourcery.com>
4736 * c-common.c (c_common_reswords): Add __builtin_tgmath.
4737 * c-common.h (enum rid): Add RID_BUILTIN_TGMATH.
4739 2017-11-10 Martin Sebor <msebor@redhat.com>
4742 * c-common.c (catenate_strings): Use memcpy instead of strncpy.
4743 * c-warn.c (sizeof_pointer_memaccess_warning): Handle arrays.
4744 * c.opt (-Wstringop-truncation): New option.
4746 2017-11-06 Martin Liska <mliska@suse.cz>
4749 * c-opts.c (c_common_post_options): Set -Wreturn-type for C++
4751 * c.opt: Set default value of warn_return_type.
4753 2017-10-31 David Malcolm <dmalcolm@redhat.com>
4755 * c-common.c (binary_op_error): Update for renaming of
4757 (c_parse_error): Likewise.
4758 * c-warn.c (warn_logical_not_parentheses): Likewise for
4759 renaming of inform_at_rich_loc.
4760 (warn_for_restrict): Likewise for renaming of
4761 warning_at_rich_loc_n.
4763 2017-10-30 Joseph Myers <joseph@codesourcery.com>
4765 * c.opt (std=c17, std=gnu17, std=iso9899:2017): New options.
4766 * c-opts.c (set_std_c17): New function.
4767 (c_common_init_options): Use gnu17 as default C version.
4768 (c_common_handle_option): Handle -std=c17 and -std=gnu17.
4770 2017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
4772 * c-cppbuiltin.c (mode_has_fma): Add support for PowerPC KFmode.
4773 (c_cpp_builtins): If a machine has a fast fma _Float<N> and
4774 _Float<N>X variant, define __FP_FAST_FMA<N> and/or
4777 2017-10-23 Marek Polacek <polacek@redhat.com>
4780 * c-warn.c (warnings_for_convert_and_check): Fix typos.
4782 2017-10-19 Eric Botcazou <ebotcazou@adacore.com>
4784 * c-common.c (check_builtin_function_arguments): Also check arguments
4785 of __builtin_alloca_with_align_and_max.
4787 2017-10-17 David Malcolm <dmalcolm@redhat.com>
4789 * c-format.c (format_warning_at_char): Pass UNKNOWN_LOCATION
4790 rather than NULL to format_warning_va.
4791 (check_format_types): Likewise when calling format_type_warning.
4792 Remove code to extract source_ranges and source_range * in favor
4793 of just a location_t.
4794 (format_type_warning): Convert source_range * param to a
4797 2017-10-13 Jakub Jelinek <jakub@redhat.com>
4799 * c-gimplify.c (c_gimplify_expr): Handle [LR]ROTATE_EXPR like
4802 2017-10-12 David Malcolm <dmalcolm@redhat.com>
4804 * c-common.c (enum missing_token_insertion_kind): New enum.
4805 (get_missing_token_insertion_kind): New function.
4806 (maybe_suggest_missing_token_insertion): New function.
4807 * c-common.h (maybe_suggest_missing_token_insertion): New decl.
4809 2017-10-11 Nathan Sidwell <nathan@acm.org>
4811 * c-opts.c (add_prefixed_path): Change chain to incpath_kind.
4812 (c_common_handle_option): Update incpath_kind names.
4814 2017-10-11 Martin Liska <mliska@suse.cz>
4817 * c-attribs.c (handle_no_sanitize_attribute): Report directly
4818 Wattributes warning.
4820 2017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
4822 * c-ada-spec.c (dump_generic_ada_node): Use wi::to_wide when
4823 operating on trees as wide_ints.
4824 * c-common.c (pointer_int_sum): Likewise.
4825 * c-pretty-print.c (pp_c_integer_constant): Likewise.
4826 * c-warn.c (match_case_to_enum_1): Likewise.
4827 (c_do_switch_warnings): Likewise.
4828 (maybe_warn_shift_overflow): Likewise.
4830 2017-10-10 Jakub Jelinek <jakub@redhat.com>
4833 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_wide
4834 instead of wide_int::from.
4836 2017-10-06 Jakub Jelinek <jakub@redhat.com>
4839 * c-warn.c (warn_tautological_bitwise_comparison): Instead of
4840 using to_widest use wide_int with the larger of the two precisions.
4842 2017-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
4844 * c-pretty-print.c (pp_c_parameter_type_list): Print ... for variadic
4847 2017-10-02 Richard Sandiford <richard.sandiford@linaro.org>
4849 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_widest
4850 when combining the original unconverted comparison operands.
4852 2017-09-29 Jakub Jelinek <jakub@redhat.com>
4854 * c-attribs.c (handle_noipa_attribute): Don't add "stack_protect"
4857 2017-09-29 Eric Botcazou <ebotcazou@adacore.com>
4859 * c-ada-spec.c (to_ada_name): Add index parameter.
4860 (pp_ada_tree_identifier): Likewise.
4861 (dump_ada_macros): Adjust call to to_ada_name.
4862 (struct overloaded_name_hash): New type.
4863 (struct overloaded_name_hasher): Likewise.
4864 (overloaded_names): New hash table.
4865 (compute_overloading_index): New function.
4866 (dump_ada_decl_name): Call it and pass the result to
4867 pp_ada_tree_identifier.
4868 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
4869 (dump_ada_function_declaration): Likewise.
4870 (dump_generic_ada_node): Likewise.
4871 (print_constructor): Likewise.
4872 (print_destructor): Likewise.
4873 (dump_ada_specs): Delete overloaded_names table.
4875 2017-09-29 Eric Botcazou <ebotcazou@adacore.com>
4877 * c-ada-spec.c (max_ada_macros): Move around.
4878 (store_ada_macro_index): Likewise.
4879 (source_file): Rename into...
4880 (macro_source_file): ...this.
4881 (count_ada_macro): Move around.
4882 (store_ada_macro): Likewise.
4883 (compare_macro): Likewise.
4884 (print_ada_macros): Merge in...
4885 (dump_ada_macros): ...this.
4886 (source_file_base): Rename into...
4887 (current_source_file): ...this.
4888 (print_comment): Move around.
4889 (dump_ada_nodes): Call dump_ada_declaration directly.
4890 (struct with): Change type of limited field to bool.
4891 (append_withs): Change type of limited_access parameter to bool.
4892 (pp_ada_tree_identifie): Likewise.
4893 (dump_ada_decl_nam): Likewise.
4894 (dump_generic_ada_node): Likewise. Do not print the return type.
4895 (to_ada_name): Change type of space_found parameter to bool.
4896 (dump_ada_function_declaration): Return void and change type of
4897 parameters to bool. Also print the return type for a function.
4898 (print_ada_methods): Rename into...
4899 (dump_ada_methods): ...this.
4900 (print_ada_declaration): Rename into ...
4901 (dump_ada_declaration): ...this. Do not print the return type.
4902 (print_ada_struct_decl): Rename into...
4903 (dump_ada_struct_decl): ...this.
4905 2017-09-29 Jakub Jelinek <jakub@redhat.com>
4907 * c-attribs.c (handle_packed_attribute): Test DECL_C_BIT_FIELD
4908 rather than DECL_INITIAL.
4909 (common_handle_aligned_attribute): Likewise.
4911 2017-09-20 Alexandre Oliva <aoliva@redhat.com>
4913 * c.opt (gen-decls): Add RejectNegative.
4915 2017-09-15 Andrew Sutton <andrew.n.sutton@gmail.com>
4916 Jakub Jelinek <jakub@redhat.com>
4918 Add support for -std=c++2a.
4919 * c-common.h (cxx_dialect): Add cxx2a as a dialect.
4920 * opt.c: Add options for -std=c++2a and -std=gnu++2a.
4921 * c-opts.c (set_std_cxx2a): New.
4922 (c_common_handle_option): Set options when -std=c++2a is enabled.
4923 (c_common_post_options): Adjust comments.
4924 (set_std_cxx14, set_std_cxx17): Likewise.
4926 2017-09-15 Eric Botcazou <ebotcazou@adacore.com>
4928 * c-pragma.c (handle_pragma_scalar_storage_order): Expand on error
4929 message for non-uniform endianness and issue a warning in C++.
4931 2017-09-15 Jakub Jelinek <jakub@redhat.com>
4933 * c.opt (Wc++1z-compat): Change from option to undocumented alias.
4934 (Wc++17-compat): Change from undocumented alias to option.
4935 (Wnoexcept-type): Enable by Wc++17-compat instead of Wc++1z-compat,
4936 change C++1z to C++17 in description.
4937 (std=c++1z, std=gnu++1z): Change from option to undocumented
4939 (std=c++17, std=gnu++17): Change from undocumented alias to option.
4941 * c-common.h (enum cxx_dialect): Rename cxx1z to cxx17.
4942 * c-opts.c (set_std_cxx1z): Rename to ...
4943 (set_std_cxx17): ... this.
4944 (c_common_handle_option): Rename OPT_std_c__1z to OPT_std_c__17
4945 and OPT_std_gnu__1z to OPT_std_gnu__17. Adjust set_std_cxx1z
4947 (c_common_post_options): Use cxx17 instead of cxx1z. Adjust
4950 2017-09-12 H.J. Lu <hongjiu.lu@intel.com>
4952 * c-attribs.c (common_handle_aligned_attribute): Don't warn
4953 function alignment if warn_if_not_aligned_p is true.
4955 2017-09-12 Nathan Sidwell <nathan@acm.org>
4957 * c-common.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
4958 resort_sorted_fields): Move to c/c-decl.c.
4959 * c-common.h (field_decl_cmp, resort_sorted_fields): Delete.
4960 (struct sorted_fields_type): Move to c/c-lang.h.
4962 2017-09-09 Jonathan Wakely <jwakely@redhat.com>
4965 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_threadsafe_static_init.
4967 2017-09-04 Marek Polacek <polacek@redhat.com>
4970 * c-warn.c (warn_tautological_bitwise_comparison): New function.
4971 (warn_tautological_cmp): Call it.
4973 2017-09-01 Boris Kolpackov <boris@codesynthesis.com>
4975 * c-opts.c (c_common_finish): Write dependency information even if
4978 2017-09-01 Jakub Jelinek <jakub@redhat.com>
4981 * c-pragma.c (omp_pragmas): Move "ordered" entry from here to ...
4982 (omp_pragmas_simd): ... here.
4983 * c-omp.c (c_finish_omp_ordered): If clauses isn't simd clause alone,
4984 create new clauses list containing just simd clause.
4986 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
4987 Alan Hayward <alan.hayward@arm.com>
4988 David Sherwood <david.sherwood@arm.com>
4990 * c-attribs.c (vector_mode_valid_p) Fold GET_MODE_INNER call
4991 into scalar_mode_supported_p call.
4992 (handle_mode_attribute): Update call to scalar_mode_supported_p.
4994 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
4995 Alan Hayward <alan.hayward@arm.com>
4996 David Sherwood <david.sherwood@arm.com>
4998 * c-common.c (c_common_fixed_point_type_for_size): Use opt_scalar_mode
4999 for the mode iterator.
5001 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5002 Alan Hayward <alan.hayward@arm.com>
5003 David Sherwood <david.sherwood@arm.com>
5005 * c-lex.c (interpret_fixed): Use SCALAR_TYPE_MODE.
5006 * c-common.c (c_build_vec_perm_expr): Likewise.
5008 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5009 Alan Hayward <alan.hayward@arm.com>
5010 David Sherwood <david.sherwood@arm.com>
5012 * c-common.c (c_common_type_for_mode): Use as_a <scalar_int_mode>.
5014 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5015 Alan Hayward <alan.hayward@arm.com>
5016 David Sherwood <david.sherwood@arm.com>
5018 * c-attribs.c (handle_mode_attribute): Check for a scalar_int_mode
5019 before calling targetm.addr_space.valid_pointer_mode.
5021 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5022 Alan Hayward <alan.hayward@arm.com>
5023 David Sherwood <david.sherwood@arm.com>
5025 * c-cppbuiltin.c (c_cpp_builtins): Use opt_scalar_float_mode.
5027 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5028 Alan Hayward <alan.hayward@arm.com>
5029 David Sherwood <david.sherwood@arm.com>
5031 * c-common.c (c_common_fixed_point_type_for_size): Use new mode
5033 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
5035 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5036 Alan Hayward <alan.hayward@arm.com>
5037 David Sherwood <david.sherwood@arm.com>
5039 * c-cppbuiltin.c (mode_has_fma): Prefix mode names with E_ in
5042 2017-08-29 Martin Liska <mliska@suse.cz>
5045 * c-common.c (parse_optimize_options): Add argument to function
5047 * c-pragma.c (handle_pragma_diagnostic): Likewise.
5049 2017-08-24 David Malcolm <dmalcolm@redhat.com>
5051 * c-lex.c (interpret_float): Use token location
5052 when building an EXCESS_PRECISION_EXPR.
5054 2017-08-21 David Malcolm <dmalcolm@redhat.com>
5056 * c-common.c (check_function_arguments): Add "arglogs" param; pass
5057 it to check_function_format.
5058 * c-common.h (check_function_arguments): Add vec<location_t> *
5060 (check_function_format): Likewise.
5061 * c-format.c (struct format_check_context): Add field "arglocs".
5062 (check_function_format): Add param "arglocs"; pass it to
5064 (check_format_info): Add param "arglocs"; use it to initialize
5065 new field of format_ctx.
5066 (check_format_arg): Pass format_ctx->arglocs to new param of
5067 check_format_info_main.
5068 (class argument_parser): New field "arglocs".
5069 (argument_parser::argument_parser): Add "arglocs_" param and use
5070 it to initialize new field.
5071 (argument_parser::check_argument_type): Pass new arglocs field to
5073 (check_format_info_main): Add param "arglocs", and use it when
5074 constructing arg_parser.
5075 (check_format_types): Add param "arglocs"; use it if non-NULL when
5076 !EXPR_HAS_LOCATION (cur_param) to get at location information.
5078 2017-08-18 H.J. Lu <hongjiu.lu@intel.com>
5081 * c-attribs.c (handle_warn_if_not_aligned_attribute): New.
5082 (c_common_attribute_table): Add warn_if_not_aligned.
5083 (handle_aligned_attribute): Renamed to ...
5084 (common_handle_aligned_attribute): Remove argument, name, and add
5085 argument, warn_if_not_aligned. Handle warn_if_not_aligned.
5086 (handle_aligned_attribute): New.
5087 * c.opt: Add -Wif-not-aligned and -Wpacked-not-aligned.
5089 2017-08-14 Martin Sebor <msebor@redhat.com>
5092 * c-attribs.c (c_common_attribute_table): Add nonstring entry.
5093 (handle_nonstring_attribute): New function.
5095 2017-08-14 Martin Sebor <msebor@redhat.com>
5098 * c-format.h (T89_G): New macro.
5099 * c-format.c (local_gcall_ptr_node): New variable.
5100 (init_dynamic_diag_info): Initialize it.
5102 2017-08-11 Martin Liska <mliska@suse.cz>
5104 * c-opts.c (c_common_post_options): Replace ASM_OUTPUT_DEF with
5105 TARGET_SUPPORTS_ALIASES.
5107 2017-08-10 David Malcolm <dmalcolm@redhat.com>
5109 * c-common.c (c_parse_error): Add rich_location * param, using it
5110 rather implicitly using input_location.
5111 * c-common.h (c_parse_error): Add rich_location * param.
5113 2017-08-09 Marek Polacek <polacek@redhat.com>
5115 * c-common.c (pointer_int_sum): Use true/false instead of 1/0.
5116 (c_common_truthvalue_conversion): Likewise.
5117 * c-omp.c (c_finish_omp_atomic): Likewise.
5118 * c-common.h (build_binary_op): Update declaration.
5120 2017-08-08 Martin Liska <mliska@suse.cz>
5122 * c-ada-spec.c: Include header files.
5123 * c-ubsan.c: Likewise.
5124 * c-warn.c: Likewise.
5126 2017-08-07 Jakub Jelinek <jakub@redhat.com>
5129 * c-omp.c (c_finish_omp_atomic): Handle atomics on bitfields.
5131 2017-08-07 Eric Botcazou <ebotcazou@adacore.com>
5133 * c-ada-spec.c (has_nontrivial_methods): Test for FUNCTION_DECL.
5134 (print_ada_methods): Likewise.
5135 (print_ada_declaration): Likewise.
5137 2017-08-07 Martin Liska <mliska@suse.cz>
5139 * array-notation-common.c: Add new includes.
5140 * c-format.c( handle_format_attribute): Canonicalize a format
5142 * c-lex.c (c_common_has_attribute): Canonicalize name of an
5144 * c-pretty-print.c: Add new include.
5146 2017-08-05 Eric Botcazou <ebotcazou@adacore.com>
5148 * c-ada-spec.c (has_static_fields): Look only into variables.
5149 (print_constructor): Add TYPE parameter and use it for the name.
5150 (print_destructor): Likewise.
5151 (print_ada_declaration): Adjust to new constructor/destructor names.
5152 Adjust calls to print_constructor and print_destructor.
5153 (print_ada_struct_decl): Do not test TREE_STATIC on FIELD_DECL.
5154 Look only into variables in the final loop.
5156 2017-08-01 Eric Botcazou <ebotcazou@adacore.com>
5158 * c-ada-spec.c (has_static_fields): Look only into fields.
5159 (dump_generic_ada_node): Small tweak.
5160 (dump_nested_types): Look only into fields.
5161 (print_ada_declaration): Look only into methods. Small tweak.
5162 (print_ada_struct_decl): Look only into fields. Use DECL_VIRTUAL_P.
5164 2017-08-01 Eric Botcazou <ebotcazou@adacore.com>
5166 * c-ada-spec.c (print_generic_ada_decl): Pass correctly-typed constant.
5167 (dump_ada_function_declaration): Likewise.
5168 (dump_generic_ada_node): Likewise.
5169 (print_ada_declaration): Add support for const-qualified variables.
5171 2017-07-31 Martin Liska <mliska@suse.cz>
5174 * c-ubsan.c (ubsan_maybe_instrument_array_ref):
5175 Guard condition with flag_sanitize_p also with current_function_decl
5177 (ubsan_maybe_instrument_reference_or_call): Likewise.
5179 2017-07-30 Uros Bizjak <ubizjak@gmail.com>
5181 * c-format.c (asm_fprintf_char_table): Add 'z' to format_chars.
5183 2017-07-29 Eric Botcazou <ebotcazou@adacore.com>
5185 * c-ada-spec.c (dump_generic_ada_node): Take into account signedness
5187 (print_ada_declaration): Add missing guard for record types.
5189 2017-07-27 Jakub Jelinek <jakub@redhat.com>
5192 * c-omp.c (c_finish_omp_for): If the condition is wrapped in
5193 rhs of COMPOUND_EXPR(s), skip them and readd their lhs into
5194 new COMPOUND_EXPRs around the rhs of the comparison.
5196 2017-07-27 Marek Polacek <polacek@redhat.com>
5199 * c-warn.c (warn_for_sign_compare): Tweak the warning message. Print
5202 2017-07-27 Jakub Jelinek <jakub@redhat.com>
5204 * c-attribs.c (c_common_attribute_table): Add noipa attribute.
5205 (handle_noipa_attribute): New function.
5207 2017-07-07 Torsten Duwe <duwe@suse.de>
5209 * c-attribs.c (c_common_attribute_table): Add entry for
5210 "patchable_function_entry".
5212 2017-07-20 Nathan Sidwell <nathan@acm.org>
5214 Remove TYPE_METHODS.
5215 * c-ada-spec.c (is_tagged_type, has_nontrivial_methods,
5216 dump_ada_template, print_ada_methods,
5217 print_ada_declaration): Member fns are on TYPE_FIELDS.
5219 2017-07-18 Nathan Sidwell <nathan@acm.org>
5221 * c-warn.c (warn_for_memset): Use TYPE_{MIN,MAX}_VALUE.
5223 2017-07-14 David Malcolm <dmalcolm@redhat.com>
5225 * c-common.c (try_to_locate_new_include_insertion_point): New
5227 (per_file_includes_t): New typedef.
5228 (added_includes_t): New typedef.
5229 (added_includes): New variable.
5230 (maybe_add_include_fixit): New function.
5231 * c-common.h (maybe_add_include_fixit): New decl.
5233 2017-07-10 Martin Sebor <msebor@redhat.com>
5236 * c.opt (-Wstringop-overflow): Set defaults in LangEnabledBy.
5238 2017-07-06 David Malcolm <dmalcolm@redhat.com>
5240 * c-common.c (selftest::c_family_tests): New.
5241 * c-common.h (selftest::run_c_tests): Move decl to c/c-lang.h.
5242 (selftest::c_family_tests): New decl.
5244 2017-07-04 Marek Polacek <polacek@redhat.com>
5247 * c-common.c (sync_resolve_size): Give error for pointers to incomplete
5250 2017-07-04 Marek Polacek <polacek@redhat.com>
5252 * c-warn.c (warn_if_unused_value): Remove WITH_CLEANUP_EXPR handling.
5254 2017-06-28 Martin Liska <mliska@suse.cz>
5257 * c-attribs.c (handle_alias_ifunc_attribute): Append ifunc alias
5258 to a function declaration.
5260 2017-06-28 Martin Liska <mliska@suse.cz>
5263 * c.opt: Add IntegerRange to various options.
5265 2017-06-26 Marek Polacek <polacek@redhat.com>
5268 * c-common.h (warn_for_multistatement_macros): Declare.
5269 * c-warn.c: Include "c-family/c-indentation.h".
5270 (warn_for_multistatement_macros): New function.
5271 * c.opt (Wmultistatement-macros): New option.
5272 * c-indentation.c (guard_tinfo_to_string): No longer static.
5273 Change the parameter type to "enum rid". Handle RID_SWITCH.
5274 * c-indentation.h (guard_tinfo_to_string): Declare.
5276 2017-06-23 Marc Glisse <marc.glisse@inria.fr>
5278 * c-common.c (c_common_nodes_and_builtins): Use builtin_structptr_types.
5280 2017-06-15 Martin Sebor <msebor@redhat.com>
5283 * c.opt (-Wclass-memaccess): New option.
5285 2017-06-14 Boris Kolpackov <boris@codesynthesis.com>
5287 * c-opts.c (c_common_finish): Handle '-' special value to -MF.
5289 2017-06-13 Marek Polacek <polacek@redhat.com>
5292 * c-warn.c (do_warn_duplicated_branches): Return if any of the
5295 2017-06-13 Martin Liska <mliska@suse.cz>
5298 * c-attribs.c (add_no_sanitize_value): New function.
5299 (handle_no_sanitize_attribute): Likewise.
5300 (handle_no_sanitize_address_attribute): Use the function.
5301 (handle_no_sanitize_thread_attribute): New function.
5302 (handle_no_address_safety_analysis_attribute): Use
5303 add_no_sanitize_value.
5304 (handle_no_sanitize_undefined_attribute): Likewise.
5305 * c-common.h: Declare new functions.
5306 * c-ubsan.c (ubsan_instrument_division): Use sanitize_flags_p.
5307 (ubsan_instrument_shift): Likewise.
5308 (ubsan_instrument_bounds): Likewise.
5309 (ubsan_maybe_instrument_array_ref): Likewise.
5310 (ubsan_maybe_instrument_reference_or_call): Likewise.
5312 2017-06-11 Jason Merrill <jason@redhat.com>
5314 * c-ada-spec.c, c-pragma.c: Use id_equal.
5316 2017-06-04 Marek Polacek <polacek@redhat.com>
5319 * c-format.c (matching_type_p): Return false if any of the types
5320 requires structural equality.
5322 2017-06-02 Martin Sebor <msebor@redhat.com>
5325 * c-warn.c (conversion_warning): Use -Wconversion for integer
5326 conversion and -Wfloat-conversion for floating one.
5328 2017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
5330 * c.opt (Wsizeof-pointer-div): New warning option.
5332 2017-06-01 Volker Reichelt <v.reichelt@netcologne.de>
5334 * c.opt (Wcatch-value): New shortcut for Wcatch-value=1.
5335 (Wcatch-value=1): Enable by -Wall.
5337 2017-05-30 David Malcolm <dmalcolm@redhat.com>
5339 * c-format.c (gcc_cxxdiag_char_table): Add 'H' and 'I' to
5341 * c.opt (fdiagnostics-show-template-tree): New option.
5342 (felide-type): New option.
5344 2017-05-25 Volker Reichelt <v.reichelt@netcologne.de>
5346 * c.opt (Wcatch-value=): New C++ warning flag.
5348 2017-05-24 Nathan Sidwell <nathan@acm.org>
5350 * c=common.c (field_decl_cmp, resort_field_decl_cmp): Adjust T
5351 const casts to avoid warning.
5353 2017-05-24 Martin Sebor <msebor@redhat.com>
5356 * c-common.h (unsafe_conversion_p): Add a function argument.
5357 * c-common.c (unsafe_conversion_p): Same.
5358 Add type names and values to diagnostics.
5359 (scalar_to_vector): Adjust.
5360 * c-warn.c (constant_expression_error): Add a function argument.
5361 Add type names and values to diagnostics.
5362 (conversion_warning): Add a function argument.
5363 Add type names and values to diagnostics.
5364 (warnings_for_convert_and_check): Same.
5366 2017-05-19 Jason Merrill <jason@redhat.com>
5368 * c-warn.c (match_case_to_enum_1): Don't warn about enums with no
5371 2017-05-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
5373 * c-format.c (locus): Move out of function scope,
5376 2017-05-19 Nathan Sidwell <nathan@acm.org>
5378 * c-opts.c (class_dump_file, class_dump_flags): Delete.
5379 (c_common_parse_file): Remove class dump handling.
5380 (get_dump_info): Likewise.
5382 2017-05-19 Richard Biener <rguenther@suse.de>
5385 * c-warn.c (strict_aliasing_warning): Do not warn for accesses
5386 to alias-set zero memory.
5388 2017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
5390 * c-format.c (local_tree_type_node): Add GTY attribute.
5392 2017-05-18 Marek Polacek <polacek@redhat.com>
5394 * c-common.c (c_common_type_for_size): Use NULL_TREE instead of 0.
5395 (c_common_fixed_point_type_for_size): Likewise.
5396 (c_common_type_for_mode): Likewise.
5397 (shorten_compare): Likewise.
5398 (c_promoting_integer_type_p): Use false/true instead of 0/1.
5399 * c-pragma.c (maybe_apply_renaming_pragma): Use NULL_TREE instead of 0.
5401 2017-05-18 Marek Polacek <polacek@redhat.com>
5403 * c-common.c (self_promoting_args_p): Change the return type to bool.
5404 Use false/true instead of 0/1.
5405 * c-common.h (self_promoting_args_p): Update.
5407 2017-05-17 Marek Polacek <polacek@redhat.com>
5409 * c-common.c: Use NULL_TREE instead of 0 where appropriate.
5410 * c-warn.c: Likewise.
5412 2017-05-17 Ville Voutilainen <ville.voutilainen@gmail.com>
5414 Implement new C++ intrinsics __is_assignable and __is_constructible.
5415 * c-common.c (__is_assignable, __is_constructible): New.
5416 * c-common.h (RID_IS_ASSIGNABLE, RID_IS_CONSTRUCTIBLE): Likewise.
5418 2017-05-17 Martin Liska <mliska@suse.cz>
5420 * c-common.h: Introduce dump_flags_t type and
5421 use it instead of int type.
5422 * c-gimplify.c (c_genericize): Likewise.
5423 * c-opts.c: Likewise.
5425 2017-05-17 Marek Polacek <polacek@redhat.com>
5427 * c-common.c (c_save_expr): Remove.
5428 (c_common_truthvalue_conversion): Remove a call to c_save_expr.
5429 * c-common.h (c_save_expr): Remove declaration.
5431 2017-05-09 Volker Reichelt <v.reichelt@netcologne.de>
5434 * c-pretty-print.c (c_pretty_printer::expression): Handle MAX_EXPR,
5435 MIN_EXPR, EXACT_DIV_EXPR, RDIV_EXPR, LROTATE_EXPR, RROTATE_EXPR.
5436 (c_pretty_printer::postfix_expression): Handle MAX_EXPR, MIN_EXPR.
5437 (c_pretty_printer::multiplicative_expression): Handle EXACT_DIV_EXPR,
5439 (pp_c_shift_expression): Handle LROTATE_EXPR, RROTATE_EXPR.
5441 2017-05-09 Marek Polacek <polacek@redhat.com>
5444 * c-warn.c (unwrap_c_maybe_const): New.
5445 (warn_logical_operator): Call it.
5447 2017-05-09 Nathan Sidwell <nathan@acm.org>
5449 * c-common.c (c_register_builtin_type): Use pushdecl lang_hook.
5450 * c-common.h (pushdecl_top_level, pushdecl): Don't declare here.
5452 2017-05-08 Martin Sebor <msebor@redhat.com>
5454 PR translation/80280
5455 * c-format.h (struct format_flag_spec): Add new member.
5457 * c-format.c (local_tree_type_node): New global.
5458 (printf_flag_specs, asm_fprintf_flag_spec): Initialize new data.
5459 (gcc_diag_flag_specs, scanf_flag_specs, strftime_flag_specs): Ditto.
5460 (strfmon_flag_specs): Likewise.
5461 (gcc_diag_char_table, gcc_cdiag_char_table): Split up specifiers
5462 with distinct quoting properties.
5463 (gcc_tdiag_char_table, gcc_cxxdiag_char_table): Same.
5464 (flag_chars_t::validate): Add argument and handle bad quoting.
5465 (check_format_info_main): Handle quoting problems.
5466 (init_dynamic_diag_info): Simplify.
5468 2017-05-08 Jason Merrill <jason@redhat.com>
5470 * c-opts.c (c_common_post_options): Update defaults for
5471 flag_abi_version and flag_abi_compat_version.
5473 2017-05-05 David Malcolm <dmalcolm@redhat.com>
5475 * c-common.c (c_cpp_error): Replace report_diagnostic
5476 with diagnostic_report_diagnostic.
5478 2017-05-04 Martin Sebor <msebor@redhat.com>
5480 PR translation/80280
5481 * c-attribs.c (handle_alias_ifunc_attribute): Quote a %D directive.
5482 (handle_weakref_attribute): Same.
5484 2017-05-03 Nathan Sidwell <nathan@acm.org>
5486 Canonicalize canonical type hashing
5487 * c-common.c (complete_array_type): Use type_hash_canon.
5489 2017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
5492 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): Remove
5494 (cilk_install_body_pedigree_operations): Likewise.
5495 * cilk.c (cilk_set_spawn_marker): Mark functions that should be
5497 (cilk_gimplify_call_params_in_spawned_fn): Remove.
5498 (cilk_install_body_pedigree_operations): Likewise.
5499 (gimplify_cilk_spawn): Add EXPR_STMT and CLEANUP_POINT_EXPR
5502 2017-04-27 Jakub Jelinek <jakub@redhat.com>
5505 * c-common.c (complete_array_type): Only hash TYPE_TYPELESS_STORAGE
5506 flag on non-aggregate element types.
5508 2017-04-25 Bernd Edlinger <bernd.edlinger@hotmail.de>
5510 * c-common.c (c_type_hasher, type_hash_table): Remove.
5511 (c_common_get_alias_set): Remove unreachable code.
5512 * c-opts.c (c_common_post_options): Make sure cc1 takes only one file.
5514 2017-04-20 Volker Reichelt <v.reichelt@netcologne.de>
5516 * c.opt (Wextra-semi): New C++ warning flag.
5518 2017-04-20 Jakub Jelinek <jakub@redhat.com>
5521 * c-common.c (complete_array_type): Preserve TYPE_TYPELESS_STORAGE.
5523 2017-04-18 Jakub Jelinek <jakub@redhat.com>
5527 * c-common.c (c_common_type_for_mode): Don't handle
5528 widest_*_literal_type_node here.
5529 c_common_signed_or_unsigned_type): Likewise.
5530 (c_common_nodes_and_builtins): Set widest_*_literal_type_node
5531 to *intTI_type_node or *intDI_type_node depending on whether
5532 TImode is supported by the target or not.
5534 2017-04-10 Martin Liska <mliska@suse.cz>
5537 * c-ubsan.c (ubsan_instrument_shift): Evaluate RHS before
5538 doing an UBSAN check.
5540 2017-04-03 Jonathan Wakely <jwakely@redhat.com>
5542 * c-warn.c (do_warn_double_promotion): Fix typo in comment.
5544 2017-03-31 Jakub Jelinek <jakub@redhat.com>
5547 * c-ubsan.h (ubsan_maybe_instrument_reference): Change argument to
5549 * c-ubsan.c (ubsan_maybe_instrument_reference): Likewise. Handle
5550 not just NOP_EXPR to REFERENCE_TYPE, but also INTEGER_CST with
5553 2017-03-31 David Malcolm <dmalcolm@redhat.com>
5555 PR documentation/78732
5556 * c.opt (Wendif-labels): Fix description to refer to
5557 #else rather than #elif.
5559 2017-03-31 Jakub Jelinek <jakub@redhat.com>
5562 * c-common.h (enum rid): Add RID_IS_AGGREGATE.
5563 * c-common.c (c_common_reswords): Add __is_aggregate trait.
5565 2017-03-27 Jakub Jelinek <jakub@redhat.com>
5568 * c-common.c (c_common_mark_addressable_vec): Don't set
5569 TREE_ADDRESSABLE on DECL_HARD_REGISTER.
5571 2017-03-21 Martin Sebor <msebor@redhat.com>
5574 * c-common.c (set_underlying_type): Mark type used only when
5575 original del is declared unused.
5577 2017-03-10 David Malcolm <dmalcolm@redhat.com>
5579 PR translation/79848
5580 * c-format.c (check_format_string): Simplify uses of "%<%s%>" to
5583 2017-03-10 David Malcolm <dmalcolm@redhat.com>
5586 * c-indentation.c (warn_for_misleading_indentation): Remove parens
5587 from inform's message, so that xgettext can locate it.
5589 2017-03-09 Marek Polacek <polacek@redhat.com>
5593 * c-attribs.c (handle_nonnull_attribute): Save the result of default
5594 conversion to the attribute list.
5596 2017-03-09 Martin Liska <mliska@suse.cz>
5598 * c-ada-spec.c (macro_length): Increment value instead of a pointer.
5600 2017-03-03 Jason Merrill <jason@redhat.com>
5602 * c.opt (Wnoexcept-type): New.
5604 2017-03-02 Richard Biener <rguenther@suse.de>
5607 * c-common.c (c_common_mark_addressable_vec): Look through
5610 2017-02-28 Martin Liska <mliska@suse.cz>
5612 * c.opt: Replace space with tabular for options of <number>
5615 2017-02-28 Martin Liska <mliska@suse.cz>
5617 * c.opt: Fix --help=option -Q for options which are of
5620 2017-02-24 Jakub Jelinek <jakub@redhat.com>
5623 * c-common.c (check_function_restrict): New function.
5624 (check_function_arguments): Add FNDECL argument. Call
5625 check_function_restrict if -Wrestrict.
5626 * c-warn.c (warn_for_restrict): Remove ARGS argument, add ARGARRAY
5627 and NARGS. Use auto_vec for ARG_POSITIONS, simplify.
5628 * c-common.h (check_function_arguments): Add FNDECL argument.
5629 (warn_for_restrict): Remove ARGS argument, add ARGARRAY and NARGS.
5631 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
5633 * c-ada-spec.c (dump_ada_function_declaration): Add comment about the
5634 treatment of parameters with pointer-to-tagged type and tidy up.
5635 (print_ada_methods): Remove the special treatment of C++ static member
5638 2017-02-22 Martin Liska <mliska@suse.cz>
5640 * c.opt: Replace inequality signs with square brackets
5643 2017-02-21 Jakub Jelinek <jakub@redhat.com>
5646 * c-attribs.c (handle_mode_attribute): Use build_qualified_type to
5649 2017-02-17 Joseph Myers <joseph@codesourcery.com>
5651 * c-cppbuiltin.c (builtin_define_float_constants): Define
5652 __DECIMAL_DIG__ to the value for long double.
5654 2017-02-15 Marek Polacek <polacek@redhat.com>
5657 * c-warn.c (do_warn_double_promotion): Don't warn if an invalid
5658 conversion has occured.
5660 2017-01-24 David Malcolm <dmalcolm@redhat.com>
5662 * c-common.c (c_common_reswords): Add "__RTL".
5663 * c-common.h (enum rid): Add RID_RTL.
5665 2017-01-20 Marek Polacek <polacek@redhat.com>
5668 * c-common.h (do_warn_duplicated_branches_r): Declare.
5669 * c-gimplify.c (c_genericize): Walk the function tree calling
5670 do_warn_duplicated_branches_r.
5671 * c-warn.c (expr_from_macro_expansion_r): New.
5672 (do_warn_duplicated_branches): New.
5673 (do_warn_duplicated_branches_r): New.
5674 * c.opt (Wduplicated-branches): New option.
5676 2017-01-17 David Malcolm <dmalcolm@redhat.com>
5679 * c-indentation.c (warn_for_misleading_indentation): Use the past
5680 subjunctive in the note.
5682 2017-01-17 Aldy Hernandez <aldyh@redhat.com>
5685 * array-notation-common.c (cilkplus_extract_an_triplets): Convert
5686 start type to integer_type.
5688 2017-01-16 Jakub Jelinek <jakub@redhat.com>
5691 * c.opt (gen-decls): Add Driver flag.
5693 2017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
5696 2017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
5699 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
5701 2017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
5704 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
5706 2017-01-12 Martin Sebor <msebor@redhat.com>
5708 (-Wformat-overflow): ...to this.
5710 2017-01-11 Martin Sebor <msebor@redhat.com>
5713 * c.opt (-Walloca-larger-than, -Wformat-length, -Wformat-truncation):
5714 Also enable for LTO.
5716 2017-01-10 Jason Merrill <jason@redhat.com>
5718 Implement P0195R2, C++17 variadic using.
5719 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_variadic_using.
5721 2017-01-09 Jakub Jelinek <jakub@redhat.com>
5723 PR translation/79019
5724 PR translation/79020
5725 * c.opt (Wnormalized=): Fix typo in description.
5727 2017-01-08 Martin Sebor <msebor@redhat.com>
5730 * c.opt (-Wformat-truncation): New option.
5732 2017-01-06 Alexandre Oliva <aoliva@redhat.com>
5734 * c-pretty-print.c (pp_c_tree_decl_identifier): Convert 16-bit
5735 value to unsigned short to fit in 4 hex digits without
5738 2017-01-05 Eric Botcazou <ebotcazou@adacore.com>
5740 * c.opt (fsso-struct): Add 'native' value.
5742 2017-01-05 Martin Liska <mliska@suse.cz>
5745 * c-opts.c (c_common_post_options): Reject '-' filename for a precompiled
5748 2017-01-04 Marek Polacek <polacek@redhat.com>
5751 * c.opt (Wpointer-compare): New option.
5753 2017-01-04 Jakub Jelinek <jakub@redhat.com>
5756 * c.opt (fsso-struct=): Add RejectNegative.
5758 2017-01-01 Jakub Jelinek <jakub@redhat.com>
5760 Update copyright years.
5762 2016-12-29 Martin Liska <mliska@suse.cz>
5765 * c.opt (strong-eval-order): Add RejectNegative keyword.
5767 2016-12-22 Jason Merrill <jason@redhat.com>
5769 Implement P0522R0, matching of template template arguments.
5770 * c-cppbuiltin.c (c_cpp_builtins): Define
5771 __cpp_template_template_args.
5773 2016-12-21 Jakub Jelinek <jakub@redhat.com>
5776 * c-common.c (struct nonnull_arg_ctx): New type.
5777 (check_function_nonnull): Return bool instead of void. Use
5778 nonnull_arg_ctx as context rather than just location_t.
5779 (check_nonnull_arg): Adjust for the new context type, set
5780 warned_p to true if a warning has been diagnosed.
5781 (check_function_arguments): Return bool instead of void.
5782 * c-common.h (check_function_arguments): Adjust prototype.
5784 2016-12-21 Jason Merrill <jason@redhat.com>
5786 * c.opt (-fnew-ttp-matching): New flag.
5787 * c-opts.c (c_common_post_options): Default on if -std=c++1z.
5789 2016-12-14 Martin Jambor <mjambor@suse.cz>
5791 * c-omp.c: Include omp-general.h instead of omp-low.h.
5792 (c_finish_oacc_wait): Adjusted call to find_omp_clause to use its new
5795 2016-12-14 Martin Sebor <msebor@redhat.com>
5798 * c-common.c (check_nonnull_arg): Disable when optimization
5801 2016-12-12 Marek Polacek <polacek@redhat.com>
5804 * c-common.c (attribute_fallthrough_p): Return false for
5807 2016-12-08 Martin Sebor <msebor@redhat.com>
5810 * c.opt (-Walloc-zero, -Walloc-size-larger-than): New options.
5812 2016-12-08 Martin Sebor <msebor@redhat.com>
5815 * c-pretty-print (pp_c_integer_constant): Avoid formatting type
5818 2016-12-07 Martin Sebor <msebor@redhat.com>
5824 * c.opt (-Wstringop-overflow): New option.
5826 2016-12-02 Maxim Ostapenko <m.ostapenko@samsung.com>
5828 * c-attribs.c (asan odr indicator): New attribute.
5829 (handle_asan_odr_indicator_attribute): New function.
5831 2016-11-26 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5833 * c-common.c (c_common_nodes_and_builtins): Remove initialization of
5836 2016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
5838 * c-common.c (excess_precision_mode_join): New.
5839 (c_ts18661_flt_eval_method): New.
5840 (c_c11_flt_eval_method): Likewise.
5841 (c_flt_eval_method): Likewise.
5842 * c-common.h (excess_precision_mode_join): New.
5843 (c_flt_eval_method): Likewise.
5844 * c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): New.
5845 (cpp_iec_559_value): Call it.
5846 (c_cpp_builtins): Modify logic for __LIBGCC_*_EXCESS_PRECISION__,
5847 call c_flt_eval_method to set __FLT_EVAL_METHOD__ and
5848 __FLT_EVAL_METHOD_TS_18661_3__.
5850 2016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
5852 * c-opts.c (c_common_post_options): Add logic to handle the default
5853 case for -fpermitted-flt-eval-methods.
5855 2016-11-23 Paolo Bonzini <bonzini@gnu.org>
5857 * c.opt (Wexpansion-to-defined): New.
5859 2016-11-23 Jakub Jelinek <jakub@redhat.com>
5862 * c-pragma.c (handle_pragma_target): Don't replace
5863 current_target_pragma, but chainon the new args to the current one.
5865 2016-11-22 Nathan Sidwell <nathan@acm.org>
5867 * array-notation-common.c (cilkplus_extract_an_trplets): Fix
5868 indentation and formatting.
5870 2016-11-21 Martin Sebor <msebor@redhat.com>
5872 * c.opt (-fprintf-return-value): Enable by default.
5874 2016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
5877 * c.opt (-Wbuiltin-declaration-mismatch): New warning.
5878 * c-common.c (c_common_nodes_and_builtins): Initialize
5879 const_tm_ptr_type_node.
5881 2016-11-16 Marek Polacek <polacek@redhat.com>
5884 * c-common.c (c_add_case_label): Turn error_at calls into inform.
5886 2016-11-14 Jakub Jelinek <jakub@redhat.com>
5888 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_structured_bindings.
5890 2016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
5891 Richard Biener <rguenther@suse.de>
5893 * c-common.h (c_common_resword): Add RID_GIMPLE, RID_PHI types.
5894 * c-common.h (enum rid): Add RID_GIMPLE, RID_PHI.
5895 * c.opt (fgimple): New option.
5897 2016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5900 * c-common.h (warn_for_restrict): Declare.
5901 * c-warn.c: Include gcc-rich-location.h.
5902 (warn_for_restrict): New function.
5903 * c-format.c (gcc_tdiag_char_table): Add entry for "Z" specifier.
5904 (gcc_cdiag_char_table): Likewise.
5905 (gcc_cxxdiag_char_table): Likewise.
5906 * c.opt (Wrestrict): New option.
5908 2016-11-13 Eric Botcazou <ebotcazou@adacore.com>
5910 * c-ada-spec.c (print_ada_declaration): For typedef declarations, look
5911 for nested types only if the type is a record or union and dump SLOC.
5913 2016-11-09 Jason Merrill <jason@redhat.com>
5915 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_template_auto.
5917 2016-11-09 Jakub Jelinek <jakub@redhat.com>
5919 * c-ubsan.c (ubsan_instrument_shift): Handle split
5920 -fsanitize=shift-base and -fsanitize=shift-exponent.
5922 2016-11-07 Jason Merrill <jason@redhat.com>
5924 * c.opt (Wc++1z-compat): New.
5925 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_noexcept_function_type.
5927 2016-11-07 Martin Liska <mliska@suse.cz>
5929 * c-warn.c (warn_for_unused_label): Save all labels used
5930 in goto or in &label.
5932 2016-11-03 Jason Merrill <jason@redhat.com>
5934 * c-cppbuiltin.c (c_cpp_builtins): Correct
5935 __cpp_inheriting_constructors.
5937 2016-11-01 Jason Merrill <jason@redhat.com>
5939 * c-cppbuiltin.c (c_cpp_builtins): Update
5940 __cpp_inheriting_constructors.
5942 * c.opt (-fnew-inheriting-ctors): New.
5943 * c-opts.c: Default to on for ABI 11+.
5945 2016-10-31 Jakub Jelinek <jakub@redhat.com>
5948 * c.opt (fext-numeric-literals): Add Var and Init.
5949 * c-opts.c (c_common_handle_option): Don't clear
5950 cpp_opts->ext_numeric_literals for -std=c++{11,14,1z}.
5951 (c_common_post_options): Clear it here if not set
5954 2016-10-28 Aldy Hernandez <aldyh@redhat.com>
5957 * c-pretty-print.c (simple_type_specifier): Do not dereference `t'
5960 2016-10-25 Jakub Jelinek <jakub@redhat.com>
5962 * c-common.h (enum rid): Add RID_BUILTIN_LAUNDER.
5963 * c-common.c (c_common_reswords): Add __builtin_launder.
5965 2016-10-24 Bernd Edlinger <bernd.edlinger@hotmail.de>
5967 * c-common.c (c_common_truthvalue_conversion): Warn for
5968 multiplications in boolean context. Fix the quoting of '<<' and '<'
5969 in the shift warning.
5971 2016-10-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
5973 * c-common.c (c_common_truthvalue_conversion): Fix the comment.
5975 2016-10-20 Jason Merrill <jason@redhat.com>
5977 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_concepts value.
5979 2016-10-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
5981 * c-common.c (c_common_truthvalue_conversion): Warn only for signed
5982 integer shift ops in boolean context.
5984 2016-10-18 Aldy Hernandez <aldyh@redhat.com>
5986 * c.opt (Walloca): New.
5987 (Walloca-larger-than=): New.
5988 (Wvla-larger-than=): New.
5990 2016-10-17 Marek Polacek <polacek@redhat.com>
5992 * c-warn.c (find_array_ref_with_const_idx_r): Remove parameter names.
5993 Return immediately when finding a match.
5994 (warn_tautological_cmp): Remove a boolean variable that is no longer
5997 2016-10-17 Marek Polacek <polacek@redhat.com>
5999 * c-attribs.c: New file.
6000 * c-common.c: Move attributes handling to c-attribs.c.
6001 (get_nonnull_operand): No longer static.
6002 * c-common.h: Move the declarations from c-attribs.c to its own section.
6004 2016-10-14 Jason Merrill <jason@redhat.com>
6006 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_aggregate_bases
6007 and __cpp_deduction_guides.
6009 2016-10-13 Jason Merrill <jason@redhat.com>
6011 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_inline_variables.
6013 2016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
6015 * c-cppbuiltin.c: Include memmodel.h.
6016 * c-opts.c: Likewise.
6017 * c-pragma.c: Likewise.
6018 * c-warn.c: Likewise.
6020 2016-10-12 Jakub Jelinek <jakub@redhat.com>
6022 * c.opt (Wextra): Add as C/C++/ObjC/ObjC++ option.
6023 (Wimplicit-fallthrough=): Enable for these languages by -Wextra.
6024 * c-opts.c (sanitize_cpp_opts): Initialize
6025 cpp_opts->cpp_warn_implicit_fallthrough.
6027 2016-10-11 Marek Polacek <polacek@redhat.com>
6029 * c-common.c (warning_candidate_p): Change the return type to bool
6030 and return true/false instead of 1/0.
6031 (vector_mode_valid_p): Likewise.
6033 2016-10-11 Marek Polacek <polacek@redhat.com>
6035 * c-common.c (fold_for_warn): No longer static.
6036 (bool_promoted_to_int_p): Likewise.
6037 (c_common_get_narrower): Likewise.
6038 (constant_expression_warning): Move to c-warn.c.
6039 (constant_expression_error): Likewise.
6040 (overflow_warning): Likewise.
6041 (warn_logical_operator): Likewise.
6042 (find_array_ref_with_const_idx_r): Likewise.
6043 (warn_tautological_cmp): Likewise.
6044 (expr_has_boolean_operands_p): Likewise.
6045 (warn_logical_not_parentheses): Likewise.
6046 (warn_if_unused_value): Likewise.
6047 (strict_aliasing_warning): Likewise.
6048 (sizeof_pointer_memaccess_warning): Likewise.
6049 (check_main_parameter_types): Likewise.
6050 (conversion_warning): Likewise.
6051 (warnings_for_convert_and_check): Likewise.
6052 (match_case_to_enum_1): Likewise.
6053 (match_case_to_enum): Likewise.
6054 (c_do_switch_warnings): Likewise.
6055 (warn_for_omitted_condop): Likewise.
6056 (readonly_error): Likewise.
6057 (lvalue_error): Likewise.
6058 (invalid_indirection_error): Likewise.
6059 (warn_array_subscript_with_type_char): Likewise.
6060 (warn_about_parentheses): Likewise.
6061 (warn_for_unused_label): Likewise.
6062 (warn_for_div_by_zero): Likewise.
6063 (warn_for_memset): Likewise.
6064 (warn_for_sign_compare): Likewise.
6065 (do_warn_double_promotion): Likewise.
6066 (do_warn_unused_parameter): Likewise.
6067 (record_locally_defined_typedef): Likewise.
6068 (maybe_record_typedef_use): Likewise.
6069 (maybe_warn_unused_local_typedefs): Likewise.
6070 (maybe_warn_bool_compare): Likewise.
6071 (maybe_warn_shift_overflow): Likewise.
6072 (warn_duplicated_cond_add_or_warn): Likewise.
6073 (diagnose_mismatched_attributes): Likewise.
6074 * c-common.h: Move the declarations from c-warn.c to its own section.
6075 * c-warn.c: New file.
6077 2016-10-08 Jason Merrill <jason@redhat.com>
6079 * c-common.c (c_common_truthvalue_conversion): Don't distribute
6080 into COND_EXPR in C++.
6082 2016-10-08 Jakub Jelinek <jakub@redhat.com>
6084 * c-lex.c (c_lex_with_flags) <case CPP_COMMENT>: For CPP_COMMENT
6085 token with PREV_FALLTHROUGH, skip all following CPP_PADDING and
6086 CPP_COMMENT tokens and set add_flags to PREV_FALLTHROUGH afterwards.
6088 2016-10-07 Jakub Jelinek <jakub@redhat.com>
6090 Implement LWG2296 helper intrinsic
6091 * c-common.h (enum rid): Add RID_ADDRESSOF.
6092 * c-common.c (c_common_reswords): Add __builtin_addressof.
6094 2016-10-07 Bernd Edlinger <bernd.edlinger@hotmail.de>
6097 * c-common.c (c_common_truthvalue_conversion): Warn also for
6098 suspicious enum values in boolean context.
6100 2016-10-06 Jakub Jelinek <jakub@redhat.com>
6102 Implement P0258R2 - helper for C++17
6103 std::has_unique_object_representations trait
6104 * c-common.h (enum rid): Add RID_HAS_UNIQUE_OBJ_REPRESENTATIONS.
6105 * c-common.c (c_common_reswords): Add
6106 __has_unique_object_representations.
6108 2016-10-05 Jakub Jelinek <jakub@redhat.com>
6111 * c-ubsan.c (ubsan_instrument_return): Don't call
6112 initialize_sanitizer_builtins here.
6114 2016-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
6116 * c-common.c (c_common_truthvalue_conversion): Warn also for suspicious
6117 conditional expression in boolean context when only one arm is
6120 2016-10-05 Jakub Jelinek <jakub@redhat.com>
6123 * c-ubsan.c (ubsan_instrument_shift): Return NULL_TREE if type0
6126 * c-common.c (c_common_reswords): Update comment for C++11.
6128 2016-10-04 Jason Merrill <jason@redhat.com>
6130 * c-common.c (make_tree_vector_from_ctor): New.
6131 * c-common.h: Declare it.
6133 2016-10-04 Jakub Jelinek <jakub@redhat.com>
6135 * c-cppbuiltin.c (c_cpp_builtins): Don't define
6136 __LIBGCC_JCR_SECTION_NAME__.
6138 2016-10-03 Bernd Edlinger <bernd.edlinger@hotmail.de>
6140 * c-common.c (c_common_truthvalue_conversion): Warn for suspicious
6141 left shift in boolean context.
6143 2016-09-29 Jakub Jelinek <jakub@redhat.com>
6145 Implement P0001R1 - C++17 removal of register storage class specifier
6146 * c.opt (Wregister): New warning.
6147 * c-opts.c (c_common_post_options): Enable -Wregister by
6150 2016-09-29 James Greenhalgh <james.greenhalgh@arm.com>
6152 * c-opts.c (c_common_post_options): Remove special case for
6153 TARGET_FLT_EVAL_METHOD_NON_DEFAULT with -fexcess-precision=standard
6156 2016-09-27 Jakub Jelinek <jakub@redhat.com>
6158 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_capture_star_this for
6161 * c-ada-spec.c (print_ada_declaration): Remove break after return.
6163 2016-09-26 Thomas Preud'homme <thomas.preudhomme@arm.com>
6165 * c-common.c: Include memmodel.h.
6167 2016-09-26 Marek Polacek <polacek@redhat.com>
6169 * c-lex.c (c_common_has_attribute): Handle attribute fallthrough.
6171 2016-09-26 Marek Polacek <polacek@redhat.com>
6174 * c-common.c (c_common_attribute_table): Add fallthrough attribute.
6175 (handle_fallthrough_attribute): New function.
6176 (attribute_fallthrough_p): New function.
6177 * c-common.h (attribute_fallthrough_p): Declare.
6179 2016-09-24 Marek Polacek <polacek@redhat.com>
6182 * c.opt (Wbool-operation): New.
6184 2016-09-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
6186 * c-common.c (c_common_truthvalue_conversion): Inhibit
6187 Wint-in-bool-context warning with from_macro_definition_at.
6188 Mention the expression will always evaluate to true.
6190 2016-09-21 Martin Sebor <msebor@redhat.com>
6193 * c.opt (fprintf-return-value): Temporarily initialize to zero
6194 to unblock bootstrap failures.
6196 2016-09-21 Jakub Jelinek <jakub@redhat.com>
6199 * c.opt (Waligned-new=): Add RejectNegative.
6200 (faligned-new=): Likewise. Spelling fix - change
6201 aligned_new_threshhold to aligned_new_threshold.
6202 * c-cppbuiltin.c (c_cpp_builtins): Change aligned_new_threshhold
6203 to aligned_new_threshold.
6205 2016-09-20 Martin Sebor <msebor@redhat.com>
6208 * c.opt: Add -Wformat-length and -fprintf-return-value.
6210 2016-09-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
6213 * c.opt (Wint-in-bool-context): New warning.
6214 * c-common.c (c_common_truthvalue_conversion): Warn on integer
6215 constants in boolean context.
6217 2016-09-19 Joseph Myers <joseph@codesourcery.com>
6219 * c-common.c (max_align_t_align): Also consider alignment of
6222 2016-09-15 Jason Merrill <jason@redhat.com>
6224 * c-common.c (check_cxx_fundamental_alignment_constraints): Check
6227 2016-09-14 Jason Merrill <jason@redhat.com>
6229 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
6230 limit FIELD_DECL, either.
6232 2016-09-14 Marek Polacek <polacek@redhat.com>
6234 * c-common.c (c_common_truthvalue_conversion): Use false instead of 0.
6235 * c-common.h (build_unary_op): Change nonconvert parameter type to bool.
6236 * c-omp.c (c_finish_omp_atomic): Use false instead of 0.
6238 2016-09-13 David Malcolm <dmalcolm@redhat.com>
6240 * c-common.c (warn_logical_not_parentheses): Replace
6241 rich_location::add_fixit_insert calls with add_fixit_insert_before
6242 and add_fixit_insert_after, eliminating the "next_loc" calculation.
6244 2016-09-13 Jason Merrill <jason@redhat.com>
6245 Tom de Vries <tom@codesourcery.com>
6248 * c-common.c (set_underlying_type): Don't treat array as builtin type.
6250 2016-09-13 Jason Merrill <jason@redhat.com>
6252 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
6255 2016-09-12 Jason Merrill <jason@redhat.com>
6257 * c-common.c (check_cxx_fundamental_alignment_constraints): Fix
6258 bit/byte confusion, allow large alignment for types.
6260 2016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
6263 * c-common.c (warn_for_omitted_condop): Also warn for boolean data.
6265 2016-09-12 David Malcolm <dmalcolm@redhat.com>
6268 * c-format.c (argument_parser::check_argument_type): Add params
6269 "type_start" and "conversion_char". Use the former to generate
6270 offset_to_type_start and pass it and conversion_char to
6272 (check_format_info_main): Capture the start of the type
6273 information as "type_start", and pass it an format_char
6274 to arg_parser.check_argument_type.
6275 (check_format_types): Provide an example in the leading comment.
6276 Add params "offset_to_type_start" and "conversion_char"; pass
6277 them to format_type_warning calls.
6278 (test_get_modifier_for_format_len): Likewise.
6279 (matching_type_p): New function.
6280 (get_format_for_type): Add param "conversion_char" and move
6281 implementation into...
6282 (get_format_for_type_1): ...new function, called twice.
6283 Use new function matching_type_p rather than checking for
6284 TYPE_CANONICAL equality.
6285 (get_corrected_substring): New function.
6286 (format_type_warning): Provide an example in the leading comment.
6287 Add params "offset_to_type_start" and "conversion_char". Replace
6288 call to get_format_for_type with call to get_corrected_substring
6289 and move rejection of hints for widths/precisions there.
6290 (assert_format_for_type_streq): Add param "conversion_char".
6291 (ASSERT_FORMAT_FOR_TYPE_STREQ): Add param CONVERSION_CHAR.
6292 (test_get_format_for_type_printf): Add conversion chars to the
6293 tests, adding coverage for various combinations of integer
6294 vs double conversions, and for preserving octal and hexadecimal
6296 (test_get_format_for_type_scanf): Add conversion chars to the
6299 2016-09-10 Tom de Vries <tom@codesourcery.com>
6302 * c-common.c (build_va_arg): Handle more strict
6303 targetm.canonical_va_list_type. Replace first argument type error with
6306 2016-09-09 Martin Sebor <msebor@redhat.com>
6310 * c-format.c (argument_parser::find_format_char_info): Use %qc
6311 format directive unconditionally.
6313 2016-09-09 Jason Merrill <jason@redhat.com>
6315 Implement C++17 new of over-aligned types.
6316 * c.opt: Add -faligned-new and -Waligned-new.
6317 * c-common.c (max_align_t_align): Split out from...
6318 (cxx_fundamental_alignment_p): ...here.
6319 * c-common.h: Declare it.
6320 * c-cppbuiltin.c (c_cpp_builtins): Handle aligned new.
6322 2016-09-09 Joseph Myers <joseph@codesourcery.com>
6324 * c-cppbuiltin.c (builtin_define_type_width): New function.
6325 (builtin_define_stdint_macros, c_cpp_builtins): Define type width
6328 2016-09-07 David Malcolm <dmalcolm@redhat.com>
6330 * c-common.c (get_cpp_ttype_from_string_type): Handle being passed
6332 (substring_loc::get_location): Move to substring-locations.c,
6333 keeping implementation as...
6334 (c_get_substring_location): New function, from the above, reworked
6335 to use accessors rather than member lookup.
6336 * c-common.h (class substring_loc): Move to substring-locations.h,
6337 replacing with a forward decl.
6338 (c_get_substring_location): New decl.
6339 * c-format.c: Include "substring-locations.h".
6340 (format_warning_va): Move to substring-locations.c.
6341 (format_warning_at_substring): Likewise.
6343 2016-09-06 Martin Sebor <msebor@redhat.com>
6346 * c-format.c (check_function_format): Avoid issuing warnings for
6347 functions unless they call format functions with non-constant
6350 2016-09-06 Richard Biener <rguenther@suse.de>
6353 * c-common.c (c_common_mark_addressable_vec): Handle
6354 COMPOUND_LITERAL_EXPR.
6356 2016-09-05 Marek Polacek <polacek@redhat.com>
6359 * c-common.c (bool_promoted_to_int_p): New function.
6360 (expr_has_boolean_operands_p): New function.
6361 (warn_logical_not_parentheses): Return if expr_has_boolean_operands_p.
6362 (maybe_warn_bool_compare): Use bool_promoted_to_int_p.
6364 2016-09-04 Tom de Vries <tom@codesourcery.com>
6367 2016-08-29 Tom de Vries <tom@codesourcery.com>
6369 * c-common.c (build_va_arg): Replace first argument type error
6372 2016-09-02 Jakub Jelinek <jakub@redhat.com>
6375 * c-omp.c (c_finish_omp_atomic): Reject _Atomic qualified expressions.
6376 (c_finish_omp_for): Reject _Atomic qualified iterators.
6378 2016-09-01 Martin Sebor <msebor@redhat.com>
6380 * c-ada-spec.c (dump_ada_function_declaration): Increase buffer
6381 size to guarantee it fits the output of the formatted function
6382 regardless of its arguments.
6384 2016-09-01 Marek Polacek <polacek@redhat.com>
6387 * c-common.c (resolve_overloaded_builtin): Fix formatting. Add
6390 2016-08-29 Marek Polacek <polacek@redhat.com>
6393 * c-common.c (warn_logical_not_parentheses): Don't warn for
6394 a comparison or a logical operator.
6396 2016-08-29 Tom de Vries <tom@codesourcery.com>
6398 * c-common.c (build_va_arg): Fix type comparison assert.
6400 2016-08-29 Tom de Vries <tom@codesourcery.com>
6402 * c-common.c (build_va_arg): Replace first argument type error
6405 2016-08-29 Tom de Vries <tom@codesourcery.com>
6408 * c-common.c (build_va_arg): Add first argument error. Build va_arg
6409 with error_mark_node as va_list instead of with illegal va_list.
6411 2016-08-25 Marek Polacek <polacek@redhat.com>
6412 David Malcolm <dmalcolm@redhat.com>
6414 * c-common.c (warn_logical_not_parentheses): Print fixit hints.
6415 * c-common.h (warn_logical_not_parentheses): Update declaration.
6417 2016-08-22 Marek Polacek <polacek@redhat.com>
6420 * c-common.c (warn_for_memset): Check type for null.
6422 2016-08-22 Joseph Myers <joseph@codesourcery.com>
6424 * c-cppbuiltin.c (c_cpp_builtins): Check _FloatN and
6425 _FloatNx types for suffixes for built-in functions.
6427 2016-08-19 Joseph Myers <joseph@codesourcery.com>
6430 * c-common.h (RID_FLOAT16, RID_FLOATN_NX_FIRST, RID_FLOAT32)
6431 (RID_FLOAT64, RID_FLOAT128, RID_FLOAT32X, RID_FLOAT64X)
6432 (RID_FLOAT128X): New enum rid values.
6433 (CASE_RID_FLOATN_NX): New macro.
6434 * c-common.c (c_common_reswords): Add _FloatN and _FloatNx
6436 (c_common_type_for_mode): Check for _FloatN and _FloatNx and
6437 corresponding complex types.
6438 (c_common_nodes_and_builtins): For non-C++, register _FloatN and
6439 _FloatNx and corresponding complex types.
6440 (keyword_begins_type_specifier): Use CASE_RID_FLOATN_NX.
6441 * c-cppbuiltin.c (builtin_define_float_constants): Check _FloatN
6442 and _FloatNx types for the widest type for determining
6443 DECIMAL_DIG. Define __LDBL_DECIMAL_DIG__ as well as
6444 __DECIMAL_DIG__ for long double. Handle FMA_SUFFIX being NULL.
6445 (c_cpp_builtins): Call builtin_define_float_constants for _FloatN
6447 * c-lex.c (interpret_float): Handle _FloatN and _FloatNx
6449 * c-pretty-print.c (pp_c_floating_constant): Handle _FloatN and
6452 2016-08-18 David Malcolm <dmalcolm@redhat.com>
6454 * c-opts.c (c_diagnostic_finalizer): Update for change to
6455 diagnostic_show_locus.
6457 2016-08-18 David Malcolm <dmalcolm@redhat.com>
6459 * c-common.c: Include "spellcheck.h".
6460 (cb_get_suggestion): New function.
6461 * c-common.h (cb_get_suggestion): New decl.
6462 * c-lex.c (init_c_lex): Initialize cb->get_suggestion to
6465 2016-08-18 Marek Polacek <polacek@redhat.com>
6468 * c-common.c (get_atomic_generic_size): Disallow pointer-to-function
6471 2016-08-16 David Malcolm <dmalcolm@redhat.com>
6474 * c-common.c (substring_loc::get_range): Rename to...
6475 (substring_loc::get_location): ...this, converting param from a
6476 source_range * to a location_t *. Call
6477 get_source_location_for_substring rather than
6478 get_source_range_for_substring, and pass in m_caret_idx.
6479 * c-common.h (substring_loc::substring_loc): Add param "caret_idx".
6480 (substring_loc::get_range): Replace with...
6481 (substring_loc::get_location): ...this.
6482 (substring_loc::set_caret_index): New method.
6483 (substring_loc): Add field m_caret_idx.
6484 * c-format.c (format_warning_va): Update for above changes.
6485 Rename local "substring_loc" to "fmt_substring_loc" to avoid
6486 clashing with type name.
6487 (format_warning_at_char): Add caret_idx param to substring_loc ctor.
6488 (check_argument_type): Likewise.
6489 (format_type_warning): Rename param "fmt_loc" to "whole_fmt_loc"
6490 Use a copy when emitting warnings, setting the caret index from TYPE.
6492 2016-08-16 Eric Botcazou <ebotcazou@adacore.com>
6493 Arnaud Charlet <charlet@adacore.com>
6495 * c-ada-spec.c (dump_number): New function.
6496 (handle_escape_character): Likewise.
6497 (print_ada_macros): Add handling of constant integers and strings.
6499 2016-08-12 Marek Polacek <polacek@redhat.com>
6502 * c-common.c (scalar_to_vector): Adjust fall through comment.
6503 * c-opts.c (c_common_handle_option): Likewise.
6504 * c-pragma.c (handle_pragma_pack): Add FALLTHRU.
6505 * c-pretty-print.c (c_pretty_printer::postfix_expression): Adjust
6506 fall through comment.
6507 * cilk.c (extract_free_variables): Add FALLTHRU.
6509 2016-08-10 Jason Merrill <jason@redhat.com>
6511 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_if_constexpr.
6513 2016-08-09 Jason Merrill <jason@redhat.com>
6515 * c-common.c (c_common_attribute_table): vector_size affects type
6518 2016-08-09 Marek Polacek <polacek@redhat.com>
6521 * c-ada-spec.c (dump_generic_ada_node): Add return.
6523 2016-08-09 Jason Merrill <jason@redhat.com>
6525 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_constexpr for
6526 C++17 constexpr lambdas.
6528 2016-08-08 David Malcolm <dmalcolm@redhat.com>
6531 * c-common.h (selftest::c_format_c_tests): New declaration.
6532 (selftest::run_c_tests): New declaration.
6533 * c-format.c: Include "selftest.h.
6534 (format_warning_va): Add param "corrected_substring" and use
6535 it to add a replacement fix-it hint.
6536 (format_warning_at_substring): Likewise.
6537 (format_warning_at_char): Update for new param of
6539 (argument_parser::check_argument_type): Pass "fki" to
6541 (check_format_types): Add param "fki" and pass it to
6542 format_type_warning.
6543 (deref_n_times): New function.
6544 (get_modifier_for_format_len): New function.
6545 (selftest::test_get_modifier_for_format_len): New function.
6546 (get_format_for_type): New function.
6547 (format_type_warning): Add param "fki" and use it to attempt
6548 to provide hints for argument types when calling
6549 format_warning_at_substring.
6550 (selftest::get_info): New function.
6551 (selftest::assert_format_for_type_streq): New function.
6552 (ASSERT_FORMAT_FOR_TYPE_STREQ): New macro.
6553 (selftest::test_get_format_for_type_printf): New function.
6554 (selftest::test_get_format_for_type_scanf): New function.
6555 (selftest::c_format_c_tests): New function.
6557 2016-08-08 David Malcolm <dmalcolm@redhat.com>
6560 * c-format.c: Include "diagnostic.h".
6561 (location_column_from_byte_offset): Delete.
6562 (location_from_offset): Delete.
6563 (format_warning_va): New function.
6564 (format_warning_at_substring): New function.
6565 (format_warning_at_char): New function.
6566 (check_format_arg): Capture location of format_tree and pass to
6567 check_format_info_main.
6568 (argument_parser): Add fields "start_of_this_format" and
6569 "format_string_cst".
6570 (flag_chars_t::validate): Add param "format_string_cst". Convert
6571 warning_at call using location_from_offset to call to
6572 format_warning_at_char.
6573 (argument_parser::argument_parser): Add param "format_string_cst_"
6574 and use use it to initialize field "format_string_cst".
6575 Initialize new field "start_of_this_format".
6576 (argument_parser::read_format_flags): Convert warning_at call
6577 using location_from_offset to a call to format_warning_at_char.
6578 (argument_parser::read_any_format_left_precision): Likewise.
6579 (argument_parser::read_any_format_precision): Likewise.
6580 (argument_parser::read_any_other_modifier): Likewise.
6581 (argument_parser::find_format_char_info): Likewise, in three places.
6582 (argument_parser::parse_any_scan_set): Likewise, in one place.
6583 (argument_parser::handle_conversions): Likewise, in two places.
6584 (argument_parser::check_argument_type): Add param "fmt_param_loc"
6585 and use it to make a substring_loc. Pass the latter to
6587 (check_format_info_main): Add params "fmt_param_loc" and
6588 "format_string_cst". Convert warning_at calls using
6589 location_from_offset to calls to format_warning_at_char. Pass the
6590 new params to the arg_parser ctor. Pass "format_string_cst" to
6591 flag_chars.validate. Pass "fmt_param_loc" to
6592 arg_parser.check_argument_type.
6593 (check_format_types): Convert first param from a location_t
6594 to a const substring_loc & and rename to "fmt_loc". Attempt
6595 to extract the range of the relevant parameter and pass it
6596 to format_type_warning.
6597 (format_type_warning): Convert first param from a location_t
6598 to a const substring_loc & and rename to "fmt_loc". Add
6599 params "param_range" and "type". Replace calls to warning_at
6600 with calls to format_warning_at_substring.
6602 2016-08-08 David Malcolm <dmalcolm@redhat.com>
6604 * c-format.c (class flag_chars_t): New class.
6605 (struct length_modifier): New struct.
6606 (class argument_parser): New class.
6607 (flag_chars_t::flag_chars_t): New ctor.
6608 (flag_chars_t::has_char_p): New method.
6609 (flag_chars_t::add_char): New method.
6610 (flag_chars_t::validate): New method.
6611 (flag_chars_t::get_alloc_flag): New method.
6612 (flag_chars_t::assignment_suppression_p): New method.
6613 (argument_parser::argument_parser): New ctor.
6614 (argument_parser::read_any_dollar): New method.
6615 (argument_parser::read_format_flags): New method.
6616 (argument_parser::read_any_format_width): New method.
6617 (argument_parser::read_any_format_left_precision): New method.
6618 (argument_parser::read_any_format_precision): New method.
6619 (argument_parser::handle_alloc_chars): New method.
6620 (argument_parser::read_any_length_modifier): New method.
6621 (argument_parser::read_any_other_modifier): New method.
6622 (argument_parser::find_format_char_info): New method.
6623 (argument_parser::validate_flag_pairs): New method.
6624 (argument_parser::give_y2k_warnings): New method.
6625 (argument_parser::parse_any_scan_set): New method.
6626 (argument_parser::handle_conversions): New method.
6627 (argument_parser::check_argument_type): New method.
6628 (check_format_info_main): Introduce classes argument_parser
6629 and flag_chars_t, moving the code within the loop into methods
6630 of these classes. Make various locals "const".
6632 2016-08-05 David Malcolm <dmalcolm@redhat.com>
6634 * c-common.c: Include "substring-locations.h".
6635 (get_cpp_ttype_from_string_type): New function.
6636 (g_string_concat_db): New global.
6637 (substring_loc::get_range): New method.
6638 * c-common.h (g_string_concat_db): New declaration.
6639 (class substring_loc): New class.
6640 * c-lex.c (lex_string): When concatenating strings, capture the
6641 locations of all tokens using a new obstack, and record the
6642 concatenation locations within g_string_concat_db.
6643 * c-opts.c (c_common_init_options): Construct g_string_concat_db
6646 2016-07-29 Marek Polacek <polacek@redhat.com>
6649 * c-common.c (c_common_truthvalue_conversion): Use LOCATION for the
6650 parentheses warning.
6653 * c-common.c (handle_alloc_align_attribute): Also check FUNCTION_DECL.
6655 2016-07-28 Martin Liska <mliska@suse.cz>
6657 PR gcov-profile/68025
6658 * c-common.c (handle_no_profile_instrument_function_attribute):
6660 2016-07-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
6662 * c-common.c (check_user_alignment): Use LOG2_BITS_PER_UNIT instead of
6665 2016-07-25 Jason Merrill <jason@redhat.com>
6668 * c.opt (fconstexpr-loop-limit): New.
6670 2016-07-22 Martin Sebor <msebor@redhat.com>
6673 * c-common.c (resolve_overloaded_builtin): Avoid converting
6674 __atomic_compare_exchange_n return type to that of what its
6675 first argument points to.
6677 2016-07-22 Uros Bizjak <ubizjak@gmail.com>
6679 * c-common.c: Use HOST_WIDE_INT_M1U instead of
6680 ~(unsigned HOST_WIDE_INT) 0.
6682 2016-07-22 Martin Liska <mliska@suse.cz>
6684 PR gcov-profile/69028
6685 PR gcov-profile/62047
6686 * cilk.c (create_cilk_helper_decl): Set location of a new decl
6687 to the current_function_decl.
6689 2016-07-21 Jason Merrill <jason@redhat.com>
6692 * c-common.c (c_common_truthvalue_conversion): Check
6693 c_inhibit_evaluation_warnings for warning about address of
6696 2016-07-20 David Malcolm <dmalcolm@redhat.com>
6698 * c-common.h (lookup_name_fuzzy): Convert return type from tree to
6701 2016-07-15 Jason Merrill <jason@redhat.com>
6703 * c-opts.c (c_common_post_options): Update -fabi-version default to 11.
6705 2016-07-15 Jakub Jelinek <jakub@redhat.com>
6708 * c-common.h (enum lookup_name_fuzzy_kind): Add
6709 FUZZY_LOOKUP_FUNCTION_NAME.
6711 2016-07-08 Jason Merrill <jason@redhat.com>
6713 P0145: Refining Expression Order for C++.
6714 * c.opts (-fargs-in-order): Rename to -fstrong-eval-order.
6717 2016-07-05 Markus Trippelsdorf <markus@trippelsdorf.de>
6720 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_rvalue_references.
6722 2016-06-29 Thomas Schwinge <thomas@codesourcery.com>
6724 * c-pragma.h (enum pragma_kind): Rename
6725 PRAGMA_OMP_DECLARE_REDUCTION to PRAGMA_OMP_DECLARE. Adjust all
6728 2016-06-29 Richard Biener <rguenther@suse.de>
6731 * c-common.c (c_common_get_alias_set): Remove union type punning case.
6733 2016-06-24 Jason Merrill <jason@redhat.com>
6735 P0145R2: Refining Expression Order for C++.
6736 * c-common.c (verify_tree) [COMPOUND_EXPR]: Fix handling on LHS of
6739 2016-06-24 Jakub Jelinek <jakub@redhat.com>
6741 * c-common.c (check_builtin_function_arguments): Require last
6742 argument of BUILT_IN_*_OVERFLOW_P to have INTEGER_TYPE type.
6743 Adjust wording of diagnostics for BUILT_IN_*_OVERLFLOW
6744 if the last argument is pointer to enumerated or boolean type.
6746 2016-06-22 David Malcolm <dmalcolm@redhat.com>
6749 * c-common.h (enum lookup_name_fuzzy_kind): New enum.
6750 (lookup_name_fuzzy): New prototype.
6752 2016-06-21 John David Anglin <danglin@gcc.gnu.org>
6754 * c-common.c (get_source_date_epoch): Use int64_t instead of long long.
6756 2016-06-14 Jason Merrill <jason@redhat.com>
6758 P0145R2: Refining Expression Order for C++.
6759 * c.opt (fargs-in-order): New.
6760 * c-opts.c (c_common_post_options): Adjust flag_args_in_order.
6762 2016-06-13 Jakub Jelinek <jakub@redhat.com>
6765 * c-gimplify.c (ubsan_walk_array_refs_r): Set *walk_subtrees = 0 on
6766 all BIND_EXPRs, and on all BIND_EXPRs recurse also on BIND_EXPR_BODY.
6768 PR preprocessor/71183
6769 * c-ppoutput.c (init_pp_output): Set cb->get_source_date_epoch
6770 to cb_get_source_date_epoch.
6772 2016-06-10 Jakub Jelinek <jakub@redhat.com>
6775 * c.opt (Wpsabi): Add Warning flag.
6777 2016-06-10 Martin Sebor <msebor@redhat.com>
6780 * c-common.c (handle_nonnull_attribute): Accept
6781 the nonnull attribute in type-generic builtins.
6783 2016-06-09 Martin Sebor <msebor@redhat.com>
6786 * c-common.c (builtin_function_validate_nargs): Make text of error
6787 message consistent with others like it.
6789 2016-06-08 Martin Sebor <msebor@redhat.com>
6790 Jakub Jelinek <jakub@redhat.com>
6794 * c-common.c (check_builtin_function_arguments): Handle
6795 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
6797 2016-06-08 Richard Biener <rguenther@suse.de>
6799 * c-common.c (parse_optimize_options): Improve diagnostic messages.
6801 2016-06-07 Richard Biener <rguenther@suse.de>
6804 * c-common.c (parse_optimize_options): Only apply CL_OPTIMIZATION
6805 options and warn about others.
6807 2016-06-01 Eduard Sanou <dhole@openmailbox.org>
6809 * c-common.c (get_source_date_epoch): Rename to
6810 cb_get_source_date_epoch.
6811 * c-common.c (cb_get_source_date_epoch): Use a single generic erorr
6812 message when the parsing fails. Use error_at instead of fatal_error.
6813 * c-common.h (get_source_date_epoch): Rename to
6814 cb_get_source_date_epoch.
6815 * c-common.h (cb_get_source_date_epoch): Prototype.
6816 * c-common.h (MAX_SOURCE_DATE_EPOCH): Define.
6817 * c-common.h (c_omp_region_type): Remove trailing comma.
6818 * c-lex.c (init_c_lex): Set cb->get_source_date_epoch callback.
6819 * c-lex.c (c_lex_with_flags): Remove initialization of
6820 pfile->source_date_epoch.
6822 2016-05-30 Jakub Jelinek <jakub@redhat.com>
6825 * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_DEPEND to
6826 C_OMP_CLAUSE_SPLIT_TARGET. Put OMP_CLAUSE_NOWAIT to
6827 C_OMP_CLAUSE_SPLIT_TARGET if combined with target construct,
6828 instead of C_OMP_CLAUSE_SPLIT_FOR.
6830 2016-05-24 Richard Biener <rguenther@suse.de>
6834 * c-common.h (convert_vector_to_pointer_for_subscript): Rename to ...
6835 (convert_vector_to_array_for_subscript): ... this.
6836 * c-common.c (convert_vector_to_pointer_for_subscript): Use a
6837 VIEW_CONVERT_EXPR to an array type. Rename to ...
6838 (convert_vector_to_array_for_subscript): ... this.
6840 2016-05-12 Marek Polacek <polacek@redhat.com>
6843 * c-common.c (pointer_int_sum): Call size_in_bytes_loc instead of
6844 size_in_bytes and pass LOC to it.
6846 2016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
6849 * c.opt (Wduplicate-decl-specifier): New option.
6851 2016-05-11 Marek Polacek <polacek@redhat.com>
6854 * c-common.c (diagnose_mismatched_attributes): New function.
6855 * c-common.h (diagnose_mismatched_attributes): Declare.
6857 2016-05-04 Marek Polacek <polacek@redhat.com>
6859 * c.opt (Wdangling-else): New option.
6861 2016-05-03 Marek Polacek <polacek@redhat.com>
6864 * c-common.c (builtin_function_validate_nargs): Add location
6866 (check_builtin_function_arguments): Add location and arguments
6867 parameters. Use them.
6868 * c-common.h (check_builtin_function_arguments): Update declaration.
6870 2016-05-03 Richard Biener <rguenther@suse.de>
6872 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Do not
6873 allow call args to gimplify to SSA names.
6875 2016-05-03 Marek Polacek <polacek@redhat.com>
6877 * c-common.h (enum c_omp_region_type): Remove stray comma.
6879 2016-05-02 Cesar Philippidis <cesar@codesourcery.com>
6881 * c-common.h (enum c_omp_region_type): Define.
6883 2016-05-02 Richard Sandiford <richard.sandiford@arm.com>
6885 * c-common.c (shorten_compare): Use wi::to_wide.
6887 2016-04-29 Cesar Philippidis <cesar@codesourcery.com>
6890 * c-common.h (c_oacc_split_loop_clauses): Add boolean argument.
6891 * c-omp.c (c_oacc_split_loop_clauses): Use it to duplicate
6892 reduction clauses in acc parallel loops.
6894 2016-04-29 Marek Polacek <polacek@redhat.com>
6897 * c-common.c (warn_for_memset): Check domain before accessing it.
6899 2016-04-29 Dominik Vogt <vogt@linux.vnet.ibm.com>
6902 * c-common.c (handle_aligned_attribute): Allow 0 as an argument to the
6903 "aligned" attribute.
6905 2016-04-28 Jason Merrill <jason@redhat.com>
6907 * c-lex.c (c_common_has_attribute): Handle nodiscard.
6909 2016-04-28 Eduard Sanou <dhole@openmailbox.org>
6910 Matthias Klose <doko@debian.org>
6912 * c-common.c (get_source_date_epoch): New function, gets the environment
6913 variable SOURCE_DATE_EPOCH and parses it as long long with error
6915 * c-common.h (get_source_date_epoch): Prototype.
6916 * c-lex.c (c_lex_with_flags): set parse_in->source_date_epoch.
6918 2015-04-27 Ryan Burn <contact@rnburn.com>
6922 * cilk.c (cilk_ignorable_spawn_rhs_op): Change to external linkage.
6923 (cilk_recognize_spawn): Renamed from recognize_spawn and change to
6925 (cilk_detect_and_unwrap): Corresponding changes.
6926 (extract_free_variables): Don't extract free variables from
6927 AGGR_INIT_EXPR slot.
6928 * c-common.h (cilk_ignorable_spawn_rhs_op): Prototype.
6929 (cilk_recognize_spawn): Likewise.
6931 2016-04-27 Bernd Schmidt <bschmidt@redhat.com>
6933 * c.opt (Wmemset-elt-size): New option.
6934 * c-common.c (warn_for_memset): New function.
6935 * c-common.h (warn_for_memset): Declare.
6937 2016-04-25 Jason Merrill <jason@redhat.com>
6939 * c-common.c (handle_unused_attribute): Accept CONST_DECL.
6941 * c-common.h: Declare it.
6942 * c-lex.c (c_common_has_attribute): Add maybe_unused.
6944 2016-04-22 Jason Merrill <jason@redhat.com>
6946 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_range_based_for.
6948 2016-04-20 Ilya Verbin <ilya.verbin@intel.com>
6951 * c-cilkplus.c (c_finish_cilk_clauses): Remove function.
6952 * c-common.h (c_finish_cilk_clauses): Remove declaration.
6954 2016-04-18 Michael Matz <matz@suse.de>
6956 * c-common.c (handle_aligned_attribute): Use SET_TYPE_ALIGN
6959 2016-04-17 Eric Botcazou <ebotcazou@adacore.com>
6961 * c-ada-spec.c (get_underlying_decl): Return the typedef, if any.
6962 (dump_generic_ada_node) <POINTER_TYPE>: Clean up handling of access
6963 to incomplete types.
6964 (dump_nested_type): Remove redundant tests and tidy up.
6965 (print_ada_declaration): Also set TREE_VISITED on the declaration of
6966 a type which is the typedef of an original type.
6968 2016-04-15 Marek Polacek <polacek@redhat.com>
6971 * c-common.c (build_va_arg): Change two asserts into errors and return
6974 2016-04-13 Marek Polacek <polacek@redhat.com>
6977 * c-indentation.c (should_warn_for_misleading_indentation): Bail out
6978 for switch statements, too.
6980 2016-03-28 Jason Merrill <jason@redhat.com>
6982 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_range_based_for.
6984 2016-03-23 Marek Polacek <polacek@redhat.com>
6987 * c.opt (Wignored-attributes): New option.
6989 2016-03-22 David Malcolm <dmalcolm@redhat.com>
6992 * c-indentation.c (warn_for_misleading_indentation): Rewrite the
6993 diagnostic text, reversing the order of the warning and note so
6994 that they appear in source order.
6996 2016-03-17 Marek Polacek <polacek@redhat.com>
6999 * c-common.c (resolve_overloaded_builtin): Set TREE_USED for the fetch
7002 2016-03-14 Jason Merrill <jason@redhat.com>
7004 * c-cppbuiltin.c (c_cpp_builtins): Set __cpp_hex_float.
7006 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_range_based_for.
7008 2016-03-09 Richard Biener <rguenther@suse.de>
7011 * c-common.c (strict_aliasing_warning): Add back
7012 alias_sets_conflict_p check.
7014 2016-03-08 Jason Merrill <jason@redhat.com>
7016 * c-opts.c (set_std_cxx1z): Don't enable concepts.
7018 2016-03-04 David Malcolm <dmalcolm@redhat.com>
7021 * c-indentation.c (get_visual_column): Move code to determine next
7023 (next_tab_stop): ...this new function.
7024 (line_contains_hash_if): Delete function.
7025 (detect_preprocessor_logic): Delete function.
7026 (get_first_nws_vis_column): New function.
7027 (detect_intervening_unindent): New function.
7028 (should_warn_for_misleading_indentation): Replace call to
7029 detect_preprocessor_logic with a call to
7030 detect_intervening_unindent.
7032 2016-03-04 David Malcolm <dmalcolm@redhat.com>
7035 * c-indentation.c (should_warn_for_misleading_indentation): When
7036 suppressing warnings about cases where the guard and body are on
7037 the same column, only use the first non-whitespace column in place
7038 of the guard token column when dealing with "else" clauses.
7039 When rejecting aligned BODY and NEXT, loosen the requirement
7040 from equality with the first non-whitespace of guard to simply
7041 that they not be indented relative to it.
7043 2016-03-04 Richard Biener <rguenther@suse.de>
7046 * c-common.c (strict_aliasing_warning): Use alias_set_subset_of
7047 instead of alias_sets_conflict_p.
7049 2016-03-01 Marek Polacek <polacek@redhat.com>
7052 * c-common.c (reject_gcc_builtin): Check for FUNCTION_DECL rather than
7055 2016-02-22 Martin Sebor <msebor@redhat.com>
7058 * c-common.c (check_builtin_function_arguments): Validate and
7059 reject invalid arguments to __builtin_alloca_with_align.
7061 2016-02-20 Mark Wielaard <mjw@redhat.com>
7064 * c.opt (Wunused-const-variable): Turn into Alias for...
7065 (Wunused-const-variable=): New option.
7067 2016-02-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
7070 * c-opts.c (c_common_post_options): Move call to set_std_cxx14 from
7072 (c_common_init_options): ...to here.
7073 (set_std_cxx98): Initialize flag_isoc94 and flag_isoc99.
7075 2016-02-19 Jakub Jelinek <jakub@redhat.com>
7078 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_GRAINSIZE.
7079 (init_pragma): Register PRAGMA_CILK_GRAINSIZE even for
7080 flag_preprocess_only.
7082 2016-02-16 Jakub Jelinek <jakub@redhat.com>
7085 * c.opt (Wnonnull-compare): Enable for -Wall.
7087 2016-02-15 Jakub Jelinek <jakub@redhat.com>
7090 * c-common.c (sync_resolve_size): Diagnose too few arguments
7091 even when params is non-NULL empty vector.
7093 2016-02-08 Bernd Schmidt <bschmidt@redhat.com>
7096 * c.opt (fshort-double): Remove.
7098 2016-02-05 Martin Sebor <msebor@redhat.com>
7101 * c.opt (Warning options): Update -Wplacement-new to take
7102 an optional argument.
7104 2016-02-01 Jakub Jelinek <jakub@redhat.com>
7106 PR preprocessor/69543
7108 * c-pragma.c (handle_pragma_diagnostic): Pass input_location
7109 instead of loc to control_warning_option.
7111 2016-02-01 Nathan Sidwell <nathan@codesourcery.com>
7113 * c.opt (fopenacc-dim=): New option.
7115 2016-01-27 Ryan Burn <contact@rnburn.com>
7118 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Change to use
7119 gimplify_arg. Removed superfluous post_p argument.
7120 * c-family.h (cilk_gimplify_call_params_in_spawned_fn): Removed
7121 superfluous post_p argument.
7122 * c-gimplify.c (c_gimplify_expr): Likewise.
7124 2016-01-26 David Malcolm <dmalcolm@redhat.com>
7127 * c-opts.c (c_diagnostic_finalizer): Replace invocation of
7128 pp_newline_and_flush with pp_flush.
7130 2016-01-20 Martin Sebor <msebor@redhat.com>
7133 * c-common.c (sync_resolve_size): Avoid printing diagnostic about
7134 an incompatible argument when the argument isn't a valid tree node.
7136 2016-01-18 Jason Merrill <jason@redhat.com>
7139 * c-common.c (check_function_arguments_recurse): Fold the whole
7140 COND_EXPR, not just the condition.
7142 2016-01-18 Tom de Vries <tom@codesourcery.com>
7144 * c-omp.c (c_oacc_split_loop_clauses): Don't copy OMP_CLAUSE_REDUCTION,
7145 classify as loop clause.
7147 2016-01-15 Jakub Jelinek <jakub@redhat.com>
7150 * c-pragma.c (c_register_pragma_1): Adjust comment to note that
7151 C++ FE no longer has limit on number of pragmas.
7153 2015-01-14 Ryan Burn <contact@rnburn.com>
7156 * cilk.c (create_cilk_wrapper_body): Call fold_build_cleanup_point_expr
7157 to add missing cleanup point.
7159 2016-01-14 David Malcolm <dmalcolm@redhat.com>
7162 * c-indentation.c (get_visual_column): Add location_t param.
7163 Handle the column number being zero by effectively disabling the
7164 warning, with an "inform".
7165 (should_warn_for_misleading_indentation): Add location_t argument
7166 for all uses of get_visual_column.
7168 2016-01-10 Patrick Palka <ppalka@gcc.gnu.org>
7171 * c-indentation.c (should_warn_for_misleading_indentation):
7172 Don't warn about do-while statements.
7174 2016-01-07 Martin Sebor <msebor@redhat.com>
7177 * c-common.c (sync_resolve_size): Reject first argument when it's
7180 2016-01-05 David Malcolm <dmalcolm@redhat.com>
7183 * c-indentation.c (get_visual_column): Remove default argument.
7184 (should_warn_for_misleading_indentation): For the multiline case,
7185 update call to get_visual_column for next_stmt_exploc so that it
7186 captures the location of the first non-whitespace character in the
7187 relevant line. Don't issue warnings if there is non-whitespace
7188 before the next statement.
7190 2016-01-04 Jakub Jelinek <jakub@redhat.com>
7192 Update copyright years.
7194 2015-12-21 David Malcolm <dmalcolm@redhat.com>
7196 * c-common.c (binary_op_error): Convert first param from
7197 location_t to rich_location * and use it when emitting an error.
7198 * c-common.h (binary_op_error): Convert first param from
7199 location_t to rich_location *.
7201 2015-12-16 David Malcolm <dmalcolm@redhat.com>
7203 * c-common.h (conflict_marker_get_final_tok_kind): New prototype.
7204 * c-lex.c (conflict_marker_get_final_tok_kind): New function.
7206 2015-12-15 Ilya Verbin <ilya.verbin@intel.com>
7208 * c-common.c (c_common_attribute_table): Handle "omp declare target
7211 2015-12-14 Jakub Jelinek <jakub@redhat.com>
7214 * c.opt (Wmissing-format-attribute, Wnormalized): Add Warning option.
7216 2014-12-12 Tobias Burnus <burnus@net-b.de>
7219 * c-format.c (gcc_gfc_char_table): Add 'q' flag to remaining
7220 specifiers (%d, %i,%u and %c).
7222 2015-12-10 David Malcolm <dmalcolm@redhat.com>
7224 * c.opt (Wmisleading-indentation): Add to -Wall for C and C++.
7226 2015-12-08 Jakub Jelinek <jakub@redhat.com>
7230 * c.opt (Wfloat-conversion, Wsign-conversion): Add Warning.
7231 * c-pragma.c (handle_pragma_diagnostic): Adjust
7232 control_warning_option caller.
7234 2015-12-07 David Malcolm <dmalcolm@redhat.com>
7236 * c-common.c (c_cpp_error): Update for change to
7237 rich_location::set_range.
7239 2015-12-04 Paolo Bonzini <bonzini@gnu.org>
7241 * c-common.c (maybe_warn_shift_overflow): Warn on all overflows if
7242 shifting 1 out of the sign bit.
7244 2015-12-04 Kirill Yukhin <kirill.yukhin@intel.com>
7246 * c-common.c (c_common_attribute_table[]): Update max arguments
7247 count for "simd" attribute.
7248 (handle_simd_attribute): Parse "notinbranch" and "inbranch" arguments.
7250 2015-12-03 Jakub Jelinek <jakub@redhat.com>
7252 PR preprocessor/57580
7253 * c-ppoutput.c (print): Change printed field to bool.
7254 Move src_file last for smaller padding.
7255 (init_pp_output): Set print.printed to false instead of 0.
7256 (scan_translation_unit): Fix up formatting. Set print.printed
7257 to true after printing something other than newline.
7258 (scan_translation_unit_trad): Set print.printed to true instead of 1.
7259 (maybe_print_line_1): Set print.printed to false instead of 0.
7260 (print_line_1): Likewise.
7261 (do_line_change): Set print.printed to true instead of 1.
7262 (cb_define, dump_queued_macros, cb_include, cb_def_pragma,
7263 dump_macro): Set print.printed to false after printing newline.
7265 2015-12-02 Jason Merrill <jason@redhat.com>
7267 * c-common.c (fold_for_warn): New.
7268 (warn_logical_operator, warn_tautological_cmp)
7269 (check_function_arguments_recurse, maybe_warn_bool_compare): Use it.
7271 * c-common.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
7272 (c_fully_fold_internal, decl_constant_value_for_optimization):
7274 * c-common.h: Don't declare decl_constant_value_for_optimization.
7276 2015-12-02 Joseph Myers <joseph@codesourcery.com>
7279 * c-common.h (c_build_qualified_type): Add extra default
7282 2015-12-01 Julian Brown <julian@codesourcery.com>
7283 Cesar Philippidis <cesar@codesourcery.com>
7284 James Norris <James_Norris@mentor.com>
7286 * c-pragma.c (oacc_pragmas): Add PRAGMA_OACC_HOST_DATA.
7287 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_HOST_DATA.
7288 (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_USE_DEVICE.
7290 2015-11-30 Eric Botcazou <ebotcazou@adacore.com>
7292 * c-ada-spec.c (print_ada_macros): Remove redundant blank line.
7293 (decl_sloc_common): Delete and move bulk of processing to...
7294 (decl_sloc): ...here.
7295 (pp_ada_tree_identifier): Remove reference to QUAL_UNION_TYPE.
7296 (dump_ada_double_name): Remove S parameter and compute the suffix.
7297 (dump_ada_array_type): Add PARENT parameter. Simplify computation of
7298 element type and deal with an anonymous one.
7299 (dump_ada_template): Use RECORD_OR_UNION_TYPE_P macro.
7300 (dump_generic_ada_node): Tweak. Adjust call to dump_ada_array_type
7301 and remove reference to QUAL_UNION_TYPE.
7302 (dump_nested_types): Make 2 passes on the fields and move bulk to...
7303 (dump_nested_type): ...here. New function extracted from above.
7304 Generate a full declaration for anonymous element type of arrays.
7305 (print_ada_declaration): Really skip anonymous declarations. Remove
7306 references to QUAL_UNION_TYPE. Adjust call to dump_ada_array_type.
7307 Clean up processing of declarations of array types and objects.
7308 (print_ada_struct_decl): Remove reference to QUAL_UNION_TYPE.
7309 Remove obsolete code and tidy up.
7311 2015-11-29 Jan Hubicka <hubicka@ucw.cz>
7314 * c-common.c (handle_transparent_union_attribute): Update
7317 2015-11-27 Martin Liska <mliska@suse.cz>
7320 * array-notation-common.c (cilkplus_extract_an_triplets):
7321 Release vector of vectors.
7322 * cilk.c (gimplify_cilk_spawn): Free allocated memory.
7324 2015-11-26 Eric Botcazou <ebotcazou@adacore.com>
7327 * c-ada-spec.c (dump_nested_types): Add guard for error_mark_node.
7328 (print_ada_struct_decl): Likewise.
7330 2015-11-23 Igor Zamyatin <igor.zamyatin@intel.com>
7333 * c-gimplify.c (c_gimplify_expr): Stop the process if see an error.
7334 * cilk.c (recognize_spawn): Determine location in a more precise
7337 2015-11-19 Jason Merrill <jason@redhat.com>
7339 * c-common.c (shorten_compare): But look through macros from
7342 2015-11-18 Jason Merrill <jason@redhat.com>
7344 * c-common.c (shorten_compare): Don't -Wtype-limits if the
7345 non-constant operand comes from a macro.
7347 2015-11-17 Jason Merrill <jason@redhat.com>
7350 * c-common.c (warn_tautological_cmp): Fold before checking for
7353 2015-11-16 Marek Polacek <polacek@redhat.com>
7356 * c-common.c (check_case_bounds): Fold low and high cases.
7358 2015-11-16 Marek Polacek <polacek@redhat.com>
7360 * c-ada-spec.c (dump_ada_template): Use RECORD_OR_UNION_TYPE_P.
7361 * c-common.c (c_common_get_alias_set): Likewise.
7362 (handle_visibility_attribute): Likewise.
7364 2015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
7366 * c-common.c (handle_simd_attribute): New.
7367 (struct attribute_spec): Add entry for "simd".
7368 (handle_simd_attribute): New.
7370 2015-11-13 Kai Tietz <ktietz70@googlemail.com>
7372 * c-lex.c (interpret_float): Use fold_convert.
7374 2015-11-13 David Malcolm <dmalcolm@redhat.com>
7376 * c-common.c (c_fully_fold_internal): Capture existing souce_range,
7377 and store it on the result.
7378 * c-opts.c (c_common_init_options): Set
7379 global_dc->colorize_source_p.
7381 2015-11-12 James Norris <jnorris@codesourcery.com>
7382 Joseph Myers <joseph@codesourcery.com>
7384 * c-pragma.c (oacc_pragmas): Add entry for declare directive.
7385 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_DECLARE.
7386 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT and
7387 PRAGMA_OACC_CLAUSE_LINK.
7389 2015-11-11 Marek Polacek <polacek@redhat.com>
7393 * c-common.c (valid_array_size_p): New function.
7394 * c-common.h (valid_array_size_p): Declare.
7396 2015-11-11 Dominique d'Humieres <dominiq@lps.ens.fr>
7399 * c-pragma.c (c_register_pragma_1): Update the gcc_assert to 256.
7401 2015-11-11 Andrew MacLeod <amacleod@redhat.com>
7403 * array-notation-common.c: Remove unused header files.
7404 * c-ada-spec.c: Likewise.
7405 * c-cilkplus.c: Likewise.
7406 * c-common.c: Likewise.
7407 * c-cppbuiltin.c: Likewise.
7408 * c-dump.c: Likewise.
7409 * c-format.c: Likewise.
7410 * c-gimplify.c: Likewise.
7411 * c-indentation.c: Likewise.
7412 * c-lex.c: Likewise.
7413 * c-omp.c: Likewise.
7414 * c-opts.c: Likewise.
7415 * c-pch.c: Likewise.
7416 * c-ppoutput.c: Likewise.
7417 * c-pragma.c: Likewise.
7418 * c-pretty-print.c: Likewise.
7419 * c-semantics.c: Likewise.
7420 * c-ubsan.c: Likewise.
7422 * stub-objc.c: Likewise.
7424 2015-11-09 Thomas Schwinge <thomas@codesourcery.com>
7425 Cesar Philippidis <cesar@codesourcery.com>
7426 James Norris <jnorris@codesourcery.com>
7427 Julian Brown <julian@codesourcery.com>
7428 Nathan Sidwell <nathan@codesourcery.com>
7430 * c-pragma.c (oacc_pragmas): Add "routine".
7431 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ROUTINE.
7433 2015-11-08 Eric Botcazou <ebotcazou@adacore.com>
7435 * c-common.c (c_common_attributes): Add scalar_storage_order.
7436 (handle_scalar_storage_order_attribute): New function.
7437 * c-pragma.c (global_sso): New variable.
7438 (maybe_apply_pragma_scalar_storage_order): New function.
7439 (handle_pragma_scalar_storage_order): Likewise.
7440 (init_pragma): Register scalar_storage_order.
7441 * c-pragma.h (maybe_apply_pragma_scalar_storage_order): Declare.
7442 * c.opt (Wscalar-storage-order): New warning.
7443 (fsso-struct=): New option.
7445 2015-11-08 Martin Sebor <msebor@redhat.com>
7447 * c.opt (Wplacement-new): Add a period to the end of a sentence.
7449 2015-11-07 Richard Sandiford <richard.sandiford@arm.com>
7451 * c-common.c: Don't undef DEF_BUILTIN.
7453 2015-11-06 David Malcolm <dmalcolm@redhat.com>
7455 * c-common.c (c_cpp_error): Convert parameter from location_t to
7456 rich_location *. Eliminate the "column_override" parameter and
7457 the call to diagnostic_override_column.
7458 Update the "done_lexing" clause to set range 0
7459 on the rich_location, rather than overwriting a location_t.
7460 * c-common.h (c_cpp_error): Convert parameter from location_t to
7461 rich_location *. Eliminate the "column_override" parameter.
7463 2015-11-05 Cesar Philippidis <cesar@codesourcery.com>
7464 Thomas Schwinge <thomas@codesourcery.com>
7465 James Norris <jnorris@codesourcery.com>
7467 * c-omp.c (c_oacc_split_loop_clauses): Make TILE, GANG, WORKER, VECTOR,
7468 AUTO, SEQ, INDEPENDENT and PRIVATE loop clauses. Associate REDUCTION
7469 clauses with parallel and kernels and loops.
7470 * c-pragma.h (enum pragma_omp_clause): Add entries for
7471 PRAGMA_OACC_CLAUSE_{INDEPENDENT,TILE,DEFAULT}.
7472 * pt.c (tsubst_omp_clauses): Add support for OMP_CLAUSE_{NUM_GANGS,
7473 NUM_WORKERS,VECTOR_LENGTH,GANG,WORKER,VECTOR,ASYNC,WAIT,TILE,AUTO,
7475 (tsubst_expr): Add support for OMP_CLAUSE_{KERNELS,PARALLEL,LOOP}.
7477 2015-11-05 Martin Sebor <msebor@redhat.com>
7480 * c.opt (-Wplacement-new): New option.
7482 2015-11-05 Jakub Jelinek <jakub@redhat.com>
7484 * c-common.h (c_finish_omp_atomic): Add TEST argument.
7485 (c_omp_check_loop_iv, c_omp_check_loop_iv_exprs): New prototypes.
7486 * c-omp.c (c_finish_omp_atomic): Add TEST argument. Don't call
7487 save_expr or create_tmp_var* if TEST is true.
7488 (c_finish_omp_for): Store OMP_FOR_ORIG_DECLS always.
7489 Don't call add_stmt here.
7490 (struct c_omp_check_loop_iv_data): New type.
7491 (c_omp_check_loop_iv_r, c_omp_check_loop_iv,
7492 c_omp_check_loop_iv_exprs): New functions.
7493 (c_omp_split_clauses): Adjust for lastprivate being allowed on
7495 (c_omp_declare_simd_clauses_to_numbers): Change
7496 OMP_CLAUSE_LINEAR_VARIABLE_STRIDE OMP_CLAUSE_LINEAR_STEP into numbers.
7497 (c_omp_declare_simd_clauses_to_decls): Similarly change those
7498 from numbers to PARM_DECLs.
7500 2015-11-04 Mikhail Maltsev <maltsevm@gmail.com>
7502 * c-omp.c (c_omp_split_clauses): Remove conditional compilation. Use
7505 2015-11-03 Bernd Schmidt <bschmidt@redhat.com>
7508 * c-common.h (fold_offsetof_1): Add argument.
7509 * c-common.c (fold_offsetof_1): Diagnose more invalid
7510 offsetof expressions that reference elements past the end of
7513 2015-11-03 Thomas Schwinge <thomas@codesourcery.com>
7514 Chung-Lin Tang <cltang@codesourcery.com>
7516 * c-pragma.c (oacc_pragmas): Add "atomic".
7517 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ATOMIC.
7519 2015-10-30 Evgeny Stupachenko <evstupac@gmail.com>
7521 * c-common.c (handle_target_clones_attribute): New.
7522 (c_common_attribute_table): Add handle_target_clones_attribute.
7523 (handle_always_inline_attribute): Add check on target_clones attribute.
7524 (handle_target_attribute): Ditto.
7526 2015-10-29 Andrew MacLeod <amacleod@redhat.com>
7528 * array-notation-common.c: Reorder #include's and remove duplicates.
7529 * c-ada-spec.c: Likewise.
7530 * c-cilkplus.c: Likewise.
7531 * c-common.c: Likewise.
7532 * c-cppbuiltin.c: Likewise.
7533 * c-dump.c: Likewise.
7534 * c-format.c: Likewise.
7535 * c-gimplify.c: Likewise.
7536 * c-indentation.c: Likewise.
7537 * c-lex.c: Likewise.
7538 * c-omp.c: Likewise.
7539 * c-opts.c: Likewise.
7540 * c-pch.c: Likewise.
7541 * c-ppoutput.c: Likewise.
7542 * c-pragma.c: Likewise.
7543 * c-pretty-print.c: Likewise.
7544 * c-semantics.c: Likewise.
7545 * c-ubsan.c: Likewise.
7547 * stub-objc.c: Likewise.
7549 2015-10-28 Jason Merrill <jason@redhat.com>
7551 * c-common.c (pointer_int_sum): Fold the MULT_EXPR.
7553 2015-10-27 Thomas Schwinge <thomas@codesourcery.com>
7554 James Norris <jnorris@codesourcery.com>
7555 Cesar Philippidis <cesar@codesourcery.com>
7559 * c-common.h (c_oacc_split_loop_clauses): Declare function.
7560 * c-omp.c (c_oacc_split_loop_clauses): New function.
7562 2015-10-21 Martin Sebor <msebor@redhat.com>
7565 * c.opt: End each sentence that describes an option with a period.
7567 2015-10-20 Marek Polacek <polacek@redhat.com>
7569 * array-notation-common.c (is_cilkplus_vector_p): Define.
7570 * c-common.h (is_cilkplus_vector_p): Declare.
7572 2015-10-20 Marek Polacek <polacek@redhat.com>
7574 * c.opt (std=gnu++11): Do not describe as experimental.
7575 (std=gnu++14): Likewise.
7577 2015-10-19 Jason Merrill <jason@redhat.com>
7579 * c-cppbuiltin.c (c_cpp_builtins): Define
7580 __cpp_nontype_template_args.
7582 2015-10-19 Jason Merrill <jason@redhat.com>
7584 * c-cppbuiltin.c (c_cpp_builtins): Define
7585 __cpp_enumerator_attributes, __cpp_fold_expressions,
7586 __cpp_unicode_characters.
7588 2015-10-13 Jakub Jelinek <jakub@redhat.com>
7589 Aldy Hernandez <aldyh@redhat.com>
7591 * c-common.c (enum c_builtin_type): Define DEF_FUNCTION_TYPE_9,
7592 DEF_FUNCTION_TYPE_10 and DEF_FUNCTION_TYPE_11.
7593 (c_define_builtins): Likewise.
7594 * c-common.h (enum c_omp_clause_split): Add
7595 C_OMP_CLAUSE_SPLIT_TASKLOOP.
7596 (c_finish_omp_critical, c_finish_omp_ordered): Add CLAUSES argument.
7597 (c_finish_omp_for): Add ORIG_DECLV argument.
7598 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP as
7599 201511 instead of 201307.
7600 * c-omp.c (c_finish_omp_critical): Add CLAUSES argument, set
7601 OMP_CRITICAL_CLAUSES to it.
7602 (c_finish_omp_ordered): Add CLAUSES argument, set
7603 OMP_ORDERED_CLAUSES to it.
7604 (c_finish_omp_for): Add ORIG_DECLV argument, set OMP_FOR_ORIG_DECLS
7605 to it if OMP_FOR. Clear DECL_INITIAL on the IVs.
7606 (c_omp_split_clauses): Handle OpenMP 4.5 combined/composite
7607 constructs and new OpenMP 4.5 clauses. Clear
7608 OMP_CLAUSE_SCHEDULE_SIMD if not combined with OMP_SIMD. Add
7610 * c-pragma.c (omp_pragmas_simd): Add taskloop.
7611 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKLOOP.
7612 (enum pragma_omp_clause): Add
7613 PRAGMA_OMP_CLAUSE_{DEFAULTMAP,GRAINSIZE,HINT,{IS,USE}_DEVICE_PTR}
7614 and PRAGMA_OMP_CLAUSE_{LINK,NOGROUP,NUM_TASKS,PRIORITY,SIMD,THREADS}.
7616 2015-10-05 Richard Sandiford <richard.sandiford@arm.com>
7618 * c-lex.c (interpret_float): Use real_equal instead of
7621 2015-10-04 Jason Merrill <jason@redhat.com>
7623 Implement N4514, C++ Extensions for Transactional Memory.
7624 * c-common.c (c_common_reswords): Add C++ TM TS keywords.
7625 (c_common_attribute_table): Add transaction_safe_dynamic.
7626 transaction_safe now affects type identity.
7627 (handle_tm_attribute): Handle transaction_safe_dynamic.
7628 * c-common.h (enum rid): Add RID_ATOMIC_NOEXCEPT,
7629 RID_ATOMIC_CANCEL, RID_SYNCHRONIZED.
7630 (OBJC_IS_CXX_KEYWORD): Add RID_SYNCHRONIZED.
7632 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_transactional_memory.
7633 * c-pretty-print.c (pp_c_attributes_display): Don't print
7634 transaction_safe in C++.
7636 2015-10-02 Marek Polacek <polacek@redhat.com>
7638 * c.opt (Wduplicated-cond): Don't enable by -Wall anymore.
7640 2015-10-02 Marek Polacek <polacek@redhat.com>
7643 * c-common.c (warn_duplicated_cond_add_or_warn): New function.
7644 * c-common.h (warn_duplicated_cond_add_or_warn): Declare.
7645 * c.opt (Wduplicated-cond): New option.
7647 2015-10-01 Joseph Myers <joseph@codesourcery.com>
7649 * c.opt (std=c11): Do not describe as experimental.
7650 (std=gnu11): Likewise.
7651 (std=iso9899:2011): Likewise.
7653 2015-09-28 Nathan Sidwell <nathan@codesourcery.com>
7655 * c-common.c (DEF_FUNCTION_TYPE_VAR_6): New.
7656 (DEF_FUNCTION_TYPE_VAR_11): Delete.
7658 2015-09-25 Marek Polacek <polacek@redhat.com>
7660 * c-ubsan.c (ubsan_instrument_division): Remove unnecessary code.
7661 (ubsan_instrument_shift): Likewise.
7663 2015-09-25 Marek Polacek <polacek@redhat.com>
7666 * c-ubsan.c (ubsan_instrument_division): Also pre-evaluate OP1.
7668 2015-09-24 Patrick Palka <ppalka@gcc.gnu.org>
7670 * c-indentation.c (should_warn_for_misleading_indentation):
7671 Compare next_stmt_vis_column with guard_line_first_nws instead
7672 of with guard_line_vis_column.
7674 2015-09-23 Manuel López-Ibáñez <manu@gcc.gnu.org>
7678 * c-pragma.c (handle_pragma_diagnostic): Detect non-warning
7679 options and options not valid for the current language.
7681 2015-09-22 Patrick Palka <ppalka@gcc.gnu.org>
7683 * c-indentation.c (should_warn_for_misleading_indentation):
7684 Float out and consolidate the calls to get_visual_column that
7685 are passed guard_exploc as an argument. Compare
7686 next_stmt_vis_column with guard_line_first_nws instead of with
7687 body_line_first_nws.
7689 2015-09-22 Nathan Sidwell <nathan@codesourcery.com>
7691 * c.opt (Wmultiple-inheritance, Wvirtual-inheritance, Wtemplates,
7692 Wnamespaces): New C++ warnings.
7694 2015-09-22 Jason Merrill <jason@redhat.com>
7696 * c-common.h (abi_compat_version_crosses): New.
7697 (warn_abi_version): Declare.
7698 * c-common.c: Define it.
7699 * c-opts.c (c_common_post_options): Handle it.
7700 flag_abi_compat_version defaults to 8.
7702 2015-09-21 Ville Voutilainen <ville.voutilainen@gmail.com>
7704 Complete the implementation of N4230, Nested namespace definition.
7705 * c-cppbuiltin.c: Add __cpp_namespace_attributes and
7706 __cpp_nested_namespace_definitions.
7708 2015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
7710 * c-pragma.c (handle_pragma_diagnostic): Fix wrong return.
7712 2015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
7714 * c-pragma.c (handle_pragma_diagnostic): Use explicit location
7716 * c-pragma.h (pragma_lex): Add optional loc argument.
7718 2015-09-16 Mikhail Maltsev <maltsevm@gmail.com>
7720 * c-format.c (check_format_arg): Adjust to use common block size in all
7723 2015-09-15 David Malcolm <dmalcolm@redhat.com>
7725 * c-format.c (location_from_offset): Update for change in
7726 signature of location_get_source_line.
7727 * c-indentation.c (get_visual_column): Likewise.
7728 (line_contains_hash_if): Likewise.
7730 2015-09-14 Marek Polacek <polacek@redhat.com>
7732 * c-opts.c (c_common_post_options): Set C++ standard earlier, before
7733 setting various warnings.
7735 2015-09-14 Marek Polacek <polacek@redhat.com>
7737 * c-common.c (warn_for_sign_compare): Cast to unsigned when shifting
7740 2015-09-11 Mark Wielaard <mjw@redhat.com>
7743 * c.opt (Wunused-variable): Option from common.opt.
7744 (Wunused-const-variable): New option.
7746 2015-09-09 Paolo Carlini <paolo.carlini@oracle.com>
7749 * c.opt ([Wsubobject-linkage]): Add.
7751 2015-09-03 Martin Sebor <msebor@redhat.com>
7754 * c-common.h (c_decl_implicit, reject_gcc_builtin): Declare new
7756 * c-common.c (reject_gcc_builtin): Define.
7758 2015-09-02 Balaji V. Iyer <balaji.v.iyer@intel.com>
7761 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): New
7763 * c-gimplify.c (c_gimplify_expr): Added a call to the function
7764 cilk_gimplify_call_params_in_spawned_fn.
7765 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): New function.
7766 (gimplify_cilk_spawn): Removed EXPR_STMT and CLEANUP_POINT_EXPR
7769 2015-08-25 Marek Polacek <polacek@redhat.com>
7772 * c-common.c (handle_weak_attribute): Don't check whether the
7773 visibility can be changed here.
7775 2015-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
7777 * c-lex.c (c_lex_with_flags): Use explicit locations.
7779 2015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
7781 * c-ada-spec.h, c-common.c, c-common.h, c-format.c, c-format.h,
7782 c-objc.h, c-ppoutput.c, c-pragma.c, c-pragma.h: Remove useless
7784 2015-08-18 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
7787 * c-common.c (check_builtin_function_arguments): Add check
7788 for BUILT_IN_SIGNBIT argument.
7790 2015-08-18 Paolo Carlini <paolo.carlini@oracle.com>
7793 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_static_assert value
7796 2015-08-17 Marek Polacek <polacek@redhat.com>
7798 * c-pretty-print.c (pp_c_cv_qualifiers): Remove code dealing
7799 with whitespaces before qualifier names.
7801 2015-08-12 Marek Polacek <polacek@redhat.com>
7804 * c-common.c (maybe_warn_shift_overflow): Properly handle
7805 left-shifting 1 into the sign bit.
7807 2015-08-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
7809 * c.opt (Wchkp): Use LangEnabledBy instead of EnabledBy.
7811 2015-08-06 Andrew Sutton <andrew.n.sutton@gmail.com>
7812 Braden Obrzut <admin@maniacsvault.net>
7813 Jason Merrill <jason@redhat.com>
7815 Add C++ Concepts TS support.
7816 * c-common.c (c_common_reswords): Add __is_same_as, concept, requires.
7817 * c-common.h (enum rid): Add RID_IS_SAME_AS, RID_CONCEPT, RID_REQUIRES.
7818 (D_CXX_CONCEPTS, D_CXX_CONCEPTS_FLAGS): New.
7819 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_concepts.
7820 * c-opts.c (set_std_cxx1z): Set flag_concepts.
7821 * c.opt (fconcepts): New.
7823 2015-08-02 Martin Sebor <msebor@redhat.com>
7825 * c.opt (-Wframe-address): New warning option.
7827 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
7829 * c-indentation.c (should_warn_for_misleading_indentation):
7832 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
7834 * c-indentation.c (get_visual_column): Add parameter first_nws,
7835 use it. Update comment documenting the function.
7836 (is_first_nonwhitespace_on_line): Remove.
7837 (should_warn_for_misleading_indentation): Replace usage of
7838 of is_first_nonwhitespace_on_line with get_visual_column.
7840 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
7842 * c-indentation.h (struct token_indent_info): Define.
7843 (get_token_indent_info): Define.
7844 (warn_for_misleading_information): Declare.
7845 * c-common.h (warn_for_misleading_information): Remove.
7846 * c-identation.c (warn_for_misleading_indentation):
7847 Change declaration to take three token_indent_infos. Adjust
7849 * c-identation.c (should_warn_for_misleading_indentation):
7850 Likewise. Bail out early if the body is a compound statement.
7851 (guard_tinfo_to_string): Define.
7853 2015-07-30 Jason Merrill <jason@redhat.com>
7855 * c-pretty-print.c (unary_expression) [INDIRECT_REF]: Don't print
7856 '*' for reference decay.
7858 2015-07-30 Marek Polacek <polacek@redhat.com>
7860 * c-common.c (warn_tautological_cmp): Bail for float types.
7862 2015-07-27 Marek Polacek <polacek@redhat.com>
7865 * c-common.c (warn_tautological_cmp): Don't warn for macro expansion.
7867 2015-07-27 Marek Polacek <polacek@redhat.com>
7871 * c-common.c (find_array_ref_with_const_idx_r): New function.
7872 (warn_tautological_cmp): New function.
7873 * c-common.h (warn_tautological_cmp): Declare.
7874 * c.opt (Wtautological-compare): New option.
7876 2015-07-23 Marek Polacek <polacek@redhat.com>
7878 * c-ubsan.c (ubsan_instrument_division): Use unshare_expr throughout.
7879 (ubsan_instrument_shift): Likewise.
7881 2015-07-23 Marek Polacek <polacek@redhat.com>
7884 * c-ubsan.c: Include gimplify.h.
7885 (ubsan_instrument_division): Unshare OP0 and OP1.
7886 (ubsan_instrument_shift): Likewise.
7888 2015-07-20 Marek Polacek <polacek@redhat.com>
7889 Richard Sandiford <richard.sandiford@arm.com>
7892 * c-common.c (c_fully_fold_internal): Warn about left shift overflows.
7893 Use EXPR_LOC_OR_LOC.
7894 (maybe_warn_shift_overflow): New function.
7895 * c-common.h (maybe_warn_shift_overflow): Declare.
7896 * c-opts.c (c_common_post_options): Set warn_shift_overflow.
7897 * c.opt (Wshift-overflow): New option.
7899 2015-07-16 Martin Liska <mliska@suse.cz>
7901 * c-format.c (static void check_format_info_main): Use
7902 object_allocator instead of pool_allocator.
7903 (check_format_arg): Likewise.
7904 (check_format_info_main): Likewise.
7906 2015-07-15 Andrew MacLeod <amacleod@redhat.com>
7908 * c-opts.c: Remove multiline #include comment.
7910 2015-07-12 Aldy Hernandez <aldyh@redhat.com>
7912 * c-common.c: Fix double word typos.
7914 2015-07-10 Eric Botcazou <ebotcazou@adacore.com>
7916 * c-ada-spec.h (cpp_operation): Revert latest change.
7917 * c-ada-spec.c (print_ada_declaration): Likewise. Skip implicit
7918 constructors and destructors.
7920 2015-07-09 Andrew MacLeod <amacleod@redhat.com>
7922 * c-common.h: Adjust includes for flags.h changes.
7923 * stub-objc.c: Likewise.
7925 2015-07-08 Eric Botcazou <ebotcazou@adacore.com>
7927 * c-ada-spec.h (cpp_operation): Add IS_CONSTEXPR.
7928 * c-ada-spec.c (print_ada_declaration): Skip constexpr constructors.
7930 2015-07-08 Jakub Jelinek <jakub@redhat.com>
7932 * c-omp.c (c_omp_declare_simd_clauses_to_numbers): If all clauses
7933 are to be removed, return NULL rather than original clauses list.
7935 2015-07-07 Andrew MacLeod <amacleod@redhat.com>
7937 * array-notation-common.c: Adjust includes.
7938 * c-ada-spec.c: Likewise.
7939 * c-cilkplus.c: Likewise.
7940 * c-common.h: Likewise.
7941 * c-cppbuiltin.c: Likewise.
7942 * c-dump.c: Likewise.
7943 * c-format.c: Likewise.
7944 * c-gimplify.c: Likewise.
7945 * c-indentation.c: Likewise.
7946 * c-lex.c: Likewise.
7947 * c-omp.c: Likewise.
7948 * c-opts.c: Likewise.
7949 * c-pch.c: Likewise.
7950 * c-ppoutput.c: Likewise.
7951 * c-pragma.c: Likewise.
7952 * c-pretty-print.c: Likewise.
7953 * c-semantics.c: Likewise.
7954 * c-ubsan.c: Likewise.
7956 * stub-objc.c: Likewise.
7958 2015-07-07 Eric Botcazou <ebotcazou@adacore.com>
7960 * c-ada-spec.h (cpp_operation): Add IS_MOVE_CONSTRUCTOR.
7961 * c-ada-spec.c (print_ada_declaration): Skip move constructors.
7963 2015-07-01 Jason Merrill <jason@redhat.com>
7965 * c-common.h (D_CXX11): Rename from D_CXX0X.
7966 (RID_FIRST_CXX11, RID_LAST_CXX11): Rename from *_CXX0X.
7967 * c-common.c: Adjust.
7969 * c-opts.c (c_common_post_options): Default to C++14.
7971 * c-opts.c (c_common_post_options): Highest ABI level is now 10.
7973 2015-06-30 Edward Smith-Rowland <3dw4rd@verizon.net>
7975 Implement N4197 - Adding u8 character literals
7976 * c-ada-spec.c (print_ada_macros): Treat CPP_UTF8CHAR like
7978 * c-common.c (c_parse_error): Print CPP_UTF8CHAR and
7979 CPP_UTF8CHAR_USERDEF tokens.
7980 * c-lex.c (c_lex_with_flags): Treat CPP_UTF8CHAR_USERDEF
7981 and CPP_UTF8CHAR tokens.
7982 (lex_charconst): Treat CPP_UTF8CHAR token.
7984 2015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
7987 * c-common.c (do_warn_unused_parameter): Move here.
7988 * c-common.h (do_warn_unused_parameter): Declare.
7990 2015-06-29 Marek Polacek <polacek@redhat.com>
7993 * c-common.c (check_case_bounds): Add bool * parameter. Set
7995 (c_add_case_label): Add bool * parameter. Pass it down to
7997 (c_do_switch_warnings): Add bool parameters. Implement -Wswitch-bool
7999 * c-common.h (c_add_case_label, c_do_switch_warnings): Update
8002 2015-06-27 Marek Polacek <polacek@redhat.com>
8004 * c-common.c (check_main_parameter_types): Use VECTOR_TYPE_P
8005 or VECTOR_INTEGER_TYPE_P throughout.
8006 * c-gimplify.c: Likewise.
8008 2015-06-26 Marek Polacek <polacek@redhat.com>
8010 * array-notation-common.c (find_rank): Use INDIRECT_REF_P.
8011 * c-common.c (c_fully_fold_internal): Likewise.
8012 (c_alignof_expr): Likewise.
8013 * c-pretty-print.c (c_pretty_printer::postfix_expression): Likewise.
8014 * c-ubsan.c (ubsan_instrument_bounds): Likewise.
8015 * cilk.c (create_parm_list): Likewise.
8017 2015-06-26 Marek Polacek <polacek@redhat.com>
8019 * c-common.c (handle_unused_attribute): Use VAR_OR_FUNCTION_DECL_P.
8021 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
8023 * c-common.c: Remove ipa-ref.h and plugin-api.h from include list.
8024 * c-gimplify.c: Likewise.
8025 * c-pragma.c: Likewise.
8026 * c-ubsan.c: Likewise.
8029 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
8031 * c-common.c (c_type_hasher): Inherit from ggc_ptr_hash rather than
8034 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
8036 * cilk.c: Move calls.h after tm.h in the include chain.
8038 2015-06-25 Marek Polacek <polacek@redhat.com>
8040 * array-notation-common.c: Use VAR_P throughout.
8041 * c-ada-spec.c: Likewise.
8042 * c-common.c: Likewise.
8043 * c-format.c: Likewise.
8044 * c-gimplify.c: Likewise.
8045 * c-omp.c: Likewise.
8046 * c-pragma.c: Likewise.
8047 * c-pretty-print.c: Likewise.
8050 2015-06-25 Marek Polacek <polacek@redhat.com>
8052 * cilk.c (extract_free_variables): Use is_global_var.
8054 2015-06-23 Richard Sandiford <richard.sandiford@arm.com>
8056 * c-common.c: Don't include target-def.h.
8058 2015-06-23 Marek Polacek <polacek@redhat.com>
8060 * c-common.c (warn_logical_operator): Use tree_int_cst_equal
8061 when comparing INTEGER_CSTs.
8063 2015-06-22 Pierre-Marie de Rodat <derodat@adacore.com>
8065 * c-ada-spec.h (cpp_operation): Add HAS_DEPENDENT_TEMPLATE_ARGS.
8066 * c-ada-spec.c (collect_ada_nodes): Skip NAMESPACE_DECL
8067 (dump_ada_template): Skip partially specialized types.
8069 2015-06-22 Mikhail Maltsev <maltsevm@gmail.com>
8071 * c-common.c (scalar_to_vector): Use std::swap instead of manually
8074 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
8076 * array-notation-common.c: Do not include input.h, line-map.h or is-a.h.
8077 * c-ada-spec.c: Likewise.
8078 * c-cilkplus.c: Likewise.
8079 * c-common.c: Likewise.
8080 * c-common.h: Likewise.
8081 * c-cppbuiltin.c: Likewise.
8082 * c-dump.c: Likewise.
8083 * c-format.c: Likewise.
8084 * c-gimplify.c: Likewise.
8085 * c-indentation.c: Likewise.
8086 * c-lex.c: Likewise.
8087 * c-omp.c: Likewise.
8088 * c-opts.c: Likewise.
8089 * c-pch.c: Likewise.
8090 * c-ppoutput.c: Likewise.
8091 * c-pragma.c: Likewise.
8092 * c-pretty-print.c: Likewise.
8093 * c-semantics.c: Likewise.
8094 * c-ubsan.c: Likewise.
8096 * stub-objc.c: Likewise.
8098 2015-06-13 Patrick Palka <ppalka@gcc.gnu.org>
8101 * c-common.c (c_common_truthvalue_conversion): Warn when
8102 converting an address of a reference to a truth value.
8104 2015-06-08 Andrew MacLeod <amacleod@redhat.com>
8106 * array-notation-common.c : Adjust include files.
8107 * c-ada-spec.c : Likewise.
8108 * c-cilkplus.c : Likewise.
8109 * c-common.c : Likewise.
8110 * c-common.h : Likewise.
8111 * c-cppbuiltin.c : Likewise.
8112 * c-dump.c : Likewise.
8113 * c-format.c : Likewise.
8114 * c-gimplify.c : Likewise.
8115 * c-indentation.c : Likewise.
8116 * c-lex.c : Likewise.
8117 * c-omp.c : Likewise.
8118 * c-opts.c : Likewise.
8119 * c-pch.c : Likewise.
8120 * c-ppoutput.c : Likewise.
8121 * c-pragma.c : Likewise.
8122 * c-pretty-print.c : Likewise.
8123 * c-semantics.c : Likewise.
8124 * c-ubsan.c : Likewise.
8125 * cilk.c : Likewise.
8126 * stub-objc.c : Likewise.
8128 2015-06-08 Marek Polacek <polacek@redhat.com>
8131 * c-format.c (location_from_offset): Return LOC if LINE is null.
8133 2015-06-05 Aldy Hernandez <aldyh@redhat.com>
8135 * c-common.h (c_parse_final_cleanups): New prototype.
8136 * c-opts.c (c_common_parse_file): Call c_parse_final_cleanups.
8138 2015-06-04 Sriraman Tallam <tmsriram@google.com>
8140 * c-common.c (noplt): New attribute.
8141 (handle_noplt_attribute): New handler.
8143 2015-06-04 Andrew MacLeod <amacleod@redhat.com>
8145 * array-notation-common.c: Adjust includes for restructured coretypes.h.
8146 * c-ada-spec.c: Likewise.
8147 * c-cilkplus.c: Likewise.
8148 * c-common.c: Likewise.
8149 * c-common.h: Likewise.
8150 * c-cppbuiltin.c: Likewise.
8151 * c-dump.c: Likewise.
8152 * c-format.c: Likewise.
8153 * c-gimplify.c: Likewise.
8154 * c-indentation.c: Likewise.
8155 * c-lex.c: Likewise.
8156 * c-omp.c: Likewise.
8157 * c-opts.c: Likewise.
8158 * c-pch.c: Likewise.
8159 * c-ppoutput.c: Likewise.
8160 * c-pragma.c: Likewise.
8161 * c-pretty-print.c: Likewise.
8162 * c-semantics.c: Likewise.
8163 * c-ubsan.c: Likewise.
8165 * stub-objc.c: Likewise.
8167 2015-06-02 David Malcolm <dmalcolm@redhat.com>
8170 * c-indentation.c (should_warn_for_misleading_indentation): Use
8171 expand_location rather than expand_location_to_spelling_point.
8172 Don't warn if the guarding statement is more indented than the
8175 2015-06-02 David Malcolm <dmalcolm@redhat.com>
8177 * c-indentation.c (warn_for_misleading_indentation): Bail out
8178 immediately if -Wmisleading-indentation isn't enabled.
8180 2015-06-01 Martin Liska <mliska@suse.cz>
8182 * c-format.c (check_format_arg):Use new type-based pool allocator.
8183 (check_format_info_main) Likewise.
8185 2015-05-31 Eric Botcazou <ebotcazou@adacore.com>
8187 * c-ada-spec.c (is_tagged_type): Test for TYPE_METHODS on main variant.
8188 (has_nontrivial_methods): Likewise.
8190 2015-05-25 Marek Polacek <polacek@redhat.com>
8192 * c-ubsan.c (ubsan_instrument_shift): Use type0.
8194 2015-05-22 Marek Polacek <polacek@redhat.com>
8197 * c-common.c (handle_deprecated_attribute): Allow CONST_DECL.
8199 2015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
8201 * c-cppbuiltin.c (c_cpp_builtins): Use if instead of #if with
8202 STACK_GROWS_DOWNWARD.
8204 2015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
8206 * c-cppbuiltin.c (c_cpp_builtins): Check the value of
8207 STACK_GROWS_DOWNWARD rather than if it is defined.
8209 2015-05-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
8212 * c-format.c (location_column_from_byte_offset): New.
8213 (location_from_offset): New.
8214 (struct format_wanted_type): Add offset_loc field.
8215 (check_format_info): Move handling of location for extra arguments
8216 closer to the point of warning.
8217 (check_format_info_main): Pass the result of location_from_offset
8219 (format_type_warning): Pass the result of location_from_offset
8222 2015-05-20 Marek Polacek <polacek@redhat.com>
8224 * c-omp.c (check_omp_for_incr_expr): Use BINARY_CLASS_P.
8226 2015-05-20 Marek Polacek <polacek@redhat.com>
8228 * c-ada-spec.c (dump_sloc): Use DECL_P.
8230 2015-05-20 Marek Polacek <polacek@redhat.com>
8232 * c-pragma.c: Use VAR_OR_FUNCTION_DECL_P throughout.
8233 * c-common.c: Likewise.
8235 2015-05-19 David Malcolm <dmalcolm@redhat.com>
8237 * c-common.h (fe_file_change): Strengthen param from
8238 const line_map * to const line_map_ordinary *.
8239 (pp_file_change): Likewise.
8240 * c-lex.c (fe_file_change): Likewise.
8241 (cb_define): Use linemap_check_ordinary when invoking
8243 (cb_undef): Likewise.
8244 * c-opts.c (c_finish_options): Use linemap_check_ordinary when
8245 invoking cb_file_change.
8246 (c_finish_options): Likewise.
8247 (push_command_line_include): Likewise.
8248 (cb_file_change): Strengthen param "new_map" from
8249 const line_map * to const line_map_ordinary *.
8250 * c-ppoutput.c (cb_define): Likewise for local "map".
8251 (pp_file_change): Likewise for param "map" and local "from".
8253 2015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
8255 * c-common.c (shorten_compare): Use std::swap instead of explicit swaps.
8257 2015-05-18 Tom de Vries <tom@codesourcery.com>
8259 * c-common.c (build_va_arg_1): New function.
8260 (build_va_arg): Add address operator to va_list operand if necessary.
8262 2015-05-15 Mikhail Maltsev <maltsevm@gmail.com>
8265 * c-common.c (int_safely_convertible_to_real_p): Define.
8266 (unsafe_conversion_p): Check conversions involving complex types.
8267 (conversion_warning): Add new warning message for conversions which
8268 discard imaginary component.
8269 * c-common.h: (enum conversion_safety): Add new enumerator for such
8272 2015-05-14 Marek Polacek <polacek@redhat.com>
8276 * c-common.c (c_fully_fold): Pass false down to c_fully_fold_internal.
8277 (c_fully_fold_internal): Fold C_MAYBE_CONST_EXPRs with
8278 C_MAYBE_CONST_EXPR_INT_OPERANDS set. Add FOR_INT_CONST argument and
8279 use it. If FOR_INT_CONST, require that all evaluated operands be
8282 2015-05-12 David Malcolm <dmalcolm@redhat.com>
8284 * c-common.h (warn_for_misleading_indentation): New prototype.
8285 * c-indentation.c: New file.
8286 * c.opt (Wmisleading-indentation): New option.
8288 2015-05-12 Tom de Vries <tom@codesourcery.com>
8290 PR tree-optimization/66010
8291 * c-common.c (build_va_arg): Don't mark ap addressable unless necessary.
8293 2015-05-09 Jason Merrill <jason@redhat.com>
8295 * c-opts.c (c_common_post_options): Also clear
8296 cpp_opts->cpp_warn_cxx11_compat.
8298 * c-common.h (enum cxx_dialect): Add cxx_unset.
8299 * c-common.c (cxx_dialect): Initialize to cxx_unset.
8300 * c-opts.c (c_common_post_options): Set C++ dialect to C++98 if unset.
8302 * c.opt (std=c++14): Remove Undocumented flag and experimental warning.
8303 (std=gnu++0x): Mark as Undocumented.
8304 (std=gnu++1y): Add deprecated message.
8306 2015-05-08 Jason Merrill <jason@redhat.com>
8308 * c.opt (Wc++11-compat): Make primary. Rename var warn_cxx11_compat.
8311 * c.opt (Wc++0x-compat): Also set cpp_warn_cxx11_compat.
8313 2015-05-08 Marek Polacek <polacek@redhat.com>
8316 * c.opt (Woverride-init-side-effects): New option.
8318 2015-05-07 Marek Polacek <polacek@redhat.com>
8321 * c-common.c (c_fully_fold_internal): Warn when left shifting a
8323 * c.opt (Wshift-negative-value): New option.
8324 * c-opts.c (c_common_post_options): Set warn_shift_negative_value
8325 when -Wextra and C99/C++11 mode.
8327 2015-05-07 Marek Polacek <polacek@redhat.com>
8328 Martin Uecker <uecker@eecs.berkeley.edu>
8330 * c-ubsan.c (ubsan_instrument_bounds): Don't skip instrumenting
8331 flexible member array-like members if SANITIZE_BOUNDS_STRICT.
8333 2015-05-05 Jason Merrill <jason@redhat.com>
8335 * c.opt (Wterminate): New.
8337 2015-04-30 Marek Polacek <polacek@redhat.com>
8339 * c-common.c (maybe_warn_bool_compare): When comparing with 0/1,
8340 require that the non-constant be of a boolean type.
8342 2015-04-29 Josh Triplett <josh@joshtriplett.org>
8344 * c-common.c (handle_section_attribute): Refactor to reduce
8345 nesting and distinguish between error cases.
8347 2015-04-29 Marek Polacek <polacek@redhat.com>
8350 * c-common.c (maybe_warn_bool_compare): Warn when comparing a boolean
8353 2015-04-29 Jakub Jelinek <jakub@redhat.com>
8355 * c-common.h (omp_clause_mask): Unconditionally define as a class.
8356 Use uint64_t instead of unsigned HOST_WIDE_INT and 64 instead of
8357 HOST_BITS_PER_WIDE_INT.
8359 2015-04-28 Tom de Vries <tom@codesourcery.com>
8361 PR tree-optimization/65887
8362 * c-common.c (build_va_arg): Mark va_arg ap argument as addressable.
8364 2015-04-28 Eric Botcazou <ebotcazou@adacore.com>
8365 Pierre-Marie de Rodat <derodat@adacore.com>
8367 * c-ada-spec.c (in_function): Delete.
8368 (dump_generic_ada_node): Do not change in_function and remove the
8369 redundant code dealing with it.
8370 (print_ada_declaration): Do not change in_function. Use INDENT_INCR.
8371 (print_ada_methods): Output the static member functions in a nested
8372 package after the regular methods as well as associated renamings.
8374 2015-04-24 Marek Polacek <polacek@redhat.com>
8377 * c-common.c (c_fully_fold_internal): Use OPT_Wshift_count_negative
8378 and OPT_Wshift_count_overflow.
8381 * c-common.c (warn_logical_operator): Warn if the operands have the
8384 2015-04-24 Marek Polacek <polacek@redhat.com>
8387 * c-common.c (warn_logical_operator): Bail if either operand comes
8388 from a macro expansion.
8390 2015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
8393 * c-common.c (c_default_pointer_mode): Add definition.
8394 * c-common.h (c_default_pointer_mode): Add declaration.
8396 2015-03-11 Jakub Jelinek <jakub@redhat.com>
8398 * c-common.c (c_common_nodes_and_builtins): Don't call xstrdup
8399 on record_builtin_type argument.
8401 2015-03-10 Jakub Jelinek <jakub@redhat.com>
8404 * c-common.c (warn_logical_not_parentheses): Don't warn for
8407 2015-03-07 Marek Polacek <polacek@redhat.com>
8410 * c-ubsan.c (ubsan_instrument_bounds): Check for COMPONENT_REF
8411 before trying to figure out whether we have a flexible array member.
8413 2015-03-06 Eric Botcazou <ebotcazou@adacore.com>
8414 Jonathan Wakely <jwakely.gcc@gmail.com>
8416 * c-ada-spec.c (dump_ada_double_name): Fix pasto.
8418 2015-03-05 Eric Botcazou <ebotcazou@adacore.com>
8421 * c-ada-spec.c (print_destructor): Remove obsolete code.
8423 2015-03-01 Eric Botcazou <ebotcazou@adacore.com>
8425 * c-ada-spec.c (is_tagged_type): Add guard for DECL_VINDEX.
8426 (dump_template_types): Adjust DECL_TEMPLATE_INSTANTIATIONS and
8427 DECL_TEMPLATE_RESULT emulations.
8428 (dump_ada_template)): Add guard for TYPE_METHODS.
8430 2015-02-27 Marek Polacek <polacek@redhat.com>
8433 * c.opt (Wformat-signedness): Don't enable by -Wformat=2.
8435 2015-02-27 Kai Tietz <ktietz@redhat.com>
8438 * c-pragma.c (handle_pragma_weak): Do not try to create
8439 weak/alias of declarations not being function, or variable
8442 2015-02-24 Thomas Schwinge <thomas@codesourcery.com>
8445 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
8447 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
8449 2015-02-16 Marek Polacek <polacek@redhat.com>
8452 * c-format.c (check_format_types): Handle null param.
8454 2015-02-13 Marek Polacek <polacek@redhat.com>
8457 * c-format.c (check_format_types): Don't warn about different
8458 signedness if the original value is in the range of WANTED_TYPE.
8460 2015-02-12 Jason Merrill <jason@redhat.com>
8463 * c-opts.c (c_common_post_options): Change flag_abi_version from 0
8464 to the current highest version.
8465 * c-cppbuiltin.c (c_cpp_builtins): Assert that it isn't 0.
8467 2015-02-04 Jakub Jelinek <jakub@redhat.com>
8471 * c-omp.c (c_finish_omp_atomic): Use TRUNC_DIV_EXPR
8472 instead of RDIV_EXPR. Use build_binary_op instead of
8475 2015-01-30 Joseph Myers <joseph@codesourcery.com>
8477 * c-opts.c, c-pch.c, cppspec.c: All callers of fatal_error changed
8478 to pass input_location as first argument.
8480 2015-01-23 Tom de Vries <tom@codesourcery.com>
8483 * c.opt (fopenacc): Mark as LTO option.
8485 2015-01-23 Tom de Vries <tom@codesourcery.com>
8488 * c.opt (fopenmp): Mark as LTO option.
8490 2015-01-21 Jakub Jelinek <jakub@redhat.com>
8493 * cilk.c (fill_decls_vec): Only put decls into vector v.
8494 (compare_decls): Fix up formatting.
8496 2015-01-21 Igor Zamyatin <igor.zamyatin@intel.com>
8499 * cilk.c: Include vec.h.
8500 (struct cilk_decls): New structure.
8501 (wrapper_parm_cb): Split this function to...
8502 (fill_decls_vec): ...this...
8503 (create_parm_list): ...and this.
8504 (compare_decls): New function.
8505 (for_local_cb): Remove.
8506 (wrapper_local_cb): Ditto.
8507 (build_wrapper_type): For now first traverse and fill vector of
8508 declarations then sort it and then deal with sorted vector.
8509 (cilk_outline): Ditto.
8510 (declare_one_free_variable): Ditto.
8512 2015-01-21 Jason Merrill <jason@redhat.com>
8515 * c-format.c (check_format_arg): Call decl_constant_value.
8517 2015-01-19 Martin Liska <mliska@suse.cz>
8519 * c-common.c (handle_noicf_attribute): New function.
8521 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
8522 Bernd Schmidt <bernds@codesourcery.com>
8523 James Norris <jnorris@codesourcery.com>
8524 Cesar Philippidis <cesar@codesourcery.com>
8525 Ilmir Usmanov <i.usmanov@samsung.com>
8526 Jakub Jelinek <jakub@redhat.com>
8528 * c.opt (fopenacc): New option.
8529 * c-cppbuiltin.c (c_cpp_builtins): Conditionally define _OPENACC.
8530 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
8532 * c-common.h (c_finish_oacc_wait): New prototype.
8533 * c-omp.c: Include "omp-low.h" and "gomp-constants.h".
8534 (c_finish_oacc_wait): New function.
8535 * c-pragma.c (oacc_pragmas): New variable.
8536 (c_pp_lookup_pragma, init_pragma): Handle it.
8537 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_CACHE,
8538 PRAGMA_OACC_DATA, PRAGMA_OACC_ENTER_DATA, PRAGMA_OACC_EXIT_DATA,
8539 PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP, PRAGMA_OACC_PARALLEL,
8540 PRAGMA_OACC_UPDATE, PRAGMA_OACC_WAIT.
8541 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ASYNC,
8542 PRAGMA_OACC_CLAUSE_AUTO, PRAGMA_OACC_CLAUSE_COLLAPSE,
8543 PRAGMA_OACC_CLAUSE_COPY, PRAGMA_OACC_CLAUSE_COPYIN,
8544 PRAGMA_OACC_CLAUSE_COPYOUT, PRAGMA_OACC_CLAUSE_CREATE,
8545 PRAGMA_OACC_CLAUSE_DELETE, PRAGMA_OACC_CLAUSE_DEVICE,
8546 PRAGMA_OACC_CLAUSE_DEVICEPTR, PRAGMA_OACC_CLAUSE_FIRSTPRIVATE,
8547 PRAGMA_OACC_CLAUSE_GANG, PRAGMA_OACC_CLAUSE_HOST,
8548 PRAGMA_OACC_CLAUSE_IF, PRAGMA_OACC_CLAUSE_NUM_GANGS,
8549 PRAGMA_OACC_CLAUSE_NUM_WORKERS, PRAGMA_OACC_CLAUSE_PRESENT,
8550 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPY,
8551 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYIN,
8552 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYOUT,
8553 PRAGMA_OACC_CLAUSE_PRESENT_OR_CREATE, PRAGMA_OACC_CLAUSE_PRIVATE,
8554 PRAGMA_OACC_CLAUSE_REDUCTION, PRAGMA_OACC_CLAUSE_SELF,
8555 PRAGMA_OACC_CLAUSE_SEQ, PRAGMA_OACC_CLAUSE_VECTOR,
8556 PRAGMA_OACC_CLAUSE_VECTOR_LENGTH, PRAGMA_OACC_CLAUSE_WAIT,
8557 PRAGMA_OACC_CLAUSE_WORKER.
8559 2015-01-14 Marcos Diaz <marcos.diaz@tallertechnologies.com>
8561 * c-cppbuiltin.c (c_cpp_builtins): New cpp define __SSP_EXPLICIT__
8562 for the new option fstack-protector_explicit.
8563 * c-common.c (c_common_attribute_table): Add stack_protect attribute.
8564 (handle_stack_protect_attribute): New function.
8566 2015-01-13 Martin Uecker <uecker@eecs.berkeley.edu>
8568 * c.opt: New option -Warray-bounds=.
8570 2015-01-09 Michael Collison <michael.collison@linaro.org>
8572 * array-notation-common.c: Include hash-set.h, machmode.h,
8573 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
8574 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
8575 * c-ada-spec.c: Ditto.
8576 * c-cilkplus.c: Ditto.
8577 * c-common.c: Include input.h due to flattening of tree.h.
8578 Define macro GCC_C_COMMON_C.
8579 * c-common.h: Flatten tree.h header files into c-common.h.
8580 Remove include of tree-core.h.
8581 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
8582 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
8583 fold-const.h, wide-int.h, and inchash.h due to
8584 flattening of tree.h.
8586 * c-format.c: Flatten tree.h header files into c-common.h.
8587 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
8588 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
8589 fold-const.h, wide-int.h, and inchash.h due to
8590 flattening of tree.h.
8591 * c-dump.c: Include hash-set.h, machmode.h,
8592 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
8593 fold-const.h, wide-int.h, and inchash.h due to
8594 flattening of tree.h.
8595 * c-format.c: Include hash-set.h, machmode.h,
8596 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
8597 fold-const.h, wide-int.h, inchash.h and real.h due to
8598 flattening of tree.h.
8599 * c-gimplify.c: Include hash-set.h, machmode.h,
8600 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
8601 fold-const.h, wide-int.h, and inchash.h due to
8602 flattening of tree.h.
8608 * c-ppoutput.c: Ditto.
8609 * c-pragma.c: Ditto.
8610 * c-pretty-print.c: Ditto.
8611 * c-semantics.c: Ditto.
8613 * stub-objc.c: Ditto.
8615 2015-01-08 Jason Merrill <jason@redhat.com>
8617 * c-ubsan.c (ubsan_maybe_instrument_array_ref): Use
8618 do_ubsan_in_current_function.
8619 (ubsan_maybe_instrument_reference_or_call): Likewise.
8620 * c-ubsan.h: Declare it.
8622 2015-01-08 Mike Stump <mikestump@comcast.net>
8624 * c-common.c (c_common_attribute_table): Add no_sanitize_thread.
8626 2015-01-07 Marek Polacek <polacek@redhat.com>
8629 * c-common.c (c_fully_fold_internal): Warn for division and modulo
8630 if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST and is zero.
8632 2015-01-05 Trevor Saunders <tsaunders@mozilla.com>
8635 * c.opt (Wsuggest-override): New option.
8637 2015-01-05 Jakub Jelinek <jakub@redhat.com>
8639 Update copyright years.
8641 2015-01-05 Marek Polacek <polacek@redhat.com>
8644 * c-common.c (warn_array_subscript_with_type_char): Add location_t
8646 * c-common.h (warn_array_subscript_with_type_char): Update
8649 2014-12-20 Edward Smith-Rowland <3dw4rd@verizon.net>
8651 * c-cppbuiltin.c (__cpp_sized_deallocation): Uncomment and move macro.
8652 Control macro with flag_sized_deallocation.
8654 2014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
8656 * c.opt (Wdiscarded-array-qualifiers): New option.
8658 2014-12-19 Jakub Jelinek <jakub@redhat.com>
8660 PR preprocessor/63831
8661 * c-cppbuiltin.c (c_cpp_builtins): Don't define __has_attribute
8662 and __has_cpp_attribute here.
8663 * c-ppoutput.c (init_pp_output): Set cb->has_attribute to
8664 c_common_has_attribute.
8665 * c-common.h (c_common_has_attribute): New prototype.
8666 * c-lex.c (init_c_lex): Set cb->has_attribute to
8667 c_common_has_attribute instead of cb_has_attribute.
8668 (get_token_no_padding): New function.
8669 (cb_has_attribute): Renamed to ...
8670 (c_common_has_attribute): ... this. No longer static. Use
8671 get_token_no_padding, require ()s, don't build TREE_LIST
8672 unnecessarily, fix up formatting, adjust diagnostics, call
8675 2014-12-15 Jason Merrill <jason@redhat.com>
8677 * c.opt (-fsized-deallocation, -Wc++14-compat): New.
8678 (-Wsized-deallocation): New.
8679 * c-opts.c (c_common_post_options): -fsized-deallocation defaults
8680 to on in C++14 and up.
8682 2014-12-11 Jason Merrill <jason@redhat.com>
8684 * c-cppbuiltin.c (c_cpp_builtins): Enable C++14 __cpp_constexpr.
8686 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_runtime_arrays if
8687 we aren't complaining about VLAs.
8689 2014-12-06 Marek Polacek <polacek@redhat.com>
8691 PR tree-optimization/64183
8692 * c-gimplify.c (c_gimplify_expr): Don't convert the RHS of a
8693 shift-expression if it is integer_type_node. Use types_compatible_p.
8695 2014-11-29 Jakub Jelinek <jakub@redhat.com>
8697 * c-common.c (convert_vector_to_pointer_for_subscript): Remove NULL
8698 last argument from create_tmp_var_raw and create_tmp_var calls.
8699 * cilk.c (gimplify_cilk_spawn): Likewise.
8700 * c-omp.c (c_finish_omp_atomic): Likewise.
8702 2014-11-28 Marek Polacek <polacek@redhat.com>
8704 * c-ubsan.c (ubsan_instrument_shift): Use op1_utype for MINUS_EXPR
8705 instead of unsigned_type_node.
8707 2014-11-28 Marek Polacek <polacek@redhat.com>
8710 * c-ubsan.c (ubsan_instrument_shift): Change the type of a MINUS_EXPR
8712 * c-gimplify.c (c_gimplify_expr): Convert right operand of a shift
8713 expression to unsigned_type_node.
8715 2014-11-20 Mark Wielaard <mjw@redhat.com>
8718 * c-opts.c (set_std_c89): Set lang_hooks.name.
8719 (set_std_c99): Likewise.
8720 (set_std_c11): Likewise.
8721 (set_std_cxx98): Likewise.
8722 (set_std_cxx11): Likewise.
8723 (set_std_cxx14): Likewise.
8724 (set_std_cxx1z): Likewise.
8726 2014-11-21 Jakub Jelinek <jakub@redhat.com>
8729 * c-common.h (convert_vector_to_pointer_for_subscript): Change
8730 return type to bool.
8731 * c-common.c: Include gimple-expr.h.
8732 (convert_vector_to_pointer_for_subscript): Change return type to
8733 bool. If *vecp is not lvalue_p and has VECTOR_TYPE, return true
8734 and copy it into a TARGET_EXPR and use that instead of *vecp
8737 2014-11-19 David Malcolm <dmalcolm@redhat.com>
8739 Merger of git branch "gimple-classes-v2-option-3".
8740 * ChangeLog.gimple-classes: New.
8741 * c-gimplify.c (add_block_to_enclosing): Strengthen local "stack"
8742 from being just a vec<gimple> to a vec<gbind *>.
8744 2014-11-18 Jakub Jelinek <jakub@redhat.com>
8747 * c-ubsan.c (ubsan_maybe_instrument_reference_or_call): Change type
8748 argument to ptype, set type to TREE_TYPE (ptype). Don't call
8749 get_pointer_alignment for non-pointers. Use ptype, or if it is
8750 reference type, corresponding pointer type, as type of kind
8752 (ubsan_maybe_instrument_reference,
8753 ubsan_maybe_instrument_member_call): Adjust callers.
8755 2014-11-15 Marek Polacek <polacek@redhat.com>
8758 * array-notation-common.c (is_sec_implicit_index_fn): Return false
8760 (extract_array_notation_exprs): Return for NULL node.
8762 2014-11-12 Joseph Myers <joseph@codesourcery.com>
8764 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Define and
8765 undefine __NO_MATH_ERRNO__ based on changes to -fmath-errno state.
8767 2014-11-12 Jakub Jelinek <jakub@redhat.com>
8770 * c-common.c (check_builtin_function_arguments): Handle
8771 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW.
8773 2014-11-10 Andi Kleen <ak@linux.intel.com>
8776 * c-common.h (check_no_cilk): Declare.
8777 * cilk.c (get_error_location): New function.
8778 (check_no_cilk): Dito.
8780 2014-11-10 Andi Kleen <ak@linux.intel.com>
8782 * cilk.c (recognize_spawn): Use expression location
8785 2014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
8787 * c.opt ([Wshift-count-negative, Wshift-count-overflow]): Add.
8789 2014-11-10 Edward Smith-Rowland <3dw4rd@verizon.net>
8791 * c-cppbuiltin.c (__has_attribute, __has_cpp_attribute): New macros;
8792 (__cpp_rtti, __cpp_exceptions): New macros for C++98;
8793 (__cpp_range_based_for, __cpp_initializer_lists,
8794 __cpp_delegating_constructors, __cpp_nsdmi,
8795 __cpp_inheriting_constructors, __cpp_ref_qualifiers): New macros
8796 for C++11; (__cpp_attribute_deprecated): Remove in favor of
8797 __has_cpp_attribute.
8798 * c-lex.c (cb_has_attribute): New callback CPP function;
8799 (init_c_lex): Set has_attribute callback.
8801 2014-11-04 Richard Biener <rguenther@suse.de>
8803 * c-common.c (shorten_compare): Do not shorten mixed
8804 DFP and non-DFP compares.
8806 2014-11-01 Edward Smith-Rowland <3dw4rd@verizon.net>
8808 * g++.dg/cpp1y/feat-cxx11.C: Commentary and rearrangement of tests.
8809 * g++.dg/cpp1y/feat-cxx11-neg.C: Add aggregate NSDMI test.
8810 Commentary and rearrangement of tests.
8811 * g++.dg/cpp1y/feat-cxx14.C: Enable aggregate NSDMI test.
8812 Commentary and rearrangement of tests.
8813 * g++.dg/cpp1y/feat-cxx98-neg.C: Ditto.
8814 * g++.dg/cpp1y/feat-cxx98.C: Commentary.
8816 2014-10-29 Richard Sandiford <richard.sandiford@arm.com>
8818 * c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant
8819 enum from machine_mode.
8821 2014-10-28 Andrew MacLeod <amacleod@redhat.com>
8823 * c-common.c: Adjust include files.
8824 * c-gimplify.c: Ditto.
8826 * c-pragma.c: Ditto.
8829 2014-10-27 Andrew MacLeod <amacleod@redhat.com>
8831 * c-gimplify.c: Adjust include files.
8833 2014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
8836 * c-opts.c (c_common_diagnostics_set_defaults): Renamed from
8837 c_common_initialize_diagnostics.
8838 * c-common.h: Likewise.
8840 2014-10-24 Marek Polacek <polacek@redhat.com>
8843 * c-pretty-print.c (c_pretty_printer::simple_type_specifier): Don't
8844 print "struct"/"union"/"enum" for typedefed names.
8846 2014-10-23 Marek Polacek <polacek@redhat.com>
8848 * c-ubsan.c (ubsan_instrument_shift): Perform the MINUS_EXPR
8851 2014-10-22 Jakub Jelinek <jakub@redhat.com>
8852 Yury Gribov <y.gribov@samsung.com>
8854 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
8855 ubsan_instrument_vla): Check bits in flag_sanitize_recover bitmask
8856 instead of flag_sanitize_recover as bool flag.
8858 2014-10-21 Kirill Yukhin <kirill.yukhin@intel.com>
8860 * cilk.c: Revert previous change.
8862 2014-10-20 Igor Zamyatin <igor.zamyatin@intel.com>
8865 * cilk.c: Include vec.h.
8866 (struct cilk_decls): New structure.
8867 (wrapper_parm_cb): Split this function to...
8868 (fill_decls_vec): ...this...
8869 (create_parm_list): ...and this.
8870 (compare_decls): New function.
8871 (for_local_cb): Remove.
8872 (wrapper_local_cb): Ditto.
8873 (build_wrapper_type): For now first traverse and fill vector of
8874 declarations then sort it and then deal with sorted vector.
8875 (cilk_outline): Ditto.
8876 (declare_one_free_variable): Ditto.
8878 2014-10-17 Marek Polacek <polacek@redhat.com>
8880 * c-opts.c (c_common_post_options): Set warn_implicit_int.
8881 * c.opt (Wimplicit-int): Initialize to -1.
8883 2014-10-16 Andrew MacLeod <amacleod@redhat.com>
8885 * c-pragma.c: Adjust include files.
8886 * c-semantics.c: Likewise.
8888 2014-10-16 DJ Delorie <dj@redhat.com>
8890 * c-cppbuiltin.c (cpp_atomic_builtins): Don't assume pointers are
8893 2014-10-14 Jason Merrill <jason@redhat.com>
8896 * c-common.h (CPP_PREPARSED_EXPR): New.
8897 (N_CP_TTYPES): Adjust.
8899 2014-10-15 Marek Polacek <polacek@redhat.com>
8901 * c-opts.c (c_common_init_options): Make -std=gnu11 the default for C.
8903 2014-10-14 DJ Delorie <dj@redhat.com>
8905 * c-pretty-print.c (pp_c_integer_constant): Check for all __intN
8906 types, not just __int128.
8907 * c-cppbuiltin.c (c_cpp_builtins): Add builtins for all __intN
8908 types, not just __int128.
8909 (cpp_atomic_builtins): Round pointer sizes up.
8910 (type_suffix): Use type precision, not specific types.
8911 * c-common.c (c_common_reswords): Remove __int128 special case.
8912 (c_common_type_for_size): Check for all __intN types, not just
8914 (c_common_type_for_mode): Likewise.
8915 (c_common_signed_or_unsigned_type): Likewise.
8916 (c_build_bitfield_integer_type): Likewise.
8917 (c_common_nodes_and_builtins): Likewise.
8918 (keyword_begins_type_specifier): Likewise.
8919 * c-common.h (rid): Remove RID_INT128 and add RID_INT_N_* for all
8922 2014-10-12 Trevor Saunders <tsaunders@mozilla.com>
8924 * c-common.c: Use hash_table instead of hashtab.
8926 2014-10-06 Edward Smith-Rowland <3dw4rd@verizon.net>
8928 * c-cppbuiltin.c: Move __cpp_attribute_deprecated to the
8931 2014-10-03 Marc Glisse <marc.glisse@inria.fr>
8936 * c-common.c (warn_logical_operator): Punt for vectors.
8938 2014-10-01 Edward Smith-Rowland <3dw4rd@verizon.net>
8940 Implement SD-6: SG10 Feature Test Recommendations
8941 * c-cppbuiltin.c (c_cpp_builtins()): Define language feature
8942 macros and the __has_header macro.
8944 2014-09-30 Jason Merrill <jason@redhat.com>
8946 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_ASSIGNABLE and
8947 RID_IS_TRIVIALLY_CONSTRUCTIBLE.
8948 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
8950 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_COPYABLE.
8951 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
8953 * c-common.h (enum rid): Remove RID_IS_CONVERTIBLE_TO.
8954 * c-common.c (c_common_reswords): Remove __is_convertible_to.
8956 2014-09-24 Marek Polacek <polacek@redhat.com>
8960 * c-common.h (struct c_common_resword): Don't define CPP_KEYWORD.
8962 2014-09-23 Andi Kleen <ak@linux.intel.com>
8964 * c-common.c (handle_no_reorder_attribute): New function.
8965 (c_common_attribute_table): Add no_reorder attribute.
8967 2014-09-22 Joseph Myers <joseph@codesourcery.com>
8969 * c-cppbuiltin.c (c_cpp_builtins): Define
8970 __LIBGCC_*_EXCESS_PRECISION__ macros for supported floating-point
8973 2014-09-18 Joseph Myers <joseph@codesourcery.com>
8975 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_*_FUNC_EXT__
8976 for supported floating-point modes.
8978 2014-09-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
8980 * c.opt (Wpsabi): Use LangEnabledBy.
8981 * c-opts.c (c_common_handle_option): Do not handle here.
8983 2014-09-12 Joseph Myers <joseph@codesourcery.com>
8985 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_HAS_%s_MODE__
8986 macros for floating-point modes.
8988 2014-09-11 Marc Glisse <marc.glisse@inria.fr>
8991 * c-cppbuiltin.c (builtin_define_float_constants): Correct
8992 __*_DENORM_MIN__ without denormals.
8994 2014-09-10 Jakub Jelinek <jakub@redhat.com>
8996 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
8997 ubsan_instrument_vla, ubsan_instrument_return): Adjust
8998 ubsan_create_data callers.
8999 (ubsan_instrument_bounds): Don't emit UBSAN_BOUNDS at all if
9000 index is constant or BIT_AND_EXPR with constant mask and is
9001 small enough for the bound.
9002 * c-gimplify.c (ubsan_walk_array_refs_r): For ADDR_EXPR of
9003 ARRAY_REF, make sure the inner ARRAY_REF is not walked again.
9005 2014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
9007 * c.opt: Add CppReason to various flags.
9008 (Wdate-time): Re-sort.
9009 * c-common.c: Include c-common.h earlier.
9010 (struct reason_option_codes_t): Delete.
9011 (c_option_controlling_cpp_error): Prefix global type and struct
9014 2014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
9016 * c.opt (Wnormalized): New.
9017 (Wnormalized=): Use Enum and Reject Negative.
9018 * c-opts.c (c_common_handle_option): Do not handle Wnormalized here.
9020 2014-09-08 Joseph Myers <joseph@codesourcery.com>
9022 * c-cppbuiltin.c (c_cpp_builtins): Define macros for mantissa
9023 digits of floating-point modes if -fbuilding-libgcc.
9025 2014-09-05 Joseph Myers <joseph@codesourcery.com>
9027 * c-cppbuiltin.c (c_cpp_builtins): Also define
9028 __LIBGCC_EH_TABLES_CAN_BE_READ_ONLY__,
9029 __LIBGCC_EH_FRAME_SECTION_NAME__, __LIBGCC_JCR_SECTION_NAME__,
9030 __LIBGCC_CTORS_SECTION_ASM_OP__, __LIBGCC_DTORS_SECTION_ASM_OP__,
9031 __LIBGCC_TEXT_SECTION_ASM_OP__, __LIBGCC_INIT_SECTION_ASM_OP__,
9032 __LIBGCC_INIT_ARRAY_SECTION_ASM_OP__,
9033 __LIBGCC_STACK_GROWS_DOWNWARD__,
9034 __LIBGCC_DONT_USE_BUILTIN_SETJMP__,
9035 __LIBGCC_DWARF_ALT_FRAME_RETURN_COLUMN__,
9036 __LIBGCC_DWARF_FRAME_REGISTERS__,
9037 __LIBGCC_EH_RETURN_STACKADJ_RTX__, __LIBGCC_JMP_BUF_SIZE__,
9038 __LIBGCC_STACK_POINTER_REGNUM__ and
9039 __LIBGCC_VTABLE_USES_DESCRIPTORS__ for -fbuilding-libgcc.
9040 (builtin_define_with_value): Handle backslash-escaping in string
9043 2014-09-05 Richard Biener <rguenther@suse.de>
9046 * c-format.c (check_format_arg): Properly handle
9047 effectively signed POINTER_PLUS_EXPR offset.
9049 2014-09-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
9051 * c.opt (Wc90-c99-compat,Wc++-compat,Wcomment,Wendif-labels,
9052 Winvalid-pch,Wlong-long,Wmissing-include-dirs,Wmultichar,Wpedantic,
9053 (Wdate-time,Wtraditional,Wundef,Wvariadic-macros): Add CPP, Var
9055 * c-opts.c (c_common_handle_option): Do not handle here.
9056 (sanitize_cpp_opts): Likewise.
9057 * c-common.c (struct reason_option_codes_t): Handle
9058 CPP_W_C90_C99_COMPAT and CPP_W_PEDANTIC.
9060 2014-09-03 Marek Polacek <polacek@redhat.com>
9062 * c.opt (Wlogical-not-parentheses): Enable by -Wall.
9064 2014-09-02 Jakub Jelinek <jakub@redhat.com>
9065 Balaji V. Iyer <balaji.v.iyer@intel.com>
9066 Igor Zamyatin <igor.zamyatin@intel.com>
9068 * c-cilkplus.c (cilk_for_number_of_iterations): New function.
9069 * c-common.c (c_common_reswords): Added _Cilk_for.
9070 * c-common.h (enum rid): Added RID_CILK_FOR.
9071 (cilk_for_number_of_iterations): Add declaration.
9072 * c-omp.c (c_finish_omp_for): Added checks for CILK_SIMD and
9074 * c-pragma.c (init_pragma): Register "grainsize" pragma.
9075 * c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_GRAINSIZE.
9077 2014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
9079 * c.opt (Wbuiltin-macro-redefined,Wdeprecated,Wendif-labels,
9080 Winvalid-pch,Wliteral-suffix,Wmissing-include-dirs,Wtrigraphs,
9081 Wundef): Use CPP, Var and Init.
9082 * c-opts.c (c_common_handle_option): Do not handle the above flags here.
9084 2014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
9086 * c.opt (Wbuiltin-macro-redefined): Use CPP, Var and Init.
9087 * c-opts.c (c_common_handle_option): Do not handle here.
9089 2014-08-25 Jason Merrill <jason@redhat.com>
9091 * c.opt: Change -std=c++1y and -std=gnu++1y to be aliases for
9092 -std=c++14 and -std=gnu++14, rather than the reverse.
9093 * c-opts.c (c_common_handle_option): Change OPT_std_c__1y and
9094 OPT_std_gnu__1y to OPT_std_c__14 and OPT_std_gnu__14.
9095 * c-common.h (cxx_dialect): Remove cxx1y.
9097 2014-08-23 Edward Smith-Rowland <3dw4rd@verizon.net>
9099 * c-common.h (enum cxx_dialect): Add cxx14.
9100 * c-opts.c (set_std_cxx1y): Rename to set_std_cxx14; Use cxx14.
9101 * c-ubsan.c (ubsan_instrument_shift): Change comment and logic from
9102 cxx_dialect == cxx11 || cxx_dialect == cxx1y to cxx_dialect >= cxx11.
9104 2014-08-22 Jason Merrill <jason@redhat.com>
9106 * c.opt (std=gnu++17): Fix alias.
9108 2014-08-22 Marek Polacek <polacek@redhat.com>
9111 * c-common.c (warn_logical_not_parentheses): Don't check LHS. Don't
9112 check for vector types. Drop LHS argument.
9113 * c-common.h (warn_logical_not_parentheses): Adjust.
9115 2014-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
9117 * c.opt (Wcomment): Use CPP, Var and LangEnabledBy.
9118 (Wmultichar): Likewise.
9119 (Wdate-time): Use C-family languages instead of Common. Use CPP
9121 * c-opts.c (c_common_handle_option): Do not handle the above
9123 (sanitize_cpp_opts): Likewise.
9125 2014-08-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
9128 * c-opts.c: Include tree-diagnostics.h.
9129 (c_diagnostic_finalizer): New.
9130 (c_common_initialize_diagnostics): Use it.
9132 2014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
9134 PR preprocessor/51303
9135 * c-common.c (struct reason_option_codes_t option_codes):
9136 Add CPP_W_MISSING_INCLUDE_DIRS. Sort alphabetically.
9138 2014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
9142 * c.opt (Wvariadic-macros): Use CPP and LangEnabledBy.
9143 * c-opts.c (c_common_handle_option): Call cpp_handle_option_auto.
9144 (c_common_post_options): Call init_global_opts_from_cpp.
9145 (sanitize_cpp_opts): Do not handle Wvariadic-macros here.
9147 2014-08-19 Marek Polacek <polacek@redhat.com>
9150 * c-common.c (maybe_warn_bool_compare): New function.
9151 * c-common.h (maybe_warn_bool_compare): Declare.
9152 * c.opt (Wbool-compare): New option.
9154 2014-08-19 Marek Polacek <polacek@redhat.com>
9156 * c.opt (Wc99-c11-compat): New option.
9158 2014-08-19 Marek Polacek <polacek@redhat.com>
9160 * c-opts.c (sanitize_cpp_opts): Make warn_long_long be set according
9161 to warn_c90_c99_compat.
9162 * c.opt (Wc90-c99-compat, Wdeclaration-after-statement): Initialize
9165 2014-08-19 Manuel López-Ibáñez <manu@gcc.gnu.org>
9166 Steven Bosscher <steven@gcc.gnu.org>
9169 * c-format.c: Add extra_arg_loc and format_string_loc to struct
9170 format_check_results.
9171 (check_function_format): Use true and add comment for boolean
9173 (finish_dollar_format_checking): Use explicit location when warning.
9174 (check_format_info): Likewise.
9175 (check_format_arg): Set extra_arg_loc and format_string_loc.
9176 (check_format_info_main): Use explicit location when warning.
9177 (check_format_types): Pass explicit location.
9178 (format_type_warning): Likewise.
9180 2014-08-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
9183 * c-format.c: Handle Fortran flags.
9185 2014-08-12 Igor Zamyatin <igor.zamyatin@intel.com>
9188 * array-notation-common.c (find_rank): Added handling for other
9189 types of references.
9191 2014-08-10 Marek Polacek <polacek@redhat.com>
9194 * c-opts.c (sanitize_cpp_opts): Pass warn_c90_c99_compat to libcpp.
9195 * c.opt (Wc90-c99-compat): Add option.
9197 2014-08-07 Trevor Saunders <tsaunders@mozilla.com>
9199 * c-gimplify.c, cilk.c: Remove includes of pointer-set.h.
9201 2014-08-03 Marek Polacek <polacek@redhat.com>
9203 * c-common.c (check_case_value): Add location_t parameter. Use it.
9204 (c_add_case_label): Pass loc to check_case_value.
9206 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
9208 * cilk.c: Use hash_map instead of pointer_map.
9210 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
9212 * c-gimplify.c: Use hash_set instead of pointer_set.
9214 2014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
9217 * array-notation-common.c (extract_array_notation_exprs): Handling
9220 2014-08-01 Jakub Jelinek <jakub@redhat.com>
9222 * c-common.h (min_align_of_type): Removed prototype.
9223 * c-common.c (min_align_of_type): Removed.
9224 * c-ubsan.h (ubsan_maybe_instrument_reference,
9225 ubsan_maybe_instrument_member_call): New prototypes.
9226 * c-ubsan.c: Include stor-layout.h and builtins.h.
9227 (ubsan_maybe_instrument_reference_or_call,
9228 ubsan_maybe_instrument_reference, ubsan_maybe_instrument_call): New
9231 2014-07-31 Marc Glisse <marc.glisse@inria.fr>
9234 * c.opt (-Wreturn-local-addr): Move to common.opt.
9236 2014-07-30 Jason Merrill <jason@redhat.com>
9241 * c.opt (-fuse-all-virtuals): New.
9243 2014-07-30 Tom Tromey <tromey@redhat.com>
9246 * c.opt (Wdesignated-init): New option.
9247 * c-common.c (c_common_attribute_table): Add "designated_init".
9248 (handle_designated_init): New function.
9250 2014-07-24 Marek Polacek <polacek@redhat.com>
9253 * c-opts.c (c_finish_options): If -imacros is in effect, return.
9255 2014-07-16 Dodji Seketeli <dodji@redhat.com>
9257 PR preprocessor/60723 - missing system-ness marks for macro tokens
9258 * c-ppoutput.c (struct print::prev_was_system_token): New data
9260 (init_pp_output): Initialize it.
9261 (maybe_print_line_1, maybe_print_line, print_line_1, print_line)
9262 (do_line_change): Return a flag saying if a line marker was
9264 (scan_translation_unit): Detect if the system-ness of the token we
9265 are about to emit is different from the one of the previously
9266 emitted token. If so, emit a line marker. Avoid emitting useless
9267 adjacent line markers. Avoid emitting line markers for tokens
9268 originating from the expansion of built-in macros.
9269 (scan_translation_unit_directives_only): Adjust.
9271 2014-07-15 Marek Polacek <polacek@redhat.com>
9273 * c-ubsan.c (ubsan_instrument_bounds): Don't instrument if
9274 TYPE_MAX_VALUE is NULL.
9276 2014-07-14 Jakub Jelinek <jakub@redhat.com>
9279 * c.opt (Wmemset-transposed-args): New warning.
9281 2014-07-10 Jason Merrill <jason@redhat.com>
9285 * c.opt (-fuse-all-virtuals): New.
9287 2014-07-09 Richard Biener <rguenther@suse.de>
9290 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
9291 using unsigned arithmetic if overflow does not wrap instead of
9292 if overflow is undefined.
9294 2014-07-06 Marek Polacek <polacek@redhat.com>
9297 * c.opt (Wsizeof-array-argument): New option.
9299 2014-07-03 Jakub Jelinek <jakub@redhat.com>
9301 * c-ada-spec.c (dump_ada_nodes): Don't call qsort if
9302 comments->count <= 1, as comments->entries might be NULL.
9304 2014-07-01 Marek Polacek <polacek@redhat.com>
9306 * c.opt (Wint-conversion): New option.
9308 2014-07-01 Marek Polacek <polacek@redhat.com>
9311 * c.opt (Wincompatible-pointer-types): New option.
9313 2014-06-30 Paolo Carlini <paolo.carlini@oracle.com>
9316 * c-common.c (handle_noreturn_attribute, handle_const_attribute):
9317 Do not discard TYPE_QUALS of type.
9319 2014-06-26 Jason Merrill <jason@redhat.com>
9321 * c-common.h (enum cxx_dialect): Add cxx1z.
9322 * c.opt (std=c++1z, std=c++17, std=gnu++1z, std=gnu++17): New.
9323 * c-opts.c (c_common_handle_option, set_std_cxx1z): Handle it.
9325 2014-06-26 Teresa Johnson <tejohnson@google.com>
9327 * c-common.h (get_dump_info): Declare.
9328 * c-gimplify.c (c_genericize): Use saved dump files.
9329 * c-opts.c (c_common_parse_file): Begin and end dumps
9330 once around parsing invocation.
9331 (get_dump_info): New function.
9333 2014-06-23 Marek Polacek <polacek@redhat.com>
9334 Andrew MacLeod <amacleod@redhat.com>
9337 * c-common.c (get_atomic_generic_size): Don't segfault if the
9338 type doesn't have a size.
9340 2014-06-20 Marek Polacek <polacek@redhat.com>
9342 * c-gimplify.c: Include "c-ubsan.h" and "pointer-set.h".
9343 (ubsan_walk_array_refs_r): New function.
9344 (c_genericize): Instrument array bounds.
9345 * c-ubsan.c: Include "internal-fn.h".
9346 (ubsan_instrument_division): Mark instrumented arrays as having
9347 side effects. Adjust ubsan_type_descriptor call.
9348 (ubsan_instrument_shift): Likewise.
9349 (ubsan_instrument_vla): Adjust ubsan_type_descriptor call.
9350 (ubsan_instrument_bounds): New function.
9351 (ubsan_array_ref_instrumented_p): New function.
9352 (ubsan_maybe_instrument_array_ref): New function.
9353 * c-ubsan.h (ubsan_instrument_bounds): Declare.
9354 (ubsan_array_ref_instrumented_p): Declare.
9355 (ubsan_maybe_instrument_array_ref): Declare.
9357 2014-06-20 Hale Wang <hale.wang@arm.com>
9360 * c.opt (fshort-enums): Add to LTO.
9361 * c.opt (fshort-wchar): Likewise.
9363 2014-06-16 Marek Polacek <polacek@redhat.com>
9366 * c.opt (Wswitch-bool): Add Var.
9368 2014-06-12 Jakub Jelinek <jakub@redhat.com>
9371 * c-omp.c (c_omp_split_clauses): Don't crash on firstprivate in
9372 #pragma omp target teams or
9373 #pragma omp {,target }teams distribute simd.
9375 2014-06-12 Jason Merrill <jason@redhat.com>
9377 * c.opt (Wabi=, fabi-compat-version): New.
9378 * c-opts.c (c_common_handle_option): Handle -Wabi=.
9379 (c_common_post_options): Handle flag_abi_compat_version default.
9380 Disallow -fabi-compat-version=1.
9381 * c-common.h (abi_version_crosses): New.
9383 2014-06-11 Jan Hubicka <hubicka@ucw.cz>
9385 * c-common.c (handle_section_attribute): Update handling for
9386 section names that are no longer trees.
9388 2014-06-10 Jakub Jelinek <jakub@redhat.com>
9391 * c-pragma.c (omp_pragmas_simd): Move PRAGMA_OMP_TASK...
9392 (omp_pragmas): ... back here.
9394 2014-06-05 Marek Polacek <polacek@redhat.com>
9397 * c-common.c (warn_logical_not_parentheses): New function.
9398 * c-common.h (warn_logical_not_parentheses): Declare.
9399 * c.opt (Wlogical-not-parentheses): New option.
9401 2014-06-04 Marek Polacek <polacek@redhat.com>
9404 * c-common.c (check_case_bounds): Add location parameter.
9406 (c_add_case_label): Pass loc to check_case_bounds.
9408 2014-06-03 Marek Polacek <polacek@redhat.com>
9411 * c.opt (Wswitch-bool): New option.
9413 2014-05-22 Thomas Schwinge <thomas@codesourcery.com>
9415 * c-common.h (c_omp_sharing_predetermined, c_omp_remap_decl):
9417 (record_types_used_by_current_var_decl): Move prototype to where
9420 * c-common.c (DEF_FUNCTION_TYPE_0, DEF_FUNCTION_TYPE_6)
9421 (DEF_FUNCTION_TYPE_7, DEF_FUNCTION_TYPE_8)
9422 (DEF_FUNCTION_TYPE_VAR_5): Cosmetic fixes.
9424 2014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
9426 * c-common.h (CTI_VOID_ZERO, void_zero_node): Delete.
9427 * c-common.c (c_common_nodes_and_builtins): Don't initialize
9429 * c-pretty-print.c (pp_c_void_constant): New function.
9430 (c_pretty_printer::constant, c_pretty_printer::primary_expression)
9431 (c_pretty_printer::expression): Handle VOID_CST.
9432 * cilk.c (extract_free_variables): Likewise.
9433 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift)
9434 (ubsan_instrument_vla): Use void_node instead of void_zero_node.
9436 2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
9438 * c-common.h (sorted_fields_type): Remove variable_size GTY attribute.
9439 * c-pragma.c (push_alignment): Adjust.
9440 (handle_pragma_push_options): Likewise.
9442 2014-05-09 Marek Polacek <polacek@redhat.com>
9445 * c-common.c (check_user_alignment): Return -1 if alignment is error
9447 (handle_aligned_attribute): Don't call default_conversion on
9449 (handle_vector_size_attribute): Likewise.
9450 (handle_tm_wrap_attribute): Handle case when wrap_decl is error node.
9451 (handle_sentinel_attribute): Call default_conversion and allow even
9452 integral types as an argument.
9454 2014-05-08 Marek Polacek <polacek@redhat.com>
9457 * c-common.c (min_align_of_type): New function factored out from...
9458 (c_sizeof_or_alignof_type): ...here.
9459 * c-common.h (min_align_of_type): Declare.
9461 2014-05-08 Marek Polacek <polacek@redhat.com>
9464 * c-common.c (check_main_parameter_types): Warn for _Atomic-qualified
9465 parameter type of main.
9467 2014-05-07 DJ Delorie <dj@redhat.com>
9469 * c-cppbuiltin.c (print_bits_of_hex): New.
9470 (builtin_define_type_minmax): Print values using hex so as not to
9471 require a pre-computed list of string values.
9473 2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
9474 Mike Stump <mikestump@comcast.net>
9475 Richard Sandiford <rdsandiford@googlemail.com>
9477 * c-ada-spec.c: Include wide-int.h.
9478 (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Remove.
9479 (dump_generic_ada_node): Use wide-int interfaces.
9480 * c-common.c: Include wide-int-print.h.
9481 (shorten_compare): Use wide-int interfaces and tree_int_cst_lt.
9482 (pointer_int_sum): Use wide-int interfaces.
9483 (c_common_nodes_and_builtins): Use make_int_cst.
9484 (match_case_to_enum_1): Use tree_fits_uhwi_p and tree_fits_shwi_p.
9485 (handle_alloc_size_attribute): Use wide-int interfaces.
9486 (get_nonnull_operand): Likewise.
9487 * c-format.c (get_constant): Use tree_fits_uhwi_p.
9488 * c-lex.c: Include wide-int.h.
9489 (narrowest_unsigned_type): Take a widest_int rather than two
9491 (narrowest_signed_type): Likewise.
9492 (interpret_integer): Update accordingly. Use wide-int interfaces.
9493 (lex_charconst): Use wide-int interfaces.
9494 * c-pretty-print.c: Include wide-int.h.
9495 (pp_c_integer_constant): Use wide-int interfaces.
9496 * cilk.c (declare_one_free_variable): Use tree_int_cst_lt instead of
9497 INT_CST_LT_UNSIGNED.
9499 2014-05-06 Richard Biener <rguenther@suse.de>
9501 * c-opts.c (c_common_post_options): For -freestanding,
9502 -fno-hosted and -fno-builtin disable pattern recognition
9503 if not enabled explicitely.
9505 2014-05-02 Marek Polacek <polacek@redhat.com>
9507 * c.opt (Wsizeof-pointer-memaccess): Describe option.
9509 2014-05-01 Marek Polacek <polacek@redhat.com>
9512 * c.opt (Wdiscarded-qualifiers): Add.
9514 2014-04-30 Marek Polacek <polacek@redhat.com>
9516 * c-ubsan.c (ubsan_instrument_division): Handle REAL_TYPEs. Perform
9517 INT_MIN / -1 sanitization only for integer types.
9519 2014-04-25 Marek Polacek <polacek@redhat.com>
9522 * c-common.c (handle_noinline_attribute): Warn if the attribute
9523 conflicts with always_inline attribute.
9524 (handle_always_inline_attribute): Warn if the attribute conflicts
9525 with noinline attribute.
9527 2014-04-25 Marek Polacek <polacek@redhat.com>
9530 * c-common.c (check_main_parameter_types): Warn about variadic main.
9532 2014-04-24 Mike Stump <mikestump@comcast.net>
9534 * c.opt (Wshadow-ivar): Default to on.
9536 2014-04-24 Dimitris Papavasiliou <dpapavas@gmail.com>
9538 * c.opt (Wshadow-ivar, flocal-ivars, fivar-visibility): Add.
9540 2014-04-23 Marek Polacek <polacek@redhat.com>
9542 * c-common.c (handle_tm_wrap_attribute): Tweak error message.
9544 2014-04-22 Jakub Jelinek <jakub@redhat.com>
9547 * c-ubsan.c (ubsan_instrument_return): Return __builtin_trap ()
9548 if flag_sanitize_undefined_trap_on_error.
9549 (ubsan_instrument_division, ubsan_instrument_shift,
9550 ubsan_instrument_vla): Likewise. Use __ubsan_handle_*_abort ()
9551 if !flag_sanitize_recover.
9553 2014-04-22 Marc Glisse <marc.glisse@inria.fr>
9556 * c-common.c (registered_builtin_types): Make non-static.
9557 * c-common.h (registered_builtin_types): Declare.
9559 2014-04-14 Richard Biener <rguenther@suse.de>
9560 Marc Glisse <marc.glisse@inria.fr>
9563 * c-common.c (convert_vector_to_pointer_for_subscript): Properly
9564 apply may-alias the scalar pointer type when applicable.
9566 2014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
9569 * cilk.c (cilk_set_spawn_marker): Remove FUNCTION_DECL
9570 as possible argument for Cilk_spawn.
9572 2014-04-11 Tobias Burnus <burnus@net-b.de>
9575 * c.opt (Wformat-signedness): Add
9576 * c-format.c(check_format_types): Use it.
9578 2014-04-11 Jason Merrill <jason@redhat.com>
9581 * c-common.c (sync_resolve_size, get_atomic_generic_size): Call
9582 default_conversion for an array argument.
9584 2014-04-08 Marek Polacek <polacek@redhat.com>
9587 * c-ubsan.c: Include asan.h.
9588 (ubsan_instrument_return): Call initialize_sanitizer_builtins.
9590 2014-04-03 Nathan Sidwell <nathan@codesourcery.com>
9592 * c.opt (Wnon-virtual-dtor): Auto set when Weffc++.
9594 2014-04-02 Marek Polacek <polacek@redhat.com>
9596 * c-common.h (c_expand_expr): Remove declaration.
9598 2014-03-28 Jakub Jelinek <jakub@redhat.com>
9601 * c-common.c (add_atomic_size_parameter): When creating new
9602 params vector, push the size argument first.
9604 2014-03-26 Jakub Jelinek <jakub@redhat.com>
9606 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
9607 ubsan_instrument_vla, ubsan_instrument_return): Adjust
9608 ubsan_create_data callers.
9610 2014-03-22 Jakub Jelinek <jakub@redhat.com>
9613 * c-opts.c (c_finish_options): Restore cb_file_change call to
9616 2014-03-13 Jakub Jelinek <jakub@redhat.com>
9619 * c-pragma.c (apply_pragma_weak): Only look at
9620 TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl)) if
9621 DECL_ASSEMBLER_NAME_SET_P (decl).
9622 (maybe_apply_pending_pragma_weaks): Exit early if
9623 vec_safe_is_empty (pending_weaks) rather than only when
9625 (maybe_apply_pragma_weak): Likewise. If !DECL_ASSEMBLER_NAME_SET_P,
9626 set assembler name back to NULL afterwards.
9628 2014-03-11 Jason Merrill <jason@redhat.com>
9630 * c.opt: Add -std=gnu++14.
9632 2014-03-11 Ian Bolton <ian.bolton@arm.com>
9634 * c-opts.c (c_common_post_options): Don't override
9635 -ffp-contract=fast if unsafe-math-optimizations is on.
9637 2014-03-08 Paulo Matos <paulo@matos-sorge.com>
9639 * c.opt: Enable LTO FE for fshort-double.
9641 2014-03-07 Jason Merrill <jason@redhat.com>
9643 * c.opt: Add -std=c++14.
9645 2014-03-06 Marek Polacek <polacek@redhat.com>
9648 * cilk.c (contains_cilk_spawn_stmt): New function.
9649 (contains_cilk_spawn_stmt_walker): Likewise.
9650 (recognize_spawn): Give error on invalid use of _Cilk_spawn.
9651 * c-common.h (contains_cilk_spawn_stmt): Add declaration.
9653 2014-03-03 Jakub Jelinek <jakub@redhat.com>
9655 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_SIMD.
9656 (init_pragma): Call cpp_register_deferred_pragma for PRAGMA_CILK_SIMD
9657 even when flag_preprocess_only.
9659 2014-02-26 Jason Merrill <jason@redhat.com>
9663 * c-common.c (shorten_compare): Don't check
9664 c_inhibit_evaluation_warnings.
9666 2014-02-19 Jakub Jelinek <jakub@redhat.com>
9669 * c-common.c (c_common_nodes_and_builtins): When initializing
9670 c_uint{16,32,64}_type_node, also set corresponding
9671 uint{16,32,64}_type_node to the same value.
9674 * c-pragma.c (init_pragma): Don't call cpp_register_deferred_pragma
9675 for PRAGMA_IVDEP if flag_preprocess_only.
9677 2014-02-12 Jakub Jelinek <jakub@redhat.com>
9680 * c-common.c (merge_tlist): If copy is true, call new_tlist,
9681 if false, add ADD itself, rather than vice versa.
9682 (verify_tree): For COND_EXPR, don't call merge_tlist with non-zero
9683 copy. For SAVE_EXPR, only call merge_tlist once.
9685 2014-02-08 Jakub Jelinek <jakub@redhat.com>
9688 * c-common.c (handle_alloc_size_attribute): Use tree_fits_uhwi_p
9690 (handle_alloc_align_attribute, handle_assume_aligned_attribute): New
9692 (c_common_attribute_table): Add alloc_align and assume_aligned
9695 2014-02-06 Marek Polacek <polacek@redhat.com>
9698 * c-common.c (warn_for_sign_compare): Call warning_at with location
9701 2014-02-05 Marek Polacek <polacek@redhat.com>
9704 * c-omp.c (c_finish_omp_atomic): Remove unreachable return
9707 2014-02-04 Marek Polacek <polacek@redhat.com>
9710 * c-common.c (conversion_warning): Unwrap C_MAYBE_CONST_EXPR and/or
9713 2014-02-03 Marc Glisse <marc.glisse@inria.fr>
9717 * c-common.c (handle_aligned_attribute, handle_alloc_size_attribute,
9718 handle_vector_size_attribute, handle_nonnull_attribute): Call
9719 default_conversion on the attribute argument.
9720 (handle_nonnull_attribute): Increment the argument number.
9722 2014-01-31 Marek Polacek <polacek@redhat.com>
9725 * c-common.c (add_atomic_size_parameter): Pass vNULL to
9726 build_function_call_vec.
9727 (resolve_overloaded_builtin): Likewise.
9728 * c-common.h (build_function_call_vec): Adjust declaration.
9730 2014-01-30 Marek Polacek <polacek@redhat.com>
9733 * c-common.h (unsafe_conversion_p): Adjust declaration.
9734 (warnings_for_convert_and_check): Likewise.
9735 (convert_and_check): Likewise.
9736 * c-common.c (unsafe_conversion_p): Add location parameter. Call
9737 expansion_point_location_if_in_system_header on it.
9738 (warnings_for_convert_and_check): Add location parameter. Call
9739 expansion_point_location_if_in_system_header on it. Use it.
9740 (convert_and_check): Add location parameter. Use it.
9741 (conversion_warning): Likewise.
9742 (c_add_case_label): Adjust convert_and_check calls.
9743 (scalar_to_vector): Adjust unsafe_conversion_p calls.
9745 2014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
9747 * c-common.c (c_define_builtins): Replaced flag_enable_cilkplus with
9749 * c-pragma.c (init_pragma): Likewise.
9752 2014-01-23 Marek Polacek <polacek@redhat.com>
9755 * c-common.c (shorten_compare): Add location_t parameter.
9756 * c-common.h (shorten_binary_op): Adjust declaration.
9758 2014-01-23 Marek Polacek <polacek@redhat.com>
9761 * c-common.c (pointer_to_zero_sized_aggr_p): New function.
9762 * c-common.h: Declare it.
9764 2014-01-20 Eric Botcazou <ebotcazou@adacore.com>
9766 * c-ada-spec.h (dump_ada_specs): Revert prototype change.
9767 * c-ada-spec.c (dump_ads): Likewise.
9768 (cpp_check): Likewise.
9769 (dump_ada_specs): Likewise.
9771 2014-01-15 Laurent Alfonsi <laurent.alfonsi@st.com>
9774 * c-common.c (handle_no_instrument_function_attribute): Allow
9775 no_instrument_function attribute in class member
9776 definition/declaration.
9778 2014-01-15 Jakub Jelinek <jakub@redhat.com>
9781 * c-omp.c (c_finish_omp_atomic): Set in_late_binary_op around
9782 build_modify_expr with non-NOP_EXPR opcode. Handle return from it
9783 being COMPOUND_EXPR.
9784 (c_finish_omp_for): Handle incr being COMPOUND_EXPR with first
9785 operand a SAVE_EXPR and second MODIFY_EXPR.
9787 2014-01-09 Jakub Jelinek <jakub@redhat.com>
9790 * c-pch.c (c_common_write_pch): Call
9791 prepare_target_option_nodes_for_pch.
9793 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
9795 Update copyright years
9797 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
9799 * array-notation-common.c, c-cilkplus.c: Use the standard form for
9800 the copyright notice.
9802 2013-12-28 Eric Botcazou <ebotcazou@adacore.com>
9804 * c-ada-spec.c (print_constructor): New function.
9805 (print_destructor): Retrieve the origin of the destructor.
9806 (print_ada_declaration): Revamp handling of constructors/destructors.
9808 2013-12-23 Stuart Hastings <stuart@apple.com>
9809 Bill Maddox <maddox@google.com>
9810 Jason Merrill <jason@redhat.com>
9812 * c.opt: Add -fdeclone-ctor-dtor.
9813 * c-opts.c (c_common_post_options): Default to on iff -Os.
9815 2013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
9817 * c-common.c (c_common_attribute_table): Added "cilk simd function"
9819 * c-pragma.h (enum pragma_cilk_clause): Remove.
9820 (enum pragma_omp_clause): Added the following fields:
9821 PRAGMA_CILK_CLAUSE_NOMASK, PRAGMA_CILK_CLAUSE_MASK,
9822 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_NONE,
9823 PRAGMA_CILK_CLAUSE_LINEAR, PRAGMA_CILK_CLAUSE_PRIVATE,
9824 PRAGMA_CILK_CLAUSE_FIRSTPRIVATE, PRAGMA_CILK_CLAUSE_LASTPRIVATE,
9825 PRAGMA_CILK_CLAUSE_UNIFORM.
9828 2013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
9830 * cilk.c (cilk_outline): Made this function non-static.
9831 (gimplify_cilk_spawn): Removed pre_p and post_p arguments.
9832 (create_cilk_wrapper): Added a new parameter: a function pointer.
9833 (c_install_body_w_frame_cleanup): Remove
9834 (extract_free_variables): Added VEC_INIT_EXPR and CONSTRUCTOR case.
9835 * c-common.h (cilk_outline): New prototype.
9836 (gimplify_cilk_spawn): Removed two parameters.
9837 (cilk_install_body_with_frame_cleanup): New prototype.
9838 * c-gimplify.c (c_gimplify_expr): Added MODIFY_EXPR, CALL_EXPR and
9839 CILK_SPAWN_STMT case.
9841 2013-12-11 Bernd Schmidt <bernds@codesourcery.com>
9843 * c-common.c (c_fully_fold_internal): Handle ADDR_SPACE_CONVERT_EXPR.
9845 * c-common.h (enum c_tree_index): Remove CTI_INT_ARRAY_TYPE.
9846 (int_array_type_node): Remove.
9847 * c-common.c (c_common_nodes_and_builtins): Don't build it.
9849 2013-12-05 Marek Polacek <polacek@redhat.com>
9852 * c-common.c (c_sizeof_or_alignof_type): Move a declaration into
9853 [ADJUST_FIELD_ALIGN].
9855 2013-12-04 Joseph Myers <joseph@codesourcery.com>
9858 * c-common.c (c_sizeof_or_alignof_type): Add parameter min_alignof
9859 and check field alignment if set.
9860 * c-common.h (c_sizeof_or_alignof_type): Update prototype.
9861 (c_sizeof, c_alignof): Update calls to c_sizeof_or_alignof_type.
9863 2013-12-04 Jakub Jelinek <jakub@redhat.com>
9864 Marek Polacek <polacek@redhat.com>
9866 * c-gimplify.c (c_gimplify_expr): If doing the integer-overflow
9867 sanitization, call unsigned_type_for only when !TYPE_OVERFLOW_WRAPS.
9869 2013-11-29 H.J. Lu <hongjiu.lu@intel.com>
9872 * cilk.c (gimplify_cilk_spawn): Properly handle function without
9875 2013-11-29 Jakub Jelinek <jakub@redhat.com>
9878 * c-common.c (get_priority): If TREE_VALUE (args) is IDENTIFIER_NODE,
9879 goto invalid. If it is error_mark_node, don't issue further
9882 2013-11-28 Sergey Ostanevich <sergos.gnu@gmail.com>
9884 * c.opt (Wopenmp-simd): New.
9886 2013-11-22 Jakub Jelinek <jakub@redhat.com>
9888 * c-ubsan.h (ubsan_instrument_return): New prototype.
9889 * c-ubsan.c (ubsan_instrument_return): New function.
9891 2013-11-22 Andrew MacLeod <amacleod@redhat.com>
9893 * c-common.c: Add required include files from gimple.h.
9894 * c-gimplify.c: Likewise.
9897 2013-11-22 David Malcolm <dmalcolm@redhat.com>
9899 * c-common.c (unsafe_conversion_p): Remove use of
9900 EXPR_LOC_OR_HERE macro.
9901 (conversion_warning): Likewise.
9902 (warnings_for_convert_and_check): Likewise.
9903 (warn_for_collisions_1): Likewise.
9904 (shorten_compare): Likewise, and remove use of in_system_header
9905 macro, using the location from the former.
9906 * c-lex.c (dump_one_header): Remove use of input_filename macro.
9907 (cb_def_pragma): Remove use of in_system_header macro.
9908 (lex_string): Likewise.
9909 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
9911 2013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
9912 Mike Stump <mikestump@comcast.net>
9913 Richard Sandiford <rdsandiford@googlemail.com>
9915 * c-ada-spec.c (is_simple_enum): Use tree_to_shwi and tree_to_uhwi
9916 instead of TREE_INT_CST_LOW, in cases where there is a protecting
9917 tree_fits_shwi_p or tree_fits_uhwi_p.
9918 (dump_generic_ada_node): Likewise.
9919 * c-format.c (check_format_arg): Likewise.
9920 * c-pretty-print.c (pp_c_integer_constant): Likewise.
9922 2013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
9924 * c-common.c (check_function_arguments_recurse): Use tree_to_uhwi.
9926 2013-11-19 Joshua J Cogliati <jrincayc@yahoo.com>
9929 * c-common.c (unsafe_conversion_p): Make this function
9930 return an enumeration with more detail.
9931 (conversion_warning): Use the new return type of
9932 unsafe_conversion_p to separately warn either about conversions
9933 that lower floating point number precision or about the other
9934 kinds of conversions.
9935 * c-common.h (enum conversion_safety): New enumeration.
9936 (unsafe_conversion_p): switching return type to
9937 conversion_safety enumeration.
9938 * c.opt: Adding new warning -Wfloat-conversion and
9939 enabling it with -Wconversion.
9941 2013-11-19 Basile Starynkevitch <basile@starynkevitch.net>
9943 * c-opts.c: Include plugin.h.
9944 (cb_file_change): Invoke plugin event PLUGIN_INCLUDE_FILE.
9946 2013-11-19 Marek Polacek <polacek@redhat.com>
9948 * c-ubsan.c (ubsan_instrument_division): Adjust ubsan_create_data
9950 (ubsan_instrument_shift): Likewise.
9951 (ubsan_instrument_vla): Likewise.
9953 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
9955 * c-common.c (convert_vector_to_pointer_for_subscript): Remove
9956 cast to unsigned type.
9958 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
9960 * c-common.c (fold_offsetof_1): Use tree_to_uhwi rather than
9962 (complete_array_type): Update comment to refer to tree_to_[su]hwi
9963 rather than tree_low_cst.
9965 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
9967 * c-common.c, c-cppbuiltin.c: Replace tree_low_cst (..., 1) with
9968 tree_to_uhwi throughout.
9970 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
9972 * c-common.c, c-format.c, c-omp.c, c-pretty-print.c: Replace
9973 tree_low_cst (..., 0) with tree_to_shwi throughout.
9975 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
9977 * c-ada-spec.c, c-common.c, c-pretty-print.c: Replace
9978 host_integerp (..., 1) with tree_fits_uhwi_p throughout.
9980 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
9982 * c-ada-spec.c, c-common.c, c-format.c, c-pretty-print.c: Replace
9983 host_integerp (..., 0) with tree_fits_shwi_p throughout.
9985 2013-11-15 Aldy Hernandez <aldyh@redhat.com>
9987 * c-cilkplus.c: New file.
9988 * c-common.c (readonly_error): Add location argument.
9989 * c-common.h (readonly_error): Same.
9990 (c_finish_cilk_clauses): Protoize.
9991 (c_check_cilk_loop): Same.
9992 c-omp.c (c_finish_omp_for): Handle CILK_SIMD nodes.
9993 Do not fail on error_mark_node.
9994 Abstract increment canonicalization to here...
9995 (c_omp_for_incr_canonicalize_ptr): New.
9996 c-pragma.c (init_pragma): Register "simd" pragma.
9997 c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_SIMD.
9998 (enum pragma_cilk_clause): New.
10000 2013-11-15 Richard Sandiford <rdsandiford@googlemail.com>
10002 * c-pretty-print.c (pp_c_character_constant): Remove unnecessary
10003 wchar_type and host_integerp checks.
10005 2013-11-14 Andrew MacLeod <amacleod@redhat.com>
10007 * c-common.c: Likewise.
10008 * c-gimplify.c: Likewise.
10009 * cilk.c: Likewise.
10011 2013-11-14 Diego Novillo <dnovillo@google.com>
10013 * c-common.c: Include fold-const.h.
10014 Include stor-layout.h.
10016 Include stringpool.h.
10019 Include trans-mem.h.
10020 * c-cppbuiltin.c: Include stor-layout.h.
10021 Include stringpool.h.
10022 * c-format.c: Include stringpool.h.
10023 * c-lex.c: Include stringpool.h.
10024 Include stor-layout.h.
10025 * c-pragma.c: Include stringpool.h.
10028 Include gcc-symtab.h.
10029 * c-pretty-print.c: Include stor-layout.h.
10031 * cilk.c: Include stringpool.h.
10034 2013-11-13 Joseph Myers <joseph@codesourcery.com>
10036 * c-common.h (enum rid): Add RID_AUTO_TYPE.
10037 * c-common.c (c_common_reswords): Add __auto_type.
10038 (keyword_begins_type_specifier): Handle RID_AUTO_TYPE.
10040 2013-11-12 Andrew MacLeod <amacleod@redhat.com>
10042 * c-common.c: Include gimplify.h.
10043 * c-gimplify.c: Likewise.
10044 * cilk.c: Likewise.
10045 * c-omp.c: Include gimple-expr.h instead of gimple.h.
10046 * c-ubsan.c: Don't include gimple.h.
10048 2013-11-12 Joseph Myers <joseph@codesourcery.com>
10050 * c-common.c (c_common_reswords): Add _Thread_local.
10052 2013-11-09 Joseph Myers <joseph@codesourcery.com>
10054 * c-common.c (atomic_size_supported_p): New function.
10055 (resolve_overloaded_atomic_exchange)
10056 (resolve_overloaded_atomic_compare_exchange)
10057 (resolve_overloaded_atomic_load, resolve_overloaded_atomic_store):
10058 Use it instead of comparing size with a local list of sizes.
10060 2013-11-07 Andrew MacLeod <amacleod@redhat.com>
10061 Joseph Myers <joseph@codesourcery.com>
10063 * c-common.h (enum rid): Add RID_ATOMIC.
10064 * c-common.c (c_common_reswords): Add _Atomic.
10065 (sync_resolve_params): Use TYPE_MAIN_VARIANT on pointer argument.
10066 (keyword_is_type_qualifier): Accept RID_ATOMIC.
10067 * c-format.c (check_format_types): Check for extra _Atomic
10068 qualifiers in format argument.
10069 * c-pretty-print.c (pp_c_cv_qualifiers): Handle atomic qualifier.
10070 (pp_c_type_qualifier_list): Mention _Atomic in comment.
10072 2013-11-06 Tobias Burnus <burnus@net-b.de>
10074 * c-common.c (reason_option_codes_t): Add CPP_W_DATE_TIME.
10076 2013-11-06 Joseph Myers <joseph@codesourcery.com>
10078 * c-opts.c (c_common_post_options): Set -ffp-contract=off in C
10080 * c-cppbuiltin.c (cpp_iec_559_value): Consider -ffp-contract=fast
10081 to mean lack of IEEE 754 support.
10083 2013-11-05 Tobias Burnus <burnus@net-b.de>
10085 * c.opt (-Wdate-time): New option
10086 * c-opts.c (sanitize_cpp_opts): Pass on to libcpp.
10088 2013-11-05 Joseph Myers <joseph@codesourcery.com>
10090 * c-cppbuiltin.c (cpp_iec_559_value): Test
10091 flag_excess_precision_cmdline not flag_excess_precision.
10093 2013-11-05 Tobias Burnus <burnus@net-b.de>
10095 * c.opt (fopenmp-simd): New option.
10096 * c-pragma.c (omp_pragmas): Move pragmas which can contain simd to ...
10097 (omp_pragmas): ... this new struct.
10098 (c_pp_lookup_pragma): Also walk omp_pragmas.
10099 (init_pragma): Init pragmas for -fopenmp-simd.
10101 2013-11-04 Marek Polacek <polacek@redhat.com>
10104 * c-common.c (invalid_indirection_error): Handle RO_ARROW_STAR case.
10106 2013-11-04 Joseph Myers <joseph@codesourcery.com>
10108 * c-cppbuiltin.c (cpp_iec_559_value, cpp_iec_559_complex_value):
10110 (c_cpp_builtins): Define __GCC_IEC_559 and __GCC_IEC_559_COMPLEX.
10112 2013-11-04 Eric Botcazou <ebotcazou@adacore.com>
10114 * c-ada-spec.h (cpp_operation): Add IS_TRIVIAL.
10115 (dump_ada_specs): Adjust prototype of second callback.
10116 * c-ada-spec.c (cpp_check): New global variable.
10117 (dump_ada_nodes): Remove cpp_check parameter and do not pass it down.
10118 (print_generic_ada_decl): Likewise.
10119 (has_static_fields): Change return type to bool and add guard.
10120 (has_nontrivial_methods): New predicate.
10121 (is_tagged_type): Change return type to bool.
10122 (separate_class_package): Call has_nontrivial_methods.
10123 (pp_ada_tree_identifier): Minor tweaks.
10124 (dump_ada_function_declaration): Adjust calls to dump_generic_ada_node.
10125 (dump_ada_array_domains): Likewise.
10126 (dump_ada_array_type): Likewise.
10127 (dump_template_types): Remove cpp_check parameter and do not pass it to
10128 dump_generic_ada_node.
10129 (dump_ada_template): Likewise.
10130 (dump_generic_ada_node): Remove cpp_check parameter and do not pass it
10132 (print_ada_methods): Change return type to integer. Remove cpp_check
10133 parameter and do not pass it down.
10134 (dump_nested_types): Remove cpp_check parameter and do not pass it to
10135 dump_generic_ada_node.
10136 (print_ada_declaration): Likewise. Test RECORD_OR_UNION_TYPE_P before
10138 (print_ada_struct_decl): Remove cpp_check parameter and do not pass it
10139 down. Use has_nontrivial_methods to recognize C++ classes. Use return
10140 value of print_ada_methods.
10141 (dump_ads): Rename cpp_check parameter to check and adjust prototype.
10142 Set cpp_check to it before invoking dump_ada_nodes.
10143 (dump_ada_specs): Likewise.
10145 2013-11-03 Marek Polacek <polacek@redhat.com>
10147 * c-ubsan.c: Don't include hash-table.h.
10148 (ubsan_instrument_vla): New function.
10149 * c-ubsan.h: Declare it.
10151 2013-10-31 David Malcolm <dmalcolm@redhat.com>
10153 Automated part of renaming of symtab_node_base to symtab_node.
10155 Patch autogenerated by rename_symtab.py from
10156 https://github.com/davidmalcolm/gcc-refactoring-scripts
10157 revision 58bb219cc090b2f4516a9297d868c245495ee622
10159 * c-pragma.c (maybe_apply_pending_pragma_weaks): Rename
10160 symtab_node_base to symtab_node.
10162 2013-10-31 Edward Smith-Rowland <3dw4rd@verizon.net>
10164 Implement C++14 digit separators.
10165 * c-lex.c (interpret_float): Remove digit separators from scratch string
10166 before building real literal.
10168 2013-10-30 Jakub Jelinek <jakub@redhat.com>
10170 * cilk.c (create_cilk_helper_decl): Use HOST_WIDE_INT_PRINT_DEC.
10172 2013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
10174 * c-common.c (c_common_reswords[]): Added _Cilk_spawn and _Cilk_sync
10176 (c_define_builtins): Called cilk_init_builtins if Cilk Plus is
10178 * c-common.h (enum rid): Added RID_CILK_SPAWN and RID_CILK_SYNC.
10179 (insert_cilk_frame): New prototype.
10180 (cilk_init_builtins): Likewise.
10181 (gimplify_cilk_spawn): Likewise.
10182 (c_cilk_install_body_w_frame_cleanup): Likewise.
10183 (cilk_detect_spawn_and_unwrap): Likewise.
10184 (cilk_set_spawn_marker): Likewise.
10185 (build_cilk_sync): Likewise.
10186 (build_cilk_spawn): Likewise.
10187 * cilk.c: New file.
10189 2013-10-29 David Malcolm <dmalcolm@redhat.com>
10191 Patch autogenerated by refactor_symtab.py from
10192 https://github.com/davidmalcolm/gcc-refactoring-scripts
10193 revision 58bb219cc090b2f4516a9297d868c245495ee622
10195 * c-gimplify.c (c_genericize): Update for conversion of symtab types
10196 to a true class hierarchy.
10197 * c-pragma.c (maybe_apply_pending_pragma_weaks): Likewise.
10199 2013-10-27 Richard Sandiford <rdsandiford@googlemail.com>
10201 * c-lex.c (interpret_integer): Remove call to cpp_num_sign_extend.
10203 2013-10-26 Jeff Law <law@redhat.com>
10205 * c-common.c (c_define_builtins): Remove mudflap support.
10206 * c.opt: Ignore and warn for mudflap options.
10208 2013-10-24 Tobias Burnus <burnus@net-b.de>
10211 * c-pragma.c (init_pragma) Add #pragma ivdep handling.
10212 * c-pragma.h (pragma_kind): Add PRAGMA_IVDEP.
10214 2013-10-23 Jason Merrill <jason@redhat.com>
10216 * c-format.c (gcc_cxxdiag_char_table): Add %X.
10218 2013-10-11 Jakub Jelinek <jakub@redhat.com>
10220 * c-common.h (omp_clause_mask::operator !=): New method.
10221 * c-omp.c (c_omp_split_clauses): Use if ((mask & something) != 0)
10222 instead of if (mask & something) tests everywhere.
10224 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP to
10225 201307 instead of 201107.
10226 * c-common.c (DEF_FUNCTION_TYPE_8): Define.
10227 (c_common_attribute_table): Add "omp declare target" and
10228 "omp declare simd" attributes.
10229 (handle_omp_declare_target_attribute,
10230 handle_omp_declare_simd_attribute): New functions.
10231 * c-omp.c: Include c-pragma.h.
10232 (c_finish_omp_taskgroup): New function.
10233 (c_finish_omp_atomic): Add swapped argument, if true,
10234 build the operation first with rhs, lhs arguments and use NOP_EXPR
10236 (c_finish_omp_for): Add code argument, pass it down to make_code.
10237 (c_omp_split_clauses): New function.
10238 (c_split_parallel_clauses): Removed.
10239 (c_omp_declare_simd_clause_cmp, c_omp_declare_simd_clauses_to_numbers,
10240 c_omp_declare_simd_clauses_to_decls): New functions.
10241 * c-common.h (omp_clause_mask): New type.
10242 (OMP_CLAUSE_MASK_1): Define.
10243 (omp_clause_mask::omp_clause_mask, omp_clause_mask::operator &=,
10244 omp_clause_mask::operator |=, omp_clause_mask::operator ~,
10245 omp_clause_mask::operator |, omp_clause_mask::operator &,
10246 omp_clause_mask::operator <<, omp_clause_mask::operator >>,
10247 omp_clause_mask::operator ==): New methods.
10248 (enum c_omp_clause_split): New.
10249 (c_finish_omp_taskgroup): New prototype.
10250 (c_finish_omp_atomic): Add swapped argument.
10251 (c_finish_omp_for): Add code argument.
10252 (c_omp_split_clauses): New prototype.
10253 (c_split_parallel_clauses): Removed.
10254 (c_omp_declare_simd_clauses_to_numbers,
10255 c_omp_declare_simd_clauses_to_decls): New prototypes.
10256 * c-pragma.c (omp_pragmas): Add new OpenMP 4.0 constructs.
10257 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_CANCEL,
10258 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_DECLARE_REDUCTION,
10259 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_SIMD,
10260 PRAGMA_OMP_TARGET, PRAGMA_OMP_TASKGROUP and PRAGMA_OMP_TEAMS.
10261 Remove PRAGMA_OMP_PARALLEL_FOR and PRAGMA_OMP_PARALLEL_SECTIONS.
10262 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ALIGNED,
10263 PRAGMA_OMP_CLAUSE_DEPEND, PRAGMA_OMP_CLAUSE_DEVICE,
10264 PRAGMA_OMP_CLAUSE_DIST_SCHEDULE, PRAGMA_OMP_CLAUSE_FOR,
10265 PRAGMA_OMP_CLAUSE_FROM, PRAGMA_OMP_CLAUSE_INBRANCH,
10266 PRAGMA_OMP_CLAUSE_LINEAR, PRAGMA_OMP_CLAUSE_MAP,
10267 PRAGMA_OMP_CLAUSE_NOTINBRANCH, PRAGMA_OMP_CLAUSE_NUM_TEAMS,
10268 PRAGMA_OMP_CLAUSE_PARALLEL, PRAGMA_OMP_CLAUSE_PROC_BIND,
10269 PRAGMA_OMP_CLAUSE_SAFELEN, PRAGMA_OMP_CLAUSE_SECTIONS,
10270 PRAGMA_OMP_CLAUSE_SIMDLEN, PRAGMA_OMP_CLAUSE_TASKGROUP,
10271 PRAGMA_OMP_CLAUSE_THREAD_LIMIT, PRAGMA_OMP_CLAUSE_TO and
10272 PRAGMA_OMP_CLAUSE_UNIFORM.
10274 2013-10-09 Marc Glisse <marc.glisse@inria.fr>
10276 PR tree-optimization/20318
10277 * c-common.c (handle_returns_nonnull_attribute): New function.
10278 (c_common_attribute_table): Add returns_nonnull.
10280 2013-10-03 Marc Glisse <marc.glisse@inria.fr>
10283 * c.opt (fcheck-new): Move to common.opt.
10285 2013-09-25 Marek Polacek <polacek@redhat.com>
10286 Jakub Jelinek <jakub@redhat.com>
10289 * c-ubsan.c (ubsan_instrument_shift): Don't instrument
10290 an expression if we can prove it is correct.
10291 (ubsan_instrument_division): Likewise. Remove unnecessary
10294 2013-09-18 Marek Polacek <polacek@redhat.com>
10297 * c-common.c (handle_no_sanitize_undefined_attribute): New function.
10299 (struct attribute_spec c_common_att): Add no_sanitize_undefined.
10301 2013-09-14 Iain Sandoe <iain@codesourcery.com>
10304 * c.opt (fgnu-runtime, fnext-runtime, fobjc-abi-version,
10305 fobjc-gc, freplace-objc-classes): Accept for LTO.
10307 2013-09-13 Jacek Caban <jacek@codeweavers.com>
10309 * c-target.def: New hook
10311 2013-09-09 Paolo Carlini <paolo.carlini@oracle.com>
10314 * c.opt (Wdelete-incomplete): Add.
10316 2013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
10318 * c-common.c (same_scalar_type_ignoring_signedness): Delete.
10319 (vector_types_compatible_elements_p): New function.
10320 * c-common.h: (same_scalar_type_ignoring_signedness): Delete
10322 (vector_types_compatible_elements_p): Declare.
10324 2013-09-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
10326 * c-pretty-print.h (c_pretty_printer::simple_type_specifier): Now
10327 a virtual member function.
10328 (pp_simple_type_specifier): Remove.
10329 (pp_c_type_specifier): Likewise.
10330 * c-pretty-print.c (c_pretty_printer::simple_type_specifier):
10331 Rename from pp_c_type_specifier. Adjust.
10332 (c_pretty_printer::c_pretty_printer): Do not assign to
10333 simple_type_specifier.
10335 2013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
10337 * c-pretty-print.h (c_pretty_printer::type_id): Now a virtual
10339 (c_pretty_printer::storage_class_specifier): Likewise.
10340 (c_pretty_printer::initializer): Likewise.
10341 (pp_declaration): Remove.
10342 (pp_declaration_specifiers): Likewise.
10343 (pp_abstract_declarator): Likewise.
10344 (pp_declarator): Likewise.
10345 (pp_type_id): Likewise.
10346 (pp_statement): Likewise.
10347 (pp_constant): Likewise.
10348 (pp_id_expression): Likewise.
10349 (pp_primary_expression): Likewise.
10350 (pp_unary_expression): Likewise.
10351 (pp_multiplicative_expression): Likewise.
10352 (pp_conditional_expression): Likewise.
10353 (pp_assignment_expression): Likewise.
10354 (pp_expression): Likewise.
10355 (pp_c_type_id): Likewise.
10356 (pp_c_storage_class_specifier): Likewise.
10357 * c-pretty-print.c (pp_c_type_cast): Tidy.
10358 (pp_c_pointer): Likewise.
10359 (pp_c_type_specifier): Likewise.
10360 (pp_c_parameter_type_list): Likewise.
10361 (pp_c_function_definition): Likewise.
10362 (pp_c_init_declarator): Likewise.
10363 (pp_c_initializer_list): Likewise.
10364 (pp_c_constructor_elts): Likewise.
10365 (c_pretty_printer::direct_abstract_declarator): Likewise.
10366 (c_pretty_printer::declaration_specifiers): Likewise.
10367 (c_pretty_printer::primary_expression): Likewise.
10368 (c_pretty_printer::postfix_expression): Likewise.
10369 (c_pretty_printer::type_id): Rename from pp_c_type_id.
10370 (c_pretty_printer::storage_class_specifier): Rename from
10371 pp_c_storage_class_specifier.
10372 (c_pretty_printer::initializer): Rename from pp_c_initializer.
10373 (c_pretty_printer::c_pretty_printer): Do not assign to type_id,
10374 storage_class_specifier, initializer, offset_list, flags.
10376 2013-08-30 Marek Polacek <polacek@redhat.com>
10378 * c-ubsan.c: New file.
10379 * c-ubsan.h: New file.
10381 2013-08-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
10383 * c-pretty-print.h (c_pretty_printer::declaration): Now a virtual
10385 (c_pretty_printer::declaration_specifiers): Likewise.
10386 (c_pretty_printer::declarator): Likewise.
10387 (c_pretty_printer::abstract_declarator): Likewise.
10388 (c_pretty_printer::direct_abstract_declarator): Likewise.
10389 (c_pretty_printer::direct_declarator): Likewise.
10390 (c_pretty_printer::function_specifier): Likewise.
10391 (pp_declaration): Adjust.
10392 (pp_declaration_specifiers): Likewise.
10393 (pp_abstract_declarator): Likewise.
10394 (pp_direct_declarator): Likewise.
10395 (pp_function_specifier): Likewise.
10396 (pp_direct_abstract_declarator): Remove as unused.
10397 (pp_c_declaration): Remove.
10398 (pp_c_declaration_specifiers): Likewise.
10399 (pp_c_declarator): Likewise.
10400 (pp_c_direct_declarator): Likewise.
10401 (pp_c_function_specifier): Likewise.
10402 (pp_c_direct_abstract_declarator): Likewise.
10403 * c-pretty-print.c (c_pretty_printer::abstract_declarator): Rename
10404 from pp_c_abstract_declarator. Adjust.
10405 (c_pretty_printer::direct_abstract_declarator): Rename from
10406 pp_c_direct_abstract_declarator. Adjust.
10407 (c_pretty_printer::function_specifier): Rename from
10408 pp_c_function_specifier. Adjust.
10409 (c_pretty_printer::declaration_specifiers): Rename from
10410 pp_c_declaration_specifiers. Adjust.
10411 (c_pretty_printer::direct_declarator): Rename from
10412 pp_c_direct_declarator. Adjust.
10413 (c_pretty_printer::declarator): Rename from pp_c_declarator. Adjust.
10414 (c_pretty_printer::declaration): Rename from pp_c_declaration. Adjust.
10415 (c_pretty_printer::c_pretty_printer): Do not assign to
10416 declaration, declaration_specifiers, declarator,
10417 direct_declarator, direct_abstract_declarator, function_specifier.
10419 2013-08-26 Gabriel Dos Reis <gdre@integrable-solutions.net>
10421 * c-pretty-print.h (c_pretty_printer::unary_expression): Now a
10422 virtual member function.
10423 (c_pretty_printer::multiplicative_expression): Likewise.
10424 (c_pretty_printer::conditional_expression): Likewise.
10425 (c_pretty_printer::assignment_expression): Likewise.
10426 (c_pretty_printer::expression): Likewise.
10427 (pp_unary_expression): Adjust.
10428 (pp_multiplicative_expression): Likewise.
10429 (pp_assignment_expression): Likewise.
10430 (pp_conditional_expression): Likewise.
10431 (pp_expression): Likewise.
10432 * c-pretty-print.c (c_pretty_printer::unary_expression): Rename
10433 from pp_c_unary_expression. Adjust.
10434 (c_pretty_printer::multiplicative_expression): Rename from
10435 pp_c_multiplicative_expression. Adjust.
10436 (c_pretty_printer::conditional_expression): Rename from
10437 pp_c_conditional_expression. Adjust.
10438 (c_pretty_printer::assignment_expression): Rename from
10439 pp_c_assignment_expression. Adjust.
10440 (c_pretty_printer::expression): Rename from pp_c_expression. Adjust.
10441 (c_pretty_printer::c_pretty_printer): Do not assign to
10442 unary_expression, multiplicative_expression,
10443 conditional_expression, expression.
10445 2013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
10447 * c-pretty-print.h (c_pretty_printer::postfix_expression): Now a
10448 virtual member function.
10449 (pp_postfix_expression): Adjust.
10450 (pp_c_postfix_expression): Remove.
10451 * c-pretty-print.c (c_pretty_printer::postfix_expression): Rename
10452 from pp_c_postfix_expression. Adjust.
10453 (c_pretty_printer::c_pretty_printer): Do not assign to
10454 postfix_expression.
10456 2013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
10458 * c-pretty-print.h (c_pretty_printer::primary_expression): Now a
10459 virtua member function.
10460 (pp_primary_expression): Adjust.
10461 (pp_c_primary_expression): Remove.
10462 * c-pretty-print.c (c_pretty_printer::primary_expression): Rename
10463 from pp_c_primary_expression. Adjust.
10464 (pp_c_initializer_list): Use pp_primary_expression.
10465 (c_pretty_printer::c_pretty_printer): Do not assign to
10466 primary_expression.
10468 2013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
10470 * c-pretty-print.h (c_pretty_printer::translate_string): Declare.
10471 * c-pretty-print.c (M_): Remove.
10472 (c_pretty_printer::translate_string): Define.
10473 (pp_c_type_specifier): Use it.
10474 (pp_c_primary_expression): Likewise.
10475 (pp_c_expression): Likewise.
10477 2013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
10479 * c-pretty-print.h (c_pretty_printer::id_expression): Now a
10481 (pp_c_id_expression): Remove.
10482 (pp_id_expression): Adjust.
10483 * c-pretty-print.c (c_pretty_printer::id_expression): Rename from
10484 pp_c_id_expression. Adjust.
10485 (pp_c_postfix_expression): Use pp_id_expression.
10486 (c_pretty_printer::c_pretty_printer): Do not assign to id_expression.
10488 2013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
10490 * c-pretty-print.h (c_pretty_printer::constant): Now a virtual
10492 (pp_constant): Adjust.
10493 (pp_c_constant): Remove.
10494 * c-pretty-print.c (c_pretty_printer::constant): Rename from
10495 pp_c_constant. Adjust.
10497 (pp_c_primary_expression): Call pp_constant in lieu of pp_c_constant.
10498 (c_pretty_printer::c_pretty_printer): Remove assignment to constant.
10500 2013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
10502 * c-pretty-print.h (pp_c_pretty_printer_init): Remove.
10503 (c_pretty_printer::c_pretty_printer): Declare.
10504 * c-pretty-print.c (pretty_printer::c_pretty_printer): Rename from
10505 c_pretty_printer_init. Adjust.
10506 (print_c_tree): Do not call c_pretty_printer_init.
10507 * c-ada-spec.c (dump_ads): Remove call to pp_construct.
10509 2013-08-09 Arnaud Charlet <charlet@adacore.com>
10511 * c-ada-spec.c (print_ada_declaration): Prevent accessing null asm name
10513 2013-08-05 Paolo Carlini <paolo.carlini@oracle.com>
10516 * c-common.c (pointer_int_sum): Add bool parameter.
10517 * c-common.h (pointer_int_sum): Adjust declaration.
10519 2013-08-05 Gabriel Dos Reis <gdr@integrable-solutions.net>
10521 * c-pretty-print.c (print_c_tree): Simplify. Use non-static local
10522 c_pretty_printer variable.
10524 2013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
10526 * c-pretty-print.h (c_pretty_printer): Derive from pretty_printer.
10528 (pp_c_base): Likewise. Adjust users.
10529 * c-pretty-print.c (pp_c_maybe_whitespace): Adjust.
10530 (pp_c_whitespace): Do not call pp_base.
10531 (pp_c_left_paren): Likewise.
10532 (pp_c_right_paren): Likewise.
10533 (pp_c_left_brace): Likewise.
10534 (pp_c_right_brace): Likewise.
10535 (pp_c_left_bracket): Likewise.
10536 (pp_c_right_bracket): Likewise.
10537 (pp_c_dot): Likewise.
10538 (pp_c_ampersand): Likewise.
10539 (pp_c_star): Likewise.
10540 (pp_c_arrow): Likewise.
10541 (pp_c_semicolon): Likewise.
10542 (pp_c_complement): Likewise.
10543 (pp_c_exclamation): Likewise.
10544 (pp_c_direct_declarator): Likewise.
10545 (pp_c_ws_string): Likewise.
10546 (pp_c_identifier): Likewise.
10547 (pp_c_statement): Likewise.
10548 (print_c_tree): Likewise.
10550 2013-08-04 Ed Smith-Rowland <3dw4rd@verizon.net>
10553 * c-common.c (c_parse_error): Catch user-defined literal tokens and
10554 provide useful error strings.
10556 2013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
10558 * c-ada-spec.c (pp_ada_tree_identifier): Use specialized pretty
10559 printer functions instead of pp_string or operators and punctuators.
10560 (dump_generic_ada_node): Likewise.
10561 * c-pretty-print.c (pp_c_type_specifier): Likewise.
10562 (pp_c_relational_expression): Likewise.
10563 (pp_c_logical_or_expression): Likewise.
10565 2013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
10567 * c-ada-spec.c (print_ada_macros): Use specialized pretty printer
10568 functions instead of pp_character.
10569 (pp_ada_tree_identifier): Likewise.
10570 (dump_ada_double_name): Likewise.
10571 (dump_ada_function_declaration): Likewise.
10572 (dump_ada_array_domains): Likewise.
10573 (dump_template_types): Likewise.
10574 (dump_generic_ada_node): Likewise.
10575 (print_ada_declaration): Likewise.
10576 (print_ada_struct_decl): Likewise.
10577 * c-pretty-print.c (pp_c_integer_constant): Likewise.
10579 2013-07-23 Tom Tromey <tromey@redhat.com>
10581 * c-common.h (enum rid) <RID_GENERIC>: New constant.
10582 * c-common.c (c_common_reswords): Add _Generic.
10584 2013-07-21 OndÅ
\99ej BÃlka <neleai@seznam.cz>
10586 * c-common.c: Fix typos.
10587 * c-common.h: Likewise.
10589 2013-07-13 Lubos Lunak <l.lunak@suse.cz>
10592 * c-common.c (c_common_attribute_table): Add warn_unused.
10593 (handle_warn_unused_attribute): New.
10595 2013-07-10 Jakub Jelinek <jakub@redhat.com>
10597 * c-ppoutput.c (scan_translation_unit): Call account_for_newlines
10598 for all CPP_TOKEN_FLD_STR tokens, not just CPP_COMMENT.
10600 2013-07-10 Paolo Carlini <paolo.carlini@oracle.com>
10603 * c.opt: Add Wconditionally-supported.
10605 2013-07-08 Graham Stott <graham.stott@btinternet.com>
10607 * array-notation-common.c (length_mismatch_in_expr_p): Delete
10608 unused variables l_length and l_node.
10610 2013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
10613 * c-common.c (complete_array_type): Delay folding first index
10614 like other indices. When folding, check for index overflow.
10616 2013-06-27 Marc Glisse <marc.glisse@inria.fr>
10619 * c-common.h (c_build_vec_perm_expr): New complain argument.
10620 * c-common.c (c_build_vec_perm_expr): Likewise.
10621 Use save_expr also in C++.
10623 2013-06-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
10625 * c-common.c (c_common_nodes_and_builtins): Use cxx11 in lieu of cxx0x.
10626 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
10627 * c-opts.c (c_common_post_options): Likewise.
10629 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
10631 * array-notation-common.c (length_mismatch_in_expr): Changed the
10632 parameter type's from a dynamic array to a vec_tree. Also removed
10633 the size parameters.
10634 * c-common.h (length_mismatch_in_expr_p): Fixed prototype's as per
10637 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
10639 * c-common.h (struct cilkplus_an_parts): New structure.
10640 (struct cilkplus_an_loop_parts): Likewise.
10641 (cilkplus_extract_an_triplets): New prototype.
10642 (fix_sec_implicit_args): Likewise.
10643 * array-notation-common.c (cilkplus_extract_an_triplets): New function.
10644 (fix_sec_implicit_args): Likewise.
10646 2013-06-20 Balaji V. Iyer <balaji.v.iyer@intel.com>
10648 * array-notation-common.c (find_inv_trees): Removed an unwanted
10650 * c-common.h (struct inv_list::additional_tcodes): Changed type from
10651 enum rid to enum tree_code.
10653 2013-06-11 Jan Hubicka <jh@suse.cz>
10655 * c-common.c (handle_alias_ifunc_attribute): Do not set
10656 DECL_EXTERNAL for weakref variables.
10657 * c-pragma.c (handle_pragma_weak): Make sure aliases
10658 are not declared as external.
10660 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
10662 * array-notation-common.c (length_mismatch_in_expr_p): Moved this
10663 function from c/c-array-notation.c.
10664 (is_cilkplus_reduce_builtin): Likewise.
10665 (find_rank): Likewise.
10666 (extract_array_notation_exprs): Likewise.
10667 (replace_array_notations): Likewise.
10668 (find_inv_trees): Likewise.
10669 (replace_inv_trees): Likewise.
10670 (contains_array_notation_expr): Likewise.
10671 (find_correct_array_notation_type): Likewise.
10672 * c-common.h (struct inv_list): Moved this struct from the file
10673 c/c-array-notation.c and added a new field called additional tcodes.
10674 (length_mismatch_in_expr_p): New prototype.
10675 (is_cilkplus_reduce_builtin): Likewise.
10676 (find_rank): Likewise.
10677 (extract_array_notation_exprs): Likewise.
10678 (replace_array_notation): Likewise.
10679 (find_inv_trees): Likewise.
10680 (replace_inv_trees): Likewise.
10681 (find_correct_array_notation_type): Likewise.
10683 2013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
10685 * c-common.c (c_define_builtins): When cilkplus is enabled, the
10686 function array_notation_init_builtins is called.
10687 (c_common_init_ts): Added ARRAY_NOTATION_REF as typed.
10688 * c-common.def (ARRAY_NOTATION_REF): New tree.
10689 * c-common.h (build_array_notation_expr): New function declaration.
10690 (build_array_notation_ref): Likewise.
10691 (extract_sec_implicit_index_arg): New extern declaration.
10692 (is_sec_implicit_index_fn): Likewise.
10693 (ARRAY_NOTATION_CHECK): New define.
10694 (ARRAY_NOTATION_ARRAY): Likewise.
10695 (ARRAY_NOTATION_START): Likewise.
10696 (ARRAY_NOTATION_LENGTH): Likewise.
10697 (ARRAY_NOTATION_STRIDE): Likewise.
10698 * c-pretty-print.c (pp_c_postifix_expression): Added a new case for
10699 ARRAY_NOTATION_REF.
10700 (pp_c_expression): Likewise.
10701 * c.opt (flag_enable_cilkplus): New flag.
10702 * array-notation-common.c: New file.
10704 2013-05-14 Jakub Jelinek <jakub@redhat.com>
10707 * c-common.c (verify_tree): Don't recurse into SIZEOF_EXPR.
10709 2013-05-10 Marc Glisse <marc.glisse@inria.fr>
10711 * c-common.c (vector_types_convertible_p): No TYPE_PRECISION for
10714 2013-05-07 Han Shen <shenhan@google.com>
10716 * c-cppbuiltin.c (c_cpp_builtins): Added "__SSP_STRONG__=3".
10718 2013-04-29 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
10720 * c-common.c (check_user_alignment): Emit error for negative values.
10722 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
10724 * c-opts.c (set_std_cxx11): Use CLK_CXX1Y and CLK_GNUCXX1Y.
10726 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
10728 * c-cppbuiltin.c (c_cpp_builtins): Do not define
10729 __GXX_EXPERIMENTAL_CXX1Y__.
10731 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
10732 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
10734 * c.opt ([Wpointer-arith]): Enabled by -Wpedantic, as documented.
10735 * c-common.c (pointer_int_sum): Change -Wpointer-arith pedwarns
10736 to simply use OPT_Wpointer_arith.
10737 (c_sizeof_or_alignof_type): Likewise.
10739 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
10741 * c-cppbuiltin.c (c_cpp_builtins): Define __GXX_EXPERIMENTAL_CXX1Y__.
10743 2013-04-12 Jakub Jelinek <jakub@redhat.com>
10745 * c-format.c (gcc_diag_char_table, gcc_tdiag_char_table,
10746 gcc_cdiag_char_table, gcc_cxxdiag_char_table): Add %r and %R format
10749 2013-04-07 Steven Bosscher <steven@gcc.gnu.org>
10751 * c-pragma.c (add_to_renaming_pragma_list): Fix leading comment.
10753 2013-04-03 Paolo Carlini <paolo.carlini@oracle.com>
10755 * c-common.c (pointer_int_sum): Remove dead code.
10757 2013-03-09 Richard Sandiford <rdsandiford@googlemail.com>
10759 PR middle-end/56524
10760 * c-common.c (handle_optimize_attribute): Don't call
10761 save_optabs_if_changed.
10763 2013-03-05 Jakub Jelinek <jakub@redhat.com>
10765 PR middle-end/56461
10766 * c-pch.c (pch_init): Free target_validity at the end.
10768 2013-03-04 Jakub Jelinek <jakub@redhat.com>
10770 * c-pretty-print.c (pp_c_pretty_printer_init): Clear pp->flags.
10772 2013-02-28 Konstantin Serebryany <konstantin.s.serebryany@gmail.com>
10773 Jakub Jelinek <jakub@redhat.com>
10776 * c-common.c (handle_no_sanitize_address_attribute): New function.
10777 (c_common_attribute_table): Add no_sanitize_address attribute.
10778 (handle_no_address_safety_analysis_attribute): Add
10779 no_sanitize_address attribute, not no_address_safety_analysis
10782 2013-02-18 Aldy Hernandez <aldyh@redhat.com>
10785 * c-common.c (handle_optimize_attribute): Call
10786 save_optabs_if_changed.
10788 2013-02-18 Jakub Jelinek <jakub@redhat.com>
10789 Steven Bosscher <steven@gcc.gnu.org>
10792 * c-opts.c (c_common_post_options): If debug info is enabled
10793 and non-dwarf*, refuse to load PCH files and when writing PCH
10796 2013-02-05 Jakub Jelinek <jakub@redhat.com>
10798 PR middle-end/56167
10799 * c-common.c (handle_error_attribute): Fix condition.
10801 2013-01-30 Jakub Jelinek <jakub@redhat.com>
10804 * c-common.c (handle_target_attribute): Revert 2012-12-26 change.
10806 2013-01-18 Jason Merrill <jason@redhat.com>
10809 * c.opt (-fextern-tls-init): New.
10810 * c-opts.c (c_common_post_options): Handle it.
10812 2013-01-09 Jakub Jelinek <jakub@redhat.com>
10815 * c-common.c (c_fully_fold_internal): Warn for LSHIFT_EXPR and
10816 RSHIFT_EXPR, if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST
10817 and is either negative or bigger or equal to type precision
10818 of the first operand.
10820 2012-12-03 Marek Polacek <polacek@redhat.com>
10823 * c-common.c (check_user_alignment): Swap order of tests,
10824 check TREE_CODE first.
10826 2012-11-29 Ed Smith-Rowland <3dw4rd@verizon.net>
10829 * c-common.h (overflow_type): New enum.
10830 (build_userdef_literal): Add overflow_type argument.
10831 (tree_userdef_literal): Add overflow_type.
10832 (USERDEF_LITERAL_OVERFLOW): New access macro.
10833 * c-common.c (build_userdef_literal): Add overflow_type
10835 * c-lex.c (c_lex_with_flags): Add overflow_type to
10836 build_userdef_literal calls.
10837 (interpret_integer, interpret_float): Add overflow_type argument.
10839 2012-11-28 Richard Biener <rguenther@suse.de>
10842 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
10843 here and use a type with proper overflow behavior for types that would
10844 need to be promoted for the arithmetic.
10846 2012-11-23 Jakub Jelinek <jakub@redhat.com>
10849 * c-common.c (handle_no_address_safety_analysis_attribute): New
10851 (c_common_attribute_table): Add no_address_safety_analysis.
10853 2012-11-16 Simon Baldwin <simonb@google.com>
10855 * c.opt: Add f[no-]canonical-system-headers.
10856 * c-opts.c (c_common_handle_option): Handle
10857 OPT_fcanonical_system_headers.
10859 2012-11-09 Ed Smith-Rowland <3dw4rd@verizon.net>
10862 * c-opts.c (c_common_handle_option): Set new flags.
10863 * c.opt: Describe new flags.
10865 2012-11-09 Jason Merrill <jason@redhat.com>
10867 * c.opt (Wabi-tag): New.
10869 2012-11-09 Andi Kleen <ak@linux.intel.com>
10872 * c-common.c (get_atomic_generic_size): Mask with
10875 2012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
10878 * c.opt (Wformat): Make it Alias Wformat=1.
10879 (Wformat-contains-nul,Wformat-extra-args,Wformat-nonliteral,
10880 Wformat-security,Wformat-y2k,Wformat-zero-length): Use
10882 (Wformat=): RejectNegative. Use LangEnabledBy.
10883 (Wnonnull): Use LangEnabledBy.
10884 * c-opts.c (c_common_handle_option): Do not handle Wformat here.
10885 * c-format.c (set_Wformat): Delete.
10886 (decode_format_attr): Replace OPT_Wformat with OPT_Wformat_.
10887 (maybe_read_dollar_number): Likewise.
10888 (avoid_dollar_number): Likewise.
10889 (finish_dollar_format_checking): Likewise.
10890 (check_format_info): Likewise.
10891 (check_format_info_main): Likewise.
10892 (check_format_types): Likewise.
10893 (format_type_warning): Likewise.
10894 * c-common.c (int): Likewise.
10895 (check_function_sentinel): Likewise.
10896 * c-common.h (warn_format,set_Wformat): Do not declare here.
10898 2012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
10901 * c.opt(Warray-bounds,Wdelete-non-virtual-dtor,Wenum-compare,
10902 Wmain,Woverlength-strings, Wunknown-pragmas,Wunused-macros):
10904 (Wswitch,Wswitch-default,Wswitch-enum): Likewise. Move here from
10906 (Wvariadic-macros): Init(1).
10907 * c-opts.c (c_common_handle_option): Do not handle them
10909 (c_common_post_options): Likewise.
10910 (sanitize_cpp_opts): warn_unused_macros is now
10911 cpp_warn_unused_macros.
10912 (push_command_line_include): Likewise.
10913 * c-common.c (warn_unknown_pragmas): Do not define.
10914 * c-common.h (warn_unknown_pragmas): Do not declare.
10916 2012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
10919 * c-common.c (conversion_warning): Handle conditional expressions.
10921 2012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
10924 * c.opt (Wreturn_local_addr): Define new option.
10926 2012-10-25 Jason Merrill <jason@redhat.com>
10928 * c.opt (Wvirtual-move-assign): New.
10930 * c.opt (Winherited-variadic-ctor): New.
10932 2012-10-25 Marc Glisse <marc.glisse@inria.fr>
10935 * c-common.c (scalar_to_vector): Handle VEC_COND_EXPR.
10937 2012-10-23 Joseph Myers <joseph@codesourcery.com>
10939 * c-common.h (pch_cpp_save_state): Declare.
10940 * c-target.def (c_preinclude): New hook.
10941 * c-opts.c (done_preinclude): New.
10942 (push_command_line_include): Handle default preincluded header.
10943 (cb_file_change): Call pch_cpp_save_state when calling
10944 push_command_line_include.
10945 * c-pch.c (pch_ready_to_save_cpp_state, pch_cpp_state_saved)
10946 (pch_cpp_save_state): New.
10947 (pch_init): Call pch_cpp_save_state conditionally, instead of
10948 calling cpp_save_state.
10950 2012-10-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
10954 * c.opt (Waddress,Wchar-subscripts,Wsign-conversion,Wimplicit,
10955 Wimplicit-function-declaration,Wimplicit-int,Wsizeof-pointer-memaccess,
10956 Wnarrowing,Wparentheses,Wpointer-sign,Wreturn-type,Wsequence-point,
10957 Wsign-compare,Wuninitialized,Wmaybe-uninitialized,Wunused,
10958 Wvolatile-register-var): Add LangEnabledBy or EnabledBy.
10959 * c-opts.c (c_common_handle_option): Remove explicit handling from
10961 (c_common_post_options): Likewise.
10963 2012-10-18 Eric Botcazou <ebotcazou@adacore.com>
10965 * c-ada-spec.c (LOCATION_COL): Delete.
10966 (compare_location): New function.
10967 (compare_node): Use it.
10968 (compare_comment): Likewise.
10970 2012-10-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
10974 * c.opt (Wstrict-aliasing=,Wstrict-overflow=): Use LangEnabledBy.
10975 * c-opts.c (c_common_handle_option): Do not set them here. Add
10977 (c_common_post_options): Likewise.
10979 2012-10-16 Eric Botcazou <ebotcazou@adacore.com>
10981 * c-ada-spec.c (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Define.
10982 (dump_generic_ada_node) <INTEGER_CST>: Deal with sizetype specially.
10983 Remove POINTER_TYPE handling, add large unsigned handling and use
10984 ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX for big numbers.
10986 2012-10-12 Jakub Jelinek <jakub@redhat.com>
10989 * c-common.h (sizeof_pointer_memaccess_warning): Adjust prototype.
10990 * c-common.c (sizeof_pointer_memaccess_warning): Take array of 3
10991 locs and array of 3 trees instead of just single loc and single
10992 sizeof_arg tree. Handle __builtin___*_chk builtins too, and
10993 also stpncpy, bcopy, bcmp, bzero, snprintf and vsnprintf builtins.
10994 For *cmp* builtins that take two sources strings report warnings
10995 about first and second source, not about destination and source.
10997 2012-10-12 Marc Glisse <marc.glisse@inria.fr>
11000 * c-common.h (enum ref_operator) [RO_ARROW_STAR]: New.
11002 2012-10-11 Eric Botcazou <ebotcazou@adacore.com>
11004 * c-ada-spec.c (dump_ada_template): Bail out for template declarations
11005 declaring something coming from another file.
11007 2012-10-10 Arnaud Charlet <charlet@adacore.com>
11010 * c-ada-spec.c (print_ada_struct_decl): Increase buf size.
11012 2012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
11015 * c-common.c (warn_about_parentheses): Add location_t parameter;
11016 use EXPR_LOC_OR_LOC.
11017 * c-common.h: Update declaration.
11019 2012-10-09 Marc Glisse <marc.glisse@inria.fr>
11022 * c-common.c (scalar_to_vector): Moved from c-typeck.c. Support
11023 more operations. Make error messages optional.
11024 * c-common.h (enum stv_conv): Moved from c-typeck.c.
11025 (scalar_to_vector): Declare.
11027 2012-10-08 Jason Merrill <jason@redhat.com>
11029 * c-common.c (c_common_reswords): Add thread_local.
11031 2012-10-08 Dodji Seketeli <dodji@redhat.com>
11033 PR c++/53528 C++11 attribute support
11034 * c-common.h (bitfield_p, cxx_fundamental_alignment_p): Declare
11036 * c-common.c (check_cxx_fundamental_alignment_constraints): New
11038 (handle_aligned_attribute): In choose strictest alignment
11039 among many. Use new check_cxx_fundamental_alignment_constraints.
11040 (handle_transparent_union_attribute): In c++11 attribute syntax,
11041 don't look through typedefs.
11043 2012-10-04 Arnaud Charlet <charlet@adacore.com>
11045 * c-ada-spec.c (print_ada_declaration): Remove handling of TDF_RAW.
11046 * c.opt (-fdump-ada-spec, -fdump-ada-spec-slim): Move switch definition
11049 2012-09-25 Dehao Chen <dehao@google.com>
11051 PR middle-end/54645
11052 * c-pch.c (c_common_read_pch): Rebuild the location_adhoc_data
11053 map when read in the pch.
11055 2012-09-18 Arnaud Charlet <charlet@adacore.com>
11057 * c-ada-spec.c: Style fixes.
11059 2012-09-18 Thomas Quinot <quinot@adacore.com>
11061 * c.opt (-fada-spec-parent): Define new command line switch.
11062 * c-ada-spec.c (get_ada_package): When -fada-spec-parent
11063 is specified, generate binding spec as a child of the specified unit.
11065 2012-09-13 Paolo Carlini <paolo.carlini@oracle.com>
11066 Manuel López-Ibáñez <manu@gcc.gnu.org>
11069 * c.opt ([Winit-self]): Enabled by -Wall in C++.
11071 2012-08-23 Arnaud Charlet <charlet@adacore.com>
11073 * c-ada-spec.c (dump_generic_ada_node): Fix handling of name_only
11074 for pointers, and add missing Convention C pragma.
11075 (print_ada_struct_decl): Add missing aliased keyword.
11076 (dump_ads): Add pragma Ada_2005 and Style_Checks (Off).
11078 2012-08-17 Jakub Jelinek <jakub@redhat.com>
11080 * c-common.c (sizeof_pointer_memaccess_warning): New function.
11081 * c.opt (-Wsizeof-pointer-memaccess): Add new option.
11082 * c-opts.c (c_common_handle_option): Enable it for -Wall.
11083 * c-common.h (sizeof_pointer_memaccess_warning): Add prototype.
11084 * c-common.def (SIZEOF_EXPR): Moved here from cp-tree.def.
11086 2012-08-10 Richard Guenther <rguenther@suse.de>
11088 * c-pretty-print.c (pp_c_expression): Handle anonymous SSA names.
11090 2012-08-07 Steven Bosscher <steven@gcc.gnu.org>
11092 * c-pretty-print.c (pp_c_function_definition): Use pp_newline_and_flush
11093 instead of separate pp_newline and pp_flush.
11094 (print_c_tree): Likewise.
11096 2012-07-26 Richard Henderson <rth@redhat.com>
11098 * c-common.c (handle_hot_attribute): Allow labels.
11099 (handle_cold_attribute): Likewise.
11101 2012-07-20 Jakub Jelinek <jakub@redhat.com>
11104 * c-common.c (check_function_nonnull): Handle multiple nonnull
11105 attributes properly.
11107 2012-07-16 Steven Bosscher <steven@gcc.gnu.org>
11109 * c-gimplify.c: Include dumpfile.h instead of tree-dump.h.
11110 * c-ada-spec.c: Likewise.
11111 * c-dump.c (dump_stmt): Move to cp/dump.c, the only user.
11113 2012-07-14 Steven Bosscher <steven@gcc.gnu.org>
11115 * c-pch.c (CHECK_NO_ASM_OUT_DURING_PCH): Do not define.
11116 Remove code conditional on it.
11118 2012-07-11 Steven Bosscher <steven@gcc.gnu.org>
11120 * c-gimplify.c: Do not include basic-block.h.
11121 * c-common.c: Do not include linfuncs.h.
11123 2012-07-08 Steven Bosscher <steven@gcc.gnu.org>
11125 * c-common.h: Include tree.h.
11127 2012-07-02 Jason Merrill <jason@redhat.com>
11130 * c-common.c (get_priority): Call default_conversion.
11132 2012-07-01 Uros Bizjak <ubizjak@gmail.com>
11134 * c-pch.c (c_common_write_pch): Remove unused variables.
11136 2012-06-29 Steven Bosscher <steven@gcc.gnu.org>
11138 * cppspec.c: Moved from gcc/ to here.
11140 2012-06-27 Kai Tietz <ktietz@redhat.com>
11142 PR preprocessor/37215
11143 * c-ppoutput.c (preprocess_file): Check for nonempty buffer.
11145 2012-06-21 Steven Bosscher <steven@gcc.gnu.org>
11147 * c-common.h (c_common_print_pch_checksum): Remove.
11148 * c-pch.c: Do not include output.h.
11149 (CHECK_NO_ASM_OUT_DURING_PCH): Define and add FIXME.
11150 (asm_out_file): Define iff CHECK_NO_ASM_OUT_DURING_PCH isdefined.
11151 (asm_file_startpos): Define iff CHECK_NO_ASM_OUT_DURING_PCH is defined.
11152 (struct c_pch_header): Remove.
11153 (get_ident): Update gpch version.
11154 (pch_init): Do not print executable_checksum to asm_out_file.
11155 Do not fail if there is no asm_out_file to read back from. Set
11156 asm_file_startpos only if CHECK_NO_ASM_OUT_DURING_PCH is defined.
11157 (c_common_write_pch): Verify that nothing was written to asm_out_file
11158 since pch_init was called. Do not write a c_pch_header, and do not
11159 copy from asm_out_file to the PCH.
11160 (c_common_read_pch): Do not read a c_pch_header, and do not restore
11161 the content of asm_out_file from the PCH.
11162 (c_common_print_pch_checksum): Remove.
11163 * c-opts.c (c_common_init): Print out executable_checksum directly.
11165 2012-06-19 Steven Bosscher <steven@gcc.gnu.org>
11167 * c-target.def (objc_declare_unresolved_class_reference,
11168 objc_declare_class_definition): Add new hooks.
11170 2012-06-19 Steven Bosscher <steven@gcc.gnu.org>
11172 * c-lex.c: Do not include output.h.
11173 (cb_ident): Try to put out .ident with targetm.asm_out.output_ident.
11174 Remove uses of ASM_OUTPUT_IDENT.
11176 2012-06-15 Marc Glisse <marc.glisse@inria.fr>
11179 * c-common.h (c_build_vec_perm_expr): Move decl here.
11180 * c-common.c (c_build_vec_perm_expr): Move definition
11183 2012-06-06 Steven Bosscher <steven@gcc.gnu.org>
11185 * c.opt (fconserve-space): Turn into a no-op.
11187 2012-06-04 Sterling Augustine <saugustine@google.com>
11189 * c-pretty-print.h (pp_c_flag_gnu_v3): New enumerator.
11190 * c-pretty-print.c (pp_c_specifier_qualifier_list): Check it at
11191 both the start and end of the function.
11193 2012-06-04 Steven Bosscher <steven@gcc.gnu.org>
11195 * c-common.c: Do not include output.h.
11196 * c-pragma.c: Likewise.
11198 2012-06-04 Steven Bosscher <steven@gcc.gnu.org>
11200 * error.c (dump_decl): Check pp_c_flag_gnu_v3.
11201 (decl_as_dwarf_string, lang_decl_dwarf_name): New functions.
11202 (lang_decl_name): Handle namespace decls.
11204 2012-05-31 Steven Bosscher <steven@gcc.gnu.org>
11206 * c-ada-spec.c: Do not include output.h.
11207 * c-semantics.c: Likewise.
11209 2012-05-29 Joseph Myers <joseph@codesourcery.com>
11211 * c-common.c: Fix typo.
11213 2012-05-29 Michael Matz <matz@suse.de>
11215 * c-common.h (c_expand_decl): Remove prototype.
11217 2012-05-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
11219 * c.opt (Wmissing-braces): Use LangEnabledBy(C ObjC,Wall).
11220 * c-opts.c (c_common_handle_option): Remove code handling
11221 warn_missing_braces.
11223 2012-05-28 Paolo Carlini <paolo.carlini@oracle.com>
11226 * c-opts.c (c_common_handle_option): For C++ -Wall doesn't enable
11229 2012-05-22 Dodji Seketeli <dodji@redhat.com>
11232 * c.opt (Wunused-local-typedefs): Use EnabledBy(Wunused).
11234 2012-05-17 Manuel López-Ibáñez <manu@gcc.gnu.org>
11236 * c.opt (--pedantic-errors,-pedantic-errors): Do not handle here.
11237 * c-opts.c (c_common_handle_option): Do not handle explicitly
11238 Wreturn-type, Wwrite-strings, warn_ecpp, and -pedantic-errors.
11240 2012-05-16 Dodji Seketeli <dodji@redhat.com>
11242 PR preprocessor/7263
11243 * c-lex.c (c_lex_with_flags): Pass a virtual location to the call
11244 to cpp_classify_number. For diagnostics, use the precise location
11245 instead of the global input_location.
11247 2012-05-15 Paolo Carlini <paolo.carlini@oracle.com>
11250 * c-common.c (shorten_compare): Check c_inhibit_evaluation_warnings.
11252 2012-05-14 Bernd Schmidt <bernds@codesourcery.com>
11254 * c-common.c (DEF_ATTR_STRING): Define and undefine as necessary.
11256 2012-05-14 Manuel López-Ibáñez <manu@gcc.gnu.org>
11259 * c.opt (Wc++0X-compat,Wdelete-non-virtual-dtor,Wjump-misses-init,
11260 Wreorder): Use LangEnabledBy.
11261 * c-opts.c (c_common_handle_option): Do not enable them
11262 explicitly. Call lang-specific generated functions.
11263 (c_common_post_options): Do not set them here.
11265 2012-05-13 Manuel López-Ibáñez <manu@gcc.gnu.org>
11267 * c.opt (Wclobbered,Wempty-body,Wignored-qualifiers,
11268 Wmissing-field-initializers,Wmissing-parameter-type,
11269 Wold-style-declaration,Woverride-init): Use EnabledBy.
11270 * c-opts.c (c_common_post_options): Do not set here explicitly.
11272 2012-05-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
11275 * c-opts.c (c_common_handle_option): Use handle_generated_option
11276 to enable sub-options.
11278 2012-05-10 Paolo Carlini <paolo.carlini@oracle.com>
11281 * c-common.c (warnings_for_convert_and_check): Use warning_at.
11283 2012-05-10 Richard Guenther <rguenther@suse.de>
11285 * c-common.c (c_sizeof_or_alignof_type): Remove assert and
11286 adjust commentary about TYPE_IS_SIZETYPE types.
11288 2012-05-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
11291 * c-common.c (warn_logical_operator): Check that argument of
11292 integer_zerop is not NULL.
11294 2012-05-05 Manuel López-Ibáñez <manu@gcc.gnu.org>
11297 * c-common.c (warn_logical_operator): Do not warn if either side
11298 is already true or false.
11300 2012-05-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
11303 * c-common.c (expr_original_type): New.
11304 (shorten_compare): Do not warn for enumeration types.
11306 2012-05-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
11308 * c.opt (fpermissive): Add Var(flag_permissive).
11310 2012-04-30 Marc Glisse <marc.glisse@inria.fr>
11313 * c-common.c (convert_vector_to_pointer_for_subscript): New function.
11314 * c-common.h (convert_vector_to_pointer_for_subscript): Declare it.
11316 2012-04-30 Dodji Seketeli <dodji@redhat.com>
11318 Add -Wvarargs option
11319 * c.opt (Wvarargs): Define new option.
11321 2012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
11323 * c-common.c (check_function_arguments): Replace
11324 Wmissing-format-attribute with Wsuggest-attribute=format.
11326 2012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
11328 * c.opt (Wsuggest-attribute=format): New. Alias of
11329 Wmissing-format-attribute.
11330 * c-format.c (decode_format_type): Replace
11331 Wmissing-format-attribute with Wsuggest-attribute=format.
11332 (check_function_format): Likewise.
11334 2012-04-27 Ollie Wild <aaw@google.com>
11336 * c-common.c: Add CPP_W_LITERAL_SUFFIX mapping.
11337 * c-opts.c (c_common_handle_option): Handle OPT_Wliteral_suffix.
11338 * c.opt: Add Wliteral-suffix.
11340 2012-04-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
11343 * c.opt (Wpedantic): New.
11344 (pedantic): Alias Wpedantic.
11345 * c-opts.c (c_common_handle_option): Replace -pedantic with -Wpedantic.
11346 (c_common_post_options): Likewise.
11347 (sanitize_cpp_opts): Likewise.
11348 * c-lex.c (interpret_float): Likewise.
11349 * c-format.c (check_format_types): Likewise.
11350 * c-common.c (pointer_int_sum): Likewise.
11351 (c_sizeof_or_alignof_type): Likewise.
11352 (c_add_case_label): Likewise.
11353 (c_do_switch_warnings): Likewise.
11354 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
11356 2012-04-15 Jason Merrill <jason@redhat.com>
11359 * c-format.c (CPLUSPLUS_STD_VER): C++11 inherits from C99.
11360 (C_STD_NAME): Distinguish between C++98 and C++11.
11362 2012-04-11 Eric Botcazou <ebotcazou@adacore.com>
11365 * c-common.h (uint16_type_node): Rename into...
11366 (c_uint16_type_node): ...this.
11367 * c-common.c (c_common_nodes_and_builtins): Adjust for above renaming.
11368 * c-cppbuiltin.c (builtin_define_stdint_macros): Likewise.
11370 2012-04-10 Manuel López-Ibáñez <manu@gcc.gnu.org>
11372 * c-common.c (warn_if_unused_value): Move definition to here.
11373 * c-common.h (warn_if_unused_value): Move declaration to here.
11375 2012-03-23 William Bader <williambader@hotmail.com>
11377 * c-lex.c (c_lex_with_flags): Avoid declarations after stmts.
11379 2012-03-20 Jason Merrill <jason@redhat.com>
11381 * c-common.h (enum cxx_dialect): Add cxx1y.
11382 * c-common.c (c_common_nodes_and_builtins): Use >= for cxx_dialect
11384 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
11385 * c-opts.c (c_common_post_options): Likewise.
11386 (set_std_cxx1y): New.
11387 (c_common_handle_option): Call it.
11388 * c.opt (-std=c++1y, -std=gnu++1y): New flags.
11390 2012-03-19 Paolo Carlini <paolo.carlini@oracle.com>
11393 * c.opt ([Wuseless-cast]): Add.
11395 2012-03-16 Richard Guenther <rguenther@suse.de>
11397 * c-pretty-print.c (pp_c_initializer_list): Adjust.
11399 2012-03-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
11402 * c.opt (ftemplate-backtrace-limit) Add.
11404 2012-03-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11406 * c-cppbuiltin.c (c_cpp_builtins): Remove #pragma extern_prefix
11408 * c-pragma.c (handle_pragma_extern_prefix): Remove.
11409 (init_pragma): Don't register extern_prefix.
11411 2012-03-12 Richard Guenther <rguenther@suse.de>
11413 * c-common.c (c_common_get_narrower): Use c_common_type_for_size.
11414 (builtin_type_for_size): Likewise.
11416 2012-02-13 Jakub Jelinek <jakub@redhat.com>
11419 * c-common.c (sync_resolve_params): Don't decide whether to convert
11420 or not based on TYPE_SIZE comparison, convert whenever arg_type
11421 is unsigned INTEGER_TYPE.
11423 2012-02-06 Paolo Carlini <paolo.carlini@oracle.com>
11426 * c.opt ([Wunused-local-typedefs]): Fix description.
11428 2012-01-24 Mike Stump <mikestump@comcast.net>
11430 * c-common.c (c_common_type_for_mode): Match signed/unsigned types
11433 2012-01-18 Richard Guenther <rguenther@suse.de>
11435 * c-opts.c (c_common_post_options): Reset LTO flags if
11436 we are about to generate a PCH.
11438 2012-01-17 Paolo Carlini <paolo.carlini@oracle.com>
11441 * c-pretty-print.c (pp_c_integer_constant): For unsigned constants
11442 use pp_unsigned_wide_integer.
11444 2012-01-10 Richard Guenther <rguenther@suse.de>
11446 PR middle-end/51806
11447 * c-opts.c (c_common_handle_option): Move -Werror handling
11448 to language independent code.
11450 2012-01-05 Richard Guenther <rguenther@suse.de>
11452 PR middle-end/51764
11453 * c.opt (Wmudflap, fmudflap, fmudflapth, fmudflapir): Move here
11456 2011-12-30 Paolo Carlini <paolo.carlini@oracle.com>
11459 * c-common.c (c_sizeof_or_alignof_type): In C++ allow for alignof
11460 of array types with an unknown bound.
11462 2011-12-20 Joseph Myers <joseph@codesourcery.com>
11464 * c-common.c (flag_isoc99): Update comment to refer to C11.
11465 (flag_isoc1x): Change to flag_isoc11.
11466 * c-common.h (flag_isoc99): Update comment to refer to C11.
11467 (flag_isoc1x): Change to flag_isoc11.
11468 * c-cppbuiltin.c (cpp_atomic_builtins): Change comment to refer to
11470 * c-opts.c (set_std_c1x): Change to set_std_c11.
11471 (c_common_handle_option): Handle OPT_std_c11 and OPT_std_gnu11.
11473 (set_std_c89, set_std_c99, set_std_c11): Use flag_isoc11.
11474 (set_std_c1): Use CLK_STDC11 and CLK_GNUC11.
11475 * c.opt (std=c1x): Change to std=c11. Document as non-draft
11477 (std=c1x, std=iso9899:2011): Add as aliases of std=c11.
11478 (std=gnu1x): Change to std=gnu11. Refer to non-draft standard.
11479 (std=gnu1x): Make alias of std=gnu11.
11481 2011-12-19 Jason Merrill <jason@redhat.com>
11484 * c-common.c (handle_transparent_union_attribute): Check the first
11485 field if the type is complete.
11487 2011-12-15 Jonathan Wakely <jwakely.gcc@gmail.com>
11490 * c-common.c (RID_IS_FINAL): Add.
11491 * c-common.h (RID_IS_FINAL): Add.
11493 2011-11-30 Iain Sandoe <iains@gcc.gnu.org>
11495 * c.opt (fgnu-runtime): Provide full description.
11496 (fnext-runtime): Likewise.
11497 * c-opts.c (OPT_fgnu_runtime, OPT_fnext_runtime) Remove.
11499 2011-11-28 Andrew MacLeod <amacleod@redhat.com>
11501 * c-cpp-builtin.c (cpp_atomic_builtins):New. Emit all atomic
11502 predefines in one place. Add LOCK_FREE predefines.
11503 (c_cpp_builtins): Move Legacy HAVE_SYNC predefines to
11506 2011-11-24 Andrew MacLeod <amacleod@redhat.com>
11509 * c-common.c (get_atomic_generic_size): Check for various error
11511 (resolve_overloaded_atomic_exchange,
11512 resolve_overloaded_atomic_compare_exchange,
11513 resolve_overloaded_atomic_load, resolve_overloaded_atomic_store): Return
11514 error_mark_node for error conditions.
11516 2011-11-08 Richard Guenther <rguenther@suse.de>
11518 PR middle-end/51010
11519 * c-pretty-print.c (pp_c_expression): Handle SSA_NAMEs.
11521 2011-11-07 Richard Henderson <rth@redhat.com>
11522 Aldy Hernandez <aldyh@redhat.com>
11523 Torvald Riegel <triegel@redhat.com>
11525 Merged from transactional-memory.
11527 * c-common.c (handle_tm_wrap_attribute,
11528 handle_tm_attribute, ignore_attribute, parse_tm_stmt_attr): New.
11529 (struct c_common_reswords): Added __transaction* keywords.
11530 (struct c_common_attribute_table): Added transaction* and tm_regparm
11532 * c-common.h: Added RID_TRANSACTION*. Added TM_ATTR* and TM_STMT*
11534 (parse_tm_stmt_attr, tm_attr_to_mask, tm_mask_to_attr,
11535 find_tm_attribute): Declare.
11537 2011-11-07 Jason Merrill <jason@redhat.com>
11540 * c-common.c, c-common.h: Revert yesterday's changes.
11542 2011-11-06 Jason Merrill <jason@redhat.com>
11545 * c-common.c (decl_has_visibility_attr): Split out from...
11546 (c_determine_visibility): ...here.
11547 * c-common.h: Declare it.
11549 2011-11-06 Joseph Myers <joseph@codesourcery.com>
11551 * c-common.c (c_common_reswords): Add _Alignas and _Alignof.
11552 (c_sizeof_or_alignof_type): Diagnose alignof applied to a function
11554 (check_user_alignment): New. Split out of
11555 handle_aligned_attribute. Disallow integer constants with
11556 noninteger types. Conditionally allow zero.
11557 (handle_aligned_attribute): Use check_user_alignment.
11558 * c-common.h (RID_ALIGNAS, check_user_alignment): New.
11560 2011-11-06 Andrew MacLeod <amacleod@redhat.com>
11561 Richard Henderson <rth@redhat.com>
11563 Merged from cxx-mem-model.
11565 * c-cppbuiltin.c (c_cpp_builtins): Test both atomic and sync patterns.
11566 * c-common.c (sync_resolve_params, sync_resolve_return): Only tweak
11567 parameters that are the same type size.
11568 (get_atomic_generic_size): New. Find size of generic
11569 atomic function parameters and do typechecking.
11570 (add_atomic_size_parameter): New. Insert size into parameter list.
11571 (resolve_overloaded_atomic_exchange): Restructure __atomic_exchange to
11572 either __atomic_exchange_n or external library call.
11573 (resolve_overloaded_atomic_compare_exchange): Restructure
11574 __atomic_compare_exchange to either _n variant or external library call.
11575 (resolve_overloaded_atomic_load): Restructure __atomic_load to either
11576 __atomic_load_n or an external library call.
11577 (resolve_overloaded_atomic_store): Restructure __atomic_store to either
11578 __atomic_store_n or an external library call.
11579 (resolve_overloaded_builtin): Handle new __atomic builtins.
11581 2011-11-04 Eric Botcazou <ebotcazou@adacore.com>
11584 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Call fold_offsetof_1.
11585 (fold_offsetof_1): Make global. Remove STOP_REF argument and adjust.
11586 <INDIRECT_REF>: Return the argument.
11587 <ARRAY_REF>: Remove special code for negative offset.
11588 Call fold_build_pointer_plus instead of size_binop.
11589 (fold_offsetof): Remove STOP_REF argument and adjust.
11590 * c-common.h (fold_offsetof_1): Declare.
11591 (fold_offsetof): Remove STOP_REF argument.
11593 2011-11-02 Paolo Carlini <paolo.carlini@oracle.com>
11596 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
11597 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
11598 Wnarrowing for C++0x and C++98.
11599 * c.opt ([Wnarrowing]): Update.
11601 2011-11-01 Paolo Carlini <paolo.carlini@oracle.com>
11604 * c.opt: Add Wzero-as-null-pointer-constant.
11606 2011-10-31 Jason Merrill <jason@redhat.com>
11608 * c.opt (-fdeduce-init-list): Off by default.
11611 * c-common.h (cxx_dialect): Add cxx11 and cxx03.
11612 * c.opt: Add -std=c++11, -std=gnu++11, -std=gnu++03,
11613 and -Wc++11-compat.
11614 * c-opts.c (set_std_cxx11): Rename from set_std_cxx0x.
11616 2011-10-27 Roberto Agostino Vitillo <ravitillo@lbl.gov>
11619 * c.opt (fvisibility-inlines-hidden): Description change.
11621 2011-10-26 Ed Smith-Rowland <3dw4rd@verizon.net>
11623 Implement C++11 user-defined literals.
11624 * c-common.c (build_userdef_literal): New.
11625 * c-common.def: New tree code.
11626 * c-common.h (tree_userdef_literal): New tree struct and accessors.
11627 * c-lex.c (interpret_float): Add suffix parm.
11628 (c_lex_with_flags): Build literal tokens.
11630 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
11634 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
11637 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
11638 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
11639 Wnarrowing for C++0x and C++98.
11640 * c.opt ([Wnarrowing]): Update.
11642 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
11645 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
11646 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
11647 Wnarrowing for C++0x and C++98.
11648 * c.opt ([Wnarrowing]): Update.
11650 2011-10-21 Paolo Carlini <paolo.carlini@oracle.com>
11653 * c-common.c (conversion_warning): Remove code looking for
11654 artificial operands.
11656 2011-10-18 Dodji Seketeli <dodji@redhat.com>
11659 * c-lex.c (fe_file_change): Use LINEMAP_SYSP when
11660 !NO_IMPLICIT_EXTERN_C.
11662 2011-10-17 Michael Spertus <mike_spertus@symantec.com>
11664 * c-common.c (c_common_reswords): Add __bases,
11666 * c-common.h: Add RID_BASES and RID_DIRECT_BASES.
11668 2011-10-17 Paolo Carlini <paolo.carlini@oracle.com>
11671 * c.opt ([Wnonnull]): Add C++ and Objective-C++.
11673 2011-10-15 Tom Tromey <tromey@redhat.com>
11674 Dodji Seketeli <dodji@redhat.com>
11676 * c.opt (fdebug-cpp): New option.
11677 * c-opts.c (c_common_handle_option): Handle the option.
11678 * c-ppoutput.c (maybe_print_line_1): New static function. Takes an
11679 output stream in parameter. Factorized from ...
11680 (maybe_print_line): ... this. Dump location debug information when
11681 -fdebug-cpp is in effect.
11682 (print_line_1): New static function. Takes an output stream in
11683 parameter. Factorized from ...
11684 (print_line): ... here. Dump location information when -fdebug-cpp
11686 (scan_translation_unit): Dump location information when
11687 -fdebug-cpp is in effect.
11689 2011-10-15 Tom Tromey <tromey@redhat.com>
11690 Dodji Seketeli <dodji@redhat.com>
11692 * c.opt (ftrack-macro-expansion): New option. Handle it with and
11694 * c-opts.c (c_common_handle_option)<case
11695 OPT_ftrack_macro_expansion_, case OPT_ftrack_macro_expansion>: New
11696 cases. Handle -ftrack-macro-expansion with and without argument.
11698 2011-10-15 Tom Tromey <tromey@redhat.com>
11699 Dodji Seketeli <dodji@redhat.com>
11701 * c-ppoutput.c (scan_translation_unit, maybe_print_line)
11702 (print_line, cb_define, do_line_change): Adjust to avoid touching
11703 the internals of struct line_map. Use the public API instead.
11704 * c-pch.c (c_common_read_pch): Likewise.
11705 * c-lex.c (fe_file_change): Likewise.
11707 2011-10-14 Paolo Carlini <paolo.carlini@oracle.com>
11710 * c.opt ([Wformat-zero-length]): Add C++ and Objective-C++.
11712 2011-10-11 Paolo Carlini <paolo.carlini@oracle.com>
11715 * c-pretty-print.c (pp_c_floating_constant): Output
11716 max_digits10 (in the ISO C++ WG N1822 sense) decimal digits.
11718 2011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
11720 * c-common.c (def_builtin_1): Delete old interface with two
11721 parallel arrays to hold standard builtin declarations, and replace
11722 it with a function based interface that can support creating
11723 builtins on the fly in the future. Change all uses, and poison
11724 the old names. Make sure 0 is not a legitimate builtin index.
11725 * c-omp.c (c_finish_omp_barrier): Ditto.
11726 (c_finish_omp_taskwait): Ditto.
11727 (c_finish_omp_flush): Ditto.
11729 2011-10-11 Tristan Gingold <gingold@adacore.com>
11731 * c.opt: (fallow-parameterless-variadic-functions): New.
11733 2011-09-08 Dodji Seketeli <dodji@redhat.com>
11735 PR c++/33255 - Support -Wunused-local-typedefs warning
11736 * c-common.h (struct c_language_function::local_typedefs): New
11738 (record_locally_defined_typedef, maybe_record_typedef_use)
11739 (maybe_warn_unused_local_typedefs): Declare new functions.
11740 * c-common.c (record_locally_defined_typedef)
11741 (maybe_record_typedef_use)
11742 (maybe_warn_unused_local_typedefs): Define new functions.
11743 * c.opt: Declare new -Wunused-local-typedefs flag.
11745 2011-09-06 Eric Botcazou <ebotcazou@adacore.com>
11747 PR middle-end/50266
11748 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Fold offsetof-like
11751 2011-09-05 Richard Guenther <rguenther@suse.de>
11753 * c-common.c (complete_array_type): Use ssize_int (-1) instead
11754 of integer_minus_one_node for empty array upper bounds.
11756 2011-08-28 Dodji Seketeli <dodji@redhat.com>
11758 * c-pch.c (c_common_read_pch): Call linemap_add with LC_ENTER as
11759 it's the first time it's being called on this main TU.
11761 2011-08-24 Richard Guenther <rguenther@suse.de>
11764 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Fix conditional.
11766 2011-08-22 Gabriel Charette <gchare@google.com>
11768 * c-opts.c (c_finish_options): Force BUILTINS_LOCATION for tokens
11769 defined in cpp_init_builtins and c_cpp_builtins.
11771 2011-08-19 Joseph Myers <joseph@codesourcery.com>
11773 * c-common.c (c_common_reswords): Add __builtin_complex.
11774 * c-common.h (RID_BUILTIN_COMPLEX): New.
11776 2011-08-18 Joseph Myers <joseph@codesourcery.com>
11778 * c-common.c (c_common_reswords): Add _Noreturn.
11779 (keyword_is_function_specifier): Handle RID_NORETURN.
11780 * c-common.h (RID_NORETURN): New.
11782 2011-08-10 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
11784 * c-common.c (unsafe_conversion_p): New function. Check if it is
11785 unsafe to convert an expression to the type.
11786 (conversion_warning): Adjust, use unsafe_conversion_p.
11787 * c-common.h (unsafe_conversion_p): New function declaration.
11789 2011-08-02 Jakub Jelinek <jakub@redhat.com>
11791 * c-common.h (c_finish_omp_atomic): Adjust prototype.
11792 (c_finish_omp_taskyield): New prototype.
11793 * c-omp.c (c_finish_omp_atomic): Add OPCODE, V, LHS1 and RHS1
11794 arguments. Handle OMP_ATOMIC_READ, OMP_ATOMIC_CAPTURE_OLD and
11795 OMP_ATOMIC_CAPTURE_NEW in addition to OMP_ATOMIC. If LHS1
11796 or RHS1 have side-effects, evaluate those too in the right spot,
11797 if it is a decl and LHS is also a decl, error out if they
11799 (c_finish_omp_taskyield): New function.
11800 * c-cppbuiltin.c (c_cpp_builtins): Change _OPENMP to 201107.
11801 * c-pragma.c (omp_pragmas): Add taskyield.
11802 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKYIELD.
11803 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_FINAL and
11804 PRAGMA_OMP_CLAUSE_MERGEABLE.
11806 2011-07-25 Dodji Seketeli <dodji@redhat.com>
11808 * c-common.h (set_underlying_type): Remove parm name from
11811 2011-07-25 Romain Geissler <romain.geissler@gmail.com>
11813 * c-pretty-print.h: Search c-common.h in c-family.
11815 2011-07-22 Jason Merrill <jason@redhat.com>
11818 * c.opt (Wnarrowing): New.
11821 * c-common.h: Declare c_linkage_bindings.
11822 * c-pragma.c (handle_pragma_redefine_extname): Use it.
11825 * c-opts.c (set_std_cxx0x): Set flag_isoc94 and flag_isoc99.
11826 * c-pretty-print.c (pp_c_cv_qualifiers): Check c_dialect_cxx as well
11827 as flag_isoc99 for 'restrict'.
11828 (pp_c_specifier_qualifier_list): Likewise for _Complex.
11830 2011-07-21 Ian Lance Taylor <iant@google.com>
11832 PR middle-end/49705
11833 * c-common.c (c_disable_warnings): New static function.
11834 (c_enable_warnings): New static function.
11835 (c_fully_fold_internal): Change local unused_p to bool. Call
11836 c_disable_warnings and c_enable_warnings rather than change
11837 c_inhibit_evaluation_warnings.
11839 2011-07-20 Jason Merrill <jason@redhat.com>
11841 PR c++/6709 (DR 743)
11842 PR c++/42603 (DR 950)
11843 * c-common.h (CPP_KEYWORD, CPP_TEMPLATE_ID): Move from cp/parser.h.
11844 (CPP_NESTED_NAME_SPECIFIER, N_CP_TTYPES): Likewise.
11845 (CPP_DECLTYPE): New.
11846 * c-common.c (c_parse_error): Handle CPP_DECLTYPE.
11848 2011-07-19 Richard Guenther <rguenther@suse.de>
11850 * c-common.c (pointer_int_sum): Use fold_build_pointer_plus.
11851 * c-omp.c (c_finish_omp_for): Likewise.
11853 2011-07-12 Eric Botcazou <ebotcazou@adacore.com>
11855 * c-ada-spec.c (dump_nested_types): Put semi-colon after empty loop
11856 body on the next line.
11858 2011-07-08 Jason Merrill <jason@redhat.com>
11861 * c-omp.c (check_omp_for_incr_expr): Handle preevaluation.
11864 * c-common.c (c_apply_type_quals_to_decl): Don't check
11865 TYPE_NEEDS_CONSTRUCTING.
11867 2011-07-06 Richard Guenther <rguenther@suse.de>
11869 * c-common.c (c_common_nodes_and_builtins):
11870 Merge calls to build_common_tree_nodes and build_common_tree_nodes_2.
11872 2011-07-05 Richard Guenther <rguenther@suse.de>
11874 * c-common.c (c_common_nodes_and_builtins): Build all common
11877 2011-06-27 Jakub Jelinek <jakub@redhat.com>
11879 * c-common.h (c_tree_chain_next): New static inline function.
11881 * c-common.c (check_builtin_function_arguments): Handle
11882 BUILT_IN_ASSUME_ALIGNED.
11884 2011-06-21 Andrew MacLeod <amacleod@redhat.com>
11886 * c-common.c: Add sync_ or SYNC__ to builtin names.
11887 * c-omp.c: Add sync_ or SYNC__ to builtin names.
11889 2011-06-20 Pierre Vittet <piervit@pvittet.com>
11891 * c-pragma.h (pragma_handler_1arg, pragma_handler_2arg): New
11893 (gen_pragma_handler): New union.
11894 (internal_pragma_handler): New type.
11895 (c_register_pragma_with_data)
11896 (c_register_pragma_with_expansion_and_data): New functions.
11898 * c-pragma.c (registered_pragmas, c_register_pragma_1)
11899 (c_register_pragma, c_register_pragma_with_expansion)
11900 (c_invoke_pragma_handler): Changed to work with
11901 internal_pragma_handler.
11902 (c_register_pragma_with_data)
11903 (c_register_pragma_with_expansion_and_data): New functions.
11905 2011-06-14 Joseph Myers <joseph@codesourcery.com>
11907 * c-common.c: Include common/common-target.h.
11908 (handle_section_attribute): Use
11909 targetm_common.have_named_sections.
11910 * c-cppbuiltin.c: Include common/common-target.h.
11911 (c_cpp_builtins): Use targetm_common.except_unwind_info.
11913 2011-06-10 Richard Guenther <rguenther@suse.de>
11915 * c-pretty-print.c (pp_c_type_specifier): Use pp_c_identifier
11916 to print a IDENTIFIER_NODE.
11918 2011-06-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11919 Joseph Myers <joseph@codesourcery.com>
11921 * c.opt (fbuilding-libgcc): New option.
11922 * c-cppbuiltin.c (c_cpp_builtins): Define
11923 __LIBGCC_TRAMPOLINE_SIZE__ if flag_building_libgcc.
11925 2011-06-07 Jason Merrill <jason@redhat.com>
11927 * c-common.c (max_tinst_depth): Lower default to 900.
11929 * c-format.c (gcc_cxxdiag_char_table): Add 'S' format.
11931 2011-06-07 Richard Guenther <rguenther@suse.de>
11933 * c-common.c (c_common_nodes_and_builtins): Do not set
11934 size_type_node or call set_sizetype.
11936 2011-06-07 Dodji Seketeli <dodji@redhat.com>
11939 * c-pretty-print.c (pp_c_integer_constant): Consider the canonical
11940 type when using pointer comparison to compare types.
11942 2011-06-02 Jonathan Wakely <jwakely.gcc@gmail.com>
11944 * c.opt: Add -Wdelete-non-virtual-dtor.
11945 * c-opts.c (c_common_handle_option): Include it in -Wall.
11947 2011-05-30 Nathan Froyd <froydnj@gcc.gnu.org>
11952 2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
11954 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
11957 2011-05-27 Jakub Jelinek <jakub@redhat.com>
11960 * c-common.c (c_common_truthvalue_conversion) <case COND_EXPR>: For
11961 C++ don't call c_common_truthvalue_conversion on void type arms.
11963 2011-05-27 Nathan Froyd <froydnj@codesourcery.com>
11965 * c-common.h (struct stmt_tree_s) [x_cur_stmt_list]: Change to a VEC.
11966 (stmt_list_stack): Define.
11967 (cur_stmt_list): Adjust for new type of x_cur_stmt_list.
11968 * c-semantics.c (push_stmt_list, pop_stmt_list): Likewise.
11970 2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
11972 * c-common.c (warning_candidate_p): Check for BLOCKs.
11974 2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
11976 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
11979 2011-05-25 Jakub Jelinek <jakub@redhat.com>
11981 * c-common.c (def_fn_type): Remove extra va_end.
11983 2011-05-23 Jason Merrill <jason@redhat.com>
11986 * c-common.c (c_common_get_narrower): New.
11987 (shorten_binary_op, shorten_compare, warn_for_sign_compare): Use it.
11989 2011-05-23 Nathan Froyd <froydnj@codesourcery.com>
11991 * c-common.h (check_function_arguments): Tweak prototype of
11992 check_function_arguments.
11993 * c-common.c (check_function_arguments): Likewise. Adjust
11994 calls to check_function_nonnull, check_function_format, and
11995 check_function_sentinel.
11996 (check_function_sentinel): Take a FUNCTION_TYPE rather than
11997 separate attributes and typelist arguments. Use
11998 FOREACH_FUNCTION_ARGS to iterate over argument types.
12000 2011-05-15 Paolo Carlini <paolo.carlini@oracle.com>
12002 * c-common.c (c_common_reswords): Reorder.
12003 * c-common.h (rid): Likewise.
12005 2011-05-10 Nathan Froyd <froydnj@codesourcery.com>
12007 * c-common.c (def_fn_type): Don't call build_function_type, call
12008 build_function_type_array or build_varargs_function_type_array
12010 (c_common_nodes_and_builtins): Likewise.
12012 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
12014 * c-common.c (c_add_case_label): Omit the loc argument to
12016 * c-common.h (build_case_label): Remove.
12017 * c-semantics.c (build_case_label): Remove.
12019 2011-05-05 Joseph Myers <joseph@codesourcery.com>
12021 * c-objc.h (objc_start_method_definition): Update prototype.
12022 * stub-objc.c (objc_start_method_definition): Add extra parameter.
12024 2011-05-04 Nathan Froyd <froydnj@codesourcery.com>
12026 * c-common.c (check_main_parameter_types): Reindent. Don't use
12027 TYPE_ARG_TYPES directly.
12028 (handle_nonnull_attribute): Likewise.
12029 (sync_resolve_params): Likewise.
12030 * c-format.c (handle_format_arg_attribute): Likewise. Adjust call
12031 to check_format_string.
12032 (handle_format_attribute): Likewise.
12033 (check_format_string): Take a function type to examine instead of
12034 a type list. Use a function_arg_iterator to step through argument
12037 2011-05-04 Richard Guenther <rguenther@suse.de>
12039 * c-common.c (fix_string_type): Use size_int for index type bounds.
12040 (start_fname_decls): Do not pass NULL to build_int_cst.
12041 (c_init_attributes): Likewise.
12042 * c-lex.c (c_lex_with_flags): Likewise.
12044 2011-04-27 Jason Merrill <jason@redhat.com>
12046 * c-common.c (make_tree_vector_from_list): New.
12047 * c-common.h: Declare it.
12049 2011-04-26 Richard Guenther <rguenther@suse.de>
12051 PR preprocessor/48248
12052 * c-ppoutput.c (maybe_print_line): Always optimize newlines
12053 for output size with -P.
12055 2011-04-25 Paolo Carlini <paolo.carlini@oracle.com>
12057 * c-common.c (struct c_common_resword): Add __underlying_type.
12058 * c-common.h (enum rid): Add RID_UNDERLYING_TYPE.
12060 2011-04-20 Jim Meyering <meyering@redhat.com>
12062 * c-format.c (init_dollar_format_checking): Remove useless
12065 2011-04-15 Nicola Pero <nicola.pero@meta-innovation.com>
12067 * c-objc.h (objc_get_interface_ivars): Removed.
12068 (objc_detect_field_duplicates): New.
12069 * stub-objc.c: Likewise.
12071 2011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
12073 * stub-objc.c (objc_declare_protocols): Renamed to
12074 objc_declare_protocol.
12075 * c-objc.h: Likewise.
12077 2011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
12079 * stub-objc.c (objc_declare_class): Updated argument name.
12081 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
12083 * c-common.h (c_common_init_ts): Declare.
12084 * c-common.c (c_common_init_ts): Define.
12086 2011-04-12 Nicola Pero <nicola.pero@meta-innovation.com>
12088 * c-objc.h (objc_build_message_expr): Updated prototype.
12089 * stub-objc.c (objc_build_message_expr): Likewise.
12091 2011-04-12 Martin Jambor <mjambor@suse.cz>
12093 * c-gimplify.c (c_genericize): Call cgraph_get_create_node instead
12096 2011-04-11 Richard Guenther <rguenther@suse.de>
12098 * c-common.c (complete_array_type): Build a range type of
12101 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
12103 * c-common.c (handle_sentinel_attribute): Don't use TYPE_ARG_TYPES.
12104 (handle_type_generic_attribute): Likewise.
12106 2011-04-07 Jason Merrill <jason@redhat.com>
12109 * c-common.c (c_common_truthvalue_conversion): Don't ignore
12110 conversion from C++0x scoped enum.
12112 2011-04-06 Joseph Myers <joseph@codesourcery.com>
12114 * c-target-def.h: New file.
12115 * c-target.def: New file.
12116 * c-target.h: New file.
12117 * c-common.c (targetcm): Don't define here.
12118 * c-common.h (default_handle_c_option): Declare.
12119 * c-format.c: Include c-target.h instead of target.h.
12120 * c-opts.c: Include c-target.h instead of target.h. Explicitly
12122 (default_handle_c_option): Move from targhooks.c.
12124 2011-03-29 Jakub Jelinek <jakub@redhat.com>
12126 PR preprocessor/48248
12127 * c-ppoutput.c (print): Add src_file field.
12128 (init_pp_output): Initialize it.
12129 (maybe_print_line): Don't optimize by adding up to 8 newlines
12130 if map->to_file and print.src_file are different file.
12131 (print_line): Update print.src_file.
12133 2011-03-25 Kai Tietz <ktietz@redhat.com>
12135 * c-ada-spec.c (compare_comment): Use filename_cmp
12136 instead of strcmp for filename.
12138 2011-03-25 Jeff Law <law@redhat.com>
12140 * c-common.c (def_fn_type): Add missing va_end.
12142 2011-03-25 Jason Merrill <jason@redhat.com>
12144 * c.opt: Add -std=c++03.
12146 2011-03-22 Eric Botcazou <ebotcazou@adacore.com>
12148 * c-ada-spec.c (dump_ada_template): Skip non-class instances.
12150 2011-03-17 Kai Tietz <ktietz@redhat.com>
12153 * c-pretty-print.c (pp_c_specifier_qualifier_list):
12154 Display allowed attributes for function pointer types.
12155 (pp_c_attributes_display): New function to display
12156 attributes having affects_type_identity flag set to true.
12157 * c-pretty-print.h (pp_c_attributes_display): New prototype.
12159 * c-common.c (c_common_attribute_table):
12161 (c_common_format_attribute_table): Likewise.
12163 2011-03-18 Jason Merrill <jason@redhat.com>
12165 * c.opt (fconstexpr-depth): Add Var(max_constexpr_depth).
12166 * c-common.h: Don't declare it here.
12167 * c-common.c: Or define it here.
12168 * c-opts.c (c_common_handle_option): Or set it here.
12171 * c-common.c (handle_transparent_union_attribute): Don't
12172 make a duplicate type in C++.
12174 2011-03-15 Jason Merrill <jason@redhat.com>
12176 * c-common.c (max_constexpr_depth): New.
12177 * c-common.h: Declare it.
12178 * c-opts.c (c_common_handle_option): Set it.
12179 * c.opt (fconstexpr-depth): New option.
12181 2011-03-11 Jason Merrill <jason@redhat.com>
12183 * c-common.c (attribute_takes_identifier_p): Add missing const.
12186 * c-common.c (attribute_takes_identifier_p): Assume that an
12187 unknown attribute takes an identifier.
12189 2011-03-07 Nathan Froyd <froydnj@codesourcery.com>
12192 * c-common.c (c_type_hash): Call list_length instead of iterating
12193 through DECL_CHAIN. Rename 'i' to 'n_elements'.
12195 2011-02-19 Jakub Jelinek <jakub@redhat.com>
12198 * c-common.c (c_fully_fold_internal): Handle VIEW_CONVERT_EXPR.
12200 2011-02-17 Iain Sandoe <iains@gcc.gnu.org>
12202 * c.opt (fobjc-abi-version=) New.
12203 (fobjc-nilcheck): New.
12205 2011-02-03 Nathan Froyd <froydnj@codesourcery.com>
12208 * c-common.h (keyword_is_decl_specifier): Declare.
12209 * c-common.c (keyword_is_decl_specifier): Define.
12210 (keyword_is_function_specifier): New function.
12212 2011-01-26 Jakub Jelinek <jakub@redhat.com>
12215 * c-lex.c (interpret_float): If CPP_N_IMAGINARY, ensure
12216 EXCESS_PRECISION_EXPR is created with COMPLEX_TYPE instead of
12219 2011-01-26 Arnaud Charlet <charlet@adacore.com>
12221 * c-ada-spec.c (dump_generic_ada_node): Avoid dereferencing null type.
12223 2011-01-26 Jakub Jelinek <jakub@redhat.com>
12226 * c-opts.c (c_common_post_options): Call c_common_no_more_pch
12227 after init_c_lex if pch_file is set.
12229 2011-01-26 Dave Korn <dave.korn.cygwin@gmail.com>
12232 * c.opt (-fkeep-inline-dllexport): New switch.
12234 2011-01-12 Richard Guenther <rguenther@suse.de>
12236 PR middle-end/32511
12237 * c-common.c (handle_weak_attribute): Warn instead of error
12238 on declaring an inline function weak.
12240 2011-01-05 Tom Tromey <tromey@redhat.com>
12242 * c-common.h (lvalue_error): Update.
12243 * c-common.c (lvalue_error): Add 'loc' argument. Call error_at,
12246 2010-12-29 Nicola Pero <nicola.pero@meta-innovation.com>
12249 * c-objc.h (objc_finish_message_expr): Added argument to
12252 2010-12-22 Nathan Froyd <froydnj@codesourcery.com>
12254 * c-common.c (handle_nonnull_attribute, handle_sentinel_attribute):
12257 2010-12-18 Nicola Pero <nicola.pero@meta-innovation.com>
12259 * c-objc.h (objc_maybe_warn_exceptions): New.
12260 * stub-objc.c (objc_maybe_warn_exceptions): New.
12262 2010-12-10 Nathan Froyd <froydnj@codesourcery.com>
12264 * c-common.h (readonly_error): Declare.
12265 * c-common.c (readonly_error): Define.
12267 2010-12-09 Nathan Froyd <froydnj@codesourcery.com>
12269 * c-common.h (invalid_indirection_error): Declare.
12270 * c-common.c (invalid_indirection_error): Define.
12272 2010-12-03 Richard Guenther <rguenther@suse.de>
12275 * c-pretty-print.c (pp_c_postfix_expression): Handle MEM_REF.
12276 (pp_c_unary_expression): Likewise.
12277 (pp_c_expression): Likewise.
12279 2010-11-30 Nicola Pero <nicola.pero@meta-innovation.com>
12281 * c-common.h (objc_finish_function): New.
12282 (objc_non_volatilized_type): Removed.
12283 (objc_type_quals_match): Removed.
12284 * stub-objc.c (objc_finish_function): New.
12285 (objc_non_volatilized_type): Removed.
12286 (objc_type_quals_match): Removed.
12288 2010-11-30 Joseph Myers <joseph@codesourcery.com>
12290 * c-common.h (parse_optimize_options): Declare.
12291 * c-cppbuiltin.c, c-format.c, c-gimplify.c, c-lex.c, c-omp.c,
12292 c-pch.c, c-pragma.c, c-semantics.c: Don't include toplev.h.
12294 2010-11-29 Joseph Myers <joseph@codesourcery.com>
12296 * c-opts.c (check_deps_environment_vars): Use getenv instead of
12298 * c-pch.c (O_BINARY): Don't define here.
12299 * c-pragma.h: Include "cpplib.h" instead of <cpplib.h>.
12301 2010-11-25 Joseph Myers <joseph@codesourcery.com>
12303 * c-cppbuiltin.c (c_cpp_builtins): Pass &global_options to
12304 targetm.except_unwind_info.
12306 2010-11-23 Joseph Myers <joseph@codesourcery.com>
12308 * c-opts.c (c_common_handle_option): Pass location to
12309 set_struct_debug_option.
12311 2010-11-23 Joseph Myers <joseph@codesourcery.com>
12313 * c-common.c (visibility_options): Move from ../opts.c.
12314 * c-common.h (struct visibility_flags, visibility_options):
12316 * c-opts.c (finish_options): Rename to c_finish_options.
12317 (c_common_init): Update call to finish_options.
12319 2010-11-22 Nicola Pero <nicola.pero@meta-innovation.com>
12322 * c-lex.c (lex_string): Check that each string in an Objective-C
12323 string concat sequence starts with either one or zero '@', and
12324 that there are no spurious '@' signs at the end.
12326 2010-11-20 Joseph Myers <joseph@codesourcery.com>
12328 * c-pragma.c: Remove conditionals on HANDLE_PRAGMA_PACK,
12329 HANDLE_PRAGMA_PACK_PUSH_POP, HANDLE_PRAGMA_WEAK and
12330 HANDLE_PRAGMA_VISIBILITY.
12331 * c-pragma.h (HANDLE_PRAGMA_WEAK, HANDLE_PRAGMA_PACK,
12332 HANDLE_PRAGMA_VISIBILITY): Don't define.
12333 (HANDLE_SYSV_PRAGMA, HANDLE_PRAGMA_PACK_PUSH_POP): Don't test.
12335 2010-11-20 Nathan Froyd <froydnj@codesourcery.com>
12340 * c-common.h (keyword_begins_type_specifier): Declare.
12341 (keyword_is_storage_class_specifier): Declare.
12342 (keyword_is_type_qualifier): Declare.
12343 * c-common.c (keyword_begins_type_specifier): New function.
12344 (keyword_is_storage_class_specifier): New function.
12345 (keyword_is_type_qualifier): Declare.
12347 2010-11-19 Joseph Myers <joseph@codesourcery.com>
12350 * c-common.c (in_late_binary_op): Define.
12351 (c_common_truthvalue_conversion): Check in_late_binary_op before
12352 calling c_save_expr.
12353 * c-common.h (in_late_binary_op): Declare.
12355 2010-11-19 Joseph Myers <joseph@codesourcery.com>
12357 * c-opts.c (c_common_handle_option): Update calls to
12358 set_struct_debug_option.
12360 2010-11-19 Nicola Pero <nicola.pero@meta-innovation.com>
12362 * c-common.h (objc_declare_protocols): Added additional argument.
12363 * stub-objc.c (objc_declare_protocol): Same change.
12365 2010-11-18 Nathan Froyd <froydnj@codesourcery.com>
12368 * c-common.h (build_real_imag_expr): Declare.
12369 * c-semantics.c (build_real_imag_expr): Define.
12371 2010-11-17 Joseph Myers <joseph@codesourcery.com>
12373 * c-opts.c (c_common_parse_file): Take no arguments.
12374 * c-common.h (c_common_parse_file): Update prototype.
12376 2010-11-16 Jakub Jelinek <jakub@redhat.com>
12379 * c-common.c (warning_candidate_p): Don't track non-const calls
12382 2010-11-15 Ian Lance Taylor <iant@google.com>
12384 * c-lex.c (init_c_lex): Set macro debug callbacks if
12385 flag_dump_go_spec is set.
12387 2010-11-15 Nicola Pero <nicola.pero@meta-innovation.com>
12389 * c-common.h (objc_build_incr_expr_for_property_ref): New.
12390 * stub-objc.c (objc_build_incr_expr_for_property_ref): New.
12392 2010-11-15 Nathan Froyd <froydnj@codesourcery.com>
12394 PR preprocessor/45038
12395 * c-cppbuiltin.c (c_cpp_builtins): Use different format for C++
12398 2010-11-12 Joseph Myers <joseph@codesourcery.com>
12400 * c-common.h (c_family_lang_mask): Declare.
12401 * c-opts.c (c_family_lang_mask): Make extern.
12402 * c-pragma.c (handle_pragma_diagnostic): Use
12403 control_warning_option.
12405 2010-11-12 Joseph Myers <joseph@codesourcery.com>
12407 * c-common.c (parse_optimize_options): Update call to
12409 * c-common.h (c_common_handle_option): Update prototype.
12410 * c-opts.c (c_common_handle_option): Take location_t parameter and
12411 pass it to other functions.
12413 2010-11-11 Joseph Myers <joseph@codesourcery.com>
12415 * c-opts.c (warning_as_error_callback): Remove.
12416 (c_common_initialize_diagnostics): Don't call
12417 register_warning_as_error_callback.
12418 (c_common_handle_option): Handle -Werror=normalized= here.
12420 2010-11-10 Joseph Myers <joseph@codesourcery.com>
12422 * c-common.c (handle_mode_attribute): Use %' and word "signedness"
12424 * c-opts.c (c_common_parse_file): Start diagnostics with lowercase
12426 * c-pragma.c (handle_pragma_target, handle_pragma_optimize):
12427 Remove trailing '.' from diagnostics.
12428 * c.opt (Wwrite-strings_: Avoid '`' in help text.
12430 2010-11-10 Joseph Myers <joseph@codesourcery.com>
12432 * c-common.c (parse_optimize_options): Pass global_dc to
12434 * c-opts.c (c_common_handle_option): Pass &global_options to
12435 set_Wstrict_aliasing.
12436 * c.opt (v): Don't mark Common or document here.
12438 2010-11-06 Iain Sandoe <iains@gcc.gnu.org>
12441 * c-format.c (format_type): New type gcc_objc_string_format_type.
12442 (valid_stringptr_type_p): New.
12443 (handle_format_arg_attribute): Use valid_stringptr_type_p ().
12444 (check_format_string): Pass expected type, use
12445 valid_stringptr_type_p (), check that the format string types are
12446 consistent with the format specification.
12447 (decode_format_attr): Warn if NSString is used outside objective-c.
12448 (format_types_orig): Add NSString.
12449 (format_name): New.
12450 (format_flags): New.
12451 (check_format_arg): Handle format strings requiring an external parser.
12452 first_target_format_type: New variable.
12453 (handle_format_attribute): Set up first_target_format_type, pass the
12454 expected format arg string type to check_format_string().
12455 * c-common.h (FMT_FLAG_PARSE_ARG_CONVERT_EXTERNAL): New flag.
12456 * stub-objc.c (objc_string_ref_type_p): New.
12457 (objc_check_format_arg): New.
12459 2010-11-04 Nicola Pero <nicola.pero@meta-innovation.com>
12461 Fixed using the Objective-C 2.0 dot-syntax with class names.
12462 * c-common.h (objc_build_class_component_ref): New.
12463 * stub-objc.c (objc_build_class_component_ref): New.
12465 2010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
12467 * c.opt (Wproperty-assign-default): New option.
12469 2010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
12471 Implemented -fobjc-std=objc1 flag.
12472 * c.opt (fobjc-std=objc1): New option.
12474 2010-11-01 Nicola Pero <nicola.pero@meta-innovation.com>
12476 Implemented format and noreturn attributes for Objective-C methods.
12477 * c-common.c (handle_noreturn_attribute): Recognize 'noreturn'
12478 attribute for Objective-C methods.
12480 2010-10-31 Jason Merrill <jason@redhat.com>
12482 * c-common.c (conversion_warning, warn_for_collisions_1): Use
12485 2010-10-30 Nicola Pero <nicola.pero@meta-innovation.com>
12487 Implemented Objective-C 2.0 @property, @synthesize and @dynamic.
12488 * c-common.h (enum rid): Removed RID_COPIES and RID_IVAR.
12489 (objc_add_property_declaration): Removed arguments for copies and
12491 (objc_build_getter_call): Renamed to
12492 objc_maybe_build_component_ref.
12493 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
12494 (objc_is_property_ref): New.
12495 * c-common.c (c_common_reswords): Removed copies and ivar.
12496 * stub-objc.c (objc_add_property_declaration): Removed arguments
12497 for copies and ivar.
12498 (objc_build_getter_call): Renamed to
12499 objc_maybe_build_component_ref.
12500 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
12501 (objc_is_property_ref): New.
12503 2010-10-29 Arnaud Charlet <charlet@adacore.com>
12504 Matthew Gingell <gingell@adacore.com>
12506 * c-ada-spec.c (separate_class_package): New function.
12507 (pp_ada_tree_identifier): Prefix references to C++ classes with the
12508 name of their enclosing package.
12509 (print_ada_declaration): Use separate_class_package.
12511 2010-10-27 Jason Merrill <jason@redhat.com>
12513 * c-common.c (c_common_reswords): Add __is_literal_type.
12514 * c-common.h (enum rid): Add RID_IS_LITERAL_TYPE.
12516 * c-common.c (check_case_value): Remove special C++ code.
12518 2010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
12520 * c-common.h (enum rid): Added RID_READWRITE, RID_ASSIGN,
12521 RID_RETAIN, RID_COPY and RID_NONATOMIC. Updated RID_FIRST_PATTR
12522 and RID_LAST_PATTR.
12523 (objc_add_property_declaration): Added additional arguments.
12524 (objc_property_attribute_kind): Removed.
12525 (objc_set_property_attr): Removed.
12526 * c-common.c (c_common_reswords): Added readwrite, assign, retain,
12527 copy and nonatomic.
12528 * stub-objc.c (objc_add_property_declaration): Added additional
12530 (objc_set_property_attr): Removed.
12532 2010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
12534 * c-common.h (objc_add_property_variable): Renamed to
12535 objc_add_property_declaration. Added location argument.
12536 * stub-objc.c (objc_add_property_variable): Same change.
12538 2010-10-23 Nicola Pero <nicola.pero@meta-innovation.com>
12540 * c-common.h (objc_maybe_printable_name): New.
12541 * stub-objc.c (objc_maybe_printable_name): New.
12543 2010-10-22 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
12544 Andrew Pinski <pinskia@gmail.com>
12546 * c-common.h (c_common_mark_addressable_vec): Declare.
12547 * c-common.c (c_common_mark_addressable_vec): New function.
12549 2010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
12551 * c-common.h (objc_set_method_type): Removed.
12552 (objc_add_method_declaration): Added boolean argument.
12553 (objc_start_method_definition): Same change.
12554 (objc_build_method_signature): Same change.
12555 * stub-objc.c (objc_set_method_type): Removed.
12556 (objc_add_method_declaration): Added boolean argument.
12557 (objc_start_method_definition): Same change.
12558 (objc_build_method_signature): Same change.
12560 2010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
12562 * c-common.h (finish_file): Removed.
12563 (objc_write_global_declarations): New.
12564 * c-opts.c (c_common_parse_file): Do not call finish_file.
12565 * stub-objc.c (objc_write_global_declarations): New.
12567 2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
12569 Implemented parsing @synthesize and @dynamic for
12570 Objective-C/Objective-C++.
12571 * c-common.h (enum rid): Add RID_AT_SYNTHESIZE and RID_AT_DYNAMIC.
12572 (objc_add_synthesize_declaration): New.
12573 (objc_add_dynamic_declaration): New.
12574 * c-common.c (c_common_reswords): Add synthesize and dynamic.
12575 * stub-objc.c (objc_add_synthesize_declaration): New.
12576 (objc_add_dynamic_declaration): New.
12578 2010-10-18 Michael Meissner <meissner@linux.vnet.ibm.com>
12581 * c-cppbuiltin.c (mode_has_fma): Move function here from
12582 builtins.c. Don't use the fma optab, instead just use the
12583 HAVE_fma* macros, so that __FP_FAST_FMA* will be defined when
12586 2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
12588 Merge from 'apple/trunk' branch on FSF servers.
12590 2005-11-08 Fariborz Jahanian <fjahanian@apple.com>
12593 * c-common.h (objc_non_volatilized_type): New declaration
12594 * stub-objc.c (objc_non_volatilized_type): New stub.
12596 2010-10-17 Nicola Pero <nicola.pero@meta-innovation.com>
12598 Merge from 'apple/trunk' branch on FSF servers.
12600 2006-03-27 Fariborz Jahanian <fjahanian@apple.com>
12603 * c-common.h (objc_diagnose_private_ivar): New decl.
12604 * stub-objc.c (objc_diagnose_private_ivar): New stub.
12606 2010-10-17 Iain Sandoe <iains@gcc.gnu.org>
12608 * c-common.c (c_common_reswords): Add package, RID_AT_PACKAGE.
12609 * c-common.h (enum rid): Add RID_AT_PACKAGE.
12610 (objc_ivar_visibility_kind): New enum.
12611 (objc_set_visibility): Adjust prototype to use visibility enum.
12612 * stub-objc.c (objc_set_visibility): Adjust stub to use
12615 2010-10-14 Michael Meissner <meissner@linux.vnet.ibm.com>
12617 * c-cppbuiltin.c (builtin_define_float_constants): Emit
12618 __FP_FAST_FMA, __FP_FAST_FMAF, and __FP_FAST_FMAL if the machine
12619 has the appropriate fma builtins.
12620 (c_cpp_builtins): Adjust call to builtin_define_float_constants.
12622 2010-10-14 Iain Sandoe <iains@gcc.gnu.org>
12624 merge from FSF apple 'trunk' branch.
12625 2006 Fariborz Jahanian <fjahanian@apple.com>
12627 Radars 4436866, 4505126, 4506903, 4517826
12628 * c-common.c (c_common_resword): Define @property and its attributes.
12629 * c-common.h: Define property attribute enum entries.
12630 (OBJC_IS_PATTR_KEYWORD): New.
12631 (objc_property_attribute_kind): New enum.
12632 Declare objc_set_property_attr (), objc_add_property_variable (),
12633 objc_build_getter_call () and objc_build_setter_call ().
12634 * stub-objc.c (objc_set_property_attr): New stub.
12635 (objc_add_property_variable): Likewise.
12636 (objc_build_getter_call): Likewise.
12637 (objc_build_setter_call) Likewise.
12639 2010-10-13 Iain Sandoe <iains@gcc.gnu.org>
12641 merge from FSF apple 'trunk' branch.
12642 2006-04-26 Fariborz Jahanian <fjahanian@apple.com>
12644 Radar 3803157 (method attributes)
12645 * c-common.c (handle_deprecated_attribute): Recognize
12646 objc methods as valid declarations.
12647 * c-common.h: Declare objc_method_decl ().
12648 * stub-objc.c (objc_method_decl): New stub.
12650 2010-10-08 Joseph Myers <joseph@codesourcery.com>
12652 * c-common.c (parse_optimize_options): Call
12653 decode_cmdline_options_to_array_default_mask before
12654 decode_options. Update arguments to decode_options.
12655 * c-common.h (c_common_init_options_struct): Declare.
12656 * c-opts.c (c_common_init_options_struct): New. Split out from
12657 c_common_init_options.
12659 2010-10-06 Nicola Pero <nicola.pero@meta-innovation.com>
12661 Implemented fast enumeration for Objective-C.
12662 * c-common.h (objc_finish_foreach_loop): New.
12663 * stub-objc.c (objc_finish_foreach_loop): New.
12665 2010-10-05 Joseph Myers <joseph@codesourcery.com>
12667 * c-common.h (struct diagnostic_context): Don't declare here.
12668 (c_common_initialize_diagnostics): Declare using
12669 diagnostic_context typedef.
12670 * c-opts.c (c_common_handle_option): Pass global_dc to
12671 handle_generated_option.
12673 2010-10-04 Joseph Myers <joseph@codesourcery.com>
12675 * c-opts.c (c_common_handle_option): Pass &global_options_set to
12676 handle_generated_option.
12678 2010-10-03 Ian Lance Taylor <iant@google.com>
12680 * c.opt (-fplan9-extensions): New option.
12682 2010-10-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
12684 * c-cppbuiltin.c (define__GNUC__, builtin_define_type_precision):
12686 (c_cpp_builtins): Call functions from cppbuiltin.c instead
12687 of duplicating code.
12689 2010-09-30 Iain Sandoe <iains@gcc.gnu.org>
12691 * c-common.c: Add two new entries for @optional
12692 and @required keywords.
12694 merge from FSF 'apple/trunk' branch.
12695 2006-01-30 Fariborz Jahanian <fjahanian@apple.com>
12698 * c-common.h (RID_AT_OPTIONAL, RID_AT_REQUIRED): Two new
12699 objective-c keywords.
12700 (objc_set_method_opt): New declaration.
12701 * stub-objc.c (objc_set_method_opt): New stub.
12703 2010-09-30 Joseph Myers <joseph@codesourcery.com>
12705 * c-common.c (handle_optimize_attribute): Pass &global_options to
12706 cl_optimization_save and cl_optimization_restore.
12707 * c-opts.c (c_common_handle_option): Pass &global_options to
12708 handle_generated_option.
12709 * c-pragma.c (handle_pragma_diagnostic): Use option_flag_var.
12710 (handle_pragma_pop_options, handle_pragma_reset_options): Pass
12711 &global_options to cl_optimization_restore.
12713 2010-09-30 Nicola Pero <nicola.pero@meta-innovation.com>
12715 * c-lex.c (c_lex_with_flags): Updated comments for CPP_AT_NAME
12716 Objective-C/Objective-C++ keywords.
12718 2010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
12720 Merge from 'apple/trunk' branch on FSF servers.
12722 2005-10-04 Fariborz Jahanian <fjahanian@apple.com>
12725 * c-common.h (objc_check_global_decl): New declaration.
12726 * stub-objc.c (objc_check_global_decl): New stub.
12728 2010-09-29 Joseph Myers <joseph@codesourcery.com>
12730 * c.opt: Don't use VarExists.
12732 2010-09-29 Joseph Myers <joseph@codesourcery.com>
12734 * c-common.c (c_cpp_error): Update names of diagnostic_context
12736 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Update names of
12737 cl_optimization members.
12738 * c-opts.c (warning_as_error_callback, c_common_handle_option,
12739 sanitize_cpp_opts, finish_options): Update names of cpp_options
12742 2010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
12744 * c-common.h (OBJC_IS_CXX_KEYWORD): New macro. Updated comments.
12745 (objc_is_reserved_word): Removed.
12746 * c-common.c: Updated comments.
12747 * c-lex.c (c_lex_with_flags): Use OBJC_IS_CXX_KEYWORD instead of
12748 objc_is_reserved_word.
12749 * stub-objc.c (objc_is_reserved_word): Removed.
12751 2010-09-28 Iain Sandoe <iains@gcc.gnu.org>
12753 * c-common.h (objc_add_method_declaration): Adjust prototype to
12754 include attributes.
12755 (objc_start_method_definition): Likewise.
12756 (objc_build_keyword_decl): Likewise.
12757 * stub-objc.c:(objc_add_method_declaration): Handle attributes.
12758 (objc_start_method_definition): Likewise.
12759 (objc_build_keyword_decl): Likewise.
12761 2010-09-28 Iain Sandoe <iains@gcc.gnu.org>
12763 * c-common.h (objc_start_class_interface): Adjust prototype.
12764 (objc_start_category_interface): Likewise.
12765 (objc_start_protocol): Likewise.
12766 * stub-objc.c (objc_start_protocol): Adjust for extra argument.
12767 (objc_start_class_interface): Likewise.
12768 (objc_start_category_interface): Likewise.
12770 2010-09-27 Ian Lance Taylor <iant@google.com>
12772 * c-common.c (c_common_attribute_table): Add no_split_stack.
12773 (handle_no_split_stack_attribute): New static function.
12775 2010-09-27 Nicola Pero <nicola.pero@meta-innovation.com>
12777 Merge from 'apple/trunk' branch on FSF servers.
12779 2005-12-15 Fariborz Jahanian <fjahanian@apple.com>
12782 * c-common.h (objc_have_common_type): New declaration.
12783 * stub-objc.c (objc_have_common_type): New stub.
12785 2005-06-22 Ziemowit Laski <zlaski@apple.com>
12788 * c-common.h (objc_common_type): New prototype.
12789 * stub-objc.c (objc_common_type): New stub.
12791 2010-09-24 Jan Hubicka <jh@suse.cz>
12793 * c-common.c (handle_leaf_attribute): New function.
12794 (struct attribute_spec c_common_att): Add leaf.
12796 2010-09-22 Joseph Myers <joseph@codesourcery.com>
12798 * c.opt (-all-warnings, -ansi, -assert, -assert=, -comments,
12799 -comments-in-macros, -define-macro, -define-macro=, -dependencies,
12800 -dump, -dump=, -imacros, -imacros=, -include, -include=,
12801 -include-barrier, -include-directory, -include-directory=,
12802 -include-directory-after, -include-directory-after=,
12803 -include-prefix, -include-prefix=, -include-with-prefix,
12804 -include-with-prefix=, -include-with-prefix-after,
12805 -include-with-prefix-after=, -include-with-prefix-before,
12806 -include-with-prefix-before=, -no-integrated-cpp,
12807 -no-line-commands, -no-standard-includes, -no-warnings, -output,
12808 -output=, -pedantic, -pedantic-errors, -preprocess,
12809 -print-missing-file-dependencies, -trace-includes, -traditional,
12810 -traditional-cpp, -trigraphs, -undefine-macro, -undefine-macro=,
12811 -user-dependencies, -verbose, -write-dependencies,
12812 -write-user-dependencies, no-integrated-cpp, traditional): New.
12814 2010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
12817 * c-common.h (objc_start_method_definition): Return bool instead
12819 * stub-objc.c (objc_start_method_definition): Return bool instead
12822 2010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
12825 * c-common.h (objc_get_interface_ivars): New declaration.
12826 * stub-objc.c (objc_get_interface_ivars): New stub.
12828 2010-09-15 Ian Lance Taylor <iant@google.com>
12830 * c-common.c (parse_optimize_options): Do not capitalize warning
12831 messages. Remove period at end of warning message.
12833 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
12835 * c-common.c (handle_alias_ifunc_attribute): New, broken out of ...
12836 (handle_alias_attribute): ... here.
12837 (handle_ifunc_attribute): New.
12839 2010-09-06 Mark Mitchell <mark@codesourcery.com>
12841 * c-common.h (do_warn_double_promotion): Declare.
12842 * c-common.c (do_warn_double_promotion): Define.
12844 2010-09-05 Mark Mitchell <mark@codesourcery.com>
12846 * c.opt (Wdouble-promotion): New.
12848 2010-09-02 Joseph Myers <joseph@codesourcery.com>
12850 * c.opt (falt-external-templates, fhuge-objects, fvtable-gc,
12851 fvtable-thunks, fxref): Mark no longer supported in help text.
12853 2010-09-02 Joseph Myers <joseph@codesourcery.com>
12855 * c.opt (Wimport, fall-virtual, falt-external-templates,
12856 fdefault-inline, fenum-int-equiv, fexternal-templates,
12857 fguiding-decls, fhonor-std, fhuge-objects, flabels-ok,
12858 fname-mangling-version-, fnew-abi, fnonnull-objects,
12859 foptional-diags, fsquangle, fstrict-prototype, fthis-is-variable,
12860 fvtable-gc, fvtable-thunks, fxref): Mark with Ignore and Warn as
12862 (fhandle-exceptions): Mark with Alias and Warn.
12863 * c-opts.c (c_common_handle_option): Don't handle options marked
12866 2010-09-02 Joseph Myers <joseph@codesourcery.com>
12868 * c.opt (Wcomments, Werror-implicit-function-declaration,
12869 ftemplate-depth-, std=c89, std=c9x, std=gnu89, std=gnu9x,
12870 std=iso9899:1990, std=iso9899:1999, std=iso9899:199x): Mark as
12872 * c-common.c (option_codes): Use OPT_Wcomment instead of
12874 * c-opts.c (warning_as_error_callback, c_common_handle_option):
12875 Don't handle options marked as aliases.
12877 2010-08-25 Richard Guenther <rguenther@suse.de>
12879 * c-common.c (c_common_get_alias_set): Remove special
12880 handling for pointers.
12882 2010-08-20 Nathan Froyd <froydnj@codesourcery.com>
12884 * c-common.c: Use FOR_EACH_VEC_ELT.
12885 * c-gimplify.c: Likewise.
12886 * c-pragma.c: Likewise.
12888 2010-08-16 Joseph Myers <joseph@codesourcery.com>
12890 * c.opt (MDX): Change back to MD. Mark NoDriverArg instead of
12892 (MMDX): Change back to MMD. Mark NoDriverArg instead of
12894 * c-opts.c (c_common_handle_option): Use OPT_MD and OPT_MMD
12895 instead of OPT_MDX and OPT_MMDX.
12897 2010-08-16 Joseph Myers <joseph@codesourcery.com>
12899 * c.opt (MDX, MMDX, lang-asm): Mark RejectDriver.
12901 2010-08-12 Joseph Myers <joseph@codesourcery.com>
12903 * c.opt (MD, MMD): Change to MDX and MMDX.
12904 * c-opts.c (c_common_handle_option): Use OPT_MMD and OPT_MMDX.
12906 2010-08-11 Joseph Myers <joseph@codesourcery.com>
12908 * c-opts.c (c_common_handle_option): Call handle_generated_option
12909 instead of handle_option.
12911 2010-08-08 Nathan Froyd <froydnj@codesourcery.com>
12913 * c-pragma.c (add_to_renaming_pragma_list): Fix call to VEC_safe_push.
12914 (maybe_apply_renaming_pragma): Delete unneeded declarations.
12916 2010-08-08 Nathan Froyd <froydnj@codesourcery.com>
12918 * c-pragma.c (pending_redefinition): Declare. Declare a VEC of it.
12919 (pending_redefine_extname): Change type to a VEC.
12920 (add_to_renaming_pragma_list): Update for new type of
12921 pending_redefine_extname.
12922 (maybe_apply_renaming_pragma): Likewise.
12924 2010-08-04 Arnaud Charlet <charlet@adacore.com>
12926 * c-ada-spec.c (dump_ada_template): Mark underlying instance type as
12928 (dump_generic_ada_node): Code clean up. Use TREE_VISITED flag to
12929 decide whether a type has already been declared/seen.
12930 Do not go to the original type.
12931 (dump_nested_types): New parameter forward.
12932 Generate forward declaration if needed and mark type as visited.
12933 (print_ada_declaration): Call dump_nested_types if not already done.
12934 Mark types as visited.
12936 2010-08-03 Joseph Myers <joseph@codesourcery.com>
12938 * c.opt (-print-pch-checksum): Remove option.
12939 * c-opts.c (c_common_handle_option): Don't handle
12940 OPT_print_pch_checksum.
12942 2010-07-27 Joseph Myers <joseph@codesourcery.com>
12944 * c-common.h (c_common_handle_option): Update prototype and return
12946 * c-opts.c (c_common_handle_option): Update prototype and return
12947 value type. Update calls to handle_option and
12948 enable_warning_as_error.
12950 2010-07-27 Jakub Jelinek <jakub@redhat.com>
12953 * c-pretty-print.c (pp_c_expression): Handle C_MAYBE_CONST_EXPR.
12955 2010-07-27 Joseph Myers <joseph@codesourcery.com>
12957 * c-common.h (c_common_missing_argument): Remove.
12958 * c-opts.c (c_common_missing_argument): Remove.
12959 * c.opt (A, D, F, I, MD, MMD, MQ, MT, U, fconstant-string-class=,
12960 idirafter, imacros, include, isysroot, isystem, iquote): Add
12962 * c-objc-common.h (LANG_HOOKS_MISSING_ARGUMENT): Remove.
12964 2010-07-27 Joseph Myers <joseph@codesourcery.com>
12966 * c-common.h (c_common_option_lang_mask,
12967 c_common_initialize_diagnostics, c_common_complain_wrong_lang_p):
12969 (c_common_init_options): Update prototype.
12970 * c-opts.c (c_common_option_lang_mask): New.
12971 (c_common_initialize_diagnostics): Split out of
12972 c_common_init_options.
12973 (accept_all_c_family_options, c_common_complain_wrong_lang_p):
12975 (c_common_init_options): Update prototype. Use decoded options in
12976 search for -lang-asm.
12978 2010-07-15 Nathan Froyd <froydnj@codesourcery.com>
12980 * c-common.c: Carefully replace TREE_CHAIN with DECL_CHAIN.
12981 * c-format.c: Likewise.
12983 2010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
12985 * c-common.h: Include diagnostic-core.h. Error if already
12987 * c-semantics.c: Do not define GCC_DIAG_STYLE here.
12989 2010-07-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
12991 * c-common.c (IN_GCC_FRONTEND): Do not undef.
12992 Do not include expr.h
12993 (vector_mode_valid_p): Move here.
12995 2010-06-21 DJ Delorie <dj@redhat.com>
12997 * c-pragma.c (handle_pragma_diagnostic): Add push/pop,
12998 allow these pragmas anywhere.
13000 2010-06-14 Jakub Jelinek <jakub@redhat.com>
13003 * c-cppbuiltin.c: Include gt-c-family-c-cppbuiltin.h.
13004 (lazy_hex_fp_values, lazy_hex_fp_value_count): Add GTY(()) markers.
13005 (lazy_hex_fp_value, builtin_define_with_hex_fp_value): Use
13006 ggc_strdup instead of xstrdup.
13008 2010-06-10 Jakub Jelinek <jakub@redhat.com>
13010 * c-cppbuiltin.c: Include cpp-id-data.h.
13011 (lazy_hex_fp_values, lazy_hex_fp_value_count): New variables.
13012 (lazy_hex_fp_value): New function.
13013 (builtin_define_with_hex_fp_value): Provide definitions lazily.
13015 2010-06-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
13017 * c-gimplify.c: Do not include tree-flow.h
13019 2010-06-29 Joern Rennecke <joern.rennecke@embecosm.com>
13022 * c-common.c: Rename targetm member:
13023 targetm.enum_va_list -> targetm.enum_va_list_p
13025 2010-06-28 Anatoly Sokolov <aesok@post.ru>
13027 * c-common.c (shorten_compare): Adjust call to force_fit_type_double.
13029 2010-06-28 Steven Bosscher <steven@gcc.gnu.org>
13031 * c-cppbuiltin.c: Do not include except.h.
13033 2010-06-24 Andi Kleen <ak@linux.intel.com>
13035 * c-common.c (warn_for_omitted_condop): New.
13036 * c-common.h (warn_for_omitted_condop): Add prototype.
13038 2010-06-21 Joseph Myers <joseph@codesourcery.com>
13040 * c.opt (lang-objc): Remove.
13041 * c-opts.c (c_common_handle_option): Don't handle OPT_lang_objc.
13043 2010-06-21 Joern Rennecke <joern.rennecke@embecosm.com>
13045 * c-opts.c: Include "tm_p.h".
13047 2010-06-20 Joseph Myers <joseph@codesourcery.com>
13049 * c-common.c (parse_optimize_options): Update call to
13052 2010-06-18 Nathan Froyd <froydnj@codesourcery.com>
13054 * c-common.c (record_types_used_by_current_var_decl): Adjust for
13055 new type of types_used_by_cur_var_decl.
13057 2010-06-17 Joern Rennecke <joern.rennecke@embecosm.com>
13060 * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Add cast
13061 for C++ standard compliance.
13063 2010-06-16 Jason Merrill <jason@redhat.com>
13065 * c.opt: Add -Wnoexcept.
13067 2010-06-16 Richard Guenther <rguenther@suse.de>
13070 * c-common.c (c_common_truthvalue_conversion): Remove
13071 premature and wrong optimization concering ADDR_EXPRs.
13073 2010-06-15 Arnaud Charlet <charlet@adacore.com>
13075 * c-ada-spec.c (dump_sloc): Remove column info.
13076 (is_simple_enum): New function.
13077 (dump_generic_ada_node, print_ada_declaration): Map C enum types to Ada
13078 enum types when relevant.
13080 2010-06-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
13082 * c-common.c (conversion_warning): Warn at expression
13085 2010-06-10 Joseph Myers <joseph@codesourcery.com>
13087 * c-opts.c (c_common_handle_option): Don't handle
13090 2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
13092 * c-pragma.c (push_alignment): Use typed GC allocation.
13093 (handle_pragma_push_options): Likewise.
13095 * c-common.c (parse_optimize_options): Likewise.
13097 * c-common.h (struct sorted_fields_type): Add variable_size GTY
13100 2010-06-07 Joseph Myers <joseph@codesourcery.com>
13102 * c-common.c (flag_preprocess_only, flag_undef, flag_no_builtin,
13103 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
13104 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
13105 flag_signed_bitfields, warn_strict_null_sentinel,
13106 flag_nil_receivers, flag_zero_link, flag_replace_objc_classes,
13107 flag_gen_declaration, flag_no_gnu_keywords,
13108 flag_implement_inlines, flag_implicit_templates,
13109 flag_implicit_inline_templates, flag_optional_diags,
13110 flag_elide_constructors, flag_default_inline, flag_rtti,
13111 flag_conserve_space, flag_access_control, flag_check_new,
13112 flag_new_for_scope, flag_weak, flag_working_directory,
13113 flag_use_cxa_atexit, flag_use_cxa_get_exception_ptr,
13114 flag_enforce_eh_specs, flag_threadsafe_statics,
13115 flag_pretty_templates): Remove.
13116 * c-common.h (flag_preprocess_only, flag_nil_receivers,
13117 flag_objc_exceptions, flag_objc_sjlj_exceptions, flag_zero_link,
13118 flag_replace_objc_classes, flag_undef, flag_no_builtin,
13119 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
13120 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
13121 flag_const_strings, flag_signed_bitfields, flag_gen_declaration,
13122 flag_no_gnu_keywords, flag_implement_inlines,
13123 flag_implicit_templates, flag_implicit_inline_templates,
13124 flag_optional_diags, flag_elide_constructors, flag_default_inline,
13125 flag_rtti, flag_conserve_space, flag_access_control,
13126 flag_check_new, flag_new_for_scope, flag_weak,
13127 flag_working_directory, flag_use_cxa_atexit,
13128 flag_use_cxa_get_exception_ptr, flag_enforce_eh_specs,
13129 flag_threadsafe_statics, flag_pretty_templates,
13130 warn_strict_null_sentinel): Remove.
13131 * c.opt (E, Wstrict-null-sentinel, faccess-control, fasm,
13132 fbuiltin, fcheck-new, fconserve-space, felide-constructors,
13133 fenforce-eh-specs, ffor-scope, fgnu-keywords, fimplement-inlines,
13134 fimplicit-inline-templates, fimplicit-templates,
13135 flax-vector-conversions, fms-extensions, fnil-receivers,
13136 fnonansi-builtins, fpretty-templates, freplace-objc-classes,
13137 frtti, fshort-double, fshort-enums, fshort-wchar,
13138 fsigned-bitfields, fsigned-char, fstats, fthreadsafe-statics,
13139 funsigned-bitfields, funsigned-char, fuse-cxa-atexit,
13140 fuse-cxa-get-exception-ptr, fweak, fworking-directory, fzero-link,
13141 gen-decls, undef): Use Var.
13142 (fdefault-inline, foptional-diags): Document as doing nothing.
13143 * c-opts.c (c_common_handle_option): Remove cases for options now
13144 using Var. Mark ignored options as such.
13146 2010-06-05 Steven Bosscher <steven@gcc.gnu.org>
13148 * c-common.c: Moved to here from parent directory.
13149 * c-common.def: Likewise.
13150 * c-common.h: Likewise.
13151 * c-cppbuiltin.c: Likewise.
13152 * c-dump.c: Likewise.
13153 * c-format.c: Likewise.
13154 * c-format.h : Likewise.
13155 * c-gimplify.c: Likewise.
13156 * c-lex.c: Likewise.
13157 * c-omp.c: Likewise.
13159 * c-opts.c: Likewise.
13160 * c-pch.c: Likewise.
13161 * c-ppoutput.c: Likewise.
13162 * c-pragma.c: Likewise.
13163 * c-pragma.h: Likewise.
13164 * c-pretty-print.c: Likewise.
13165 * c-pretty-print.h: Likewise.
13166 * c-semantics.c: Likewise.
13167 * stub-objc.c: Likewise.
13169 * c-common.c: Include gt-c-family-c-common.h.
13170 * c-pragma.c: Include gt-c-family-c-pragma.h.
13172 Copyright (C) 2010-2022 Free Software Foundation, Inc.
13174 Copying and distribution of this file, with or without modification,
13175 are permitted in any medium without royalty provided the copyright
13176 notice and this notice are preserved.