1 2020-10-05 Richard Biener <rguenther@suse.de>
2 Jakub Jelinek <jakub@redhat.com>
5 * c-pretty-print.c: Include langhooks.h.
6 (c_pretty_printer::postfix_expression): Handle TARGET_MEM_REF as
8 (c_pretty_printer::expression): Handle TARGET_MEM_REF as
10 (c_pretty_printer::unary_expression): Handle TARGET_MEM_REF.
12 2020-09-30 Martin Sebor <msebor@redhat.com>
15 * c-attribs.c (append_access_attr): Use the function declaration
16 location for a warning about an attribute access argument.
18 2020-09-29 Marek Polacek <polacek@redhat.com>
21 * c.opt (Wrange-loop-construct): New option.
23 2020-09-23 Martin Sebor <msebor@redhat.com>
26 * c-warn.c (warn_parm_ptrarray_mismatch): Handle more invalid input.
28 2020-09-23 Marek Polacek <polacek@redhat.com>
31 * c-gimplify.c (c_genericize): Only call do_warn_duplicated_branches_r
32 after loops and other structured control constructs have been lowered.
34 2020-09-22 Jakub Jelinek <jakub@redhat.com>
36 * c.opt (Wbuiltin-declaration-mismatch): Fix typo in variable name:
37 warn_builtin_declaraion_mismatch -> warn_builtin_declaration_mismatch.
39 2020-09-21 Marek Polacek <polacek@redhat.com>
41 * c.opt (Wctad-maybe-unsupported): New option.
43 2020-09-19 Martin Sebor <msebor@redhat.com>
46 * c-common.h (warn_parm_array_mismatch): Declare new function.
47 (has_attribute): Move declaration of an existing function.
48 (build_attr_access_from_parms): Declare new function.
49 * c-warn.c (parm_array_as_string): Define new function.
50 (plus_one): Define new function.
51 (warn_parm_ptrarray_mismatch): Define new function.
52 (warn_parm_array_mismatch): Define new function.
53 (vla_bound_parm_decl): New function.
54 * c.opt (-Warray-parameter, -Wvla-parameter): New options.
55 * c-pretty-print.c (pp_c_type_qualifier_list): Don't print array type
57 (c_pretty_printer::direct_abstract_declarator): ...but instead print
58 them in brackets here. Also print [static]. Strip extraneous
59 expressions from VLA bounds.
61 2020-09-19 Martin Sebor <msebor@redhat.com>
64 * c-attribs.c (c_common_attribute_table): Add "arg spec" attribute.
65 (handle_argspec_attribute): New function.
66 (get_argument, get_argument_type): New functions.
67 (append_access_attrs): Add overload. Handle internal attribute
68 representation in addition to external.
69 (handle_access_attribute): Handle internal attribute representation
70 in addition to external.
71 (build_attr_access_from_parms): New function.
73 2020-09-19 Sandra Loosemore <sandra@codesourcery.com>
75 * c-gimplify.c (genericize_c_loop): Rewrite to match
76 c_finish_loop in c-typeck.c.
78 2020-09-19 Sandra Loosemore <sandra@codesourcery.com>
80 * c-common.c (c_block_may_fallthrough): New, split from
81 cxx_block_may_fallthrough in the cp front end.
82 (c_common_init_ts): Move handling of loop and switch-related
83 statements here from the cp front end.
84 * c-common.def (FOR_STMT, WHILE_STMT, DO_STMT): Move here from
86 (BREAK_STMT, CONTINUE_STMT, SWITCH_STMT): Likewise.
87 * c-common.h (c_block_may_fallthru): Declare.
88 (bc_state_t): Move here from cp front end.
89 (save_bc_state, restore_bc_state): Declare.
90 (c_genericize_control_stmt): Declare.
91 (WHILE_COND, WHILE_BODY): Likewise.
92 (DO_COND, DO_BODY): Likewise.
93 (FOR_INIT_STMT, FOR_COND, FOR_EXPR, FOR_BODY, FOR_SCOPE): Likewise.
94 (SWITCH_STMT_COND, SWITCH_STMT_BODY): Likewise.
95 (SWITCH_STMT_TYPE, SWITCH_STMT_SCOPE): Likewise.
96 (SWITCH_STMT_ALL_CASES_P, SWITCH_STMT_NO_BREAK_P): Likewise.
97 (LABEL_DECL_BREAK, LABEL_DECL_CONTINUE): Likewise.
98 * c-dump.c (dump_stmt): Copy from cp front end.
99 (c_dump_tree): Move code to handle structured loop and switch
100 tree nodes here from cp front end.
101 * c-gimplify.c: Adjust includes.
102 (enum bc_t, bc_label, begin_bc_block, finish_bc_block): Move from
104 (save_bc_state, restore_bc_state): New functions using old code
106 (get_bc_label, expr_loc_or_loc): Move from cp front end.
107 (genericize_c_loop): Move from cp front end.
108 (genericize_for_stmt, genericize_while_stmt): Likewise.
109 (genericize_do_stmt, genericize_switch_stmt): Likewise.
110 (genericize_continue_stmt, genericize_break_stmt): Likewise.
111 (genericize_omp_for_stmt): Likewise.
112 (c_genericize_control_stmt): New function using code split from
114 (c_genericize_control_r): New.
115 (c_genericize): Call walk_tree with c_genericize_control_r.
116 * c-pretty-print.c (c_pretty_printer::statement): Move code to handle
117 structured loop and switch tree nodes here from cp front end.
119 2020-09-17 Patrick Palka <ppalka@redhat.com>
122 * c-indentation.c (should_warn_for_misleading_indentation): Move
123 declarations of local variables closer to their first use.
124 Handle virtual token locations by resolving them to their
125 respective macro expansion points. If all three tokens are
126 produced from the same macro expansion, then instead use their
127 loci within the macro definition.
129 2020-09-16 Martin Sebor <msebor@redhat.com>
133 * c-attribs.c (validate_attr_args): New function.
134 (validate_attr_arg): Same.
135 (handle_section_attribute): Call it. Introduce a local variable.
136 (handle_alloc_size_attribute): Same.
137 (handle_alloc_align_attribute): Same.
139 2020-09-14 Jakub Jelinek <jakub@redhat.com>
141 * c-attribs.c (handle_optimize_attribute): Adjust
142 cl_optimization_save, cl_optimization_restore and
143 build_optimization_node callers.
144 * c-pragma.c (handle_pragma_optimize): Adjust
145 build_optimization_node caller.
146 (handle_pragma_push_options): Adjust
147 build_optimization_node and build_target_option_node callers.
148 (handle_pragma_pop_options, handle_pragma_reset_options):
149 Adjust cl_optimization_restore callers.
151 2020-08-28 Martin Sebor <msebor@redhat.com>
153 * c.opt (Wstringop-overread): New option.
155 2020-08-11 Jakub Jelinek <jakub@redhat.com>
158 * c-common.c (get_atomic_generic_size): Require that first argument's
159 type points to a complete type and use tree_fits_uhwi_p instead of
160 just INTEGER_CST TREE_CODE check for the TYPE_SIZE_UNIT.
162 2020-07-31 Martin Sebor <msebor@redhat.com>
165 * c-common.c (check_function_arguments_recurse): Return early when
166 no-warning bit is set.
168 2020-07-31 Richard Biener <rguenther@suse.de>
171 * c-common.h (c_common_finalize_early_debug): Declare.
172 * c-common.c: Include debug.h.
173 (c_common_finalize_early_debug): finalize_early_debug langhook
174 implementation generating debug for extern declarations.
176 2020-07-27 Nathan Sidwell <nathan@acm.org>
178 * c-common.c (try_to_locate_new_include_insertion_point): Use
179 strcmp, not pointer equality.
181 2020-07-25 Martin Sebor <msebor@redhat.com>
184 * c-common.c (check_nonnull_arg): Print note only when warning was
187 2020-07-22 Tobias Burnus <tobias@codesourcery.com>
189 * c-omp.c (c_finish_omp_critical): Check for no name but
190 nonzero hint provided.
192 2020-07-20 Jason Merrill <jason@redhat.com>
194 * c-cppbuiltin.c (c_cpp_builtins): Update
195 __cpp_nontype_template_args for C++20.
197 2020-07-20 Martin Sebor <msebor@redhat.com>
200 * c.opt: Remove stray text.
202 2020-07-14 Lewis Hyatt <lhyatt@gmail.com>
205 * c-indentation.c (should_warn_for_misleading_indentation): Get
206 global tabstop from the new source.
207 * c-opts.c (c_common_handle_option): Remove handling of -ftabstop, which
208 is now a common option.
211 2020-07-08 Eric Botcazou <ebotcazou@adacore.com>
213 * c.opt (Wscalar-storage-order): Add explicit variable.
215 2020-07-07 Nathan Sidwell <nathan@acm.org>
217 * c-opts.c (c_common_post_options): Add 'injecting' arg to
219 (c_finish_options): Add linemap_line_start calls for builtin and cmd
220 maps. Force token position to line_table's highest line.
221 * c-ppoutput.c (print_line_1): Refactor, print line zero.
222 (cb_define): Always increment source line.
224 2020-07-06 Martin Sebor <msebor@redhat.com>
227 * c-common.c (check_function_nonnull): Avoid checking syntesized calls
228 to stub lambda objects with null this pointer.
229 (check_nonnull_arg): Handle C++ nullptr.
231 2020-07-02 Jason Merrill <jason@redhat.com>
232 Jakub Jelinek <jakub@redhat.com>
234 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_consteval.
236 2020-06-30 Jakub Jelinek <jakub@redhat.com>
239 * c-common.c (check_function_arguments_recurse): Don't crash on
240 calls to internal functions.
242 2020-06-28 Martin Sebor <msebor@redhat.com>
245 * c-common.c (struct nonnull_arg_ctx): Add members.
246 (check_function_nonnull): Use nonnull_arg_ctx as argument. Handle
247 C++ member functions specially. Consider the this pointer implicitly
249 (check_nonnull_arg): Use location of argument when available.
250 (check_function_arguments): Use nonnull_arg_ctx as argument.
252 2020-06-27 Jakub Jelinek <jakub@redhat.com>
255 * c-common.c (pointer_int_sum): Use TYPE_OVERFLOW_UNDEFINED instead of
256 !TYPE_UNSIGNED check to see if we can apply distributive law and handle
257 smaller precision intop operands separately.
259 2020-06-26 Marek Polacek <polacek@redhat.com>
261 * c-opts.c (c_common_init_options): Default to gnu++17.
263 2020-06-17 Jonathan Wakely <jwakely@redhat.com>
266 * c-common.c (get_atomic_generic_size): Check cv-qualifiers in
269 2020-06-16 Jakub Jelinek <jakub@redhat.com>
271 * c-common.h (c_omp_check_loop_iv_exprs): Add an int argument.
272 * c-omp.c (struct c_omp_check_loop_iv_data): Add maybe_nonrect and
274 (c_omp_is_loop_iterator): New function.
275 (c_omp_check_loop_iv_r): Use it. Add support for silent scanning
276 if outer loop iterator is present. Perform duplicate checking through
277 hash_set in the function rather than expecting caller to do that.
278 Pass NULL instead of d->ppset to walk_tree_1.
279 (c_omp_check_nonrect_loop_iv): New function.
280 (c_omp_check_loop_iv): Use it. Fill in new members, allow
281 non-rectangular loop forms, diagnose multiple associated loops with
282 the same iterator. Pass NULL instead of &pset to walk_tree_1.
283 (c_omp_check_loop_iv_exprs): Likewise.
285 2020-06-10 Martin Liska <mliska@suse.cz>
287 PR tree-optimization/92860
288 * c-attribs.c (handle_optimize_attribute):
289 Save global options and compare it after parsing of function
291 * c-pragma.c (opt_stack::saved_global_options): New field.
292 (handle_pragma_push_options): Save global_options.
293 (handle_pragma_pop_options): Compare them after pop.
295 2020-06-09 Jakub Jelinek <jakub@redhat.com>
298 * c-pretty-print.c (c_pretty_printer::unary_expression): Handle the
299 case when MEM_REF's first argument has type pointer to incomplete type.
301 2020-06-05 Jason Merrill <jason@redhat.com>
303 * c-pretty-print.c (pp_c_additive_expression): Handle negative
304 operand to POINTER_PLUS_EXPR.
306 2020-06-04 Martin Sebor <msebor@redhat.com>
310 * c-attribs.c (append_access_attrs): Handle attr_access::none.
311 (handle_access_attribute): Same.
313 2020-06-03 Mark Wielaard <mark@klomp.org>
315 * known-headers.cc (get_cp_stdlib_header_for_string_macro_name):
317 * known-headers.h (get_cp_stdlib_header_for_string_macro_name):
318 New function declaration.
320 2020-06-03 Mark Wielaard <mark@klomp.org>
322 * known-headers.cc (get_string_macro_hint): New function.
323 (get_stdlib_header_for_name): Use get_string_macro_hint.
324 (get_c_stdlib_header_for_string_macro_name): New function.
325 * known-headers.h (get_c_stdlib_header_for_string_macro_name):
326 New function declaration.
328 2020-06-03 Tobias Burnus <tobias@codesourcery.com>
330 * c-common.h (c_omp_predetermined_mapping): Declare.
331 * c-omp.c (c_omp_predetermined_mapping): New.
333 2020-05-22 Mark Wielaard <mark@klomp.org>
335 * known-headers.cc (get_stdlib_header_for_name): Add a new
336 stdlib_hint array for stdbool and stdint.
338 2020-05-22 Mark Wielaard <mark@klomp.org>
340 * known-headers.cc (get_stdlib_header_for_name): Return
341 "<stdbool.h>" for "bool", "true" or "false" when STDLIB_C and
344 2020-05-20 Nathan Sidwell <nathan@acm.org>
346 * c-common.c (try_to_locate_new_include_insertion_point): Revert change.
348 * c-common.c (try_to_locate_new_include_insertion_point): Use
349 strcmp to compare filenames.
350 * c-lex.c (init_c_lex): Move declaration to initialization.
351 * c-opts.c (handle_deferred_opts): Move cpp_get_deps call into
354 2020-05-15 Jason Merrill <jason@redhat.com>
356 * c-opts.c (set_std_cxx20): Set flag_coroutines.
358 2020-05-13 Jason Merrill <jason@redhat.com>
360 * c.opt (std=c++20): Make c++2a the alias.
361 (std=gnu++20): Likewise.
362 * c-common.h (cxx_dialect): Change cxx2a to cxx20.
364 * c-cppbuiltin.c: Adjust.
368 2020-05-12 Eric Botcazou <ebotcazou@adacore.com>
370 * c-ada-spec.c (dump_ads): Output pragma Warnings ("U"); on entry.
372 2020-05-08 Nathan Sidwell <nathan@acm.org>
374 Reimplement directives only processing.
375 * c-ppoutput.c (token_streamer): Ne.
376 (directives_only_cb): New. Swallow ...
377 (print_lines_directives_only): ... this.
378 (scan_translation_unit_directives_only): Reimplment using the
381 2020-05-07 Marek Polacek <polacek@redhat.com>
383 * c-format.c (badwords): Add "nonstatic".
385 202-05-07 Jakub Jelinek <jakub@redhat.com>
388 * c-common.c (speculation_safe_value_resolve_params): Return false if
389 error_operand_p (val2).
390 (resolve_overloaded_builtin) <case BUILT_IN_SPECULATION_SAFE_VALUE_N>:
391 Remove extraneous semicolon.
393 2020-05-06 qing zhao <qing.zhao@oracle.com>
396 * c-indentation.c (get_visual_column): Add a hint to use the new
397 -flarge-source-files option.
399 2020-05-05 Stefan Schulze Frielinghaus <stefansf@linux.ibm.com>
401 * c-attribs.c (handle_vector_size_attribute): Add attribute
402 nonnull for argument args in order to silence warning of
403 uninitialized variable usage. Since this is local to the
404 compilation unit and thus cannot be checked at call sides by the
405 compiler, added an assert statement in order to verify this.
407 2020-05-01 H.J. Lu <hongjiu.lu@intel.com>
410 * c-attribs.c (handle_patchable_function_entry_attribute): Limit
411 value to USHRT_MAX (65535).
413 2020-04-29 Jakub Jelinek <jakub@redhat.com>
415 * c-format.c (PP_FORMAT_CHAR_TABLE): Add %{ and %}.
417 2020-04-27 Jakub Jelinek <jakub@redhat.com>
420 * c-common.c (resolve_overloaded_builtin): Return error_mark_node for
421 fncode == BUILT_IN_NONE before initialization of first_param.
423 2020-04-23 Marek Polacek <polacek@redhat.com>
426 * c-attribs.c (find_tm_attribute): Use get_attribute_name instead of
429 2020-04-14 Patrick Palka <ppalka@redhat.com>
432 * c-pretty-print.c (pp_c_pointer) <case REFERENCE_TYPE>: Print a double
433 ampersand if it's an rvalue reference type.
435 2020-04-13 Martin Sebor <msebor@redhat.com>
438 * c-pretty-print.c (c_pretty_printer::direct_abstract_declarator): Avoid
439 printing array bound for flexible array members.
441 2020-04-13 Iain Sandoe <iain@sandoe.co.uk>
443 * c-cppbuiltin.c (c_cpp_builtins): Update coroutines builtin
446 2020-04-02 Richard Biener <rguenther@suse.de>
449 * c-opts.c (c_common_post_options): Enable -ffinite-loops
450 for -O2 and C++11 or newer.
452 2020-03-28 Patrick Palka <ppalka@redhat.com>
454 * c.opt: Add -fconcepts-diagnostics-depth.
456 2020-03-27 Martin Sebor <msebor@redhat.com>
459 * c-attribs.c (handle_copy_attribute): Avoid passing expressions
460 to decl_attributes. Make handling of different kinds of entities
463 2020-03-27 Martin Sebor <msebor@redhat.com>
466 * c-attribs.c (handle_access_attribute): Avoid setting TYPE_ATTRIBUTES
469 2020-03-23 Jakub Jelinek <jakub@redhat.com>
472 * c-warn.c (warnings_for_convert_and_check): For expr and/or
473 result being COMPOUND_EXPRs, skip to ultimate rhs.
475 2020-03-20 Richard Sandiford <richard.sandiford@arm.com>
478 * c-common.c (c_common_type_for_mode): Before using a registered
479 built-in type, check that the vectorness of the type matches
480 the vectorness of the mode.
482 2020-03-17 Jakub Jelinek <jakub@redhat.com>
484 * c-common.c (resolve_overloaded_builtin): Fix up duplicated word
485 issue in a diagnostic message.
487 2020-03-15 Lewis Hyatt <lhyatt@gmail.com>
489 * c.opt: Avoid redundancy in the help text.
491 2020-03-02 Marek Polacek <polacek@redhat.com>
493 PR c++/93958 - add missing -std=gnu++20.
494 * c.opt: Add -std=gnu++20.
496 2020-03-01 Martin Sebor <msebor@redhat.com>
499 * c-attribs.c (append_access_attrs): Correctly handle attribute.
500 (handle_access_attribute): Same.
502 2020-02-25 Jakub Jelinek <jakub@redhat.com>
505 * c-pragma.c (handle_pragma_diagnostic): Add missing ? after
506 "did you mean" hint in diagnostics.
508 2020-02-15 Jason Merrill <jason@redhat.com>
510 * c.opt: Add -std=c++20.
512 2020-02-14 Eric Botcazou <ebotcazou@adacore.com>
514 * c-ada-spec.c: Include bitmap.h.
515 (dump_ada_double_name): Rename into...
516 (dump_anonymous_type_name): ...this. Always use the TYPE_UID.
517 (dump_ada_array_type): Adjust to above renaming. Robustify.
518 (dump_nested_types_1): New function copied from... Add dumped_types
519 parameter and pass it down to dump_nested_type.
520 (dump_nested_types): ...this. Remove parent parameter. Just call
521 dump_nested_types_1 on an automatic bitmap.
522 (dump_nested_type): Add dumped_types parameter.
523 <ARRAY_TYPE>: Do not dump it if already present in dumped_types.
524 Adjust recursive calls and adjust to above renaming.
525 (dump_ada_declaration): Adjust call to dump_nested_types.
526 Tidy up and adjust to above renaming.
527 (dump_ada_specs): Initialize and release bitmap obstack.
529 2020-02-10 Martin Sebor <msebor@redhat.com>
532 * c-attribs.c (handle_access_attribute): Correct off-by-one mistakes.
534 2020-02-10 Jakub Jelinek <jakub@redhat.com>
537 * c-format.c (check_plain): Fix up last argument of strncasecmp.
538 Remove useless extra test.
540 2020-02-03 Julian Brown <julian@codesourcery.com>
541 Tobias Burnus <tobias@codesourcery.com>
543 * c-cppbuiltin.c (c_cpp_builtins): Update _OPENACC define to 201711.
545 2020-01-29 Jason Merrill <jason@redhat.com>
548 * c-attribs.c (check_cxx_fundamental_alignment_constraints): Remove.
550 2020-01-23 Jason Merrill <jason@redhat.com>
552 * c-warn.c (conversion_warning): Change -Wsign-conversion handling.
554 2020-01-23 Martin Sebor <msebor@redhat.com>
557 * c-common.c (check_function_arguments): Avoid overlap checking
558 of sprintf functions.
560 2020-01-22 Jason Merrill <jason@redhat.com>
562 PR testsuite/93391 - PR 40752 test fails with unsigned plain char.
564 * c-warn.c (conversion_warning): Check operands only after checking
565 the whole expression. Don't check second operand of + for sign.
567 2020-01-21 Jason Merrill <jason@redhat.com>
568 Manuel López-Ibáñez <manu@gcc.gnu.org>
570 PR c++/40752 - useless -Wconversion with short +=.
571 * c.opt (-Warith-conversion): New.
572 * c-warn.c (conversion_warning): Recurse for operands of
573 operators. Only warn about the whole expression with
576 2020-01-21 Jason Merrill <jason@redhat.com>
578 * c-common.c (unsafe_conversion_p): Don't warn, return UNSAFE_SIGN.
579 * c-warn.c (conversion_warning): Warn about UNSAFE_SIGN.
581 2020-01-20 Nathan Sidwell <nathan@acm.org>
583 PR preprocessor/80005
584 * c-cppbuiltins.c (c_cpp_builtins): Don't define __has_include{,_next}.
586 2020-01-18 Iain Sandoe <iain@sandoe.co.uk>
588 * c-common.c (co_await, co_yield, co_return): New.
589 * c-common.h (RID_CO_AWAIT, RID_CO_YIELD,
590 RID_CO_RETURN): New enumeration values.
591 (D_CXX_COROUTINES): Bit to identify coroutines are active.
592 (D_CXX_COROUTINES_FLAGS): Guard for coroutine keywords.
593 * c-cppbuiltin.c (__cpp_coroutines): New cpp define.
594 * c.opt (fcoroutines): New command-line switch.
596 2020-01-10 David Malcolm <dmalcolm@redhat.com>
598 * c-format.c (local_event_ptr_node): New.
599 (PP_FORMAT_CHAR_TABLE): Add entry for "%@".
600 (init_dynamic_diag_info): Initialize local_event_ptr_node.
601 * c-format.h (T_EVENT_PTR): New define.
603 2020-01-10 Martin Sebor <msebor@redhat.com>
606 * c-attribs.c (append_access_attrs): Validate against the translated
607 access string rather than the human-readable representation.
609 2020-01-01 Jakub Jelinek <jakub@redhat.com>
611 Update copyright years.
613 2019-12-20 Eric Botcazou <ebotcazou@adacore.com>
615 * c-ada-spec.h (decl_sloc): Delete.
616 * c-ada-spec.c (decl_sloc): Make static.
618 2019-12-19 Julian Brown <julian@codesourcery.com>
620 * c-common.h (c_omp_map_clause_name): Add prototype.
621 * c-omp.c (c_omp_map_clause_name): New function.
622 * c-pragma.h (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ATTACH and
623 PRAGMA_OACC_CLAUSE_DETACH.
625 2019-12-19 Julian Brown <julian@codesourcery.com>
626 Maciej W. Rozycki <macro@codesourcery.com>
627 Tobias Burnus <tobias@codesourcery.com>
628 Thomas Schwinge <thomas@codesourcery.com>
630 * c-pragma.h (pragma_omp_clause): Add
631 PRAGMA_OACC_CLAUSE_NO_CREATE.
633 2019-12-17 Martin Sebor <msebor@redhat.com>
636 * c.opt (-Wmismatched-tags, -Wredundant-tags): New options.
638 2019-12-11 David Malcolm <dmalcolm@redhat.com>
640 * c-pretty-print.c (c_pretty_printer::clone): New vfunc
642 * c-pretty-print.h (c_pretty_printer::clone): New vfunc decl.
644 2019-12-09 David Malcolm <dmalcolm@redhat.com>
646 * c-format.c (range_label_for_format_type_mismatch::get_text):
647 Replace label_text ctor called with true with label_text::take.
649 2019-12-09 David Malcolm <dmalcolm@redhat.com>
651 * c-format.c (selftest::test_type_mismatch_range_labels): Remove
652 initial newline from expected outputs.
653 * c-opts.c (c_diagnostic_finalizer): Add pp_newline call before
654 call to diagnostic_show_locus.
656 2019-12-06 Jakub Jelinek <jakub@redhat.com>
658 * c-cppbuiltin.c (c_cpp_builtins): Don't define __cpp_consteval for
661 2019-12-05 Marek Polacek <polacek@redhat.com>
662 Jakub Jelinek <jakub@redhat.com>
664 PR c++/91353 - P1331R2: Allow trivial default init in constexpr contexts.
665 * c-cppbuiltin.c (c_cpp_builtins): Adjust the value of __cpp_constexpr.
667 2019-12-05 Marek Polacek <polacek@redhat.com>
669 PR c++/92271 - make __is_same alias for __is_same_as.
670 * c-common.c: Add __is_same, an alias for __is_same_as.
672 2019-12-03 Marek Polacek <polacek@redhat.com>
674 PR c++/91363 - P0960R3: Parenthesized initialization of aggregates.
675 * c-cppbuiltin.c (c_cpp_builtins): Predefine
676 __cpp_aggregate_paren_init=201902 for -std=c++2a.
678 2019-11-30 Jan Hubicka <hubicka@ucw.cz>
680 * c-attribs.c (handle_symver_attribute): New function
681 (c_common_attributes): Add symver.
683 2019-11-30 Richard Sandiford <richard.sandiford@arm.com>
685 * c-common.c (pointer_int_sum): Use verify_type_context to check
686 whether the target allows pointer arithmetic for the types involved.
687 (c_sizeof_or_alignof_type, c_alignof_expr): Use verify_type_context
688 to check whether the target allows sizeof and alignof operations
689 for the types involved.
691 2019-11-27 Jason Merrill <jason@redhat.com>
693 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_deduction_guides.
695 2019-11-26 Jakub Jelinek <jakub@redhat.com>
698 * c-attribs.c (handle_mode_attribute): Add mode attribute to
701 2019-11-25 Joseph Myers <joseph@codesourcery.com>
704 * c-common.c (c_common_type_for_mode): Handle decimal
705 floating-point types being NULL_TREE.
706 * c-format.c (get_format_for_type_1): Handle specified types being
708 * c-lex.c (interpret_float): Give an error for decimal
709 floating-point constants when decimal floating-point not
712 2019-11-23 Jakub Jelinek <jakub@redhat.com>
715 * c-attribs.c (append_access_attrs): Avoid buffer overflow. Avoid
716 memory leak. Use XNEWVEC macro. Use auto_diagnostic_group to
717 group warning with inform together.
718 (handle_access_attribute): Formatting fix.
720 2019-11-22 Jakub Jelinek <jakub@redhat.com>
723 * c-common.h (identifier_global_tag): Declare.
724 * c-format.c (get_pointer_to_named_type): Renamed to ...
725 (get_named_type): ... this. Use identifier_global_tag instead of
726 identifier_global_value, handle the return value being a TYPE_P.
727 (init_dynamic_diag_info): Adjust get_pointer_to_named_type callers
728 to call get_named_type instead. Formatting fixes.
730 Implement P1902R1, Missing feature-test macros 2017-2019.
731 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_init_captures
732 and __cpp_generic_lambdas for -std=c++2a. Define
733 __cpp_designated_initializers, __cpp_constexpr_in_decltype and
734 __cpp_consteval for -std=c++2a. Remove a FIXME comment about
735 __cpp_concepts for -std=c++2a.
737 2019-11-22 Martin Sebor <msebor@redhat.com>
740 * c-attribs.c (handle_access_attribute): New function.
741 (c_common_attribute_table): Add new attribute.
742 (get_argument_type): New function.
743 (append_access_attrs): New function.
744 (get_nonnull_operand): Rename...
745 (get_attribute_operand): ...to this.
746 * c-common.c (get_nonnull_operand): Rename...
747 (get_attribute_operand): ...to this.
749 2019-11-21 Joseph Myers <joseph@codesourcery.com>
751 * c-attribs.c (handle_fallthrough_attribute): Use pedwarn instead
754 2019-11-19 Joseph Myers <joseph@codesourcery.com>
756 * c-common.c (attribute_fallthrough_p): In C, use pedwarn not
757 warning for standard attributes mixed with fallthrough attributes.
759 2019-11-15 Joseph Myers <joseph@codesourcery.com>
761 * c-attribs.c (handle_fallthrough_attribute): Remove static.
762 * c-common.h (handle_fallthrough_attribute): Declare.
764 2019-11-15 Joseph Myers <joseph@codesourcery.com>
766 * c-attribs.c (handle_deprecated_attribute): Remove static.
767 * c-common.h (handle_deprecated_attribute): Declare.
769 2019-11-14 Joseph Myers <joseph@codesourcery.com>
771 * c-lex.c (lex_charconst): Make CPP_UTF8CHAR constants unsigned
774 2019-11-14 Jakub Jelinek <jakub@redhat.com>
776 * c-omp.c (c_omp_check_context_selector): Add nvidia to the list of
779 * c-omp.c (c_omp_check_context_selector): Handle name lists
780 containing string literals. Don't diagnose atomic_default_mem_order
783 2019-11-13 Joseph Myers <joseph@codesourcery.com>
785 * c-cppbuiltin.c (builtin_define_float_constants): Also define
786 NORM_MAX constants. Update call to get_max_float.
787 (LAZY_HEX_FP_VALUES_CNT): Update value to include NORM_MAX
790 2019-11-13 Eric Botcazou <ebotcazou@adacore.com>
792 * c-ada-spec.c (get_underlying_decl): Do not look through typedefs.
793 (dump_forward_type): Do not generate a declaration for function types.
794 (dump_nested_type) <ARRAY_TYPE>: Do not generate a nested declaration
795 of the component type if it is declared in another file.
797 2019-11-12 Martin Liska <mliska@suse.cz>
799 * c-opts.c (c_common_post_options):
800 Use SET_OPTION_IF_UNSET.
802 2019-11-12 Maciej W. Rozycki <macro@codesourcery.com>
803 Frederik Harwath <frederik@codesourcery.com>
806 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_SERIAL enumeration
808 * c-pragma.c (oacc_pragmas): Add "serial" entry.
810 2019-11-08 Richard Sandiford <richard.sandiford@arm.com>
812 * c-common.h (gnu_vector_type_p): New function.
813 * c-common.c (c_build_vec_perm_expr): Require __builtin_shuffle
814 vectors to satisfy gnu_vector_type_p.
815 (c_build_vec_convert): Likewise __builtin_convertvector.
816 (convert_vector_to_array_for_subscript): Likewise when applying
817 implicit vector to array conversion.
818 (scalar_to_vector): Likewise when converting vector-scalar
819 operations to vector-vector operations.
821 2019-11-08 Joseph Myers <joseph@codesourcery.com>
823 * c.opt (Wold-style-definition): Initialize to -1.
824 * c-opts.c (c_common_post_options): Set warn_old_style_definition
825 to flag_isoc2x if not set explicitly.
827 2019-11-07 Joseph Myers <joseph@codesourcery.com>
829 * c-attribs.c (parse_tm_stmt_attr): Handle scoped attributes.
831 2019-11-05 Jason Merrill <jason@redhat.com>
833 * c-opts.c (c_common_post_options): -fconcepts-ts implies
836 2019-11-04 Kamlesh Kumar <kamleshbhalui@gmail.com>
838 * c-opts.c (c_common_post_options): Update
841 2019-11-02 Jakub Jelinek <jakub@redhat.com>
843 * c-common.h (c_omp_get_context_selector): Remove.
844 * c-omp.c (c_omp_get_context_selector): Moved to omp-general.c
845 and renamed to omp_get_context_selector.
847 * c-omp.c (c_omp_mark_declare_variant): Use
848 omp_context_selector_set_compare.
850 PR c++/88335 - Implement P1073R3: Immediate functions
851 * c-common.h (enum rid): Add RID_CONSTEVAL.
852 * c-common.c (c_common_reswords): Add consteval.
854 2019-11-01 Martin Sebor <msebor@redhat.com>
860 * c-pretty-print.c (direct_abstract_declarator): Print
861 bound in zero-length arrays.
862 * c.opt (-Wzero-length-bounds): New option.
864 2019-10-30 Nathan Sidwell <nathan@acm.org>
866 * c-cppbuiltin.c (c_cpp_builtins): Add 'L' suffix to feature
869 2019-10-28 Martin Sebor <msebor@redhat.com>
872 * c-common.c (c_common_nodes_and_builtins): Call c_define_builtins
873 even when only preprocessing.
874 * c-common.h (names_builtin_p): Declare new function.
875 * c-lex.c (init_c_lex): Set has_builtin.
876 (c_common_has_builtin): Define a new function.
877 * c-ppoutput.c (init_pp_output): Set has_builtin.
879 2019-10-24 Jakub Jelinek <jakub@redhat.com>
881 * c-common.h (c_omp_context_selector_matches): Remove.
882 * c-omp.c (c_omp_context_selector_matches): Remove.
883 * c-attribs.c (c_common_attribute_table): Add
884 "omp declare target {host,nohost,block}" attributes.
886 2019-10-17 JeanHeyd Meneide <phdofthehouse@gmail.com>
888 * c-lex.c (c_common_has_attribute): Update nodiscard value.
890 2019-10-14 Richard Sandiford <richard.sandiford@arm.com>
892 * c-common.h (user_facing_original_type_p): Declare.
893 * c-common.c: Include c-spellcheck.h.
894 (user_facing_original_type_p): New function.
896 2019-10-12 Jakub Jelinek <jakub@redhat.com>
898 * c-common.h (c_omp_mark_declare_variant,
899 c_omp_context_selector_matches): Declare.
900 * c-omp.c: Include attribs.h, gimplify.h, cgraph.h, symbol-summary.h
902 (c_omp_get_context_selector): Support second argument NULL.
903 (c_omp_mark_declare_variant, c_omp_context_selector_matches): New
905 * c-attribs.c (c_common_attribute_table): Remove "omp declare variant"
906 attribute, add "omp declare variant base" and
907 "omp declare variant variant" attributes.
909 2019-10-11 Joseph Myers <joseph@codesourcery.com>
911 * c.opt (Wc11-c2x-compat): Add CPP(cpp_warn_c11_c2x_compat)
912 CppReason(CPP_W_C11_C2X_COMPAT).
914 2019-10-11 Joseph Myers <joseph@codesourcery.com>
916 * c-common.c (c_common_reswords): Do not use D_EXT for _Decimal32,
917 _Decimal64 and _Decimal128.
919 2019-10-10 Joseph Myers <joseph@codesourcery.com>
921 * c-cppbuiltin.c (c_cpp_builtins): Do not define macros for DFP
922 types if DFP not supported.
924 2019-10-10 Jakub Jelinek <jakub@redhat.com>
926 * c-common.h (c_omp_check_context_selector,
927 c_omp_get_context_selector): Declare.
928 * c-omp.c (c_omp_declare_simd_clauses_to_numbers): Fix spelling
929 in diagnostic message.
930 (c_omp_check_context_selector, c_omp_get_context_selector): New
932 * c-attribs.c (c_common_attribute_table): Add "omp declare variant"
934 (handle_omp_declare_variant_attribute): New function.
936 2019-10-09 Martin Sebor <msebor@redhat.com>
938 PR tree-optimization/90879
939 * c.opt (-Wstring-compare): New option.
941 2019-10-08 Andrew Sutton <asutton@lock3software.com>
942 Jason Merrill <jason@redhat.com>
944 Update the concepts implementation to conform to the C++20
945 specification, improve compile times, and generally clean up
948 * c-cppbuiltin.c (c_cpp_builtins): Use new feature test values for
949 concepts when -std=c++2a. Bump __cpp_concepts to 201907.
950 * c.opt: Add -Wconcepts-ts.
951 * c-opts.c (c_common_post_options): Warn when -fconcepts is used
952 with -std=c++2a. Disable warning for -fconcepts in C++20 mode.
953 (set_std_cxx2a): Enable concepts by default.
955 2019-10-08 Joseph Myers <joseph@codesourcery.com>
957 * c-opts.c (c_common_post_options): Set
958 -fno-fp-int-builtin-inexact for C2X.
960 2019-10-05 Jakub Jelinek <jakub@redhat.com>
962 PR c++/91369 - Implement P0784R7: constexpr new
963 * c-cppbuiltin.c (c_cpp_builtins): Predefine
964 __cpp_constexpr_dynamic_alloc=201907 for -std=c++2a.
966 2019-10-04 Joseph Myers <joseph@codesourcery.com>
969 * c-format.c (C_STD_VER): Handle C2x.
970 (C_STD_NAME): Likewise.
971 (strftime_flag_specs): Add 'O' modifier with 'p' flag.
972 (time_char_table): Use separate entry for 'B' and 'b', with 'O'
973 modifier allowed and 'p' flag.
974 * c-format.h (enum format_std_version): Add STD_C2X.
975 (struct format_char_info): Mention 'p' in comment on flags2.
977 2019-10-01 David Malcolm <dmalcolm@redhat.com>
979 * c-opts.c (c_diagnostic_finalizer): Temporarily clear prefix when
980 calling diagnostic_show_locus, rather than destroying it afterwards.
982 2019-10-01 Jakub Jelinek <jakub@redhat.com>
985 * c-warn.c (check_alignment_of_packed_member): Ignore FIELD_DECLs
986 with NULL DECL_FIELD_OFFSET.
988 2019-10-01 Richard Sandiford <richard.sandiford@arm.com>
990 * c-pretty-print.c (pp_c_specifier_qualifier_list): If a vector type
991 has a type name, use it in preference to the __vector syntax.
993 2019-09-30 Richard Sandiford <richard.sandiford@arm.com>
995 * c-pretty-print.c (pp_c_parameter_type_list): Avoid printing
996 two spaces between a comma and "...".
998 2019-09-27 Jakub Jelinek <jakub@redhat.com>
1001 * c-common.h (c_omp_predefined_variable): Declare.
1002 * c-omp.c (c_omp_predefined_variable): New function.
1003 (c_omp_predetermined_sharing): Return OMP_CLAUSE_DEFAULT_SHARED
1004 for predefined variables.
1006 2019-09-27 Richard Sandiford <richard.sandiford@arm.com>
1008 * c-common.h (build_function_call_vec): Take the original
1009 function decl as an optional final parameter.
1010 (check_builtin_function_arguments): Take the original function decl.
1011 * c-common.c (check_builtin_function_arguments): Likewise.
1012 Handle all built-in functions, not just BUILT_IN_NORMAL ones.
1013 Use targetm.check_builtin_call to check BUILT_IN_MD functions.
1015 2019-09-15 Jason Merrill <jason@redhat.com>
1017 * c-warn.c (warn_logical_operator): Strip location wrappers. Don't
1018 fold_for_warn in "|| mask" warning.
1020 2019-09-10 Martin Liska <mliska@suse.cz>
1022 * c.opt: Use newly added WarnRemoved.
1024 2019-09-09 Martin Liska <mliska@suse.cz>
1026 * c.opt: Update comment of removed
1027 options that are preserved only for backward
1030 2019-09-06 Martin Liska <mliska@suse.cz>
1033 * c-common.c: Remove definition of flag_use_repository.
1034 * c-common.h: Likewise.
1035 * c-opts.c (c_common_handle_option):
1036 Do not handle OPT_frepo option.
1037 * c.opt: Mark the option with Deprecated.
1039 2019-09-04 Marek Polacek <polacek@redhat.com>
1041 * c.opt (fdeduce-init-list): Ignored.
1043 2019-09-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1046 * c.opt (Wenum-conversion): New option.
1048 2019-09-03 Jozef Lawrynowicz <jozef.l@mittosystems.com>
1050 * c-attribs.c (handle_section_attribute): Call the
1051 handle_generic_attribute target hook after performing target
1052 independent processing.
1053 (handle_noinit_attribute): Likewise.
1055 2019-09-03 Ian Lance Taylor <iant@golang.org>
1057 * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Always expand
1058 when using -fgo-dump-spec.
1060 2019-09-02 Martin Liska <mliska@suse.cz>
1063 * c-common.c (fname_as_string): Use cxx_printable_name for
1064 __PRETTY_FUNCTION__ same as was used before r265711.
1066 2019-08-28 Marek Polacek <polacek@redhat.com>
1068 Implement P1152R4: Deprecating some uses of volatile.
1070 * c-opts.c (c_common_post_options): Enable -Wvolatile by
1071 default for C++2a, unless -Wno-deprecated.
1072 * c.opt (Wvolatile): New warning.
1074 2019-08-28 Marek Polacek <polacek@redhat.com>
1076 PR c++/91360 - Implement C++20 P1143R2: constinit.
1077 * c-common.c (c_common_reswords): Add constinit and __constinit.
1078 (keyword_is_decl_specifier): Handle RID_CONSTINIT.
1079 * c-common.h (enum rid): Add RID_CONSTINIT, RID_FIRST_CXX20, and
1082 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_constinit.
1083 * c-format.c (cxx_keywords): Add "constinit".
1084 * c.opt (Wc++2a-compat, Wc++20-compat): New options.
1086 2019-08-27 Jakub Jelinek <jakub@redhat.com>
1089 * c-common.c (verify_tree): For LSHIFT_EXPR, RSHIFT_EXPR,
1090 COMPONENT_REF and ARRAY_REF in cxx_dialect >= cxx17 mode handle it
1091 like COMPOUND_EXPR rather than normal expression.
1093 2019-08-23 Iain Sandoe <iain@sandoe.co.uk>
1096 * c-lex.c (c_lex_with_flags): Don't call
1097 c_common_no_more_pch () from here.
1099 2019-08-23 Jakub Jelinek <jakub@redhat.com>
1102 * c-common.c (c_ts18661_flt_eval_method): Use flag_excess_precision
1103 instead of flag_excess_precision_cmdline.
1104 * c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): Likewise.
1105 * c-opts.c (c_common_post_options): Likewise.
1107 2019-08-22 Martin Sebor <msebor@redhat.com>
1110 * c-common.c (braced_list_to_string): Add argument and overload.
1111 Handle flexible length arrays and unions.
1113 2019-08-21 Eric Botcazou <ebotcazou@adacore.com>
1115 * c-ada-spec.c (dump_ada_function_declaration): Be prepared for broken
1116 function declarations where arguments are missing. Rename variables.
1118 2019-08-15 Richard Biener <rguenther@suse.de>
1120 * c-common.c (c_stddef_cpp_builtins): When the GIMPLE FE is
1121 enabled, define __SIZETYPE__.
1123 2019-08-14 Christophe Lyon <christophe.lyon@linaro.org>
1125 * c-attribs.c (c_common_attribute_table): Add "noinit" entry. Add
1126 exclusion with "section" attribute.
1127 (attr_noinit_exclusions): New table.
1128 (handle_noinit_attribute): New function.
1130 2019-08-13 Richard Sandiford <richard.sandiford@arm.com>
1133 * c-common.c (resolve_overloaded_builtin): Use
1134 copy_decl_built_in_function.
1136 2019-08-13 Martin Sebor <msebor@redhat.com>
1139 * c-format.c (printf_length_specs): Set FMT_LEN_w for "w".
1140 (asm_fprintf_length_spec): Same.
1141 * c-format.h (format_lengths): Add FMT_LEN_w.
1143 2019-08-10 Jakub Jelinek <jakub@redhat.com>
1145 * c-pragma.h (enum pragma_omp_clause): Add
1146 PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
1148 2019-08-07 Jakub Jelinek <jakub@redhat.com>
1150 * c-pragma.h (enum pragma_omp_clause): Add
1151 PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR. Set PRAGMA_OACC_CLAUSE_USE_DEVICE
1152 equal to PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR instead of being a separate
1155 2019-08-05 Marek Polacek <polacek@redhat.com>
1157 PR c++/91338 - Implement P1161R3: Deprecate a[b,c].
1158 * c-opts.c (c_common_post_options): Enable -Wcomma-subscript by
1159 default for C++2a, unless -Wno-deprecated.
1160 * c.opt (Wcomma-subscript): New warning.
1162 2019-07-20 Jakub Jelinek <jakub@redhat.com>
1164 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_LOOP.
1165 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_BIND.
1166 * c-pragma.c (omp_pragmas_simd): Add PRAGMA_OMP_LOOP entry.
1167 * c-common.h (enum c_omp_clause_split): Add C_OMP_CLAUSE_SPLIT_LOOP.
1168 * c-omp.c (c_omp_split_clauses): Add support for 4 new combined
1169 constructs with the loop construct.
1171 2019-07-13 Jakub Jelinek <jakub@redhat.com>
1174 * c-omp.c (c_omp_split_clauses): Fix a pasto in
1175 OMP_CLAUSE_REDUCTION_TASK handling.
1177 2019-07-12 Jakub Jelinek <jakub@redhat.com>
1179 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ORDER.
1180 * c-omp.c (c_omp_split_clauses): Handle splitting of OMP_CLAUSE_ORDER.
1182 2019-07-09 Martin Sebor <msebor@redhat.com>
1185 * c-opts.c (handle_deferred_opts): Change class-key of PODs to struct
1186 and others to class.
1187 * c-pretty-print.h: Same.
1189 2019-07-09 Martin Sebor <msebor@redhat.com>
1192 * c-format.c (check_argument_type): Change class-key from class to
1193 struct and vice versa to match convention and avoid -Wclass-is-pod
1194 and -Wstruct-no-pod.
1195 * c-pretty-print.h: Same.
1197 2019-07-03 Martin Liska <mliska@suse.cz>
1199 * c-common.c (try_to_locate_new_include_insertion_point): Remove
1202 2019-07-03 Jakub Jelinek <jakub@redhat.com>
1204 * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_REDUCTION_INSCAN
1205 clauses on OMP_FOR rather than OMP_PARALLEL when OMP_FOR is combined
1208 2019-07-02 qing zhao <qing.zhao@oracle.com>
1210 PR preprocessor/90581
1211 * c-opts.c (c_common_handle_option): Handle -fmax-include-depth.
1212 * c.opt: Add new option -fmax-include-depth.
1214 2019-06-26 Jason Merrill <jason@redhat.com>
1216 PR c++/55442 - memory-hog with highly recursive constexpr.
1217 * c.opt (fconstexpr-loop-limit): New.
1219 2019-06-25 Jakub Jelinek <jakub@redhat.com>
1222 * c-omp.c (c_finish_omp_atomic): Allow tree_invariant_p in addition
1223 to SAVE_EXPR in first operand of a COMPOUND_EXPR.
1225 2019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
1227 * c-common.c (c_common_nodes_and_builtins): Define
1228 alternate "__intN__" name for "__intN" types.
1230 2019-06-24 Jan Hubicka <jh@suse.cz>
1232 * c-common.c (braced_lists_to_strings): Check that
1233 type is array or integer prior checking string flag.
1235 2019-06-21 Matthew Beliveau <mbelivea@redhat.com>
1237 PR c++/90875 - added -Wswitch-outside-range option
1238 * c.opt (Wswitch-outside-range): Added new option.
1239 * c-warn.c (c_do_switch_warnings): Use OPT_Wswitch-outside-range.
1241 2019-06-21 Marek Polacek <polacek@redhat.com>
1243 PR c++/90953 - ICE with -Wmissing-format-attribute.
1244 * c-common.c (check_function_arguments_recurse): Use
1246 (check_missing_format_attribute): Likewise.
1248 2019-06-19 Marek Polacek <polacek@redhat.com>
1250 PR c++/60364 - noreturn after first decl not diagnosed.
1251 * c-attribs.c (handle_noreturn_attribute): No longer static.
1252 * c-common.h (handle_noreturn_attribute, attr_noreturn_exclusions):
1254 * c-format.c (check_function_format): Use get_attribute_name.
1256 2019-06-19 Martin Sebor <msebor@redhat.com>
1258 PR translation/90156
1259 * c-format.c (function_format_info::format_type): Adjust type.
1260 (function_format_info::is_raw): New member.
1261 (decode_format_type): Adjust signature. Handle "raw" diag attributes.
1262 (decode_format_attr): Adjust call to decode_format_type.
1263 Avoid a redundant call to convert_format_name_to_system_name.
1264 Avoid abbreviating the word "arguments" in a diagnostic.
1265 (format_warning_substr): New function.
1266 (avoid_dollar_number): Quote dollar sign in a diagnostic.
1267 (finish_dollar_format_checking): Same.
1268 (check_format_info): Same.
1269 (struct baltoks_t): New.
1270 (c_opers, c_keywords, cxx_keywords, badwords, contrs): New arrays.
1271 (maybe_diag_unbalanced_tokens, check_tokens, check_plain): New
1273 (check_format_info_main): Call check_plain. Use baltoks_t. Call
1274 maybe_diag_unbalanced_tokens.
1275 (handle_format_attribute): Spell out the word "arguments" in
1278 2019-06-11 Matthew Beliveau <mbelivea@redhat.com>
1280 PR c++/90449 - add -Winaccessible-base option.
1281 * c.opt (Winaccessible-base): New option.
1283 2019-06-10 Jakub Jelinek <jakub@redhat.com>
1285 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_SCAN.
1286 * c-pragma.c (omp_pragmas_simd): Add #pragma omp scan.
1287 * c-omp.c (c_omp_split_clauses): Diagnose inscan reductions on
1288 combined/composite constructs where it is not allowed. Copy over
1289 OMP_CLAUSE_REDUCTION_INSCAN.
1291 2019-06-05 Martin Sebor <msebor@redhat.com>
1293 * c-attribs.c (handle_mode_attribute): Adjust quoting and hyphenation.
1294 (handle_alias_ifunc_attribute): Same.
1295 (handle_copy_attribute): Same.
1296 (handle_weakref_attribute): Same.
1297 (handle_nonnull_attribute): Same.
1298 * c-warn.c (warn_for_sign_compare): Same.
1299 (warn_for_restrict): Same.
1302 2019-06-05 Martin Sebor <msebor@redhat.com>
1304 * c-pragma.c (handle_pragma_weak): Adjust quoting in a diagnostic.
1305 * c.opt (-Wformat-diag): Remove a spurious period.
1307 2019-05-29 Jakub Jelinek <jakub@redhat.com>
1310 * c-common.c (check_builtin_function_arguments)
1311 <case BUILTIN_*_OVERFLOW>: Diagnose pointer to const qualified integer
1314 2019-05-23 Eric Botcazou <ebotcazou@adacore.com>
1316 * c-ada-spec.c (compare_node): Compare the DECL_UIDs as a last resort.
1318 2019-05-22 Martin Liska <mliska@suse.cz>
1321 * c-attribs.c (handle_copy_attribute): Do not copy
1322 target_clones attribute.
1324 2019-05-21 Eric Botcazou <ebotcazou@adacore.com>
1326 * c-ada-spec.h (enum cpp_operation): Add IS_ASSIGNMENT_OPERATOR.
1327 * c-ada-spec.c (print_assignment_operator): New function.
1328 (dump_ada_declaration) <FUNCTION_DECL>: Call it do dump explicit copy
1329 assignment operators declared as methods and filter out the others.
1331 2019-05-17 Thomas Schwinge <thomas@codesourcery.com>
1334 * c-attribs.c (c_common_attribute_table): Set min_len to -1 for
1335 "omp declare target".
1337 2019-05-16 Martin Sebor <msebor@redhat.com>
1339 * c-attribs.c (handle_no_sanitize_attribute): Quote identifiers,
1340 keywords, operators, and types in diagnostics.
1341 (handle_scalar_storage_order_attribute): Same.
1342 (handle_mode_attribute): Same.
1343 (handle_visibility_attribute): Same.
1344 (handle_assume_aligned_attribute): Same.
1345 (handle_no_split_stack_attribute): Same.
1346 * c-common.c (shorten_compare): Same.
1347 (c_common_truthvalue_conversion): Same.
1348 (cb_get_source_date_epoch): Same.
1349 * c-lex.c (cb_def_pragma): Quote keywords, operators, and types
1351 (interpret_float): Same.
1352 * c-omp.c (c_finish_omp_for): Same.
1353 * c-opts.c (c_common_post_options): Same.
1354 * c-pch.c (c_common_pch_pragma): Same.
1355 * c-pragma.c (pop_alignment): Same.
1356 (handle_pragma_pack): Same.
1357 (apply_pragma_weak): Same.
1358 (handle_pragma_weak): Same.
1359 (handle_pragma_scalar_storage_order): Same.
1360 (handle_pragma_redefine_extname): Same.
1361 (add_to_renaming_pragma_list): Same.
1362 (maybe_apply_renaming_pragma): Same.
1363 (push_visibility): Same.
1364 (handle_pragma_visibility): Same.
1365 (handle_pragma_optimize): Same.
1366 (handle_pragma_message): Same.
1367 * c-warn.c (warn_for_omitted_condop): Same.
1368 (lvalue_error): Same.
1370 2019-05-15 Richard Biener <rguenther@suse.de>
1373 * c-common.c (c_common_mark_addressable_vec): Also mark
1374 a COMPOUND_LITERAL_EXPR_DECL addressable similar to
1377 2019-05-06 Nathan Sidwell <nathan@acm.org>
1379 * c-opts.c (handle_defered_opts): Rename struct deps to struc mkdeps.
1381 2019-04-30 Nathan Sidwell <nathan@acm.org>
1383 * c-common.c (c_common_init_ts): Use MARK_TS_EXP. Mark SIZEOF_EXPR.
1385 2019-04-30 Martin Liska <mliska@suse.cz>
1387 * c-pragma.c (handle_pragma_diagnostic): Provide hints
1388 for unknown options.
1390 2019-04-26 Richard Sandiford <richard.sandiford@arm.com>
1392 * c-warn.c (strict_aliasing_warning): Apply COMPLETE_TYPE_P to
1393 the pointer target rather than the pointer itself.
1395 2019-04-19 Jakub Jelinek <jakub@redhat.com>
1398 * c-common.h (c_add_case_label): Remove orig_type and outside_range_p
1400 (c_do_switch_warnings): Remove outside_range_p argument.
1401 * c-common.c (check_case_bounds): Removed.
1402 (c_add_case_label): Remove orig_type and outside_range_p arguments.
1403 Don't call check_case_bounds. Fold low_value as well as high_value.
1404 * c-warn.c (c_do_switch_warnings): Remove outside_range_p argument.
1405 Check for case labels outside of range of original type here and
1408 2019-04-12 Jakub Jelinek <jakub@redhat.com>
1410 PR translation/90041
1411 * c.opt (-fhandle-exceptions): Use %< and %> around option names
1412 in the Warn diagnostics.
1415 * c-attribs.c (handle_patchable_function_entry_attribute): Add
1416 function comment. Warn if arguments of the attribute are not positive
1419 2019-04-09 Eric Botcazou <ebotcazou@adacore.com>
1421 * c-ada-spec.c (print_destructor): Deal with deleting destructors.
1422 (dump_ada_declaration) <FUNCTION_DECL>: Likewise.
1424 2019-04-07 Eric Botcazou <ebotcazou@adacore.com>
1426 * c-ada-spec.c (is_float128): New predicate extracted from...
1427 (dump_ada_node) <COMPLEX_TYPE>: Use it to recognize __cfloat128.
1428 <REAL_TYPE>: ...here. Call it.
1430 2019-04-05 David Malcolm <dmalcolm@redhat.com>
1433 * c-warn.c (check_address_or_pointer_of_packed_member): Add
1434 auto_diagnostic_group. Guard inform calls by result of
1437 2019-04-05 Marek Polacek <polacek@redhat.com>
1439 PR c++/89973 - -Waddress-of-packed-member ICE with invalid conversion.
1440 * c-warn.c (check_address_or_pointer_of_packed_member): Check the type
1443 2019-04-03 Jason Merrill <jason@redhat.com>
1445 PR c++/86586 - -fcompare-debug=-Wsign-compare.
1446 * c-warn.c (warn_for_sign_compare): Call fold_for_warn.
1448 2019-04-01 Martin Sebor <msebor@redhat.com>
1451 * c-attribs.c (handle_copy_attribute): Handle references and
1452 non-constant expressions.
1454 2019-03-22 Jakub Jelinek <jakub@redhat.com>
1457 * c.opt (-fconstexpr-ops-limit=): New option.
1459 2019-03-21 Jakub Jelinek <jakub@redhat.com>
1461 * c-common.c (per_file_includes_t): Use false as Lazy in hash_set
1464 2019-03-19 Martin Sebor <msebor@redhat.com>
1466 PR tree-optimization/89688
1467 * c-common.c (braced_list_to_string): Make static.
1468 (braced_lists_to_strings): Define new function.
1469 * c-common.h (braced_list_to_string): Remove.
1470 (braced_lists_to_strings): Declare.
1472 2019-03-12 Martin Liska <mliska@suse.cz>
1474 * c-opts.c (c_common_handle_option): Wrap option with %< and %>.
1476 2019-03-11 Martin Liska <mliska@suse.cz>
1478 * c-opts.c (c_common_post_options): Wrap apostrophes
1479 in gcc internal format with %'.
1481 2019-03-11 Martin Liska <mliska@suse.cz>
1483 * c-attribs.c (handle_nocf_check_attribute): Wrap an option name
1484 in a string format message and fix GNU coding style.
1485 * c-common.c (vector_types_convertible_p): Likewise.
1486 (c_build_vec_perm_expr): Likewise.
1487 * c-indentation.c (get_visual_column): Likewise.
1488 * c-opts.c (c_common_handle_option): Likewise.
1489 (c_common_post_options): Likewise.
1490 (sanitize_cpp_opts): Likewise.
1491 * c-pch.c (c_common_pch_pragma): Likewise.
1492 * c-pragma.c (handle_pragma_pack): Likewise.
1494 2019-03-08 Jakub Jelinek <jakub@redhat.com>
1496 PR tree-optimization/89550
1497 * c-common.c (c_common_truthvalue_conversion): Only set
1498 TREE_NO_WARNING if warning_at returned true.
1499 * c-warn.c (overflow_warning, warn_logical_operator): Likewise.
1501 2019-02-25 Sandra Loosemore <sandra@codesourcery.com>
1502 Martin Sebor <msebor@gmail.com>
1504 * c.opt (Wmissing-attributes): Clean up doc string.
1506 2019-02-25 Jakub Jelinek <jakub@redhat.com>
1509 * c-format.c (maybe_read_dollar_number): Compute nargnum in
1510 HOST_WIDE_INT type to avoid overflows and change overflow_flag
1513 2019-02-22 Richard Biener <rguenther@suse.de>
1515 * c-pch.c (no_checksum): Remove.
1516 (pch_init): Remove assertion that executable_checksum is not
1518 (c_common_valid_pch): Likewise.
1520 2019-02-18 Martin Sebor <msebor@redhat.com>
1523 * c-common.c (invalid_array_size_error): Handle cst_size_not_constant.
1525 2019-02-16 David Malcolm <dmalcolm@redhat.com>
1528 * c-common.c (shorten_compare): Call fold_for_warn on op0 when
1529 implementing -Wtype-limits.
1531 2019-02-11 Martin Sebor <msebor@redhat.com>
1534 * c-common.c (invalid_array_size_error): New function.
1535 (valid_array_size_p): Call it. Handle size as well as type.
1536 * c-common.h (valid_constant_size_p): New function.
1537 (enum cst_size_error): New type.
1539 2019-01-31 David Malcolm <dmalcolm@redhat.com>
1542 * known-headers.cc (get_stdlib_header_for_name): Add
1543 {FLT|DBL|LDBL}_{MAX|MIN} to "hints" array.
1545 2019-01-31 Jakub Jelinek <jakub@redhat.com>
1548 * c-pretty-print.c (pp_c_enumeration_constant): Print always as
1549 a C cast in pp_c_flag_gnu_v3 mode.
1551 2019-01-29 Jakub Jelinek <jakub@redhat.com>
1554 * c-common.c (c_common_nodes_and_builtins): Build type variants for
1555 builtin_structptr_types types even for C.
1557 2019-01-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
1559 * c-warn.c (check_address_or_pointer_of_packed_member): Handle the case
1560 when rhs is of array type correctly. Fix handling of nested structures.
1561 Fix handling of indirect_ref together with nop_expr and/or addr_expr.
1562 (check_and_warn_address_or_pointer_of_packed_member): Fix handling of
1563 type casts within nested compound expressions.
1565 2019-01-22 Jakub Jelinek <jakub@redhat.com>
1568 * c-omp.c (c_finish_omp_atomic): For bitfield atomics, update type
1569 variable after using BIT_FIELD_REF.
1571 2019-01-18 H.J. Lu <hongjiu.lu@intel.com>
1575 * c-common.h (warn_for_address_or_pointer_of_packed_member):
1576 Remove the boolean argument.
1577 * c-warn.c (check_address_of_packed_member): Renamed to ...
1578 (check_address_or_pointer_of_packed_member): This. Also
1579 warn pointer conversion.
1580 (check_and_warn_address_of_packed_member): Renamed to ...
1581 (check_and_warn_address_or_pointer_of_packed_member): This.
1582 Also warn pointer conversion.
1583 (warn_for_address_or_pointer_of_packed_member): Remove the
1584 boolean argument. Don't check pointer conversion here.
1586 2019-01-15 Richard Sandiford <richard.sandiford@arm.com>
1589 * c.opt (Wdeprecated): Move documentation and variable to common.opt.
1591 2019-01-14 Jakub Jelinek <jakub@redhat.com>
1593 * c-cppbuiltin.c (c_cpp_builtin): Define __cpp_guaranteed_copy_elision
1594 and __cpp_nontype_template_parameter_auto. Add a comment that
1595 __cpp_template_auto is deprecated.
1597 2019-01-14 Tom Honermann <tom@honermann.net>
1599 Implement P0482R5, char8_t: A type for UTF-8 characters and strings
1600 * c-common.c (c_common_reswords): Add char8_t.
1601 (fix_string_type): Use char8_t for the type of u8 string literals.
1602 (c_common_get_alias_set): char8_t doesn't alias.
1603 (c_common_nodes_and_builtins): Define char8_t as a builtin type in
1605 (c_stddef_cpp_builtins): Add __CHAR8_TYPE__.
1606 (keyword_begins_type_specifier): Add RID_CHAR8.
1607 * c-common.h (rid): Add RID_CHAR8.
1608 (c_tree_index): Add CTI_CHAR8_TYPE and CTI_CHAR8_ARRAY_TYPE.
1609 Define D_CXX_CHAR8_T and D_CXX_CHAR8_T_FLAGS.
1610 Define char8_type_node and char8_array_type_node.
1611 * c-cppbuiltin.c (cpp_atomic_builtins): Predefine
1612 __GCC_ATOMIC_CHAR8_T_LOCK_FREE.
1613 (c_cpp_builtins): Predefine __cpp_char8_t.
1614 * c-lex.c (lex_string): Use char8_array_type_node as the type of
1616 (lex_charconst): Use char8_type_node as the type of CPP_UTF8CHAR.
1617 * c-opts.c: If not otherwise specified, enable -fchar8_t when
1619 * c.opt: Add the -fchar8_t command line option.
1621 2019-01-14 Martin Sebor <msebor@redhat.com>
1624 * c-attribs.c (positional_argument): Call valid_format_string_type_p
1625 and issue errors if it fails.
1626 * c-common.h (valid_format_string_type_p): Declare.
1627 * c-format.c (valid_stringptr_type_p): Rename...
1628 (valid_format_string_type_p): ...to this and make extern.
1629 (handle_format_arg_attribute): Adjust to new name.
1630 (check_format_string): Same.
1632 2019-01-13 H.J. Lu <hongjiu.lu@intel.com>
1634 * c-warn.c (warn_for_address_or_pointer_of_packed_member):
1635 Replace "may may" with "may" in warning message.
1637 2019-01-07 Jakub Jelinek <jakub@redhat.com>
1640 * c-common.h (enum rid): Add RID_BUILTIN_CONVERTVECTOR.
1641 (c_build_vec_convert): Declare.
1642 * c-common.c (c_build_vec_convert): New function.
1644 2019-01-04 Martin Sebor <msebor@redhat.com>
1647 * c-attribs.c (handle_copy_attribute): Avoid copying attribute leaf.
1648 Handle C++ empty throw specification and C11 _Noreturn.
1649 (has_attribute): Also handle C11 _Noreturn.
1651 2019-01-04 Martin Sebor <msebor@redhat.com>
1654 * c-attribs.c (positional_argument): Also accept enumerated types.
1656 2019-01-01 Jakub Jelinek <jakub@redhat.com>
1658 Update copyright years.
1660 2018-12-20 H.J. Lu <hongjiu.lu@intel.com>
1663 * c-common.h (warn_for_address_or_pointer_of_packed_member): New.
1664 * c-warn.c (check_alignment_of_packed_member): New function.
1665 (check_address_of_packed_member): Likewise.
1666 (check_and_warn_address_of_packed_member): Likewise.
1667 (warn_for_address_or_pointer_of_packed_member): Likewise.
1668 * c.opt: Add -Wno-address-of-packed-member.
1670 2018-12-20 David Malcolm <dmalcolm@redhat.com>
1673 * c-warn.c (get_outermost_macro_expansion): New function.
1674 (spelled_the_same_p): Use it to unwind the macro expansions, and
1675 compare the outermost macro in each nested expansion, rather than
1678 2018-12-19 David Malcolm <dmalcolm@redhat.com>
1681 * c-common.h (warn_tautological_cmp): Convert 1st param from
1682 location_t to const op_location_t &.
1683 * c-warn.c (find_array_ref_with_const_idx_r): Call fold_for_warn
1684 when testing for INTEGER_CST.
1685 (warn_tautological_bitwise_comparison): Convert 1st param from
1686 location_t to const op_location_t &; use it to build a
1687 binary_op_rich_location, and use this.
1688 (spelled_the_same_p): New function.
1689 (warn_tautological_cmp): Convert 1st param from location_t to
1690 const op_location_t &. Warn for macro expansions if
1691 spelled_the_same_p. Use binary_op_rich_location.
1693 2018-12-19 David Malcolm <dmalcolm@redhat.com>
1697 * c-common.c (unsafe_conversion_p): Fold any location wrapper.
1698 (verify_tree): Handle location wrappers.
1699 (c_common_truthvalue_conversion): Strip any location wrapper.
1701 (fold_offsetof): Strip any location wrapper.
1702 (complete_array_type): Likewise for initial_value.
1703 (convert_vector_to_array_for_subscript): Call fold_for_warn on the
1704 index before checking for INTEGER_CST.
1705 * c-pretty-print.c (c_pretty_printer::primary_expression): Don't
1706 print parentheses around location wrappers.
1707 * c-warn.c (warn_logical_operator): Call fold_for_warn on op_right
1708 before checking for INTEGER_CST.
1709 (warn_tautological_bitwise_comparison): Call
1710 tree_strip_any_location_wrapper on lhs, rhs, and bitop's operand
1711 before checking for INTEGER_CST.
1712 (readonly_error): Strip any location wrapper.
1713 (warn_array_subscript_with_type_char): Strip location wrappers
1714 before checking for INTEGER_CST. Use the location of the index if
1717 2018-12-06 Jason Merrill <jason@redhat.com>
1719 PR c++/88136 - -Wdeprecated-copy false positives
1720 * c.opt (Wdeprecated-copy-dtor): New.
1721 (Wdeprecated-copy): Move to -Wextra.
1723 2018-11-29 Martin Sebor <msebor@redhat.com>
1727 * c-attribs.c (common_handle_aligned_attribute): Silently avoid setting
1728 alignments to values less than the target requires.
1729 (has_attribute): For attribute aligned consider both the attribute
1730 and the alignment bits.
1731 * c-common.c (c_init_attributes): Optionally issue a warning for
1734 2018-11-28 Martin Sebor <msebor@redhat.com>
1738 * c-warn.c (sizeof_pointer_memaccess_warning): Bail if source
1739 or destination is an error.
1741 2018-11-28 Jakub Jelinek <jakub@redhat.com>
1744 * c-ubsan.c: Include langhooks.h.
1745 (ubsan_instrument_division): Change gcc_assert that main variants
1746 of op0 and op1 types are equal to gcc_checking_assert that the
1747 main variants are compatible types.
1749 2018-11-27 Eric Botcazou <ebotcazou@adacore.com>
1751 * c-ada-spec.c: Include stringpool.h.
1752 (has_static_fields): Return false for incomplete types.
1753 (is_tagged_type): Likewise.
1754 (has_nontrivial_methods): Likewise.
1755 (dump_ada_node) <INTEGER_TYPE>: Deal specifically with __int128.
1756 (struct overloaded_name_hash): New structure.
1757 (struct overloaded_name_hasher): Likewise.
1758 (overloaded_names): New global variable.
1759 (init_overloaded_names): New static function.
1760 (overloaded_name_p): New predicate.
1761 (dump_ada_declaration) <TYPE_DECL>: Tidy up and set TREE_VISITED
1762 on the TYPE_STUB_DECL of the original type of a typedef, if any.
1763 <FUNCTION_DECL>: Bail out for an unsupported overloaded name.
1764 Remove always-true condition and dump forward types.
1765 (dump_ada_specs): Delete overloaded_names.
1767 2018-11-20 Martin Sebor <msebor@redhat.com>
1769 * c-attribs.c (type_for_vector_size): New function.
1770 (type_valid_for_vector_size): Same.
1771 (handle_vector_size_attribute): Move code to the functions above
1773 (validate_attribute, has_attribute): New functions.
1774 * c-common.h (has_attribute): Declare.
1775 (rid): Add RID_HAS_ATTRIBUTE_EXPRESSION.
1776 * c-common.c (c_common_resword): Same.
1778 2018-11-16 Jason Merrill <jason@redhat.com>
1780 * c-lex.c (c_common_has_attribute): Handle likely/unlikely.
1781 * c-attribs.c (attr_cold_hot_exclusions): Make public.
1783 2018-11-16 Jakub Jelinek <jakub@redhat.com>
1786 * c-common.c (fix_string_type): Reject string literals larger than
1787 TYPE_MAX_VALUE (ssizetype) bytes.
1789 2018-11-15 Martin Sebor <msebor@redhat.com>
1793 * c-attribs.c (positional_argument): New function.
1794 (handle_alloc_size_attribute): Use it and simplify.
1795 (handle_alloc_align_attribute): Same.
1796 (handle_assume_aligned_attribute): Same.
1797 (handle_nonnull_attribute): Same.
1798 * c-common.c (check_function_arguments): Pass fntype to
1799 check_function_format.
1800 * c-common.h (check_function_format): Add an argument.
1801 (PosArgFlags, positional_argument): Declare new type and function.
1802 * c-format.c (decode_format_attr): Add arguments.
1803 (check_format_string, get_constant): Same.
1804 (convert_format_name_to_system_name): Adjust.
1806 2018-11-15 David Malcolm <dmalcolm@redhat.com>
1809 * c-opts.c (c_diagnostic_finalizer): Add diagnostic_t param.
1811 2018-11-14 Jakub Jelinek <jakub@redhat.com>
1813 P1236R1 - Signed integers are two's complement
1814 * c-warn.c (maybe_warn_shift_overflow): Don't warn for c++2a.
1815 * c-ubsan.c (ubsan_instrument_shift): Make signed shifts
1816 with in-range second operand well defined for -std=c++2a.
1819 * c-common.c (parse_optimize_options): Allocate option string from
1820 opts_obstack rather than as GC memory. Move the allocation after
1821 warning for invalid option.
1823 2018-11-13 David Malcolm <dmalcolm@redhat.com>
1825 * c-common.c (c_get_substring_location): Update for renaming of
1826 get_source_location_for_substring to get_location_within_string.
1827 * c-lex.c: Replace "source_location" with "location_t".
1828 * c-opts.c: Likewise.
1829 * c-ppoutput.c: Likewise.
1831 2018-11-13 Martin Sebor <msebor@redhat.com>
1834 * c-attribs.c (handle_copy_attribute): Exclude inlining attributes.
1835 (handle_tls_model_attribute): Improve diagnostics.
1837 2018-11-12 Jason Merrill <jason@redhat.com>
1839 * c-cppbuiltin.c (c_cpp_builtins): Define
1840 __cpp_impl_destroying_delete.
1842 * c-cppbuiltin.c (c_cpp_builtins): Change __cpp_explicit_bool to
1843 __cpp_conditional_explicit.
1845 2018-11-09 Martin Sebor <msebor@redhat.com>
1848 * c-attribs.c (handle_copy_attribute): New function.
1850 2018-11-09 Martin Sebor <msebor@redhat.com>
1853 * c-common.c (check_user_alignment): Use MAX_OFILE_ALIGNMENT.
1855 2018-11-08 Jakub Jelinek <jakub@redhat.com>
1857 * c-common.h (c_finish_omp_taskgroup): Add CLAUSES argument.
1858 (c_finish_omp_atomic): Replace bool SEQ_CST argument with
1859 enum omp_memory_order MEMORY_ORDER.
1860 (c_finish_omp_flush): Add MO argument.
1861 (c_omp_depend_t_p, c_finish_omp_depobj): Declare.
1862 (c_finish_omp_for): Add FINAL_P argument.
1863 * c-omp.c: Include memmodel.h.
1864 (c_finish_omp_taskgroup): Add CLAUSES argument. Set
1865 OMP_TASKGROUP_CLAUSES to it.
1866 (c_finish_omp_atomic): Replace bool SEQ_CST argument with
1867 enum omp_memory_order MEMORY_ORDER. Set OMP_ATOMIC_MEMORY_ORDER
1868 instead of OMP_ATOMIC_SEQ_CST.
1869 (c_omp_depend_t_p, c_finish_omp_depobj): New functions.
1870 (c_finish_omp_flush): Add MO argument, if not MEMMODEL_LAST, emit
1871 __atomic_thread_fence call with the given value.
1872 (check_omp_for_incr_expr): Formatting fixes.
1873 (c_finish_omp_for): Add FINAL_P argument. Allow NE_EXPR
1874 even in OpenMP loops, diagnose if NE_EXPR and incr expression
1875 is not constant expression 1 or -1. Transform NE_EXPR loops
1876 with iterators pointers to VLA into LT_EXPR or GT_EXPR loops.
1877 (c_omp_check_loop_iv_r): Look for orig decl of C++ range for
1879 (c_omp_split_clauses): Add support for combined
1880 #pragma omp parallel master and
1881 #pragma omp {,parallel }master taskloop{, simd} constructs.
1882 Handle OMP_CLAUSE_IN_REDUCTION. Handle OMP_CLAUSE_REDUCTION_TASK.
1883 Handle OMP_CLAUSE_NONTEMPORAL. Handle splitting OMP_CLAUSE_IF
1884 also to OMP_SIMD. Copy OMP_CLAUSE_LASTPRIVATE_CONDITIONAL.
1885 (c_omp_predetermined_sharing): Don't return
1886 OMP_CLAUSE_DEFAULT_SHARED for const qualified decls.
1887 * c-pragma.c (omp_pragmas): Add PRAGMA_OMP_DEPOBJ and
1888 PRAGMA_OMP_REQUIRES.
1889 * c-pragma.h (enum pragma_kind): Likewise.
1890 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_NONTEMPORAL
1891 and PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
1893 2018-11-08 David Malcolm <dmalcolm@redhat.com>
1895 * c-format.c (gcc_dump_printf_char_table): Add entry for %f.
1897 2018-11-08 David Malcolm <dmalcolm@redhat.com>
1899 * c-format.c (local_cgraph_node_ptr_node): New variable.
1900 (gcc_dump_printf_char_table): Add entry for %C.
1901 (get_pointer_to_named_type): New function, taken from the handling
1902 code for "gimple *" from...
1903 (init_dynamic_diag_info): ...here. Add handling for
1905 * c-format.h (T_CGRAPH_NODE): New.
1907 2018-10-19 Jason Merrill <jason@redhat.com>
1909 * c-cppbuiltin.c (c_cpp_builtins): Add
1910 __cpp_nontype_template_parameter_class.
1912 2018-10-31 Nathan Sidwell <nathan@acm.org>
1914 * c-opts.c (c_finish_options): Force command line macro
1915 location. Refactor to avoid repeating main debug hook.
1916 (push_command_line_include): Clarify comment.
1918 * c-opts.c (c_finish_options): Adjust cpp_force_token_locations call.
1920 2018-10-30 Martin Sebor <msebor@redhat.com>
1923 * c-format.c (check_format_types): Avoid diagnosing null pointer
1924 arguments to printf-family of functions.
1926 2018-10-30 Marek Polacek <polacek@redhat.com>
1928 Implement P0892R2, explicit(bool).
1929 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_explicit_bool.
1931 2018-10-29 David Malcolm <dmalcolm@redhat.com>
1933 * name-hint.h (name_hint::take_deferred): New member function.
1935 2018-10-29 David Malcolm <dmalcolm@redhat.com>
1938 * c-common.c (check_function_sentinel): Call fold_for_warn on the
1940 (check_function_restrict): Rename param "argarray" to
1941 "unfolded_argarray", and make a copy named "argarray", calling
1942 fold_for_warn on each argument.
1943 (check_function_arguments): Add note about responsibility for
1944 folding the arguments.
1946 2018-10-17 Joseph Myers <joseph@codesourcery.com>
1948 * c-common.c (flag_isoc2x): New variable.
1949 * c-common.h (clk_c): Update comment to reference C2X.
1950 (flag_isoc99, flag_isoc11): Update comments to reference future
1951 standard versions in general.
1952 (flag_isoc2x): Declare.
1953 * c-opts.c (set_std_c2x): New function.
1954 (c_common_handle_option): Handle -std=c2x and -std=gnu2x.
1955 (set_std_c89, set_std_c99, set_std_c11, set_std_c17): Set
1957 * c.opt (Wc11-c2x-compat, std=c2x, std=gnu2x): New options.
1959 2018-10-17 Joseph Myers <joseph@codesourcery.com>
1961 * c.opt (std=c17, std=c18, std=gnu17, std=gnu18, std=iso9899:2017)
1962 (std=iso9899:2018): Document C17 as published in 2018.
1964 2018-10-12 Christophe Lyon <christophe.lyon@linaro.org>
1967 * c-pretty-print.c (c_pretty_printer::constant): Fix typo.
1969 2018-10-11 Will Wray <wjwray@gmail.com>
1972 * c-pretty-print.h (pp_c_type_cast): Prototype.
1973 (pp_c_integer_constant): Likewise.
1974 * c-pretty-print.c (pp_c_type_cast): No longer static.
1975 (pp_c_integer_constant): Likewise.
1976 (pp_c_enumeration_constant): Fix loop termination when finding
1977 name of constant. No longer returns a value. Call
1978 pp_c_integer_constant.
1979 (c_pretty_printer::constant): Update for changes to
1980 pp_c_enumeration_constant.
1982 2018-10-11 Jakub Jelinek <jakub@redhat.com>
1984 * c-lex.c (c_common_has_attribute): Return 201803 instead of 20180312
1985 for no_unique_address.
1987 2018-10-09 David Malcolm <dmalcolm@redhat.com>
1989 * c-common.c (c_option_controlling_cpp_error): Rename to...
1990 (c_option_controlling_cpp_diagnostic): ...this, and convert
1991 "reason" from int to enum.
1992 (c_cpp_error): Rename to...
1993 (c_cpp_diagnostic): ...this, converting level and reason to enums.
1994 * c-common.h (c_cpp_error): Rename to...
1995 (c_cpp_diagnostic): ...this, converting level and reason to enums.
1996 * c-opts.c (c_common_init_options): Update for renaming.
1998 2018-10-08 Richard Sandiford <richard.sandiford@arm.com>
2001 * c-common.c (vector_types_compatible_elements_p): Use
2002 INTEGRAL_TYPE_P instead of checking only for INTEGER_TYPE.
2004 2018-10-04 Vinay Kumar <vinay.kumar@blackfigtech.com>
2006 * c-attribs.c (get_priority): Add a warning flag warn_prio_ctor_dtor
2007 to generate constructor destructor priority warning.
2008 * c.opt (-Wprio-ctor-dtor): New option.
2010 2018-10-01 Jason Merrill <jason@redhat.com>
2012 * c-lex.c (c_common_has_attribute): Add no_unique_address.
2014 2018-10-01 Eric Botcazou <ebotcazou@adacore.com>
2016 * c-ada-spec.c (get_underlying_decl): Get to the main type variant.
2017 (dump_ada_node): Add const keyword.
2019 2018-09-25 Martin Liska <mliska@suse.cz>
2021 * c-common.c (c_common_truthvalue_conversion):
2022 Remove Pascal from documentation.
2024 2018-09-21 Eric Botcazou <ebotcazou@adacore.com>
2026 * c-ada-spec.c: Include diagnostic.h.
2027 (dump_ada_declaration) <RECORD_TYPE>: Issue a warning on packed layout.
2029 2018-09-19 Marek Polacek <polacek@redhat.com>
2031 * c.opt (Wclass-conversion): New.
2033 2018-09-17 David Malcolm <dmalcolm@redhat.com>
2035 * c-format.c (range_label_for_format_type_mismatch::get_text):
2036 Update for new param.
2038 2018-09-17 David Malcolm <dmalcolm@redhat.com>
2040 * c-format.c (format_warning_at_char): Update for introduction of
2041 format_string_diagnostic_t.
2042 (format_type_warning): Likewise.
2044 2018-09-17 Martin Jambor <mjambor@suse.cz>
2047 * c.opt (Wabsolute-value): New.
2049 2018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
2051 * c-common.c (complete_flexible_array_elts): New helper function.
2052 * c-common.h (complete_flexible_array_elts): Declare.
2054 2018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
2056 * c-common.c (braced_list_to_string): Remove eval parameter.
2057 Add some more checks. Always create zero-terminated STRING_CST.
2058 * c-common.h (braced_list_to_string): Adjust prototype.
2060 2018-08-27 David Malcolm <dmalcolm@redhat.com>
2063 * c-common.c (c_cpp_error): Update for conversion of show_caret_p
2065 (maybe_suggest_missing_token_insertion): Likewise.
2066 (maybe_add_include_fixit): Add param "override_location". If set,
2067 and source-printing is enabled, then override the rich_location's
2068 primary location with that of the insertion point for the fix-it
2069 hint, marking it with SHOW_LINES_WITHOUT_RANGE.
2070 * c-common.h (extern void maybe_add_include_fixit): Add bool
2072 * c-format.c (selftest::test_type_mismatch_range_labels): Update
2073 for conversion of show_caret_p to a tri-state.
2074 * c-warn.c (warn_for_restrict): Likewise.
2076 (suggest_missing_header::~suggest_missing_header): Update call to
2077 maybe_add_include_fixit to suggest overriding the location, as it
2080 2018-08-27 Martin Liska <mliska@suse.cz>
2082 * c-common.c (check_function_restrict): Use new function
2083 fndecl_built_in_p and remove check for FUNCTION_DECL if
2085 (check_builtin_function_arguments): Likewise.
2086 (reject_gcc_builtin): Likewise.
2087 * c-warn.c (sizeof_pointer_memaccess_warning): Likewise.
2089 2018-08-26 Marek Polacek <polacek@redhat.com>
2091 PR c++/87029, Implement -Wredundant-move.
2092 * c.opt (Wredundant-move): New option.
2094 2018-08-21 Marek Polacek <polacek@redhat.com>
2096 PR c++/86981, Implement -Wpessimizing-move.
2097 * c.opt (Wpessimizing-move): New option.
2099 2018-08-20 David Malcolm <dmalcolm@redhat.com>
2102 * c-attribs.c (common_handle_aligned_attribute): Add
2103 auto_diagnostic_group instance.
2104 * c-indentation.c (warn_for_misleading_indentation): Likewise.
2105 * c-opts.c (c_common_post_options): Likewise.
2106 * c-warn.c (warn_logical_not_parentheses): Likewise.
2107 (warn_duplicated_cond_add_or_warn): Likewise.
2108 (warn_for_multistatement_macros): Likewise.
2110 2018-08-20 Nathan Sidwell <nathan@acm.org>
2112 * c-ada-spec.c (macro_length, dump_ada_macros): Adjust macro parm
2115 2018-08-17 Nathan Sidwell <nathan@acm.org>
2117 * c-cppbuiltin.c (struct lazy_hex_fp_value_struct): Remove macro
2119 (laxy_hex_fp_value_count): Make unsigned.
2120 (lazy_hex_fp_value): Provided with macro & lazy number. Directly
2121 manipulate the macro.
2122 (builtin_defin_with_hex_fp_value): Adjust callback name, use
2125 2018-08-17 David Malcolm <dmalcolm@redhat.com>
2127 * c-format.c (enum format_type): Add gcc_dump_printf_format_type.
2128 (gcc_dump_printf_length_specs): New.
2129 (gcc_dump_printf_flag_pairs): New.
2130 (gcc_dump_printf_flag_specs): New.
2131 (gcc_dump_printf_char_table): New.
2132 (format_types_orig): Add entry for "gcc_dump_printf".
2133 (init_dynamic_diag_info): Set up length_char_specs and
2134 conversion_specs for gcc_dump_printf_format_type.
2135 (handle_format_attribute): Handle gcc_dump_printf_format_type.
2137 2018-08-17 Nathan Sidwell <nathan@acm.org>
2139 * c-ada-spec.c (macro_length, dump_ada_macros): Constify.
2141 * c-ada-spec.c: Don't #include "cpp-id-data.h"
2142 * c-cppbuiltin.c: Likewise.
2144 2018-08-17 Martin Liska <mliska@suse.cz>
2146 * c.opt: Remove Warn, Init and Report for options with
2147 Ignore/Deprecated flag. Warning is done automatically for
2150 2018-08-16 David Malcolm <dmalcolm@redhat.com>
2153 * c-common.c (selftest::c_family_tests): Call
2154 selftest::c_indentation_c_tests.
2155 * c-common.h (selftest::c_indentation_c_tests): New decl.
2156 * c-indentation.c: Include "selftest.h".
2157 (next_tab_stop): Add "tab_width" param, rather than accessing
2159 (get_visual_column): Likewise. Clarify comment. Bulletproof
2160 against reading past the end of the line.
2161 (get_first_nws_vis_column): Add "tab_width" param.
2162 (detect_intervening_unindent): Likewise.
2163 (should_warn_for_misleading_indentation): Read tab width from
2164 cpp_opts and pass around.
2165 (selftest::test_next_tab_stop): New test.
2166 (selftest::assert_get_visual_column_succeeds): New function.
2167 (ASSERT_GET_VISUAL_COLUMN_SUCCEEDS): New macro.
2168 (selftest::assert_get_visual_column_fails): New function.
2169 (ASSERT_GET_VISUAL_COLUMN_FAILS): New macro.
2170 (selftest::test_get_visual_column): New test.
2171 (selftest::c_indentation_c_tests): New function.
2173 2018-08-16 Nathan Sidwell <nathan@acm.org>
2175 * c-ada-spec.c (count_ada_macro): Use cpp_user_macro_p.
2176 (store_ada_macro): Likewise.
2177 * c-ppoutput.c (cb_used_define, dump_macro): Likewise.
2178 * c-spellcheck.cc (should-suggest_as_macro_p): Likewise,
2180 2018-08-15 David Malcolm <dmalcolm@redhat.com>
2182 * c-format.c: Include "selftest-diagnostic.h" and
2183 "gcc-rich-location.h".
2184 (format_warning_at_char): Pass NULL for new label params of
2186 (class indirection_suffix): New class.
2187 (class range_label_for_format_type_mismatch): New class.
2188 (format_type_warning): Move logic for generating "*" suffix to
2189 class indirection_suffix. Create "fmt_label" and "param_label"
2190 to show their types, and pass them to the
2191 format_warning_at_substring calls.
2192 (selftest::test_type_mismatch_range_labels): New test.
2193 (selftest::c_format_c_tests): Call it.
2195 2018-08-13 Martin Sebor <msebor@redhat.com>
2197 PR tree-optimization/71625
2198 * c-common.c (braced_list_to_string): New function.
2199 * c-common.h (braced_list_to_string): Declare it.
2201 2018-08-08 Nathan Sidwell <nathan@acm.org>
2203 * c-common.c (try_to_locate_new_include_inertion_point): Use
2204 linemap_included_from_linemap.
2205 * c-lex.c (fe_file_change): Use linemap_included_from.
2206 * c-ppoutput.c (pp_file_change): Likewise.
2208 2018-08-01 Martin Sebor <msebor@redhat.com>
2210 PR tree-optimization/86650
2211 * c-format.c (gcc_tdiag_char_table): Update comment for "%G".
2212 (gcc_cdiag_char_table, gcc_cxxdiag_char_table): Same.
2213 (init_dynamic_diag_info): Update from "gcall *" to "gimple *".
2214 * c-format.h (T89_G): Update to be "gimple *" rather than
2216 (local_gcall_ptr_node): Rename...
2217 (local_gimple_ptr_node): ...to this.
2219 2018-07-31 David Malcolm <dmalcolm@redhat.com>
2221 * c-format.c (PP_FORMAT_CHAR_TABLE): New macro, based on existing
2222 table entries for gcc_diag_char_table, and the 'Z' entry from
2223 gcc_tdiag_char_table, changing the "chain" entry for 'Z' from
2224 &gcc_tdiag_char_table[0] to &gcc_diag_char_table[0].
2225 (gcc_diag_char_table): Use PP_FORMAT_CHAR_TABLE, implicitly
2226 adding missing "Z" for this table. Remove erroneous "G" and "K"
2228 (gcc_tdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
2229 (gcc_cdiag_char_table): Use PP_FORMAT_CHAR_TABLE.
2230 (gcc_cxxdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
2232 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
2234 * c-common.c (speculation_safe_resolve_call): New function.
2235 (speculation_safe_resolve_params): New function.
2236 (speculation_safe_resolve_return): New function.
2237 (resolve_overloaded_builtin): Handle __builtin_speculation_safe_value.
2238 * c-cppbuiltin.c (c_cpp_builtins): Add pre-define for
2239 __HAVE_SPECULATION_SAFE_VALUE.
2241 2018-07-20 David Malcolm <dmalcolm@redhat.com>
2243 * c-common.c (c_cpp_error): Remove redundant "line_table"
2244 parameter from call to rich_location::set_range.
2245 (maybe_suggest_missing_token_insertion): Likewise.
2247 2018-07-20 Martin Sebor <msebor@redhat.com>
2250 * c.opt (-Warray-bounds): Remove redundant -Wall.
2252 2018-07-20 Martin Sebor <msebor@redhat.com>
2255 * c-common.h (c_common_handle_option): Change function argument
2257 * c-opts.c (c_common_init_options): Same.
2258 (c_common_handle_option): Same. Remove special handling of
2259 OPT_Walloca_larger_than_ and OPT_Wvla_larger_than_.
2260 * c.opt (-Walloc-size-larger-than, -Walloca-larger-than): Change
2261 options to take a HOST_WIDE_INT argument and accept a byte-size
2263 (-Wvla-larger-than): Same.
2264 (-Wno-alloc-size-larger-than, -Wno-alloca-larger-than): New.
2265 (-Wno-vla-larger-than): Same.
2267 2018-07-12 Jakub Jelinek <jakub@redhat.com>
2269 * c-attribs.c (c_common_attribute_table): Add
2270 "omp declare target implicit" attribute.
2272 2018-07-12 Richard Biener <rguenther@suse.de>
2275 * c-attribs.c (handle_packed_attribute): Do not build a variant
2276 type with TYPE_PACKED, instead ignore the attribute if we may
2277 not apply to the original type.
2279 2018-07-10 Jakub Jelinek <jakub@redhat.com>
2282 * c-omp.c (c_omp_check_loop_iv_r, c_omp_check_loop_iv): Allow declv
2283 to contain TREE_LIST for both the original class iterator and the
2286 2018-07-07 Eric Botcazou <ebotcazou@adacore.com>
2288 * c-ada-spec.c (to_ada_name): Remove index parameter.
2289 (pp_ada_tree_identifier): Likewise.
2290 (dump_ada_macros): Adjust call to to_ada_name.
2291 (struct overloaded_name_hash): Delete.
2292 (struct overloaded_name_hasher): Likewise.
2293 (overloaded_names): Likewise.
2294 (compute_overloading_index): Likewise.
2295 (dump_ada_decl_name): Do not call compute_overloading_index and
2296 adjust calls to pp_ada_tree_identifier.
2297 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
2298 (dump_ada_import): Add spc parameter and switch to aspect syntax.
2299 (dump_ada_function_declaration): Adjust call to pp_ada_tree_identifier.
2300 (dump_ada_enum_type): Remove type and display_convention parameters.
2301 Adjust calls to pp_ada_tree_identifier.
2302 (dump_ada_node): Likewise and for dump_ada_structure.
2303 (dump_nested_type) <ENUMERAL_TYPE>: Adjust call to dump_ada_enum_type
2305 <RECORD_TYPE>: Adjust call to dump_ada_structure and switch to aspect
2307 (print_constructor): Adjust call to pp_ada_tree_identifier.
2308 (print_destructor): Likewise.
2309 (dump_ada_declaration): Switch to aspect syntax.
2310 (dump_ada_structure): Likewise and tidy up. Replace display_convention
2311 parameter with nested parameter.
2312 (dump_ads): Emit pragma Ada_2012 in lieu of pragma Ada_2005.
2313 (dump_ada_specs): Do not delete overloaded_names table.
2315 2018-07-06 Peter Bergner <bergner@linux.ibm.com>
2318 * c-attribs.c (handle_mode_attribute): Call translate_mode_attribute
2321 2018-07-05 Nathan Sidwell <nathan@acm.org>
2323 * c-lex.c (fe_file_change): Check SYSTEM_IMPLICIT_EXTERN_C not
2324 NO_IMPLICIT_EXTERN_C.
2326 2018-06-28 Martin Liska <mliska@suse.cz>
2328 * cppspec.c: Include opt-suggestions.h.
2330 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
2331 Thomas Schwinge <thomas@codesourcery.com>
2332 Cesar Philippidis <cesar@codesourcery.com>
2334 * c-pragma.h (enum pragma_omp_clause): Add
2335 PRAGMA_OACC_CLAUSE_{FINALIZE,IF_PRESENT}. Remove
2336 PRAGMA_OACC_CLAUSE_PRESENT_OR_{COPY,COPYIN,COPYOUT,CREATE}.
2338 2018-06-20 Jakub Jelinek <jakub@redhat.com>
2341 * c-common.c (check_nonnull_arg): Use fold_for_warn. Adjust obsolete
2344 2018-06-18 Martin Sebor <msebor@redhat.com>
2347 * c-warn.c (sizeof_pointer_memaccess_warning): Check for attribute
2350 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
2352 * c-common.c (c_common_truthvalue_conversion): Handle ABSU_EXPR.
2354 2018-06-13 Jason Merrill <jason@redhat.com>
2356 * c-opts.c (c_common_post_options): Warn about useless -Wabi.
2357 (c_common_handle_option) [OPT_Wabi_]: Remove flag_abi_compat_version
2360 PR c++/86094 - wrong code with defaulted move ctor.
2361 * c-opts.c (c_common_post_options): Bump the current ABI version to
2362 13. Set warn_abi_version and flag_abi_compat_version to the current
2363 version rather than 0. Fix defaulting flag_abi_compat_version from
2366 2018-06-12 Martin Sebor <msebor@redhat.com>
2369 * c-warn.c (sizeof_pointer_memaccess_warning): Avoid warning when
2370 sizeof source and destination yields the same value.
2372 2018-06-12 Martin Liska <mliska@suse.cz>
2374 * c.opt: Make MPX-related options as Deprecated.
2376 2018-06-08 David Malcolm <dmalcolm@redhat.com>
2378 * c-pretty-print.c (c_pretty_printer::statement): Use TDF_NONE
2381 2018-06-08 Martin Liska <mliska@suse.cz>
2383 * c-attribs.c (handle_bnd_variable_size_attribute): Remove support
2384 for MPX (macros, related functions, fields in cgraph_node, ...).
2385 (handle_bnd_legacy): Likewise.
2386 (handle_bnd_instrument): Likewise.
2389 2018-06-06 Jakub Jelinek <jakub@redhat.com>
2392 * c-cppbuiltin.c (c_cpp_builtins): Fix a typo, set
2393 __cpp_transactional_memory to 201500 instead of 210500.
2395 2018-06-06 Jason Merrill <jason@redhat.com>
2397 PR c++/85710 - ICE with -Wmemset-elt-size.
2398 * c-warn.c (warn_for_memset): Don't crash on incomplete element type.
2400 2018-06-01 Jason Merrill <jason@redhat.com>
2402 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_deduction_guides to
2405 2018-06-01 Eric Botcazou <ebotcazou@adacore.com>
2407 * c-ada-spec.c (dump_ada_declaration) <TYPE_DECL>: Generate a forward
2408 declaration for a typedef independently of whether the declaration of
2409 the subtype is generated.
2411 2018-05-31 Martin Sebor <msebor@redhat.com>
2414 * c.opt (-Wno-alloc-size-larger-than): New option.
2416 2018-04-22 David Pagan <dave.pagan@oracle.com>
2419 * c-opts.c (c_common_post_options): Set default for warn_return_type
2420 for C++/C++ with ObjC extensions only. For C, makes it possible to
2421 differentiate between default (no option), -Wreturn-type, and
2424 2018-05-29 Jason Merrill <jason@redhat.com>
2426 * c.opt (Winit-list-lifetime): New flag.
2428 2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
2430 * c-lex.c (get_fileinfo): Use splay_tree_compare_strings and
2431 splay_tree_delete_pointers.
2433 2018-05-26 Jakub Jelinek <jakub@redhat.com>
2436 * c-warn.c (diagnose_mismatched_attributes): Remove unnecessary
2437 noinline variable to workaround broken kernel headers.
2439 2018-05-18 Jason Merrill <jason@redhat.com>
2441 * c.opt (Wdeprecated-copy): New flag.
2443 2018-05-17 Martin Liska <mliska@suse.cz>
2445 * c-warn.c (overflow_warning): Do not use
2446 space in between 'G_' and '('.
2448 2018-05-09 Jason Merrill <jason@redhat.com>
2450 * c-common.c (valid_array_size_p): Add complain parameter.
2451 * c-common.h: ...which defaults to true.
2453 2018-05-11 Jakub Jelinek <jakub@redhat.com>
2456 * c-omp.c (c_omp_predetermined_sharing): Return
2457 OMP_CLAUSE_DEFAULT_SHARED for artificial vars with integral type.
2459 2018-05-11 Martin Liska <mliska@suse.cz>
2462 * c-attribs.c (handle_no_sanitize_attribute): Iterate all
2465 2018-05-10 Jakub Jelinek <jakub@redhat.com>
2468 * c-common.h (fold_offsetof_1): Removed.
2469 (fold_offsetof): Add TYPE argument defaulted to size_type_node and
2470 CTX argument defaulted to ERROR_MARK.
2471 * c-common.c (fold_offsetof_1): Renamed to ...
2472 (fold_offsetof): ... this. Remove wrapper function. Add TYPE
2473 argument, convert the pointer constant to TYPE and use size_binop
2474 with PLUS_EXPR instead of fold_build_pointer_plus if type is not
2475 a pointer type. Adjust recursive calls.
2477 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
2480 * c-attribs.c (handle_visibility_attribute): Do not set no_add_attrs.
2482 2018-05-07 Nathan Sidwell <nathan@acm.org>
2484 * c.opt (ffor-scope): Remove functionality, issue warning.
2486 2018-05-03 Nathan Sidwell <nathan@acm.org>
2488 * c.opt (ffriend-injection): Remove functionality, issue warning.
2490 2018-05-01 David Malcolm <dmalcolm@redhat.com>
2493 * c-format.c (struct format_check_results): Add field
2495 (check_format_info): Initialize it, and warn if encountered.
2496 (check_format_arg): Distinguish between wide char and
2497 everything else when detecting arrays of non-char.
2499 2018-04-30 David Malcolm <dmalcolm@redhat.com>
2501 * c-format.c (get_corrected_substring): Update for
2502 location_get_source_line returning a char_span. Use a char_span
2503 when handling the prefix of the correction.
2504 * c-indentation.c (get_visual_column): Update for
2505 location_get_source_line returning a char_span.
2506 (get_first_nws_vis_column): Likewise.
2508 2018-03-29 David Malcolm <dmalcolm@redhat.com>
2511 * known-headers.cc (get_stdlib_header_for_name): Add various names
2512 from <assert.h>, <string.h>, and <memory.h>; add more names from
2515 2018-03-27 Jakub Jelinek <jakub@redhat.com>
2518 * c-common.c (fold_offsetof_1) <case COMPOUND_EXPR>: Assert that
2519 get_base_address of the second operand is a VAR_P, rather than the
2520 operand itself, and use gcc_checking_assert instead of gcc_assert.
2522 2018-03-23 Marek Polacek <polacek@redhat.com>
2525 * c-pretty-print.c (c_pretty_printer::multiplicative_expression)
2526 <case RDIV_EXPR>: Tweak condition.
2528 2018-03-20 Eric Botcazou <ebotcazou@adacore.com>
2530 * c-ada-spec.c (pp_ada_tree_identifier): Deal specifically with _Bool.
2532 2018-03-16 Jakub Jelinek <jakub@redhat.com>
2535 * c-warn.c (conversion_warning): Replace "to to" with "to" in
2539 * c-warn.c (diagnose_mismatched_attributes): Remove trailing space from
2542 2018-03-16 Richard Biener <rguenther@suse.de>
2545 * c-gimplify.c (c_gimplify_expr): Revert previous change. Instead
2546 unshare the possibly folded expression.
2548 2018-03-15 Richard Biener <rguenther@suse.de>
2551 * c-gimplify.c (c_gimplify_expr): Do not fold expressions.
2553 2018-03-13 Martin Sebor <msebor@redhat.com>
2555 PR tree-optimization/84725
2556 * c-attribs.c (handle_nonstring_attribute): Allow attribute nonstring
2557 with all three narrow character types, including their qualified forms.
2559 2018-03-12 Martin Sebor <msebor@redhat.com>
2561 PR tree-optimization/83456
2562 * c-common.c (check_function_restrict): Return bool.
2563 Restore checking of bounded built-in functions.
2564 (check_function_arguments): Also return the result
2565 of warn_for_restrict.
2566 * c-common.c (check_function_restrict): Return bool.
2567 * c-warn.c (warn_for_restrict): Return bool.
2569 2018-03-02 Marek Polacek <polacek@redhat.com>
2572 * c-warn.c (warn_for_sign_compare): Bail out if any of the operands
2575 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
2577 * c-attribs.c (c_common_attribute_table): Remove "cilk simd
2580 2018-03-01 Marek Polacek <polacek@redhat.com>
2583 * c-attribs.c (common_handle_aligned_attribute): Don't use invalid
2584 alignment in computation.
2586 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
2588 * c-ada-spec.c (dump_ada_node) <NULLPTR_TYPE>: New case.
2589 <REAL_TYPE>: Deal specifically with _Float128/__float128.
2591 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
2593 * c-ada-spec.c (dump_ada_double_name) <ENUMERAL_TYPE>: New case.
2594 (is_char_array): Take a type instead of a declaration.
2595 (dump_ada_array_type): Likewise.
2596 (is_simple_enum): Minor tweak.
2597 (dump_ada_enum_type): New function extracted from...
2598 (dump_ada_node) <ENUMERAL_TYPE>: ...here. Invoke it.
2599 <INTEGER_TYPE>: Remove unreachable code.
2600 <RECORD_TYPE>: Likewise. Minor tweaks.
2601 (dump_nested_type) <ARRAY_TYPE>: Adjust to above changes.
2602 <ENUMERAL_TYPE>: New case.
2603 <RECORD_TYPE>: Factor out common code.
2604 (dump_ada_declaration) <ARRAY_TYPE>: Adjust to above changes.
2605 Minor tweaks. Deal with enumeral types.
2606 (dump_ada_structure): Minor tweaks.
2608 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
2610 * c-ada-spec.c (dump_ada_node) <POINTER_TYPE>: Do not use generic
2611 address for incomplete structures.
2612 (dump_forward_type): Do not bail out for incomplete structures.
2613 (dump_ada_declaration): Do not special-case incomplete structures
2614 for subtypes. Dump them as null records for types.
2616 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
2618 * c-ada-spec.c (dump_ada_import): Use boolean and fix formatting.
2619 (is_char_array): Fix formatting.
2620 (dump_template_types): Likewise.
2621 (dump_generic_ada_node): Rename into...
2622 (dump_ada_node): ...this.
2623 <POINTER_TYPE>: Remove superfluous space. Use generic address for
2624 incomplete structures and not for empty structures. Do not use it
2625 when forward declarations are needed.
2626 (dump_forward_type): New function.
2627 (dump_nested_types): Remove FORWARD parameter. Do not consider
2628 TREE_VISITED and do not generate a forward declaration. Only dump
2629 original nested types for nested declaration.
2630 (dump_nested_type) <POINTER_TYPE>: Call dump_forward_type.
2631 <ARRAY_TYPE>: Likewise if the component type is an anonymous pointer.
2632 <RECORD_TYPE>: Do not consider TREE_VISITED.
2633 (dump_ada_declaration): Use booleans and fix formatting throughout.
2634 <TYPE_DECL>: Skip incomplete structures and not empty structures.
2635 Call dump_forward_type instead of dump_nested_types for a typedef.
2636 Remove superfluous check and adjust call to dump_nested_types.
2637 <POINTER_TYPE>: Call dump_forward_type and fall through.
2638 (dump_ada_struct_decl): Rename into...
2639 (dump_ada_structure): ...this. Do not special-case empty structures.
2641 2018-02-27 Martin Sebor <msebor@redhat.com>
2644 * c.opt (-Wmissing-attributes): New option.
2646 2018-02-21 Martin Liska <mliska@suse.cz>
2648 * c.opt (Wcatch-value=): Add IntegerRange.
2650 2018-02-15 Jason Merrill <jason@redhat.com>
2652 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_deduction_guides.
2654 2018-02-09 Nathan Sidwell <nathan@acm.org>
2657 * c-common.h (strict_aliasing_warning): Drop OTYPE arg, insert LOC
2659 * c-warn.c (strict_aliasing_warning): Drop OTYPE arg, require LOC
2662 2018-02-09 Martin Sebor <msebor@redhat.com>
2665 * c.opt (-Wstringop-overflow, -Warray-bounds): Add LTO.
2666 (-Walloc-size-larger-than, -Wformat-truncation=): Same.
2667 (-Wmaybe-uninitialized, -Wnonnull, -Wrestrict): Same.
2668 (-Wstrict-overflow, -Wsuggest-attribute): Same.
2669 (-Wuninitialized): Same.
2671 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
2673 * c-ada-spec.c (dump_ada_declaration): Do not generate the 'constant'
2674 keyword for components.
2676 2018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
2678 * c-common.h (DECL_UNNAMED_BIT_FIELD): New.
2680 2018-02-02 Julia Koval <julia.koval@intel.com>
2682 * c-common.h (omp_clause_mask): Move to wide_int_bitmask.h.
2684 2018-01-29 Marek Polacek <polacek@redhat.com>
2687 * c-format.c (check_function_format): Check current_function_decl.
2689 2018-01-27 Jakub Jelinek <jakub@redhat.com>
2691 * c-cppbuiltin.c (c_cpp_builtins): Use ggc_strdup for the fp_suffix
2693 (LAZY_HEX_FP_VALUES_CNT): Define.
2694 (lazy_hex_fp_values): Allow up to LAZY_HEX_FP_VALUES_CNT lazy hex fp
2695 values rather than just 12.
2696 (builtin_define_with_hex_fp_value): Likewise.
2698 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
2701 * c.opt (-fmacro-prefix-map): New option.
2702 * c-opts.c (c_common_handle_option): Handle it.
2703 * c-lex.c (init_c_lex): Set remap_filename cpp callback.
2704 * c-ppoutput.c (init_pp_output): Likewise.
2706 2018-01-17 David Malcolm <dmalcolm@redhat.com>
2709 * c-common.c (fold_for_warn): Move to c/c-fold.c and cp/expr.c.
2711 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
2713 * c-ada-spec.c (dump_number): Add FLOAT_P parameter.
2714 Skip 'f' and 'F' characters if it is true.
2715 (store_ada_macro): Minor tweak.
2716 (dump_ada_macros) <CPP_COMMENT>: Likewise.
2717 <CPP_WSTRING>: Likewise.
2718 <CPP_STRING>: Output '&' in the buffer if not the first string.
2719 <CPP_NUMBER>: Adjust calls to dump_number.
2721 2018-01-10 David Malcolm <dmalcolm@redhat.com>
2724 * c-common.c: Include "selftest.h".
2725 (get_atomic_generic_size): Perform the test for integral type
2726 before the range test for any integer constant, fixing indentation
2727 of braces. Call fold_for_warn before testing for an INTEGER_CST.
2728 (reject_gcc_builtin): Strip any location wrapper from EXPR.
2729 (selftest::test_fold_for_warn): New function.
2730 (selftest::c_common_c_tests): New function.
2731 (selftest::c_family_tests): Call it, and
2732 selftest::c_pretty_print_c_tests.
2733 * c-common.h (selftest::c_pretty_print_c_tests): New decl.
2734 * c-format.c (check_format_arg): Convert VAR_P check to a
2736 * c-pretty-print.c: Include "selftest.h".
2737 (pp_c_cast_expression): Don't print casts for location wrappers.
2738 (selftest::assert_c_pretty_printer_output): New function.
2739 (ASSERT_C_PRETTY_PRINTER_OUTPUT): New macro.
2740 (selftest::test_location_wrappers): New function.
2741 (selftest::c_pretty_print_c_tests): New function.
2742 * c-warn.c (warn_for_memset): Call fold_for_warn on the arguments.
2744 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
2745 Alan Hayward <alan.hayward@arm.com>
2746 David Sherwood <david.sherwood@arm.com>
2748 * c-common.c (c_common_type_for_mode): Handle MODE_VECTOR_BOOL.
2750 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
2751 Alan Hayward <alan.hayward@arm.com>
2752 David Sherwood <david.sherwood@arm.com>
2754 * c-ubsan.c (ubsan_instrument_shift): Treat GET_MODE_BITSIZE
2757 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
2758 Alan Hayward <alan.hayward@arm.com>
2759 David Sherwood <david.sherwood@arm.com>
2761 * c-common.c (vector_types_convertible_p, c_build_vec_perm_expr)
2762 (convert_vector_to_array_for_subscript): Handle polynomial
2763 TYPE_VECTOR_SUBPARTS.
2764 (c_common_type_for_mode): Check valid_vector_subparts_p.
2765 * c-pretty-print.c (pp_c_initializer_list): Handle polynomial
2768 2018-01-03 Jakub Jelinek <jakub@redhat.com>
2770 Update copyright years.
2772 2017-12-22 Mike Stump <mikestump@comcast.net>
2773 Eric Botcazou <ebotcazou@adacore.com>
2775 * c-pragma.c (init_pragma): Register pragma GCC unroll.
2776 * c-pragma.h (enum pragma_kind): Add PRAGMA_UNROLL.
2778 2017-12-22 Alexandre Oliva <aoliva@redhat.com>
2782 * c-semantics.c (only_debug_stmts_after_p): New.
2783 (pop_stmt_list): Clear side effects in debug-only stmt list.
2784 Check for single nondebug stmt followed by debug stmts only.
2786 2017-12-21 Alexandre Oliva <aoliva@redhat.com>
2789 * c-semantics.c (pop_stmt_list): Propagate side effects from
2790 single nondebug stmt to container list.
2792 2017-12-19 Jakub Jelinek <jakub@redhat.com>
2794 * known-headers.cc (get_stdlib_header_for_name): Replace Yoda
2795 conditions with typical order conditions.
2797 2017-12-18 Marek Polacek <polacek@redhat.com>
2799 * c-warn.c (warn_logical_operator): Return early if -Wlogical-op is
2802 2017-12-17 Martin Sebor <msebor@redhat.com>
2804 * c-attribs.c (common_handle_aligned_attribute): Avoid issuing
2805 an error for attribute warn_if_not_aligned.
2807 2017-12-16 Martin Sebor <msebor@redhat.com>
2809 PR tree-optimization/78918
2810 * c-common.c (check_function_restrict): Avoid checking built-ins.
2811 * c.opt (-Wrestrict): Include in -Wall.
2813 2017-12-15 Jakub Jelinek <jakub@redhat.com>
2815 * c-attribs.c (c_common_attribute_table,
2816 c_common_format_attribute_table): Swap affects_type_identity
2817 and handler fields, adjust comments.
2819 2017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
2821 * c.opt (Wcast-function-type): New warning option.
2822 * c-lex.c (get_fileinfo): Avoid warning.
2823 * c-ppoutput.c (scan_translation_unit_directives_only): Remove cast.
2825 2017-12-14 Qing Zhao <qing.zhao@oracle.com>
2828 * c-cppbuiltin.c (builtin_define_with_hex_fp_value):
2829 Adjust the size of buf1 and buf2, add a new buf to avoid
2830 format-overflow warning.
2832 2017-12-12 Alexandre Oliva <aoliva@redhat.com>
2834 * c-semantics.c (pop_stmt_list): Move begin stmt marker into
2835 subsequent statement list.
2837 2017-12-07 Martin Sebor <msebor@redhat.com>
2841 * c-attribs.c (attr_aligned_exclusions): New array.
2842 (attr_alloc_exclusions, attr_cold_hot_exclusions): Same.
2843 (attr_common_exclusions, attr_const_pure_exclusions): Same.
2844 (attr_gnu_inline_exclusions, attr_inline_exclusions): Same.
2845 (attr_noreturn_exclusions, attr_returns_twice_exclusions): Same.
2846 (attr_warn_unused_result_exclusions): Same.
2847 (handle_hot_attribute, handle_cold_attribute): Simplify.
2848 (handle_const_attribute): Warn on function returning void.
2849 (handle_pure_attribute): Same.
2850 (handle_aligned_attribute): Diagnose conflicting attribute
2852 * c-warn.c (diagnose_mismatched_attributes): Simplify.
2854 2017-12-06 David Malcolm <dmalcolm@redhat.com>
2857 * c-common.c (selftest::c_family_tests): Call
2858 selftest::c_spellcheck_cc_tests.
2859 * c-common.h (selftest::c_spellcheck_cc_tests): New decl.
2860 * c-spellcheck.cc: Include "selftest.h".
2861 (name_reserved_for_implementation_p): New function.
2862 (should_suggest_as_macro_p): New function.
2863 (find_closest_macro_cpp_cb): Move the check for NT_MACRO to
2864 should_suggest_as_macro_p and call it.
2865 (selftest::test_name_reserved_for_implementation_p): New function.
2866 (selftest::c_spellcheck_cc_tests): New function.
2867 * c-spellcheck.h (name_reserved_for_implementation_p): New decl.
2869 2017-12-06 David Malcolm <dmalcolm@redhat.com>
2871 * c-spellcheck.cc: New file, taken from macro-handling code in
2873 * c-spellcheck.h: New file, taken from macro-handling code in
2876 2017-12-01 Jakub Jelinek <jakub@redhat.com>
2878 * c-attribs.c (c_common_attribute_table): Remove "cilk simd function"
2880 (handle_simd_attribute): Don't check for "cilk simd function"
2881 attribute. Reindent, formatting changes.
2883 2017-11-30 Julia Koval <julia.koval@intel.com>
2885 * c-common.h (inv_list): Remove.
2887 2017-11-28 Jakub Jelinek <jakub@redhat.com>
2890 * c-common.c (c_switch_covers_all_cases_p_1,
2891 c_switch_covers_all_cases_p): New functions.
2892 * c-common.h (c_switch_covers_all_cases_p): Declare.
2894 2017-11-28 Julia Koval <julia.koval@intel.com>
2895 Sebastian Peryt <sebastian.peryt@intel.com>
2897 * array-notation-common.c: Delete.
2898 * c-cilkplus.c: Ditto.
2899 * c-common.c (_Cilk_spawn, _Cilk_sync, _Cilk_for): Remove.
2900 * c-common.def (ARRAY_NOTATION_REF): Remove.
2901 * c-common.h (RID_CILK_SPAWN, build_array_notation_expr,
2902 build_array_notation_ref, C_ORT_CILK, c_check_cilk_loop,
2903 c_validate_cilk_plus_loop, cilkplus_an_parts,
2904 cilk_ignorable_spawn_rhs_op,
2905 cilk_recognize_spawn): Remove.
2906 * c-gimplify.c (CILK_SPAWN_STMT): Remove.
2907 * c-omp.c: Remove CILK_SIMD check.
2908 * c-pragma.c: Ditto.
2909 * c-pragma.h: Remove CILK related pragmas.
2910 * c-pretty-print.c (c_pretty_printer::postfix_expression): Remove
2911 ARRAY_NOTATION_REF condition.
2912 (c_pretty_printer::expression): Ditto.
2913 * c.opt (fcilkplus): Remove.
2916 2017-11-21 Marc Glisse <marc.glisse@inria.fr>
2918 * c-pretty-print.c (pp_c_additive_expression,
2919 c_pretty_printer::expression): Handle POINTER_DIFF_EXPR.
2921 2017-11-21 Jakub Jelinek <jakub@redhat.com>
2923 * c-common.c (get_nonnull_operand): Use tree_to_uhwi.
2926 * c-common.c (get_atomic_generic_size): Use TREE_INT_CST_LOW
2927 instead of tree_to_uhwi, formatting fix.
2929 2017-11-20 David Malcolm <dmalcolm@redhat.com>
2932 * known-headers.cc: New file, based on material from c/c-decl.c.
2933 (suggest_missing_header): Copied as-is.
2934 (get_stdlib_header_for_name): New, based on get_c_name_hint but
2935 heavily edited to add C++ support. Add some knowledge about
2936 <limits.h>, <stdint.h>, and <wchar.h>.
2937 * known-headers.h: Likewise.
2939 2017-11-20 David Malcolm <dmalcolm@redhat.com>
2941 * c-common.h (enum lookup_name_fuzzy_kind): Move to name-hint.h.
2942 (lookup_name_fuzzy): Likewise. Convert return type from
2943 const char * to name_hint. Add location_t param.
2944 * name-hint.h: New header.
2946 2017-11-19 Jakub Jelinek <jakub@redhat.com>
2950 * c-common.h (c_fully_fold): Add LVAL argument defaulted to false.
2952 2017-11-16 Joseph Myers <joseph@codesourcery.com>
2954 * c.opt (-std=c17, std=gnu17, -std=iso9899:2017): Refer to 2018
2955 expected publication date of C17.
2956 (-std=c18, -std=gnu18, -std=iso9899:2018): New option aliases.
2958 2017-11-15 Joseph Myers <joseph@codesourcery.com>
2961 * c-common.c (c_common_reswords): Add __builtin_tgmath.
2962 * c-common.h (enum rid): Add RID_BUILTIN_TGMATH.
2964 2017-11-10 Martin Sebor <msebor@redhat.com>
2967 * c-common.c (catenate_strings): Use memcpy instead of strncpy.
2968 * c-warn.c (sizeof_pointer_memaccess_warning): Handle arrays.
2969 * c.opt (-Wstringop-truncation): New option.
2971 2017-11-06 Martin Liska <mliska@suse.cz>
2974 * c-opts.c (c_common_post_options): Set -Wreturn-type for C++
2976 * c.opt: Set default value of warn_return_type.
2978 2017-10-31 David Malcolm <dmalcolm@redhat.com>
2980 * c-common.c (binary_op_error): Update for renaming of
2982 (c_parse_error): Likewise.
2983 * c-warn.c (warn_logical_not_parentheses): Likewise for
2984 renaming of inform_at_rich_loc.
2985 (warn_for_restrict): Likewise for renaming of
2986 warning_at_rich_loc_n.
2988 2017-10-30 Joseph Myers <joseph@codesourcery.com>
2990 * c.opt (std=c17, std=gnu17, std=iso9899:2017): New options.
2991 * c-opts.c (set_std_c17): New function.
2992 (c_common_init_options): Use gnu17 as default C version.
2993 (c_common_handle_option): Handle -std=c17 and -std=gnu17.
2995 2017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
2997 * c-cppbuiltin.c (mode_has_fma): Add support for PowerPC KFmode.
2998 (c_cpp_builtins): If a machine has a fast fma _Float<N> and
2999 _Float<N>X variant, define __FP_FAST_FMA<N> and/or
3002 2017-10-23 Marek Polacek <polacek@redhat.com>
3005 * c-warn.c (warnings_for_convert_and_check): Fix typos.
3007 2017-10-19 Eric Botcazou <ebotcazou@adacore.com>
3009 * c-common.c (check_builtin_function_arguments): Also check arguments
3010 of __builtin_alloca_with_align_and_max.
3012 2017-10-17 David Malcolm <dmalcolm@redhat.com>
3014 * c-format.c (format_warning_at_char): Pass UNKNOWN_LOCATION
3015 rather than NULL to format_warning_va.
3016 (check_format_types): Likewise when calling format_type_warning.
3017 Remove code to extract source_ranges and source_range * in favor
3018 of just a location_t.
3019 (format_type_warning): Convert source_range * param to a
3022 2017-10-13 Jakub Jelinek <jakub@redhat.com>
3024 * c-gimplify.c (c_gimplify_expr): Handle [LR]ROTATE_EXPR like
3027 2017-10-12 David Malcolm <dmalcolm@redhat.com>
3029 * c-common.c (enum missing_token_insertion_kind): New enum.
3030 (get_missing_token_insertion_kind): New function.
3031 (maybe_suggest_missing_token_insertion): New function.
3032 * c-common.h (maybe_suggest_missing_token_insertion): New decl.
3034 2017-10-11 Nathan Sidwell <nathan@acm.org>
3036 * c-opts.c (add_prefixed_path): Change chain to incpath_kind.
3037 (c_common_handle_option): Update incpath_kind names.
3039 2017-10-11 Martin Liska <mliska@suse.cz>
3042 * c-attribs.c (handle_no_sanitize_attribute): Report directly
3043 Wattributes warning.
3045 2017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
3047 * c-ada-spec.c (dump_generic_ada_node): Use wi::to_wide when
3048 operating on trees as wide_ints.
3049 * c-common.c (pointer_int_sum): Likewise.
3050 * c-pretty-print.c (pp_c_integer_constant): Likewise.
3051 * c-warn.c (match_case_to_enum_1): Likewise.
3052 (c_do_switch_warnings): Likewise.
3053 (maybe_warn_shift_overflow): Likewise.
3055 2017-10-10 Jakub Jelinek <jakub@redhat.com>
3058 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_wide
3059 instead of wide_int::from.
3061 2017-10-06 Jakub Jelinek <jakub@redhat.com>
3064 * c-warn.c (warn_tautological_bitwise_comparison): Instead of
3065 using to_widest use wide_int with the larger of the two precisions.
3067 2017-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
3069 * c-pretty-print.c (pp_c_parameter_type_list): Print ... for variadic
3072 2017-10-02 Richard Sandiford <richard.sandiford@linaro.org>
3074 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_widest
3075 when combining the original unconverted comparison operands.
3077 2017-09-29 Jakub Jelinek <jakub@redhat.com>
3079 * c-attribs.c (handle_noipa_attribute): Don't add "stack_protect"
3082 2017-09-29 Eric Botcazou <ebotcazou@adacore.com>
3084 * c-ada-spec.c (to_ada_name): Add index parameter.
3085 (pp_ada_tree_identifier): Likewise.
3086 (dump_ada_macros): Adjust call to to_ada_name.
3087 (struct overloaded_name_hash): New type.
3088 (struct overloaded_name_hasher): Likewise.
3089 (overloaded_names): New hash table.
3090 (compute_overloading_index): New function.
3091 (dump_ada_decl_name): Call it and pass the result to
3092 pp_ada_tree_identifier.
3093 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
3094 (dump_ada_function_declaration): Likewise.
3095 (dump_generic_ada_node): Likewise.
3096 (print_constructor): Likewise.
3097 (print_destructor): Likewise.
3098 (dump_ada_specs): Delete overloaded_names table.
3100 2017-09-29 Eric Botcazou <ebotcazou@adacore.com>
3102 * c-ada-spec.c (max_ada_macros): Move around.
3103 (store_ada_macro_index): Likewise.
3104 (source_file): Rename into...
3105 (macro_source_file): ...this.
3106 (count_ada_macro): Move around.
3107 (store_ada_macro): Likewise.
3108 (compare_macro): Likewise.
3109 (print_ada_macros): Merge in...
3110 (dump_ada_macros): ...this.
3111 (source_file_base): Rename into...
3112 (current_source_file): ...this.
3113 (print_comment): Move around.
3114 (dump_ada_nodes): Call dump_ada_declaration directly.
3115 (struct with): Change type of limited field to bool.
3116 (append_withs): Change type of limited_access parameter to bool.
3117 (pp_ada_tree_identifie): Likewise.
3118 (dump_ada_decl_nam): Likewise.
3119 (dump_generic_ada_node): Likewise. Do not print the return type.
3120 (to_ada_name): Change type of space_found parameter to bool.
3121 (dump_ada_function_declaration): Return void and change type of
3122 parameters to bool. Also print the return type for a function.
3123 (print_ada_methods): Rename into...
3124 (dump_ada_methods): ...this.
3125 (print_ada_declaration): Rename into ...
3126 (dump_ada_declaration): ...this. Do not print the return type.
3127 (print_ada_struct_decl): Rename into...
3128 (dump_ada_struct_decl): ...this.
3130 2017-09-29 Jakub Jelinek <jakub@redhat.com>
3132 * c-attribs.c (handle_packed_attribute): Test DECL_C_BIT_FIELD
3133 rather than DECL_INITIAL.
3134 (common_handle_aligned_attribute): Likewise.
3136 2017-09-20 Alexandre Oliva <aoliva@redhat.com>
3138 * c.opt (gen-decls): Add RejectNegative.
3140 2017-09-15 Andrew Sutton <andrew.n.sutton@gmail.com>
3141 Jakub Jelinek <jakub@redhat.com>
3143 Add support for -std=c++2a.
3144 * c-common.h (cxx_dialect): Add cxx2a as a dialect.
3145 * opt.c: Add options for -std=c++2a and -std=gnu++2a.
3146 * c-opts.c (set_std_cxx2a): New.
3147 (c_common_handle_option): Set options when -std=c++2a is enabled.
3148 (c_common_post_options): Adjust comments.
3149 (set_std_cxx14, set_std_cxx17): Likewise.
3151 2017-09-15 Eric Botcazou <ebotcazou@adacore.com>
3153 * c-pragma.c (handle_pragma_scalar_storage_order): Expand on error
3154 message for non-uniform endianness and issue a warning in C++.
3156 2017-09-15 Jakub Jelinek <jakub@redhat.com>
3158 * c.opt (Wc++1z-compat): Change from option to undocumented alias.
3159 (Wc++17-compat): Change from undocumented alias to option.
3160 (Wnoexcept-type): Enable by Wc++17-compat instead of Wc++1z-compat,
3161 change C++1z to C++17 in description.
3162 (std=c++1z, std=gnu++1z): Change from option to undocumented
3164 (std=c++17, std=gnu++17): Change from undocumented alias to option.
3166 * c-common.h (enum cxx_dialect): Rename cxx1z to cxx17.
3167 * c-opts.c (set_std_cxx1z): Rename to ...
3168 (set_std_cxx17): ... this.
3169 (c_common_handle_option): Rename OPT_std_c__1z to OPT_std_c__17
3170 and OPT_std_gnu__1z to OPT_std_gnu__17. Adjust set_std_cxx1z
3172 (c_common_post_options): Use cxx17 instead of cxx1z. Adjust
3175 2017-09-12 H.J. Lu <hongjiu.lu@intel.com>
3177 * c-attribs.c (common_handle_aligned_attribute): Don't warn
3178 function alignment if warn_if_not_aligned_p is true.
3180 2017-09-12 Nathan Sidwell <nathan@acm.org>
3182 * c-common.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
3183 resort_sorted_fields): Move to c/c-decl.c.
3184 * c-common.h (field_decl_cmp, resort_sorted_fields): Delete.
3185 (struct sorted_fields_type): Move to c/c-lang.h.
3187 2017-09-09 Jonathan Wakely <jwakely@redhat.com>
3190 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_threadsafe_static_init.
3192 2017-09-04 Marek Polacek <polacek@redhat.com>
3195 * c-warn.c (warn_tautological_bitwise_comparison): New function.
3196 (warn_tautological_cmp): Call it.
3198 2017-09-01 Boris Kolpackov <boris@codesynthesis.com>
3200 * c-opts.c (c_common_finish): Write dependency information even if
3203 2017-09-01 Jakub Jelinek <jakub@redhat.com>
3206 * c-pragma.c (omp_pragmas): Move "ordered" entry from here to ...
3207 (omp_pragmas_simd): ... here.
3208 * c-omp.c (c_finish_omp_ordered): If clauses isn't simd clause alone,
3209 create new clauses list containing just simd clause.
3211 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
3212 Alan Hayward <alan.hayward@arm.com>
3213 David Sherwood <david.sherwood@arm.com>
3215 * c-attribs.c (vector_mode_valid_p) Fold GET_MODE_INNER call
3216 into scalar_mode_supported_p call.
3217 (handle_mode_attribute): Update call to scalar_mode_supported_p.
3219 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
3220 Alan Hayward <alan.hayward@arm.com>
3221 David Sherwood <david.sherwood@arm.com>
3223 * c-common.c (c_common_fixed_point_type_for_size): Use opt_scalar_mode
3224 for the mode iterator.
3226 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
3227 Alan Hayward <alan.hayward@arm.com>
3228 David Sherwood <david.sherwood@arm.com>
3230 * c-lex.c (interpret_fixed): Use SCALAR_TYPE_MODE.
3231 * c-common.c (c_build_vec_perm_expr): Likewise.
3233 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
3234 Alan Hayward <alan.hayward@arm.com>
3235 David Sherwood <david.sherwood@arm.com>
3237 * c-common.c (c_common_type_for_mode): Use as_a <scalar_int_mode>.
3239 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
3240 Alan Hayward <alan.hayward@arm.com>
3241 David Sherwood <david.sherwood@arm.com>
3243 * c-attribs.c (handle_mode_attribute): Check for a scalar_int_mode
3244 before calling targetm.addr_space.valid_pointer_mode.
3246 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
3247 Alan Hayward <alan.hayward@arm.com>
3248 David Sherwood <david.sherwood@arm.com>
3250 * c-cppbuiltin.c (c_cpp_builtins): Use opt_scalar_float_mode.
3252 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
3253 Alan Hayward <alan.hayward@arm.com>
3254 David Sherwood <david.sherwood@arm.com>
3256 * c-common.c (c_common_fixed_point_type_for_size): Use new mode
3258 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
3260 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
3261 Alan Hayward <alan.hayward@arm.com>
3262 David Sherwood <david.sherwood@arm.com>
3264 * c-cppbuiltin.c (mode_has_fma): Prefix mode names with E_ in
3267 2017-08-29 Martin Liska <mliska@suse.cz>
3270 * c-common.c (parse_optimize_options): Add argument to function
3272 * c-pragma.c (handle_pragma_diagnostic): Likewise.
3274 2017-08-24 David Malcolm <dmalcolm@redhat.com>
3276 * c-lex.c (interpret_float): Use token location
3277 when building an EXCESS_PRECISION_EXPR.
3279 2017-08-21 David Malcolm <dmalcolm@redhat.com>
3281 * c-common.c (check_function_arguments): Add "arglogs" param; pass
3282 it to check_function_format.
3283 * c-common.h (check_function_arguments): Add vec<location_t> *
3285 (check_function_format): Likewise.
3286 * c-format.c (struct format_check_context): Add field "arglocs".
3287 (check_function_format): Add param "arglocs"; pass it to
3289 (check_format_info): Add param "arglocs"; use it to initialize
3290 new field of format_ctx.
3291 (check_format_arg): Pass format_ctx->arglocs to new param of
3292 check_format_info_main.
3293 (class argument_parser): New field "arglocs".
3294 (argument_parser::argument_parser): Add "arglocs_" param and use
3295 it to initialize new field.
3296 (argument_parser::check_argument_type): Pass new arglocs field to
3298 (check_format_info_main): Add param "arglocs", and use it when
3299 constructing arg_parser.
3300 (check_format_types): Add param "arglocs"; use it if non-NULL when
3301 !EXPR_HAS_LOCATION (cur_param) to get at location information.
3303 2017-08-18 H.J. Lu <hongjiu.lu@intel.com>
3306 * c-attribs.c (handle_warn_if_not_aligned_attribute): New.
3307 (c_common_attribute_table): Add warn_if_not_aligned.
3308 (handle_aligned_attribute): Renamed to ...
3309 (common_handle_aligned_attribute): Remove argument, name, and add
3310 argument, warn_if_not_aligned. Handle warn_if_not_aligned.
3311 (handle_aligned_attribute): New.
3312 * c.opt: Add -Wif-not-aligned and -Wpacked-not-aligned.
3314 2017-08-14 Martin Sebor <msebor@redhat.com>
3317 * c-attribs.c (c_common_attribute_table): Add nonstring entry.
3318 (handle_nonstring_attribute): New function.
3320 2017-08-14 Martin Sebor <msebor@redhat.com>
3323 * c-format.h (T89_G): New macro.
3324 * c-format.c (local_gcall_ptr_node): New variable.
3325 (init_dynamic_diag_info): Initialize it.
3327 2017-08-11 Martin Liska <mliska@suse.cz>
3329 * c-opts.c (c_common_post_options): Replace ASM_OUTPUT_DEF with
3330 TARGET_SUPPORTS_ALIASES.
3332 2017-08-10 David Malcolm <dmalcolm@redhat.com>
3334 * c-common.c (c_parse_error): Add rich_location * param, using it
3335 rather implicitly using input_location.
3336 * c-common.h (c_parse_error): Add rich_location * param.
3338 2017-08-09 Marek Polacek <polacek@redhat.com>
3340 * c-common.c (pointer_int_sum): Use true/false instead of 1/0.
3341 (c_common_truthvalue_conversion): Likewise.
3342 * c-omp.c (c_finish_omp_atomic): Likewise.
3343 * c-common.h (build_binary_op): Update declaration.
3345 2017-08-08 Martin Liska <mliska@suse.cz>
3347 * c-ada-spec.c: Include header files.
3348 * c-ubsan.c: Likewise.
3349 * c-warn.c: Likewise.
3351 2017-08-07 Jakub Jelinek <jakub@redhat.com>
3354 * c-omp.c (c_finish_omp_atomic): Handle atomics on bitfields.
3356 2017-08-07 Eric Botcazou <ebotcazou@adacore.com>
3358 * c-ada-spec.c (has_nontrivial_methods): Test for FUNCTION_DECL.
3359 (print_ada_methods): Likewise.
3360 (print_ada_declaration): Likewise.
3362 2017-08-07 Martin Liska <mliska@suse.cz>
3364 * array-notation-common.c: Add new includes.
3365 * c-format.c( handle_format_attribute): Canonicalize a format
3367 * c-lex.c (c_common_has_attribute): Canonicalize name of an
3369 * c-pretty-print.c: Add new include.
3371 2017-08-05 Eric Botcazou <ebotcazou@adacore.com>
3373 * c-ada-spec.c (has_static_fields): Look only into variables.
3374 (print_constructor): Add TYPE parameter and use it for the name.
3375 (print_destructor): Likewise.
3376 (print_ada_declaration): Adjust to new constructor/destructor names.
3377 Adjust calls to print_constructor and print_destructor.
3378 (print_ada_struct_decl): Do not test TREE_STATIC on FIELD_DECL.
3379 Look only into variables in the final loop.
3381 2017-08-01 Eric Botcazou <ebotcazou@adacore.com>
3383 * c-ada-spec.c (has_static_fields): Look only into fields.
3384 (dump_generic_ada_node): Small tweak.
3385 (dump_nested_types): Look only into fields.
3386 (print_ada_declaration): Look only into methods. Small tweak.
3387 (print_ada_struct_decl): Look only into fields. Use DECL_VIRTUAL_P.
3389 2017-08-01 Eric Botcazou <ebotcazou@adacore.com>
3391 * c-ada-spec.c (print_generic_ada_decl): Pass correctly-typed constant.
3392 (dump_ada_function_declaration): Likewise.
3393 (dump_generic_ada_node): Likewise.
3394 (print_ada_declaration): Add support for const-qualified variables.
3396 2017-07-31 Martin Liska <mliska@suse.cz>
3399 * c-ubsan.c (ubsan_maybe_instrument_array_ref):
3400 Guard condition with flag_sanitize_p also with current_function_decl
3402 (ubsan_maybe_instrument_reference_or_call): Likewise.
3404 2017-07-30 Uros Bizjak <ubizjak@gmail.com>
3406 * c-format.c (asm_fprintf_char_table): Add 'z' to format_chars.
3408 2017-07-29 Eric Botcazou <ebotcazou@adacore.com>
3410 * c-ada-spec.c (dump_generic_ada_node): Take into account signedness
3412 (print_ada_declaration): Add missing guard for record types.
3414 2017-07-27 Jakub Jelinek <jakub@redhat.com>
3417 * c-omp.c (c_finish_omp_for): If the condition is wrapped in
3418 rhs of COMPOUND_EXPR(s), skip them and readd their lhs into
3419 new COMPOUND_EXPRs around the rhs of the comparison.
3421 2017-07-27 Marek Polacek <polacek@redhat.com>
3424 * c-warn.c (warn_for_sign_compare): Tweak the warning message. Print
3427 2017-07-27 Jakub Jelinek <jakub@redhat.com>
3429 * c-attribs.c (c_common_attribute_table): Add noipa attribute.
3430 (handle_noipa_attribute): New function.
3432 2017-07-07 Torsten Duwe <duwe@suse.de>
3434 * c-attribs.c (c_common_attribute_table): Add entry for
3435 "patchable_function_entry".
3437 2017-07-20 Nathan Sidwell <nathan@acm.org>
3439 Remove TYPE_METHODS.
3440 * c-ada-spec.c (is_tagged_type, has_nontrivial_methods,
3441 dump_ada_template, print_ada_methods,
3442 print_ada_declaration): Member fns are on TYPE_FIELDS.
3444 2017-07-18 Nathan Sidwell <nathan@acm.org>
3446 * c-warn.c (warn_for_memset): Use TYPE_{MIN,MAX}_VALUE.
3448 2017-07-14 David Malcolm <dmalcolm@redhat.com>
3450 * c-common.c (try_to_locate_new_include_insertion_point): New
3452 (per_file_includes_t): New typedef.
3453 (added_includes_t): New typedef.
3454 (added_includes): New variable.
3455 (maybe_add_include_fixit): New function.
3456 * c-common.h (maybe_add_include_fixit): New decl.
3458 2017-07-10 Martin Sebor <msebor@redhat.com>
3461 * c.opt (-Wstringop-overflow): Set defaults in LangEnabledBy.
3463 2017-07-06 David Malcolm <dmalcolm@redhat.com>
3465 * c-common.c (selftest::c_family_tests): New.
3466 * c-common.h (selftest::run_c_tests): Move decl to c/c-lang.h.
3467 (selftest::c_family_tests): New decl.
3469 2017-07-04 Marek Polacek <polacek@redhat.com>
3472 * c-common.c (sync_resolve_size): Give error for pointers to incomplete
3475 2017-07-04 Marek Polacek <polacek@redhat.com>
3477 * c-warn.c (warn_if_unused_value): Remove WITH_CLEANUP_EXPR handling.
3479 2017-06-28 Martin Liska <mliska@suse.cz>
3482 * c-attribs.c (handle_alias_ifunc_attribute): Append ifunc alias
3483 to a function declaration.
3485 2017-06-28 Martin Liska <mliska@suse.cz>
3488 * c.opt: Add IntegerRange to various options.
3490 2017-06-26 Marek Polacek <polacek@redhat.com>
3493 * c-common.h (warn_for_multistatement_macros): Declare.
3494 * c-warn.c: Include "c-family/c-indentation.h".
3495 (warn_for_multistatement_macros): New function.
3496 * c.opt (Wmultistatement-macros): New option.
3497 * c-indentation.c (guard_tinfo_to_string): No longer static.
3498 Change the parameter type to "enum rid". Handle RID_SWITCH.
3499 * c-indentation.h (guard_tinfo_to_string): Declare.
3501 2017-06-23 Marc Glisse <marc.glisse@inria.fr>
3503 * c-common.c (c_common_nodes_and_builtins): Use builtin_structptr_types.
3505 2017-06-15 Martin Sebor <msebor@redhat.com>
3508 * c.opt (-Wclass-memaccess): New option.
3510 2017-06-14 Boris Kolpackov <boris@codesynthesis.com>
3512 * c-opts.c (c_common_finish): Handle '-' special value to -MF.
3514 2017-06-13 Marek Polacek <polacek@redhat.com>
3517 * c-warn.c (do_warn_duplicated_branches): Return if any of the
3520 2017-06-13 Martin Liska <mliska@suse.cz>
3523 * c-attribs.c (add_no_sanitize_value): New function.
3524 (handle_no_sanitize_attribute): Likewise.
3525 (handle_no_sanitize_address_attribute): Use the function.
3526 (handle_no_sanitize_thread_attribute): New function.
3527 (handle_no_address_safety_analysis_attribute): Use
3528 add_no_sanitize_value.
3529 (handle_no_sanitize_undefined_attribute): Likewise.
3530 * c-common.h: Declare new functions.
3531 * c-ubsan.c (ubsan_instrument_division): Use sanitize_flags_p.
3532 (ubsan_instrument_shift): Likewise.
3533 (ubsan_instrument_bounds): Likewise.
3534 (ubsan_maybe_instrument_array_ref): Likewise.
3535 (ubsan_maybe_instrument_reference_or_call): Likewise.
3537 2017-06-11 Jason Merrill <jason@redhat.com>
3539 * c-ada-spec.c, c-pragma.c: Use id_equal.
3541 2017-06-04 Marek Polacek <polacek@redhat.com>
3544 * c-format.c (matching_type_p): Return false if any of the types
3545 requires structural equality.
3547 2017-06-02 Martin Sebor <msebor@redhat.com>
3550 * c-warn.c (conversion_warning): Use -Wconversion for integer
3551 conversion and -Wfloat-conversion for floating one.
3553 2017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
3555 * c.opt (Wsizeof-pointer-div): New warning option.
3557 2017-06-01 Volker Reichelt <v.reichelt@netcologne.de>
3559 * c.opt (Wcatch-value): New shortcut for Wcatch-value=1.
3560 (Wcatch-value=1): Enable by -Wall.
3562 2017-05-30 David Malcolm <dmalcolm@redhat.com>
3564 * c-format.c (gcc_cxxdiag_char_table): Add 'H' and 'I' to
3566 * c.opt (fdiagnostics-show-template-tree): New option.
3567 (felide-type): New option.
3569 2017-05-25 Volker Reichelt <v.reichelt@netcologne.de>
3571 * c.opt (Wcatch-value=): New C++ warning flag.
3573 2017-05-24 Nathan Sidwell <nathan@acm.org>
3575 * c=common.c (field_decl_cmp, resort_field_decl_cmp): Adjust T
3576 const casts to avoid warning.
3578 2017-05-24 Martin Sebor <msebor@redhat.com>
3581 * c-common.h (unsafe_conversion_p): Add a function argument.
3582 * c-common.c (unsafe_conversion_p): Same.
3583 Add type names and values to diagnostics.
3584 (scalar_to_vector): Adjust.
3585 * c-warn.c (constant_expression_error): Add a function argument.
3586 Add type names and values to diagnostics.
3587 (conversion_warning): Add a function argument.
3588 Add type names and values to diagnostics.
3589 (warnings_for_convert_and_check): Same.
3591 2017-05-19 Jason Merrill <jason@redhat.com>
3593 * c-warn.c (match_case_to_enum_1): Don't warn about enums with no
3596 2017-05-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
3598 * c-format.c (locus): Move out of function scope,
3601 2017-05-19 Nathan Sidwell <nathan@acm.org>
3603 * c-opts.c (class_dump_file, class_dump_flags): Delete.
3604 (c_common_parse_file): Remove class dump handling.
3605 (get_dump_info): Likewise.
3607 2017-05-19 Richard Biener <rguenther@suse.de>
3610 * c-warn.c (strict_aliasing_warning): Do not warn for accesses
3611 to alias-set zero memory.
3613 2017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
3615 * c-format.c (local_tree_type_node): Add GTY attribute.
3617 2017-05-18 Marek Polacek <polacek@redhat.com>
3619 * c-common.c (c_common_type_for_size): Use NULL_TREE instead of 0.
3620 (c_common_fixed_point_type_for_size): Likewise.
3621 (c_common_type_for_mode): Likewise.
3622 (shorten_compare): Likewise.
3623 (c_promoting_integer_type_p): Use false/true instead of 0/1.
3624 * c-pragma.c (maybe_apply_renaming_pragma): Use NULL_TREE instead of 0.
3626 2017-05-18 Marek Polacek <polacek@redhat.com>
3628 * c-common.c (self_promoting_args_p): Change the return type to bool.
3629 Use false/true instead of 0/1.
3630 * c-common.h (self_promoting_args_p): Update.
3632 2017-05-17 Marek Polacek <polacek@redhat.com>
3634 * c-common.c: Use NULL_TREE instead of 0 where appropriate.
3635 * c-warn.c: Likewise.
3637 2017-05-17 Ville Voutilainen <ville.voutilainen@gmail.com>
3639 Implement new C++ intrinsics __is_assignable and __is_constructible.
3640 * c-common.c (__is_assignable, __is_constructible): New.
3641 * c-common.h (RID_IS_ASSIGNABLE, RID_IS_CONSTRUCTIBLE): Likewise.
3643 2017-05-17 Martin Liska <mliska@suse.cz>
3645 * c-common.h: Introduce dump_flags_t type and
3646 use it instead of int type.
3647 * c-gimplify.c (c_genericize): Likewise.
3648 * c-opts.c: Likewise.
3650 2017-05-17 Marek Polacek <polacek@redhat.com>
3652 * c-common.c (c_save_expr): Remove.
3653 (c_common_truthvalue_conversion): Remove a call to c_save_expr.
3654 * c-common.h (c_save_expr): Remove declaration.
3656 2017-05-09 Volker Reichelt <v.reichelt@netcologne.de>
3659 * c-pretty-print.c (c_pretty_printer::expression): Handle MAX_EXPR,
3660 MIN_EXPR, EXACT_DIV_EXPR, RDIV_EXPR, LROTATE_EXPR, RROTATE_EXPR.
3661 (c_pretty_printer::postfix_expression): Handle MAX_EXPR, MIN_EXPR.
3662 (c_pretty_printer::multiplicative_expression): Handle EXACT_DIV_EXPR,
3664 (pp_c_shift_expression): Handle LROTATE_EXPR, RROTATE_EXPR.
3666 2017-05-09 Marek Polacek <polacek@redhat.com>
3669 * c-warn.c (unwrap_c_maybe_const): New.
3670 (warn_logical_operator): Call it.
3672 2017-05-09 Nathan Sidwell <nathan@acm.org>
3674 * c-common.c (c_register_builtin_type): Use pushdecl lang_hook.
3675 * c-common.h (pushdecl_top_level, pushdecl): Don't declare here.
3677 2017-05-08 Martin Sebor <msebor@redhat.com>
3679 PR translation/80280
3680 * c-format.h (struct format_flag_spec): Add new member.
3682 * c-format.c (local_tree_type_node): New global.
3683 (printf_flag_specs, asm_fprintf_flag_spec): Initialize new data.
3684 (gcc_diag_flag_specs, scanf_flag_specs, strftime_flag_specs): Ditto.
3685 (strfmon_flag_specs): Likewise.
3686 (gcc_diag_char_table, gcc_cdiag_char_table): Split up specifiers
3687 with distinct quoting properties.
3688 (gcc_tdiag_char_table, gcc_cxxdiag_char_table): Same.
3689 (flag_chars_t::validate): Add argument and handle bad quoting.
3690 (check_format_info_main): Handle quoting problems.
3691 (init_dynamic_diag_info): Simplify.
3693 2017-05-08 Jason Merrill <jason@redhat.com>
3695 * c-opts.c (c_common_post_options): Update defaults for
3696 flag_abi_version and flag_abi_compat_version.
3698 2017-05-05 David Malcolm <dmalcolm@redhat.com>
3700 * c-common.c (c_cpp_error): Replace report_diagnostic
3701 with diagnostic_report_diagnostic.
3703 2017-05-04 Martin Sebor <msebor@redhat.com>
3705 PR translation/80280
3706 * c-attribs.c (handle_alias_ifunc_attribute): Quote a %D directive.
3707 (handle_weakref_attribute): Same.
3709 2017-05-03 Nathan Sidwell <nathan@acm.org>
3711 Canonicalize canonical type hashing
3712 * c-common.c (complete_array_type): Use type_hash_canon.
3714 2017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
3717 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): Remove
3719 (cilk_install_body_pedigree_operations): Likewise.
3720 * cilk.c (cilk_set_spawn_marker): Mark functions that should be
3722 (cilk_gimplify_call_params_in_spawned_fn): Remove.
3723 (cilk_install_body_pedigree_operations): Likewise.
3724 (gimplify_cilk_spawn): Add EXPR_STMT and CLEANUP_POINT_EXPR
3727 2017-04-27 Jakub Jelinek <jakub@redhat.com>
3730 * c-common.c (complete_array_type): Only hash TYPE_TYPELESS_STORAGE
3731 flag on non-aggregate element types.
3733 2017-04-25 Bernd Edlinger <bernd.edlinger@hotmail.de>
3735 * c-common.c (c_type_hasher, type_hash_table): Remove.
3736 (c_common_get_alias_set): Remove unreachable code.
3737 * c-opts.c (c_common_post_options): Make sure cc1 takes only one file.
3739 2017-04-20 Volker Reichelt <v.reichelt@netcologne.de>
3741 * c.opt (Wextra-semi): New C++ warning flag.
3743 2017-04-20 Jakub Jelinek <jakub@redhat.com>
3746 * c-common.c (complete_array_type): Preserve TYPE_TYPELESS_STORAGE.
3748 2017-04-18 Jakub Jelinek <jakub@redhat.com>
3752 * c-common.c (c_common_type_for_mode): Don't handle
3753 widest_*_literal_type_node here.
3754 c_common_signed_or_unsigned_type): Likewise.
3755 (c_common_nodes_and_builtins): Set widest_*_literal_type_node
3756 to *intTI_type_node or *intDI_type_node depending on whether
3757 TImode is supported by the target or not.
3759 2017-04-10 Martin Liska <mliska@suse.cz>
3762 * c-ubsan.c (ubsan_instrument_shift): Evaluate RHS before
3763 doing an UBSAN check.
3765 2017-04-03 Jonathan Wakely <jwakely@redhat.com>
3767 * c-warn.c (do_warn_double_promotion): Fix typo in comment.
3769 2017-03-31 Jakub Jelinek <jakub@redhat.com>
3772 * c-ubsan.h (ubsan_maybe_instrument_reference): Change argument to
3774 * c-ubsan.c (ubsan_maybe_instrument_reference): Likewise. Handle
3775 not just NOP_EXPR to REFERENCE_TYPE, but also INTEGER_CST with
3778 2017-03-31 David Malcolm <dmalcolm@redhat.com>
3780 PR documentation/78732
3781 * c.opt (Wendif-labels): Fix description to refer to
3782 #else rather than #elif.
3784 2017-03-31 Jakub Jelinek <jakub@redhat.com>
3787 * c-common.h (enum rid): Add RID_IS_AGGREGATE.
3788 * c-common.c (c_common_reswords): Add __is_aggregate trait.
3790 2017-03-27 Jakub Jelinek <jakub@redhat.com>
3793 * c-common.c (c_common_mark_addressable_vec): Don't set
3794 TREE_ADDRESSABLE on DECL_HARD_REGISTER.
3796 2017-03-21 Martin Sebor <msebor@redhat.com>
3799 * c-common.c (set_underlying_type): Mark type used only when
3800 original del is declared unused.
3802 2017-03-10 David Malcolm <dmalcolm@redhat.com>
3804 PR translation/79848
3805 * c-format.c (check_format_string): Simplify uses of "%<%s%>" to
3808 2017-03-10 David Malcolm <dmalcolm@redhat.com>
3811 * c-indentation.c (warn_for_misleading_indentation): Remove parens
3812 from inform's message, so that xgettext can locate it.
3814 2017-03-09 Marek Polacek <polacek@redhat.com>
3818 * c-attribs.c (handle_nonnull_attribute): Save the result of default
3819 conversion to the attribute list.
3821 2017-03-09 Martin Liska <mliska@suse.cz>
3823 * c-ada-spec.c (macro_length): Increment value instead of a pointer.
3825 2017-03-03 Jason Merrill <jason@redhat.com>
3827 * c.opt (Wnoexcept-type): New.
3829 2017-03-02 Richard Biener <rguenther@suse.de>
3832 * c-common.c (c_common_mark_addressable_vec): Look through
3835 2017-02-28 Martin Liska <mliska@suse.cz>
3837 * c.opt: Replace space with tabular for options of <number>
3840 2017-02-28 Martin Liska <mliska@suse.cz>
3842 * c.opt: Fix --help=option -Q for options which are of
3845 2017-02-24 Jakub Jelinek <jakub@redhat.com>
3848 * c-common.c (check_function_restrict): New function.
3849 (check_function_arguments): Add FNDECL argument. Call
3850 check_function_restrict if -Wrestrict.
3851 * c-warn.c (warn_for_restrict): Remove ARGS argument, add ARGARRAY
3852 and NARGS. Use auto_vec for ARG_POSITIONS, simplify.
3853 * c-common.h (check_function_arguments): Add FNDECL argument.
3854 (warn_for_restrict): Remove ARGS argument, add ARGARRAY and NARGS.
3856 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
3858 * c-ada-spec.c (dump_ada_function_declaration): Add comment about the
3859 treatment of parameters with pointer-to-tagged type and tidy up.
3860 (print_ada_methods): Remove the special treatment of C++ static member
3863 2017-02-22 Martin Liska <mliska@suse.cz>
3865 * c.opt: Replace inequality signs with square brackets
3868 2017-02-21 Jakub Jelinek <jakub@redhat.com>
3871 * c-attribs.c (handle_mode_attribute): Use build_qualified_type to
3874 2017-02-17 Joseph Myers <joseph@codesourcery.com>
3876 * c-cppbuiltin.c (builtin_define_float_constants): Define
3877 __DECIMAL_DIG__ to the value for long double.
3879 2017-02-15 Marek Polacek <polacek@redhat.com>
3882 * c-warn.c (do_warn_double_promotion): Don't warn if an invalid
3883 conversion has occured.
3885 2017-01-24 David Malcolm <dmalcolm@redhat.com>
3887 * c-common.c (c_common_reswords): Add "__RTL".
3888 * c-common.h (enum rid): Add RID_RTL.
3890 2017-01-20 Marek Polacek <polacek@redhat.com>
3893 * c-common.h (do_warn_duplicated_branches_r): Declare.
3894 * c-gimplify.c (c_genericize): Walk the function tree calling
3895 do_warn_duplicated_branches_r.
3896 * c-warn.c (expr_from_macro_expansion_r): New.
3897 (do_warn_duplicated_branches): New.
3898 (do_warn_duplicated_branches_r): New.
3899 * c.opt (Wduplicated-branches): New option.
3901 2017-01-17 David Malcolm <dmalcolm@redhat.com>
3904 * c-indentation.c (warn_for_misleading_indentation): Use the past
3905 subjunctive in the note.
3907 2017-01-17 Aldy Hernandez <aldyh@redhat.com>
3910 * array-notation-common.c (cilkplus_extract_an_triplets): Convert
3911 start type to integer_type.
3913 2017-01-16 Jakub Jelinek <jakub@redhat.com>
3916 * c.opt (gen-decls): Add Driver flag.
3918 2017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
3921 2017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
3924 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
3926 2017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
3929 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
3931 2017-01-12 Martin Sebor <msebor@redhat.com>
3933 (-Wformat-overflow): ...to this.
3935 2017-01-11 Martin Sebor <msebor@redhat.com>
3938 * c.opt (-Walloca-larger-than, -Wformat-length, -Wformat-truncation):
3939 Also enable for LTO.
3941 2017-01-10 Jason Merrill <jason@redhat.com>
3943 Implement P0195R2, C++17 variadic using.
3944 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_variadic_using.
3946 2017-01-09 Jakub Jelinek <jakub@redhat.com>
3948 PR translation/79019
3949 PR translation/79020
3950 * c.opt (Wnormalized=): Fix typo in description.
3952 2017-01-08 Martin Sebor <msebor@redhat.com>
3955 * c.opt (-Wformat-truncation): New option.
3957 2017-01-06 Alexandre Oliva <aoliva@redhat.com>
3959 * c-pretty-print.c (pp_c_tree_decl_identifier): Convert 16-bit
3960 value to unsigned short to fit in 4 hex digits without
3963 2017-01-05 Eric Botcazou <ebotcazou@adacore.com>
3965 * c.opt (fsso-struct): Add 'native' value.
3967 2017-01-05 Martin Liska <mliska@suse.cz>
3970 * c-opts.c (c_common_post_options): Reject '-' filename for a precompiled
3973 2017-01-04 Marek Polacek <polacek@redhat.com>
3976 * c.opt (Wpointer-compare): New option.
3978 2017-01-04 Jakub Jelinek <jakub@redhat.com>
3981 * c.opt (fsso-struct=): Add RejectNegative.
3983 2017-01-01 Jakub Jelinek <jakub@redhat.com>
3985 Update copyright years.
3987 2016-12-29 Martin Liska <mliska@suse.cz>
3990 * c.opt (strong-eval-order): Add RejectNegative keyword.
3992 2016-12-22 Jason Merrill <jason@redhat.com>
3994 Implement P0522R0, matching of template template arguments.
3995 * c-cppbuiltin.c (c_cpp_builtins): Define
3996 __cpp_template_template_args.
3998 2016-12-21 Jakub Jelinek <jakub@redhat.com>
4001 * c-common.c (struct nonnull_arg_ctx): New type.
4002 (check_function_nonnull): Return bool instead of void. Use
4003 nonnull_arg_ctx as context rather than just location_t.
4004 (check_nonnull_arg): Adjust for the new context type, set
4005 warned_p to true if a warning has been diagnosed.
4006 (check_function_arguments): Return bool instead of void.
4007 * c-common.h (check_function_arguments): Adjust prototype.
4009 2016-12-21 Jason Merrill <jason@redhat.com>
4011 * c.opt (-fnew-ttp-matching): New flag.
4012 * c-opts.c (c_common_post_options): Default on if -std=c++1z.
4014 2016-12-14 Martin Jambor <mjambor@suse.cz>
4016 * c-omp.c: Include omp-general.h instead of omp-low.h.
4017 (c_finish_oacc_wait): Adjusted call to find_omp_clause to use its new
4020 2016-12-14 Martin Sebor <msebor@redhat.com>
4023 * c-common.c (check_nonnull_arg): Disable when optimization
4026 2016-12-12 Marek Polacek <polacek@redhat.com>
4029 * c-common.c (attribute_fallthrough_p): Return false for
4032 2016-12-08 Martin Sebor <msebor@redhat.com>
4035 * c.opt (-Walloc-zero, -Walloc-size-larger-than): New options.
4037 2016-12-08 Martin Sebor <msebor@redhat.com>
4040 * c-pretty-print (pp_c_integer_constant): Avoid formatting type
4043 2016-12-07 Martin Sebor <msebor@redhat.com>
4049 * c.opt (-Wstringop-overflow): New option.
4051 2016-12-02 Maxim Ostapenko <m.ostapenko@samsung.com>
4053 * c-attribs.c (asan odr indicator): New attribute.
4054 (handle_asan_odr_indicator_attribute): New function.
4056 2016-11-26 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4058 * c-common.c (c_common_nodes_and_builtins): Remove initialization of
4061 2016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
4063 * c-common.c (excess_precision_mode_join): New.
4064 (c_ts18661_flt_eval_method): New.
4065 (c_c11_flt_eval_method): Likewise.
4066 (c_flt_eval_method): Likewise.
4067 * c-common.h (excess_precision_mode_join): New.
4068 (c_flt_eval_method): Likewise.
4069 * c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): New.
4070 (cpp_iec_559_value): Call it.
4071 (c_cpp_builtins): Modify logic for __LIBGCC_*_EXCESS_PRECISION__,
4072 call c_flt_eval_method to set __FLT_EVAL_METHOD__ and
4073 __FLT_EVAL_METHOD_TS_18661_3__.
4075 2016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
4077 * c-opts.c (c_common_post_options): Add logic to handle the default
4078 case for -fpermitted-flt-eval-methods.
4080 2016-11-23 Paolo Bonzini <bonzini@gnu.org>
4082 * c.opt (Wexpansion-to-defined): New.
4084 2016-11-23 Jakub Jelinek <jakub@redhat.com>
4087 * c-pragma.c (handle_pragma_target): Don't replace
4088 current_target_pragma, but chainon the new args to the current one.
4090 2016-11-22 Nathan Sidwell <nathan@acm.org>
4092 * array-notation-common.c (cilkplus_extract_an_trplets): Fix
4093 indentation and formatting.
4095 2016-11-21 Martin Sebor <msebor@redhat.com>
4097 * c.opt (-fprintf-return-value): Enable by default.
4099 2016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
4102 * c.opt (-Wbuiltin-declaration-mismatch): New warning.
4103 * c-common.c (c_common_nodes_and_builtins): Initialize
4104 const_tm_ptr_type_node.
4106 2016-11-16 Marek Polacek <polacek@redhat.com>
4109 * c-common.c (c_add_case_label): Turn error_at calls into inform.
4111 2016-11-14 Jakub Jelinek <jakub@redhat.com>
4113 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_structured_bindings.
4115 2016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
4116 Richard Biener <rguenther@suse.de>
4118 * c-common.h (c_common_resword): Add RID_GIMPLE, RID_PHI types.
4119 * c-common.h (enum rid): Add RID_GIMPLE, RID_PHI.
4120 * c.opt (fgimple): New option.
4122 2016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4125 * c-common.h (warn_for_restrict): Declare.
4126 * c-warn.c: Include gcc-rich-location.h.
4127 (warn_for_restrict): New function.
4128 * c-format.c (gcc_tdiag_char_table): Add entry for "Z" specifier.
4129 (gcc_cdiag_char_table): Likewise.
4130 (gcc_cxxdiag_char_table): Likewise.
4131 * c.opt (Wrestrict): New option.
4133 2016-11-13 Eric Botcazou <ebotcazou@adacore.com>
4135 * c-ada-spec.c (print_ada_declaration): For typedef declarations, look
4136 for nested types only if the type is a record or union and dump SLOC.
4138 2016-11-09 Jason Merrill <jason@redhat.com>
4140 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_template_auto.
4142 2016-11-09 Jakub Jelinek <jakub@redhat.com>
4144 * c-ubsan.c (ubsan_instrument_shift): Handle split
4145 -fsanitize=shift-base and -fsanitize=shift-exponent.
4147 2016-11-07 Jason Merrill <jason@redhat.com>
4149 * c.opt (Wc++1z-compat): New.
4150 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_noexcept_function_type.
4152 2016-11-07 Martin Liska <mliska@suse.cz>
4154 * c-warn.c (warn_for_unused_label): Save all labels used
4155 in goto or in &label.
4157 2016-11-03 Jason Merrill <jason@redhat.com>
4159 * c-cppbuiltin.c (c_cpp_builtins): Correct
4160 __cpp_inheriting_constructors.
4162 2016-11-01 Jason Merrill <jason@redhat.com>
4164 * c-cppbuiltin.c (c_cpp_builtins): Update
4165 __cpp_inheriting_constructors.
4167 * c.opt (-fnew-inheriting-ctors): New.
4168 * c-opts.c: Default to on for ABI 11+.
4170 2016-10-31 Jakub Jelinek <jakub@redhat.com>
4173 * c.opt (fext-numeric-literals): Add Var and Init.
4174 * c-opts.c (c_common_handle_option): Don't clear
4175 cpp_opts->ext_numeric_literals for -std=c++{11,14,1z}.
4176 (c_common_post_options): Clear it here if not set
4179 2016-10-28 Aldy Hernandez <aldyh@redhat.com>
4182 * c-pretty-print.c (simple_type_specifier): Do not dereference `t'
4185 2016-10-25 Jakub Jelinek <jakub@redhat.com>
4187 * c-common.h (enum rid): Add RID_BUILTIN_LAUNDER.
4188 * c-common.c (c_common_reswords): Add __builtin_launder.
4190 2016-10-24 Bernd Edlinger <bernd.edlinger@hotmail.de>
4192 * c-common.c (c_common_truthvalue_conversion): Warn for
4193 multiplications in boolean context. Fix the quoting of '<<' and '<'
4194 in the shift warning.
4196 2016-10-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
4198 * c-common.c (c_common_truthvalue_conversion): Fix the comment.
4200 2016-10-20 Jason Merrill <jason@redhat.com>
4202 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_concepts value.
4204 2016-10-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
4206 * c-common.c (c_common_truthvalue_conversion): Warn only for signed
4207 integer shift ops in boolean context.
4209 2016-10-18 Aldy Hernandez <aldyh@redhat.com>
4211 * c.opt (Walloca): New.
4212 (Walloca-larger-than=): New.
4213 (Wvla-larger-than=): New.
4215 2016-10-17 Marek Polacek <polacek@redhat.com>
4217 * c-warn.c (find_array_ref_with_const_idx_r): Remove parameter names.
4218 Return immediately when finding a match.
4219 (warn_tautological_cmp): Remove a boolean variable that is no longer
4222 2016-10-17 Marek Polacek <polacek@redhat.com>
4224 * c-attribs.c: New file.
4225 * c-common.c: Move attributes handling to c-attribs.c.
4226 (get_nonnull_operand): No longer static.
4227 * c-common.h: Move the declarations from c-attribs.c to its own section.
4229 2016-10-14 Jason Merrill <jason@redhat.com>
4231 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_aggregate_bases
4232 and __cpp_deduction_guides.
4234 2016-10-13 Jason Merrill <jason@redhat.com>
4236 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_inline_variables.
4238 2016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
4240 * c-cppbuiltin.c: Include memmodel.h.
4241 * c-opts.c: Likewise.
4242 * c-pragma.c: Likewise.
4243 * c-warn.c: Likewise.
4245 2016-10-12 Jakub Jelinek <jakub@redhat.com>
4247 * c.opt (Wextra): Add as C/C++/ObjC/ObjC++ option.
4248 (Wimplicit-fallthrough=): Enable for these languages by -Wextra.
4249 * c-opts.c (sanitize_cpp_opts): Initialize
4250 cpp_opts->cpp_warn_implicit_fallthrough.
4252 2016-10-11 Marek Polacek <polacek@redhat.com>
4254 * c-common.c (warning_candidate_p): Change the return type to bool
4255 and return true/false instead of 1/0.
4256 (vector_mode_valid_p): Likewise.
4258 2016-10-11 Marek Polacek <polacek@redhat.com>
4260 * c-common.c (fold_for_warn): No longer static.
4261 (bool_promoted_to_int_p): Likewise.
4262 (c_common_get_narrower): Likewise.
4263 (constant_expression_warning): Move to c-warn.c.
4264 (constant_expression_error): Likewise.
4265 (overflow_warning): Likewise.
4266 (warn_logical_operator): Likewise.
4267 (find_array_ref_with_const_idx_r): Likewise.
4268 (warn_tautological_cmp): Likewise.
4269 (expr_has_boolean_operands_p): Likewise.
4270 (warn_logical_not_parentheses): Likewise.
4271 (warn_if_unused_value): Likewise.
4272 (strict_aliasing_warning): Likewise.
4273 (sizeof_pointer_memaccess_warning): Likewise.
4274 (check_main_parameter_types): Likewise.
4275 (conversion_warning): Likewise.
4276 (warnings_for_convert_and_check): Likewise.
4277 (match_case_to_enum_1): Likewise.
4278 (match_case_to_enum): Likewise.
4279 (c_do_switch_warnings): Likewise.
4280 (warn_for_omitted_condop): Likewise.
4281 (readonly_error): Likewise.
4282 (lvalue_error): Likewise.
4283 (invalid_indirection_error): Likewise.
4284 (warn_array_subscript_with_type_char): Likewise.
4285 (warn_about_parentheses): Likewise.
4286 (warn_for_unused_label): Likewise.
4287 (warn_for_div_by_zero): Likewise.
4288 (warn_for_memset): Likewise.
4289 (warn_for_sign_compare): Likewise.
4290 (do_warn_double_promotion): Likewise.
4291 (do_warn_unused_parameter): Likewise.
4292 (record_locally_defined_typedef): Likewise.
4293 (maybe_record_typedef_use): Likewise.
4294 (maybe_warn_unused_local_typedefs): Likewise.
4295 (maybe_warn_bool_compare): Likewise.
4296 (maybe_warn_shift_overflow): Likewise.
4297 (warn_duplicated_cond_add_or_warn): Likewise.
4298 (diagnose_mismatched_attributes): Likewise.
4299 * c-common.h: Move the declarations from c-warn.c to its own section.
4300 * c-warn.c: New file.
4302 2016-10-08 Jason Merrill <jason@redhat.com>
4304 * c-common.c (c_common_truthvalue_conversion): Don't distribute
4305 into COND_EXPR in C++.
4307 2016-10-08 Jakub Jelinek <jakub@redhat.com>
4309 * c-lex.c (c_lex_with_flags) <case CPP_COMMENT>: For CPP_COMMENT
4310 token with PREV_FALLTHROUGH, skip all following CPP_PADDING and
4311 CPP_COMMENT tokens and set add_flags to PREV_FALLTHROUGH afterwards.
4313 2016-10-07 Jakub Jelinek <jakub@redhat.com>
4315 Implement LWG2296 helper intrinsic
4316 * c-common.h (enum rid): Add RID_ADDRESSOF.
4317 * c-common.c (c_common_reswords): Add __builtin_addressof.
4319 2016-10-07 Bernd Edlinger <bernd.edlinger@hotmail.de>
4322 * c-common.c (c_common_truthvalue_conversion): Warn also for
4323 suspicious enum values in boolean context.
4325 2016-10-06 Jakub Jelinek <jakub@redhat.com>
4327 Implement P0258R2 - helper for C++17
4328 std::has_unique_object_representations trait
4329 * c-common.h (enum rid): Add RID_HAS_UNIQUE_OBJ_REPRESENTATIONS.
4330 * c-common.c (c_common_reswords): Add
4331 __has_unique_object_representations.
4333 2016-10-05 Jakub Jelinek <jakub@redhat.com>
4336 * c-ubsan.c (ubsan_instrument_return): Don't call
4337 initialize_sanitizer_builtins here.
4339 2016-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
4341 * c-common.c (c_common_truthvalue_conversion): Warn also for suspicious
4342 conditional expression in boolean context when only one arm is
4345 2016-10-05 Jakub Jelinek <jakub@redhat.com>
4348 * c-ubsan.c (ubsan_instrument_shift): Return NULL_TREE if type0
4351 * c-common.c (c_common_reswords): Update comment for C++11.
4353 2016-10-04 Jason Merrill <jason@redhat.com>
4355 * c-common.c (make_tree_vector_from_ctor): New.
4356 * c-common.h: Declare it.
4358 2016-10-04 Jakub Jelinek <jakub@redhat.com>
4360 * c-cppbuiltin.c (c_cpp_builtins): Don't define
4361 __LIBGCC_JCR_SECTION_NAME__.
4363 2016-10-03 Bernd Edlinger <bernd.edlinger@hotmail.de>
4365 * c-common.c (c_common_truthvalue_conversion): Warn for suspicious
4366 left shift in boolean context.
4368 2016-09-29 Jakub Jelinek <jakub@redhat.com>
4370 Implement P0001R1 - C++17 removal of register storage class specifier
4371 * c.opt (Wregister): New warning.
4372 * c-opts.c (c_common_post_options): Enable -Wregister by
4375 2016-09-29 James Greenhalgh <james.greenhalgh@arm.com>
4377 * c-opts.c (c_common_post_options): Remove special case for
4378 TARGET_FLT_EVAL_METHOD_NON_DEFAULT with -fexcess-precision=standard
4381 2016-09-27 Jakub Jelinek <jakub@redhat.com>
4383 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_capture_star_this for
4386 * c-ada-spec.c (print_ada_declaration): Remove break after return.
4388 2016-09-26 Thomas Preud'homme <thomas.preudhomme@arm.com>
4390 * c-common.c: Include memmodel.h.
4392 2016-09-26 Marek Polacek <polacek@redhat.com>
4394 * c-lex.c (c_common_has_attribute): Handle attribute fallthrough.
4396 2016-09-26 Marek Polacek <polacek@redhat.com>
4399 * c-common.c (c_common_attribute_table): Add fallthrough attribute.
4400 (handle_fallthrough_attribute): New function.
4401 (attribute_fallthrough_p): New function.
4402 * c-common.h (attribute_fallthrough_p): Declare.
4404 2016-09-24 Marek Polacek <polacek@redhat.com>
4407 * c.opt (Wbool-operation): New.
4409 2016-09-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
4411 * c-common.c (c_common_truthvalue_conversion): Inhibit
4412 Wint-in-bool-context warning with from_macro_definition_at.
4413 Mention the expression will always evaluate to true.
4415 2016-09-21 Martin Sebor <msebor@redhat.com>
4418 * c.opt (fprintf-return-value): Temporarily initialize to zero
4419 to unblock bootstrap failures.
4421 2016-09-21 Jakub Jelinek <jakub@redhat.com>
4424 * c.opt (Waligned-new=): Add RejectNegative.
4425 (faligned-new=): Likewise. Spelling fix - change
4426 aligned_new_threshhold to aligned_new_threshold.
4427 * c-cppbuiltin.c (c_cpp_builtins): Change aligned_new_threshhold
4428 to aligned_new_threshold.
4430 2016-09-20 Martin Sebor <msebor@redhat.com>
4433 * c.opt: Add -Wformat-length and -fprintf-return-value.
4435 2016-09-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
4438 * c.opt (Wint-in-bool-context): New warning.
4439 * c-common.c (c_common_truthvalue_conversion): Warn on integer
4440 constants in boolean context.
4442 2016-09-19 Joseph Myers <joseph@codesourcery.com>
4444 * c-common.c (max_align_t_align): Also consider alignment of
4447 2016-09-15 Jason Merrill <jason@redhat.com>
4449 * c-common.c (check_cxx_fundamental_alignment_constraints): Check
4452 2016-09-14 Jason Merrill <jason@redhat.com>
4454 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
4455 limit FIELD_DECL, either.
4457 2016-09-14 Marek Polacek <polacek@redhat.com>
4459 * c-common.c (c_common_truthvalue_conversion): Use false instead of 0.
4460 * c-common.h (build_unary_op): Change nonconvert parameter type to bool.
4461 * c-omp.c (c_finish_omp_atomic): Use false instead of 0.
4463 2016-09-13 David Malcolm <dmalcolm@redhat.com>
4465 * c-common.c (warn_logical_not_parentheses): Replace
4466 rich_location::add_fixit_insert calls with add_fixit_insert_before
4467 and add_fixit_insert_after, eliminating the "next_loc" calculation.
4469 2016-09-13 Jason Merrill <jason@redhat.com>
4470 Tom de Vries <tom@codesourcery.com>
4473 * c-common.c (set_underlying_type): Don't treat array as builtin type.
4475 2016-09-13 Jason Merrill <jason@redhat.com>
4477 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
4480 2016-09-12 Jason Merrill <jason@redhat.com>
4482 * c-common.c (check_cxx_fundamental_alignment_constraints): Fix
4483 bit/byte confusion, allow large alignment for types.
4485 2016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
4488 * c-common.c (warn_for_omitted_condop): Also warn for boolean data.
4490 2016-09-12 David Malcolm <dmalcolm@redhat.com>
4493 * c-format.c (argument_parser::check_argument_type): Add params
4494 "type_start" and "conversion_char". Use the former to generate
4495 offset_to_type_start and pass it and conversion_char to
4497 (check_format_info_main): Capture the start of the type
4498 information as "type_start", and pass it an format_char
4499 to arg_parser.check_argument_type.
4500 (check_format_types): Provide an example in the leading comment.
4501 Add params "offset_to_type_start" and "conversion_char"; pass
4502 them to format_type_warning calls.
4503 (test_get_modifier_for_format_len): Likewise.
4504 (matching_type_p): New function.
4505 (get_format_for_type): Add param "conversion_char" and move
4506 implementation into...
4507 (get_format_for_type_1): ...new function, called twice.
4508 Use new function matching_type_p rather than checking for
4509 TYPE_CANONICAL equality.
4510 (get_corrected_substring): New function.
4511 (format_type_warning): Provide an example in the leading comment.
4512 Add params "offset_to_type_start" and "conversion_char". Replace
4513 call to get_format_for_type with call to get_corrected_substring
4514 and move rejection of hints for widths/precisions there.
4515 (assert_format_for_type_streq): Add param "conversion_char".
4516 (ASSERT_FORMAT_FOR_TYPE_STREQ): Add param CONVERSION_CHAR.
4517 (test_get_format_for_type_printf): Add conversion chars to the
4518 tests, adding coverage for various combinations of integer
4519 vs double conversions, and for preserving octal and hexadecimal
4521 (test_get_format_for_type_scanf): Add conversion chars to the
4524 2016-09-10 Tom de Vries <tom@codesourcery.com>
4527 * c-common.c (build_va_arg): Handle more strict
4528 targetm.canonical_va_list_type. Replace first argument type error with
4531 2016-09-09 Martin Sebor <msebor@redhat.com>
4535 * c-format.c (argument_parser::find_format_char_info): Use %qc
4536 format directive unconditionally.
4538 2016-09-09 Jason Merrill <jason@redhat.com>
4540 Implement C++17 new of over-aligned types.
4541 * c.opt: Add -faligned-new and -Waligned-new.
4542 * c-common.c (max_align_t_align): Split out from...
4543 (cxx_fundamental_alignment_p): ...here.
4544 * c-common.h: Declare it.
4545 * c-cppbuiltin.c (c_cpp_builtins): Handle aligned new.
4547 2016-09-09 Joseph Myers <joseph@codesourcery.com>
4549 * c-cppbuiltin.c (builtin_define_type_width): New function.
4550 (builtin_define_stdint_macros, c_cpp_builtins): Define type width
4553 2016-09-07 David Malcolm <dmalcolm@redhat.com>
4555 * c-common.c (get_cpp_ttype_from_string_type): Handle being passed
4557 (substring_loc::get_location): Move to substring-locations.c,
4558 keeping implementation as...
4559 (c_get_substring_location): New function, from the above, reworked
4560 to use accessors rather than member lookup.
4561 * c-common.h (class substring_loc): Move to substring-locations.h,
4562 replacing with a forward decl.
4563 (c_get_substring_location): New decl.
4564 * c-format.c: Include "substring-locations.h".
4565 (format_warning_va): Move to substring-locations.c.
4566 (format_warning_at_substring): Likewise.
4568 2016-09-06 Martin Sebor <msebor@redhat.com>
4571 * c-format.c (check_function_format): Avoid issuing warnings for
4572 functions unless they call format functions with non-constant
4575 2016-09-06 Richard Biener <rguenther@suse.de>
4578 * c-common.c (c_common_mark_addressable_vec): Handle
4579 COMPOUND_LITERAL_EXPR.
4581 2016-09-05 Marek Polacek <polacek@redhat.com>
4584 * c-common.c (bool_promoted_to_int_p): New function.
4585 (expr_has_boolean_operands_p): New function.
4586 (warn_logical_not_parentheses): Return if expr_has_boolean_operands_p.
4587 (maybe_warn_bool_compare): Use bool_promoted_to_int_p.
4589 2016-09-04 Tom de Vries <tom@codesourcery.com>
4592 2016-08-29 Tom de Vries <tom@codesourcery.com>
4594 * c-common.c (build_va_arg): Replace first argument type error
4597 2016-09-02 Jakub Jelinek <jakub@redhat.com>
4600 * c-omp.c (c_finish_omp_atomic): Reject _Atomic qualified expressions.
4601 (c_finish_omp_for): Reject _Atomic qualified iterators.
4603 2016-09-01 Martin Sebor <msebor@redhat.com>
4605 * c-ada-spec.c (dump_ada_function_declaration): Increase buffer
4606 size to guarantee it fits the output of the formatted function
4607 regardless of its arguments.
4609 2016-09-01 Marek Polacek <polacek@redhat.com>
4612 * c-common.c (resolve_overloaded_builtin): Fix formatting. Add
4615 2016-08-29 Marek Polacek <polacek@redhat.com>
4618 * c-common.c (warn_logical_not_parentheses): Don't warn for
4619 a comparison or a logical operator.
4621 2016-08-29 Tom de Vries <tom@codesourcery.com>
4623 * c-common.c (build_va_arg): Fix type comparison assert.
4625 2016-08-29 Tom de Vries <tom@codesourcery.com>
4627 * c-common.c (build_va_arg): Replace first argument type error
4630 2016-08-29 Tom de Vries <tom@codesourcery.com>
4633 * c-common.c (build_va_arg): Add first argument error. Build va_arg
4634 with error_mark_node as va_list instead of with illegal va_list.
4636 2016-08-25 Marek Polacek <polacek@redhat.com>
4637 David Malcolm <dmalcolm@redhat.com>
4639 * c-common.c (warn_logical_not_parentheses): Print fixit hints.
4640 * c-common.h (warn_logical_not_parentheses): Update declaration.
4642 2016-08-22 Marek Polacek <polacek@redhat.com>
4645 * c-common.c (warn_for_memset): Check type for null.
4647 2016-08-22 Joseph Myers <joseph@codesourcery.com>
4649 * c-cppbuiltin.c (c_cpp_builtins): Check _FloatN and
4650 _FloatNx types for suffixes for built-in functions.
4652 2016-08-19 Joseph Myers <joseph@codesourcery.com>
4655 * c-common.h (RID_FLOAT16, RID_FLOATN_NX_FIRST, RID_FLOAT32)
4656 (RID_FLOAT64, RID_FLOAT128, RID_FLOAT32X, RID_FLOAT64X)
4657 (RID_FLOAT128X): New enum rid values.
4658 (CASE_RID_FLOATN_NX): New macro.
4659 * c-common.c (c_common_reswords): Add _FloatN and _FloatNx
4661 (c_common_type_for_mode): Check for _FloatN and _FloatNx and
4662 corresponding complex types.
4663 (c_common_nodes_and_builtins): For non-C++, register _FloatN and
4664 _FloatNx and corresponding complex types.
4665 (keyword_begins_type_specifier): Use CASE_RID_FLOATN_NX.
4666 * c-cppbuiltin.c (builtin_define_float_constants): Check _FloatN
4667 and _FloatNx types for the widest type for determining
4668 DECIMAL_DIG. Define __LDBL_DECIMAL_DIG__ as well as
4669 __DECIMAL_DIG__ for long double. Handle FMA_SUFFIX being NULL.
4670 (c_cpp_builtins): Call builtin_define_float_constants for _FloatN
4672 * c-lex.c (interpret_float): Handle _FloatN and _FloatNx
4674 * c-pretty-print.c (pp_c_floating_constant): Handle _FloatN and
4677 2016-08-18 David Malcolm <dmalcolm@redhat.com>
4679 * c-opts.c (c_diagnostic_finalizer): Update for change to
4680 diagnostic_show_locus.
4682 2016-08-18 David Malcolm <dmalcolm@redhat.com>
4684 * c-common.c: Include "spellcheck.h".
4685 (cb_get_suggestion): New function.
4686 * c-common.h (cb_get_suggestion): New decl.
4687 * c-lex.c (init_c_lex): Initialize cb->get_suggestion to
4690 2016-08-18 Marek Polacek <polacek@redhat.com>
4693 * c-common.c (get_atomic_generic_size): Disallow pointer-to-function
4696 2016-08-16 David Malcolm <dmalcolm@redhat.com>
4699 * c-common.c (substring_loc::get_range): Rename to...
4700 (substring_loc::get_location): ...this, converting param from a
4701 source_range * to a location_t *. Call
4702 get_source_location_for_substring rather than
4703 get_source_range_for_substring, and pass in m_caret_idx.
4704 * c-common.h (substring_loc::substring_loc): Add param "caret_idx".
4705 (substring_loc::get_range): Replace with...
4706 (substring_loc::get_location): ...this.
4707 (substring_loc::set_caret_index): New method.
4708 (substring_loc): Add field m_caret_idx.
4709 * c-format.c (format_warning_va): Update for above changes.
4710 Rename local "substring_loc" to "fmt_substring_loc" to avoid
4711 clashing with type name.
4712 (format_warning_at_char): Add caret_idx param to substring_loc ctor.
4713 (check_argument_type): Likewise.
4714 (format_type_warning): Rename param "fmt_loc" to "whole_fmt_loc"
4715 Use a copy when emitting warnings, setting the caret index from TYPE.
4717 2016-08-16 Eric Botcazou <ebotcazou@adacore.com>
4718 Arnaud Charlet <charlet@adacore.com>
4720 * c-ada-spec.c (dump_number): New function.
4721 (handle_escape_character): Likewise.
4722 (print_ada_macros): Add handling of constant integers and strings.
4724 2016-08-12 Marek Polacek <polacek@redhat.com>
4727 * c-common.c (scalar_to_vector): Adjust fall through comment.
4728 * c-opts.c (c_common_handle_option): Likewise.
4729 * c-pragma.c (handle_pragma_pack): Add FALLTHRU.
4730 * c-pretty-print.c (c_pretty_printer::postfix_expression): Adjust
4731 fall through comment.
4732 * cilk.c (extract_free_variables): Add FALLTHRU.
4734 2016-08-10 Jason Merrill <jason@redhat.com>
4736 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_if_constexpr.
4738 2016-08-09 Jason Merrill <jason@redhat.com>
4740 * c-common.c (c_common_attribute_table): vector_size affects type
4743 2016-08-09 Marek Polacek <polacek@redhat.com>
4746 * c-ada-spec.c (dump_generic_ada_node): Add return.
4748 2016-08-09 Jason Merrill <jason@redhat.com>
4750 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_constexpr for
4751 C++17 constexpr lambdas.
4753 2016-08-08 David Malcolm <dmalcolm@redhat.com>
4756 * c-common.h (selftest::c_format_c_tests): New declaration.
4757 (selftest::run_c_tests): New declaration.
4758 * c-format.c: Include "selftest.h.
4759 (format_warning_va): Add param "corrected_substring" and use
4760 it to add a replacement fix-it hint.
4761 (format_warning_at_substring): Likewise.
4762 (format_warning_at_char): Update for new param of
4764 (argument_parser::check_argument_type): Pass "fki" to
4766 (check_format_types): Add param "fki" and pass it to
4767 format_type_warning.
4768 (deref_n_times): New function.
4769 (get_modifier_for_format_len): New function.
4770 (selftest::test_get_modifier_for_format_len): New function.
4771 (get_format_for_type): New function.
4772 (format_type_warning): Add param "fki" and use it to attempt
4773 to provide hints for argument types when calling
4774 format_warning_at_substring.
4775 (selftest::get_info): New function.
4776 (selftest::assert_format_for_type_streq): New function.
4777 (ASSERT_FORMAT_FOR_TYPE_STREQ): New macro.
4778 (selftest::test_get_format_for_type_printf): New function.
4779 (selftest::test_get_format_for_type_scanf): New function.
4780 (selftest::c_format_c_tests): New function.
4782 2016-08-08 David Malcolm <dmalcolm@redhat.com>
4785 * c-format.c: Include "diagnostic.h".
4786 (location_column_from_byte_offset): Delete.
4787 (location_from_offset): Delete.
4788 (format_warning_va): New function.
4789 (format_warning_at_substring): New function.
4790 (format_warning_at_char): New function.
4791 (check_format_arg): Capture location of format_tree and pass to
4792 check_format_info_main.
4793 (argument_parser): Add fields "start_of_this_format" and
4794 "format_string_cst".
4795 (flag_chars_t::validate): Add param "format_string_cst". Convert
4796 warning_at call using location_from_offset to call to
4797 format_warning_at_char.
4798 (argument_parser::argument_parser): Add param "format_string_cst_"
4799 and use use it to initialize field "format_string_cst".
4800 Initialize new field "start_of_this_format".
4801 (argument_parser::read_format_flags): Convert warning_at call
4802 using location_from_offset to a call to format_warning_at_char.
4803 (argument_parser::read_any_format_left_precision): Likewise.
4804 (argument_parser::read_any_format_precision): Likewise.
4805 (argument_parser::read_any_other_modifier): Likewise.
4806 (argument_parser::find_format_char_info): Likewise, in three places.
4807 (argument_parser::parse_any_scan_set): Likewise, in one place.
4808 (argument_parser::handle_conversions): Likewise, in two places.
4809 (argument_parser::check_argument_type): Add param "fmt_param_loc"
4810 and use it to make a substring_loc. Pass the latter to
4812 (check_format_info_main): Add params "fmt_param_loc" and
4813 "format_string_cst". Convert warning_at calls using
4814 location_from_offset to calls to format_warning_at_char. Pass the
4815 new params to the arg_parser ctor. Pass "format_string_cst" to
4816 flag_chars.validate. Pass "fmt_param_loc" to
4817 arg_parser.check_argument_type.
4818 (check_format_types): Convert first param from a location_t
4819 to a const substring_loc & and rename to "fmt_loc". Attempt
4820 to extract the range of the relevant parameter and pass it
4821 to format_type_warning.
4822 (format_type_warning): Convert first param from a location_t
4823 to a const substring_loc & and rename to "fmt_loc". Add
4824 params "param_range" and "type". Replace calls to warning_at
4825 with calls to format_warning_at_substring.
4827 2016-08-08 David Malcolm <dmalcolm@redhat.com>
4829 * c-format.c (class flag_chars_t): New class.
4830 (struct length_modifier): New struct.
4831 (class argument_parser): New class.
4832 (flag_chars_t::flag_chars_t): New ctor.
4833 (flag_chars_t::has_char_p): New method.
4834 (flag_chars_t::add_char): New method.
4835 (flag_chars_t::validate): New method.
4836 (flag_chars_t::get_alloc_flag): New method.
4837 (flag_chars_t::assignment_suppression_p): New method.
4838 (argument_parser::argument_parser): New ctor.
4839 (argument_parser::read_any_dollar): New method.
4840 (argument_parser::read_format_flags): New method.
4841 (argument_parser::read_any_format_width): New method.
4842 (argument_parser::read_any_format_left_precision): New method.
4843 (argument_parser::read_any_format_precision): New method.
4844 (argument_parser::handle_alloc_chars): New method.
4845 (argument_parser::read_any_length_modifier): New method.
4846 (argument_parser::read_any_other_modifier): New method.
4847 (argument_parser::find_format_char_info): New method.
4848 (argument_parser::validate_flag_pairs): New method.
4849 (argument_parser::give_y2k_warnings): New method.
4850 (argument_parser::parse_any_scan_set): New method.
4851 (argument_parser::handle_conversions): New method.
4852 (argument_parser::check_argument_type): New method.
4853 (check_format_info_main): Introduce classes argument_parser
4854 and flag_chars_t, moving the code within the loop into methods
4855 of these classes. Make various locals "const".
4857 2016-08-05 David Malcolm <dmalcolm@redhat.com>
4859 * c-common.c: Include "substring-locations.h".
4860 (get_cpp_ttype_from_string_type): New function.
4861 (g_string_concat_db): New global.
4862 (substring_loc::get_range): New method.
4863 * c-common.h (g_string_concat_db): New declaration.
4864 (class substring_loc): New class.
4865 * c-lex.c (lex_string): When concatenating strings, capture the
4866 locations of all tokens using a new obstack, and record the
4867 concatenation locations within g_string_concat_db.
4868 * c-opts.c (c_common_init_options): Construct g_string_concat_db
4871 2016-07-29 Marek Polacek <polacek@redhat.com>
4874 * c-common.c (c_common_truthvalue_conversion): Use LOCATION for the
4875 parentheses warning.
4878 * c-common.c (handle_alloc_align_attribute): Also check FUNCTION_DECL.
4880 2016-07-28 Martin Liska <mliska@suse.cz>
4882 PR gcov-profile/68025
4883 * c-common.c (handle_no_profile_instrument_function_attribute):
4885 2016-07-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
4887 * c-common.c (check_user_alignment): Use LOG2_BITS_PER_UNIT instead of
4890 2016-07-25 Jason Merrill <jason@redhat.com>
4893 * c.opt (fconstexpr-loop-limit): New.
4895 2016-07-22 Martin Sebor <msebor@redhat.com>
4898 * c-common.c (resolve_overloaded_builtin): Avoid converting
4899 __atomic_compare_exchange_n return type to that of what its
4900 first argument points to.
4902 2016-07-22 Uros Bizjak <ubizjak@gmail.com>
4904 * c-common.c: Use HOST_WIDE_INT_M1U instead of
4905 ~(unsigned HOST_WIDE_INT) 0.
4907 2016-07-22 Martin Liska <mliska@suse.cz>
4909 PR gcov-profile/69028
4910 PR gcov-profile/62047
4911 * cilk.c (create_cilk_helper_decl): Set location of a new decl
4912 to the current_function_decl.
4914 2016-07-21 Jason Merrill <jason@redhat.com>
4917 * c-common.c (c_common_truthvalue_conversion): Check
4918 c_inhibit_evaluation_warnings for warning about address of
4921 2016-07-20 David Malcolm <dmalcolm@redhat.com>
4923 * c-common.h (lookup_name_fuzzy): Convert return type from tree to
4926 2016-07-15 Jason Merrill <jason@redhat.com>
4928 * c-opts.c (c_common_post_options): Update -fabi-version default to 11.
4930 2016-07-15 Jakub Jelinek <jakub@redhat.com>
4933 * c-common.h (enum lookup_name_fuzzy_kind): Add
4934 FUZZY_LOOKUP_FUNCTION_NAME.
4936 2016-07-08 Jason Merrill <jason@redhat.com>
4938 P0145: Refining Expression Order for C++.
4939 * c.opts (-fargs-in-order): Rename to -fstrong-eval-order.
4942 2016-07-05 Markus Trippelsdorf <markus@trippelsdorf.de>
4945 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_rvalue_references.
4947 2016-06-29 Thomas Schwinge <thomas@codesourcery.com>
4949 * c-pragma.h (enum pragma_kind): Rename
4950 PRAGMA_OMP_DECLARE_REDUCTION to PRAGMA_OMP_DECLARE. Adjust all
4953 2016-06-29 Richard Biener <rguenther@suse.de>
4956 * c-common.c (c_common_get_alias_set): Remove union type punning case.
4958 2016-06-24 Jason Merrill <jason@redhat.com>
4960 P0145R2: Refining Expression Order for C++.
4961 * c-common.c (verify_tree) [COMPOUND_EXPR]: Fix handling on LHS of
4964 2016-06-24 Jakub Jelinek <jakub@redhat.com>
4966 * c-common.c (check_builtin_function_arguments): Require last
4967 argument of BUILT_IN_*_OVERFLOW_P to have INTEGER_TYPE type.
4968 Adjust wording of diagnostics for BUILT_IN_*_OVERLFLOW
4969 if the last argument is pointer to enumerated or boolean type.
4971 2016-06-22 David Malcolm <dmalcolm@redhat.com>
4974 * c-common.h (enum lookup_name_fuzzy_kind): New enum.
4975 (lookup_name_fuzzy): New prototype.
4977 2016-06-21 John David Anglin <danglin@gcc.gnu.org>
4979 * c-common.c (get_source_date_epoch): Use int64_t instead of long long.
4981 2016-06-14 Jason Merrill <jason@redhat.com>
4983 P0145R2: Refining Expression Order for C++.
4984 * c.opt (fargs-in-order): New.
4985 * c-opts.c (c_common_post_options): Adjust flag_args_in_order.
4987 2016-06-13 Jakub Jelinek <jakub@redhat.com>
4990 * c-gimplify.c (ubsan_walk_array_refs_r): Set *walk_subtrees = 0 on
4991 all BIND_EXPRs, and on all BIND_EXPRs recurse also on BIND_EXPR_BODY.
4993 PR preprocessor/71183
4994 * c-ppoutput.c (init_pp_output): Set cb->get_source_date_epoch
4995 to cb_get_source_date_epoch.
4997 2016-06-10 Jakub Jelinek <jakub@redhat.com>
5000 * c.opt (Wpsabi): Add Warning flag.
5002 2016-06-10 Martin Sebor <msebor@redhat.com>
5005 * c-common.c (handle_nonnull_attribute): Accept
5006 the nonnull attribute in type-generic builtins.
5008 2016-06-09 Martin Sebor <msebor@redhat.com>
5011 * c-common.c (builtin_function_validate_nargs): Make text of error
5012 message consistent with others like it.
5014 2016-06-08 Martin Sebor <msebor@redhat.com>
5015 Jakub Jelinek <jakub@redhat.com>
5019 * c-common.c (check_builtin_function_arguments): Handle
5020 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
5022 2016-06-08 Richard Biener <rguenther@suse.de>
5024 * c-common.c (parse_optimize_options): Improve diagnostic messages.
5026 2016-06-07 Richard Biener <rguenther@suse.de>
5029 * c-common.c (parse_optimize_options): Only apply CL_OPTIMIZATION
5030 options and warn about others.
5032 2016-06-01 Eduard Sanou <dhole@openmailbox.org>
5034 * c-common.c (get_source_date_epoch): Rename to
5035 cb_get_source_date_epoch.
5036 * c-common.c (cb_get_source_date_epoch): Use a single generic erorr
5037 message when the parsing fails. Use error_at instead of fatal_error.
5038 * c-common.h (get_source_date_epoch): Rename to
5039 cb_get_source_date_epoch.
5040 * c-common.h (cb_get_source_date_epoch): Prototype.
5041 * c-common.h (MAX_SOURCE_DATE_EPOCH): Define.
5042 * c-common.h (c_omp_region_type): Remove trailing comma.
5043 * c-lex.c (init_c_lex): Set cb->get_source_date_epoch callback.
5044 * c-lex.c (c_lex_with_flags): Remove initialization of
5045 pfile->source_date_epoch.
5047 2016-05-30 Jakub Jelinek <jakub@redhat.com>
5050 * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_DEPEND to
5051 C_OMP_CLAUSE_SPLIT_TARGET. Put OMP_CLAUSE_NOWAIT to
5052 C_OMP_CLAUSE_SPLIT_TARGET if combined with target construct,
5053 instead of C_OMP_CLAUSE_SPLIT_FOR.
5055 2016-05-24 Richard Biener <rguenther@suse.de>
5059 * c-common.h (convert_vector_to_pointer_for_subscript): Rename to ...
5060 (convert_vector_to_array_for_subscript): ... this.
5061 * c-common.c (convert_vector_to_pointer_for_subscript): Use a
5062 VIEW_CONVERT_EXPR to an array type. Rename to ...
5063 (convert_vector_to_array_for_subscript): ... this.
5065 2016-05-12 Marek Polacek <polacek@redhat.com>
5068 * c-common.c (pointer_int_sum): Call size_in_bytes_loc instead of
5069 size_in_bytes and pass LOC to it.
5071 2016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
5074 * c.opt (Wduplicate-decl-specifier): New option.
5076 2016-05-11 Marek Polacek <polacek@redhat.com>
5079 * c-common.c (diagnose_mismatched_attributes): New function.
5080 * c-common.h (diagnose_mismatched_attributes): Declare.
5082 2016-05-04 Marek Polacek <polacek@redhat.com>
5084 * c.opt (Wdangling-else): New option.
5086 2016-05-03 Marek Polacek <polacek@redhat.com>
5089 * c-common.c (builtin_function_validate_nargs): Add location
5091 (check_builtin_function_arguments): Add location and arguments
5092 parameters. Use them.
5093 * c-common.h (check_builtin_function_arguments): Update declaration.
5095 2016-05-03 Richard Biener <rguenther@suse.de>
5097 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Do not
5098 allow call args to gimplify to SSA names.
5100 2016-05-03 Marek Polacek <polacek@redhat.com>
5102 * c-common.h (enum c_omp_region_type): Remove stray comma.
5104 2016-05-02 Cesar Philippidis <cesar@codesourcery.com>
5106 * c-common.h (enum c_omp_region_type): Define.
5108 2016-05-02 Richard Sandiford <richard.sandiford@arm.com>
5110 * c-common.c (shorten_compare): Use wi::to_wide.
5112 2016-04-29 Cesar Philippidis <cesar@codesourcery.com>
5115 * c-common.h (c_oacc_split_loop_clauses): Add boolean argument.
5116 * c-omp.c (c_oacc_split_loop_clauses): Use it to duplicate
5117 reduction clauses in acc parallel loops.
5119 2016-04-29 Marek Polacek <polacek@redhat.com>
5122 * c-common.c (warn_for_memset): Check domain before accessing it.
5124 2016-04-29 Dominik Vogt <vogt@linux.vnet.ibm.com>
5127 * c-common.c (handle_aligned_attribute): Allow 0 as an argument to the
5128 "aligned" attribute.
5130 2016-04-28 Jason Merrill <jason@redhat.com>
5132 * c-lex.c (c_common_has_attribute): Handle nodiscard.
5134 2016-04-28 Eduard Sanou <dhole@openmailbox.org>
5135 Matthias Klose <doko@debian.org>
5137 * c-common.c (get_source_date_epoch): New function, gets the environment
5138 variable SOURCE_DATE_EPOCH and parses it as long long with error
5140 * c-common.h (get_source_date_epoch): Prototype.
5141 * c-lex.c (c_lex_with_flags): set parse_in->source_date_epoch.
5143 2015-04-27 Ryan Burn <contact@rnburn.com>
5147 * cilk.c (cilk_ignorable_spawn_rhs_op): Change to external linkage.
5148 (cilk_recognize_spawn): Renamed from recognize_spawn and change to
5150 (cilk_detect_and_unwrap): Corresponding changes.
5151 (extract_free_variables): Don't extract free variables from
5152 AGGR_INIT_EXPR slot.
5153 * c-common.h (cilk_ignorable_spawn_rhs_op): Prototype.
5154 (cilk_recognize_spawn): Likewise.
5156 2016-04-27 Bernd Schmidt <bschmidt@redhat.com>
5158 * c.opt (Wmemset-elt-size): New option.
5159 * c-common.c (warn_for_memset): New function.
5160 * c-common.h (warn_for_memset): Declare.
5162 2016-04-25 Jason Merrill <jason@redhat.com>
5164 * c-common.c (handle_unused_attribute): Accept CONST_DECL.
5166 * c-common.h: Declare it.
5167 * c-lex.c (c_common_has_attribute): Add maybe_unused.
5169 2016-04-22 Jason Merrill <jason@redhat.com>
5171 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_range_based_for.
5173 2016-04-20 Ilya Verbin <ilya.verbin@intel.com>
5176 * c-cilkplus.c (c_finish_cilk_clauses): Remove function.
5177 * c-common.h (c_finish_cilk_clauses): Remove declaration.
5179 2016-04-18 Michael Matz <matz@suse.de>
5181 * c-common.c (handle_aligned_attribute): Use SET_TYPE_ALIGN
5184 2016-04-17 Eric Botcazou <ebotcazou@adacore.com>
5186 * c-ada-spec.c (get_underlying_decl): Return the typedef, if any.
5187 (dump_generic_ada_node) <POINTER_TYPE>: Clean up handling of access
5188 to incomplete types.
5189 (dump_nested_type): Remove redundant tests and tidy up.
5190 (print_ada_declaration): Also set TREE_VISITED on the declaration of
5191 a type which is the typedef of an original type.
5193 2016-04-15 Marek Polacek <polacek@redhat.com>
5196 * c-common.c (build_va_arg): Change two asserts into errors and return
5199 2016-04-13 Marek Polacek <polacek@redhat.com>
5202 * c-indentation.c (should_warn_for_misleading_indentation): Bail out
5203 for switch statements, too.
5205 2016-03-28 Jason Merrill <jason@redhat.com>
5207 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_range_based_for.
5209 2016-03-23 Marek Polacek <polacek@redhat.com>
5212 * c.opt (Wignored-attributes): New option.
5214 2016-03-22 David Malcolm <dmalcolm@redhat.com>
5217 * c-indentation.c (warn_for_misleading_indentation): Rewrite the
5218 diagnostic text, reversing the order of the warning and note so
5219 that they appear in source order.
5221 2016-03-17 Marek Polacek <polacek@redhat.com>
5224 * c-common.c (resolve_overloaded_builtin): Set TREE_USED for the fetch
5227 2016-03-14 Jason Merrill <jason@redhat.com>
5229 * c-cppbuiltin.c (c_cpp_builtins): Set __cpp_hex_float.
5231 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_range_based_for.
5233 2016-03-09 Richard Biener <rguenther@suse.de>
5236 * c-common.c (strict_aliasing_warning): Add back
5237 alias_sets_conflict_p check.
5239 2016-03-08 Jason Merrill <jason@redhat.com>
5241 * c-opts.c (set_std_cxx1z): Don't enable concepts.
5243 2016-03-04 David Malcolm <dmalcolm@redhat.com>
5246 * c-indentation.c (get_visual_column): Move code to determine next
5248 (next_tab_stop): ...this new function.
5249 (line_contains_hash_if): Delete function.
5250 (detect_preprocessor_logic): Delete function.
5251 (get_first_nws_vis_column): New function.
5252 (detect_intervening_unindent): New function.
5253 (should_warn_for_misleading_indentation): Replace call to
5254 detect_preprocessor_logic with a call to
5255 detect_intervening_unindent.
5257 2016-03-04 David Malcolm <dmalcolm@redhat.com>
5260 * c-indentation.c (should_warn_for_misleading_indentation): When
5261 suppressing warnings about cases where the guard and body are on
5262 the same column, only use the first non-whitespace column in place
5263 of the guard token column when dealing with "else" clauses.
5264 When rejecting aligned BODY and NEXT, loosen the requirement
5265 from equality with the first non-whitespace of guard to simply
5266 that they not be indented relative to it.
5268 2016-03-04 Richard Biener <rguenther@suse.de>
5271 * c-common.c (strict_aliasing_warning): Use alias_set_subset_of
5272 instead of alias_sets_conflict_p.
5274 2016-03-01 Marek Polacek <polacek@redhat.com>
5277 * c-common.c (reject_gcc_builtin): Check for FUNCTION_DECL rather than
5280 2016-02-22 Martin Sebor <msebor@redhat.com>
5283 * c-common.c (check_builtin_function_arguments): Validate and
5284 reject invalid arguments to __builtin_alloca_with_align.
5286 2016-02-20 Mark Wielaard <mjw@redhat.com>
5289 * c.opt (Wunused-const-variable): Turn into Alias for...
5290 (Wunused-const-variable=): New option.
5292 2016-02-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
5295 * c-opts.c (c_common_post_options): Move call to set_std_cxx14 from
5297 (c_common_init_options): ...to here.
5298 (set_std_cxx98): Initialize flag_isoc94 and flag_isoc99.
5300 2016-02-19 Jakub Jelinek <jakub@redhat.com>
5303 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_GRAINSIZE.
5304 (init_pragma): Register PRAGMA_CILK_GRAINSIZE even for
5305 flag_preprocess_only.
5307 2016-02-16 Jakub Jelinek <jakub@redhat.com>
5310 * c.opt (Wnonnull-compare): Enable for -Wall.
5312 2016-02-15 Jakub Jelinek <jakub@redhat.com>
5315 * c-common.c (sync_resolve_size): Diagnose too few arguments
5316 even when params is non-NULL empty vector.
5318 2016-02-08 Bernd Schmidt <bschmidt@redhat.com>
5321 * c.opt (fshort-double): Remove.
5323 2016-02-05 Martin Sebor <msebor@redhat.com>
5326 * c.opt (Warning options): Update -Wplacement-new to take
5327 an optional argument.
5329 2016-02-01 Jakub Jelinek <jakub@redhat.com>
5331 PR preprocessor/69543
5333 * c-pragma.c (handle_pragma_diagnostic): Pass input_location
5334 instead of loc to control_warning_option.
5336 2016-02-01 Nathan Sidwell <nathan@codesourcery.com>
5338 * c.opt (fopenacc-dim=): New option.
5340 2016-01-27 Ryan Burn <contact@rnburn.com>
5343 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Change to use
5344 gimplify_arg. Removed superfluous post_p argument.
5345 * c-family.h (cilk_gimplify_call_params_in_spawned_fn): Removed
5346 superfluous post_p argument.
5347 * c-gimplify.c (c_gimplify_expr): Likewise.
5349 2016-01-26 David Malcolm <dmalcolm@redhat.com>
5352 * c-opts.c (c_diagnostic_finalizer): Replace invocation of
5353 pp_newline_and_flush with pp_flush.
5355 2016-01-20 Martin Sebor <msebor@redhat.com>
5358 * c-common.c (sync_resolve_size): Avoid printing diagnostic about
5359 an incompatible argument when the argument isn't a valid tree node.
5361 2016-01-18 Jason Merrill <jason@redhat.com>
5364 * c-common.c (check_function_arguments_recurse): Fold the whole
5365 COND_EXPR, not just the condition.
5367 2016-01-18 Tom de Vries <tom@codesourcery.com>
5369 * c-omp.c (c_oacc_split_loop_clauses): Don't copy OMP_CLAUSE_REDUCTION,
5370 classify as loop clause.
5372 2016-01-15 Jakub Jelinek <jakub@redhat.com>
5375 * c-pragma.c (c_register_pragma_1): Adjust comment to note that
5376 C++ FE no longer has limit on number of pragmas.
5378 2015-01-14 Ryan Burn <contact@rnburn.com>
5381 * cilk.c (create_cilk_wrapper_body): Call fold_build_cleanup_point_expr
5382 to add missing cleanup point.
5384 2016-01-14 David Malcolm <dmalcolm@redhat.com>
5387 * c-indentation.c (get_visual_column): Add location_t param.
5388 Handle the column number being zero by effectively disabling the
5389 warning, with an "inform".
5390 (should_warn_for_misleading_indentation): Add location_t argument
5391 for all uses of get_visual_column.
5393 2016-01-10 Patrick Palka <ppalka@gcc.gnu.org>
5396 * c-indentation.c (should_warn_for_misleading_indentation):
5397 Don't warn about do-while statements.
5399 2016-01-07 Martin Sebor <msebor@redhat.com>
5402 * c-common.c (sync_resolve_size): Reject first argument when it's
5405 2016-01-05 David Malcolm <dmalcolm@redhat.com>
5408 * c-indentation.c (get_visual_column): Remove default argument.
5409 (should_warn_for_misleading_indentation): For the multiline case,
5410 update call to get_visual_column for next_stmt_exploc so that it
5411 captures the location of the first non-whitespace character in the
5412 relevant line. Don't issue warnings if there is non-whitespace
5413 before the next statement.
5415 2016-01-04 Jakub Jelinek <jakub@redhat.com>
5417 Update copyright years.
5419 2015-12-21 David Malcolm <dmalcolm@redhat.com>
5421 * c-common.c (binary_op_error): Convert first param from
5422 location_t to rich_location * and use it when emitting an error.
5423 * c-common.h (binary_op_error): Convert first param from
5424 location_t to rich_location *.
5426 2015-12-16 David Malcolm <dmalcolm@redhat.com>
5428 * c-common.h (conflict_marker_get_final_tok_kind): New prototype.
5429 * c-lex.c (conflict_marker_get_final_tok_kind): New function.
5431 2015-12-15 Ilya Verbin <ilya.verbin@intel.com>
5433 * c-common.c (c_common_attribute_table): Handle "omp declare target
5436 2015-12-14 Jakub Jelinek <jakub@redhat.com>
5439 * c.opt (Wmissing-format-attribute, Wnormalized): Add Warning option.
5441 2014-12-12 Tobias Burnus <burnus@net-b.de>
5444 * c-format.c (gcc_gfc_char_table): Add 'q' flag to remaining
5445 specifiers (%d, %i,%u and %c).
5447 2015-12-10 David Malcolm <dmalcolm@redhat.com>
5449 * c.opt (Wmisleading-indentation): Add to -Wall for C and C++.
5451 2015-12-08 Jakub Jelinek <jakub@redhat.com>
5455 * c.opt (Wfloat-conversion, Wsign-conversion): Add Warning.
5456 * c-pragma.c (handle_pragma_diagnostic): Adjust
5457 control_warning_option caller.
5459 2015-12-07 David Malcolm <dmalcolm@redhat.com>
5461 * c-common.c (c_cpp_error): Update for change to
5462 rich_location::set_range.
5464 2015-12-04 Paolo Bonzini <bonzini@gnu.org>
5466 * c-common.c (maybe_warn_shift_overflow): Warn on all overflows if
5467 shifting 1 out of the sign bit.
5469 2015-12-04 Kirill Yukhin <kirill.yukhin@intel.com>
5471 * c-common.c (c_common_attribute_table[]): Update max arguments
5472 count for "simd" attribute.
5473 (handle_simd_attribute): Parse "notinbranch" and "inbranch" arguments.
5475 2015-12-03 Jakub Jelinek <jakub@redhat.com>
5477 PR preprocessor/57580
5478 * c-ppoutput.c (print): Change printed field to bool.
5479 Move src_file last for smaller padding.
5480 (init_pp_output): Set print.printed to false instead of 0.
5481 (scan_translation_unit): Fix up formatting. Set print.printed
5482 to true after printing something other than newline.
5483 (scan_translation_unit_trad): Set print.printed to true instead of 1.
5484 (maybe_print_line_1): Set print.printed to false instead of 0.
5485 (print_line_1): Likewise.
5486 (do_line_change): Set print.printed to true instead of 1.
5487 (cb_define, dump_queued_macros, cb_include, cb_def_pragma,
5488 dump_macro): Set print.printed to false after printing newline.
5490 2015-12-02 Jason Merrill <jason@redhat.com>
5492 * c-common.c (fold_for_warn): New.
5493 (warn_logical_operator, warn_tautological_cmp)
5494 (check_function_arguments_recurse, maybe_warn_bool_compare): Use it.
5496 * c-common.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
5497 (c_fully_fold_internal, decl_constant_value_for_optimization):
5499 * c-common.h: Don't declare decl_constant_value_for_optimization.
5501 2015-12-02 Joseph Myers <joseph@codesourcery.com>
5504 * c-common.h (c_build_qualified_type): Add extra default
5507 2015-12-01 Julian Brown <julian@codesourcery.com>
5508 Cesar Philippidis <cesar@codesourcery.com>
5509 James Norris <James_Norris@mentor.com>
5511 * c-pragma.c (oacc_pragmas): Add PRAGMA_OACC_HOST_DATA.
5512 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_HOST_DATA.
5513 (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_USE_DEVICE.
5515 2015-11-30 Eric Botcazou <ebotcazou@adacore.com>
5517 * c-ada-spec.c (print_ada_macros): Remove redundant blank line.
5518 (decl_sloc_common): Delete and move bulk of processing to...
5519 (decl_sloc): ...here.
5520 (pp_ada_tree_identifier): Remove reference to QUAL_UNION_TYPE.
5521 (dump_ada_double_name): Remove S parameter and compute the suffix.
5522 (dump_ada_array_type): Add PARENT parameter. Simplify computation of
5523 element type and deal with an anonymous one.
5524 (dump_ada_template): Use RECORD_OR_UNION_TYPE_P macro.
5525 (dump_generic_ada_node): Tweak. Adjust call to dump_ada_array_type
5526 and remove reference to QUAL_UNION_TYPE.
5527 (dump_nested_types): Make 2 passes on the fields and move bulk to...
5528 (dump_nested_type): ...here. New function extracted from above.
5529 Generate a full declaration for anonymous element type of arrays.
5530 (print_ada_declaration): Really skip anonymous declarations. Remove
5531 references to QUAL_UNION_TYPE. Adjust call to dump_ada_array_type.
5532 Clean up processing of declarations of array types and objects.
5533 (print_ada_struct_decl): Remove reference to QUAL_UNION_TYPE.
5534 Remove obsolete code and tidy up.
5536 2015-11-29 Jan Hubicka <hubicka@ucw.cz>
5539 * c-common.c (handle_transparent_union_attribute): Update
5542 2015-11-27 Martin Liska <mliska@suse.cz>
5545 * array-notation-common.c (cilkplus_extract_an_triplets):
5546 Release vector of vectors.
5547 * cilk.c (gimplify_cilk_spawn): Free allocated memory.
5549 2015-11-26 Eric Botcazou <ebotcazou@adacore.com>
5552 * c-ada-spec.c (dump_nested_types): Add guard for error_mark_node.
5553 (print_ada_struct_decl): Likewise.
5555 2015-11-23 Igor Zamyatin <igor.zamyatin@intel.com>
5558 * c-gimplify.c (c_gimplify_expr): Stop the process if see an error.
5559 * cilk.c (recognize_spawn): Determine location in a more precise
5562 2015-11-19 Jason Merrill <jason@redhat.com>
5564 * c-common.c (shorten_compare): But look through macros from
5567 2015-11-18 Jason Merrill <jason@redhat.com>
5569 * c-common.c (shorten_compare): Don't -Wtype-limits if the
5570 non-constant operand comes from a macro.
5572 2015-11-17 Jason Merrill <jason@redhat.com>
5575 * c-common.c (warn_tautological_cmp): Fold before checking for
5578 2015-11-16 Marek Polacek <polacek@redhat.com>
5581 * c-common.c (check_case_bounds): Fold low and high cases.
5583 2015-11-16 Marek Polacek <polacek@redhat.com>
5585 * c-ada-spec.c (dump_ada_template): Use RECORD_OR_UNION_TYPE_P.
5586 * c-common.c (c_common_get_alias_set): Likewise.
5587 (handle_visibility_attribute): Likewise.
5589 2015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
5591 * c-common.c (handle_simd_attribute): New.
5592 (struct attribute_spec): Add entry for "simd".
5593 (handle_simd_attribute): New.
5595 2015-11-13 Kai Tietz <ktietz70@googlemail.com>
5597 * c-lex.c (interpret_float): Use fold_convert.
5599 2015-11-13 David Malcolm <dmalcolm@redhat.com>
5601 * c-common.c (c_fully_fold_internal): Capture existing souce_range,
5602 and store it on the result.
5603 * c-opts.c (c_common_init_options): Set
5604 global_dc->colorize_source_p.
5606 2015-11-12 James Norris <jnorris@codesourcery.com>
5607 Joseph Myers <joseph@codesourcery.com>
5609 * c-pragma.c (oacc_pragmas): Add entry for declare directive.
5610 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_DECLARE.
5611 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT and
5612 PRAGMA_OACC_CLAUSE_LINK.
5614 2015-11-11 Marek Polacek <polacek@redhat.com>
5618 * c-common.c (valid_array_size_p): New function.
5619 * c-common.h (valid_array_size_p): Declare.
5621 2015-11-11 Dominique d'Humieres <dominiq@lps.ens.fr>
5624 * c-pragma.c (c_register_pragma_1): Update the gcc_assert to 256.
5626 2015-11-11 Andrew MacLeod <amacleod@redhat.com>
5628 * array-notation-common.c: Remove unused header files.
5629 * c-ada-spec.c: Likewise.
5630 * c-cilkplus.c: Likewise.
5631 * c-common.c: Likewise.
5632 * c-cppbuiltin.c: Likewise.
5633 * c-dump.c: Likewise.
5634 * c-format.c: Likewise.
5635 * c-gimplify.c: Likewise.
5636 * c-indentation.c: Likewise.
5637 * c-lex.c: Likewise.
5638 * c-omp.c: Likewise.
5639 * c-opts.c: Likewise.
5640 * c-pch.c: Likewise.
5641 * c-ppoutput.c: Likewise.
5642 * c-pragma.c: Likewise.
5643 * c-pretty-print.c: Likewise.
5644 * c-semantics.c: Likewise.
5645 * c-ubsan.c: Likewise.
5647 * stub-objc.c: Likewise.
5649 2015-11-09 Thomas Schwinge <thomas@codesourcery.com>
5650 Cesar Philippidis <cesar@codesourcery.com>
5651 James Norris <jnorris@codesourcery.com>
5652 Julian Brown <julian@codesourcery.com>
5653 Nathan Sidwell <nathan@codesourcery.com>
5655 * c-pragma.c (oacc_pragmas): Add "routine".
5656 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ROUTINE.
5658 2015-11-08 Eric Botcazou <ebotcazou@adacore.com>
5660 * c-common.c (c_common_attributes): Add scalar_storage_order.
5661 (handle_scalar_storage_order_attribute): New function.
5662 * c-pragma.c (global_sso): New variable.
5663 (maybe_apply_pragma_scalar_storage_order): New function.
5664 (handle_pragma_scalar_storage_order): Likewise.
5665 (init_pragma): Register scalar_storage_order.
5666 * c-pragma.h (maybe_apply_pragma_scalar_storage_order): Declare.
5667 * c.opt (Wscalar-storage-order): New warning.
5668 (fsso-struct=): New option.
5670 2015-11-08 Martin Sebor <msebor@redhat.com>
5672 * c.opt (Wplacement-new): Add a period to the end of a sentence.
5674 2015-11-07 Richard Sandiford <richard.sandiford@arm.com>
5676 * c-common.c: Don't undef DEF_BUILTIN.
5678 2015-11-06 David Malcolm <dmalcolm@redhat.com>
5680 * c-common.c (c_cpp_error): Convert parameter from location_t to
5681 rich_location *. Eliminate the "column_override" parameter and
5682 the call to diagnostic_override_column.
5683 Update the "done_lexing" clause to set range 0
5684 on the rich_location, rather than overwriting a location_t.
5685 * c-common.h (c_cpp_error): Convert parameter from location_t to
5686 rich_location *. Eliminate the "column_override" parameter.
5688 2015-11-05 Cesar Philippidis <cesar@codesourcery.com>
5689 Thomas Schwinge <thomas@codesourcery.com>
5690 James Norris <jnorris@codesourcery.com>
5692 * c-omp.c (c_oacc_split_loop_clauses): Make TILE, GANG, WORKER, VECTOR,
5693 AUTO, SEQ, INDEPENDENT and PRIVATE loop clauses. Associate REDUCTION
5694 clauses with parallel and kernels and loops.
5695 * c-pragma.h (enum pragma_omp_clause): Add entries for
5696 PRAGMA_OACC_CLAUSE_{INDEPENDENT,TILE,DEFAULT}.
5697 * pt.c (tsubst_omp_clauses): Add support for OMP_CLAUSE_{NUM_GANGS,
5698 NUM_WORKERS,VECTOR_LENGTH,GANG,WORKER,VECTOR,ASYNC,WAIT,TILE,AUTO,
5700 (tsubst_expr): Add support for OMP_CLAUSE_{KERNELS,PARALLEL,LOOP}.
5702 2015-11-05 Martin Sebor <msebor@redhat.com>
5705 * c.opt (-Wplacement-new): New option.
5707 2015-11-05 Jakub Jelinek <jakub@redhat.com>
5709 * c-common.h (c_finish_omp_atomic): Add TEST argument.
5710 (c_omp_check_loop_iv, c_omp_check_loop_iv_exprs): New prototypes.
5711 * c-omp.c (c_finish_omp_atomic): Add TEST argument. Don't call
5712 save_expr or create_tmp_var* if TEST is true.
5713 (c_finish_omp_for): Store OMP_FOR_ORIG_DECLS always.
5714 Don't call add_stmt here.
5715 (struct c_omp_check_loop_iv_data): New type.
5716 (c_omp_check_loop_iv_r, c_omp_check_loop_iv,
5717 c_omp_check_loop_iv_exprs): New functions.
5718 (c_omp_split_clauses): Adjust for lastprivate being allowed on
5720 (c_omp_declare_simd_clauses_to_numbers): Change
5721 OMP_CLAUSE_LINEAR_VARIABLE_STRIDE OMP_CLAUSE_LINEAR_STEP into numbers.
5722 (c_omp_declare_simd_clauses_to_decls): Similarly change those
5723 from numbers to PARM_DECLs.
5725 2015-11-04 Mikhail Maltsev <maltsevm@gmail.com>
5727 * c-omp.c (c_omp_split_clauses): Remove conditional compilation. Use
5730 2015-11-03 Bernd Schmidt <bschmidt@redhat.com>
5733 * c-common.h (fold_offsetof_1): Add argument.
5734 * c-common.c (fold_offsetof_1): Diagnose more invalid
5735 offsetof expressions that reference elements past the end of
5738 2015-11-03 Thomas Schwinge <thomas@codesourcery.com>
5739 Chung-Lin Tang <cltang@codesourcery.com>
5741 * c-pragma.c (oacc_pragmas): Add "atomic".
5742 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ATOMIC.
5744 2015-10-30 Evgeny Stupachenko <evstupac@gmail.com>
5746 * c-common.c (handle_target_clones_attribute): New.
5747 (c_common_attribute_table): Add handle_target_clones_attribute.
5748 (handle_always_inline_attribute): Add check on target_clones attribute.
5749 (handle_target_attribute): Ditto.
5751 2015-10-29 Andrew MacLeod <amacleod@redhat.com>
5753 * array-notation-common.c: Reorder #include's and remove duplicates.
5754 * c-ada-spec.c: Likewise.
5755 * c-cilkplus.c: Likewise.
5756 * c-common.c: Likewise.
5757 * c-cppbuiltin.c: Likewise.
5758 * c-dump.c: Likewise.
5759 * c-format.c: Likewise.
5760 * c-gimplify.c: Likewise.
5761 * c-indentation.c: Likewise.
5762 * c-lex.c: Likewise.
5763 * c-omp.c: Likewise.
5764 * c-opts.c: Likewise.
5765 * c-pch.c: Likewise.
5766 * c-ppoutput.c: Likewise.
5767 * c-pragma.c: Likewise.
5768 * c-pretty-print.c: Likewise.
5769 * c-semantics.c: Likewise.
5770 * c-ubsan.c: Likewise.
5772 * stub-objc.c: Likewise.
5774 2015-10-28 Jason Merrill <jason@redhat.com>
5776 * c-common.c (pointer_int_sum): Fold the MULT_EXPR.
5778 2015-10-27 Thomas Schwinge <thomas@codesourcery.com>
5779 James Norris <jnorris@codesourcery.com>
5780 Cesar Philippidis <cesar@codesourcery.com>
5784 * c-common.h (c_oacc_split_loop_clauses): Declare function.
5785 * c-omp.c (c_oacc_split_loop_clauses): New function.
5787 2015-10-21 Martin Sebor <msebor@redhat.com>
5790 * c.opt: End each sentence that describes an option with a period.
5792 2015-10-20 Marek Polacek <polacek@redhat.com>
5794 * array-notation-common.c (is_cilkplus_vector_p): Define.
5795 * c-common.h (is_cilkplus_vector_p): Declare.
5797 2015-10-20 Marek Polacek <polacek@redhat.com>
5799 * c.opt (std=gnu++11): Do not describe as experimental.
5800 (std=gnu++14): Likewise.
5802 2015-10-19 Jason Merrill <jason@redhat.com>
5804 * c-cppbuiltin.c (c_cpp_builtins): Define
5805 __cpp_nontype_template_args.
5807 2015-10-19 Jason Merrill <jason@redhat.com>
5809 * c-cppbuiltin.c (c_cpp_builtins): Define
5810 __cpp_enumerator_attributes, __cpp_fold_expressions,
5811 __cpp_unicode_characters.
5813 2015-10-13 Jakub Jelinek <jakub@redhat.com>
5814 Aldy Hernandez <aldyh@redhat.com>
5816 * c-common.c (enum c_builtin_type): Define DEF_FUNCTION_TYPE_9,
5817 DEF_FUNCTION_TYPE_10 and DEF_FUNCTION_TYPE_11.
5818 (c_define_builtins): Likewise.
5819 * c-common.h (enum c_omp_clause_split): Add
5820 C_OMP_CLAUSE_SPLIT_TASKLOOP.
5821 (c_finish_omp_critical, c_finish_omp_ordered): Add CLAUSES argument.
5822 (c_finish_omp_for): Add ORIG_DECLV argument.
5823 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP as
5824 201511 instead of 201307.
5825 * c-omp.c (c_finish_omp_critical): Add CLAUSES argument, set
5826 OMP_CRITICAL_CLAUSES to it.
5827 (c_finish_omp_ordered): Add CLAUSES argument, set
5828 OMP_ORDERED_CLAUSES to it.
5829 (c_finish_omp_for): Add ORIG_DECLV argument, set OMP_FOR_ORIG_DECLS
5830 to it if OMP_FOR. Clear DECL_INITIAL on the IVs.
5831 (c_omp_split_clauses): Handle OpenMP 4.5 combined/composite
5832 constructs and new OpenMP 4.5 clauses. Clear
5833 OMP_CLAUSE_SCHEDULE_SIMD if not combined with OMP_SIMD. Add
5835 * c-pragma.c (omp_pragmas_simd): Add taskloop.
5836 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKLOOP.
5837 (enum pragma_omp_clause): Add
5838 PRAGMA_OMP_CLAUSE_{DEFAULTMAP,GRAINSIZE,HINT,{IS,USE}_DEVICE_PTR}
5839 and PRAGMA_OMP_CLAUSE_{LINK,NOGROUP,NUM_TASKS,PRIORITY,SIMD,THREADS}.
5841 2015-10-05 Richard Sandiford <richard.sandiford@arm.com>
5843 * c-lex.c (interpret_float): Use real_equal instead of
5846 2015-10-04 Jason Merrill <jason@redhat.com>
5848 Implement N4514, C++ Extensions for Transactional Memory.
5849 * c-common.c (c_common_reswords): Add C++ TM TS keywords.
5850 (c_common_attribute_table): Add transaction_safe_dynamic.
5851 transaction_safe now affects type identity.
5852 (handle_tm_attribute): Handle transaction_safe_dynamic.
5853 * c-common.h (enum rid): Add RID_ATOMIC_NOEXCEPT,
5854 RID_ATOMIC_CANCEL, RID_SYNCHRONIZED.
5855 (OBJC_IS_CXX_KEYWORD): Add RID_SYNCHRONIZED.
5857 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_transactional_memory.
5858 * c-pretty-print.c (pp_c_attributes_display): Don't print
5859 transaction_safe in C++.
5861 2015-10-02 Marek Polacek <polacek@redhat.com>
5863 * c.opt (Wduplicated-cond): Don't enable by -Wall anymore.
5865 2015-10-02 Marek Polacek <polacek@redhat.com>
5868 * c-common.c (warn_duplicated_cond_add_or_warn): New function.
5869 * c-common.h (warn_duplicated_cond_add_or_warn): Declare.
5870 * c.opt (Wduplicated-cond): New option.
5872 2015-10-01 Joseph Myers <joseph@codesourcery.com>
5874 * c.opt (std=c11): Do not describe as experimental.
5875 (std=gnu11): Likewise.
5876 (std=iso9899:2011): Likewise.
5878 2015-09-28 Nathan Sidwell <nathan@codesourcery.com>
5880 * c-common.c (DEF_FUNCTION_TYPE_VAR_6): New.
5881 (DEF_FUNCTION_TYPE_VAR_11): Delete.
5883 2015-09-25 Marek Polacek <polacek@redhat.com>
5885 * c-ubsan.c (ubsan_instrument_division): Remove unnecessary code.
5886 (ubsan_instrument_shift): Likewise.
5888 2015-09-25 Marek Polacek <polacek@redhat.com>
5891 * c-ubsan.c (ubsan_instrument_division): Also pre-evaluate OP1.
5893 2015-09-24 Patrick Palka <ppalka@gcc.gnu.org>
5895 * c-indentation.c (should_warn_for_misleading_indentation):
5896 Compare next_stmt_vis_column with guard_line_first_nws instead
5897 of with guard_line_vis_column.
5899 2015-09-23 Manuel López-Ibáñez <manu@gcc.gnu.org>
5903 * c-pragma.c (handle_pragma_diagnostic): Detect non-warning
5904 options and options not valid for the current language.
5906 2015-09-22 Patrick Palka <ppalka@gcc.gnu.org>
5908 * c-indentation.c (should_warn_for_misleading_indentation):
5909 Float out and consolidate the calls to get_visual_column that
5910 are passed guard_exploc as an argument. Compare
5911 next_stmt_vis_column with guard_line_first_nws instead of with
5912 body_line_first_nws.
5914 2015-09-22 Nathan Sidwell <nathan@codesourcery.com>
5916 * c.opt (Wmultiple-inheritance, Wvirtual-inheritance, Wtemplates,
5917 Wnamespaces): New C++ warnings.
5919 2015-09-22 Jason Merrill <jason@redhat.com>
5921 * c-common.h (abi_compat_version_crosses): New.
5922 (warn_abi_version): Declare.
5923 * c-common.c: Define it.
5924 * c-opts.c (c_common_post_options): Handle it.
5925 flag_abi_compat_version defaults to 8.
5927 2015-09-21 Ville Voutilainen <ville.voutilainen@gmail.com>
5929 Complete the implementation of N4230, Nested namespace definition.
5930 * c-cppbuiltin.c: Add __cpp_namespace_attributes and
5931 __cpp_nested_namespace_definitions.
5933 2015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
5935 * c-pragma.c (handle_pragma_diagnostic): Fix wrong return.
5937 2015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
5939 * c-pragma.c (handle_pragma_diagnostic): Use explicit location
5941 * c-pragma.h (pragma_lex): Add optional loc argument.
5943 2015-09-16 Mikhail Maltsev <maltsevm@gmail.com>
5945 * c-format.c (check_format_arg): Adjust to use common block size in all
5948 2015-09-15 David Malcolm <dmalcolm@redhat.com>
5950 * c-format.c (location_from_offset): Update for change in
5951 signature of location_get_source_line.
5952 * c-indentation.c (get_visual_column): Likewise.
5953 (line_contains_hash_if): Likewise.
5955 2015-09-14 Marek Polacek <polacek@redhat.com>
5957 * c-opts.c (c_common_post_options): Set C++ standard earlier, before
5958 setting various warnings.
5960 2015-09-14 Marek Polacek <polacek@redhat.com>
5962 * c-common.c (warn_for_sign_compare): Cast to unsigned when shifting
5965 2015-09-11 Mark Wielaard <mjw@redhat.com>
5968 * c.opt (Wunused-variable): Option from common.opt.
5969 (Wunused-const-variable): New option.
5971 2015-09-09 Paolo Carlini <paolo.carlini@oracle.com>
5974 * c.opt ([Wsubobject-linkage]): Add.
5976 2015-09-03 Martin Sebor <msebor@redhat.com>
5979 * c-common.h (c_decl_implicit, reject_gcc_builtin): Declare new
5981 * c-common.c (reject_gcc_builtin): Define.
5983 2015-09-02 Balaji V. Iyer <balaji.v.iyer@intel.com>
5986 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): New
5988 * c-gimplify.c (c_gimplify_expr): Added a call to the function
5989 cilk_gimplify_call_params_in_spawned_fn.
5990 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): New function.
5991 (gimplify_cilk_spawn): Removed EXPR_STMT and CLEANUP_POINT_EXPR
5994 2015-08-25 Marek Polacek <polacek@redhat.com>
5997 * c-common.c (handle_weak_attribute): Don't check whether the
5998 visibility can be changed here.
6000 2015-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
6002 * c-lex.c (c_lex_with_flags): Use explicit locations.
6004 2015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
6006 * c-ada-spec.h, c-common.c, c-common.h, c-format.c, c-format.h,
6007 c-objc.h, c-ppoutput.c, c-pragma.c, c-pragma.h: Remove useless
6009 2015-08-18 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
6012 * c-common.c (check_builtin_function_arguments): Add check
6013 for BUILT_IN_SIGNBIT argument.
6015 2015-08-18 Paolo Carlini <paolo.carlini@oracle.com>
6018 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_static_assert value
6021 2015-08-17 Marek Polacek <polacek@redhat.com>
6023 * c-pretty-print.c (pp_c_cv_qualifiers): Remove code dealing
6024 with whitespaces before qualifier names.
6026 2015-08-12 Marek Polacek <polacek@redhat.com>
6029 * c-common.c (maybe_warn_shift_overflow): Properly handle
6030 left-shifting 1 into the sign bit.
6032 2015-08-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
6034 * c.opt (Wchkp): Use LangEnabledBy instead of EnabledBy.
6036 2015-08-06 Andrew Sutton <andrew.n.sutton@gmail.com>
6037 Braden Obrzut <admin@maniacsvault.net>
6038 Jason Merrill <jason@redhat.com>
6040 Add C++ Concepts TS support.
6041 * c-common.c (c_common_reswords): Add __is_same_as, concept, requires.
6042 * c-common.h (enum rid): Add RID_IS_SAME_AS, RID_CONCEPT, RID_REQUIRES.
6043 (D_CXX_CONCEPTS, D_CXX_CONCEPTS_FLAGS): New.
6044 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_concepts.
6045 * c-opts.c (set_std_cxx1z): Set flag_concepts.
6046 * c.opt (fconcepts): New.
6048 2015-08-02 Martin Sebor <msebor@redhat.com>
6050 * c.opt (-Wframe-address): New warning option.
6052 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
6054 * c-indentation.c (should_warn_for_misleading_indentation):
6057 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
6059 * c-indentation.c (get_visual_column): Add parameter first_nws,
6060 use it. Update comment documenting the function.
6061 (is_first_nonwhitespace_on_line): Remove.
6062 (should_warn_for_misleading_indentation): Replace usage of
6063 of is_first_nonwhitespace_on_line with get_visual_column.
6065 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
6067 * c-indentation.h (struct token_indent_info): Define.
6068 (get_token_indent_info): Define.
6069 (warn_for_misleading_information): Declare.
6070 * c-common.h (warn_for_misleading_information): Remove.
6071 * c-identation.c (warn_for_misleading_indentation):
6072 Change declaration to take three token_indent_infos. Adjust
6074 * c-identation.c (should_warn_for_misleading_indentation):
6075 Likewise. Bail out early if the body is a compound statement.
6076 (guard_tinfo_to_string): Define.
6078 2015-07-30 Jason Merrill <jason@redhat.com>
6080 * c-pretty-print.c (unary_expression) [INDIRECT_REF]: Don't print
6081 '*' for reference decay.
6083 2015-07-30 Marek Polacek <polacek@redhat.com>
6085 * c-common.c (warn_tautological_cmp): Bail for float types.
6087 2015-07-27 Marek Polacek <polacek@redhat.com>
6090 * c-common.c (warn_tautological_cmp): Don't warn for macro expansion.
6092 2015-07-27 Marek Polacek <polacek@redhat.com>
6096 * c-common.c (find_array_ref_with_const_idx_r): New function.
6097 (warn_tautological_cmp): New function.
6098 * c-common.h (warn_tautological_cmp): Declare.
6099 * c.opt (Wtautological-compare): New option.
6101 2015-07-23 Marek Polacek <polacek@redhat.com>
6103 * c-ubsan.c (ubsan_instrument_division): Use unshare_expr throughout.
6104 (ubsan_instrument_shift): Likewise.
6106 2015-07-23 Marek Polacek <polacek@redhat.com>
6109 * c-ubsan.c: Include gimplify.h.
6110 (ubsan_instrument_division): Unshare OP0 and OP1.
6111 (ubsan_instrument_shift): Likewise.
6113 2015-07-20 Marek Polacek <polacek@redhat.com>
6114 Richard Sandiford <richard.sandiford@arm.com>
6117 * c-common.c (c_fully_fold_internal): Warn about left shift overflows.
6118 Use EXPR_LOC_OR_LOC.
6119 (maybe_warn_shift_overflow): New function.
6120 * c-common.h (maybe_warn_shift_overflow): Declare.
6121 * c-opts.c (c_common_post_options): Set warn_shift_overflow.
6122 * c.opt (Wshift-overflow): New option.
6124 2015-07-16 Martin Liska <mliska@suse.cz>
6126 * c-format.c (static void check_format_info_main): Use
6127 object_allocator instead of pool_allocator.
6128 (check_format_arg): Likewise.
6129 (check_format_info_main): Likewise.
6131 2015-07-15 Andrew MacLeod <amacleod@redhat.com>
6133 * c-opts.c: Remove multiline #include comment.
6135 2015-07-12 Aldy Hernandez <aldyh@redhat.com>
6137 * c-common.c: Fix double word typos.
6139 2015-07-10 Eric Botcazou <ebotcazou@adacore.com>
6141 * c-ada-spec.h (cpp_operation): Revert latest change.
6142 * c-ada-spec.c (print_ada_declaration): Likewise. Skip implicit
6143 constructors and destructors.
6145 2015-07-09 Andrew MacLeod <amacleod@redhat.com>
6147 * c-common.h: Adjust includes for flags.h changes.
6148 * stub-objc.c: Likewise.
6150 2015-07-08 Eric Botcazou <ebotcazou@adacore.com>
6152 * c-ada-spec.h (cpp_operation): Add IS_CONSTEXPR.
6153 * c-ada-spec.c (print_ada_declaration): Skip constexpr constructors.
6155 2015-07-08 Jakub Jelinek <jakub@redhat.com>
6157 * c-omp.c (c_omp_declare_simd_clauses_to_numbers): If all clauses
6158 are to be removed, return NULL rather than original clauses list.
6160 2015-07-07 Andrew MacLeod <amacleod@redhat.com>
6162 * array-notation-common.c: Adjust includes.
6163 * c-ada-spec.c: Likewise.
6164 * c-cilkplus.c: Likewise.
6165 * c-common.h: Likewise.
6166 * c-cppbuiltin.c: Likewise.
6167 * c-dump.c: Likewise.
6168 * c-format.c: Likewise.
6169 * c-gimplify.c: Likewise.
6170 * c-indentation.c: Likewise.
6171 * c-lex.c: Likewise.
6172 * c-omp.c: Likewise.
6173 * c-opts.c: Likewise.
6174 * c-pch.c: Likewise.
6175 * c-ppoutput.c: Likewise.
6176 * c-pragma.c: Likewise.
6177 * c-pretty-print.c: Likewise.
6178 * c-semantics.c: Likewise.
6179 * c-ubsan.c: Likewise.
6181 * stub-objc.c: Likewise.
6183 2015-07-07 Eric Botcazou <ebotcazou@adacore.com>
6185 * c-ada-spec.h (cpp_operation): Add IS_MOVE_CONSTRUCTOR.
6186 * c-ada-spec.c (print_ada_declaration): Skip move constructors.
6188 2015-07-01 Jason Merrill <jason@redhat.com>
6190 * c-common.h (D_CXX11): Rename from D_CXX0X.
6191 (RID_FIRST_CXX11, RID_LAST_CXX11): Rename from *_CXX0X.
6192 * c-common.c: Adjust.
6194 * c-opts.c (c_common_post_options): Default to C++14.
6196 * c-opts.c (c_common_post_options): Highest ABI level is now 10.
6198 2015-06-30 Edward Smith-Rowland <3dw4rd@verizon.net>
6200 Implement N4197 - Adding u8 character literals
6201 * c-ada-spec.c (print_ada_macros): Treat CPP_UTF8CHAR like
6203 * c-common.c (c_parse_error): Print CPP_UTF8CHAR and
6204 CPP_UTF8CHAR_USERDEF tokens.
6205 * c-lex.c (c_lex_with_flags): Treat CPP_UTF8CHAR_USERDEF
6206 and CPP_UTF8CHAR tokens.
6207 (lex_charconst): Treat CPP_UTF8CHAR token.
6209 2015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
6212 * c-common.c (do_warn_unused_parameter): Move here.
6213 * c-common.h (do_warn_unused_parameter): Declare.
6215 2015-06-29 Marek Polacek <polacek@redhat.com>
6218 * c-common.c (check_case_bounds): Add bool * parameter. Set
6220 (c_add_case_label): Add bool * parameter. Pass it down to
6222 (c_do_switch_warnings): Add bool parameters. Implement -Wswitch-bool
6224 * c-common.h (c_add_case_label, c_do_switch_warnings): Update
6227 2015-06-27 Marek Polacek <polacek@redhat.com>
6229 * c-common.c (check_main_parameter_types): Use VECTOR_TYPE_P
6230 or VECTOR_INTEGER_TYPE_P throughout.
6231 * c-gimplify.c: Likewise.
6233 2015-06-26 Marek Polacek <polacek@redhat.com>
6235 * array-notation-common.c (find_rank): Use INDIRECT_REF_P.
6236 * c-common.c (c_fully_fold_internal): Likewise.
6237 (c_alignof_expr): Likewise.
6238 * c-pretty-print.c (c_pretty_printer::postfix_expression): Likewise.
6239 * c-ubsan.c (ubsan_instrument_bounds): Likewise.
6240 * cilk.c (create_parm_list): Likewise.
6242 2015-06-26 Marek Polacek <polacek@redhat.com>
6244 * c-common.c (handle_unused_attribute): Use VAR_OR_FUNCTION_DECL_P.
6246 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
6248 * c-common.c: Remove ipa-ref.h and plugin-api.h from include list.
6249 * c-gimplify.c: Likewise.
6250 * c-pragma.c: Likewise.
6251 * c-ubsan.c: Likewise.
6254 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
6256 * c-common.c (c_type_hasher): Inherit from ggc_ptr_hash rather than
6259 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
6261 * cilk.c: Move calls.h after tm.h in the include chain.
6263 2015-06-25 Marek Polacek <polacek@redhat.com>
6265 * array-notation-common.c: Use VAR_P throughout.
6266 * c-ada-spec.c: Likewise.
6267 * c-common.c: Likewise.
6268 * c-format.c: Likewise.
6269 * c-gimplify.c: Likewise.
6270 * c-omp.c: Likewise.
6271 * c-pragma.c: Likewise.
6272 * c-pretty-print.c: Likewise.
6275 2015-06-25 Marek Polacek <polacek@redhat.com>
6277 * cilk.c (extract_free_variables): Use is_global_var.
6279 2015-06-23 Richard Sandiford <richard.sandiford@arm.com>
6281 * c-common.c: Don't include target-def.h.
6283 2015-06-23 Marek Polacek <polacek@redhat.com>
6285 * c-common.c (warn_logical_operator): Use tree_int_cst_equal
6286 when comparing INTEGER_CSTs.
6288 2015-06-22 Pierre-Marie de Rodat <derodat@adacore.com>
6290 * c-ada-spec.h (cpp_operation): Add HAS_DEPENDENT_TEMPLATE_ARGS.
6291 * c-ada-spec.c (collect_ada_nodes): Skip NAMESPACE_DECL
6292 (dump_ada_template): Skip partially specialized types.
6294 2015-06-22 Mikhail Maltsev <maltsevm@gmail.com>
6296 * c-common.c (scalar_to_vector): Use std::swap instead of manually
6299 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
6301 * array-notation-common.c: Do not include input.h, line-map.h or is-a.h.
6302 * c-ada-spec.c: Likewise.
6303 * c-cilkplus.c: Likewise.
6304 * c-common.c: Likewise.
6305 * c-common.h: Likewise.
6306 * c-cppbuiltin.c: Likewise.
6307 * c-dump.c: Likewise.
6308 * c-format.c: Likewise.
6309 * c-gimplify.c: Likewise.
6310 * c-indentation.c: Likewise.
6311 * c-lex.c: Likewise.
6312 * c-omp.c: Likewise.
6313 * c-opts.c: Likewise.
6314 * c-pch.c: Likewise.
6315 * c-ppoutput.c: Likewise.
6316 * c-pragma.c: Likewise.
6317 * c-pretty-print.c: Likewise.
6318 * c-semantics.c: Likewise.
6319 * c-ubsan.c: Likewise.
6321 * stub-objc.c: Likewise.
6323 2015-06-13 Patrick Palka <ppalka@gcc.gnu.org>
6326 * c-common.c (c_common_truthvalue_conversion): Warn when
6327 converting an address of a reference to a truth value.
6329 2015-06-08 Andrew MacLeod <amacleod@redhat.com>
6331 * array-notation-common.c : Adjust include files.
6332 * c-ada-spec.c : Likewise.
6333 * c-cilkplus.c : Likewise.
6334 * c-common.c : Likewise.
6335 * c-common.h : Likewise.
6336 * c-cppbuiltin.c : Likewise.
6337 * c-dump.c : Likewise.
6338 * c-format.c : Likewise.
6339 * c-gimplify.c : Likewise.
6340 * c-indentation.c : Likewise.
6341 * c-lex.c : Likewise.
6342 * c-omp.c : Likewise.
6343 * c-opts.c : Likewise.
6344 * c-pch.c : Likewise.
6345 * c-ppoutput.c : Likewise.
6346 * c-pragma.c : Likewise.
6347 * c-pretty-print.c : Likewise.
6348 * c-semantics.c : Likewise.
6349 * c-ubsan.c : Likewise.
6350 * cilk.c : Likewise.
6351 * stub-objc.c : Likewise.
6353 2015-06-08 Marek Polacek <polacek@redhat.com>
6356 * c-format.c (location_from_offset): Return LOC if LINE is null.
6358 2015-06-05 Aldy Hernandez <aldyh@redhat.com>
6360 * c-common.h (c_parse_final_cleanups): New prototype.
6361 * c-opts.c (c_common_parse_file): Call c_parse_final_cleanups.
6363 2015-06-04 Sriraman Tallam <tmsriram@google.com>
6365 * c-common.c (noplt): New attribute.
6366 (handle_noplt_attribute): New handler.
6368 2015-06-04 Andrew MacLeod <amacleod@redhat.com>
6370 * array-notation-common.c: Adjust includes for restructured coretypes.h.
6371 * c-ada-spec.c: Likewise.
6372 * c-cilkplus.c: Likewise.
6373 * c-common.c: Likewise.
6374 * c-common.h: Likewise.
6375 * c-cppbuiltin.c: Likewise.
6376 * c-dump.c: Likewise.
6377 * c-format.c: Likewise.
6378 * c-gimplify.c: Likewise.
6379 * c-indentation.c: Likewise.
6380 * c-lex.c: Likewise.
6381 * c-omp.c: Likewise.
6382 * c-opts.c: Likewise.
6383 * c-pch.c: Likewise.
6384 * c-ppoutput.c: Likewise.
6385 * c-pragma.c: Likewise.
6386 * c-pretty-print.c: Likewise.
6387 * c-semantics.c: Likewise.
6388 * c-ubsan.c: Likewise.
6390 * stub-objc.c: Likewise.
6392 2015-06-02 David Malcolm <dmalcolm@redhat.com>
6395 * c-indentation.c (should_warn_for_misleading_indentation): Use
6396 expand_location rather than expand_location_to_spelling_point.
6397 Don't warn if the guarding statement is more indented than the
6400 2015-06-02 David Malcolm <dmalcolm@redhat.com>
6402 * c-indentation.c (warn_for_misleading_indentation): Bail out
6403 immediately if -Wmisleading-indentation isn't enabled.
6405 2015-06-01 Martin Liska <mliska@suse.cz>
6407 * c-format.c (check_format_arg):Use new type-based pool allocator.
6408 (check_format_info_main) Likewise.
6410 2015-05-31 Eric Botcazou <ebotcazou@adacore.com>
6412 * c-ada-spec.c (is_tagged_type): Test for TYPE_METHODS on main variant.
6413 (has_nontrivial_methods): Likewise.
6415 2015-05-25 Marek Polacek <polacek@redhat.com>
6417 * c-ubsan.c (ubsan_instrument_shift): Use type0.
6419 2015-05-22 Marek Polacek <polacek@redhat.com>
6422 * c-common.c (handle_deprecated_attribute): Allow CONST_DECL.
6424 2015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
6426 * c-cppbuiltin.c (c_cpp_builtins): Use if instead of #if with
6427 STACK_GROWS_DOWNWARD.
6429 2015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
6431 * c-cppbuiltin.c (c_cpp_builtins): Check the value of
6432 STACK_GROWS_DOWNWARD rather than if it is defined.
6434 2015-05-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
6437 * c-format.c (location_column_from_byte_offset): New.
6438 (location_from_offset): New.
6439 (struct format_wanted_type): Add offset_loc field.
6440 (check_format_info): Move handling of location for extra arguments
6441 closer to the point of warning.
6442 (check_format_info_main): Pass the result of location_from_offset
6444 (format_type_warning): Pass the result of location_from_offset
6447 2015-05-20 Marek Polacek <polacek@redhat.com>
6449 * c-omp.c (check_omp_for_incr_expr): Use BINARY_CLASS_P.
6451 2015-05-20 Marek Polacek <polacek@redhat.com>
6453 * c-ada-spec.c (dump_sloc): Use DECL_P.
6455 2015-05-20 Marek Polacek <polacek@redhat.com>
6457 * c-pragma.c: Use VAR_OR_FUNCTION_DECL_P throughout.
6458 * c-common.c: Likewise.
6460 2015-05-19 David Malcolm <dmalcolm@redhat.com>
6462 * c-common.h (fe_file_change): Strengthen param from
6463 const line_map * to const line_map_ordinary *.
6464 (pp_file_change): Likewise.
6465 * c-lex.c (fe_file_change): Likewise.
6466 (cb_define): Use linemap_check_ordinary when invoking
6468 (cb_undef): Likewise.
6469 * c-opts.c (c_finish_options): Use linemap_check_ordinary when
6470 invoking cb_file_change.
6471 (c_finish_options): Likewise.
6472 (push_command_line_include): Likewise.
6473 (cb_file_change): Strengthen param "new_map" from
6474 const line_map * to const line_map_ordinary *.
6475 * c-ppoutput.c (cb_define): Likewise for local "map".
6476 (pp_file_change): Likewise for param "map" and local "from".
6478 2015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
6480 * c-common.c (shorten_compare): Use std::swap instead of explicit swaps.
6482 2015-05-18 Tom de Vries <tom@codesourcery.com>
6484 * c-common.c (build_va_arg_1): New function.
6485 (build_va_arg): Add address operator to va_list operand if necessary.
6487 2015-05-15 Mikhail Maltsev <maltsevm@gmail.com>
6490 * c-common.c (int_safely_convertible_to_real_p): Define.
6491 (unsafe_conversion_p): Check conversions involving complex types.
6492 (conversion_warning): Add new warning message for conversions which
6493 discard imaginary component.
6494 * c-common.h: (enum conversion_safety): Add new enumerator for such
6497 2015-05-14 Marek Polacek <polacek@redhat.com>
6501 * c-common.c (c_fully_fold): Pass false down to c_fully_fold_internal.
6502 (c_fully_fold_internal): Fold C_MAYBE_CONST_EXPRs with
6503 C_MAYBE_CONST_EXPR_INT_OPERANDS set. Add FOR_INT_CONST argument and
6504 use it. If FOR_INT_CONST, require that all evaluated operands be
6507 2015-05-12 David Malcolm <dmalcolm@redhat.com>
6509 * c-common.h (warn_for_misleading_indentation): New prototype.
6510 * c-indentation.c: New file.
6511 * c.opt (Wmisleading-indentation): New option.
6513 2015-05-12 Tom de Vries <tom@codesourcery.com>
6515 PR tree-optimization/66010
6516 * c-common.c (build_va_arg): Don't mark ap addressable unless necessary.
6518 2015-05-09 Jason Merrill <jason@redhat.com>
6520 * c-opts.c (c_common_post_options): Also clear
6521 cpp_opts->cpp_warn_cxx11_compat.
6523 * c-common.h (enum cxx_dialect): Add cxx_unset.
6524 * c-common.c (cxx_dialect): Initialize to cxx_unset.
6525 * c-opts.c (c_common_post_options): Set C++ dialect to C++98 if unset.
6527 * c.opt (std=c++14): Remove Undocumented flag and experimental warning.
6528 (std=gnu++0x): Mark as Undocumented.
6529 (std=gnu++1y): Add deprecated message.
6531 2015-05-08 Jason Merrill <jason@redhat.com>
6533 * c.opt (Wc++11-compat): Make primary. Rename var warn_cxx11_compat.
6536 * c.opt (Wc++0x-compat): Also set cpp_warn_cxx11_compat.
6538 2015-05-08 Marek Polacek <polacek@redhat.com>
6541 * c.opt (Woverride-init-side-effects): New option.
6543 2015-05-07 Marek Polacek <polacek@redhat.com>
6546 * c-common.c (c_fully_fold_internal): Warn when left shifting a
6548 * c.opt (Wshift-negative-value): New option.
6549 * c-opts.c (c_common_post_options): Set warn_shift_negative_value
6550 when -Wextra and C99/C++11 mode.
6552 2015-05-07 Marek Polacek <polacek@redhat.com>
6553 Martin Uecker <uecker@eecs.berkeley.edu>
6555 * c-ubsan.c (ubsan_instrument_bounds): Don't skip instrumenting
6556 flexible member array-like members if SANITIZE_BOUNDS_STRICT.
6558 2015-05-05 Jason Merrill <jason@redhat.com>
6560 * c.opt (Wterminate): New.
6562 2015-04-30 Marek Polacek <polacek@redhat.com>
6564 * c-common.c (maybe_warn_bool_compare): When comparing with 0/1,
6565 require that the non-constant be of a boolean type.
6567 2015-04-29 Josh Triplett <josh@joshtriplett.org>
6569 * c-common.c (handle_section_attribute): Refactor to reduce
6570 nesting and distinguish between error cases.
6572 2015-04-29 Marek Polacek <polacek@redhat.com>
6575 * c-common.c (maybe_warn_bool_compare): Warn when comparing a boolean
6578 2015-04-29 Jakub Jelinek <jakub@redhat.com>
6580 * c-common.h (omp_clause_mask): Unconditionally define as a class.
6581 Use uint64_t instead of unsigned HOST_WIDE_INT and 64 instead of
6582 HOST_BITS_PER_WIDE_INT.
6584 2015-04-28 Tom de Vries <tom@codesourcery.com>
6586 PR tree-optimization/65887
6587 * c-common.c (build_va_arg): Mark va_arg ap argument as addressable.
6589 2015-04-28 Eric Botcazou <ebotcazou@adacore.com>
6590 Pierre-Marie de Rodat <derodat@adacore.com>
6592 * c-ada-spec.c (in_function): Delete.
6593 (dump_generic_ada_node): Do not change in_function and remove the
6594 redundant code dealing with it.
6595 (print_ada_declaration): Do not change in_function. Use INDENT_INCR.
6596 (print_ada_methods): Output the static member functions in a nested
6597 package after the regular methods as well as associated renamings.
6599 2015-04-24 Marek Polacek <polacek@redhat.com>
6602 * c-common.c (c_fully_fold_internal): Use OPT_Wshift_count_negative
6603 and OPT_Wshift_count_overflow.
6606 * c-common.c (warn_logical_operator): Warn if the operands have the
6609 2015-04-24 Marek Polacek <polacek@redhat.com>
6612 * c-common.c (warn_logical_operator): Bail if either operand comes
6613 from a macro expansion.
6615 2015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
6618 * c-common.c (c_default_pointer_mode): Add definition.
6619 * c-common.h (c_default_pointer_mode): Add declaration.
6621 2015-03-11 Jakub Jelinek <jakub@redhat.com>
6623 * c-common.c (c_common_nodes_and_builtins): Don't call xstrdup
6624 on record_builtin_type argument.
6626 2015-03-10 Jakub Jelinek <jakub@redhat.com>
6629 * c-common.c (warn_logical_not_parentheses): Don't warn for
6632 2015-03-07 Marek Polacek <polacek@redhat.com>
6635 * c-ubsan.c (ubsan_instrument_bounds): Check for COMPONENT_REF
6636 before trying to figure out whether we have a flexible array member.
6638 2015-03-06 Eric Botcazou <ebotcazou@adacore.com>
6639 Jonathan Wakely <jwakely.gcc@gmail.com>
6641 * c-ada-spec.c (dump_ada_double_name): Fix pasto.
6643 2015-03-05 Eric Botcazou <ebotcazou@adacore.com>
6646 * c-ada-spec.c (print_destructor): Remove obsolete code.
6648 2015-03-01 Eric Botcazou <ebotcazou@adacore.com>
6650 * c-ada-spec.c (is_tagged_type): Add guard for DECL_VINDEX.
6651 (dump_template_types): Adjust DECL_TEMPLATE_INSTANTIATIONS and
6652 DECL_TEMPLATE_RESULT emulations.
6653 (dump_ada_template)): Add guard for TYPE_METHODS.
6655 2015-02-27 Marek Polacek <polacek@redhat.com>
6658 * c.opt (Wformat-signedness): Don't enable by -Wformat=2.
6660 2015-02-27 Kai Tietz <ktietz@redhat.com>
6663 * c-pragma.c (handle_pragma_weak): Do not try to create
6664 weak/alias of declarations not being function, or variable
6667 2015-02-24 Thomas Schwinge <thomas@codesourcery.com>
6670 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
6672 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
6674 2015-02-16 Marek Polacek <polacek@redhat.com>
6677 * c-format.c (check_format_types): Handle null param.
6679 2015-02-13 Marek Polacek <polacek@redhat.com>
6682 * c-format.c (check_format_types): Don't warn about different
6683 signedness if the original value is in the range of WANTED_TYPE.
6685 2015-02-12 Jason Merrill <jason@redhat.com>
6688 * c-opts.c (c_common_post_options): Change flag_abi_version from 0
6689 to the current highest version.
6690 * c-cppbuiltin.c (c_cpp_builtins): Assert that it isn't 0.
6692 2015-02-04 Jakub Jelinek <jakub@redhat.com>
6696 * c-omp.c (c_finish_omp_atomic): Use TRUNC_DIV_EXPR
6697 instead of RDIV_EXPR. Use build_binary_op instead of
6700 2015-01-30 Joseph Myers <joseph@codesourcery.com>
6702 * c-opts.c, c-pch.c, cppspec.c: All callers of fatal_error changed
6703 to pass input_location as first argument.
6705 2015-01-23 Tom de Vries <tom@codesourcery.com>
6708 * c.opt (fopenacc): Mark as LTO option.
6710 2015-01-23 Tom de Vries <tom@codesourcery.com>
6713 * c.opt (fopenmp): Mark as LTO option.
6715 2015-01-21 Jakub Jelinek <jakub@redhat.com>
6718 * cilk.c (fill_decls_vec): Only put decls into vector v.
6719 (compare_decls): Fix up formatting.
6721 2015-01-21 Igor Zamyatin <igor.zamyatin@intel.com>
6724 * cilk.c: Include vec.h.
6725 (struct cilk_decls): New structure.
6726 (wrapper_parm_cb): Split this function to...
6727 (fill_decls_vec): ...this...
6728 (create_parm_list): ...and this.
6729 (compare_decls): New function.
6730 (for_local_cb): Remove.
6731 (wrapper_local_cb): Ditto.
6732 (build_wrapper_type): For now first traverse and fill vector of
6733 declarations then sort it and then deal with sorted vector.
6734 (cilk_outline): Ditto.
6735 (declare_one_free_variable): Ditto.
6737 2015-01-21 Jason Merrill <jason@redhat.com>
6740 * c-format.c (check_format_arg): Call decl_constant_value.
6742 2015-01-19 Martin Liska <mliska@suse.cz>
6744 * c-common.c (handle_noicf_attribute): New function.
6746 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
6747 Bernd Schmidt <bernds@codesourcery.com>
6748 James Norris <jnorris@codesourcery.com>
6749 Cesar Philippidis <cesar@codesourcery.com>
6750 Ilmir Usmanov <i.usmanov@samsung.com>
6751 Jakub Jelinek <jakub@redhat.com>
6753 * c.opt (fopenacc): New option.
6754 * c-cppbuiltin.c (c_cpp_builtins): Conditionally define _OPENACC.
6755 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
6757 * c-common.h (c_finish_oacc_wait): New prototype.
6758 * c-omp.c: Include "omp-low.h" and "gomp-constants.h".
6759 (c_finish_oacc_wait): New function.
6760 * c-pragma.c (oacc_pragmas): New variable.
6761 (c_pp_lookup_pragma, init_pragma): Handle it.
6762 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_CACHE,
6763 PRAGMA_OACC_DATA, PRAGMA_OACC_ENTER_DATA, PRAGMA_OACC_EXIT_DATA,
6764 PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP, PRAGMA_OACC_PARALLEL,
6765 PRAGMA_OACC_UPDATE, PRAGMA_OACC_WAIT.
6766 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ASYNC,
6767 PRAGMA_OACC_CLAUSE_AUTO, PRAGMA_OACC_CLAUSE_COLLAPSE,
6768 PRAGMA_OACC_CLAUSE_COPY, PRAGMA_OACC_CLAUSE_COPYIN,
6769 PRAGMA_OACC_CLAUSE_COPYOUT, PRAGMA_OACC_CLAUSE_CREATE,
6770 PRAGMA_OACC_CLAUSE_DELETE, PRAGMA_OACC_CLAUSE_DEVICE,
6771 PRAGMA_OACC_CLAUSE_DEVICEPTR, PRAGMA_OACC_CLAUSE_FIRSTPRIVATE,
6772 PRAGMA_OACC_CLAUSE_GANG, PRAGMA_OACC_CLAUSE_HOST,
6773 PRAGMA_OACC_CLAUSE_IF, PRAGMA_OACC_CLAUSE_NUM_GANGS,
6774 PRAGMA_OACC_CLAUSE_NUM_WORKERS, PRAGMA_OACC_CLAUSE_PRESENT,
6775 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPY,
6776 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYIN,
6777 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYOUT,
6778 PRAGMA_OACC_CLAUSE_PRESENT_OR_CREATE, PRAGMA_OACC_CLAUSE_PRIVATE,
6779 PRAGMA_OACC_CLAUSE_REDUCTION, PRAGMA_OACC_CLAUSE_SELF,
6780 PRAGMA_OACC_CLAUSE_SEQ, PRAGMA_OACC_CLAUSE_VECTOR,
6781 PRAGMA_OACC_CLAUSE_VECTOR_LENGTH, PRAGMA_OACC_CLAUSE_WAIT,
6782 PRAGMA_OACC_CLAUSE_WORKER.
6784 2015-01-14 Marcos Diaz <marcos.diaz@tallertechnologies.com>
6786 * c-cppbuiltin.c (c_cpp_builtins): New cpp define __SSP_EXPLICIT__
6787 for the new option fstack-protector_explicit.
6788 * c-common.c (c_common_attribute_table): Add stack_protect attribute.
6789 (handle_stack_protect_attribute): New function.
6791 2015-01-13 Martin Uecker <uecker@eecs.berkeley.edu>
6793 * c.opt: New option -Warray-bounds=.
6795 2015-01-09 Michael Collison <michael.collison@linaro.org>
6797 * array-notation-common.c: Include hash-set.h, machmode.h,
6798 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
6799 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
6800 * c-ada-spec.c: Ditto.
6801 * c-cilkplus.c: Ditto.
6802 * c-common.c: Include input.h due to flattening of tree.h.
6803 Define macro GCC_C_COMMON_C.
6804 * c-common.h: Flatten tree.h header files into c-common.h.
6805 Remove include of tree-core.h.
6806 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
6807 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
6808 fold-const.h, wide-int.h, and inchash.h due to
6809 flattening of tree.h.
6811 * c-format.c: Flatten tree.h header files into c-common.h.
6812 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
6813 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
6814 fold-const.h, wide-int.h, and inchash.h due to
6815 flattening of tree.h.
6816 * c-dump.c: Include hash-set.h, machmode.h,
6817 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
6818 fold-const.h, wide-int.h, and inchash.h due to
6819 flattening of tree.h.
6820 * c-format.c: Include hash-set.h, machmode.h,
6821 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
6822 fold-const.h, wide-int.h, inchash.h and real.h due to
6823 flattening of tree.h.
6824 * c-gimplify.c: Include hash-set.h, machmode.h,
6825 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
6826 fold-const.h, wide-int.h, and inchash.h due to
6827 flattening of tree.h.
6833 * c-ppoutput.c: Ditto.
6834 * c-pragma.c: Ditto.
6835 * c-pretty-print.c: Ditto.
6836 * c-semantics.c: Ditto.
6838 * stub-objc.c: Ditto.
6840 2015-01-08 Jason Merrill <jason@redhat.com>
6842 * c-ubsan.c (ubsan_maybe_instrument_array_ref): Use
6843 do_ubsan_in_current_function.
6844 (ubsan_maybe_instrument_reference_or_call): Likewise.
6845 * c-ubsan.h: Declare it.
6847 2015-01-08 Mike Stump <mikestump@comcast.net>
6849 * c-common.c (c_common_attribute_table): Add no_sanitize_thread.
6851 2015-01-07 Marek Polacek <polacek@redhat.com>
6854 * c-common.c (c_fully_fold_internal): Warn for division and modulo
6855 if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST and is zero.
6857 2015-01-05 Trevor Saunders <tsaunders@mozilla.com>
6860 * c.opt (Wsuggest-override): New option.
6862 2015-01-05 Jakub Jelinek <jakub@redhat.com>
6864 Update copyright years.
6866 2015-01-05 Marek Polacek <polacek@redhat.com>
6869 * c-common.c (warn_array_subscript_with_type_char): Add location_t
6871 * c-common.h (warn_array_subscript_with_type_char): Update
6874 2014-12-20 Edward Smith-Rowland <3dw4rd@verizon.net>
6876 * c-cppbuiltin.c (__cpp_sized_deallocation): Uncomment and move macro.
6877 Control macro with flag_sized_deallocation.
6879 2014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
6881 * c.opt (Wdiscarded-array-qualifiers): New option.
6883 2014-12-19 Jakub Jelinek <jakub@redhat.com>
6885 PR preprocessor/63831
6886 * c-cppbuiltin.c (c_cpp_builtins): Don't define __has_attribute
6887 and __has_cpp_attribute here.
6888 * c-ppoutput.c (init_pp_output): Set cb->has_attribute to
6889 c_common_has_attribute.
6890 * c-common.h (c_common_has_attribute): New prototype.
6891 * c-lex.c (init_c_lex): Set cb->has_attribute to
6892 c_common_has_attribute instead of cb_has_attribute.
6893 (get_token_no_padding): New function.
6894 (cb_has_attribute): Renamed to ...
6895 (c_common_has_attribute): ... this. No longer static. Use
6896 get_token_no_padding, require ()s, don't build TREE_LIST
6897 unnecessarily, fix up formatting, adjust diagnostics, call
6900 2014-12-15 Jason Merrill <jason@redhat.com>
6902 * c.opt (-fsized-deallocation, -Wc++14-compat): New.
6903 (-Wsized-deallocation): New.
6904 * c-opts.c (c_common_post_options): -fsized-deallocation defaults
6905 to on in C++14 and up.
6907 2014-12-11 Jason Merrill <jason@redhat.com>
6909 * c-cppbuiltin.c (c_cpp_builtins): Enable C++14 __cpp_constexpr.
6911 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_runtime_arrays if
6912 we aren't complaining about VLAs.
6914 2014-12-06 Marek Polacek <polacek@redhat.com>
6916 PR tree-optimization/64183
6917 * c-gimplify.c (c_gimplify_expr): Don't convert the RHS of a
6918 shift-expression if it is integer_type_node. Use types_compatible_p.
6920 2014-11-29 Jakub Jelinek <jakub@redhat.com>
6922 * c-common.c (convert_vector_to_pointer_for_subscript): Remove NULL
6923 last argument from create_tmp_var_raw and create_tmp_var calls.
6924 * cilk.c (gimplify_cilk_spawn): Likewise.
6925 * c-omp.c (c_finish_omp_atomic): Likewise.
6927 2014-11-28 Marek Polacek <polacek@redhat.com>
6929 * c-ubsan.c (ubsan_instrument_shift): Use op1_utype for MINUS_EXPR
6930 instead of unsigned_type_node.
6932 2014-11-28 Marek Polacek <polacek@redhat.com>
6935 * c-ubsan.c (ubsan_instrument_shift): Change the type of a MINUS_EXPR
6937 * c-gimplify.c (c_gimplify_expr): Convert right operand of a shift
6938 expression to unsigned_type_node.
6940 2014-11-20 Mark Wielaard <mjw@redhat.com>
6943 * c-opts.c (set_std_c89): Set lang_hooks.name.
6944 (set_std_c99): Likewise.
6945 (set_std_c11): Likewise.
6946 (set_std_cxx98): Likewise.
6947 (set_std_cxx11): Likewise.
6948 (set_std_cxx14): Likewise.
6949 (set_std_cxx1z): Likewise.
6951 2014-11-21 Jakub Jelinek <jakub@redhat.com>
6954 * c-common.h (convert_vector_to_pointer_for_subscript): Change
6955 return type to bool.
6956 * c-common.c: Include gimple-expr.h.
6957 (convert_vector_to_pointer_for_subscript): Change return type to
6958 bool. If *vecp is not lvalue_p and has VECTOR_TYPE, return true
6959 and copy it into a TARGET_EXPR and use that instead of *vecp
6962 2014-11-19 David Malcolm <dmalcolm@redhat.com>
6964 Merger of git branch "gimple-classes-v2-option-3".
6965 * ChangeLog.gimple-classes: New.
6966 * c-gimplify.c (add_block_to_enclosing): Strengthen local "stack"
6967 from being just a vec<gimple> to a vec<gbind *>.
6969 2014-11-18 Jakub Jelinek <jakub@redhat.com>
6972 * c-ubsan.c (ubsan_maybe_instrument_reference_or_call): Change type
6973 argument to ptype, set type to TREE_TYPE (ptype). Don't call
6974 get_pointer_alignment for non-pointers. Use ptype, or if it is
6975 reference type, corresponding pointer type, as type of kind
6977 (ubsan_maybe_instrument_reference,
6978 ubsan_maybe_instrument_member_call): Adjust callers.
6980 2014-11-15 Marek Polacek <polacek@redhat.com>
6983 * array-notation-common.c (is_sec_implicit_index_fn): Return false
6985 (extract_array_notation_exprs): Return for NULL node.
6987 2014-11-12 Joseph Myers <joseph@codesourcery.com>
6989 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Define and
6990 undefine __NO_MATH_ERRNO__ based on changes to -fmath-errno state.
6992 2014-11-12 Jakub Jelinek <jakub@redhat.com>
6995 * c-common.c (check_builtin_function_arguments): Handle
6996 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW.
6998 2014-11-10 Andi Kleen <ak@linux.intel.com>
7001 * c-common.h (check_no_cilk): Declare.
7002 * cilk.c (get_error_location): New function.
7003 (check_no_cilk): Dito.
7005 2014-11-10 Andi Kleen <ak@linux.intel.com>
7007 * cilk.c (recognize_spawn): Use expression location
7010 2014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
7012 * c.opt ([Wshift-count-negative, Wshift-count-overflow]): Add.
7014 2014-11-10 Edward Smith-Rowland <3dw4rd@verizon.net>
7016 * c-cppbuiltin.c (__has_attribute, __has_cpp_attribute): New macros;
7017 (__cpp_rtti, __cpp_exceptions): New macros for C++98;
7018 (__cpp_range_based_for, __cpp_initializer_lists,
7019 __cpp_delegating_constructors, __cpp_nsdmi,
7020 __cpp_inheriting_constructors, __cpp_ref_qualifiers): New macros
7021 for C++11; (__cpp_attribute_deprecated): Remove in favor of
7022 __has_cpp_attribute.
7023 * c-lex.c (cb_has_attribute): New callback CPP function;
7024 (init_c_lex): Set has_attribute callback.
7026 2014-11-04 Richard Biener <rguenther@suse.de>
7028 * c-common.c (shorten_compare): Do not shorten mixed
7029 DFP and non-DFP compares.
7031 2014-11-01 Edward Smith-Rowland <3dw4rd@verizon.net>
7033 * g++.dg/cpp1y/feat-cxx11.C: Commentary and rearrangement of tests.
7034 * g++.dg/cpp1y/feat-cxx11-neg.C: Add aggregate NSDMI test.
7035 Commentary and rearrangement of tests.
7036 * g++.dg/cpp1y/feat-cxx14.C: Enable aggregate NSDMI test.
7037 Commentary and rearrangement of tests.
7038 * g++.dg/cpp1y/feat-cxx98-neg.C: Ditto.
7039 * g++.dg/cpp1y/feat-cxx98.C: Commentary.
7041 2014-10-29 Richard Sandiford <richard.sandiford@arm.com>
7043 * c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant
7044 enum from machine_mode.
7046 2014-10-28 Andrew MacLeod <amacleod@redhat.com>
7048 * c-common.c: Adjust include files.
7049 * c-gimplify.c: Ditto.
7051 * c-pragma.c: Ditto.
7054 2014-10-27 Andrew MacLeod <amacleod@redhat.com>
7056 * c-gimplify.c: Adjust include files.
7058 2014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
7061 * c-opts.c (c_common_diagnostics_set_defaults): Renamed from
7062 c_common_initialize_diagnostics.
7063 * c-common.h: Likewise.
7065 2014-10-24 Marek Polacek <polacek@redhat.com>
7068 * c-pretty-print.c (c_pretty_printer::simple_type_specifier): Don't
7069 print "struct"/"union"/"enum" for typedefed names.
7071 2014-10-23 Marek Polacek <polacek@redhat.com>
7073 * c-ubsan.c (ubsan_instrument_shift): Perform the MINUS_EXPR
7076 2014-10-22 Jakub Jelinek <jakub@redhat.com>
7077 Yury Gribov <y.gribov@samsung.com>
7079 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
7080 ubsan_instrument_vla): Check bits in flag_sanitize_recover bitmask
7081 instead of flag_sanitize_recover as bool flag.
7083 2014-10-21 Kirill Yukhin <kirill.yukhin@intel.com>
7085 * cilk.c: Revert previous change.
7087 2014-10-20 Igor Zamyatin <igor.zamyatin@intel.com>
7090 * cilk.c: Include vec.h.
7091 (struct cilk_decls): New structure.
7092 (wrapper_parm_cb): Split this function to...
7093 (fill_decls_vec): ...this...
7094 (create_parm_list): ...and this.
7095 (compare_decls): New function.
7096 (for_local_cb): Remove.
7097 (wrapper_local_cb): Ditto.
7098 (build_wrapper_type): For now first traverse and fill vector of
7099 declarations then sort it and then deal with sorted vector.
7100 (cilk_outline): Ditto.
7101 (declare_one_free_variable): Ditto.
7103 2014-10-17 Marek Polacek <polacek@redhat.com>
7105 * c-opts.c (c_common_post_options): Set warn_implicit_int.
7106 * c.opt (Wimplicit-int): Initialize to -1.
7108 2014-10-16 Andrew MacLeod <amacleod@redhat.com>
7110 * c-pragma.c: Adjust include files.
7111 * c-semantics.c: Likewise.
7113 2014-10-16 DJ Delorie <dj@redhat.com>
7115 * c-cppbuiltin.c (cpp_atomic_builtins): Don't assume pointers are
7118 2014-10-14 Jason Merrill <jason@redhat.com>
7121 * c-common.h (CPP_PREPARSED_EXPR): New.
7122 (N_CP_TTYPES): Adjust.
7124 2014-10-15 Marek Polacek <polacek@redhat.com>
7126 * c-opts.c (c_common_init_options): Make -std=gnu11 the default for C.
7128 2014-10-14 DJ Delorie <dj@redhat.com>
7130 * c-pretty-print.c (pp_c_integer_constant): Check for all __intN
7131 types, not just __int128.
7132 * c-cppbuiltin.c (c_cpp_builtins): Add builtins for all __intN
7133 types, not just __int128.
7134 (cpp_atomic_builtins): Round pointer sizes up.
7135 (type_suffix): Use type precision, not specific types.
7136 * c-common.c (c_common_reswords): Remove __int128 special case.
7137 (c_common_type_for_size): Check for all __intN types, not just
7139 (c_common_type_for_mode): Likewise.
7140 (c_common_signed_or_unsigned_type): Likewise.
7141 (c_build_bitfield_integer_type): Likewise.
7142 (c_common_nodes_and_builtins): Likewise.
7143 (keyword_begins_type_specifier): Likewise.
7144 * c-common.h (rid): Remove RID_INT128 and add RID_INT_N_* for all
7147 2014-10-12 Trevor Saunders <tsaunders@mozilla.com>
7149 * c-common.c: Use hash_table instead of hashtab.
7151 2014-10-06 Edward Smith-Rowland <3dw4rd@verizon.net>
7153 * c-cppbuiltin.c: Move __cpp_attribute_deprecated to the
7156 2014-10-03 Marc Glisse <marc.glisse@inria.fr>
7161 * c-common.c (warn_logical_operator): Punt for vectors.
7163 2014-10-01 Edward Smith-Rowland <3dw4rd@verizon.net>
7165 Implement SD-6: SG10 Feature Test Recommendations
7166 * c-cppbuiltin.c (c_cpp_builtins()): Define language feature
7167 macros and the __has_header macro.
7169 2014-09-30 Jason Merrill <jason@redhat.com>
7171 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_ASSIGNABLE and
7172 RID_IS_TRIVIALLY_CONSTRUCTIBLE.
7173 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
7175 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_COPYABLE.
7176 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
7178 * c-common.h (enum rid): Remove RID_IS_CONVERTIBLE_TO.
7179 * c-common.c (c_common_reswords): Remove __is_convertible_to.
7181 2014-09-24 Marek Polacek <polacek@redhat.com>
7185 * c-common.h (struct c_common_resword): Don't define CPP_KEYWORD.
7187 2014-09-23 Andi Kleen <ak@linux.intel.com>
7189 * c-common.c (handle_no_reorder_attribute): New function.
7190 (c_common_attribute_table): Add no_reorder attribute.
7192 2014-09-22 Joseph Myers <joseph@codesourcery.com>
7194 * c-cppbuiltin.c (c_cpp_builtins): Define
7195 __LIBGCC_*_EXCESS_PRECISION__ macros for supported floating-point
7198 2014-09-18 Joseph Myers <joseph@codesourcery.com>
7200 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_*_FUNC_EXT__
7201 for supported floating-point modes.
7203 2014-09-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
7205 * c.opt (Wpsabi): Use LangEnabledBy.
7206 * c-opts.c (c_common_handle_option): Do not handle here.
7208 2014-09-12 Joseph Myers <joseph@codesourcery.com>
7210 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_HAS_%s_MODE__
7211 macros for floating-point modes.
7213 2014-09-11 Marc Glisse <marc.glisse@inria.fr>
7216 * c-cppbuiltin.c (builtin_define_float_constants): Correct
7217 __*_DENORM_MIN__ without denormals.
7219 2014-09-10 Jakub Jelinek <jakub@redhat.com>
7221 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
7222 ubsan_instrument_vla, ubsan_instrument_return): Adjust
7223 ubsan_create_data callers.
7224 (ubsan_instrument_bounds): Don't emit UBSAN_BOUNDS at all if
7225 index is constant or BIT_AND_EXPR with constant mask and is
7226 small enough for the bound.
7227 * c-gimplify.c (ubsan_walk_array_refs_r): For ADDR_EXPR of
7228 ARRAY_REF, make sure the inner ARRAY_REF is not walked again.
7230 2014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
7232 * c.opt: Add CppReason to various flags.
7233 (Wdate-time): Re-sort.
7234 * c-common.c: Include c-common.h earlier.
7235 (struct reason_option_codes_t): Delete.
7236 (c_option_controlling_cpp_error): Prefix global type and struct
7239 2014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
7241 * c.opt (Wnormalized): New.
7242 (Wnormalized=): Use Enum and Reject Negative.
7243 * c-opts.c (c_common_handle_option): Do not handle Wnormalized here.
7245 2014-09-08 Joseph Myers <joseph@codesourcery.com>
7247 * c-cppbuiltin.c (c_cpp_builtins): Define macros for mantissa
7248 digits of floating-point modes if -fbuilding-libgcc.
7250 2014-09-05 Joseph Myers <joseph@codesourcery.com>
7252 * c-cppbuiltin.c (c_cpp_builtins): Also define
7253 __LIBGCC_EH_TABLES_CAN_BE_READ_ONLY__,
7254 __LIBGCC_EH_FRAME_SECTION_NAME__, __LIBGCC_JCR_SECTION_NAME__,
7255 __LIBGCC_CTORS_SECTION_ASM_OP__, __LIBGCC_DTORS_SECTION_ASM_OP__,
7256 __LIBGCC_TEXT_SECTION_ASM_OP__, __LIBGCC_INIT_SECTION_ASM_OP__,
7257 __LIBGCC_INIT_ARRAY_SECTION_ASM_OP__,
7258 __LIBGCC_STACK_GROWS_DOWNWARD__,
7259 __LIBGCC_DONT_USE_BUILTIN_SETJMP__,
7260 __LIBGCC_DWARF_ALT_FRAME_RETURN_COLUMN__,
7261 __LIBGCC_DWARF_FRAME_REGISTERS__,
7262 __LIBGCC_EH_RETURN_STACKADJ_RTX__, __LIBGCC_JMP_BUF_SIZE__,
7263 __LIBGCC_STACK_POINTER_REGNUM__ and
7264 __LIBGCC_VTABLE_USES_DESCRIPTORS__ for -fbuilding-libgcc.
7265 (builtin_define_with_value): Handle backslash-escaping in string
7268 2014-09-05 Richard Biener <rguenther@suse.de>
7271 * c-format.c (check_format_arg): Properly handle
7272 effectively signed POINTER_PLUS_EXPR offset.
7274 2014-09-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
7276 * c.opt (Wc90-c99-compat,Wc++-compat,Wcomment,Wendif-labels,
7277 Winvalid-pch,Wlong-long,Wmissing-include-dirs,Wmultichar,Wpedantic,
7278 (Wdate-time,Wtraditional,Wundef,Wvariadic-macros): Add CPP, Var
7280 * c-opts.c (c_common_handle_option): Do not handle here.
7281 (sanitize_cpp_opts): Likewise.
7282 * c-common.c (struct reason_option_codes_t): Handle
7283 CPP_W_C90_C99_COMPAT and CPP_W_PEDANTIC.
7285 2014-09-03 Marek Polacek <polacek@redhat.com>
7287 * c.opt (Wlogical-not-parentheses): Enable by -Wall.
7289 2014-09-02 Jakub Jelinek <jakub@redhat.com>
7290 Balaji V. Iyer <balaji.v.iyer@intel.com>
7291 Igor Zamyatin <igor.zamyatin@intel.com>
7293 * c-cilkplus.c (cilk_for_number_of_iterations): New function.
7294 * c-common.c (c_common_reswords): Added _Cilk_for.
7295 * c-common.h (enum rid): Added RID_CILK_FOR.
7296 (cilk_for_number_of_iterations): Add declaration.
7297 * c-omp.c (c_finish_omp_for): Added checks for CILK_SIMD and
7299 * c-pragma.c (init_pragma): Register "grainsize" pragma.
7300 * c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_GRAINSIZE.
7302 2014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
7304 * c.opt (Wbuiltin-macro-redefined,Wdeprecated,Wendif-labels,
7305 Winvalid-pch,Wliteral-suffix,Wmissing-include-dirs,Wtrigraphs,
7306 Wundef): Use CPP, Var and Init.
7307 * c-opts.c (c_common_handle_option): Do not handle the above flags here.
7309 2014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
7311 * c.opt (Wbuiltin-macro-redefined): Use CPP, Var and Init.
7312 * c-opts.c (c_common_handle_option): Do not handle here.
7314 2014-08-25 Jason Merrill <jason@redhat.com>
7316 * c.opt: Change -std=c++1y and -std=gnu++1y to be aliases for
7317 -std=c++14 and -std=gnu++14, rather than the reverse.
7318 * c-opts.c (c_common_handle_option): Change OPT_std_c__1y and
7319 OPT_std_gnu__1y to OPT_std_c__14 and OPT_std_gnu__14.
7320 * c-common.h (cxx_dialect): Remove cxx1y.
7322 2014-08-23 Edward Smith-Rowland <3dw4rd@verizon.net>
7324 * c-common.h (enum cxx_dialect): Add cxx14.
7325 * c-opts.c (set_std_cxx1y): Rename to set_std_cxx14; Use cxx14.
7326 * c-ubsan.c (ubsan_instrument_shift): Change comment and logic from
7327 cxx_dialect == cxx11 || cxx_dialect == cxx1y to cxx_dialect >= cxx11.
7329 2014-08-22 Jason Merrill <jason@redhat.com>
7331 * c.opt (std=gnu++17): Fix alias.
7333 2014-08-22 Marek Polacek <polacek@redhat.com>
7336 * c-common.c (warn_logical_not_parentheses): Don't check LHS. Don't
7337 check for vector types. Drop LHS argument.
7338 * c-common.h (warn_logical_not_parentheses): Adjust.
7340 2014-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
7342 * c.opt (Wcomment): Use CPP, Var and LangEnabledBy.
7343 (Wmultichar): Likewise.
7344 (Wdate-time): Use C-family languages instead of Common. Use CPP
7346 * c-opts.c (c_common_handle_option): Do not handle the above
7348 (sanitize_cpp_opts): Likewise.
7350 2014-08-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
7353 * c-opts.c: Include tree-diagnostics.h.
7354 (c_diagnostic_finalizer): New.
7355 (c_common_initialize_diagnostics): Use it.
7357 2014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
7359 PR preprocessor/51303
7360 * c-common.c (struct reason_option_codes_t option_codes):
7361 Add CPP_W_MISSING_INCLUDE_DIRS. Sort alphabetically.
7363 2014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
7367 * c.opt (Wvariadic-macros): Use CPP and LangEnabledBy.
7368 * c-opts.c (c_common_handle_option): Call cpp_handle_option_auto.
7369 (c_common_post_options): Call init_global_opts_from_cpp.
7370 (sanitize_cpp_opts): Do not handle Wvariadic-macros here.
7372 2014-08-19 Marek Polacek <polacek@redhat.com>
7375 * c-common.c (maybe_warn_bool_compare): New function.
7376 * c-common.h (maybe_warn_bool_compare): Declare.
7377 * c.opt (Wbool-compare): New option.
7379 2014-08-19 Marek Polacek <polacek@redhat.com>
7381 * c.opt (Wc99-c11-compat): New option.
7383 2014-08-19 Marek Polacek <polacek@redhat.com>
7385 * c-opts.c (sanitize_cpp_opts): Make warn_long_long be set according
7386 to warn_c90_c99_compat.
7387 * c.opt (Wc90-c99-compat, Wdeclaration-after-statement): Initialize
7390 2014-08-19 Manuel López-Ibáñez <manu@gcc.gnu.org>
7391 Steven Bosscher <steven@gcc.gnu.org>
7394 * c-format.c: Add extra_arg_loc and format_string_loc to struct
7395 format_check_results.
7396 (check_function_format): Use true and add comment for boolean
7398 (finish_dollar_format_checking): Use explicit location when warning.
7399 (check_format_info): Likewise.
7400 (check_format_arg): Set extra_arg_loc and format_string_loc.
7401 (check_format_info_main): Use explicit location when warning.
7402 (check_format_types): Pass explicit location.
7403 (format_type_warning): Likewise.
7405 2014-08-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
7408 * c-format.c: Handle Fortran flags.
7410 2014-08-12 Igor Zamyatin <igor.zamyatin@intel.com>
7413 * array-notation-common.c (find_rank): Added handling for other
7414 types of references.
7416 2014-08-10 Marek Polacek <polacek@redhat.com>
7419 * c-opts.c (sanitize_cpp_opts): Pass warn_c90_c99_compat to libcpp.
7420 * c.opt (Wc90-c99-compat): Add option.
7422 2014-08-07 Trevor Saunders <tsaunders@mozilla.com>
7424 * c-gimplify.c, cilk.c: Remove includes of pointer-set.h.
7426 2014-08-03 Marek Polacek <polacek@redhat.com>
7428 * c-common.c (check_case_value): Add location_t parameter. Use it.
7429 (c_add_case_label): Pass loc to check_case_value.
7431 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
7433 * cilk.c: Use hash_map instead of pointer_map.
7435 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
7437 * c-gimplify.c: Use hash_set instead of pointer_set.
7439 2014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
7442 * array-notation-common.c (extract_array_notation_exprs): Handling
7445 2014-08-01 Jakub Jelinek <jakub@redhat.com>
7447 * c-common.h (min_align_of_type): Removed prototype.
7448 * c-common.c (min_align_of_type): Removed.
7449 * c-ubsan.h (ubsan_maybe_instrument_reference,
7450 ubsan_maybe_instrument_member_call): New prototypes.
7451 * c-ubsan.c: Include stor-layout.h and builtins.h.
7452 (ubsan_maybe_instrument_reference_or_call,
7453 ubsan_maybe_instrument_reference, ubsan_maybe_instrument_call): New
7456 2014-07-31 Marc Glisse <marc.glisse@inria.fr>
7459 * c.opt (-Wreturn-local-addr): Move to common.opt.
7461 2014-07-30 Jason Merrill <jason@redhat.com>
7466 * c.opt (-fuse-all-virtuals): New.
7468 2014-07-30 Tom Tromey <tromey@redhat.com>
7471 * c.opt (Wdesignated-init): New option.
7472 * c-common.c (c_common_attribute_table): Add "designated_init".
7473 (handle_designated_init): New function.
7475 2014-07-24 Marek Polacek <polacek@redhat.com>
7478 * c-opts.c (c_finish_options): If -imacros is in effect, return.
7480 2014-07-16 Dodji Seketeli <dodji@redhat.com>
7482 PR preprocessor/60723 - missing system-ness marks for macro tokens
7483 * c-ppoutput.c (struct print::prev_was_system_token): New data
7485 (init_pp_output): Initialize it.
7486 (maybe_print_line_1, maybe_print_line, print_line_1, print_line)
7487 (do_line_change): Return a flag saying if a line marker was
7489 (scan_translation_unit): Detect if the system-ness of the token we
7490 are about to emit is different from the one of the previously
7491 emitted token. If so, emit a line marker. Avoid emitting useless
7492 adjacent line markers. Avoid emitting line markers for tokens
7493 originating from the expansion of built-in macros.
7494 (scan_translation_unit_directives_only): Adjust.
7496 2014-07-15 Marek Polacek <polacek@redhat.com>
7498 * c-ubsan.c (ubsan_instrument_bounds): Don't instrument if
7499 TYPE_MAX_VALUE is NULL.
7501 2014-07-14 Jakub Jelinek <jakub@redhat.com>
7504 * c.opt (Wmemset-transposed-args): New warning.
7506 2014-07-10 Jason Merrill <jason@redhat.com>
7510 * c.opt (-fuse-all-virtuals): New.
7512 2014-07-09 Richard Biener <rguenther@suse.de>
7515 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
7516 using unsigned arithmetic if overflow does not wrap instead of
7517 if overflow is undefined.
7519 2014-07-06 Marek Polacek <polacek@redhat.com>
7522 * c.opt (Wsizeof-array-argument): New option.
7524 2014-07-03 Jakub Jelinek <jakub@redhat.com>
7526 * c-ada-spec.c (dump_ada_nodes): Don't call qsort if
7527 comments->count <= 1, as comments->entries might be NULL.
7529 2014-07-01 Marek Polacek <polacek@redhat.com>
7531 * c.opt (Wint-conversion): New option.
7533 2014-07-01 Marek Polacek <polacek@redhat.com>
7536 * c.opt (Wincompatible-pointer-types): New option.
7538 2014-06-30 Paolo Carlini <paolo.carlini@oracle.com>
7541 * c-common.c (handle_noreturn_attribute, handle_const_attribute):
7542 Do not discard TYPE_QUALS of type.
7544 2014-06-26 Jason Merrill <jason@redhat.com>
7546 * c-common.h (enum cxx_dialect): Add cxx1z.
7547 * c.opt (std=c++1z, std=c++17, std=gnu++1z, std=gnu++17): New.
7548 * c-opts.c (c_common_handle_option, set_std_cxx1z): Handle it.
7550 2014-06-26 Teresa Johnson <tejohnson@google.com>
7552 * c-common.h (get_dump_info): Declare.
7553 * c-gimplify.c (c_genericize): Use saved dump files.
7554 * c-opts.c (c_common_parse_file): Begin and end dumps
7555 once around parsing invocation.
7556 (get_dump_info): New function.
7558 2014-06-23 Marek Polacek <polacek@redhat.com>
7559 Andrew MacLeod <amacleod@redhat.com>
7562 * c-common.c (get_atomic_generic_size): Don't segfault if the
7563 type doesn't have a size.
7565 2014-06-20 Marek Polacek <polacek@redhat.com>
7567 * c-gimplify.c: Include "c-ubsan.h" and "pointer-set.h".
7568 (ubsan_walk_array_refs_r): New function.
7569 (c_genericize): Instrument array bounds.
7570 * c-ubsan.c: Include "internal-fn.h".
7571 (ubsan_instrument_division): Mark instrumented arrays as having
7572 side effects. Adjust ubsan_type_descriptor call.
7573 (ubsan_instrument_shift): Likewise.
7574 (ubsan_instrument_vla): Adjust ubsan_type_descriptor call.
7575 (ubsan_instrument_bounds): New function.
7576 (ubsan_array_ref_instrumented_p): New function.
7577 (ubsan_maybe_instrument_array_ref): New function.
7578 * c-ubsan.h (ubsan_instrument_bounds): Declare.
7579 (ubsan_array_ref_instrumented_p): Declare.
7580 (ubsan_maybe_instrument_array_ref): Declare.
7582 2014-06-20 Hale Wang <hale.wang@arm.com>
7585 * c.opt (fshort-enums): Add to LTO.
7586 * c.opt (fshort-wchar): Likewise.
7588 2014-06-16 Marek Polacek <polacek@redhat.com>
7591 * c.opt (Wswitch-bool): Add Var.
7593 2014-06-12 Jakub Jelinek <jakub@redhat.com>
7596 * c-omp.c (c_omp_split_clauses): Don't crash on firstprivate in
7597 #pragma omp target teams or
7598 #pragma omp {,target }teams distribute simd.
7600 2014-06-12 Jason Merrill <jason@redhat.com>
7602 * c.opt (Wabi=, fabi-compat-version): New.
7603 * c-opts.c (c_common_handle_option): Handle -Wabi=.
7604 (c_common_post_options): Handle flag_abi_compat_version default.
7605 Disallow -fabi-compat-version=1.
7606 * c-common.h (abi_version_crosses): New.
7608 2014-06-11 Jan Hubicka <hubicka@ucw.cz>
7610 * c-common.c (handle_section_attribute): Update handling for
7611 section names that are no longer trees.
7613 2014-06-10 Jakub Jelinek <jakub@redhat.com>
7616 * c-pragma.c (omp_pragmas_simd): Move PRAGMA_OMP_TASK...
7617 (omp_pragmas): ... back here.
7619 2014-06-05 Marek Polacek <polacek@redhat.com>
7622 * c-common.c (warn_logical_not_parentheses): New function.
7623 * c-common.h (warn_logical_not_parentheses): Declare.
7624 * c.opt (Wlogical-not-parentheses): New option.
7626 2014-06-04 Marek Polacek <polacek@redhat.com>
7629 * c-common.c (check_case_bounds): Add location parameter.
7631 (c_add_case_label): Pass loc to check_case_bounds.
7633 2014-06-03 Marek Polacek <polacek@redhat.com>
7636 * c.opt (Wswitch-bool): New option.
7638 2014-05-22 Thomas Schwinge <thomas@codesourcery.com>
7640 * c-common.h (c_omp_sharing_predetermined, c_omp_remap_decl):
7642 (record_types_used_by_current_var_decl): Move prototype to where
7645 * c-common.c (DEF_FUNCTION_TYPE_0, DEF_FUNCTION_TYPE_6)
7646 (DEF_FUNCTION_TYPE_7, DEF_FUNCTION_TYPE_8)
7647 (DEF_FUNCTION_TYPE_VAR_5): Cosmetic fixes.
7649 2014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
7651 * c-common.h (CTI_VOID_ZERO, void_zero_node): Delete.
7652 * c-common.c (c_common_nodes_and_builtins): Don't initialize
7654 * c-pretty-print.c (pp_c_void_constant): New function.
7655 (c_pretty_printer::constant, c_pretty_printer::primary_expression)
7656 (c_pretty_printer::expression): Handle VOID_CST.
7657 * cilk.c (extract_free_variables): Likewise.
7658 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift)
7659 (ubsan_instrument_vla): Use void_node instead of void_zero_node.
7661 2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
7663 * c-common.h (sorted_fields_type): Remove variable_size GTY attribute.
7664 * c-pragma.c (push_alignment): Adjust.
7665 (handle_pragma_push_options): Likewise.
7667 2014-05-09 Marek Polacek <polacek@redhat.com>
7670 * c-common.c (check_user_alignment): Return -1 if alignment is error
7672 (handle_aligned_attribute): Don't call default_conversion on
7674 (handle_vector_size_attribute): Likewise.
7675 (handle_tm_wrap_attribute): Handle case when wrap_decl is error node.
7676 (handle_sentinel_attribute): Call default_conversion and allow even
7677 integral types as an argument.
7679 2014-05-08 Marek Polacek <polacek@redhat.com>
7682 * c-common.c (min_align_of_type): New function factored out from...
7683 (c_sizeof_or_alignof_type): ...here.
7684 * c-common.h (min_align_of_type): Declare.
7686 2014-05-08 Marek Polacek <polacek@redhat.com>
7689 * c-common.c (check_main_parameter_types): Warn for _Atomic-qualified
7690 parameter type of main.
7692 2014-05-07 DJ Delorie <dj@redhat.com>
7694 * c-cppbuiltin.c (print_bits_of_hex): New.
7695 (builtin_define_type_minmax): Print values using hex so as not to
7696 require a pre-computed list of string values.
7698 2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
7699 Mike Stump <mikestump@comcast.net>
7700 Richard Sandiford <rdsandiford@googlemail.com>
7702 * c-ada-spec.c: Include wide-int.h.
7703 (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Remove.
7704 (dump_generic_ada_node): Use wide-int interfaces.
7705 * c-common.c: Include wide-int-print.h.
7706 (shorten_compare): Use wide-int interfaces and tree_int_cst_lt.
7707 (pointer_int_sum): Use wide-int interfaces.
7708 (c_common_nodes_and_builtins): Use make_int_cst.
7709 (match_case_to_enum_1): Use tree_fits_uhwi_p and tree_fits_shwi_p.
7710 (handle_alloc_size_attribute): Use wide-int interfaces.
7711 (get_nonnull_operand): Likewise.
7712 * c-format.c (get_constant): Use tree_fits_uhwi_p.
7713 * c-lex.c: Include wide-int.h.
7714 (narrowest_unsigned_type): Take a widest_int rather than two
7716 (narrowest_signed_type): Likewise.
7717 (interpret_integer): Update accordingly. Use wide-int interfaces.
7718 (lex_charconst): Use wide-int interfaces.
7719 * c-pretty-print.c: Include wide-int.h.
7720 (pp_c_integer_constant): Use wide-int interfaces.
7721 * cilk.c (declare_one_free_variable): Use tree_int_cst_lt instead of
7722 INT_CST_LT_UNSIGNED.
7724 2014-05-06 Richard Biener <rguenther@suse.de>
7726 * c-opts.c (c_common_post_options): For -freestanding,
7727 -fno-hosted and -fno-builtin disable pattern recognition
7728 if not enabled explicitely.
7730 2014-05-02 Marek Polacek <polacek@redhat.com>
7732 * c.opt (Wsizeof-pointer-memaccess): Describe option.
7734 2014-05-01 Marek Polacek <polacek@redhat.com>
7737 * c.opt (Wdiscarded-qualifiers): Add.
7739 2014-04-30 Marek Polacek <polacek@redhat.com>
7741 * c-ubsan.c (ubsan_instrument_division): Handle REAL_TYPEs. Perform
7742 INT_MIN / -1 sanitization only for integer types.
7744 2014-04-25 Marek Polacek <polacek@redhat.com>
7747 * c-common.c (handle_noinline_attribute): Warn if the attribute
7748 conflicts with always_inline attribute.
7749 (handle_always_inline_attribute): Warn if the attribute conflicts
7750 with noinline attribute.
7752 2014-04-25 Marek Polacek <polacek@redhat.com>
7755 * c-common.c (check_main_parameter_types): Warn about variadic main.
7757 2014-04-24 Mike Stump <mikestump@comcast.net>
7759 * c.opt (Wshadow-ivar): Default to on.
7761 2014-04-24 Dimitris Papavasiliou <dpapavas@gmail.com>
7763 * c.opt (Wshadow-ivar, flocal-ivars, fivar-visibility): Add.
7765 2014-04-23 Marek Polacek <polacek@redhat.com>
7767 * c-common.c (handle_tm_wrap_attribute): Tweak error message.
7769 2014-04-22 Jakub Jelinek <jakub@redhat.com>
7772 * c-ubsan.c (ubsan_instrument_return): Return __builtin_trap ()
7773 if flag_sanitize_undefined_trap_on_error.
7774 (ubsan_instrument_division, ubsan_instrument_shift,
7775 ubsan_instrument_vla): Likewise. Use __ubsan_handle_*_abort ()
7776 if !flag_sanitize_recover.
7778 2014-04-22 Marc Glisse <marc.glisse@inria.fr>
7781 * c-common.c (registered_builtin_types): Make non-static.
7782 * c-common.h (registered_builtin_types): Declare.
7784 2014-04-14 Richard Biener <rguenther@suse.de>
7785 Marc Glisse <marc.glisse@inria.fr>
7788 * c-common.c (convert_vector_to_pointer_for_subscript): Properly
7789 apply may-alias the scalar pointer type when applicable.
7791 2014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
7794 * cilk.c (cilk_set_spawn_marker): Remove FUNCTION_DECL
7795 as possible argument for Cilk_spawn.
7797 2014-04-11 Tobias Burnus <burnus@net-b.de>
7800 * c.opt (Wformat-signedness): Add
7801 * c-format.c(check_format_types): Use it.
7803 2014-04-11 Jason Merrill <jason@redhat.com>
7806 * c-common.c (sync_resolve_size, get_atomic_generic_size): Call
7807 default_conversion for an array argument.
7809 2014-04-08 Marek Polacek <polacek@redhat.com>
7812 * c-ubsan.c: Include asan.h.
7813 (ubsan_instrument_return): Call initialize_sanitizer_builtins.
7815 2014-04-03 Nathan Sidwell <nathan@codesourcery.com>
7817 * c.opt (Wnon-virtual-dtor): Auto set when Weffc++.
7819 2014-04-02 Marek Polacek <polacek@redhat.com>
7821 * c-common.h (c_expand_expr): Remove declaration.
7823 2014-03-28 Jakub Jelinek <jakub@redhat.com>
7826 * c-common.c (add_atomic_size_parameter): When creating new
7827 params vector, push the size argument first.
7829 2014-03-26 Jakub Jelinek <jakub@redhat.com>
7831 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
7832 ubsan_instrument_vla, ubsan_instrument_return): Adjust
7833 ubsan_create_data callers.
7835 2014-03-22 Jakub Jelinek <jakub@redhat.com>
7838 * c-opts.c (c_finish_options): Restore cb_file_change call to
7841 2014-03-13 Jakub Jelinek <jakub@redhat.com>
7844 * c-pragma.c (apply_pragma_weak): Only look at
7845 TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl)) if
7846 DECL_ASSEMBLER_NAME_SET_P (decl).
7847 (maybe_apply_pending_pragma_weaks): Exit early if
7848 vec_safe_is_empty (pending_weaks) rather than only when
7850 (maybe_apply_pragma_weak): Likewise. If !DECL_ASSEMBLER_NAME_SET_P,
7851 set assembler name back to NULL afterwards.
7853 2014-03-11 Jason Merrill <jason@redhat.com>
7855 * c.opt: Add -std=gnu++14.
7857 2014-03-11 Ian Bolton <ian.bolton@arm.com>
7859 * c-opts.c (c_common_post_options): Don't override
7860 -ffp-contract=fast if unsafe-math-optimizations is on.
7862 2014-03-08 Paulo Matos <paulo@matos-sorge.com>
7864 * c.opt: Enable LTO FE for fshort-double.
7866 2014-03-07 Jason Merrill <jason@redhat.com>
7868 * c.opt: Add -std=c++14.
7870 2014-03-06 Marek Polacek <polacek@redhat.com>
7873 * cilk.c (contains_cilk_spawn_stmt): New function.
7874 (contains_cilk_spawn_stmt_walker): Likewise.
7875 (recognize_spawn): Give error on invalid use of _Cilk_spawn.
7876 * c-common.h (contains_cilk_spawn_stmt): Add declaration.
7878 2014-03-03 Jakub Jelinek <jakub@redhat.com>
7880 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_SIMD.
7881 (init_pragma): Call cpp_register_deferred_pragma for PRAGMA_CILK_SIMD
7882 even when flag_preprocess_only.
7884 2014-02-26 Jason Merrill <jason@redhat.com>
7888 * c-common.c (shorten_compare): Don't check
7889 c_inhibit_evaluation_warnings.
7891 2014-02-19 Jakub Jelinek <jakub@redhat.com>
7894 * c-common.c (c_common_nodes_and_builtins): When initializing
7895 c_uint{16,32,64}_type_node, also set corresponding
7896 uint{16,32,64}_type_node to the same value.
7899 * c-pragma.c (init_pragma): Don't call cpp_register_deferred_pragma
7900 for PRAGMA_IVDEP if flag_preprocess_only.
7902 2014-02-12 Jakub Jelinek <jakub@redhat.com>
7905 * c-common.c (merge_tlist): If copy is true, call new_tlist,
7906 if false, add ADD itself, rather than vice versa.
7907 (verify_tree): For COND_EXPR, don't call merge_tlist with non-zero
7908 copy. For SAVE_EXPR, only call merge_tlist once.
7910 2014-02-08 Jakub Jelinek <jakub@redhat.com>
7913 * c-common.c (handle_alloc_size_attribute): Use tree_fits_uhwi_p
7915 (handle_alloc_align_attribute, handle_assume_aligned_attribute): New
7917 (c_common_attribute_table): Add alloc_align and assume_aligned
7920 2014-02-06 Marek Polacek <polacek@redhat.com>
7923 * c-common.c (warn_for_sign_compare): Call warning_at with location
7926 2014-02-05 Marek Polacek <polacek@redhat.com>
7929 * c-omp.c (c_finish_omp_atomic): Remove unreachable return
7932 2014-02-04 Marek Polacek <polacek@redhat.com>
7935 * c-common.c (conversion_warning): Unwrap C_MAYBE_CONST_EXPR and/or
7938 2014-02-03 Marc Glisse <marc.glisse@inria.fr>
7942 * c-common.c (handle_aligned_attribute, handle_alloc_size_attribute,
7943 handle_vector_size_attribute, handle_nonnull_attribute): Call
7944 default_conversion on the attribute argument.
7945 (handle_nonnull_attribute): Increment the argument number.
7947 2014-01-31 Marek Polacek <polacek@redhat.com>
7950 * c-common.c (add_atomic_size_parameter): Pass vNULL to
7951 build_function_call_vec.
7952 (resolve_overloaded_builtin): Likewise.
7953 * c-common.h (build_function_call_vec): Adjust declaration.
7955 2014-01-30 Marek Polacek <polacek@redhat.com>
7958 * c-common.h (unsafe_conversion_p): Adjust declaration.
7959 (warnings_for_convert_and_check): Likewise.
7960 (convert_and_check): Likewise.
7961 * c-common.c (unsafe_conversion_p): Add location parameter. Call
7962 expansion_point_location_if_in_system_header on it.
7963 (warnings_for_convert_and_check): Add location parameter. Call
7964 expansion_point_location_if_in_system_header on it. Use it.
7965 (convert_and_check): Add location parameter. Use it.
7966 (conversion_warning): Likewise.
7967 (c_add_case_label): Adjust convert_and_check calls.
7968 (scalar_to_vector): Adjust unsafe_conversion_p calls.
7970 2014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
7972 * c-common.c (c_define_builtins): Replaced flag_enable_cilkplus with
7974 * c-pragma.c (init_pragma): Likewise.
7977 2014-01-23 Marek Polacek <polacek@redhat.com>
7980 * c-common.c (shorten_compare): Add location_t parameter.
7981 * c-common.h (shorten_binary_op): Adjust declaration.
7983 2014-01-23 Marek Polacek <polacek@redhat.com>
7986 * c-common.c (pointer_to_zero_sized_aggr_p): New function.
7987 * c-common.h: Declare it.
7989 2014-01-20 Eric Botcazou <ebotcazou@adacore.com>
7991 * c-ada-spec.h (dump_ada_specs): Revert prototype change.
7992 * c-ada-spec.c (dump_ads): Likewise.
7993 (cpp_check): Likewise.
7994 (dump_ada_specs): Likewise.
7996 2014-01-15 Laurent Alfonsi <laurent.alfonsi@st.com>
7999 * c-common.c (handle_no_instrument_function_attribute): Allow
8000 no_instrument_function attribute in class member
8001 definition/declaration.
8003 2014-01-15 Jakub Jelinek <jakub@redhat.com>
8006 * c-omp.c (c_finish_omp_atomic): Set in_late_binary_op around
8007 build_modify_expr with non-NOP_EXPR opcode. Handle return from it
8008 being COMPOUND_EXPR.
8009 (c_finish_omp_for): Handle incr being COMPOUND_EXPR with first
8010 operand a SAVE_EXPR and second MODIFY_EXPR.
8012 2014-01-09 Jakub Jelinek <jakub@redhat.com>
8015 * c-pch.c (c_common_write_pch): Call
8016 prepare_target_option_nodes_for_pch.
8018 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
8020 Update copyright years
8022 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
8024 * array-notation-common.c, c-cilkplus.c: Use the standard form for
8025 the copyright notice.
8027 2013-12-28 Eric Botcazou <ebotcazou@adacore.com>
8029 * c-ada-spec.c (print_constructor): New function.
8030 (print_destructor): Retrieve the origin of the destructor.
8031 (print_ada_declaration): Revamp handling of constructors/destructors.
8033 2013-12-23 Stuart Hastings <stuart@apple.com>
8034 Bill Maddox <maddox@google.com>
8035 Jason Merrill <jason@redhat.com>
8037 * c.opt: Add -fdeclone-ctor-dtor.
8038 * c-opts.c (c_common_post_options): Default to on iff -Os.
8040 2013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
8042 * c-common.c (c_common_attribute_table): Added "cilk simd function"
8044 * c-pragma.h (enum pragma_cilk_clause): Remove.
8045 (enum pragma_omp_clause): Added the following fields:
8046 PRAGMA_CILK_CLAUSE_NOMASK, PRAGMA_CILK_CLAUSE_MASK,
8047 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_NONE,
8048 PRAGMA_CILK_CLAUSE_LINEAR, PRAGMA_CILK_CLAUSE_PRIVATE,
8049 PRAGMA_CILK_CLAUSE_FIRSTPRIVATE, PRAGMA_CILK_CLAUSE_LASTPRIVATE,
8050 PRAGMA_CILK_CLAUSE_UNIFORM.
8053 2013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
8055 * cilk.c (cilk_outline): Made this function non-static.
8056 (gimplify_cilk_spawn): Removed pre_p and post_p arguments.
8057 (create_cilk_wrapper): Added a new parameter: a function pointer.
8058 (c_install_body_w_frame_cleanup): Remove
8059 (extract_free_variables): Added VEC_INIT_EXPR and CONSTRUCTOR case.
8060 * c-common.h (cilk_outline): New prototype.
8061 (gimplify_cilk_spawn): Removed two parameters.
8062 (cilk_install_body_with_frame_cleanup): New prototype.
8063 * c-gimplify.c (c_gimplify_expr): Added MODIFY_EXPR, CALL_EXPR and
8064 CILK_SPAWN_STMT case.
8066 2013-12-11 Bernd Schmidt <bernds@codesourcery.com>
8068 * c-common.c (c_fully_fold_internal): Handle ADDR_SPACE_CONVERT_EXPR.
8070 * c-common.h (enum c_tree_index): Remove CTI_INT_ARRAY_TYPE.
8071 (int_array_type_node): Remove.
8072 * c-common.c (c_common_nodes_and_builtins): Don't build it.
8074 2013-12-05 Marek Polacek <polacek@redhat.com>
8077 * c-common.c (c_sizeof_or_alignof_type): Move a declaration into
8078 [ADJUST_FIELD_ALIGN].
8080 2013-12-04 Joseph Myers <joseph@codesourcery.com>
8083 * c-common.c (c_sizeof_or_alignof_type): Add parameter min_alignof
8084 and check field alignment if set.
8085 * c-common.h (c_sizeof_or_alignof_type): Update prototype.
8086 (c_sizeof, c_alignof): Update calls to c_sizeof_or_alignof_type.
8088 2013-12-04 Jakub Jelinek <jakub@redhat.com>
8089 Marek Polacek <polacek@redhat.com>
8091 * c-gimplify.c (c_gimplify_expr): If doing the integer-overflow
8092 sanitization, call unsigned_type_for only when !TYPE_OVERFLOW_WRAPS.
8094 2013-11-29 H.J. Lu <hongjiu.lu@intel.com>
8097 * cilk.c (gimplify_cilk_spawn): Properly handle function without
8100 2013-11-29 Jakub Jelinek <jakub@redhat.com>
8103 * c-common.c (get_priority): If TREE_VALUE (args) is IDENTIFIER_NODE,
8104 goto invalid. If it is error_mark_node, don't issue further
8107 2013-11-28 Sergey Ostanevich <sergos.gnu@gmail.com>
8109 * c.opt (Wopenmp-simd): New.
8111 2013-11-22 Jakub Jelinek <jakub@redhat.com>
8113 * c-ubsan.h (ubsan_instrument_return): New prototype.
8114 * c-ubsan.c (ubsan_instrument_return): New function.
8116 2013-11-22 Andrew MacLeod <amacleod@redhat.com>
8118 * c-common.c: Add required include files from gimple.h.
8119 * c-gimplify.c: Likewise.
8122 2013-11-22 David Malcolm <dmalcolm@redhat.com>
8124 * c-common.c (unsafe_conversion_p): Remove use of
8125 EXPR_LOC_OR_HERE macro.
8126 (conversion_warning): Likewise.
8127 (warnings_for_convert_and_check): Likewise.
8128 (warn_for_collisions_1): Likewise.
8129 (shorten_compare): Likewise, and remove use of in_system_header
8130 macro, using the location from the former.
8131 * c-lex.c (dump_one_header): Remove use of input_filename macro.
8132 (cb_def_pragma): Remove use of in_system_header macro.
8133 (lex_string): Likewise.
8134 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
8136 2013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
8137 Mike Stump <mikestump@comcast.net>
8138 Richard Sandiford <rdsandiford@googlemail.com>
8140 * c-ada-spec.c (is_simple_enum): Use tree_to_shwi and tree_to_uhwi
8141 instead of TREE_INT_CST_LOW, in cases where there is a protecting
8142 tree_fits_shwi_p or tree_fits_uhwi_p.
8143 (dump_generic_ada_node): Likewise.
8144 * c-format.c (check_format_arg): Likewise.
8145 * c-pretty-print.c (pp_c_integer_constant): Likewise.
8147 2013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
8149 * c-common.c (check_function_arguments_recurse): Use tree_to_uhwi.
8151 2013-11-19 Joshua J Cogliati <jrincayc@yahoo.com>
8154 * c-common.c (unsafe_conversion_p): Make this function
8155 return an enumeration with more detail.
8156 (conversion_warning): Use the new return type of
8157 unsafe_conversion_p to separately warn either about conversions
8158 that lower floating point number precision or about the other
8159 kinds of conversions.
8160 * c-common.h (enum conversion_safety): New enumeration.
8161 (unsafe_conversion_p): switching return type to
8162 conversion_safety enumeration.
8163 * c.opt: Adding new warning -Wfloat-conversion and
8164 enabling it with -Wconversion.
8166 2013-11-19 Basile Starynkevitch <basile@starynkevitch.net>
8168 * c-opts.c: Include plugin.h.
8169 (cb_file_change): Invoke plugin event PLUGIN_INCLUDE_FILE.
8171 2013-11-19 Marek Polacek <polacek@redhat.com>
8173 * c-ubsan.c (ubsan_instrument_division): Adjust ubsan_create_data
8175 (ubsan_instrument_shift): Likewise.
8176 (ubsan_instrument_vla): Likewise.
8178 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
8180 * c-common.c (convert_vector_to_pointer_for_subscript): Remove
8181 cast to unsigned type.
8183 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
8185 * c-common.c (fold_offsetof_1): Use tree_to_uhwi rather than
8187 (complete_array_type): Update comment to refer to tree_to_[su]hwi
8188 rather than tree_low_cst.
8190 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
8192 * c-common.c, c-cppbuiltin.c: Replace tree_low_cst (..., 1) with
8193 tree_to_uhwi throughout.
8195 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
8197 * c-common.c, c-format.c, c-omp.c, c-pretty-print.c: Replace
8198 tree_low_cst (..., 0) with tree_to_shwi throughout.
8200 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
8202 * c-ada-spec.c, c-common.c, c-pretty-print.c: Replace
8203 host_integerp (..., 1) with tree_fits_uhwi_p throughout.
8205 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
8207 * c-ada-spec.c, c-common.c, c-format.c, c-pretty-print.c: Replace
8208 host_integerp (..., 0) with tree_fits_shwi_p throughout.
8210 2013-11-15 Aldy Hernandez <aldyh@redhat.com>
8212 * c-cilkplus.c: New file.
8213 * c-common.c (readonly_error): Add location argument.
8214 * c-common.h (readonly_error): Same.
8215 (c_finish_cilk_clauses): Protoize.
8216 (c_check_cilk_loop): Same.
8217 c-omp.c (c_finish_omp_for): Handle CILK_SIMD nodes.
8218 Do not fail on error_mark_node.
8219 Abstract increment canonicalization to here...
8220 (c_omp_for_incr_canonicalize_ptr): New.
8221 c-pragma.c (init_pragma): Register "simd" pragma.
8222 c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_SIMD.
8223 (enum pragma_cilk_clause): New.
8225 2013-11-15 Richard Sandiford <rdsandiford@googlemail.com>
8227 * c-pretty-print.c (pp_c_character_constant): Remove unnecessary
8228 wchar_type and host_integerp checks.
8230 2013-11-14 Andrew MacLeod <amacleod@redhat.com>
8232 * c-common.c: Likewise.
8233 * c-gimplify.c: Likewise.
8236 2013-11-14 Diego Novillo <dnovillo@google.com>
8238 * c-common.c: Include fold-const.h.
8239 Include stor-layout.h.
8241 Include stringpool.h.
8244 Include trans-mem.h.
8245 * c-cppbuiltin.c: Include stor-layout.h.
8246 Include stringpool.h.
8247 * c-format.c: Include stringpool.h.
8248 * c-lex.c: Include stringpool.h.
8249 Include stor-layout.h.
8250 * c-pragma.c: Include stringpool.h.
8253 Include gcc-symtab.h.
8254 * c-pretty-print.c: Include stor-layout.h.
8256 * cilk.c: Include stringpool.h.
8259 2013-11-13 Joseph Myers <joseph@codesourcery.com>
8261 * c-common.h (enum rid): Add RID_AUTO_TYPE.
8262 * c-common.c (c_common_reswords): Add __auto_type.
8263 (keyword_begins_type_specifier): Handle RID_AUTO_TYPE.
8265 2013-11-12 Andrew MacLeod <amacleod@redhat.com>
8267 * c-common.c: Include gimplify.h.
8268 * c-gimplify.c: Likewise.
8270 * c-omp.c: Include gimple-expr.h instead of gimple.h.
8271 * c-ubsan.c: Don't include gimple.h.
8273 2013-11-12 Joseph Myers <joseph@codesourcery.com>
8275 * c-common.c (c_common_reswords): Add _Thread_local.
8277 2013-11-09 Joseph Myers <joseph@codesourcery.com>
8279 * c-common.c (atomic_size_supported_p): New function.
8280 (resolve_overloaded_atomic_exchange)
8281 (resolve_overloaded_atomic_compare_exchange)
8282 (resolve_overloaded_atomic_load, resolve_overloaded_atomic_store):
8283 Use it instead of comparing size with a local list of sizes.
8285 2013-11-07 Andrew MacLeod <amacleod@redhat.com>
8286 Joseph Myers <joseph@codesourcery.com>
8288 * c-common.h (enum rid): Add RID_ATOMIC.
8289 * c-common.c (c_common_reswords): Add _Atomic.
8290 (sync_resolve_params): Use TYPE_MAIN_VARIANT on pointer argument.
8291 (keyword_is_type_qualifier): Accept RID_ATOMIC.
8292 * c-format.c (check_format_types): Check for extra _Atomic
8293 qualifiers in format argument.
8294 * c-pretty-print.c (pp_c_cv_qualifiers): Handle atomic qualifier.
8295 (pp_c_type_qualifier_list): Mention _Atomic in comment.
8297 2013-11-06 Tobias Burnus <burnus@net-b.de>
8299 * c-common.c (reason_option_codes_t): Add CPP_W_DATE_TIME.
8301 2013-11-06 Joseph Myers <joseph@codesourcery.com>
8303 * c-opts.c (c_common_post_options): Set -ffp-contract=off in C
8305 * c-cppbuiltin.c (cpp_iec_559_value): Consider -ffp-contract=fast
8306 to mean lack of IEEE 754 support.
8308 2013-11-05 Tobias Burnus <burnus@net-b.de>
8310 * c.opt (-Wdate-time): New option
8311 * c-opts.c (sanitize_cpp_opts): Pass on to libcpp.
8313 2013-11-05 Joseph Myers <joseph@codesourcery.com>
8315 * c-cppbuiltin.c (cpp_iec_559_value): Test
8316 flag_excess_precision_cmdline not flag_excess_precision.
8318 2013-11-05 Tobias Burnus <burnus@net-b.de>
8320 * c.opt (fopenmp-simd): New option.
8321 * c-pragma.c (omp_pragmas): Move pragmas which can contain simd to ...
8322 (omp_pragmas): ... this new struct.
8323 (c_pp_lookup_pragma): Also walk omp_pragmas.
8324 (init_pragma): Init pragmas for -fopenmp-simd.
8326 2013-11-04 Marek Polacek <polacek@redhat.com>
8329 * c-common.c (invalid_indirection_error): Handle RO_ARROW_STAR case.
8331 2013-11-04 Joseph Myers <joseph@codesourcery.com>
8333 * c-cppbuiltin.c (cpp_iec_559_value, cpp_iec_559_complex_value):
8335 (c_cpp_builtins): Define __GCC_IEC_559 and __GCC_IEC_559_COMPLEX.
8337 2013-11-04 Eric Botcazou <ebotcazou@adacore.com>
8339 * c-ada-spec.h (cpp_operation): Add IS_TRIVIAL.
8340 (dump_ada_specs): Adjust prototype of second callback.
8341 * c-ada-spec.c (cpp_check): New global variable.
8342 (dump_ada_nodes): Remove cpp_check parameter and do not pass it down.
8343 (print_generic_ada_decl): Likewise.
8344 (has_static_fields): Change return type to bool and add guard.
8345 (has_nontrivial_methods): New predicate.
8346 (is_tagged_type): Change return type to bool.
8347 (separate_class_package): Call has_nontrivial_methods.
8348 (pp_ada_tree_identifier): Minor tweaks.
8349 (dump_ada_function_declaration): Adjust calls to dump_generic_ada_node.
8350 (dump_ada_array_domains): Likewise.
8351 (dump_ada_array_type): Likewise.
8352 (dump_template_types): Remove cpp_check parameter and do not pass it to
8353 dump_generic_ada_node.
8354 (dump_ada_template): Likewise.
8355 (dump_generic_ada_node): Remove cpp_check parameter and do not pass it
8357 (print_ada_methods): Change return type to integer. Remove cpp_check
8358 parameter and do not pass it down.
8359 (dump_nested_types): Remove cpp_check parameter and do not pass it to
8360 dump_generic_ada_node.
8361 (print_ada_declaration): Likewise. Test RECORD_OR_UNION_TYPE_P before
8363 (print_ada_struct_decl): Remove cpp_check parameter and do not pass it
8364 down. Use has_nontrivial_methods to recognize C++ classes. Use return
8365 value of print_ada_methods.
8366 (dump_ads): Rename cpp_check parameter to check and adjust prototype.
8367 Set cpp_check to it before invoking dump_ada_nodes.
8368 (dump_ada_specs): Likewise.
8370 2013-11-03 Marek Polacek <polacek@redhat.com>
8372 * c-ubsan.c: Don't include hash-table.h.
8373 (ubsan_instrument_vla): New function.
8374 * c-ubsan.h: Declare it.
8376 2013-10-31 David Malcolm <dmalcolm@redhat.com>
8378 Automated part of renaming of symtab_node_base to symtab_node.
8380 Patch autogenerated by rename_symtab.py from
8381 https://github.com/davidmalcolm/gcc-refactoring-scripts
8382 revision 58bb219cc090b2f4516a9297d868c245495ee622
8384 * c-pragma.c (maybe_apply_pending_pragma_weaks): Rename
8385 symtab_node_base to symtab_node.
8387 2013-10-31 Edward Smith-Rowland <3dw4rd@verizon.net>
8389 Implement C++14 digit separators.
8390 * c-lex.c (interpret_float): Remove digit separators from scratch string
8391 before building real literal.
8393 2013-10-30 Jakub Jelinek <jakub@redhat.com>
8395 * cilk.c (create_cilk_helper_decl): Use HOST_WIDE_INT_PRINT_DEC.
8397 2013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
8399 * c-common.c (c_common_reswords[]): Added _Cilk_spawn and _Cilk_sync
8401 (c_define_builtins): Called cilk_init_builtins if Cilk Plus is
8403 * c-common.h (enum rid): Added RID_CILK_SPAWN and RID_CILK_SYNC.
8404 (insert_cilk_frame): New prototype.
8405 (cilk_init_builtins): Likewise.
8406 (gimplify_cilk_spawn): Likewise.
8407 (c_cilk_install_body_w_frame_cleanup): Likewise.
8408 (cilk_detect_spawn_and_unwrap): Likewise.
8409 (cilk_set_spawn_marker): Likewise.
8410 (build_cilk_sync): Likewise.
8411 (build_cilk_spawn): Likewise.
8414 2013-10-29 David Malcolm <dmalcolm@redhat.com>
8416 Patch autogenerated by refactor_symtab.py from
8417 https://github.com/davidmalcolm/gcc-refactoring-scripts
8418 revision 58bb219cc090b2f4516a9297d868c245495ee622
8420 * c-gimplify.c (c_genericize): Update for conversion of symtab types
8421 to a true class hierarchy.
8422 * c-pragma.c (maybe_apply_pending_pragma_weaks): Likewise.
8424 2013-10-27 Richard Sandiford <rdsandiford@googlemail.com>
8426 * c-lex.c (interpret_integer): Remove call to cpp_num_sign_extend.
8428 2013-10-26 Jeff Law <law@redhat.com>
8430 * c-common.c (c_define_builtins): Remove mudflap support.
8431 * c.opt: Ignore and warn for mudflap options.
8433 2013-10-24 Tobias Burnus <burnus@net-b.de>
8436 * c-pragma.c (init_pragma) Add #pragma ivdep handling.
8437 * c-pragma.h (pragma_kind): Add PRAGMA_IVDEP.
8439 2013-10-23 Jason Merrill <jason@redhat.com>
8441 * c-format.c (gcc_cxxdiag_char_table): Add %X.
8443 2013-10-11 Jakub Jelinek <jakub@redhat.com>
8445 * c-common.h (omp_clause_mask::operator !=): New method.
8446 * c-omp.c (c_omp_split_clauses): Use if ((mask & something) != 0)
8447 instead of if (mask & something) tests everywhere.
8449 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP to
8450 201307 instead of 201107.
8451 * c-common.c (DEF_FUNCTION_TYPE_8): Define.
8452 (c_common_attribute_table): Add "omp declare target" and
8453 "omp declare simd" attributes.
8454 (handle_omp_declare_target_attribute,
8455 handle_omp_declare_simd_attribute): New functions.
8456 * c-omp.c: Include c-pragma.h.
8457 (c_finish_omp_taskgroup): New function.
8458 (c_finish_omp_atomic): Add swapped argument, if true,
8459 build the operation first with rhs, lhs arguments and use NOP_EXPR
8461 (c_finish_omp_for): Add code argument, pass it down to make_code.
8462 (c_omp_split_clauses): New function.
8463 (c_split_parallel_clauses): Removed.
8464 (c_omp_declare_simd_clause_cmp, c_omp_declare_simd_clauses_to_numbers,
8465 c_omp_declare_simd_clauses_to_decls): New functions.
8466 * c-common.h (omp_clause_mask): New type.
8467 (OMP_CLAUSE_MASK_1): Define.
8468 (omp_clause_mask::omp_clause_mask, omp_clause_mask::operator &=,
8469 omp_clause_mask::operator |=, omp_clause_mask::operator ~,
8470 omp_clause_mask::operator |, omp_clause_mask::operator &,
8471 omp_clause_mask::operator <<, omp_clause_mask::operator >>,
8472 omp_clause_mask::operator ==): New methods.
8473 (enum c_omp_clause_split): New.
8474 (c_finish_omp_taskgroup): New prototype.
8475 (c_finish_omp_atomic): Add swapped argument.
8476 (c_finish_omp_for): Add code argument.
8477 (c_omp_split_clauses): New prototype.
8478 (c_split_parallel_clauses): Removed.
8479 (c_omp_declare_simd_clauses_to_numbers,
8480 c_omp_declare_simd_clauses_to_decls): New prototypes.
8481 * c-pragma.c (omp_pragmas): Add new OpenMP 4.0 constructs.
8482 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_CANCEL,
8483 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_DECLARE_REDUCTION,
8484 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_SIMD,
8485 PRAGMA_OMP_TARGET, PRAGMA_OMP_TASKGROUP and PRAGMA_OMP_TEAMS.
8486 Remove PRAGMA_OMP_PARALLEL_FOR and PRAGMA_OMP_PARALLEL_SECTIONS.
8487 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ALIGNED,
8488 PRAGMA_OMP_CLAUSE_DEPEND, PRAGMA_OMP_CLAUSE_DEVICE,
8489 PRAGMA_OMP_CLAUSE_DIST_SCHEDULE, PRAGMA_OMP_CLAUSE_FOR,
8490 PRAGMA_OMP_CLAUSE_FROM, PRAGMA_OMP_CLAUSE_INBRANCH,
8491 PRAGMA_OMP_CLAUSE_LINEAR, PRAGMA_OMP_CLAUSE_MAP,
8492 PRAGMA_OMP_CLAUSE_NOTINBRANCH, PRAGMA_OMP_CLAUSE_NUM_TEAMS,
8493 PRAGMA_OMP_CLAUSE_PARALLEL, PRAGMA_OMP_CLAUSE_PROC_BIND,
8494 PRAGMA_OMP_CLAUSE_SAFELEN, PRAGMA_OMP_CLAUSE_SECTIONS,
8495 PRAGMA_OMP_CLAUSE_SIMDLEN, PRAGMA_OMP_CLAUSE_TASKGROUP,
8496 PRAGMA_OMP_CLAUSE_THREAD_LIMIT, PRAGMA_OMP_CLAUSE_TO and
8497 PRAGMA_OMP_CLAUSE_UNIFORM.
8499 2013-10-09 Marc Glisse <marc.glisse@inria.fr>
8501 PR tree-optimization/20318
8502 * c-common.c (handle_returns_nonnull_attribute): New function.
8503 (c_common_attribute_table): Add returns_nonnull.
8505 2013-10-03 Marc Glisse <marc.glisse@inria.fr>
8508 * c.opt (fcheck-new): Move to common.opt.
8510 2013-09-25 Marek Polacek <polacek@redhat.com>
8511 Jakub Jelinek <jakub@redhat.com>
8514 * c-ubsan.c (ubsan_instrument_shift): Don't instrument
8515 an expression if we can prove it is correct.
8516 (ubsan_instrument_division): Likewise. Remove unnecessary
8519 2013-09-18 Marek Polacek <polacek@redhat.com>
8522 * c-common.c (handle_no_sanitize_undefined_attribute): New function.
8524 (struct attribute_spec c_common_att): Add no_sanitize_undefined.
8526 2013-09-14 Iain Sandoe <iain@codesourcery.com>
8529 * c.opt (fgnu-runtime, fnext-runtime, fobjc-abi-version,
8530 fobjc-gc, freplace-objc-classes): Accept for LTO.
8532 2013-09-13 Jacek Caban <jacek@codeweavers.com>
8534 * c-target.def: New hook
8536 2013-09-09 Paolo Carlini <paolo.carlini@oracle.com>
8539 * c.opt (Wdelete-incomplete): Add.
8541 2013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
8543 * c-common.c (same_scalar_type_ignoring_signedness): Delete.
8544 (vector_types_compatible_elements_p): New function.
8545 * c-common.h: (same_scalar_type_ignoring_signedness): Delete
8547 (vector_types_compatible_elements_p): Declare.
8549 2013-09-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
8551 * c-pretty-print.h (c_pretty_printer::simple_type_specifier): Now
8552 a virtual member function.
8553 (pp_simple_type_specifier): Remove.
8554 (pp_c_type_specifier): Likewise.
8555 * c-pretty-print.c (c_pretty_printer::simple_type_specifier):
8556 Rename from pp_c_type_specifier. Adjust.
8557 (c_pretty_printer::c_pretty_printer): Do not assign to
8558 simple_type_specifier.
8560 2013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
8562 * c-pretty-print.h (c_pretty_printer::type_id): Now a virtual
8564 (c_pretty_printer::storage_class_specifier): Likewise.
8565 (c_pretty_printer::initializer): Likewise.
8566 (pp_declaration): Remove.
8567 (pp_declaration_specifiers): Likewise.
8568 (pp_abstract_declarator): Likewise.
8569 (pp_declarator): Likewise.
8570 (pp_type_id): Likewise.
8571 (pp_statement): Likewise.
8572 (pp_constant): Likewise.
8573 (pp_id_expression): Likewise.
8574 (pp_primary_expression): Likewise.
8575 (pp_unary_expression): Likewise.
8576 (pp_multiplicative_expression): Likewise.
8577 (pp_conditional_expression): Likewise.
8578 (pp_assignment_expression): Likewise.
8579 (pp_expression): Likewise.
8580 (pp_c_type_id): Likewise.
8581 (pp_c_storage_class_specifier): Likewise.
8582 * c-pretty-print.c (pp_c_type_cast): Tidy.
8583 (pp_c_pointer): Likewise.
8584 (pp_c_type_specifier): Likewise.
8585 (pp_c_parameter_type_list): Likewise.
8586 (pp_c_function_definition): Likewise.
8587 (pp_c_init_declarator): Likewise.
8588 (pp_c_initializer_list): Likewise.
8589 (pp_c_constructor_elts): Likewise.
8590 (c_pretty_printer::direct_abstract_declarator): Likewise.
8591 (c_pretty_printer::declaration_specifiers): Likewise.
8592 (c_pretty_printer::primary_expression): Likewise.
8593 (c_pretty_printer::postfix_expression): Likewise.
8594 (c_pretty_printer::type_id): Rename from pp_c_type_id.
8595 (c_pretty_printer::storage_class_specifier): Rename from
8596 pp_c_storage_class_specifier.
8597 (c_pretty_printer::initializer): Rename from pp_c_initializer.
8598 (c_pretty_printer::c_pretty_printer): Do not assign to type_id,
8599 storage_class_specifier, initializer, offset_list, flags.
8601 2013-08-30 Marek Polacek <polacek@redhat.com>
8603 * c-ubsan.c: New file.
8604 * c-ubsan.h: New file.
8606 2013-08-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
8608 * c-pretty-print.h (c_pretty_printer::declaration): Now a virtual
8610 (c_pretty_printer::declaration_specifiers): Likewise.
8611 (c_pretty_printer::declarator): Likewise.
8612 (c_pretty_printer::abstract_declarator): Likewise.
8613 (c_pretty_printer::direct_abstract_declarator): Likewise.
8614 (c_pretty_printer::direct_declarator): Likewise.
8615 (c_pretty_printer::function_specifier): Likewise.
8616 (pp_declaration): Adjust.
8617 (pp_declaration_specifiers): Likewise.
8618 (pp_abstract_declarator): Likewise.
8619 (pp_direct_declarator): Likewise.
8620 (pp_function_specifier): Likewise.
8621 (pp_direct_abstract_declarator): Remove as unused.
8622 (pp_c_declaration): Remove.
8623 (pp_c_declaration_specifiers): Likewise.
8624 (pp_c_declarator): Likewise.
8625 (pp_c_direct_declarator): Likewise.
8626 (pp_c_function_specifier): Likewise.
8627 (pp_c_direct_abstract_declarator): Likewise.
8628 * c-pretty-print.c (c_pretty_printer::abstract_declarator): Rename
8629 from pp_c_abstract_declarator. Adjust.
8630 (c_pretty_printer::direct_abstract_declarator): Rename from
8631 pp_c_direct_abstract_declarator. Adjust.
8632 (c_pretty_printer::function_specifier): Rename from
8633 pp_c_function_specifier. Adjust.
8634 (c_pretty_printer::declaration_specifiers): Rename from
8635 pp_c_declaration_specifiers. Adjust.
8636 (c_pretty_printer::direct_declarator): Rename from
8637 pp_c_direct_declarator. Adjust.
8638 (c_pretty_printer::declarator): Rename from pp_c_declarator. Adjust.
8639 (c_pretty_printer::declaration): Rename from pp_c_declaration. Adjust.
8640 (c_pretty_printer::c_pretty_printer): Do not assign to
8641 declaration, declaration_specifiers, declarator,
8642 direct_declarator, direct_abstract_declarator, function_specifier.
8644 2013-08-26 Gabriel Dos Reis <gdre@integrable-solutions.net>
8646 * c-pretty-print.h (c_pretty_printer::unary_expression): Now a
8647 virtual member function.
8648 (c_pretty_printer::multiplicative_expression): Likewise.
8649 (c_pretty_printer::conditional_expression): Likewise.
8650 (c_pretty_printer::assignment_expression): Likewise.
8651 (c_pretty_printer::expression): Likewise.
8652 (pp_unary_expression): Adjust.
8653 (pp_multiplicative_expression): Likewise.
8654 (pp_assignment_expression): Likewise.
8655 (pp_conditional_expression): Likewise.
8656 (pp_expression): Likewise.
8657 * c-pretty-print.c (c_pretty_printer::unary_expression): Rename
8658 from pp_c_unary_expression. Adjust.
8659 (c_pretty_printer::multiplicative_expression): Rename from
8660 pp_c_multiplicative_expression. Adjust.
8661 (c_pretty_printer::conditional_expression): Rename from
8662 pp_c_conditional_expression. Adjust.
8663 (c_pretty_printer::assignment_expression): Rename from
8664 pp_c_assignment_expression. Adjust.
8665 (c_pretty_printer::expression): Rename from pp_c_expression. Adjust.
8666 (c_pretty_printer::c_pretty_printer): Do not assign to
8667 unary_expression, multiplicative_expression,
8668 conditional_expression, expression.
8670 2013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
8672 * c-pretty-print.h (c_pretty_printer::postfix_expression): Now a
8673 virtual member function.
8674 (pp_postfix_expression): Adjust.
8675 (pp_c_postfix_expression): Remove.
8676 * c-pretty-print.c (c_pretty_printer::postfix_expression): Rename
8677 from pp_c_postfix_expression. Adjust.
8678 (c_pretty_printer::c_pretty_printer): Do not assign to
8681 2013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
8683 * c-pretty-print.h (c_pretty_printer::primary_expression): Now a
8684 virtua member function.
8685 (pp_primary_expression): Adjust.
8686 (pp_c_primary_expression): Remove.
8687 * c-pretty-print.c (c_pretty_printer::primary_expression): Rename
8688 from pp_c_primary_expression. Adjust.
8689 (pp_c_initializer_list): Use pp_primary_expression.
8690 (c_pretty_printer::c_pretty_printer): Do not assign to
8693 2013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
8695 * c-pretty-print.h (c_pretty_printer::translate_string): Declare.
8696 * c-pretty-print.c (M_): Remove.
8697 (c_pretty_printer::translate_string): Define.
8698 (pp_c_type_specifier): Use it.
8699 (pp_c_primary_expression): Likewise.
8700 (pp_c_expression): Likewise.
8702 2013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
8704 * c-pretty-print.h (c_pretty_printer::id_expression): Now a
8706 (pp_c_id_expression): Remove.
8707 (pp_id_expression): Adjust.
8708 * c-pretty-print.c (c_pretty_printer::id_expression): Rename from
8709 pp_c_id_expression. Adjust.
8710 (pp_c_postfix_expression): Use pp_id_expression.
8711 (c_pretty_printer::c_pretty_printer): Do not assign to id_expression.
8713 2013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
8715 * c-pretty-print.h (c_pretty_printer::constant): Now a virtual
8717 (pp_constant): Adjust.
8718 (pp_c_constant): Remove.
8719 * c-pretty-print.c (c_pretty_printer::constant): Rename from
8720 pp_c_constant. Adjust.
8722 (pp_c_primary_expression): Call pp_constant in lieu of pp_c_constant.
8723 (c_pretty_printer::c_pretty_printer): Remove assignment to constant.
8725 2013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
8727 * c-pretty-print.h (pp_c_pretty_printer_init): Remove.
8728 (c_pretty_printer::c_pretty_printer): Declare.
8729 * c-pretty-print.c (pretty_printer::c_pretty_printer): Rename from
8730 c_pretty_printer_init. Adjust.
8731 (print_c_tree): Do not call c_pretty_printer_init.
8732 * c-ada-spec.c (dump_ads): Remove call to pp_construct.
8734 2013-08-09 Arnaud Charlet <charlet@adacore.com>
8736 * c-ada-spec.c (print_ada_declaration): Prevent accessing null asm name
8738 2013-08-05 Paolo Carlini <paolo.carlini@oracle.com>
8741 * c-common.c (pointer_int_sum): Add bool parameter.
8742 * c-common.h (pointer_int_sum): Adjust declaration.
8744 2013-08-05 Gabriel Dos Reis <gdr@integrable-solutions.net>
8746 * c-pretty-print.c (print_c_tree): Simplify. Use non-static local
8747 c_pretty_printer variable.
8749 2013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
8751 * c-pretty-print.h (c_pretty_printer): Derive from pretty_printer.
8753 (pp_c_base): Likewise. Adjust users.
8754 * c-pretty-print.c (pp_c_maybe_whitespace): Adjust.
8755 (pp_c_whitespace): Do not call pp_base.
8756 (pp_c_left_paren): Likewise.
8757 (pp_c_right_paren): Likewise.
8758 (pp_c_left_brace): Likewise.
8759 (pp_c_right_brace): Likewise.
8760 (pp_c_left_bracket): Likewise.
8761 (pp_c_right_bracket): Likewise.
8762 (pp_c_dot): Likewise.
8763 (pp_c_ampersand): Likewise.
8764 (pp_c_star): Likewise.
8765 (pp_c_arrow): Likewise.
8766 (pp_c_semicolon): Likewise.
8767 (pp_c_complement): Likewise.
8768 (pp_c_exclamation): Likewise.
8769 (pp_c_direct_declarator): Likewise.
8770 (pp_c_ws_string): Likewise.
8771 (pp_c_identifier): Likewise.
8772 (pp_c_statement): Likewise.
8773 (print_c_tree): Likewise.
8775 2013-08-04 Ed Smith-Rowland <3dw4rd@verizon.net>
8778 * c-common.c (c_parse_error): Catch user-defined literal tokens and
8779 provide useful error strings.
8781 2013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
8783 * c-ada-spec.c (pp_ada_tree_identifier): Use specialized pretty
8784 printer functions instead of pp_string or operators and punctuators.
8785 (dump_generic_ada_node): Likewise.
8786 * c-pretty-print.c (pp_c_type_specifier): Likewise.
8787 (pp_c_relational_expression): Likewise.
8788 (pp_c_logical_or_expression): Likewise.
8790 2013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
8792 * c-ada-spec.c (print_ada_macros): Use specialized pretty printer
8793 functions instead of pp_character.
8794 (pp_ada_tree_identifier): Likewise.
8795 (dump_ada_double_name): Likewise.
8796 (dump_ada_function_declaration): Likewise.
8797 (dump_ada_array_domains): Likewise.
8798 (dump_template_types): Likewise.
8799 (dump_generic_ada_node): Likewise.
8800 (print_ada_declaration): Likewise.
8801 (print_ada_struct_decl): Likewise.
8802 * c-pretty-print.c (pp_c_integer_constant): Likewise.
8804 2013-07-23 Tom Tromey <tromey@redhat.com>
8806 * c-common.h (enum rid) <RID_GENERIC>: New constant.
8807 * c-common.c (c_common_reswords): Add _Generic.
8809 2013-07-21 OndÅ
\99ej BÃlka <neleai@seznam.cz>
8811 * c-common.c: Fix typos.
8812 * c-common.h: Likewise.
8814 2013-07-13 Lubos Lunak <l.lunak@suse.cz>
8817 * c-common.c (c_common_attribute_table): Add warn_unused.
8818 (handle_warn_unused_attribute): New.
8820 2013-07-10 Jakub Jelinek <jakub@redhat.com>
8822 * c-ppoutput.c (scan_translation_unit): Call account_for_newlines
8823 for all CPP_TOKEN_FLD_STR tokens, not just CPP_COMMENT.
8825 2013-07-10 Paolo Carlini <paolo.carlini@oracle.com>
8828 * c.opt: Add Wconditionally-supported.
8830 2013-07-08 Graham Stott <graham.stott@btinternet.com>
8832 * array-notation-common.c (length_mismatch_in_expr_p): Delete
8833 unused variables l_length and l_node.
8835 2013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
8838 * c-common.c (complete_array_type): Delay folding first index
8839 like other indices. When folding, check for index overflow.
8841 2013-06-27 Marc Glisse <marc.glisse@inria.fr>
8844 * c-common.h (c_build_vec_perm_expr): New complain argument.
8845 * c-common.c (c_build_vec_perm_expr): Likewise.
8846 Use save_expr also in C++.
8848 2013-06-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
8850 * c-common.c (c_common_nodes_and_builtins): Use cxx11 in lieu of cxx0x.
8851 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
8852 * c-opts.c (c_common_post_options): Likewise.
8854 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
8856 * array-notation-common.c (length_mismatch_in_expr): Changed the
8857 parameter type's from a dynamic array to a vec_tree. Also removed
8858 the size parameters.
8859 * c-common.h (length_mismatch_in_expr_p): Fixed prototype's as per
8862 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
8864 * c-common.h (struct cilkplus_an_parts): New structure.
8865 (struct cilkplus_an_loop_parts): Likewise.
8866 (cilkplus_extract_an_triplets): New prototype.
8867 (fix_sec_implicit_args): Likewise.
8868 * array-notation-common.c (cilkplus_extract_an_triplets): New function.
8869 (fix_sec_implicit_args): Likewise.
8871 2013-06-20 Balaji V. Iyer <balaji.v.iyer@intel.com>
8873 * array-notation-common.c (find_inv_trees): Removed an unwanted
8875 * c-common.h (struct inv_list::additional_tcodes): Changed type from
8876 enum rid to enum tree_code.
8878 2013-06-11 Jan Hubicka <jh@suse.cz>
8880 * c-common.c (handle_alias_ifunc_attribute): Do not set
8881 DECL_EXTERNAL for weakref variables.
8882 * c-pragma.c (handle_pragma_weak): Make sure aliases
8883 are not declared as external.
8885 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
8887 * array-notation-common.c (length_mismatch_in_expr_p): Moved this
8888 function from c/c-array-notation.c.
8889 (is_cilkplus_reduce_builtin): Likewise.
8890 (find_rank): Likewise.
8891 (extract_array_notation_exprs): Likewise.
8892 (replace_array_notations): Likewise.
8893 (find_inv_trees): Likewise.
8894 (replace_inv_trees): Likewise.
8895 (contains_array_notation_expr): Likewise.
8896 (find_correct_array_notation_type): Likewise.
8897 * c-common.h (struct inv_list): Moved this struct from the file
8898 c/c-array-notation.c and added a new field called additional tcodes.
8899 (length_mismatch_in_expr_p): New prototype.
8900 (is_cilkplus_reduce_builtin): Likewise.
8901 (find_rank): Likewise.
8902 (extract_array_notation_exprs): Likewise.
8903 (replace_array_notation): Likewise.
8904 (find_inv_trees): Likewise.
8905 (replace_inv_trees): Likewise.
8906 (find_correct_array_notation_type): Likewise.
8908 2013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
8910 * c-common.c (c_define_builtins): When cilkplus is enabled, the
8911 function array_notation_init_builtins is called.
8912 (c_common_init_ts): Added ARRAY_NOTATION_REF as typed.
8913 * c-common.def (ARRAY_NOTATION_REF): New tree.
8914 * c-common.h (build_array_notation_expr): New function declaration.
8915 (build_array_notation_ref): Likewise.
8916 (extract_sec_implicit_index_arg): New extern declaration.
8917 (is_sec_implicit_index_fn): Likewise.
8918 (ARRAY_NOTATION_CHECK): New define.
8919 (ARRAY_NOTATION_ARRAY): Likewise.
8920 (ARRAY_NOTATION_START): Likewise.
8921 (ARRAY_NOTATION_LENGTH): Likewise.
8922 (ARRAY_NOTATION_STRIDE): Likewise.
8923 * c-pretty-print.c (pp_c_postifix_expression): Added a new case for
8925 (pp_c_expression): Likewise.
8926 * c.opt (flag_enable_cilkplus): New flag.
8927 * array-notation-common.c: New file.
8929 2013-05-14 Jakub Jelinek <jakub@redhat.com>
8932 * c-common.c (verify_tree): Don't recurse into SIZEOF_EXPR.
8934 2013-05-10 Marc Glisse <marc.glisse@inria.fr>
8936 * c-common.c (vector_types_convertible_p): No TYPE_PRECISION for
8939 2013-05-07 Han Shen <shenhan@google.com>
8941 * c-cppbuiltin.c (c_cpp_builtins): Added "__SSP_STRONG__=3".
8943 2013-04-29 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
8945 * c-common.c (check_user_alignment): Emit error for negative values.
8947 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
8949 * c-opts.c (set_std_cxx11): Use CLK_CXX1Y and CLK_GNUCXX1Y.
8951 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
8953 * c-cppbuiltin.c (c_cpp_builtins): Do not define
8954 __GXX_EXPERIMENTAL_CXX1Y__.
8956 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
8957 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
8959 * c.opt ([Wpointer-arith]): Enabled by -Wpedantic, as documented.
8960 * c-common.c (pointer_int_sum): Change -Wpointer-arith pedwarns
8961 to simply use OPT_Wpointer_arith.
8962 (c_sizeof_or_alignof_type): Likewise.
8964 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
8966 * c-cppbuiltin.c (c_cpp_builtins): Define __GXX_EXPERIMENTAL_CXX1Y__.
8968 2013-04-12 Jakub Jelinek <jakub@redhat.com>
8970 * c-format.c (gcc_diag_char_table, gcc_tdiag_char_table,
8971 gcc_cdiag_char_table, gcc_cxxdiag_char_table): Add %r and %R format
8974 2013-04-07 Steven Bosscher <steven@gcc.gnu.org>
8976 * c-pragma.c (add_to_renaming_pragma_list): Fix leading comment.
8978 2013-04-03 Paolo Carlini <paolo.carlini@oracle.com>
8980 * c-common.c (pointer_int_sum): Remove dead code.
8982 2013-03-09 Richard Sandiford <rdsandiford@googlemail.com>
8985 * c-common.c (handle_optimize_attribute): Don't call
8986 save_optabs_if_changed.
8988 2013-03-05 Jakub Jelinek <jakub@redhat.com>
8991 * c-pch.c (pch_init): Free target_validity at the end.
8993 2013-03-04 Jakub Jelinek <jakub@redhat.com>
8995 * c-pretty-print.c (pp_c_pretty_printer_init): Clear pp->flags.
8997 2013-02-28 Konstantin Serebryany <konstantin.s.serebryany@gmail.com>
8998 Jakub Jelinek <jakub@redhat.com>
9001 * c-common.c (handle_no_sanitize_address_attribute): New function.
9002 (c_common_attribute_table): Add no_sanitize_address attribute.
9003 (handle_no_address_safety_analysis_attribute): Add
9004 no_sanitize_address attribute, not no_address_safety_analysis
9007 2013-02-18 Aldy Hernandez <aldyh@redhat.com>
9010 * c-common.c (handle_optimize_attribute): Call
9011 save_optabs_if_changed.
9013 2013-02-18 Jakub Jelinek <jakub@redhat.com>
9014 Steven Bosscher <steven@gcc.gnu.org>
9017 * c-opts.c (c_common_post_options): If debug info is enabled
9018 and non-dwarf*, refuse to load PCH files and when writing PCH
9021 2013-02-05 Jakub Jelinek <jakub@redhat.com>
9024 * c-common.c (handle_error_attribute): Fix condition.
9026 2013-01-30 Jakub Jelinek <jakub@redhat.com>
9029 * c-common.c (handle_target_attribute): Revert 2012-12-26 change.
9031 2013-01-18 Jason Merrill <jason@redhat.com>
9034 * c.opt (-fextern-tls-init): New.
9035 * c-opts.c (c_common_post_options): Handle it.
9037 2013-01-09 Jakub Jelinek <jakub@redhat.com>
9040 * c-common.c (c_fully_fold_internal): Warn for LSHIFT_EXPR and
9041 RSHIFT_EXPR, if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST
9042 and is either negative or bigger or equal to type precision
9043 of the first operand.
9045 2012-12-03 Marek Polacek <polacek@redhat.com>
9048 * c-common.c (check_user_alignment): Swap order of tests,
9049 check TREE_CODE first.
9051 2012-11-29 Ed Smith-Rowland <3dw4rd@verizon.net>
9054 * c-common.h (overflow_type): New enum.
9055 (build_userdef_literal): Add overflow_type argument.
9056 (tree_userdef_literal): Add overflow_type.
9057 (USERDEF_LITERAL_OVERFLOW): New access macro.
9058 * c-common.c (build_userdef_literal): Add overflow_type
9060 * c-lex.c (c_lex_with_flags): Add overflow_type to
9061 build_userdef_literal calls.
9062 (interpret_integer, interpret_float): Add overflow_type argument.
9064 2012-11-28 Richard Biener <rguenther@suse.de>
9067 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
9068 here and use a type with proper overflow behavior for types that would
9069 need to be promoted for the arithmetic.
9071 2012-11-23 Jakub Jelinek <jakub@redhat.com>
9074 * c-common.c (handle_no_address_safety_analysis_attribute): New
9076 (c_common_attribute_table): Add no_address_safety_analysis.
9078 2012-11-16 Simon Baldwin <simonb@google.com>
9080 * c.opt: Add f[no-]canonical-system-headers.
9081 * c-opts.c (c_common_handle_option): Handle
9082 OPT_fcanonical_system_headers.
9084 2012-11-09 Ed Smith-Rowland <3dw4rd@verizon.net>
9087 * c-opts.c (c_common_handle_option): Set new flags.
9088 * c.opt: Describe new flags.
9090 2012-11-09 Jason Merrill <jason@redhat.com>
9092 * c.opt (Wabi-tag): New.
9094 2012-11-09 Andi Kleen <ak@linux.intel.com>
9097 * c-common.c (get_atomic_generic_size): Mask with
9100 2012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
9103 * c.opt (Wformat): Make it Alias Wformat=1.
9104 (Wformat-contains-nul,Wformat-extra-args,Wformat-nonliteral,
9105 Wformat-security,Wformat-y2k,Wformat-zero-length): Use
9107 (Wformat=): RejectNegative. Use LangEnabledBy.
9108 (Wnonnull): Use LangEnabledBy.
9109 * c-opts.c (c_common_handle_option): Do not handle Wformat here.
9110 * c-format.c (set_Wformat): Delete.
9111 (decode_format_attr): Replace OPT_Wformat with OPT_Wformat_.
9112 (maybe_read_dollar_number): Likewise.
9113 (avoid_dollar_number): Likewise.
9114 (finish_dollar_format_checking): Likewise.
9115 (check_format_info): Likewise.
9116 (check_format_info_main): Likewise.
9117 (check_format_types): Likewise.
9118 (format_type_warning): Likewise.
9119 * c-common.c (int): Likewise.
9120 (check_function_sentinel): Likewise.
9121 * c-common.h (warn_format,set_Wformat): Do not declare here.
9123 2012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
9126 * c.opt(Warray-bounds,Wdelete-non-virtual-dtor,Wenum-compare,
9127 Wmain,Woverlength-strings, Wunknown-pragmas,Wunused-macros):
9129 (Wswitch,Wswitch-default,Wswitch-enum): Likewise. Move here from
9131 (Wvariadic-macros): Init(1).
9132 * c-opts.c (c_common_handle_option): Do not handle them
9134 (c_common_post_options): Likewise.
9135 (sanitize_cpp_opts): warn_unused_macros is now
9136 cpp_warn_unused_macros.
9137 (push_command_line_include): Likewise.
9138 * c-common.c (warn_unknown_pragmas): Do not define.
9139 * c-common.h (warn_unknown_pragmas): Do not declare.
9141 2012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
9144 * c-common.c (conversion_warning): Handle conditional expressions.
9146 2012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
9149 * c.opt (Wreturn_local_addr): Define new option.
9151 2012-10-25 Jason Merrill <jason@redhat.com>
9153 * c.opt (Wvirtual-move-assign): New.
9155 * c.opt (Winherited-variadic-ctor): New.
9157 2012-10-25 Marc Glisse <marc.glisse@inria.fr>
9160 * c-common.c (scalar_to_vector): Handle VEC_COND_EXPR.
9162 2012-10-23 Joseph Myers <joseph@codesourcery.com>
9164 * c-common.h (pch_cpp_save_state): Declare.
9165 * c-target.def (c_preinclude): New hook.
9166 * c-opts.c (done_preinclude): New.
9167 (push_command_line_include): Handle default preincluded header.
9168 (cb_file_change): Call pch_cpp_save_state when calling
9169 push_command_line_include.
9170 * c-pch.c (pch_ready_to_save_cpp_state, pch_cpp_state_saved)
9171 (pch_cpp_save_state): New.
9172 (pch_init): Call pch_cpp_save_state conditionally, instead of
9173 calling cpp_save_state.
9175 2012-10-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
9179 * c.opt (Waddress,Wchar-subscripts,Wsign-conversion,Wimplicit,
9180 Wimplicit-function-declaration,Wimplicit-int,Wsizeof-pointer-memaccess,
9181 Wnarrowing,Wparentheses,Wpointer-sign,Wreturn-type,Wsequence-point,
9182 Wsign-compare,Wuninitialized,Wmaybe-uninitialized,Wunused,
9183 Wvolatile-register-var): Add LangEnabledBy or EnabledBy.
9184 * c-opts.c (c_common_handle_option): Remove explicit handling from
9186 (c_common_post_options): Likewise.
9188 2012-10-18 Eric Botcazou <ebotcazou@adacore.com>
9190 * c-ada-spec.c (LOCATION_COL): Delete.
9191 (compare_location): New function.
9192 (compare_node): Use it.
9193 (compare_comment): Likewise.
9195 2012-10-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
9199 * c.opt (Wstrict-aliasing=,Wstrict-overflow=): Use LangEnabledBy.
9200 * c-opts.c (c_common_handle_option): Do not set them here. Add
9202 (c_common_post_options): Likewise.
9204 2012-10-16 Eric Botcazou <ebotcazou@adacore.com>
9206 * c-ada-spec.c (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Define.
9207 (dump_generic_ada_node) <INTEGER_CST>: Deal with sizetype specially.
9208 Remove POINTER_TYPE handling, add large unsigned handling and use
9209 ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX for big numbers.
9211 2012-10-12 Jakub Jelinek <jakub@redhat.com>
9214 * c-common.h (sizeof_pointer_memaccess_warning): Adjust prototype.
9215 * c-common.c (sizeof_pointer_memaccess_warning): Take array of 3
9216 locs and array of 3 trees instead of just single loc and single
9217 sizeof_arg tree. Handle __builtin___*_chk builtins too, and
9218 also stpncpy, bcopy, bcmp, bzero, snprintf and vsnprintf builtins.
9219 For *cmp* builtins that take two sources strings report warnings
9220 about first and second source, not about destination and source.
9222 2012-10-12 Marc Glisse <marc.glisse@inria.fr>
9225 * c-common.h (enum ref_operator) [RO_ARROW_STAR]: New.
9227 2012-10-11 Eric Botcazou <ebotcazou@adacore.com>
9229 * c-ada-spec.c (dump_ada_template): Bail out for template declarations
9230 declaring something coming from another file.
9232 2012-10-10 Arnaud Charlet <charlet@adacore.com>
9235 * c-ada-spec.c (print_ada_struct_decl): Increase buf size.
9237 2012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
9240 * c-common.c (warn_about_parentheses): Add location_t parameter;
9241 use EXPR_LOC_OR_LOC.
9242 * c-common.h: Update declaration.
9244 2012-10-09 Marc Glisse <marc.glisse@inria.fr>
9247 * c-common.c (scalar_to_vector): Moved from c-typeck.c. Support
9248 more operations. Make error messages optional.
9249 * c-common.h (enum stv_conv): Moved from c-typeck.c.
9250 (scalar_to_vector): Declare.
9252 2012-10-08 Jason Merrill <jason@redhat.com>
9254 * c-common.c (c_common_reswords): Add thread_local.
9256 2012-10-08 Dodji Seketeli <dodji@redhat.com>
9258 PR c++/53528 C++11 attribute support
9259 * c-common.h (bitfield_p, cxx_fundamental_alignment_p): Declare
9261 * c-common.c (check_cxx_fundamental_alignment_constraints): New
9263 (handle_aligned_attribute): In choose strictest alignment
9264 among many. Use new check_cxx_fundamental_alignment_constraints.
9265 (handle_transparent_union_attribute): In c++11 attribute syntax,
9266 don't look through typedefs.
9268 2012-10-04 Arnaud Charlet <charlet@adacore.com>
9270 * c-ada-spec.c (print_ada_declaration): Remove handling of TDF_RAW.
9271 * c.opt (-fdump-ada-spec, -fdump-ada-spec-slim): Move switch definition
9274 2012-09-25 Dehao Chen <dehao@google.com>
9277 * c-pch.c (c_common_read_pch): Rebuild the location_adhoc_data
9278 map when read in the pch.
9280 2012-09-18 Arnaud Charlet <charlet@adacore.com>
9282 * c-ada-spec.c: Style fixes.
9284 2012-09-18 Thomas Quinot <quinot@adacore.com>
9286 * c.opt (-fada-spec-parent): Define new command line switch.
9287 * c-ada-spec.c (get_ada_package): When -fada-spec-parent
9288 is specified, generate binding spec as a child of the specified unit.
9290 2012-09-13 Paolo Carlini <paolo.carlini@oracle.com>
9291 Manuel López-Ibáñez <manu@gcc.gnu.org>
9294 * c.opt ([Winit-self]): Enabled by -Wall in C++.
9296 2012-08-23 Arnaud Charlet <charlet@adacore.com>
9298 * c-ada-spec.c (dump_generic_ada_node): Fix handling of name_only
9299 for pointers, and add missing Convention C pragma.
9300 (print_ada_struct_decl): Add missing aliased keyword.
9301 (dump_ads): Add pragma Ada_2005 and Style_Checks (Off).
9303 2012-08-17 Jakub Jelinek <jakub@redhat.com>
9305 * c-common.c (sizeof_pointer_memaccess_warning): New function.
9306 * c.opt (-Wsizeof-pointer-memaccess): Add new option.
9307 * c-opts.c (c_common_handle_option): Enable it for -Wall.
9308 * c-common.h (sizeof_pointer_memaccess_warning): Add prototype.
9309 * c-common.def (SIZEOF_EXPR): Moved here from cp-tree.def.
9311 2012-08-10 Richard Guenther <rguenther@suse.de>
9313 * c-pretty-print.c (pp_c_expression): Handle anonymous SSA names.
9315 2012-08-07 Steven Bosscher <steven@gcc.gnu.org>
9317 * c-pretty-print.c (pp_c_function_definition): Use pp_newline_and_flush
9318 instead of separate pp_newline and pp_flush.
9319 (print_c_tree): Likewise.
9321 2012-07-26 Richard Henderson <rth@redhat.com>
9323 * c-common.c (handle_hot_attribute): Allow labels.
9324 (handle_cold_attribute): Likewise.
9326 2012-07-20 Jakub Jelinek <jakub@redhat.com>
9329 * c-common.c (check_function_nonnull): Handle multiple nonnull
9330 attributes properly.
9332 2012-07-16 Steven Bosscher <steven@gcc.gnu.org>
9334 * c-gimplify.c: Include dumpfile.h instead of tree-dump.h.
9335 * c-ada-spec.c: Likewise.
9336 * c-dump.c (dump_stmt): Move to cp/dump.c, the only user.
9338 2012-07-14 Steven Bosscher <steven@gcc.gnu.org>
9340 * c-pch.c (CHECK_NO_ASM_OUT_DURING_PCH): Do not define.
9341 Remove code conditional on it.
9343 2012-07-11 Steven Bosscher <steven@gcc.gnu.org>
9345 * c-gimplify.c: Do not include basic-block.h.
9346 * c-common.c: Do not include linfuncs.h.
9348 2012-07-08 Steven Bosscher <steven@gcc.gnu.org>
9350 * c-common.h: Include tree.h.
9352 2012-07-02 Jason Merrill <jason@redhat.com>
9355 * c-common.c (get_priority): Call default_conversion.
9357 2012-07-01 Uros Bizjak <ubizjak@gmail.com>
9359 * c-pch.c (c_common_write_pch): Remove unused variables.
9361 2012-06-29 Steven Bosscher <steven@gcc.gnu.org>
9363 * cppspec.c: Moved from gcc/ to here.
9365 2012-06-27 Kai Tietz <ktietz@redhat.com>
9367 PR preprocessor/37215
9368 * c-ppoutput.c (preprocess_file): Check for nonempty buffer.
9370 2012-06-21 Steven Bosscher <steven@gcc.gnu.org>
9372 * c-common.h (c_common_print_pch_checksum): Remove.
9373 * c-pch.c: Do not include output.h.
9374 (CHECK_NO_ASM_OUT_DURING_PCH): Define and add FIXME.
9375 (asm_out_file): Define iff CHECK_NO_ASM_OUT_DURING_PCH isdefined.
9376 (asm_file_startpos): Define iff CHECK_NO_ASM_OUT_DURING_PCH is defined.
9377 (struct c_pch_header): Remove.
9378 (get_ident): Update gpch version.
9379 (pch_init): Do not print executable_checksum to asm_out_file.
9380 Do not fail if there is no asm_out_file to read back from. Set
9381 asm_file_startpos only if CHECK_NO_ASM_OUT_DURING_PCH is defined.
9382 (c_common_write_pch): Verify that nothing was written to asm_out_file
9383 since pch_init was called. Do not write a c_pch_header, and do not
9384 copy from asm_out_file to the PCH.
9385 (c_common_read_pch): Do not read a c_pch_header, and do not restore
9386 the content of asm_out_file from the PCH.
9387 (c_common_print_pch_checksum): Remove.
9388 * c-opts.c (c_common_init): Print out executable_checksum directly.
9390 2012-06-19 Steven Bosscher <steven@gcc.gnu.org>
9392 * c-target.def (objc_declare_unresolved_class_reference,
9393 objc_declare_class_definition): Add new hooks.
9395 2012-06-19 Steven Bosscher <steven@gcc.gnu.org>
9397 * c-lex.c: Do not include output.h.
9398 (cb_ident): Try to put out .ident with targetm.asm_out.output_ident.
9399 Remove uses of ASM_OUTPUT_IDENT.
9401 2012-06-15 Marc Glisse <marc.glisse@inria.fr>
9404 * c-common.h (c_build_vec_perm_expr): Move decl here.
9405 * c-common.c (c_build_vec_perm_expr): Move definition
9408 2012-06-06 Steven Bosscher <steven@gcc.gnu.org>
9410 * c.opt (fconserve-space): Turn into a no-op.
9412 2012-06-04 Sterling Augustine <saugustine@google.com>
9414 * c-pretty-print.h (pp_c_flag_gnu_v3): New enumerator.
9415 * c-pretty-print.c (pp_c_specifier_qualifier_list): Check it at
9416 both the start and end of the function.
9418 2012-06-04 Steven Bosscher <steven@gcc.gnu.org>
9420 * c-common.c: Do not include output.h.
9421 * c-pragma.c: Likewise.
9423 2012-06-04 Steven Bosscher <steven@gcc.gnu.org>
9425 * error.c (dump_decl): Check pp_c_flag_gnu_v3.
9426 (decl_as_dwarf_string, lang_decl_dwarf_name): New functions.
9427 (lang_decl_name): Handle namespace decls.
9429 2012-05-31 Steven Bosscher <steven@gcc.gnu.org>
9431 * c-ada-spec.c: Do not include output.h.
9432 * c-semantics.c: Likewise.
9434 2012-05-29 Joseph Myers <joseph@codesourcery.com>
9436 * c-common.c: Fix typo.
9438 2012-05-29 Michael Matz <matz@suse.de>
9440 * c-common.h (c_expand_decl): Remove prototype.
9442 2012-05-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
9444 * c.opt (Wmissing-braces): Use LangEnabledBy(C ObjC,Wall).
9445 * c-opts.c (c_common_handle_option): Remove code handling
9446 warn_missing_braces.
9448 2012-05-28 Paolo Carlini <paolo.carlini@oracle.com>
9451 * c-opts.c (c_common_handle_option): For C++ -Wall doesn't enable
9454 2012-05-22 Dodji Seketeli <dodji@redhat.com>
9457 * c.opt (Wunused-local-typedefs): Use EnabledBy(Wunused).
9459 2012-05-17 Manuel López-Ibáñez <manu@gcc.gnu.org>
9461 * c.opt (--pedantic-errors,-pedantic-errors): Do not handle here.
9462 * c-opts.c (c_common_handle_option): Do not handle explicitly
9463 Wreturn-type, Wwrite-strings, warn_ecpp, and -pedantic-errors.
9465 2012-05-16 Dodji Seketeli <dodji@redhat.com>
9467 PR preprocessor/7263
9468 * c-lex.c (c_lex_with_flags): Pass a virtual location to the call
9469 to cpp_classify_number. For diagnostics, use the precise location
9470 instead of the global input_location.
9472 2012-05-15 Paolo Carlini <paolo.carlini@oracle.com>
9475 * c-common.c (shorten_compare): Check c_inhibit_evaluation_warnings.
9477 2012-05-14 Bernd Schmidt <bernds@codesourcery.com>
9479 * c-common.c (DEF_ATTR_STRING): Define and undefine as necessary.
9481 2012-05-14 Manuel López-Ibáñez <manu@gcc.gnu.org>
9484 * c.opt (Wc++0X-compat,Wdelete-non-virtual-dtor,Wjump-misses-init,
9485 Wreorder): Use LangEnabledBy.
9486 * c-opts.c (c_common_handle_option): Do not enable them
9487 explicitly. Call lang-specific generated functions.
9488 (c_common_post_options): Do not set them here.
9490 2012-05-13 Manuel López-Ibáñez <manu@gcc.gnu.org>
9492 * c.opt (Wclobbered,Wempty-body,Wignored-qualifiers,
9493 Wmissing-field-initializers,Wmissing-parameter-type,
9494 Wold-style-declaration,Woverride-init): Use EnabledBy.
9495 * c-opts.c (c_common_post_options): Do not set here explicitly.
9497 2012-05-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
9500 * c-opts.c (c_common_handle_option): Use handle_generated_option
9501 to enable sub-options.
9503 2012-05-10 Paolo Carlini <paolo.carlini@oracle.com>
9506 * c-common.c (warnings_for_convert_and_check): Use warning_at.
9508 2012-05-10 Richard Guenther <rguenther@suse.de>
9510 * c-common.c (c_sizeof_or_alignof_type): Remove assert and
9511 adjust commentary about TYPE_IS_SIZETYPE types.
9513 2012-05-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
9516 * c-common.c (warn_logical_operator): Check that argument of
9517 integer_zerop is not NULL.
9519 2012-05-05 Manuel López-Ibáñez <manu@gcc.gnu.org>
9522 * c-common.c (warn_logical_operator): Do not warn if either side
9523 is already true or false.
9525 2012-05-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
9528 * c-common.c (expr_original_type): New.
9529 (shorten_compare): Do not warn for enumeration types.
9531 2012-05-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
9533 * c.opt (fpermissive): Add Var(flag_permissive).
9535 2012-04-30 Marc Glisse <marc.glisse@inria.fr>
9538 * c-common.c (convert_vector_to_pointer_for_subscript): New function.
9539 * c-common.h (convert_vector_to_pointer_for_subscript): Declare it.
9541 2012-04-30 Dodji Seketeli <dodji@redhat.com>
9543 Add -Wvarargs option
9544 * c.opt (Wvarargs): Define new option.
9546 2012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
9548 * c-common.c (check_function_arguments): Replace
9549 Wmissing-format-attribute with Wsuggest-attribute=format.
9551 2012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
9553 * c.opt (Wsuggest-attribute=format): New. Alias of
9554 Wmissing-format-attribute.
9555 * c-format.c (decode_format_type): Replace
9556 Wmissing-format-attribute with Wsuggest-attribute=format.
9557 (check_function_format): Likewise.
9559 2012-04-27 Ollie Wild <aaw@google.com>
9561 * c-common.c: Add CPP_W_LITERAL_SUFFIX mapping.
9562 * c-opts.c (c_common_handle_option): Handle OPT_Wliteral_suffix.
9563 * c.opt: Add Wliteral-suffix.
9565 2012-04-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
9568 * c.opt (Wpedantic): New.
9569 (pedantic): Alias Wpedantic.
9570 * c-opts.c (c_common_handle_option): Replace -pedantic with -Wpedantic.
9571 (c_common_post_options): Likewise.
9572 (sanitize_cpp_opts): Likewise.
9573 * c-lex.c (interpret_float): Likewise.
9574 * c-format.c (check_format_types): Likewise.
9575 * c-common.c (pointer_int_sum): Likewise.
9576 (c_sizeof_or_alignof_type): Likewise.
9577 (c_add_case_label): Likewise.
9578 (c_do_switch_warnings): Likewise.
9579 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
9581 2012-04-15 Jason Merrill <jason@redhat.com>
9584 * c-format.c (CPLUSPLUS_STD_VER): C++11 inherits from C99.
9585 (C_STD_NAME): Distinguish between C++98 and C++11.
9587 2012-04-11 Eric Botcazou <ebotcazou@adacore.com>
9590 * c-common.h (uint16_type_node): Rename into...
9591 (c_uint16_type_node): ...this.
9592 * c-common.c (c_common_nodes_and_builtins): Adjust for above renaming.
9593 * c-cppbuiltin.c (builtin_define_stdint_macros): Likewise.
9595 2012-04-10 Manuel López-Ibáñez <manu@gcc.gnu.org>
9597 * c-common.c (warn_if_unused_value): Move definition to here.
9598 * c-common.h (warn_if_unused_value): Move declaration to here.
9600 2012-03-23 William Bader <williambader@hotmail.com>
9602 * c-lex.c (c_lex_with_flags): Avoid declarations after stmts.
9604 2012-03-20 Jason Merrill <jason@redhat.com>
9606 * c-common.h (enum cxx_dialect): Add cxx1y.
9607 * c-common.c (c_common_nodes_and_builtins): Use >= for cxx_dialect
9609 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
9610 * c-opts.c (c_common_post_options): Likewise.
9611 (set_std_cxx1y): New.
9612 (c_common_handle_option): Call it.
9613 * c.opt (-std=c++1y, -std=gnu++1y): New flags.
9615 2012-03-19 Paolo Carlini <paolo.carlini@oracle.com>
9618 * c.opt ([Wuseless-cast]): Add.
9620 2012-03-16 Richard Guenther <rguenther@suse.de>
9622 * c-pretty-print.c (pp_c_initializer_list): Adjust.
9624 2012-03-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
9627 * c.opt (ftemplate-backtrace-limit) Add.
9629 2012-03-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9631 * c-cppbuiltin.c (c_cpp_builtins): Remove #pragma extern_prefix
9633 * c-pragma.c (handle_pragma_extern_prefix): Remove.
9634 (init_pragma): Don't register extern_prefix.
9636 2012-03-12 Richard Guenther <rguenther@suse.de>
9638 * c-common.c (c_common_get_narrower): Use c_common_type_for_size.
9639 (builtin_type_for_size): Likewise.
9641 2012-02-13 Jakub Jelinek <jakub@redhat.com>
9644 * c-common.c (sync_resolve_params): Don't decide whether to convert
9645 or not based on TYPE_SIZE comparison, convert whenever arg_type
9646 is unsigned INTEGER_TYPE.
9648 2012-02-06 Paolo Carlini <paolo.carlini@oracle.com>
9651 * c.opt ([Wunused-local-typedefs]): Fix description.
9653 2012-01-24 Mike Stump <mikestump@comcast.net>
9655 * c-common.c (c_common_type_for_mode): Match signed/unsigned types
9658 2012-01-18 Richard Guenther <rguenther@suse.de>
9660 * c-opts.c (c_common_post_options): Reset LTO flags if
9661 we are about to generate a PCH.
9663 2012-01-17 Paolo Carlini <paolo.carlini@oracle.com>
9666 * c-pretty-print.c (pp_c_integer_constant): For unsigned constants
9667 use pp_unsigned_wide_integer.
9669 2012-01-10 Richard Guenther <rguenther@suse.de>
9672 * c-opts.c (c_common_handle_option): Move -Werror handling
9673 to language independent code.
9675 2012-01-05 Richard Guenther <rguenther@suse.de>
9678 * c.opt (Wmudflap, fmudflap, fmudflapth, fmudflapir): Move here
9681 2011-12-30 Paolo Carlini <paolo.carlini@oracle.com>
9684 * c-common.c (c_sizeof_or_alignof_type): In C++ allow for alignof
9685 of array types with an unknown bound.
9687 2011-12-20 Joseph Myers <joseph@codesourcery.com>
9689 * c-common.c (flag_isoc99): Update comment to refer to C11.
9690 (flag_isoc1x): Change to flag_isoc11.
9691 * c-common.h (flag_isoc99): Update comment to refer to C11.
9692 (flag_isoc1x): Change to flag_isoc11.
9693 * c-cppbuiltin.c (cpp_atomic_builtins): Change comment to refer to
9695 * c-opts.c (set_std_c1x): Change to set_std_c11.
9696 (c_common_handle_option): Handle OPT_std_c11 and OPT_std_gnu11.
9698 (set_std_c89, set_std_c99, set_std_c11): Use flag_isoc11.
9699 (set_std_c1): Use CLK_STDC11 and CLK_GNUC11.
9700 * c.opt (std=c1x): Change to std=c11. Document as non-draft
9702 (std=c1x, std=iso9899:2011): Add as aliases of std=c11.
9703 (std=gnu1x): Change to std=gnu11. Refer to non-draft standard.
9704 (std=gnu1x): Make alias of std=gnu11.
9706 2011-12-19 Jason Merrill <jason@redhat.com>
9709 * c-common.c (handle_transparent_union_attribute): Check the first
9710 field if the type is complete.
9712 2011-12-15 Jonathan Wakely <jwakely.gcc@gmail.com>
9715 * c-common.c (RID_IS_FINAL): Add.
9716 * c-common.h (RID_IS_FINAL): Add.
9718 2011-11-30 Iain Sandoe <iains@gcc.gnu.org>
9720 * c.opt (fgnu-runtime): Provide full description.
9721 (fnext-runtime): Likewise.
9722 * c-opts.c (OPT_fgnu_runtime, OPT_fnext_runtime) Remove.
9724 2011-11-28 Andrew MacLeod <amacleod@redhat.com>
9726 * c-cpp-builtin.c (cpp_atomic_builtins):New. Emit all atomic
9727 predefines in one place. Add LOCK_FREE predefines.
9728 (c_cpp_builtins): Move Legacy HAVE_SYNC predefines to
9731 2011-11-24 Andrew MacLeod <amacleod@redhat.com>
9734 * c-common.c (get_atomic_generic_size): Check for various error
9736 (resolve_overloaded_atomic_exchange,
9737 resolve_overloaded_atomic_compare_exchange,
9738 resolve_overloaded_atomic_load, resolve_overloaded_atomic_store): Return
9739 error_mark_node for error conditions.
9741 2011-11-08 Richard Guenther <rguenther@suse.de>
9744 * c-pretty-print.c (pp_c_expression): Handle SSA_NAMEs.
9746 2011-11-07 Richard Henderson <rth@redhat.com>
9747 Aldy Hernandez <aldyh@redhat.com>
9748 Torvald Riegel <triegel@redhat.com>
9750 Merged from transactional-memory.
9752 * c-common.c (handle_tm_wrap_attribute,
9753 handle_tm_attribute, ignore_attribute, parse_tm_stmt_attr): New.
9754 (struct c_common_reswords): Added __transaction* keywords.
9755 (struct c_common_attribute_table): Added transaction* and tm_regparm
9757 * c-common.h: Added RID_TRANSACTION*. Added TM_ATTR* and TM_STMT*
9759 (parse_tm_stmt_attr, tm_attr_to_mask, tm_mask_to_attr,
9760 find_tm_attribute): Declare.
9762 2011-11-07 Jason Merrill <jason@redhat.com>
9765 * c-common.c, c-common.h: Revert yesterday's changes.
9767 2011-11-06 Jason Merrill <jason@redhat.com>
9770 * c-common.c (decl_has_visibility_attr): Split out from...
9771 (c_determine_visibility): ...here.
9772 * c-common.h: Declare it.
9774 2011-11-06 Joseph Myers <joseph@codesourcery.com>
9776 * c-common.c (c_common_reswords): Add _Alignas and _Alignof.
9777 (c_sizeof_or_alignof_type): Diagnose alignof applied to a function
9779 (check_user_alignment): New. Split out of
9780 handle_aligned_attribute. Disallow integer constants with
9781 noninteger types. Conditionally allow zero.
9782 (handle_aligned_attribute): Use check_user_alignment.
9783 * c-common.h (RID_ALIGNAS, check_user_alignment): New.
9785 2011-11-06 Andrew MacLeod <amacleod@redhat.com>
9786 Richard Henderson <rth@redhat.com>
9788 Merged from cxx-mem-model.
9790 * c-cppbuiltin.c (c_cpp_builtins): Test both atomic and sync patterns.
9791 * c-common.c (sync_resolve_params, sync_resolve_return): Only tweak
9792 parameters that are the same type size.
9793 (get_atomic_generic_size): New. Find size of generic
9794 atomic function parameters and do typechecking.
9795 (add_atomic_size_parameter): New. Insert size into parameter list.
9796 (resolve_overloaded_atomic_exchange): Restructure __atomic_exchange to
9797 either __atomic_exchange_n or external library call.
9798 (resolve_overloaded_atomic_compare_exchange): Restructure
9799 __atomic_compare_exchange to either _n variant or external library call.
9800 (resolve_overloaded_atomic_load): Restructure __atomic_load to either
9801 __atomic_load_n or an external library call.
9802 (resolve_overloaded_atomic_store): Restructure __atomic_store to either
9803 __atomic_store_n or an external library call.
9804 (resolve_overloaded_builtin): Handle new __atomic builtins.
9806 2011-11-04 Eric Botcazou <ebotcazou@adacore.com>
9809 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Call fold_offsetof_1.
9810 (fold_offsetof_1): Make global. Remove STOP_REF argument and adjust.
9811 <INDIRECT_REF>: Return the argument.
9812 <ARRAY_REF>: Remove special code for negative offset.
9813 Call fold_build_pointer_plus instead of size_binop.
9814 (fold_offsetof): Remove STOP_REF argument and adjust.
9815 * c-common.h (fold_offsetof_1): Declare.
9816 (fold_offsetof): Remove STOP_REF argument.
9818 2011-11-02 Paolo Carlini <paolo.carlini@oracle.com>
9821 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
9822 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
9823 Wnarrowing for C++0x and C++98.
9824 * c.opt ([Wnarrowing]): Update.
9826 2011-11-01 Paolo Carlini <paolo.carlini@oracle.com>
9829 * c.opt: Add Wzero-as-null-pointer-constant.
9831 2011-10-31 Jason Merrill <jason@redhat.com>
9833 * c.opt (-fdeduce-init-list): Off by default.
9836 * c-common.h (cxx_dialect): Add cxx11 and cxx03.
9837 * c.opt: Add -std=c++11, -std=gnu++11, -std=gnu++03,
9839 * c-opts.c (set_std_cxx11): Rename from set_std_cxx0x.
9841 2011-10-27 Roberto Agostino Vitillo <ravitillo@lbl.gov>
9844 * c.opt (fvisibility-inlines-hidden): Description change.
9846 2011-10-26 Ed Smith-Rowland <3dw4rd@verizon.net>
9848 Implement C++11 user-defined literals.
9849 * c-common.c (build_userdef_literal): New.
9850 * c-common.def: New tree code.
9851 * c-common.h (tree_userdef_literal): New tree struct and accessors.
9852 * c-lex.c (interpret_float): Add suffix parm.
9853 (c_lex_with_flags): Build literal tokens.
9855 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
9859 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
9862 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
9863 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
9864 Wnarrowing for C++0x and C++98.
9865 * c.opt ([Wnarrowing]): Update.
9867 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
9870 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
9871 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
9872 Wnarrowing for C++0x and C++98.
9873 * c.opt ([Wnarrowing]): Update.
9875 2011-10-21 Paolo Carlini <paolo.carlini@oracle.com>
9878 * c-common.c (conversion_warning): Remove code looking for
9879 artificial operands.
9881 2011-10-18 Dodji Seketeli <dodji@redhat.com>
9884 * c-lex.c (fe_file_change): Use LINEMAP_SYSP when
9885 !NO_IMPLICIT_EXTERN_C.
9887 2011-10-17 Michael Spertus <mike_spertus@symantec.com>
9889 * c-common.c (c_common_reswords): Add __bases,
9891 * c-common.h: Add RID_BASES and RID_DIRECT_BASES.
9893 2011-10-17 Paolo Carlini <paolo.carlini@oracle.com>
9896 * c.opt ([Wnonnull]): Add C++ and Objective-C++.
9898 2011-10-15 Tom Tromey <tromey@redhat.com>
9899 Dodji Seketeli <dodji@redhat.com>
9901 * c.opt (fdebug-cpp): New option.
9902 * c-opts.c (c_common_handle_option): Handle the option.
9903 * c-ppoutput.c (maybe_print_line_1): New static function. Takes an
9904 output stream in parameter. Factorized from ...
9905 (maybe_print_line): ... this. Dump location debug information when
9906 -fdebug-cpp is in effect.
9907 (print_line_1): New static function. Takes an output stream in
9908 parameter. Factorized from ...
9909 (print_line): ... here. Dump location information when -fdebug-cpp
9911 (scan_translation_unit): Dump location information when
9912 -fdebug-cpp is in effect.
9914 2011-10-15 Tom Tromey <tromey@redhat.com>
9915 Dodji Seketeli <dodji@redhat.com>
9917 * c.opt (ftrack-macro-expansion): New option. Handle it with and
9919 * c-opts.c (c_common_handle_option)<case
9920 OPT_ftrack_macro_expansion_, case OPT_ftrack_macro_expansion>: New
9921 cases. Handle -ftrack-macro-expansion with and without argument.
9923 2011-10-15 Tom Tromey <tromey@redhat.com>
9924 Dodji Seketeli <dodji@redhat.com>
9926 * c-ppoutput.c (scan_translation_unit, maybe_print_line)
9927 (print_line, cb_define, do_line_change): Adjust to avoid touching
9928 the internals of struct line_map. Use the public API instead.
9929 * c-pch.c (c_common_read_pch): Likewise.
9930 * c-lex.c (fe_file_change): Likewise.
9932 2011-10-14 Paolo Carlini <paolo.carlini@oracle.com>
9935 * c.opt ([Wformat-zero-length]): Add C++ and Objective-C++.
9937 2011-10-11 Paolo Carlini <paolo.carlini@oracle.com>
9940 * c-pretty-print.c (pp_c_floating_constant): Output
9941 max_digits10 (in the ISO C++ WG N1822 sense) decimal digits.
9943 2011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
9945 * c-common.c (def_builtin_1): Delete old interface with two
9946 parallel arrays to hold standard builtin declarations, and replace
9947 it with a function based interface that can support creating
9948 builtins on the fly in the future. Change all uses, and poison
9949 the old names. Make sure 0 is not a legitimate builtin index.
9950 * c-omp.c (c_finish_omp_barrier): Ditto.
9951 (c_finish_omp_taskwait): Ditto.
9952 (c_finish_omp_flush): Ditto.
9954 2011-10-11 Tristan Gingold <gingold@adacore.com>
9956 * c.opt: (fallow-parameterless-variadic-functions): New.
9958 2011-09-08 Dodji Seketeli <dodji@redhat.com>
9960 PR c++/33255 - Support -Wunused-local-typedefs warning
9961 * c-common.h (struct c_language_function::local_typedefs): New
9963 (record_locally_defined_typedef, maybe_record_typedef_use)
9964 (maybe_warn_unused_local_typedefs): Declare new functions.
9965 * c-common.c (record_locally_defined_typedef)
9966 (maybe_record_typedef_use)
9967 (maybe_warn_unused_local_typedefs): Define new functions.
9968 * c.opt: Declare new -Wunused-local-typedefs flag.
9970 2011-09-06 Eric Botcazou <ebotcazou@adacore.com>
9973 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Fold offsetof-like
9976 2011-09-05 Richard Guenther <rguenther@suse.de>
9978 * c-common.c (complete_array_type): Use ssize_int (-1) instead
9979 of integer_minus_one_node for empty array upper bounds.
9981 2011-08-28 Dodji Seketeli <dodji@redhat.com>
9983 * c-pch.c (c_common_read_pch): Call linemap_add with LC_ENTER as
9984 it's the first time it's being called on this main TU.
9986 2011-08-24 Richard Guenther <rguenther@suse.de>
9989 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Fix conditional.
9991 2011-08-22 Gabriel Charette <gchare@google.com>
9993 * c-opts.c (c_finish_options): Force BUILTINS_LOCATION for tokens
9994 defined in cpp_init_builtins and c_cpp_builtins.
9996 2011-08-19 Joseph Myers <joseph@codesourcery.com>
9998 * c-common.c (c_common_reswords): Add __builtin_complex.
9999 * c-common.h (RID_BUILTIN_COMPLEX): New.
10001 2011-08-18 Joseph Myers <joseph@codesourcery.com>
10003 * c-common.c (c_common_reswords): Add _Noreturn.
10004 (keyword_is_function_specifier): Handle RID_NORETURN.
10005 * c-common.h (RID_NORETURN): New.
10007 2011-08-10 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
10009 * c-common.c (unsafe_conversion_p): New function. Check if it is
10010 unsafe to convert an expression to the type.
10011 (conversion_warning): Adjust, use unsafe_conversion_p.
10012 * c-common.h (unsafe_conversion_p): New function declaration.
10014 2011-08-02 Jakub Jelinek <jakub@redhat.com>
10016 * c-common.h (c_finish_omp_atomic): Adjust prototype.
10017 (c_finish_omp_taskyield): New prototype.
10018 * c-omp.c (c_finish_omp_atomic): Add OPCODE, V, LHS1 and RHS1
10019 arguments. Handle OMP_ATOMIC_READ, OMP_ATOMIC_CAPTURE_OLD and
10020 OMP_ATOMIC_CAPTURE_NEW in addition to OMP_ATOMIC. If LHS1
10021 or RHS1 have side-effects, evaluate those too in the right spot,
10022 if it is a decl and LHS is also a decl, error out if they
10024 (c_finish_omp_taskyield): New function.
10025 * c-cppbuiltin.c (c_cpp_builtins): Change _OPENMP to 201107.
10026 * c-pragma.c (omp_pragmas): Add taskyield.
10027 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKYIELD.
10028 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_FINAL and
10029 PRAGMA_OMP_CLAUSE_MERGEABLE.
10031 2011-07-25 Dodji Seketeli <dodji@redhat.com>
10033 * c-common.h (set_underlying_type): Remove parm name from
10036 2011-07-25 Romain Geissler <romain.geissler@gmail.com>
10038 * c-pretty-print.h: Search c-common.h in c-family.
10040 2011-07-22 Jason Merrill <jason@redhat.com>
10043 * c.opt (Wnarrowing): New.
10046 * c-common.h: Declare c_linkage_bindings.
10047 * c-pragma.c (handle_pragma_redefine_extname): Use it.
10050 * c-opts.c (set_std_cxx0x): Set flag_isoc94 and flag_isoc99.
10051 * c-pretty-print.c (pp_c_cv_qualifiers): Check c_dialect_cxx as well
10052 as flag_isoc99 for 'restrict'.
10053 (pp_c_specifier_qualifier_list): Likewise for _Complex.
10055 2011-07-21 Ian Lance Taylor <iant@google.com>
10057 PR middle-end/49705
10058 * c-common.c (c_disable_warnings): New static function.
10059 (c_enable_warnings): New static function.
10060 (c_fully_fold_internal): Change local unused_p to bool. Call
10061 c_disable_warnings and c_enable_warnings rather than change
10062 c_inhibit_evaluation_warnings.
10064 2011-07-20 Jason Merrill <jason@redhat.com>
10066 PR c++/6709 (DR 743)
10067 PR c++/42603 (DR 950)
10068 * c-common.h (CPP_KEYWORD, CPP_TEMPLATE_ID): Move from cp/parser.h.
10069 (CPP_NESTED_NAME_SPECIFIER, N_CP_TTYPES): Likewise.
10070 (CPP_DECLTYPE): New.
10071 * c-common.c (c_parse_error): Handle CPP_DECLTYPE.
10073 2011-07-19 Richard Guenther <rguenther@suse.de>
10075 * c-common.c (pointer_int_sum): Use fold_build_pointer_plus.
10076 * c-omp.c (c_finish_omp_for): Likewise.
10078 2011-07-12 Eric Botcazou <ebotcazou@adacore.com>
10080 * c-ada-spec.c (dump_nested_types): Put semi-colon after empty loop
10081 body on the next line.
10083 2011-07-08 Jason Merrill <jason@redhat.com>
10086 * c-omp.c (check_omp_for_incr_expr): Handle preevaluation.
10089 * c-common.c (c_apply_type_quals_to_decl): Don't check
10090 TYPE_NEEDS_CONSTRUCTING.
10092 2011-07-06 Richard Guenther <rguenther@suse.de>
10094 * c-common.c (c_common_nodes_and_builtins):
10095 Merge calls to build_common_tree_nodes and build_common_tree_nodes_2.
10097 2011-07-05 Richard Guenther <rguenther@suse.de>
10099 * c-common.c (c_common_nodes_and_builtins): Build all common
10102 2011-06-27 Jakub Jelinek <jakub@redhat.com>
10104 * c-common.h (c_tree_chain_next): New static inline function.
10106 * c-common.c (check_builtin_function_arguments): Handle
10107 BUILT_IN_ASSUME_ALIGNED.
10109 2011-06-21 Andrew MacLeod <amacleod@redhat.com>
10111 * c-common.c: Add sync_ or SYNC__ to builtin names.
10112 * c-omp.c: Add sync_ or SYNC__ to builtin names.
10114 2011-06-20 Pierre Vittet <piervit@pvittet.com>
10116 * c-pragma.h (pragma_handler_1arg, pragma_handler_2arg): New
10118 (gen_pragma_handler): New union.
10119 (internal_pragma_handler): New type.
10120 (c_register_pragma_with_data)
10121 (c_register_pragma_with_expansion_and_data): New functions.
10123 * c-pragma.c (registered_pragmas, c_register_pragma_1)
10124 (c_register_pragma, c_register_pragma_with_expansion)
10125 (c_invoke_pragma_handler): Changed to work with
10126 internal_pragma_handler.
10127 (c_register_pragma_with_data)
10128 (c_register_pragma_with_expansion_and_data): New functions.
10130 2011-06-14 Joseph Myers <joseph@codesourcery.com>
10132 * c-common.c: Include common/common-target.h.
10133 (handle_section_attribute): Use
10134 targetm_common.have_named_sections.
10135 * c-cppbuiltin.c: Include common/common-target.h.
10136 (c_cpp_builtins): Use targetm_common.except_unwind_info.
10138 2011-06-10 Richard Guenther <rguenther@suse.de>
10140 * c-pretty-print.c (pp_c_type_specifier): Use pp_c_identifier
10141 to print a IDENTIFIER_NODE.
10143 2011-06-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10144 Joseph Myers <joseph@codesourcery.com>
10146 * c.opt (fbuilding-libgcc): New option.
10147 * c-cppbuiltin.c (c_cpp_builtins): Define
10148 __LIBGCC_TRAMPOLINE_SIZE__ if flag_building_libgcc.
10150 2011-06-07 Jason Merrill <jason@redhat.com>
10152 * c-common.c (max_tinst_depth): Lower default to 900.
10154 * c-format.c (gcc_cxxdiag_char_table): Add 'S' format.
10156 2011-06-07 Richard Guenther <rguenther@suse.de>
10158 * c-common.c (c_common_nodes_and_builtins): Do not set
10159 size_type_node or call set_sizetype.
10161 2011-06-07 Dodji Seketeli <dodji@redhat.com>
10164 * c-pretty-print.c (pp_c_integer_constant): Consider the canonical
10165 type when using pointer comparison to compare types.
10167 2011-06-02 Jonathan Wakely <jwakely.gcc@gmail.com>
10169 * c.opt: Add -Wdelete-non-virtual-dtor.
10170 * c-opts.c (c_common_handle_option): Include it in -Wall.
10172 2011-05-30 Nathan Froyd <froydnj@gcc.gnu.org>
10177 2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
10179 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
10182 2011-05-27 Jakub Jelinek <jakub@redhat.com>
10185 * c-common.c (c_common_truthvalue_conversion) <case COND_EXPR>: For
10186 C++ don't call c_common_truthvalue_conversion on void type arms.
10188 2011-05-27 Nathan Froyd <froydnj@codesourcery.com>
10190 * c-common.h (struct stmt_tree_s) [x_cur_stmt_list]: Change to a VEC.
10191 (stmt_list_stack): Define.
10192 (cur_stmt_list): Adjust for new type of x_cur_stmt_list.
10193 * c-semantics.c (push_stmt_list, pop_stmt_list): Likewise.
10195 2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
10197 * c-common.c (warning_candidate_p): Check for BLOCKs.
10199 2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
10201 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
10204 2011-05-25 Jakub Jelinek <jakub@redhat.com>
10206 * c-common.c (def_fn_type): Remove extra va_end.
10208 2011-05-23 Jason Merrill <jason@redhat.com>
10211 * c-common.c (c_common_get_narrower): New.
10212 (shorten_binary_op, shorten_compare, warn_for_sign_compare): Use it.
10214 2011-05-23 Nathan Froyd <froydnj@codesourcery.com>
10216 * c-common.h (check_function_arguments): Tweak prototype of
10217 check_function_arguments.
10218 * c-common.c (check_function_arguments): Likewise. Adjust
10219 calls to check_function_nonnull, check_function_format, and
10220 check_function_sentinel.
10221 (check_function_sentinel): Take a FUNCTION_TYPE rather than
10222 separate attributes and typelist arguments. Use
10223 FOREACH_FUNCTION_ARGS to iterate over argument types.
10225 2011-05-15 Paolo Carlini <paolo.carlini@oracle.com>
10227 * c-common.c (c_common_reswords): Reorder.
10228 * c-common.h (rid): Likewise.
10230 2011-05-10 Nathan Froyd <froydnj@codesourcery.com>
10232 * c-common.c (def_fn_type): Don't call build_function_type, call
10233 build_function_type_array or build_varargs_function_type_array
10235 (c_common_nodes_and_builtins): Likewise.
10237 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
10239 * c-common.c (c_add_case_label): Omit the loc argument to
10241 * c-common.h (build_case_label): Remove.
10242 * c-semantics.c (build_case_label): Remove.
10244 2011-05-05 Joseph Myers <joseph@codesourcery.com>
10246 * c-objc.h (objc_start_method_definition): Update prototype.
10247 * stub-objc.c (objc_start_method_definition): Add extra parameter.
10249 2011-05-04 Nathan Froyd <froydnj@codesourcery.com>
10251 * c-common.c (check_main_parameter_types): Reindent. Don't use
10252 TYPE_ARG_TYPES directly.
10253 (handle_nonnull_attribute): Likewise.
10254 (sync_resolve_params): Likewise.
10255 * c-format.c (handle_format_arg_attribute): Likewise. Adjust call
10256 to check_format_string.
10257 (handle_format_attribute): Likewise.
10258 (check_format_string): Take a function type to examine instead of
10259 a type list. Use a function_arg_iterator to step through argument
10262 2011-05-04 Richard Guenther <rguenther@suse.de>
10264 * c-common.c (fix_string_type): Use size_int for index type bounds.
10265 (start_fname_decls): Do not pass NULL to build_int_cst.
10266 (c_init_attributes): Likewise.
10267 * c-lex.c (c_lex_with_flags): Likewise.
10269 2011-04-27 Jason Merrill <jason@redhat.com>
10271 * c-common.c (make_tree_vector_from_list): New.
10272 * c-common.h: Declare it.
10274 2011-04-26 Richard Guenther <rguenther@suse.de>
10276 PR preprocessor/48248
10277 * c-ppoutput.c (maybe_print_line): Always optimize newlines
10278 for output size with -P.
10280 2011-04-25 Paolo Carlini <paolo.carlini@oracle.com>
10282 * c-common.c (struct c_common_resword): Add __underlying_type.
10283 * c-common.h (enum rid): Add RID_UNDERLYING_TYPE.
10285 2011-04-20 Jim Meyering <meyering@redhat.com>
10287 * c-format.c (init_dollar_format_checking): Remove useless
10290 2011-04-15 Nicola Pero <nicola.pero@meta-innovation.com>
10292 * c-objc.h (objc_get_interface_ivars): Removed.
10293 (objc_detect_field_duplicates): New.
10294 * stub-objc.c: Likewise.
10296 2011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
10298 * stub-objc.c (objc_declare_protocols): Renamed to
10299 objc_declare_protocol.
10300 * c-objc.h: Likewise.
10302 2011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
10304 * stub-objc.c (objc_declare_class): Updated argument name.
10306 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
10308 * c-common.h (c_common_init_ts): Declare.
10309 * c-common.c (c_common_init_ts): Define.
10311 2011-04-12 Nicola Pero <nicola.pero@meta-innovation.com>
10313 * c-objc.h (objc_build_message_expr): Updated prototype.
10314 * stub-objc.c (objc_build_message_expr): Likewise.
10316 2011-04-12 Martin Jambor <mjambor@suse.cz>
10318 * c-gimplify.c (c_genericize): Call cgraph_get_create_node instead
10321 2011-04-11 Richard Guenther <rguenther@suse.de>
10323 * c-common.c (complete_array_type): Build a range type of
10326 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
10328 * c-common.c (handle_sentinel_attribute): Don't use TYPE_ARG_TYPES.
10329 (handle_type_generic_attribute): Likewise.
10331 2011-04-07 Jason Merrill <jason@redhat.com>
10334 * c-common.c (c_common_truthvalue_conversion): Don't ignore
10335 conversion from C++0x scoped enum.
10337 2011-04-06 Joseph Myers <joseph@codesourcery.com>
10339 * c-target-def.h: New file.
10340 * c-target.def: New file.
10341 * c-target.h: New file.
10342 * c-common.c (targetcm): Don't define here.
10343 * c-common.h (default_handle_c_option): Declare.
10344 * c-format.c: Include c-target.h instead of target.h.
10345 * c-opts.c: Include c-target.h instead of target.h. Explicitly
10347 (default_handle_c_option): Move from targhooks.c.
10349 2011-03-29 Jakub Jelinek <jakub@redhat.com>
10351 PR preprocessor/48248
10352 * c-ppoutput.c (print): Add src_file field.
10353 (init_pp_output): Initialize it.
10354 (maybe_print_line): Don't optimize by adding up to 8 newlines
10355 if map->to_file and print.src_file are different file.
10356 (print_line): Update print.src_file.
10358 2011-03-25 Kai Tietz <ktietz@redhat.com>
10360 * c-ada-spec.c (compare_comment): Use filename_cmp
10361 instead of strcmp for filename.
10363 2011-03-25 Jeff Law <law@redhat.com>
10365 * c-common.c (def_fn_type): Add missing va_end.
10367 2011-03-25 Jason Merrill <jason@redhat.com>
10369 * c.opt: Add -std=c++03.
10371 2011-03-22 Eric Botcazou <ebotcazou@adacore.com>
10373 * c-ada-spec.c (dump_ada_template): Skip non-class instances.
10375 2011-03-17 Kai Tietz <ktietz@redhat.com>
10378 * c-pretty-print.c (pp_c_specifier_qualifier_list):
10379 Display allowed attributes for function pointer types.
10380 (pp_c_attributes_display): New function to display
10381 attributes having affects_type_identity flag set to true.
10382 * c-pretty-print.h (pp_c_attributes_display): New prototype.
10384 * c-common.c (c_common_attribute_table):
10386 (c_common_format_attribute_table): Likewise.
10388 2011-03-18 Jason Merrill <jason@redhat.com>
10390 * c.opt (fconstexpr-depth): Add Var(max_constexpr_depth).
10391 * c-common.h: Don't declare it here.
10392 * c-common.c: Or define it here.
10393 * c-opts.c (c_common_handle_option): Or set it here.
10396 * c-common.c (handle_transparent_union_attribute): Don't
10397 make a duplicate type in C++.
10399 2011-03-15 Jason Merrill <jason@redhat.com>
10401 * c-common.c (max_constexpr_depth): New.
10402 * c-common.h: Declare it.
10403 * c-opts.c (c_common_handle_option): Set it.
10404 * c.opt (fconstexpr-depth): New option.
10406 2011-03-11 Jason Merrill <jason@redhat.com>
10408 * c-common.c (attribute_takes_identifier_p): Add missing const.
10411 * c-common.c (attribute_takes_identifier_p): Assume that an
10412 unknown attribute takes an identifier.
10414 2011-03-07 Nathan Froyd <froydnj@codesourcery.com>
10417 * c-common.c (c_type_hash): Call list_length instead of iterating
10418 through DECL_CHAIN. Rename 'i' to 'n_elements'.
10420 2011-02-19 Jakub Jelinek <jakub@redhat.com>
10423 * c-common.c (c_fully_fold_internal): Handle VIEW_CONVERT_EXPR.
10425 2011-02-17 Iain Sandoe <iains@gcc.gnu.org>
10427 * c.opt (fobjc-abi-version=) New.
10428 (fobjc-nilcheck): New.
10430 2011-02-03 Nathan Froyd <froydnj@codesourcery.com>
10433 * c-common.h (keyword_is_decl_specifier): Declare.
10434 * c-common.c (keyword_is_decl_specifier): Define.
10435 (keyword_is_function_specifier): New function.
10437 2011-01-26 Jakub Jelinek <jakub@redhat.com>
10440 * c-lex.c (interpret_float): If CPP_N_IMAGINARY, ensure
10441 EXCESS_PRECISION_EXPR is created with COMPLEX_TYPE instead of
10444 2011-01-26 Arnaud Charlet <charlet@adacore.com>
10446 * c-ada-spec.c (dump_generic_ada_node): Avoid dereferencing null type.
10448 2011-01-26 Jakub Jelinek <jakub@redhat.com>
10451 * c-opts.c (c_common_post_options): Call c_common_no_more_pch
10452 after init_c_lex if pch_file is set.
10454 2011-01-26 Dave Korn <dave.korn.cygwin@gmail.com>
10457 * c.opt (-fkeep-inline-dllexport): New switch.
10459 2011-01-12 Richard Guenther <rguenther@suse.de>
10461 PR middle-end/32511
10462 * c-common.c (handle_weak_attribute): Warn instead of error
10463 on declaring an inline function weak.
10465 2011-01-05 Tom Tromey <tromey@redhat.com>
10467 * c-common.h (lvalue_error): Update.
10468 * c-common.c (lvalue_error): Add 'loc' argument. Call error_at,
10471 2010-12-29 Nicola Pero <nicola.pero@meta-innovation.com>
10474 * c-objc.h (objc_finish_message_expr): Added argument to
10477 2010-12-22 Nathan Froyd <froydnj@codesourcery.com>
10479 * c-common.c (handle_nonnull_attribute, handle_sentinel_attribute):
10482 2010-12-18 Nicola Pero <nicola.pero@meta-innovation.com>
10484 * c-objc.h (objc_maybe_warn_exceptions): New.
10485 * stub-objc.c (objc_maybe_warn_exceptions): New.
10487 2010-12-10 Nathan Froyd <froydnj@codesourcery.com>
10489 * c-common.h (readonly_error): Declare.
10490 * c-common.c (readonly_error): Define.
10492 2010-12-09 Nathan Froyd <froydnj@codesourcery.com>
10494 * c-common.h (invalid_indirection_error): Declare.
10495 * c-common.c (invalid_indirection_error): Define.
10497 2010-12-03 Richard Guenther <rguenther@suse.de>
10500 * c-pretty-print.c (pp_c_postfix_expression): Handle MEM_REF.
10501 (pp_c_unary_expression): Likewise.
10502 (pp_c_expression): Likewise.
10504 2010-11-30 Nicola Pero <nicola.pero@meta-innovation.com>
10506 * c-common.h (objc_finish_function): New.
10507 (objc_non_volatilized_type): Removed.
10508 (objc_type_quals_match): Removed.
10509 * stub-objc.c (objc_finish_function): New.
10510 (objc_non_volatilized_type): Removed.
10511 (objc_type_quals_match): Removed.
10513 2010-11-30 Joseph Myers <joseph@codesourcery.com>
10515 * c-common.h (parse_optimize_options): Declare.
10516 * c-cppbuiltin.c, c-format.c, c-gimplify.c, c-lex.c, c-omp.c,
10517 c-pch.c, c-pragma.c, c-semantics.c: Don't include toplev.h.
10519 2010-11-29 Joseph Myers <joseph@codesourcery.com>
10521 * c-opts.c (check_deps_environment_vars): Use getenv instead of
10523 * c-pch.c (O_BINARY): Don't define here.
10524 * c-pragma.h: Include "cpplib.h" instead of <cpplib.h>.
10526 2010-11-25 Joseph Myers <joseph@codesourcery.com>
10528 * c-cppbuiltin.c (c_cpp_builtins): Pass &global_options to
10529 targetm.except_unwind_info.
10531 2010-11-23 Joseph Myers <joseph@codesourcery.com>
10533 * c-opts.c (c_common_handle_option): Pass location to
10534 set_struct_debug_option.
10536 2010-11-23 Joseph Myers <joseph@codesourcery.com>
10538 * c-common.c (visibility_options): Move from ../opts.c.
10539 * c-common.h (struct visibility_flags, visibility_options):
10541 * c-opts.c (finish_options): Rename to c_finish_options.
10542 (c_common_init): Update call to finish_options.
10544 2010-11-22 Nicola Pero <nicola.pero@meta-innovation.com>
10547 * c-lex.c (lex_string): Check that each string in an Objective-C
10548 string concat sequence starts with either one or zero '@', and
10549 that there are no spurious '@' signs at the end.
10551 2010-11-20 Joseph Myers <joseph@codesourcery.com>
10553 * c-pragma.c: Remove conditionals on HANDLE_PRAGMA_PACK,
10554 HANDLE_PRAGMA_PACK_PUSH_POP, HANDLE_PRAGMA_WEAK and
10555 HANDLE_PRAGMA_VISIBILITY.
10556 * c-pragma.h (HANDLE_PRAGMA_WEAK, HANDLE_PRAGMA_PACK,
10557 HANDLE_PRAGMA_VISIBILITY): Don't define.
10558 (HANDLE_SYSV_PRAGMA, HANDLE_PRAGMA_PACK_PUSH_POP): Don't test.
10560 2010-11-20 Nathan Froyd <froydnj@codesourcery.com>
10565 * c-common.h (keyword_begins_type_specifier): Declare.
10566 (keyword_is_storage_class_specifier): Declare.
10567 (keyword_is_type_qualifier): Declare.
10568 * c-common.c (keyword_begins_type_specifier): New function.
10569 (keyword_is_storage_class_specifier): New function.
10570 (keyword_is_type_qualifier): Declare.
10572 2010-11-19 Joseph Myers <joseph@codesourcery.com>
10575 * c-common.c (in_late_binary_op): Define.
10576 (c_common_truthvalue_conversion): Check in_late_binary_op before
10577 calling c_save_expr.
10578 * c-common.h (in_late_binary_op): Declare.
10580 2010-11-19 Joseph Myers <joseph@codesourcery.com>
10582 * c-opts.c (c_common_handle_option): Update calls to
10583 set_struct_debug_option.
10585 2010-11-19 Nicola Pero <nicola.pero@meta-innovation.com>
10587 * c-common.h (objc_declare_protocols): Added additional argument.
10588 * stub-objc.c (objc_declare_protocol): Same change.
10590 2010-11-18 Nathan Froyd <froydnj@codesourcery.com>
10593 * c-common.h (build_real_imag_expr): Declare.
10594 * c-semantics.c (build_real_imag_expr): Define.
10596 2010-11-17 Joseph Myers <joseph@codesourcery.com>
10598 * c-opts.c (c_common_parse_file): Take no arguments.
10599 * c-common.h (c_common_parse_file): Update prototype.
10601 2010-11-16 Jakub Jelinek <jakub@redhat.com>
10604 * c-common.c (warning_candidate_p): Don't track non-const calls
10607 2010-11-15 Ian Lance Taylor <iant@google.com>
10609 * c-lex.c (init_c_lex): Set macro debug callbacks if
10610 flag_dump_go_spec is set.
10612 2010-11-15 Nicola Pero <nicola.pero@meta-innovation.com>
10614 * c-common.h (objc_build_incr_expr_for_property_ref): New.
10615 * stub-objc.c (objc_build_incr_expr_for_property_ref): New.
10617 2010-11-15 Nathan Froyd <froydnj@codesourcery.com>
10619 PR preprocessor/45038
10620 * c-cppbuiltin.c (c_cpp_builtins): Use different format for C++
10623 2010-11-12 Joseph Myers <joseph@codesourcery.com>
10625 * c-common.h (c_family_lang_mask): Declare.
10626 * c-opts.c (c_family_lang_mask): Make extern.
10627 * c-pragma.c (handle_pragma_diagnostic): Use
10628 control_warning_option.
10630 2010-11-12 Joseph Myers <joseph@codesourcery.com>
10632 * c-common.c (parse_optimize_options): Update call to
10634 * c-common.h (c_common_handle_option): Update prototype.
10635 * c-opts.c (c_common_handle_option): Take location_t parameter and
10636 pass it to other functions.
10638 2010-11-11 Joseph Myers <joseph@codesourcery.com>
10640 * c-opts.c (warning_as_error_callback): Remove.
10641 (c_common_initialize_diagnostics): Don't call
10642 register_warning_as_error_callback.
10643 (c_common_handle_option): Handle -Werror=normalized= here.
10645 2010-11-10 Joseph Myers <joseph@codesourcery.com>
10647 * c-common.c (handle_mode_attribute): Use %' and word "signedness"
10649 * c-opts.c (c_common_parse_file): Start diagnostics with lowercase
10651 * c-pragma.c (handle_pragma_target, handle_pragma_optimize):
10652 Remove trailing '.' from diagnostics.
10653 * c.opt (Wwrite-strings_: Avoid '`' in help text.
10655 2010-11-10 Joseph Myers <joseph@codesourcery.com>
10657 * c-common.c (parse_optimize_options): Pass global_dc to
10659 * c-opts.c (c_common_handle_option): Pass &global_options to
10660 set_Wstrict_aliasing.
10661 * c.opt (v): Don't mark Common or document here.
10663 2010-11-06 Iain Sandoe <iains@gcc.gnu.org>
10666 * c-format.c (format_type): New type gcc_objc_string_format_type.
10667 (valid_stringptr_type_p): New.
10668 (handle_format_arg_attribute): Use valid_stringptr_type_p ().
10669 (check_format_string): Pass expected type, use
10670 valid_stringptr_type_p (), check that the format string types are
10671 consistent with the format specification.
10672 (decode_format_attr): Warn if NSString is used outside objective-c.
10673 (format_types_orig): Add NSString.
10674 (format_name): New.
10675 (format_flags): New.
10676 (check_format_arg): Handle format strings requiring an external parser.
10677 first_target_format_type: New variable.
10678 (handle_format_attribute): Set up first_target_format_type, pass the
10679 expected format arg string type to check_format_string().
10680 * c-common.h (FMT_FLAG_PARSE_ARG_CONVERT_EXTERNAL): New flag.
10681 * stub-objc.c (objc_string_ref_type_p): New.
10682 (objc_check_format_arg): New.
10684 2010-11-04 Nicola Pero <nicola.pero@meta-innovation.com>
10686 Fixed using the Objective-C 2.0 dot-syntax with class names.
10687 * c-common.h (objc_build_class_component_ref): New.
10688 * stub-objc.c (objc_build_class_component_ref): New.
10690 2010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
10692 * c.opt (Wproperty-assign-default): New option.
10694 2010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
10696 Implemented -fobjc-std=objc1 flag.
10697 * c.opt (fobjc-std=objc1): New option.
10699 2010-11-01 Nicola Pero <nicola.pero@meta-innovation.com>
10701 Implemented format and noreturn attributes for Objective-C methods.
10702 * c-common.c (handle_noreturn_attribute): Recognize 'noreturn'
10703 attribute for Objective-C methods.
10705 2010-10-31 Jason Merrill <jason@redhat.com>
10707 * c-common.c (conversion_warning, warn_for_collisions_1): Use
10710 2010-10-30 Nicola Pero <nicola.pero@meta-innovation.com>
10712 Implemented Objective-C 2.0 @property, @synthesize and @dynamic.
10713 * c-common.h (enum rid): Removed RID_COPIES and RID_IVAR.
10714 (objc_add_property_declaration): Removed arguments for copies and
10716 (objc_build_getter_call): Renamed to
10717 objc_maybe_build_component_ref.
10718 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
10719 (objc_is_property_ref): New.
10720 * c-common.c (c_common_reswords): Removed copies and ivar.
10721 * stub-objc.c (objc_add_property_declaration): Removed arguments
10722 for copies and ivar.
10723 (objc_build_getter_call): Renamed to
10724 objc_maybe_build_component_ref.
10725 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
10726 (objc_is_property_ref): New.
10728 2010-10-29 Arnaud Charlet <charlet@adacore.com>
10729 Matthew Gingell <gingell@adacore.com>
10731 * c-ada-spec.c (separate_class_package): New function.
10732 (pp_ada_tree_identifier): Prefix references to C++ classes with the
10733 name of their enclosing package.
10734 (print_ada_declaration): Use separate_class_package.
10736 2010-10-27 Jason Merrill <jason@redhat.com>
10738 * c-common.c (c_common_reswords): Add __is_literal_type.
10739 * c-common.h (enum rid): Add RID_IS_LITERAL_TYPE.
10741 * c-common.c (check_case_value): Remove special C++ code.
10743 2010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
10745 * c-common.h (enum rid): Added RID_READWRITE, RID_ASSIGN,
10746 RID_RETAIN, RID_COPY and RID_NONATOMIC. Updated RID_FIRST_PATTR
10747 and RID_LAST_PATTR.
10748 (objc_add_property_declaration): Added additional arguments.
10749 (objc_property_attribute_kind): Removed.
10750 (objc_set_property_attr): Removed.
10751 * c-common.c (c_common_reswords): Added readwrite, assign, retain,
10752 copy and nonatomic.
10753 * stub-objc.c (objc_add_property_declaration): Added additional
10755 (objc_set_property_attr): Removed.
10757 2010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
10759 * c-common.h (objc_add_property_variable): Renamed to
10760 objc_add_property_declaration. Added location argument.
10761 * stub-objc.c (objc_add_property_variable): Same change.
10763 2010-10-23 Nicola Pero <nicola.pero@meta-innovation.com>
10765 * c-common.h (objc_maybe_printable_name): New.
10766 * stub-objc.c (objc_maybe_printable_name): New.
10768 2010-10-22 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
10769 Andrew Pinski <pinskia@gmail.com>
10771 * c-common.h (c_common_mark_addressable_vec): Declare.
10772 * c-common.c (c_common_mark_addressable_vec): New function.
10774 2010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
10776 * c-common.h (objc_set_method_type): Removed.
10777 (objc_add_method_declaration): Added boolean argument.
10778 (objc_start_method_definition): Same change.
10779 (objc_build_method_signature): Same change.
10780 * stub-objc.c (objc_set_method_type): Removed.
10781 (objc_add_method_declaration): Added boolean argument.
10782 (objc_start_method_definition): Same change.
10783 (objc_build_method_signature): Same change.
10785 2010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
10787 * c-common.h (finish_file): Removed.
10788 (objc_write_global_declarations): New.
10789 * c-opts.c (c_common_parse_file): Do not call finish_file.
10790 * stub-objc.c (objc_write_global_declarations): New.
10792 2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
10794 Implemented parsing @synthesize and @dynamic for
10795 Objective-C/Objective-C++.
10796 * c-common.h (enum rid): Add RID_AT_SYNTHESIZE and RID_AT_DYNAMIC.
10797 (objc_add_synthesize_declaration): New.
10798 (objc_add_dynamic_declaration): New.
10799 * c-common.c (c_common_reswords): Add synthesize and dynamic.
10800 * stub-objc.c (objc_add_synthesize_declaration): New.
10801 (objc_add_dynamic_declaration): New.
10803 2010-10-18 Michael Meissner <meissner@linux.vnet.ibm.com>
10806 * c-cppbuiltin.c (mode_has_fma): Move function here from
10807 builtins.c. Don't use the fma optab, instead just use the
10808 HAVE_fma* macros, so that __FP_FAST_FMA* will be defined when
10811 2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
10813 Merge from 'apple/trunk' branch on FSF servers.
10815 2005-11-08 Fariborz Jahanian <fjahanian@apple.com>
10818 * c-common.h (objc_non_volatilized_type): New declaration
10819 * stub-objc.c (objc_non_volatilized_type): New stub.
10821 2010-10-17 Nicola Pero <nicola.pero@meta-innovation.com>
10823 Merge from 'apple/trunk' branch on FSF servers.
10825 2006-03-27 Fariborz Jahanian <fjahanian@apple.com>
10828 * c-common.h (objc_diagnose_private_ivar): New decl.
10829 * stub-objc.c (objc_diagnose_private_ivar): New stub.
10831 2010-10-17 Iain Sandoe <iains@gcc.gnu.org>
10833 * c-common.c (c_common_reswords): Add package, RID_AT_PACKAGE.
10834 * c-common.h (enum rid): Add RID_AT_PACKAGE.
10835 (objc_ivar_visibility_kind): New enum.
10836 (objc_set_visibility): Adjust prototype to use visibility enum.
10837 * stub-objc.c (objc_set_visibility): Adjust stub to use
10840 2010-10-14 Michael Meissner <meissner@linux.vnet.ibm.com>
10842 * c-cppbuiltin.c (builtin_define_float_constants): Emit
10843 __FP_FAST_FMA, __FP_FAST_FMAF, and __FP_FAST_FMAL if the machine
10844 has the appropriate fma builtins.
10845 (c_cpp_builtins): Adjust call to builtin_define_float_constants.
10847 2010-10-14 Iain Sandoe <iains@gcc.gnu.org>
10849 merge from FSF apple 'trunk' branch.
10850 2006 Fariborz Jahanian <fjahanian@apple.com>
10852 Radars 4436866, 4505126, 4506903, 4517826
10853 * c-common.c (c_common_resword): Define @property and its attributes.
10854 * c-common.h: Define property attribute enum entries.
10855 (OBJC_IS_PATTR_KEYWORD): New.
10856 (objc_property_attribute_kind): New enum.
10857 Declare objc_set_property_attr (), objc_add_property_variable (),
10858 objc_build_getter_call () and objc_build_setter_call ().
10859 * stub-objc.c (objc_set_property_attr): New stub.
10860 (objc_add_property_variable): Likewise.
10861 (objc_build_getter_call): Likewise.
10862 (objc_build_setter_call) Likewise.
10864 2010-10-13 Iain Sandoe <iains@gcc.gnu.org>
10866 merge from FSF apple 'trunk' branch.
10867 2006-04-26 Fariborz Jahanian <fjahanian@apple.com>
10869 Radar 3803157 (method attributes)
10870 * c-common.c (handle_deprecated_attribute): Recognize
10871 objc methods as valid declarations.
10872 * c-common.h: Declare objc_method_decl ().
10873 * stub-objc.c (objc_method_decl): New stub.
10875 2010-10-08 Joseph Myers <joseph@codesourcery.com>
10877 * c-common.c (parse_optimize_options): Call
10878 decode_cmdline_options_to_array_default_mask before
10879 decode_options. Update arguments to decode_options.
10880 * c-common.h (c_common_init_options_struct): Declare.
10881 * c-opts.c (c_common_init_options_struct): New. Split out from
10882 c_common_init_options.
10884 2010-10-06 Nicola Pero <nicola.pero@meta-innovation.com>
10886 Implemented fast enumeration for Objective-C.
10887 * c-common.h (objc_finish_foreach_loop): New.
10888 * stub-objc.c (objc_finish_foreach_loop): New.
10890 2010-10-05 Joseph Myers <joseph@codesourcery.com>
10892 * c-common.h (struct diagnostic_context): Don't declare here.
10893 (c_common_initialize_diagnostics): Declare using
10894 diagnostic_context typedef.
10895 * c-opts.c (c_common_handle_option): Pass global_dc to
10896 handle_generated_option.
10898 2010-10-04 Joseph Myers <joseph@codesourcery.com>
10900 * c-opts.c (c_common_handle_option): Pass &global_options_set to
10901 handle_generated_option.
10903 2010-10-03 Ian Lance Taylor <iant@google.com>
10905 * c.opt (-fplan9-extensions): New option.
10907 2010-10-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
10909 * c-cppbuiltin.c (define__GNUC__, builtin_define_type_precision):
10911 (c_cpp_builtins): Call functions from cppbuiltin.c instead
10912 of duplicating code.
10914 2010-09-30 Iain Sandoe <iains@gcc.gnu.org>
10916 * c-common.c: Add two new entries for @optional
10917 and @required keywords.
10919 merge from FSF 'apple/trunk' branch.
10920 2006-01-30 Fariborz Jahanian <fjahanian@apple.com>
10923 * c-common.h (RID_AT_OPTIONAL, RID_AT_REQUIRED): Two new
10924 objective-c keywords.
10925 (objc_set_method_opt): New declaration.
10926 * stub-objc.c (objc_set_method_opt): New stub.
10928 2010-09-30 Joseph Myers <joseph@codesourcery.com>
10930 * c-common.c (handle_optimize_attribute): Pass &global_options to
10931 cl_optimization_save and cl_optimization_restore.
10932 * c-opts.c (c_common_handle_option): Pass &global_options to
10933 handle_generated_option.
10934 * c-pragma.c (handle_pragma_diagnostic): Use option_flag_var.
10935 (handle_pragma_pop_options, handle_pragma_reset_options): Pass
10936 &global_options to cl_optimization_restore.
10938 2010-09-30 Nicola Pero <nicola.pero@meta-innovation.com>
10940 * c-lex.c (c_lex_with_flags): Updated comments for CPP_AT_NAME
10941 Objective-C/Objective-C++ keywords.
10943 2010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
10945 Merge from 'apple/trunk' branch on FSF servers.
10947 2005-10-04 Fariborz Jahanian <fjahanian@apple.com>
10950 * c-common.h (objc_check_global_decl): New declaration.
10951 * stub-objc.c (objc_check_global_decl): New stub.
10953 2010-09-29 Joseph Myers <joseph@codesourcery.com>
10955 * c.opt: Don't use VarExists.
10957 2010-09-29 Joseph Myers <joseph@codesourcery.com>
10959 * c-common.c (c_cpp_error): Update names of diagnostic_context
10961 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Update names of
10962 cl_optimization members.
10963 * c-opts.c (warning_as_error_callback, c_common_handle_option,
10964 sanitize_cpp_opts, finish_options): Update names of cpp_options
10967 2010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
10969 * c-common.h (OBJC_IS_CXX_KEYWORD): New macro. Updated comments.
10970 (objc_is_reserved_word): Removed.
10971 * c-common.c: Updated comments.
10972 * c-lex.c (c_lex_with_flags): Use OBJC_IS_CXX_KEYWORD instead of
10973 objc_is_reserved_word.
10974 * stub-objc.c (objc_is_reserved_word): Removed.
10976 2010-09-28 Iain Sandoe <iains@gcc.gnu.org>
10978 * c-common.h (objc_add_method_declaration): Adjust prototype to
10979 include attributes.
10980 (objc_start_method_definition): Likewise.
10981 (objc_build_keyword_decl): Likewise.
10982 * stub-objc.c:(objc_add_method_declaration): Handle attributes.
10983 (objc_start_method_definition): Likewise.
10984 (objc_build_keyword_decl): Likewise.
10986 2010-09-28 Iain Sandoe <iains@gcc.gnu.org>
10988 * c-common.h (objc_start_class_interface): Adjust prototype.
10989 (objc_start_category_interface): Likewise.
10990 (objc_start_protocol): Likewise.
10991 * stub-objc.c (objc_start_protocol): Adjust for extra argument.
10992 (objc_start_class_interface): Likewise.
10993 (objc_start_category_interface): Likewise.
10995 2010-09-27 Ian Lance Taylor <iant@google.com>
10997 * c-common.c (c_common_attribute_table): Add no_split_stack.
10998 (handle_no_split_stack_attribute): New static function.
11000 2010-09-27 Nicola Pero <nicola.pero@meta-innovation.com>
11002 Merge from 'apple/trunk' branch on FSF servers.
11004 2005-12-15 Fariborz Jahanian <fjahanian@apple.com>
11007 * c-common.h (objc_have_common_type): New declaration.
11008 * stub-objc.c (objc_have_common_type): New stub.
11010 2005-06-22 Ziemowit Laski <zlaski@apple.com>
11013 * c-common.h (objc_common_type): New prototype.
11014 * stub-objc.c (objc_common_type): New stub.
11016 2010-09-24 Jan Hubicka <jh@suse.cz>
11018 * c-common.c (handle_leaf_attribute): New function.
11019 (struct attribute_spec c_common_att): Add leaf.
11021 2010-09-22 Joseph Myers <joseph@codesourcery.com>
11023 * c.opt (-all-warnings, -ansi, -assert, -assert=, -comments,
11024 -comments-in-macros, -define-macro, -define-macro=, -dependencies,
11025 -dump, -dump=, -imacros, -imacros=, -include, -include=,
11026 -include-barrier, -include-directory, -include-directory=,
11027 -include-directory-after, -include-directory-after=,
11028 -include-prefix, -include-prefix=, -include-with-prefix,
11029 -include-with-prefix=, -include-with-prefix-after,
11030 -include-with-prefix-after=, -include-with-prefix-before,
11031 -include-with-prefix-before=, -no-integrated-cpp,
11032 -no-line-commands, -no-standard-includes, -no-warnings, -output,
11033 -output=, -pedantic, -pedantic-errors, -preprocess,
11034 -print-missing-file-dependencies, -trace-includes, -traditional,
11035 -traditional-cpp, -trigraphs, -undefine-macro, -undefine-macro=,
11036 -user-dependencies, -verbose, -write-dependencies,
11037 -write-user-dependencies, no-integrated-cpp, traditional): New.
11039 2010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
11042 * c-common.h (objc_start_method_definition): Return bool instead
11044 * stub-objc.c (objc_start_method_definition): Return bool instead
11047 2010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
11050 * c-common.h (objc_get_interface_ivars): New declaration.
11051 * stub-objc.c (objc_get_interface_ivars): New stub.
11053 2010-09-15 Ian Lance Taylor <iant@google.com>
11055 * c-common.c (parse_optimize_options): Do not capitalize warning
11056 messages. Remove period at end of warning message.
11058 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
11060 * c-common.c (handle_alias_ifunc_attribute): New, broken out of ...
11061 (handle_alias_attribute): ... here.
11062 (handle_ifunc_attribute): New.
11064 2010-09-06 Mark Mitchell <mark@codesourcery.com>
11066 * c-common.h (do_warn_double_promotion): Declare.
11067 * c-common.c (do_warn_double_promotion): Define.
11069 2010-09-05 Mark Mitchell <mark@codesourcery.com>
11071 * c.opt (Wdouble-promotion): New.
11073 2010-09-02 Joseph Myers <joseph@codesourcery.com>
11075 * c.opt (falt-external-templates, fhuge-objects, fvtable-gc,
11076 fvtable-thunks, fxref): Mark no longer supported in help text.
11078 2010-09-02 Joseph Myers <joseph@codesourcery.com>
11080 * c.opt (Wimport, fall-virtual, falt-external-templates,
11081 fdefault-inline, fenum-int-equiv, fexternal-templates,
11082 fguiding-decls, fhonor-std, fhuge-objects, flabels-ok,
11083 fname-mangling-version-, fnew-abi, fnonnull-objects,
11084 foptional-diags, fsquangle, fstrict-prototype, fthis-is-variable,
11085 fvtable-gc, fvtable-thunks, fxref): Mark with Ignore and Warn as
11087 (fhandle-exceptions): Mark with Alias and Warn.
11088 * c-opts.c (c_common_handle_option): Don't handle options marked
11091 2010-09-02 Joseph Myers <joseph@codesourcery.com>
11093 * c.opt (Wcomments, Werror-implicit-function-declaration,
11094 ftemplate-depth-, std=c89, std=c9x, std=gnu89, std=gnu9x,
11095 std=iso9899:1990, std=iso9899:1999, std=iso9899:199x): Mark as
11097 * c-common.c (option_codes): Use OPT_Wcomment instead of
11099 * c-opts.c (warning_as_error_callback, c_common_handle_option):
11100 Don't handle options marked as aliases.
11102 2010-08-25 Richard Guenther <rguenther@suse.de>
11104 * c-common.c (c_common_get_alias_set): Remove special
11105 handling for pointers.
11107 2010-08-20 Nathan Froyd <froydnj@codesourcery.com>
11109 * c-common.c: Use FOR_EACH_VEC_ELT.
11110 * c-gimplify.c: Likewise.
11111 * c-pragma.c: Likewise.
11113 2010-08-16 Joseph Myers <joseph@codesourcery.com>
11115 * c.opt (MDX): Change back to MD. Mark NoDriverArg instead of
11117 (MMDX): Change back to MMD. Mark NoDriverArg instead of
11119 * c-opts.c (c_common_handle_option): Use OPT_MD and OPT_MMD
11120 instead of OPT_MDX and OPT_MMDX.
11122 2010-08-16 Joseph Myers <joseph@codesourcery.com>
11124 * c.opt (MDX, MMDX, lang-asm): Mark RejectDriver.
11126 2010-08-12 Joseph Myers <joseph@codesourcery.com>
11128 * c.opt (MD, MMD): Change to MDX and MMDX.
11129 * c-opts.c (c_common_handle_option): Use OPT_MMD and OPT_MMDX.
11131 2010-08-11 Joseph Myers <joseph@codesourcery.com>
11133 * c-opts.c (c_common_handle_option): Call handle_generated_option
11134 instead of handle_option.
11136 2010-08-08 Nathan Froyd <froydnj@codesourcery.com>
11138 * c-pragma.c (add_to_renaming_pragma_list): Fix call to VEC_safe_push.
11139 (maybe_apply_renaming_pragma): Delete unneeded declarations.
11141 2010-08-08 Nathan Froyd <froydnj@codesourcery.com>
11143 * c-pragma.c (pending_redefinition): Declare. Declare a VEC of it.
11144 (pending_redefine_extname): Change type to a VEC.
11145 (add_to_renaming_pragma_list): Update for new type of
11146 pending_redefine_extname.
11147 (maybe_apply_renaming_pragma): Likewise.
11149 2010-08-04 Arnaud Charlet <charlet@adacore.com>
11151 * c-ada-spec.c (dump_ada_template): Mark underlying instance type as
11153 (dump_generic_ada_node): Code clean up. Use TREE_VISITED flag to
11154 decide whether a type has already been declared/seen.
11155 Do not go to the original type.
11156 (dump_nested_types): New parameter forward.
11157 Generate forward declaration if needed and mark type as visited.
11158 (print_ada_declaration): Call dump_nested_types if not already done.
11159 Mark types as visited.
11161 2010-08-03 Joseph Myers <joseph@codesourcery.com>
11163 * c.opt (-print-pch-checksum): Remove option.
11164 * c-opts.c (c_common_handle_option): Don't handle
11165 OPT_print_pch_checksum.
11167 2010-07-27 Joseph Myers <joseph@codesourcery.com>
11169 * c-common.h (c_common_handle_option): Update prototype and return
11171 * c-opts.c (c_common_handle_option): Update prototype and return
11172 value type. Update calls to handle_option and
11173 enable_warning_as_error.
11175 2010-07-27 Jakub Jelinek <jakub@redhat.com>
11178 * c-pretty-print.c (pp_c_expression): Handle C_MAYBE_CONST_EXPR.
11180 2010-07-27 Joseph Myers <joseph@codesourcery.com>
11182 * c-common.h (c_common_missing_argument): Remove.
11183 * c-opts.c (c_common_missing_argument): Remove.
11184 * c.opt (A, D, F, I, MD, MMD, MQ, MT, U, fconstant-string-class=,
11185 idirafter, imacros, include, isysroot, isystem, iquote): Add
11187 * c-objc-common.h (LANG_HOOKS_MISSING_ARGUMENT): Remove.
11189 2010-07-27 Joseph Myers <joseph@codesourcery.com>
11191 * c-common.h (c_common_option_lang_mask,
11192 c_common_initialize_diagnostics, c_common_complain_wrong_lang_p):
11194 (c_common_init_options): Update prototype.
11195 * c-opts.c (c_common_option_lang_mask): New.
11196 (c_common_initialize_diagnostics): Split out of
11197 c_common_init_options.
11198 (accept_all_c_family_options, c_common_complain_wrong_lang_p):
11200 (c_common_init_options): Update prototype. Use decoded options in
11201 search for -lang-asm.
11203 2010-07-15 Nathan Froyd <froydnj@codesourcery.com>
11205 * c-common.c: Carefully replace TREE_CHAIN with DECL_CHAIN.
11206 * c-format.c: Likewise.
11208 2010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
11210 * c-common.h: Include diagnostic-core.h. Error if already
11212 * c-semantics.c: Do not define GCC_DIAG_STYLE here.
11214 2010-07-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
11216 * c-common.c (IN_GCC_FRONTEND): Do not undef.
11217 Do not include expr.h
11218 (vector_mode_valid_p): Move here.
11220 2010-06-21 DJ Delorie <dj@redhat.com>
11222 * c-pragma.c (handle_pragma_diagnostic): Add push/pop,
11223 allow these pragmas anywhere.
11225 2010-06-14 Jakub Jelinek <jakub@redhat.com>
11228 * c-cppbuiltin.c: Include gt-c-family-c-cppbuiltin.h.
11229 (lazy_hex_fp_values, lazy_hex_fp_value_count): Add GTY(()) markers.
11230 (lazy_hex_fp_value, builtin_define_with_hex_fp_value): Use
11231 ggc_strdup instead of xstrdup.
11233 2010-06-10 Jakub Jelinek <jakub@redhat.com>
11235 * c-cppbuiltin.c: Include cpp-id-data.h.
11236 (lazy_hex_fp_values, lazy_hex_fp_value_count): New variables.
11237 (lazy_hex_fp_value): New function.
11238 (builtin_define_with_hex_fp_value): Provide definitions lazily.
11240 2010-06-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
11242 * c-gimplify.c: Do not include tree-flow.h
11244 2010-06-29 Joern Rennecke <joern.rennecke@embecosm.com>
11247 * c-common.c: Rename targetm member:
11248 targetm.enum_va_list -> targetm.enum_va_list_p
11250 2010-06-28 Anatoly Sokolov <aesok@post.ru>
11252 * c-common.c (shorten_compare): Adjust call to force_fit_type_double.
11254 2010-06-28 Steven Bosscher <steven@gcc.gnu.org>
11256 * c-cppbuiltin.c: Do not include except.h.
11258 2010-06-24 Andi Kleen <ak@linux.intel.com>
11260 * c-common.c (warn_for_omitted_condop): New.
11261 * c-common.h (warn_for_omitted_condop): Add prototype.
11263 2010-06-21 Joseph Myers <joseph@codesourcery.com>
11265 * c.opt (lang-objc): Remove.
11266 * c-opts.c (c_common_handle_option): Don't handle OPT_lang_objc.
11268 2010-06-21 Joern Rennecke <joern.rennecke@embecosm.com>
11270 * c-opts.c: Include "tm_p.h".
11272 2010-06-20 Joseph Myers <joseph@codesourcery.com>
11274 * c-common.c (parse_optimize_options): Update call to
11277 2010-06-18 Nathan Froyd <froydnj@codesourcery.com>
11279 * c-common.c (record_types_used_by_current_var_decl): Adjust for
11280 new type of types_used_by_cur_var_decl.
11282 2010-06-17 Joern Rennecke <joern.rennecke@embecosm.com>
11285 * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Add cast
11286 for C++ standard compliance.
11288 2010-06-16 Jason Merrill <jason@redhat.com>
11290 * c.opt: Add -Wnoexcept.
11292 2010-06-16 Richard Guenther <rguenther@suse.de>
11295 * c-common.c (c_common_truthvalue_conversion): Remove
11296 premature and wrong optimization concering ADDR_EXPRs.
11298 2010-06-15 Arnaud Charlet <charlet@adacore.com>
11300 * c-ada-spec.c (dump_sloc): Remove column info.
11301 (is_simple_enum): New function.
11302 (dump_generic_ada_node, print_ada_declaration): Map C enum types to Ada
11303 enum types when relevant.
11305 2010-06-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
11307 * c-common.c (conversion_warning): Warn at expression
11310 2010-06-10 Joseph Myers <joseph@codesourcery.com>
11312 * c-opts.c (c_common_handle_option): Don't handle
11315 2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
11317 * c-pragma.c (push_alignment): Use typed GC allocation.
11318 (handle_pragma_push_options): Likewise.
11320 * c-common.c (parse_optimize_options): Likewise.
11322 * c-common.h (struct sorted_fields_type): Add variable_size GTY
11325 2010-06-07 Joseph Myers <joseph@codesourcery.com>
11327 * c-common.c (flag_preprocess_only, flag_undef, flag_no_builtin,
11328 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
11329 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
11330 flag_signed_bitfields, warn_strict_null_sentinel,
11331 flag_nil_receivers, flag_zero_link, flag_replace_objc_classes,
11332 flag_gen_declaration, flag_no_gnu_keywords,
11333 flag_implement_inlines, flag_implicit_templates,
11334 flag_implicit_inline_templates, flag_optional_diags,
11335 flag_elide_constructors, flag_default_inline, flag_rtti,
11336 flag_conserve_space, flag_access_control, flag_check_new,
11337 flag_new_for_scope, flag_weak, flag_working_directory,
11338 flag_use_cxa_atexit, flag_use_cxa_get_exception_ptr,
11339 flag_enforce_eh_specs, flag_threadsafe_statics,
11340 flag_pretty_templates): Remove.
11341 * c-common.h (flag_preprocess_only, flag_nil_receivers,
11342 flag_objc_exceptions, flag_objc_sjlj_exceptions, flag_zero_link,
11343 flag_replace_objc_classes, flag_undef, flag_no_builtin,
11344 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
11345 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
11346 flag_const_strings, flag_signed_bitfields, flag_gen_declaration,
11347 flag_no_gnu_keywords, flag_implement_inlines,
11348 flag_implicit_templates, flag_implicit_inline_templates,
11349 flag_optional_diags, flag_elide_constructors, flag_default_inline,
11350 flag_rtti, flag_conserve_space, flag_access_control,
11351 flag_check_new, flag_new_for_scope, flag_weak,
11352 flag_working_directory, flag_use_cxa_atexit,
11353 flag_use_cxa_get_exception_ptr, flag_enforce_eh_specs,
11354 flag_threadsafe_statics, flag_pretty_templates,
11355 warn_strict_null_sentinel): Remove.
11356 * c.opt (E, Wstrict-null-sentinel, faccess-control, fasm,
11357 fbuiltin, fcheck-new, fconserve-space, felide-constructors,
11358 fenforce-eh-specs, ffor-scope, fgnu-keywords, fimplement-inlines,
11359 fimplicit-inline-templates, fimplicit-templates,
11360 flax-vector-conversions, fms-extensions, fnil-receivers,
11361 fnonansi-builtins, fpretty-templates, freplace-objc-classes,
11362 frtti, fshort-double, fshort-enums, fshort-wchar,
11363 fsigned-bitfields, fsigned-char, fstats, fthreadsafe-statics,
11364 funsigned-bitfields, funsigned-char, fuse-cxa-atexit,
11365 fuse-cxa-get-exception-ptr, fweak, fworking-directory, fzero-link,
11366 gen-decls, undef): Use Var.
11367 (fdefault-inline, foptional-diags): Document as doing nothing.
11368 * c-opts.c (c_common_handle_option): Remove cases for options now
11369 using Var. Mark ignored options as such.
11371 2010-06-05 Steven Bosscher <steven@gcc.gnu.org>
11373 * c-common.c: Moved to here from parent directory.
11374 * c-common.def: Likewise.
11375 * c-common.h: Likewise.
11376 * c-cppbuiltin.c: Likewise.
11377 * c-dump.c: Likewise.
11378 * c-format.c: Likewise.
11379 * c-format.h : Likewise.
11380 * c-gimplify.c: Likewise.
11381 * c-lex.c: Likewise.
11382 * c-omp.c: Likewise.
11384 * c-opts.c: Likewise.
11385 * c-pch.c: Likewise.
11386 * c-ppoutput.c: Likewise.
11387 * c-pragma.c: Likewise.
11388 * c-pragma.h: Likewise.
11389 * c-pretty-print.c: Likewise.
11390 * c-pretty-print.h: Likewise.
11391 * c-semantics.c: Likewise.
11392 * stub-objc.c: Likewise.
11394 * c-common.c: Include gt-c-family-c-common.h.
11395 * c-pragma.c: Include gt-c-family-c-pragma.h.
11397 Copyright (C) 2010-2020 Free Software Foundation, Inc.
11399 Copying and distribution of this file, with or without modification,
11400 are permitted in any medium without royalty provided the copyright
11401 notice and this notice are preserved.