1 2020-09-21 Marek Polacek <polacek@redhat.com>
3 * c.opt (Wctad-maybe-unsupported): New option.
5 2020-09-19 Martin Sebor <msebor@redhat.com>
8 * c-common.h (warn_parm_array_mismatch): Declare new function.
9 (has_attribute): Move declaration of an existing function.
10 (build_attr_access_from_parms): Declare new function.
11 * c-warn.c (parm_array_as_string): Define new function.
12 (plus_one): Define new function.
13 (warn_parm_ptrarray_mismatch): Define new function.
14 (warn_parm_array_mismatch): Define new function.
15 (vla_bound_parm_decl): New function.
16 * c.opt (-Warray-parameter, -Wvla-parameter): New options.
17 * c-pretty-print.c (pp_c_type_qualifier_list): Don't print array type
19 (c_pretty_printer::direct_abstract_declarator): ...but instead print
20 them in brackets here. Also print [static]. Strip extraneous
21 expressions from VLA bounds.
23 2020-09-19 Martin Sebor <msebor@redhat.com>
26 * c-attribs.c (c_common_attribute_table): Add "arg spec" attribute.
27 (handle_argspec_attribute): New function.
28 (get_argument, get_argument_type): New functions.
29 (append_access_attrs): Add overload. Handle internal attribute
30 representation in addition to external.
31 (handle_access_attribute): Handle internal attribute representation
32 in addition to external.
33 (build_attr_access_from_parms): New function.
35 2020-09-19 Sandra Loosemore <sandra@codesourcery.com>
37 * c-gimplify.c (genericize_c_loop): Rewrite to match
38 c_finish_loop in c-typeck.c.
40 2020-09-19 Sandra Loosemore <sandra@codesourcery.com>
42 * c-common.c (c_block_may_fallthrough): New, split from
43 cxx_block_may_fallthrough in the cp front end.
44 (c_common_init_ts): Move handling of loop and switch-related
45 statements here from the cp front end.
46 * c-common.def (FOR_STMT, WHILE_STMT, DO_STMT): Move here from
48 (BREAK_STMT, CONTINUE_STMT, SWITCH_STMT): Likewise.
49 * c-common.h (c_block_may_fallthru): Declare.
50 (bc_state_t): Move here from cp front end.
51 (save_bc_state, restore_bc_state): Declare.
52 (c_genericize_control_stmt): Declare.
53 (WHILE_COND, WHILE_BODY): Likewise.
54 (DO_COND, DO_BODY): Likewise.
55 (FOR_INIT_STMT, FOR_COND, FOR_EXPR, FOR_BODY, FOR_SCOPE): Likewise.
56 (SWITCH_STMT_COND, SWITCH_STMT_BODY): Likewise.
57 (SWITCH_STMT_TYPE, SWITCH_STMT_SCOPE): Likewise.
58 (SWITCH_STMT_ALL_CASES_P, SWITCH_STMT_NO_BREAK_P): Likewise.
59 (LABEL_DECL_BREAK, LABEL_DECL_CONTINUE): Likewise.
60 * c-dump.c (dump_stmt): Copy from cp front end.
61 (c_dump_tree): Move code to handle structured loop and switch
62 tree nodes here from cp front end.
63 * c-gimplify.c: Adjust includes.
64 (enum bc_t, bc_label, begin_bc_block, finish_bc_block): Move from
66 (save_bc_state, restore_bc_state): New functions using old code
68 (get_bc_label, expr_loc_or_loc): Move from cp front end.
69 (genericize_c_loop): Move from cp front end.
70 (genericize_for_stmt, genericize_while_stmt): Likewise.
71 (genericize_do_stmt, genericize_switch_stmt): Likewise.
72 (genericize_continue_stmt, genericize_break_stmt): Likewise.
73 (genericize_omp_for_stmt): Likewise.
74 (c_genericize_control_stmt): New function using code split from
76 (c_genericize_control_r): New.
77 (c_genericize): Call walk_tree with c_genericize_control_r.
78 * c-pretty-print.c (c_pretty_printer::statement): Move code to handle
79 structured loop and switch tree nodes here from cp front end.
81 2020-09-17 Patrick Palka <ppalka@redhat.com>
84 * c-indentation.c (should_warn_for_misleading_indentation): Move
85 declarations of local variables closer to their first use.
86 Handle virtual token locations by resolving them to their
87 respective macro expansion points. If all three tokens are
88 produced from the same macro expansion, then instead use their
89 loci within the macro definition.
91 2020-09-16 Martin Sebor <msebor@redhat.com>
95 * c-attribs.c (validate_attr_args): New function.
96 (validate_attr_arg): Same.
97 (handle_section_attribute): Call it. Introduce a local variable.
98 (handle_alloc_size_attribute): Same.
99 (handle_alloc_align_attribute): Same.
101 2020-09-14 Jakub Jelinek <jakub@redhat.com>
103 * c-attribs.c (handle_optimize_attribute): Adjust
104 cl_optimization_save, cl_optimization_restore and
105 build_optimization_node callers.
106 * c-pragma.c (handle_pragma_optimize): Adjust
107 build_optimization_node caller.
108 (handle_pragma_push_options): Adjust
109 build_optimization_node and build_target_option_node callers.
110 (handle_pragma_pop_options, handle_pragma_reset_options):
111 Adjust cl_optimization_restore callers.
113 2020-08-28 Martin Sebor <msebor@redhat.com>
115 * c.opt (Wstringop-overread): New option.
117 2020-08-11 Jakub Jelinek <jakub@redhat.com>
120 * c-common.c (get_atomic_generic_size): Require that first argument's
121 type points to a complete type and use tree_fits_uhwi_p instead of
122 just INTEGER_CST TREE_CODE check for the TYPE_SIZE_UNIT.
124 2020-07-31 Martin Sebor <msebor@redhat.com>
127 * c-common.c (check_function_arguments_recurse): Return early when
128 no-warning bit is set.
130 2020-07-31 Richard Biener <rguenther@suse.de>
133 * c-common.h (c_common_finalize_early_debug): Declare.
134 * c-common.c: Include debug.h.
135 (c_common_finalize_early_debug): finalize_early_debug langhook
136 implementation generating debug for extern declarations.
138 2020-07-27 Nathan Sidwell <nathan@acm.org>
140 * c-common.c (try_to_locate_new_include_insertion_point): Use
141 strcmp, not pointer equality.
143 2020-07-25 Martin Sebor <msebor@redhat.com>
146 * c-common.c (check_nonnull_arg): Print note only when warning was
149 2020-07-22 Tobias Burnus <tobias@codesourcery.com>
151 * c-omp.c (c_finish_omp_critical): Check for no name but
152 nonzero hint provided.
154 2020-07-20 Jason Merrill <jason@redhat.com>
156 * c-cppbuiltin.c (c_cpp_builtins): Update
157 __cpp_nontype_template_args for C++20.
159 2020-07-20 Martin Sebor <msebor@redhat.com>
162 * c.opt: Remove stray text.
164 2020-07-14 Lewis Hyatt <lhyatt@gmail.com>
167 * c-indentation.c (should_warn_for_misleading_indentation): Get
168 global tabstop from the new source.
169 * c-opts.c (c_common_handle_option): Remove handling of -ftabstop, which
170 is now a common option.
173 2020-07-08 Eric Botcazou <ebotcazou@adacore.com>
175 * c.opt (Wscalar-storage-order): Add explicit variable.
177 2020-07-07 Nathan Sidwell <nathan@acm.org>
179 * c-opts.c (c_common_post_options): Add 'injecting' arg to
181 (c_finish_options): Add linemap_line_start calls for builtin and cmd
182 maps. Force token position to line_table's highest line.
183 * c-ppoutput.c (print_line_1): Refactor, print line zero.
184 (cb_define): Always increment source line.
186 2020-07-06 Martin Sebor <msebor@redhat.com>
189 * c-common.c (check_function_nonnull): Avoid checking syntesized calls
190 to stub lambda objects with null this pointer.
191 (check_nonnull_arg): Handle C++ nullptr.
193 2020-07-02 Jason Merrill <jason@redhat.com>
194 Jakub Jelinek <jakub@redhat.com>
196 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_consteval.
198 2020-06-30 Jakub Jelinek <jakub@redhat.com>
201 * c-common.c (check_function_arguments_recurse): Don't crash on
202 calls to internal functions.
204 2020-06-28 Martin Sebor <msebor@redhat.com>
207 * c-common.c (struct nonnull_arg_ctx): Add members.
208 (check_function_nonnull): Use nonnull_arg_ctx as argument. Handle
209 C++ member functions specially. Consider the this pointer implicitly
211 (check_nonnull_arg): Use location of argument when available.
212 (check_function_arguments): Use nonnull_arg_ctx as argument.
214 2020-06-27 Jakub Jelinek <jakub@redhat.com>
217 * c-common.c (pointer_int_sum): Use TYPE_OVERFLOW_UNDEFINED instead of
218 !TYPE_UNSIGNED check to see if we can apply distributive law and handle
219 smaller precision intop operands separately.
221 2020-06-26 Marek Polacek <polacek@redhat.com>
223 * c-opts.c (c_common_init_options): Default to gnu++17.
225 2020-06-17 Jonathan Wakely <jwakely@redhat.com>
228 * c-common.c (get_atomic_generic_size): Check cv-qualifiers in
231 2020-06-16 Jakub Jelinek <jakub@redhat.com>
233 * c-common.h (c_omp_check_loop_iv_exprs): Add an int argument.
234 * c-omp.c (struct c_omp_check_loop_iv_data): Add maybe_nonrect and
236 (c_omp_is_loop_iterator): New function.
237 (c_omp_check_loop_iv_r): Use it. Add support for silent scanning
238 if outer loop iterator is present. Perform duplicate checking through
239 hash_set in the function rather than expecting caller to do that.
240 Pass NULL instead of d->ppset to walk_tree_1.
241 (c_omp_check_nonrect_loop_iv): New function.
242 (c_omp_check_loop_iv): Use it. Fill in new members, allow
243 non-rectangular loop forms, diagnose multiple associated loops with
244 the same iterator. Pass NULL instead of &pset to walk_tree_1.
245 (c_omp_check_loop_iv_exprs): Likewise.
247 2020-06-10 Martin Liska <mliska@suse.cz>
249 PR tree-optimization/92860
250 * c-attribs.c (handle_optimize_attribute):
251 Save global options and compare it after parsing of function
253 * c-pragma.c (opt_stack::saved_global_options): New field.
254 (handle_pragma_push_options): Save global_options.
255 (handle_pragma_pop_options): Compare them after pop.
257 2020-06-09 Jakub Jelinek <jakub@redhat.com>
260 * c-pretty-print.c (c_pretty_printer::unary_expression): Handle the
261 case when MEM_REF's first argument has type pointer to incomplete type.
263 2020-06-05 Jason Merrill <jason@redhat.com>
265 * c-pretty-print.c (pp_c_additive_expression): Handle negative
266 operand to POINTER_PLUS_EXPR.
268 2020-06-04 Martin Sebor <msebor@redhat.com>
272 * c-attribs.c (append_access_attrs): Handle attr_access::none.
273 (handle_access_attribute): Same.
275 2020-06-03 Mark Wielaard <mark@klomp.org>
277 * known-headers.cc (get_cp_stdlib_header_for_string_macro_name):
279 * known-headers.h (get_cp_stdlib_header_for_string_macro_name):
280 New function declaration.
282 2020-06-03 Mark Wielaard <mark@klomp.org>
284 * known-headers.cc (get_string_macro_hint): New function.
285 (get_stdlib_header_for_name): Use get_string_macro_hint.
286 (get_c_stdlib_header_for_string_macro_name): New function.
287 * known-headers.h (get_c_stdlib_header_for_string_macro_name):
288 New function declaration.
290 2020-06-03 Tobias Burnus <tobias@codesourcery.com>
292 * c-common.h (c_omp_predetermined_mapping): Declare.
293 * c-omp.c (c_omp_predetermined_mapping): New.
295 2020-05-22 Mark Wielaard <mark@klomp.org>
297 * known-headers.cc (get_stdlib_header_for_name): Add a new
298 stdlib_hint array for stdbool and stdint.
300 2020-05-22 Mark Wielaard <mark@klomp.org>
302 * known-headers.cc (get_stdlib_header_for_name): Return
303 "<stdbool.h>" for "bool", "true" or "false" when STDLIB_C and
306 2020-05-20 Nathan Sidwell <nathan@acm.org>
308 * c-common.c (try_to_locate_new_include_insertion_point): Revert change.
310 * c-common.c (try_to_locate_new_include_insertion_point): Use
311 strcmp to compare filenames.
312 * c-lex.c (init_c_lex): Move declaration to initialization.
313 * c-opts.c (handle_deferred_opts): Move cpp_get_deps call into
316 2020-05-15 Jason Merrill <jason@redhat.com>
318 * c-opts.c (set_std_cxx20): Set flag_coroutines.
320 2020-05-13 Jason Merrill <jason@redhat.com>
322 * c.opt (std=c++20): Make c++2a the alias.
323 (std=gnu++20): Likewise.
324 * c-common.h (cxx_dialect): Change cxx2a to cxx20.
326 * c-cppbuiltin.c: Adjust.
330 2020-05-12 Eric Botcazou <ebotcazou@adacore.com>
332 * c-ada-spec.c (dump_ads): Output pragma Warnings ("U"); on entry.
334 2020-05-08 Nathan Sidwell <nathan@acm.org>
336 Reimplement directives only processing.
337 * c-ppoutput.c (token_streamer): Ne.
338 (directives_only_cb): New. Swallow ...
339 (print_lines_directives_only): ... this.
340 (scan_translation_unit_directives_only): Reimplment using the
343 2020-05-07 Marek Polacek <polacek@redhat.com>
345 * c-format.c (badwords): Add "nonstatic".
347 202-05-07 Jakub Jelinek <jakub@redhat.com>
350 * c-common.c (speculation_safe_value_resolve_params): Return false if
351 error_operand_p (val2).
352 (resolve_overloaded_builtin) <case BUILT_IN_SPECULATION_SAFE_VALUE_N>:
353 Remove extraneous semicolon.
355 2020-05-06 qing zhao <qing.zhao@oracle.com>
358 * c-indentation.c (get_visual_column): Add a hint to use the new
359 -flarge-source-files option.
361 2020-05-05 Stefan Schulze Frielinghaus <stefansf@linux.ibm.com>
363 * c-attribs.c (handle_vector_size_attribute): Add attribute
364 nonnull for argument args in order to silence warning of
365 uninitialized variable usage. Since this is local to the
366 compilation unit and thus cannot be checked at call sides by the
367 compiler, added an assert statement in order to verify this.
369 2020-05-01 H.J. Lu <hongjiu.lu@intel.com>
372 * c-attribs.c (handle_patchable_function_entry_attribute): Limit
373 value to USHRT_MAX (65535).
375 2020-04-29 Jakub Jelinek <jakub@redhat.com>
377 * c-format.c (PP_FORMAT_CHAR_TABLE): Add %{ and %}.
379 2020-04-27 Jakub Jelinek <jakub@redhat.com>
382 * c-common.c (resolve_overloaded_builtin): Return error_mark_node for
383 fncode == BUILT_IN_NONE before initialization of first_param.
385 2020-04-23 Marek Polacek <polacek@redhat.com>
388 * c-attribs.c (find_tm_attribute): Use get_attribute_name instead of
391 2020-04-14 Patrick Palka <ppalka@redhat.com>
394 * c-pretty-print.c (pp_c_pointer) <case REFERENCE_TYPE>: Print a double
395 ampersand if it's an rvalue reference type.
397 2020-04-13 Martin Sebor <msebor@redhat.com>
400 * c-pretty-print.c (c_pretty_printer::direct_abstract_declarator): Avoid
401 printing array bound for flexible array members.
403 2020-04-13 Iain Sandoe <iain@sandoe.co.uk>
405 * c-cppbuiltin.c (c_cpp_builtins): Update coroutines builtin
408 2020-04-02 Richard Biener <rguenther@suse.de>
411 * c-opts.c (c_common_post_options): Enable -ffinite-loops
412 for -O2 and C++11 or newer.
414 2020-03-28 Patrick Palka <ppalka@redhat.com>
416 * c.opt: Add -fconcepts-diagnostics-depth.
418 2020-03-27 Martin Sebor <msebor@redhat.com>
421 * c-attribs.c (handle_copy_attribute): Avoid passing expressions
422 to decl_attributes. Make handling of different kinds of entities
425 2020-03-27 Martin Sebor <msebor@redhat.com>
428 * c-attribs.c (handle_access_attribute): Avoid setting TYPE_ATTRIBUTES
431 2020-03-23 Jakub Jelinek <jakub@redhat.com>
434 * c-warn.c (warnings_for_convert_and_check): For expr and/or
435 result being COMPOUND_EXPRs, skip to ultimate rhs.
437 2020-03-20 Richard Sandiford <richard.sandiford@arm.com>
440 * c-common.c (c_common_type_for_mode): Before using a registered
441 built-in type, check that the vectorness of the type matches
442 the vectorness of the mode.
444 2020-03-17 Jakub Jelinek <jakub@redhat.com>
446 * c-common.c (resolve_overloaded_builtin): Fix up duplicated word
447 issue in a diagnostic message.
449 2020-03-15 Lewis Hyatt <lhyatt@gmail.com>
451 * c.opt: Avoid redundancy in the help text.
453 2020-03-02 Marek Polacek <polacek@redhat.com>
455 PR c++/93958 - add missing -std=gnu++20.
456 * c.opt: Add -std=gnu++20.
458 2020-03-01 Martin Sebor <msebor@redhat.com>
461 * c-attribs.c (append_access_attrs): Correctly handle attribute.
462 (handle_access_attribute): Same.
464 2020-02-25 Jakub Jelinek <jakub@redhat.com>
467 * c-pragma.c (handle_pragma_diagnostic): Add missing ? after
468 "did you mean" hint in diagnostics.
470 2020-02-15 Jason Merrill <jason@redhat.com>
472 * c.opt: Add -std=c++20.
474 2020-02-14 Eric Botcazou <ebotcazou@adacore.com>
476 * c-ada-spec.c: Include bitmap.h.
477 (dump_ada_double_name): Rename into...
478 (dump_anonymous_type_name): ...this. Always use the TYPE_UID.
479 (dump_ada_array_type): Adjust to above renaming. Robustify.
480 (dump_nested_types_1): New function copied from... Add dumped_types
481 parameter and pass it down to dump_nested_type.
482 (dump_nested_types): ...this. Remove parent parameter. Just call
483 dump_nested_types_1 on an automatic bitmap.
484 (dump_nested_type): Add dumped_types parameter.
485 <ARRAY_TYPE>: Do not dump it if already present in dumped_types.
486 Adjust recursive calls and adjust to above renaming.
487 (dump_ada_declaration): Adjust call to dump_nested_types.
488 Tidy up and adjust to above renaming.
489 (dump_ada_specs): Initialize and release bitmap obstack.
491 2020-02-10 Martin Sebor <msebor@redhat.com>
494 * c-attribs.c (handle_access_attribute): Correct off-by-one mistakes.
496 2020-02-10 Jakub Jelinek <jakub@redhat.com>
499 * c-format.c (check_plain): Fix up last argument of strncasecmp.
500 Remove useless extra test.
502 2020-02-03 Julian Brown <julian@codesourcery.com>
503 Tobias Burnus <tobias@codesourcery.com>
505 * c-cppbuiltin.c (c_cpp_builtins): Update _OPENACC define to 201711.
507 2020-01-29 Jason Merrill <jason@redhat.com>
510 * c-attribs.c (check_cxx_fundamental_alignment_constraints): Remove.
512 2020-01-23 Jason Merrill <jason@redhat.com>
514 * c-warn.c (conversion_warning): Change -Wsign-conversion handling.
516 2020-01-23 Martin Sebor <msebor@redhat.com>
519 * c-common.c (check_function_arguments): Avoid overlap checking
520 of sprintf functions.
522 2020-01-22 Jason Merrill <jason@redhat.com>
524 PR testsuite/93391 - PR 40752 test fails with unsigned plain char.
526 * c-warn.c (conversion_warning): Check operands only after checking
527 the whole expression. Don't check second operand of + for sign.
529 2020-01-21 Jason Merrill <jason@redhat.com>
530 Manuel López-Ibáñez <manu@gcc.gnu.org>
532 PR c++/40752 - useless -Wconversion with short +=.
533 * c.opt (-Warith-conversion): New.
534 * c-warn.c (conversion_warning): Recurse for operands of
535 operators. Only warn about the whole expression with
538 2020-01-21 Jason Merrill <jason@redhat.com>
540 * c-common.c (unsafe_conversion_p): Don't warn, return UNSAFE_SIGN.
541 * c-warn.c (conversion_warning): Warn about UNSAFE_SIGN.
543 2020-01-20 Nathan Sidwell <nathan@acm.org>
545 PR preprocessor/80005
546 * c-cppbuiltins.c (c_cpp_builtins): Don't define __has_include{,_next}.
548 2020-01-18 Iain Sandoe <iain@sandoe.co.uk>
550 * c-common.c (co_await, co_yield, co_return): New.
551 * c-common.h (RID_CO_AWAIT, RID_CO_YIELD,
552 RID_CO_RETURN): New enumeration values.
553 (D_CXX_COROUTINES): Bit to identify coroutines are active.
554 (D_CXX_COROUTINES_FLAGS): Guard for coroutine keywords.
555 * c-cppbuiltin.c (__cpp_coroutines): New cpp define.
556 * c.opt (fcoroutines): New command-line switch.
558 2020-01-10 David Malcolm <dmalcolm@redhat.com>
560 * c-format.c (local_event_ptr_node): New.
561 (PP_FORMAT_CHAR_TABLE): Add entry for "%@".
562 (init_dynamic_diag_info): Initialize local_event_ptr_node.
563 * c-format.h (T_EVENT_PTR): New define.
565 2020-01-10 Martin Sebor <msebor@redhat.com>
568 * c-attribs.c (append_access_attrs): Validate against the translated
569 access string rather than the human-readable representation.
571 2020-01-01 Jakub Jelinek <jakub@redhat.com>
573 Update copyright years.
575 2019-12-20 Eric Botcazou <ebotcazou@adacore.com>
577 * c-ada-spec.h (decl_sloc): Delete.
578 * c-ada-spec.c (decl_sloc): Make static.
580 2019-12-19 Julian Brown <julian@codesourcery.com>
582 * c-common.h (c_omp_map_clause_name): Add prototype.
583 * c-omp.c (c_omp_map_clause_name): New function.
584 * c-pragma.h (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ATTACH and
585 PRAGMA_OACC_CLAUSE_DETACH.
587 2019-12-19 Julian Brown <julian@codesourcery.com>
588 Maciej W. Rozycki <macro@codesourcery.com>
589 Tobias Burnus <tobias@codesourcery.com>
590 Thomas Schwinge <thomas@codesourcery.com>
592 * c-pragma.h (pragma_omp_clause): Add
593 PRAGMA_OACC_CLAUSE_NO_CREATE.
595 2019-12-17 Martin Sebor <msebor@redhat.com>
598 * c.opt (-Wmismatched-tags, -Wredundant-tags): New options.
600 2019-12-11 David Malcolm <dmalcolm@redhat.com>
602 * c-pretty-print.c (c_pretty_printer::clone): New vfunc
604 * c-pretty-print.h (c_pretty_printer::clone): New vfunc decl.
606 2019-12-09 David Malcolm <dmalcolm@redhat.com>
608 * c-format.c (range_label_for_format_type_mismatch::get_text):
609 Replace label_text ctor called with true with label_text::take.
611 2019-12-09 David Malcolm <dmalcolm@redhat.com>
613 * c-format.c (selftest::test_type_mismatch_range_labels): Remove
614 initial newline from expected outputs.
615 * c-opts.c (c_diagnostic_finalizer): Add pp_newline call before
616 call to diagnostic_show_locus.
618 2019-12-06 Jakub Jelinek <jakub@redhat.com>
620 * c-cppbuiltin.c (c_cpp_builtins): Don't define __cpp_consteval for
623 2019-12-05 Marek Polacek <polacek@redhat.com>
624 Jakub Jelinek <jakub@redhat.com>
626 PR c++/91353 - P1331R2: Allow trivial default init in constexpr contexts.
627 * c-cppbuiltin.c (c_cpp_builtins): Adjust the value of __cpp_constexpr.
629 2019-12-05 Marek Polacek <polacek@redhat.com>
631 PR c++/92271 - make __is_same alias for __is_same_as.
632 * c-common.c: Add __is_same, an alias for __is_same_as.
634 2019-12-03 Marek Polacek <polacek@redhat.com>
636 PR c++/91363 - P0960R3: Parenthesized initialization of aggregates.
637 * c-cppbuiltin.c (c_cpp_builtins): Predefine
638 __cpp_aggregate_paren_init=201902 for -std=c++2a.
640 2019-11-30 Jan Hubicka <hubicka@ucw.cz>
642 * c-attribs.c (handle_symver_attribute): New function
643 (c_common_attributes): Add symver.
645 2019-11-30 Richard Sandiford <richard.sandiford@arm.com>
647 * c-common.c (pointer_int_sum): Use verify_type_context to check
648 whether the target allows pointer arithmetic for the types involved.
649 (c_sizeof_or_alignof_type, c_alignof_expr): Use verify_type_context
650 to check whether the target allows sizeof and alignof operations
651 for the types involved.
653 2019-11-27 Jason Merrill <jason@redhat.com>
655 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_deduction_guides.
657 2019-11-26 Jakub Jelinek <jakub@redhat.com>
660 * c-attribs.c (handle_mode_attribute): Add mode attribute to
663 2019-11-25 Joseph Myers <joseph@codesourcery.com>
666 * c-common.c (c_common_type_for_mode): Handle decimal
667 floating-point types being NULL_TREE.
668 * c-format.c (get_format_for_type_1): Handle specified types being
670 * c-lex.c (interpret_float): Give an error for decimal
671 floating-point constants when decimal floating-point not
674 2019-11-23 Jakub Jelinek <jakub@redhat.com>
677 * c-attribs.c (append_access_attrs): Avoid buffer overflow. Avoid
678 memory leak. Use XNEWVEC macro. Use auto_diagnostic_group to
679 group warning with inform together.
680 (handle_access_attribute): Formatting fix.
682 2019-11-22 Jakub Jelinek <jakub@redhat.com>
685 * c-common.h (identifier_global_tag): Declare.
686 * c-format.c (get_pointer_to_named_type): Renamed to ...
687 (get_named_type): ... this. Use identifier_global_tag instead of
688 identifier_global_value, handle the return value being a TYPE_P.
689 (init_dynamic_diag_info): Adjust get_pointer_to_named_type callers
690 to call get_named_type instead. Formatting fixes.
692 Implement P1902R1, Missing feature-test macros 2017-2019.
693 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_init_captures
694 and __cpp_generic_lambdas for -std=c++2a. Define
695 __cpp_designated_initializers, __cpp_constexpr_in_decltype and
696 __cpp_consteval for -std=c++2a. Remove a FIXME comment about
697 __cpp_concepts for -std=c++2a.
699 2019-11-22 Martin Sebor <msebor@redhat.com>
702 * c-attribs.c (handle_access_attribute): New function.
703 (c_common_attribute_table): Add new attribute.
704 (get_argument_type): New function.
705 (append_access_attrs): New function.
706 (get_nonnull_operand): Rename...
707 (get_attribute_operand): ...to this.
708 * c-common.c (get_nonnull_operand): Rename...
709 (get_attribute_operand): ...to this.
711 2019-11-21 Joseph Myers <joseph@codesourcery.com>
713 * c-attribs.c (handle_fallthrough_attribute): Use pedwarn instead
716 2019-11-19 Joseph Myers <joseph@codesourcery.com>
718 * c-common.c (attribute_fallthrough_p): In C, use pedwarn not
719 warning for standard attributes mixed with fallthrough attributes.
721 2019-11-15 Joseph Myers <joseph@codesourcery.com>
723 * c-attribs.c (handle_fallthrough_attribute): Remove static.
724 * c-common.h (handle_fallthrough_attribute): Declare.
726 2019-11-15 Joseph Myers <joseph@codesourcery.com>
728 * c-attribs.c (handle_deprecated_attribute): Remove static.
729 * c-common.h (handle_deprecated_attribute): Declare.
731 2019-11-14 Joseph Myers <joseph@codesourcery.com>
733 * c-lex.c (lex_charconst): Make CPP_UTF8CHAR constants unsigned
736 2019-11-14 Jakub Jelinek <jakub@redhat.com>
738 * c-omp.c (c_omp_check_context_selector): Add nvidia to the list of
741 * c-omp.c (c_omp_check_context_selector): Handle name lists
742 containing string literals. Don't diagnose atomic_default_mem_order
745 2019-11-13 Joseph Myers <joseph@codesourcery.com>
747 * c-cppbuiltin.c (builtin_define_float_constants): Also define
748 NORM_MAX constants. Update call to get_max_float.
749 (LAZY_HEX_FP_VALUES_CNT): Update value to include NORM_MAX
752 2019-11-13 Eric Botcazou <ebotcazou@adacore.com>
754 * c-ada-spec.c (get_underlying_decl): Do not look through typedefs.
755 (dump_forward_type): Do not generate a declaration for function types.
756 (dump_nested_type) <ARRAY_TYPE>: Do not generate a nested declaration
757 of the component type if it is declared in another file.
759 2019-11-12 Martin Liska <mliska@suse.cz>
761 * c-opts.c (c_common_post_options):
762 Use SET_OPTION_IF_UNSET.
764 2019-11-12 Maciej W. Rozycki <macro@codesourcery.com>
765 Frederik Harwath <frederik@codesourcery.com>
768 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_SERIAL enumeration
770 * c-pragma.c (oacc_pragmas): Add "serial" entry.
772 2019-11-08 Richard Sandiford <richard.sandiford@arm.com>
774 * c-common.h (gnu_vector_type_p): New function.
775 * c-common.c (c_build_vec_perm_expr): Require __builtin_shuffle
776 vectors to satisfy gnu_vector_type_p.
777 (c_build_vec_convert): Likewise __builtin_convertvector.
778 (convert_vector_to_array_for_subscript): Likewise when applying
779 implicit vector to array conversion.
780 (scalar_to_vector): Likewise when converting vector-scalar
781 operations to vector-vector operations.
783 2019-11-08 Joseph Myers <joseph@codesourcery.com>
785 * c.opt (Wold-style-definition): Initialize to -1.
786 * c-opts.c (c_common_post_options): Set warn_old_style_definition
787 to flag_isoc2x if not set explicitly.
789 2019-11-07 Joseph Myers <joseph@codesourcery.com>
791 * c-attribs.c (parse_tm_stmt_attr): Handle scoped attributes.
793 2019-11-05 Jason Merrill <jason@redhat.com>
795 * c-opts.c (c_common_post_options): -fconcepts-ts implies
798 2019-11-04 Kamlesh Kumar <kamleshbhalui@gmail.com>
800 * c-opts.c (c_common_post_options): Update
803 2019-11-02 Jakub Jelinek <jakub@redhat.com>
805 * c-common.h (c_omp_get_context_selector): Remove.
806 * c-omp.c (c_omp_get_context_selector): Moved to omp-general.c
807 and renamed to omp_get_context_selector.
809 * c-omp.c (c_omp_mark_declare_variant): Use
810 omp_context_selector_set_compare.
812 PR c++/88335 - Implement P1073R3: Immediate functions
813 * c-common.h (enum rid): Add RID_CONSTEVAL.
814 * c-common.c (c_common_reswords): Add consteval.
816 2019-11-01 Martin Sebor <msebor@redhat.com>
822 * c-pretty-print.c (direct_abstract_declarator): Print
823 bound in zero-length arrays.
824 * c.opt (-Wzero-length-bounds): New option.
826 2019-10-30 Nathan Sidwell <nathan@acm.org>
828 * c-cppbuiltin.c (c_cpp_builtins): Add 'L' suffix to feature
831 2019-10-28 Martin Sebor <msebor@redhat.com>
834 * c-common.c (c_common_nodes_and_builtins): Call c_define_builtins
835 even when only preprocessing.
836 * c-common.h (names_builtin_p): Declare new function.
837 * c-lex.c (init_c_lex): Set has_builtin.
838 (c_common_has_builtin): Define a new function.
839 * c-ppoutput.c (init_pp_output): Set has_builtin.
841 2019-10-24 Jakub Jelinek <jakub@redhat.com>
843 * c-common.h (c_omp_context_selector_matches): Remove.
844 * c-omp.c (c_omp_context_selector_matches): Remove.
845 * c-attribs.c (c_common_attribute_table): Add
846 "omp declare target {host,nohost,block}" attributes.
848 2019-10-17 JeanHeyd Meneide <phdofthehouse@gmail.com>
850 * c-lex.c (c_common_has_attribute): Update nodiscard value.
852 2019-10-14 Richard Sandiford <richard.sandiford@arm.com>
854 * c-common.h (user_facing_original_type_p): Declare.
855 * c-common.c: Include c-spellcheck.h.
856 (user_facing_original_type_p): New function.
858 2019-10-12 Jakub Jelinek <jakub@redhat.com>
860 * c-common.h (c_omp_mark_declare_variant,
861 c_omp_context_selector_matches): Declare.
862 * c-omp.c: Include attribs.h, gimplify.h, cgraph.h, symbol-summary.h
864 (c_omp_get_context_selector): Support second argument NULL.
865 (c_omp_mark_declare_variant, c_omp_context_selector_matches): New
867 * c-attribs.c (c_common_attribute_table): Remove "omp declare variant"
868 attribute, add "omp declare variant base" and
869 "omp declare variant variant" attributes.
871 2019-10-11 Joseph Myers <joseph@codesourcery.com>
873 * c.opt (Wc11-c2x-compat): Add CPP(cpp_warn_c11_c2x_compat)
874 CppReason(CPP_W_C11_C2X_COMPAT).
876 2019-10-11 Joseph Myers <joseph@codesourcery.com>
878 * c-common.c (c_common_reswords): Do not use D_EXT for _Decimal32,
879 _Decimal64 and _Decimal128.
881 2019-10-10 Joseph Myers <joseph@codesourcery.com>
883 * c-cppbuiltin.c (c_cpp_builtins): Do not define macros for DFP
884 types if DFP not supported.
886 2019-10-10 Jakub Jelinek <jakub@redhat.com>
888 * c-common.h (c_omp_check_context_selector,
889 c_omp_get_context_selector): Declare.
890 * c-omp.c (c_omp_declare_simd_clauses_to_numbers): Fix spelling
891 in diagnostic message.
892 (c_omp_check_context_selector, c_omp_get_context_selector): New
894 * c-attribs.c (c_common_attribute_table): Add "omp declare variant"
896 (handle_omp_declare_variant_attribute): New function.
898 2019-10-09 Martin Sebor <msebor@redhat.com>
900 PR tree-optimization/90879
901 * c.opt (-Wstring-compare): New option.
903 2019-10-08 Andrew Sutton <asutton@lock3software.com>
904 Jason Merrill <jason@redhat.com>
906 Update the concepts implementation to conform to the C++20
907 specification, improve compile times, and generally clean up
910 * c-cppbuiltin.c (c_cpp_builtins): Use new feature test values for
911 concepts when -std=c++2a. Bump __cpp_concepts to 201907.
912 * c.opt: Add -Wconcepts-ts.
913 * c-opts.c (c_common_post_options): Warn when -fconcepts is used
914 with -std=c++2a. Disable warning for -fconcepts in C++20 mode.
915 (set_std_cxx2a): Enable concepts by default.
917 2019-10-08 Joseph Myers <joseph@codesourcery.com>
919 * c-opts.c (c_common_post_options): Set
920 -fno-fp-int-builtin-inexact for C2X.
922 2019-10-05 Jakub Jelinek <jakub@redhat.com>
924 PR c++/91369 - Implement P0784R7: constexpr new
925 * c-cppbuiltin.c (c_cpp_builtins): Predefine
926 __cpp_constexpr_dynamic_alloc=201907 for -std=c++2a.
928 2019-10-04 Joseph Myers <joseph@codesourcery.com>
931 * c-format.c (C_STD_VER): Handle C2x.
932 (C_STD_NAME): Likewise.
933 (strftime_flag_specs): Add 'O' modifier with 'p' flag.
934 (time_char_table): Use separate entry for 'B' and 'b', with 'O'
935 modifier allowed and 'p' flag.
936 * c-format.h (enum format_std_version): Add STD_C2X.
937 (struct format_char_info): Mention 'p' in comment on flags2.
939 2019-10-01 David Malcolm <dmalcolm@redhat.com>
941 * c-opts.c (c_diagnostic_finalizer): Temporarily clear prefix when
942 calling diagnostic_show_locus, rather than destroying it afterwards.
944 2019-10-01 Jakub Jelinek <jakub@redhat.com>
947 * c-warn.c (check_alignment_of_packed_member): Ignore FIELD_DECLs
948 with NULL DECL_FIELD_OFFSET.
950 2019-10-01 Richard Sandiford <richard.sandiford@arm.com>
952 * c-pretty-print.c (pp_c_specifier_qualifier_list): If a vector type
953 has a type name, use it in preference to the __vector syntax.
955 2019-09-30 Richard Sandiford <richard.sandiford@arm.com>
957 * c-pretty-print.c (pp_c_parameter_type_list): Avoid printing
958 two spaces between a comma and "...".
960 2019-09-27 Jakub Jelinek <jakub@redhat.com>
963 * c-common.h (c_omp_predefined_variable): Declare.
964 * c-omp.c (c_omp_predefined_variable): New function.
965 (c_omp_predetermined_sharing): Return OMP_CLAUSE_DEFAULT_SHARED
966 for predefined variables.
968 2019-09-27 Richard Sandiford <richard.sandiford@arm.com>
970 * c-common.h (build_function_call_vec): Take the original
971 function decl as an optional final parameter.
972 (check_builtin_function_arguments): Take the original function decl.
973 * c-common.c (check_builtin_function_arguments): Likewise.
974 Handle all built-in functions, not just BUILT_IN_NORMAL ones.
975 Use targetm.check_builtin_call to check BUILT_IN_MD functions.
977 2019-09-15 Jason Merrill <jason@redhat.com>
979 * c-warn.c (warn_logical_operator): Strip location wrappers. Don't
980 fold_for_warn in "|| mask" warning.
982 2019-09-10 Martin Liska <mliska@suse.cz>
984 * c.opt: Use newly added WarnRemoved.
986 2019-09-09 Martin Liska <mliska@suse.cz>
988 * c.opt: Update comment of removed
989 options that are preserved only for backward
992 2019-09-06 Martin Liska <mliska@suse.cz>
995 * c-common.c: Remove definition of flag_use_repository.
996 * c-common.h: Likewise.
997 * c-opts.c (c_common_handle_option):
998 Do not handle OPT_frepo option.
999 * c.opt: Mark the option with Deprecated.
1001 2019-09-04 Marek Polacek <polacek@redhat.com>
1003 * c.opt (fdeduce-init-list): Ignored.
1005 2019-09-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1008 * c.opt (Wenum-conversion): New option.
1010 2019-09-03 Jozef Lawrynowicz <jozef.l@mittosystems.com>
1012 * c-attribs.c (handle_section_attribute): Call the
1013 handle_generic_attribute target hook after performing target
1014 independent processing.
1015 (handle_noinit_attribute): Likewise.
1017 2019-09-03 Ian Lance Taylor <iant@golang.org>
1019 * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Always expand
1020 when using -fgo-dump-spec.
1022 2019-09-02 Martin Liska <mliska@suse.cz>
1025 * c-common.c (fname_as_string): Use cxx_printable_name for
1026 __PRETTY_FUNCTION__ same as was used before r265711.
1028 2019-08-28 Marek Polacek <polacek@redhat.com>
1030 Implement P1152R4: Deprecating some uses of volatile.
1032 * c-opts.c (c_common_post_options): Enable -Wvolatile by
1033 default for C++2a, unless -Wno-deprecated.
1034 * c.opt (Wvolatile): New warning.
1036 2019-08-28 Marek Polacek <polacek@redhat.com>
1038 PR c++/91360 - Implement C++20 P1143R2: constinit.
1039 * c-common.c (c_common_reswords): Add constinit and __constinit.
1040 (keyword_is_decl_specifier): Handle RID_CONSTINIT.
1041 * c-common.h (enum rid): Add RID_CONSTINIT, RID_FIRST_CXX20, and
1044 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_constinit.
1045 * c-format.c (cxx_keywords): Add "constinit".
1046 * c.opt (Wc++2a-compat, Wc++20-compat): New options.
1048 2019-08-27 Jakub Jelinek <jakub@redhat.com>
1051 * c-common.c (verify_tree): For LSHIFT_EXPR, RSHIFT_EXPR,
1052 COMPONENT_REF and ARRAY_REF in cxx_dialect >= cxx17 mode handle it
1053 like COMPOUND_EXPR rather than normal expression.
1055 2019-08-23 Iain Sandoe <iain@sandoe.co.uk>
1058 * c-lex.c (c_lex_with_flags): Don't call
1059 c_common_no_more_pch () from here.
1061 2019-08-23 Jakub Jelinek <jakub@redhat.com>
1064 * c-common.c (c_ts18661_flt_eval_method): Use flag_excess_precision
1065 instead of flag_excess_precision_cmdline.
1066 * c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): Likewise.
1067 * c-opts.c (c_common_post_options): Likewise.
1069 2019-08-22 Martin Sebor <msebor@redhat.com>
1072 * c-common.c (braced_list_to_string): Add argument and overload.
1073 Handle flexible length arrays and unions.
1075 2019-08-21 Eric Botcazou <ebotcazou@adacore.com>
1077 * c-ada-spec.c (dump_ada_function_declaration): Be prepared for broken
1078 function declarations where arguments are missing. Rename variables.
1080 2019-08-15 Richard Biener <rguenther@suse.de>
1082 * c-common.c (c_stddef_cpp_builtins): When the GIMPLE FE is
1083 enabled, define __SIZETYPE__.
1085 2019-08-14 Christophe Lyon <christophe.lyon@linaro.org>
1087 * c-attribs.c (c_common_attribute_table): Add "noinit" entry. Add
1088 exclusion with "section" attribute.
1089 (attr_noinit_exclusions): New table.
1090 (handle_noinit_attribute): New function.
1092 2019-08-13 Richard Sandiford <richard.sandiford@arm.com>
1095 * c-common.c (resolve_overloaded_builtin): Use
1096 copy_decl_built_in_function.
1098 2019-08-13 Martin Sebor <msebor@redhat.com>
1101 * c-format.c (printf_length_specs): Set FMT_LEN_w for "w".
1102 (asm_fprintf_length_spec): Same.
1103 * c-format.h (format_lengths): Add FMT_LEN_w.
1105 2019-08-10 Jakub Jelinek <jakub@redhat.com>
1107 * c-pragma.h (enum pragma_omp_clause): Add
1108 PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
1110 2019-08-07 Jakub Jelinek <jakub@redhat.com>
1112 * c-pragma.h (enum pragma_omp_clause): Add
1113 PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR. Set PRAGMA_OACC_CLAUSE_USE_DEVICE
1114 equal to PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR instead of being a separate
1117 2019-08-05 Marek Polacek <polacek@redhat.com>
1119 PR c++/91338 - Implement P1161R3: Deprecate a[b,c].
1120 * c-opts.c (c_common_post_options): Enable -Wcomma-subscript by
1121 default for C++2a, unless -Wno-deprecated.
1122 * c.opt (Wcomma-subscript): New warning.
1124 2019-07-20 Jakub Jelinek <jakub@redhat.com>
1126 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_LOOP.
1127 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_BIND.
1128 * c-pragma.c (omp_pragmas_simd): Add PRAGMA_OMP_LOOP entry.
1129 * c-common.h (enum c_omp_clause_split): Add C_OMP_CLAUSE_SPLIT_LOOP.
1130 * c-omp.c (c_omp_split_clauses): Add support for 4 new combined
1131 constructs with the loop construct.
1133 2019-07-13 Jakub Jelinek <jakub@redhat.com>
1136 * c-omp.c (c_omp_split_clauses): Fix a pasto in
1137 OMP_CLAUSE_REDUCTION_TASK handling.
1139 2019-07-12 Jakub Jelinek <jakub@redhat.com>
1141 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ORDER.
1142 * c-omp.c (c_omp_split_clauses): Handle splitting of OMP_CLAUSE_ORDER.
1144 2019-07-09 Martin Sebor <msebor@redhat.com>
1147 * c-opts.c (handle_deferred_opts): Change class-key of PODs to struct
1148 and others to class.
1149 * c-pretty-print.h: Same.
1151 2019-07-09 Martin Sebor <msebor@redhat.com>
1154 * c-format.c (check_argument_type): Change class-key from class to
1155 struct and vice versa to match convention and avoid -Wclass-is-pod
1156 and -Wstruct-no-pod.
1157 * c-pretty-print.h: Same.
1159 2019-07-03 Martin Liska <mliska@suse.cz>
1161 * c-common.c (try_to_locate_new_include_insertion_point): Remove
1164 2019-07-03 Jakub Jelinek <jakub@redhat.com>
1166 * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_REDUCTION_INSCAN
1167 clauses on OMP_FOR rather than OMP_PARALLEL when OMP_FOR is combined
1170 2019-07-02 qing zhao <qing.zhao@oracle.com>
1172 PR preprocessor/90581
1173 * c-opts.c (c_common_handle_option): Handle -fmax-include-depth.
1174 * c.opt: Add new option -fmax-include-depth.
1176 2019-06-26 Jason Merrill <jason@redhat.com>
1178 PR c++/55442 - memory-hog with highly recursive constexpr.
1179 * c.opt (fconstexpr-loop-limit): New.
1181 2019-06-25 Jakub Jelinek <jakub@redhat.com>
1184 * c-omp.c (c_finish_omp_atomic): Allow tree_invariant_p in addition
1185 to SAVE_EXPR in first operand of a COMPOUND_EXPR.
1187 2019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
1189 * c-common.c (c_common_nodes_and_builtins): Define
1190 alternate "__intN__" name for "__intN" types.
1192 2019-06-24 Jan Hubicka <jh@suse.cz>
1194 * c-common.c (braced_lists_to_strings): Check that
1195 type is array or integer prior checking string flag.
1197 2019-06-21 Matthew Beliveau <mbelivea@redhat.com>
1199 PR c++/90875 - added -Wswitch-outside-range option
1200 * c.opt (Wswitch-outside-range): Added new option.
1201 * c-warn.c (c_do_switch_warnings): Use OPT_Wswitch-outside-range.
1203 2019-06-21 Marek Polacek <polacek@redhat.com>
1205 PR c++/90953 - ICE with -Wmissing-format-attribute.
1206 * c-common.c (check_function_arguments_recurse): Use
1208 (check_missing_format_attribute): Likewise.
1210 2019-06-19 Marek Polacek <polacek@redhat.com>
1212 PR c++/60364 - noreturn after first decl not diagnosed.
1213 * c-attribs.c (handle_noreturn_attribute): No longer static.
1214 * c-common.h (handle_noreturn_attribute, attr_noreturn_exclusions):
1216 * c-format.c (check_function_format): Use get_attribute_name.
1218 2019-06-19 Martin Sebor <msebor@redhat.com>
1220 PR translation/90156
1221 * c-format.c (function_format_info::format_type): Adjust type.
1222 (function_format_info::is_raw): New member.
1223 (decode_format_type): Adjust signature. Handle "raw" diag attributes.
1224 (decode_format_attr): Adjust call to decode_format_type.
1225 Avoid a redundant call to convert_format_name_to_system_name.
1226 Avoid abbreviating the word "arguments" in a diagnostic.
1227 (format_warning_substr): New function.
1228 (avoid_dollar_number): Quote dollar sign in a diagnostic.
1229 (finish_dollar_format_checking): Same.
1230 (check_format_info): Same.
1231 (struct baltoks_t): New.
1232 (c_opers, c_keywords, cxx_keywords, badwords, contrs): New arrays.
1233 (maybe_diag_unbalanced_tokens, check_tokens, check_plain): New
1235 (check_format_info_main): Call check_plain. Use baltoks_t. Call
1236 maybe_diag_unbalanced_tokens.
1237 (handle_format_attribute): Spell out the word "arguments" in
1240 2019-06-11 Matthew Beliveau <mbelivea@redhat.com>
1242 PR c++/90449 - add -Winaccessible-base option.
1243 * c.opt (Winaccessible-base): New option.
1245 2019-06-10 Jakub Jelinek <jakub@redhat.com>
1247 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_SCAN.
1248 * c-pragma.c (omp_pragmas_simd): Add #pragma omp scan.
1249 * c-omp.c (c_omp_split_clauses): Diagnose inscan reductions on
1250 combined/composite constructs where it is not allowed. Copy over
1251 OMP_CLAUSE_REDUCTION_INSCAN.
1253 2019-06-05 Martin Sebor <msebor@redhat.com>
1255 * c-attribs.c (handle_mode_attribute): Adjust quoting and hyphenation.
1256 (handle_alias_ifunc_attribute): Same.
1257 (handle_copy_attribute): Same.
1258 (handle_weakref_attribute): Same.
1259 (handle_nonnull_attribute): Same.
1260 * c-warn.c (warn_for_sign_compare): Same.
1261 (warn_for_restrict): Same.
1264 2019-06-05 Martin Sebor <msebor@redhat.com>
1266 * c-pragma.c (handle_pragma_weak): Adjust quoting in a diagnostic.
1267 * c.opt (-Wformat-diag): Remove a spurious period.
1269 2019-05-29 Jakub Jelinek <jakub@redhat.com>
1272 * c-common.c (check_builtin_function_arguments)
1273 <case BUILTIN_*_OVERFLOW>: Diagnose pointer to const qualified integer
1276 2019-05-23 Eric Botcazou <ebotcazou@adacore.com>
1278 * c-ada-spec.c (compare_node): Compare the DECL_UIDs as a last resort.
1280 2019-05-22 Martin Liska <mliska@suse.cz>
1283 * c-attribs.c (handle_copy_attribute): Do not copy
1284 target_clones attribute.
1286 2019-05-21 Eric Botcazou <ebotcazou@adacore.com>
1288 * c-ada-spec.h (enum cpp_operation): Add IS_ASSIGNMENT_OPERATOR.
1289 * c-ada-spec.c (print_assignment_operator): New function.
1290 (dump_ada_declaration) <FUNCTION_DECL>: Call it do dump explicit copy
1291 assignment operators declared as methods and filter out the others.
1293 2019-05-17 Thomas Schwinge <thomas@codesourcery.com>
1296 * c-attribs.c (c_common_attribute_table): Set min_len to -1 for
1297 "omp declare target".
1299 2019-05-16 Martin Sebor <msebor@redhat.com>
1301 * c-attribs.c (handle_no_sanitize_attribute): Quote identifiers,
1302 keywords, operators, and types in diagnostics.
1303 (handle_scalar_storage_order_attribute): Same.
1304 (handle_mode_attribute): Same.
1305 (handle_visibility_attribute): Same.
1306 (handle_assume_aligned_attribute): Same.
1307 (handle_no_split_stack_attribute): Same.
1308 * c-common.c (shorten_compare): Same.
1309 (c_common_truthvalue_conversion): Same.
1310 (cb_get_source_date_epoch): Same.
1311 * c-lex.c (cb_def_pragma): Quote keywords, operators, and types
1313 (interpret_float): Same.
1314 * c-omp.c (c_finish_omp_for): Same.
1315 * c-opts.c (c_common_post_options): Same.
1316 * c-pch.c (c_common_pch_pragma): Same.
1317 * c-pragma.c (pop_alignment): Same.
1318 (handle_pragma_pack): Same.
1319 (apply_pragma_weak): Same.
1320 (handle_pragma_weak): Same.
1321 (handle_pragma_scalar_storage_order): Same.
1322 (handle_pragma_redefine_extname): Same.
1323 (add_to_renaming_pragma_list): Same.
1324 (maybe_apply_renaming_pragma): Same.
1325 (push_visibility): Same.
1326 (handle_pragma_visibility): Same.
1327 (handle_pragma_optimize): Same.
1328 (handle_pragma_message): Same.
1329 * c-warn.c (warn_for_omitted_condop): Same.
1330 (lvalue_error): Same.
1332 2019-05-15 Richard Biener <rguenther@suse.de>
1335 * c-common.c (c_common_mark_addressable_vec): Also mark
1336 a COMPOUND_LITERAL_EXPR_DECL addressable similar to
1339 2019-05-06 Nathan Sidwell <nathan@acm.org>
1341 * c-opts.c (handle_defered_opts): Rename struct deps to struc mkdeps.
1343 2019-04-30 Nathan Sidwell <nathan@acm.org>
1345 * c-common.c (c_common_init_ts): Use MARK_TS_EXP. Mark SIZEOF_EXPR.
1347 2019-04-30 Martin Liska <mliska@suse.cz>
1349 * c-pragma.c (handle_pragma_diagnostic): Provide hints
1350 for unknown options.
1352 2019-04-26 Richard Sandiford <richard.sandiford@arm.com>
1354 * c-warn.c (strict_aliasing_warning): Apply COMPLETE_TYPE_P to
1355 the pointer target rather than the pointer itself.
1357 2019-04-19 Jakub Jelinek <jakub@redhat.com>
1360 * c-common.h (c_add_case_label): Remove orig_type and outside_range_p
1362 (c_do_switch_warnings): Remove outside_range_p argument.
1363 * c-common.c (check_case_bounds): Removed.
1364 (c_add_case_label): Remove orig_type and outside_range_p arguments.
1365 Don't call check_case_bounds. Fold low_value as well as high_value.
1366 * c-warn.c (c_do_switch_warnings): Remove outside_range_p argument.
1367 Check for case labels outside of range of original type here and
1370 2019-04-12 Jakub Jelinek <jakub@redhat.com>
1372 PR translation/90041
1373 * c.opt (-fhandle-exceptions): Use %< and %> around option names
1374 in the Warn diagnostics.
1377 * c-attribs.c (handle_patchable_function_entry_attribute): Add
1378 function comment. Warn if arguments of the attribute are not positive
1381 2019-04-09 Eric Botcazou <ebotcazou@adacore.com>
1383 * c-ada-spec.c (print_destructor): Deal with deleting destructors.
1384 (dump_ada_declaration) <FUNCTION_DECL>: Likewise.
1386 2019-04-07 Eric Botcazou <ebotcazou@adacore.com>
1388 * c-ada-spec.c (is_float128): New predicate extracted from...
1389 (dump_ada_node) <COMPLEX_TYPE>: Use it to recognize __cfloat128.
1390 <REAL_TYPE>: ...here. Call it.
1392 2019-04-05 David Malcolm <dmalcolm@redhat.com>
1395 * c-warn.c (check_address_or_pointer_of_packed_member): Add
1396 auto_diagnostic_group. Guard inform calls by result of
1399 2019-04-05 Marek Polacek <polacek@redhat.com>
1401 PR c++/89973 - -Waddress-of-packed-member ICE with invalid conversion.
1402 * c-warn.c (check_address_or_pointer_of_packed_member): Check the type
1405 2019-04-03 Jason Merrill <jason@redhat.com>
1407 PR c++/86586 - -fcompare-debug=-Wsign-compare.
1408 * c-warn.c (warn_for_sign_compare): Call fold_for_warn.
1410 2019-04-01 Martin Sebor <msebor@redhat.com>
1413 * c-attribs.c (handle_copy_attribute): Handle references and
1414 non-constant expressions.
1416 2019-03-22 Jakub Jelinek <jakub@redhat.com>
1419 * c.opt (-fconstexpr-ops-limit=): New option.
1421 2019-03-21 Jakub Jelinek <jakub@redhat.com>
1423 * c-common.c (per_file_includes_t): Use false as Lazy in hash_set
1426 2019-03-19 Martin Sebor <msebor@redhat.com>
1428 PR tree-optimization/89688
1429 * c-common.c (braced_list_to_string): Make static.
1430 (braced_lists_to_strings): Define new function.
1431 * c-common.h (braced_list_to_string): Remove.
1432 (braced_lists_to_strings): Declare.
1434 2019-03-12 Martin Liska <mliska@suse.cz>
1436 * c-opts.c (c_common_handle_option): Wrap option with %< and %>.
1438 2019-03-11 Martin Liska <mliska@suse.cz>
1440 * c-opts.c (c_common_post_options): Wrap apostrophes
1441 in gcc internal format with %'.
1443 2019-03-11 Martin Liska <mliska@suse.cz>
1445 * c-attribs.c (handle_nocf_check_attribute): Wrap an option name
1446 in a string format message and fix GNU coding style.
1447 * c-common.c (vector_types_convertible_p): Likewise.
1448 (c_build_vec_perm_expr): Likewise.
1449 * c-indentation.c (get_visual_column): Likewise.
1450 * c-opts.c (c_common_handle_option): Likewise.
1451 (c_common_post_options): Likewise.
1452 (sanitize_cpp_opts): Likewise.
1453 * c-pch.c (c_common_pch_pragma): Likewise.
1454 * c-pragma.c (handle_pragma_pack): Likewise.
1456 2019-03-08 Jakub Jelinek <jakub@redhat.com>
1458 PR tree-optimization/89550
1459 * c-common.c (c_common_truthvalue_conversion): Only set
1460 TREE_NO_WARNING if warning_at returned true.
1461 * c-warn.c (overflow_warning, warn_logical_operator): Likewise.
1463 2019-02-25 Sandra Loosemore <sandra@codesourcery.com>
1464 Martin Sebor <msebor@gmail.com>
1466 * c.opt (Wmissing-attributes): Clean up doc string.
1468 2019-02-25 Jakub Jelinek <jakub@redhat.com>
1471 * c-format.c (maybe_read_dollar_number): Compute nargnum in
1472 HOST_WIDE_INT type to avoid overflows and change overflow_flag
1475 2019-02-22 Richard Biener <rguenther@suse.de>
1477 * c-pch.c (no_checksum): Remove.
1478 (pch_init): Remove assertion that executable_checksum is not
1480 (c_common_valid_pch): Likewise.
1482 2019-02-18 Martin Sebor <msebor@redhat.com>
1485 * c-common.c (invalid_array_size_error): Handle cst_size_not_constant.
1487 2019-02-16 David Malcolm <dmalcolm@redhat.com>
1490 * c-common.c (shorten_compare): Call fold_for_warn on op0 when
1491 implementing -Wtype-limits.
1493 2019-02-11 Martin Sebor <msebor@redhat.com>
1496 * c-common.c (invalid_array_size_error): New function.
1497 (valid_array_size_p): Call it. Handle size as well as type.
1498 * c-common.h (valid_constant_size_p): New function.
1499 (enum cst_size_error): New type.
1501 2019-01-31 David Malcolm <dmalcolm@redhat.com>
1504 * known-headers.cc (get_stdlib_header_for_name): Add
1505 {FLT|DBL|LDBL}_{MAX|MIN} to "hints" array.
1507 2019-01-31 Jakub Jelinek <jakub@redhat.com>
1510 * c-pretty-print.c (pp_c_enumeration_constant): Print always as
1511 a C cast in pp_c_flag_gnu_v3 mode.
1513 2019-01-29 Jakub Jelinek <jakub@redhat.com>
1516 * c-common.c (c_common_nodes_and_builtins): Build type variants for
1517 builtin_structptr_types types even for C.
1519 2019-01-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
1521 * c-warn.c (check_address_or_pointer_of_packed_member): Handle the case
1522 when rhs is of array type correctly. Fix handling of nested structures.
1523 Fix handling of indirect_ref together with nop_expr and/or addr_expr.
1524 (check_and_warn_address_or_pointer_of_packed_member): Fix handling of
1525 type casts within nested compound expressions.
1527 2019-01-22 Jakub Jelinek <jakub@redhat.com>
1530 * c-omp.c (c_finish_omp_atomic): For bitfield atomics, update type
1531 variable after using BIT_FIELD_REF.
1533 2019-01-18 H.J. Lu <hongjiu.lu@intel.com>
1537 * c-common.h (warn_for_address_or_pointer_of_packed_member):
1538 Remove the boolean argument.
1539 * c-warn.c (check_address_of_packed_member): Renamed to ...
1540 (check_address_or_pointer_of_packed_member): This. Also
1541 warn pointer conversion.
1542 (check_and_warn_address_of_packed_member): Renamed to ...
1543 (check_and_warn_address_or_pointer_of_packed_member): This.
1544 Also warn pointer conversion.
1545 (warn_for_address_or_pointer_of_packed_member): Remove the
1546 boolean argument. Don't check pointer conversion here.
1548 2019-01-15 Richard Sandiford <richard.sandiford@arm.com>
1551 * c.opt (Wdeprecated): Move documentation and variable to common.opt.
1553 2019-01-14 Jakub Jelinek <jakub@redhat.com>
1555 * c-cppbuiltin.c (c_cpp_builtin): Define __cpp_guaranteed_copy_elision
1556 and __cpp_nontype_template_parameter_auto. Add a comment that
1557 __cpp_template_auto is deprecated.
1559 2019-01-14 Tom Honermann <tom@honermann.net>
1561 Implement P0482R5, char8_t: A type for UTF-8 characters and strings
1562 * c-common.c (c_common_reswords): Add char8_t.
1563 (fix_string_type): Use char8_t for the type of u8 string literals.
1564 (c_common_get_alias_set): char8_t doesn't alias.
1565 (c_common_nodes_and_builtins): Define char8_t as a builtin type in
1567 (c_stddef_cpp_builtins): Add __CHAR8_TYPE__.
1568 (keyword_begins_type_specifier): Add RID_CHAR8.
1569 * c-common.h (rid): Add RID_CHAR8.
1570 (c_tree_index): Add CTI_CHAR8_TYPE and CTI_CHAR8_ARRAY_TYPE.
1571 Define D_CXX_CHAR8_T and D_CXX_CHAR8_T_FLAGS.
1572 Define char8_type_node and char8_array_type_node.
1573 * c-cppbuiltin.c (cpp_atomic_builtins): Predefine
1574 __GCC_ATOMIC_CHAR8_T_LOCK_FREE.
1575 (c_cpp_builtins): Predefine __cpp_char8_t.
1576 * c-lex.c (lex_string): Use char8_array_type_node as the type of
1578 (lex_charconst): Use char8_type_node as the type of CPP_UTF8CHAR.
1579 * c-opts.c: If not otherwise specified, enable -fchar8_t when
1581 * c.opt: Add the -fchar8_t command line option.
1583 2019-01-14 Martin Sebor <msebor@redhat.com>
1586 * c-attribs.c (positional_argument): Call valid_format_string_type_p
1587 and issue errors if it fails.
1588 * c-common.h (valid_format_string_type_p): Declare.
1589 * c-format.c (valid_stringptr_type_p): Rename...
1590 (valid_format_string_type_p): ...to this and make extern.
1591 (handle_format_arg_attribute): Adjust to new name.
1592 (check_format_string): Same.
1594 2019-01-13 H.J. Lu <hongjiu.lu@intel.com>
1596 * c-warn.c (warn_for_address_or_pointer_of_packed_member):
1597 Replace "may may" with "may" in warning message.
1599 2019-01-07 Jakub Jelinek <jakub@redhat.com>
1602 * c-common.h (enum rid): Add RID_BUILTIN_CONVERTVECTOR.
1603 (c_build_vec_convert): Declare.
1604 * c-common.c (c_build_vec_convert): New function.
1606 2019-01-04 Martin Sebor <msebor@redhat.com>
1609 * c-attribs.c (handle_copy_attribute): Avoid copying attribute leaf.
1610 Handle C++ empty throw specification and C11 _Noreturn.
1611 (has_attribute): Also handle C11 _Noreturn.
1613 2019-01-04 Martin Sebor <msebor@redhat.com>
1616 * c-attribs.c (positional_argument): Also accept enumerated types.
1618 2019-01-01 Jakub Jelinek <jakub@redhat.com>
1620 Update copyright years.
1622 2018-12-20 H.J. Lu <hongjiu.lu@intel.com>
1625 * c-common.h (warn_for_address_or_pointer_of_packed_member): New.
1626 * c-warn.c (check_alignment_of_packed_member): New function.
1627 (check_address_of_packed_member): Likewise.
1628 (check_and_warn_address_of_packed_member): Likewise.
1629 (warn_for_address_or_pointer_of_packed_member): Likewise.
1630 * c.opt: Add -Wno-address-of-packed-member.
1632 2018-12-20 David Malcolm <dmalcolm@redhat.com>
1635 * c-warn.c (get_outermost_macro_expansion): New function.
1636 (spelled_the_same_p): Use it to unwind the macro expansions, and
1637 compare the outermost macro in each nested expansion, rather than
1640 2018-12-19 David Malcolm <dmalcolm@redhat.com>
1643 * c-common.h (warn_tautological_cmp): Convert 1st param from
1644 location_t to const op_location_t &.
1645 * c-warn.c (find_array_ref_with_const_idx_r): Call fold_for_warn
1646 when testing for INTEGER_CST.
1647 (warn_tautological_bitwise_comparison): Convert 1st param from
1648 location_t to const op_location_t &; use it to build a
1649 binary_op_rich_location, and use this.
1650 (spelled_the_same_p): New function.
1651 (warn_tautological_cmp): Convert 1st param from location_t to
1652 const op_location_t &. Warn for macro expansions if
1653 spelled_the_same_p. Use binary_op_rich_location.
1655 2018-12-19 David Malcolm <dmalcolm@redhat.com>
1659 * c-common.c (unsafe_conversion_p): Fold any location wrapper.
1660 (verify_tree): Handle location wrappers.
1661 (c_common_truthvalue_conversion): Strip any location wrapper.
1663 (fold_offsetof): Strip any location wrapper.
1664 (complete_array_type): Likewise for initial_value.
1665 (convert_vector_to_array_for_subscript): Call fold_for_warn on the
1666 index before checking for INTEGER_CST.
1667 * c-pretty-print.c (c_pretty_printer::primary_expression): Don't
1668 print parentheses around location wrappers.
1669 * c-warn.c (warn_logical_operator): Call fold_for_warn on op_right
1670 before checking for INTEGER_CST.
1671 (warn_tautological_bitwise_comparison): Call
1672 tree_strip_any_location_wrapper on lhs, rhs, and bitop's operand
1673 before checking for INTEGER_CST.
1674 (readonly_error): Strip any location wrapper.
1675 (warn_array_subscript_with_type_char): Strip location wrappers
1676 before checking for INTEGER_CST. Use the location of the index if
1679 2018-12-06 Jason Merrill <jason@redhat.com>
1681 PR c++/88136 - -Wdeprecated-copy false positives
1682 * c.opt (Wdeprecated-copy-dtor): New.
1683 (Wdeprecated-copy): Move to -Wextra.
1685 2018-11-29 Martin Sebor <msebor@redhat.com>
1689 * c-attribs.c (common_handle_aligned_attribute): Silently avoid setting
1690 alignments to values less than the target requires.
1691 (has_attribute): For attribute aligned consider both the attribute
1692 and the alignment bits.
1693 * c-common.c (c_init_attributes): Optionally issue a warning for
1696 2018-11-28 Martin Sebor <msebor@redhat.com>
1700 * c-warn.c (sizeof_pointer_memaccess_warning): Bail if source
1701 or destination is an error.
1703 2018-11-28 Jakub Jelinek <jakub@redhat.com>
1706 * c-ubsan.c: Include langhooks.h.
1707 (ubsan_instrument_division): Change gcc_assert that main variants
1708 of op0 and op1 types are equal to gcc_checking_assert that the
1709 main variants are compatible types.
1711 2018-11-27 Eric Botcazou <ebotcazou@adacore.com>
1713 * c-ada-spec.c: Include stringpool.h.
1714 (has_static_fields): Return false for incomplete types.
1715 (is_tagged_type): Likewise.
1716 (has_nontrivial_methods): Likewise.
1717 (dump_ada_node) <INTEGER_TYPE>: Deal specifically with __int128.
1718 (struct overloaded_name_hash): New structure.
1719 (struct overloaded_name_hasher): Likewise.
1720 (overloaded_names): New global variable.
1721 (init_overloaded_names): New static function.
1722 (overloaded_name_p): New predicate.
1723 (dump_ada_declaration) <TYPE_DECL>: Tidy up and set TREE_VISITED
1724 on the TYPE_STUB_DECL of the original type of a typedef, if any.
1725 <FUNCTION_DECL>: Bail out for an unsupported overloaded name.
1726 Remove always-true condition and dump forward types.
1727 (dump_ada_specs): Delete overloaded_names.
1729 2018-11-20 Martin Sebor <msebor@redhat.com>
1731 * c-attribs.c (type_for_vector_size): New function.
1732 (type_valid_for_vector_size): Same.
1733 (handle_vector_size_attribute): Move code to the functions above
1735 (validate_attribute, has_attribute): New functions.
1736 * c-common.h (has_attribute): Declare.
1737 (rid): Add RID_HAS_ATTRIBUTE_EXPRESSION.
1738 * c-common.c (c_common_resword): Same.
1740 2018-11-16 Jason Merrill <jason@redhat.com>
1742 * c-lex.c (c_common_has_attribute): Handle likely/unlikely.
1743 * c-attribs.c (attr_cold_hot_exclusions): Make public.
1745 2018-11-16 Jakub Jelinek <jakub@redhat.com>
1748 * c-common.c (fix_string_type): Reject string literals larger than
1749 TYPE_MAX_VALUE (ssizetype) bytes.
1751 2018-11-15 Martin Sebor <msebor@redhat.com>
1755 * c-attribs.c (positional_argument): New function.
1756 (handle_alloc_size_attribute): Use it and simplify.
1757 (handle_alloc_align_attribute): Same.
1758 (handle_assume_aligned_attribute): Same.
1759 (handle_nonnull_attribute): Same.
1760 * c-common.c (check_function_arguments): Pass fntype to
1761 check_function_format.
1762 * c-common.h (check_function_format): Add an argument.
1763 (PosArgFlags, positional_argument): Declare new type and function.
1764 * c-format.c (decode_format_attr): Add arguments.
1765 (check_format_string, get_constant): Same.
1766 (convert_format_name_to_system_name): Adjust.
1768 2018-11-15 David Malcolm <dmalcolm@redhat.com>
1771 * c-opts.c (c_diagnostic_finalizer): Add diagnostic_t param.
1773 2018-11-14 Jakub Jelinek <jakub@redhat.com>
1775 P1236R1 - Signed integers are two's complement
1776 * c-warn.c (maybe_warn_shift_overflow): Don't warn for c++2a.
1777 * c-ubsan.c (ubsan_instrument_shift): Make signed shifts
1778 with in-range second operand well defined for -std=c++2a.
1781 * c-common.c (parse_optimize_options): Allocate option string from
1782 opts_obstack rather than as GC memory. Move the allocation after
1783 warning for invalid option.
1785 2018-11-13 David Malcolm <dmalcolm@redhat.com>
1787 * c-common.c (c_get_substring_location): Update for renaming of
1788 get_source_location_for_substring to get_location_within_string.
1789 * c-lex.c: Replace "source_location" with "location_t".
1790 * c-opts.c: Likewise.
1791 * c-ppoutput.c: Likewise.
1793 2018-11-13 Martin Sebor <msebor@redhat.com>
1796 * c-attribs.c (handle_copy_attribute): Exclude inlining attributes.
1797 (handle_tls_model_attribute): Improve diagnostics.
1799 2018-11-12 Jason Merrill <jason@redhat.com>
1801 * c-cppbuiltin.c (c_cpp_builtins): Define
1802 __cpp_impl_destroying_delete.
1804 * c-cppbuiltin.c (c_cpp_builtins): Change __cpp_explicit_bool to
1805 __cpp_conditional_explicit.
1807 2018-11-09 Martin Sebor <msebor@redhat.com>
1810 * c-attribs.c (handle_copy_attribute): New function.
1812 2018-11-09 Martin Sebor <msebor@redhat.com>
1815 * c-common.c (check_user_alignment): Use MAX_OFILE_ALIGNMENT.
1817 2018-11-08 Jakub Jelinek <jakub@redhat.com>
1819 * c-common.h (c_finish_omp_taskgroup): Add CLAUSES argument.
1820 (c_finish_omp_atomic): Replace bool SEQ_CST argument with
1821 enum omp_memory_order MEMORY_ORDER.
1822 (c_finish_omp_flush): Add MO argument.
1823 (c_omp_depend_t_p, c_finish_omp_depobj): Declare.
1824 (c_finish_omp_for): Add FINAL_P argument.
1825 * c-omp.c: Include memmodel.h.
1826 (c_finish_omp_taskgroup): Add CLAUSES argument. Set
1827 OMP_TASKGROUP_CLAUSES to it.
1828 (c_finish_omp_atomic): Replace bool SEQ_CST argument with
1829 enum omp_memory_order MEMORY_ORDER. Set OMP_ATOMIC_MEMORY_ORDER
1830 instead of OMP_ATOMIC_SEQ_CST.
1831 (c_omp_depend_t_p, c_finish_omp_depobj): New functions.
1832 (c_finish_omp_flush): Add MO argument, if not MEMMODEL_LAST, emit
1833 __atomic_thread_fence call with the given value.
1834 (check_omp_for_incr_expr): Formatting fixes.
1835 (c_finish_omp_for): Add FINAL_P argument. Allow NE_EXPR
1836 even in OpenMP loops, diagnose if NE_EXPR and incr expression
1837 is not constant expression 1 or -1. Transform NE_EXPR loops
1838 with iterators pointers to VLA into LT_EXPR or GT_EXPR loops.
1839 (c_omp_check_loop_iv_r): Look for orig decl of C++ range for
1841 (c_omp_split_clauses): Add support for combined
1842 #pragma omp parallel master and
1843 #pragma omp {,parallel }master taskloop{, simd} constructs.
1844 Handle OMP_CLAUSE_IN_REDUCTION. Handle OMP_CLAUSE_REDUCTION_TASK.
1845 Handle OMP_CLAUSE_NONTEMPORAL. Handle splitting OMP_CLAUSE_IF
1846 also to OMP_SIMD. Copy OMP_CLAUSE_LASTPRIVATE_CONDITIONAL.
1847 (c_omp_predetermined_sharing): Don't return
1848 OMP_CLAUSE_DEFAULT_SHARED for const qualified decls.
1849 * c-pragma.c (omp_pragmas): Add PRAGMA_OMP_DEPOBJ and
1850 PRAGMA_OMP_REQUIRES.
1851 * c-pragma.h (enum pragma_kind): Likewise.
1852 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_NONTEMPORAL
1853 and PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
1855 2018-11-08 David Malcolm <dmalcolm@redhat.com>
1857 * c-format.c (gcc_dump_printf_char_table): Add entry for %f.
1859 2018-11-08 David Malcolm <dmalcolm@redhat.com>
1861 * c-format.c (local_cgraph_node_ptr_node): New variable.
1862 (gcc_dump_printf_char_table): Add entry for %C.
1863 (get_pointer_to_named_type): New function, taken from the handling
1864 code for "gimple *" from...
1865 (init_dynamic_diag_info): ...here. Add handling for
1867 * c-format.h (T_CGRAPH_NODE): New.
1869 2018-10-19 Jason Merrill <jason@redhat.com>
1871 * c-cppbuiltin.c (c_cpp_builtins): Add
1872 __cpp_nontype_template_parameter_class.
1874 2018-10-31 Nathan Sidwell <nathan@acm.org>
1876 * c-opts.c (c_finish_options): Force command line macro
1877 location. Refactor to avoid repeating main debug hook.
1878 (push_command_line_include): Clarify comment.
1880 * c-opts.c (c_finish_options): Adjust cpp_force_token_locations call.
1882 2018-10-30 Martin Sebor <msebor@redhat.com>
1885 * c-format.c (check_format_types): Avoid diagnosing null pointer
1886 arguments to printf-family of functions.
1888 2018-10-30 Marek Polacek <polacek@redhat.com>
1890 Implement P0892R2, explicit(bool).
1891 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_explicit_bool.
1893 2018-10-29 David Malcolm <dmalcolm@redhat.com>
1895 * name-hint.h (name_hint::take_deferred): New member function.
1897 2018-10-29 David Malcolm <dmalcolm@redhat.com>
1900 * c-common.c (check_function_sentinel): Call fold_for_warn on the
1902 (check_function_restrict): Rename param "argarray" to
1903 "unfolded_argarray", and make a copy named "argarray", calling
1904 fold_for_warn on each argument.
1905 (check_function_arguments): Add note about responsibility for
1906 folding the arguments.
1908 2018-10-17 Joseph Myers <joseph@codesourcery.com>
1910 * c-common.c (flag_isoc2x): New variable.
1911 * c-common.h (clk_c): Update comment to reference C2X.
1912 (flag_isoc99, flag_isoc11): Update comments to reference future
1913 standard versions in general.
1914 (flag_isoc2x): Declare.
1915 * c-opts.c (set_std_c2x): New function.
1916 (c_common_handle_option): Handle -std=c2x and -std=gnu2x.
1917 (set_std_c89, set_std_c99, set_std_c11, set_std_c17): Set
1919 * c.opt (Wc11-c2x-compat, std=c2x, std=gnu2x): New options.
1921 2018-10-17 Joseph Myers <joseph@codesourcery.com>
1923 * c.opt (std=c17, std=c18, std=gnu17, std=gnu18, std=iso9899:2017)
1924 (std=iso9899:2018): Document C17 as published in 2018.
1926 2018-10-12 Christophe Lyon <christophe.lyon@linaro.org>
1929 * c-pretty-print.c (c_pretty_printer::constant): Fix typo.
1931 2018-10-11 Will Wray <wjwray@gmail.com>
1934 * c-pretty-print.h (pp_c_type_cast): Prototype.
1935 (pp_c_integer_constant): Likewise.
1936 * c-pretty-print.c (pp_c_type_cast): No longer static.
1937 (pp_c_integer_constant): Likewise.
1938 (pp_c_enumeration_constant): Fix loop termination when finding
1939 name of constant. No longer returns a value. Call
1940 pp_c_integer_constant.
1941 (c_pretty_printer::constant): Update for changes to
1942 pp_c_enumeration_constant.
1944 2018-10-11 Jakub Jelinek <jakub@redhat.com>
1946 * c-lex.c (c_common_has_attribute): Return 201803 instead of 20180312
1947 for no_unique_address.
1949 2018-10-09 David Malcolm <dmalcolm@redhat.com>
1951 * c-common.c (c_option_controlling_cpp_error): Rename to...
1952 (c_option_controlling_cpp_diagnostic): ...this, and convert
1953 "reason" from int to enum.
1954 (c_cpp_error): Rename to...
1955 (c_cpp_diagnostic): ...this, converting level and reason to enums.
1956 * c-common.h (c_cpp_error): Rename to...
1957 (c_cpp_diagnostic): ...this, converting level and reason to enums.
1958 * c-opts.c (c_common_init_options): Update for renaming.
1960 2018-10-08 Richard Sandiford <richard.sandiford@arm.com>
1963 * c-common.c (vector_types_compatible_elements_p): Use
1964 INTEGRAL_TYPE_P instead of checking only for INTEGER_TYPE.
1966 2018-10-04 Vinay Kumar <vinay.kumar@blackfigtech.com>
1968 * c-attribs.c (get_priority): Add a warning flag warn_prio_ctor_dtor
1969 to generate constructor destructor priority warning.
1970 * c.opt (-Wprio-ctor-dtor): New option.
1972 2018-10-01 Jason Merrill <jason@redhat.com>
1974 * c-lex.c (c_common_has_attribute): Add no_unique_address.
1976 2018-10-01 Eric Botcazou <ebotcazou@adacore.com>
1978 * c-ada-spec.c (get_underlying_decl): Get to the main type variant.
1979 (dump_ada_node): Add const keyword.
1981 2018-09-25 Martin Liska <mliska@suse.cz>
1983 * c-common.c (c_common_truthvalue_conversion):
1984 Remove Pascal from documentation.
1986 2018-09-21 Eric Botcazou <ebotcazou@adacore.com>
1988 * c-ada-spec.c: Include diagnostic.h.
1989 (dump_ada_declaration) <RECORD_TYPE>: Issue a warning on packed layout.
1991 2018-09-19 Marek Polacek <polacek@redhat.com>
1993 * c.opt (Wclass-conversion): New.
1995 2018-09-17 David Malcolm <dmalcolm@redhat.com>
1997 * c-format.c (range_label_for_format_type_mismatch::get_text):
1998 Update for new param.
2000 2018-09-17 David Malcolm <dmalcolm@redhat.com>
2002 * c-format.c (format_warning_at_char): Update for introduction of
2003 format_string_diagnostic_t.
2004 (format_type_warning): Likewise.
2006 2018-09-17 Martin Jambor <mjambor@suse.cz>
2009 * c.opt (Wabsolute-value): New.
2011 2018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
2013 * c-common.c (complete_flexible_array_elts): New helper function.
2014 * c-common.h (complete_flexible_array_elts): Declare.
2016 2018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
2018 * c-common.c (braced_list_to_string): Remove eval parameter.
2019 Add some more checks. Always create zero-terminated STRING_CST.
2020 * c-common.h (braced_list_to_string): Adjust prototype.
2022 2018-08-27 David Malcolm <dmalcolm@redhat.com>
2025 * c-common.c (c_cpp_error): Update for conversion of show_caret_p
2027 (maybe_suggest_missing_token_insertion): Likewise.
2028 (maybe_add_include_fixit): Add param "override_location". If set,
2029 and source-printing is enabled, then override the rich_location's
2030 primary location with that of the insertion point for the fix-it
2031 hint, marking it with SHOW_LINES_WITHOUT_RANGE.
2032 * c-common.h (extern void maybe_add_include_fixit): Add bool
2034 * c-format.c (selftest::test_type_mismatch_range_labels): Update
2035 for conversion of show_caret_p to a tri-state.
2036 * c-warn.c (warn_for_restrict): Likewise.
2038 (suggest_missing_header::~suggest_missing_header): Update call to
2039 maybe_add_include_fixit to suggest overriding the location, as it
2042 2018-08-27 Martin Liska <mliska@suse.cz>
2044 * c-common.c (check_function_restrict): Use new function
2045 fndecl_built_in_p and remove check for FUNCTION_DECL if
2047 (check_builtin_function_arguments): Likewise.
2048 (reject_gcc_builtin): Likewise.
2049 * c-warn.c (sizeof_pointer_memaccess_warning): Likewise.
2051 2018-08-26 Marek Polacek <polacek@redhat.com>
2053 PR c++/87029, Implement -Wredundant-move.
2054 * c.opt (Wredundant-move): New option.
2056 2018-08-21 Marek Polacek <polacek@redhat.com>
2058 PR c++/86981, Implement -Wpessimizing-move.
2059 * c.opt (Wpessimizing-move): New option.
2061 2018-08-20 David Malcolm <dmalcolm@redhat.com>
2064 * c-attribs.c (common_handle_aligned_attribute): Add
2065 auto_diagnostic_group instance.
2066 * c-indentation.c (warn_for_misleading_indentation): Likewise.
2067 * c-opts.c (c_common_post_options): Likewise.
2068 * c-warn.c (warn_logical_not_parentheses): Likewise.
2069 (warn_duplicated_cond_add_or_warn): Likewise.
2070 (warn_for_multistatement_macros): Likewise.
2072 2018-08-20 Nathan Sidwell <nathan@acm.org>
2074 * c-ada-spec.c (macro_length, dump_ada_macros): Adjust macro parm
2077 2018-08-17 Nathan Sidwell <nathan@acm.org>
2079 * c-cppbuiltin.c (struct lazy_hex_fp_value_struct): Remove macro
2081 (laxy_hex_fp_value_count): Make unsigned.
2082 (lazy_hex_fp_value): Provided with macro & lazy number. Directly
2083 manipulate the macro.
2084 (builtin_defin_with_hex_fp_value): Adjust callback name, use
2087 2018-08-17 David Malcolm <dmalcolm@redhat.com>
2089 * c-format.c (enum format_type): Add gcc_dump_printf_format_type.
2090 (gcc_dump_printf_length_specs): New.
2091 (gcc_dump_printf_flag_pairs): New.
2092 (gcc_dump_printf_flag_specs): New.
2093 (gcc_dump_printf_char_table): New.
2094 (format_types_orig): Add entry for "gcc_dump_printf".
2095 (init_dynamic_diag_info): Set up length_char_specs and
2096 conversion_specs for gcc_dump_printf_format_type.
2097 (handle_format_attribute): Handle gcc_dump_printf_format_type.
2099 2018-08-17 Nathan Sidwell <nathan@acm.org>
2101 * c-ada-spec.c (macro_length, dump_ada_macros): Constify.
2103 * c-ada-spec.c: Don't #include "cpp-id-data.h"
2104 * c-cppbuiltin.c: Likewise.
2106 2018-08-17 Martin Liska <mliska@suse.cz>
2108 * c.opt: Remove Warn, Init and Report for options with
2109 Ignore/Deprecated flag. Warning is done automatically for
2112 2018-08-16 David Malcolm <dmalcolm@redhat.com>
2115 * c-common.c (selftest::c_family_tests): Call
2116 selftest::c_indentation_c_tests.
2117 * c-common.h (selftest::c_indentation_c_tests): New decl.
2118 * c-indentation.c: Include "selftest.h".
2119 (next_tab_stop): Add "tab_width" param, rather than accessing
2121 (get_visual_column): Likewise. Clarify comment. Bulletproof
2122 against reading past the end of the line.
2123 (get_first_nws_vis_column): Add "tab_width" param.
2124 (detect_intervening_unindent): Likewise.
2125 (should_warn_for_misleading_indentation): Read tab width from
2126 cpp_opts and pass around.
2127 (selftest::test_next_tab_stop): New test.
2128 (selftest::assert_get_visual_column_succeeds): New function.
2129 (ASSERT_GET_VISUAL_COLUMN_SUCCEEDS): New macro.
2130 (selftest::assert_get_visual_column_fails): New function.
2131 (ASSERT_GET_VISUAL_COLUMN_FAILS): New macro.
2132 (selftest::test_get_visual_column): New test.
2133 (selftest::c_indentation_c_tests): New function.
2135 2018-08-16 Nathan Sidwell <nathan@acm.org>
2137 * c-ada-spec.c (count_ada_macro): Use cpp_user_macro_p.
2138 (store_ada_macro): Likewise.
2139 * c-ppoutput.c (cb_used_define, dump_macro): Likewise.
2140 * c-spellcheck.cc (should-suggest_as_macro_p): Likewise,
2142 2018-08-15 David Malcolm <dmalcolm@redhat.com>
2144 * c-format.c: Include "selftest-diagnostic.h" and
2145 "gcc-rich-location.h".
2146 (format_warning_at_char): Pass NULL for new label params of
2148 (class indirection_suffix): New class.
2149 (class range_label_for_format_type_mismatch): New class.
2150 (format_type_warning): Move logic for generating "*" suffix to
2151 class indirection_suffix. Create "fmt_label" and "param_label"
2152 to show their types, and pass them to the
2153 format_warning_at_substring calls.
2154 (selftest::test_type_mismatch_range_labels): New test.
2155 (selftest::c_format_c_tests): Call it.
2157 2018-08-13 Martin Sebor <msebor@redhat.com>
2159 PR tree-optimization/71625
2160 * c-common.c (braced_list_to_string): New function.
2161 * c-common.h (braced_list_to_string): Declare it.
2163 2018-08-08 Nathan Sidwell <nathan@acm.org>
2165 * c-common.c (try_to_locate_new_include_inertion_point): Use
2166 linemap_included_from_linemap.
2167 * c-lex.c (fe_file_change): Use linemap_included_from.
2168 * c-ppoutput.c (pp_file_change): Likewise.
2170 2018-08-01 Martin Sebor <msebor@redhat.com>
2172 PR tree-optimization/86650
2173 * c-format.c (gcc_tdiag_char_table): Update comment for "%G".
2174 (gcc_cdiag_char_table, gcc_cxxdiag_char_table): Same.
2175 (init_dynamic_diag_info): Update from "gcall *" to "gimple *".
2176 * c-format.h (T89_G): Update to be "gimple *" rather than
2178 (local_gcall_ptr_node): Rename...
2179 (local_gimple_ptr_node): ...to this.
2181 2018-07-31 David Malcolm <dmalcolm@redhat.com>
2183 * c-format.c (PP_FORMAT_CHAR_TABLE): New macro, based on existing
2184 table entries for gcc_diag_char_table, and the 'Z' entry from
2185 gcc_tdiag_char_table, changing the "chain" entry for 'Z' from
2186 &gcc_tdiag_char_table[0] to &gcc_diag_char_table[0].
2187 (gcc_diag_char_table): Use PP_FORMAT_CHAR_TABLE, implicitly
2188 adding missing "Z" for this table. Remove erroneous "G" and "K"
2190 (gcc_tdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
2191 (gcc_cdiag_char_table): Use PP_FORMAT_CHAR_TABLE.
2192 (gcc_cxxdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
2194 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
2196 * c-common.c (speculation_safe_resolve_call): New function.
2197 (speculation_safe_resolve_params): New function.
2198 (speculation_safe_resolve_return): New function.
2199 (resolve_overloaded_builtin): Handle __builtin_speculation_safe_value.
2200 * c-cppbuiltin.c (c_cpp_builtins): Add pre-define for
2201 __HAVE_SPECULATION_SAFE_VALUE.
2203 2018-07-20 David Malcolm <dmalcolm@redhat.com>
2205 * c-common.c (c_cpp_error): Remove redundant "line_table"
2206 parameter from call to rich_location::set_range.
2207 (maybe_suggest_missing_token_insertion): Likewise.
2209 2018-07-20 Martin Sebor <msebor@redhat.com>
2212 * c.opt (-Warray-bounds): Remove redundant -Wall.
2214 2018-07-20 Martin Sebor <msebor@redhat.com>
2217 * c-common.h (c_common_handle_option): Change function argument
2219 * c-opts.c (c_common_init_options): Same.
2220 (c_common_handle_option): Same. Remove special handling of
2221 OPT_Walloca_larger_than_ and OPT_Wvla_larger_than_.
2222 * c.opt (-Walloc-size-larger-than, -Walloca-larger-than): Change
2223 options to take a HOST_WIDE_INT argument and accept a byte-size
2225 (-Wvla-larger-than): Same.
2226 (-Wno-alloc-size-larger-than, -Wno-alloca-larger-than): New.
2227 (-Wno-vla-larger-than): Same.
2229 2018-07-12 Jakub Jelinek <jakub@redhat.com>
2231 * c-attribs.c (c_common_attribute_table): Add
2232 "omp declare target implicit" attribute.
2234 2018-07-12 Richard Biener <rguenther@suse.de>
2237 * c-attribs.c (handle_packed_attribute): Do not build a variant
2238 type with TYPE_PACKED, instead ignore the attribute if we may
2239 not apply to the original type.
2241 2018-07-10 Jakub Jelinek <jakub@redhat.com>
2244 * c-omp.c (c_omp_check_loop_iv_r, c_omp_check_loop_iv): Allow declv
2245 to contain TREE_LIST for both the original class iterator and the
2248 2018-07-07 Eric Botcazou <ebotcazou@adacore.com>
2250 * c-ada-spec.c (to_ada_name): Remove index parameter.
2251 (pp_ada_tree_identifier): Likewise.
2252 (dump_ada_macros): Adjust call to to_ada_name.
2253 (struct overloaded_name_hash): Delete.
2254 (struct overloaded_name_hasher): Likewise.
2255 (overloaded_names): Likewise.
2256 (compute_overloading_index): Likewise.
2257 (dump_ada_decl_name): Do not call compute_overloading_index and
2258 adjust calls to pp_ada_tree_identifier.
2259 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
2260 (dump_ada_import): Add spc parameter and switch to aspect syntax.
2261 (dump_ada_function_declaration): Adjust call to pp_ada_tree_identifier.
2262 (dump_ada_enum_type): Remove type and display_convention parameters.
2263 Adjust calls to pp_ada_tree_identifier.
2264 (dump_ada_node): Likewise and for dump_ada_structure.
2265 (dump_nested_type) <ENUMERAL_TYPE>: Adjust call to dump_ada_enum_type
2267 <RECORD_TYPE>: Adjust call to dump_ada_structure and switch to aspect
2269 (print_constructor): Adjust call to pp_ada_tree_identifier.
2270 (print_destructor): Likewise.
2271 (dump_ada_declaration): Switch to aspect syntax.
2272 (dump_ada_structure): Likewise and tidy up. Replace display_convention
2273 parameter with nested parameter.
2274 (dump_ads): Emit pragma Ada_2012 in lieu of pragma Ada_2005.
2275 (dump_ada_specs): Do not delete overloaded_names table.
2277 2018-07-06 Peter Bergner <bergner@linux.ibm.com>
2280 * c-attribs.c (handle_mode_attribute): Call translate_mode_attribute
2283 2018-07-05 Nathan Sidwell <nathan@acm.org>
2285 * c-lex.c (fe_file_change): Check SYSTEM_IMPLICIT_EXTERN_C not
2286 NO_IMPLICIT_EXTERN_C.
2288 2018-06-28 Martin Liska <mliska@suse.cz>
2290 * cppspec.c: Include opt-suggestions.h.
2292 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
2293 Thomas Schwinge <thomas@codesourcery.com>
2294 Cesar Philippidis <cesar@codesourcery.com>
2296 * c-pragma.h (enum pragma_omp_clause): Add
2297 PRAGMA_OACC_CLAUSE_{FINALIZE,IF_PRESENT}. Remove
2298 PRAGMA_OACC_CLAUSE_PRESENT_OR_{COPY,COPYIN,COPYOUT,CREATE}.
2300 2018-06-20 Jakub Jelinek <jakub@redhat.com>
2303 * c-common.c (check_nonnull_arg): Use fold_for_warn. Adjust obsolete
2306 2018-06-18 Martin Sebor <msebor@redhat.com>
2309 * c-warn.c (sizeof_pointer_memaccess_warning): Check for attribute
2312 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
2314 * c-common.c (c_common_truthvalue_conversion): Handle ABSU_EXPR.
2316 2018-06-13 Jason Merrill <jason@redhat.com>
2318 * c-opts.c (c_common_post_options): Warn about useless -Wabi.
2319 (c_common_handle_option) [OPT_Wabi_]: Remove flag_abi_compat_version
2322 PR c++/86094 - wrong code with defaulted move ctor.
2323 * c-opts.c (c_common_post_options): Bump the current ABI version to
2324 13. Set warn_abi_version and flag_abi_compat_version to the current
2325 version rather than 0. Fix defaulting flag_abi_compat_version from
2328 2018-06-12 Martin Sebor <msebor@redhat.com>
2331 * c-warn.c (sizeof_pointer_memaccess_warning): Avoid warning when
2332 sizeof source and destination yields the same value.
2334 2018-06-12 Martin Liska <mliska@suse.cz>
2336 * c.opt: Make MPX-related options as Deprecated.
2338 2018-06-08 David Malcolm <dmalcolm@redhat.com>
2340 * c-pretty-print.c (c_pretty_printer::statement): Use TDF_NONE
2343 2018-06-08 Martin Liska <mliska@suse.cz>
2345 * c-attribs.c (handle_bnd_variable_size_attribute): Remove support
2346 for MPX (macros, related functions, fields in cgraph_node, ...).
2347 (handle_bnd_legacy): Likewise.
2348 (handle_bnd_instrument): Likewise.
2351 2018-06-06 Jakub Jelinek <jakub@redhat.com>
2354 * c-cppbuiltin.c (c_cpp_builtins): Fix a typo, set
2355 __cpp_transactional_memory to 201500 instead of 210500.
2357 2018-06-06 Jason Merrill <jason@redhat.com>
2359 PR c++/85710 - ICE with -Wmemset-elt-size.
2360 * c-warn.c (warn_for_memset): Don't crash on incomplete element type.
2362 2018-06-01 Jason Merrill <jason@redhat.com>
2364 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_deduction_guides to
2367 2018-06-01 Eric Botcazou <ebotcazou@adacore.com>
2369 * c-ada-spec.c (dump_ada_declaration) <TYPE_DECL>: Generate a forward
2370 declaration for a typedef independently of whether the declaration of
2371 the subtype is generated.
2373 2018-05-31 Martin Sebor <msebor@redhat.com>
2376 * c.opt (-Wno-alloc-size-larger-than): New option.
2378 2018-04-22 David Pagan <dave.pagan@oracle.com>
2381 * c-opts.c (c_common_post_options): Set default for warn_return_type
2382 for C++/C++ with ObjC extensions only. For C, makes it possible to
2383 differentiate between default (no option), -Wreturn-type, and
2386 2018-05-29 Jason Merrill <jason@redhat.com>
2388 * c.opt (Winit-list-lifetime): New flag.
2390 2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
2392 * c-lex.c (get_fileinfo): Use splay_tree_compare_strings and
2393 splay_tree_delete_pointers.
2395 2018-05-26 Jakub Jelinek <jakub@redhat.com>
2398 * c-warn.c (diagnose_mismatched_attributes): Remove unnecessary
2399 noinline variable to workaround broken kernel headers.
2401 2018-05-18 Jason Merrill <jason@redhat.com>
2403 * c.opt (Wdeprecated-copy): New flag.
2405 2018-05-17 Martin Liska <mliska@suse.cz>
2407 * c-warn.c (overflow_warning): Do not use
2408 space in between 'G_' and '('.
2410 2018-05-09 Jason Merrill <jason@redhat.com>
2412 * c-common.c (valid_array_size_p): Add complain parameter.
2413 * c-common.h: ...which defaults to true.
2415 2018-05-11 Jakub Jelinek <jakub@redhat.com>
2418 * c-omp.c (c_omp_predetermined_sharing): Return
2419 OMP_CLAUSE_DEFAULT_SHARED for artificial vars with integral type.
2421 2018-05-11 Martin Liska <mliska@suse.cz>
2424 * c-attribs.c (handle_no_sanitize_attribute): Iterate all
2427 2018-05-10 Jakub Jelinek <jakub@redhat.com>
2430 * c-common.h (fold_offsetof_1): Removed.
2431 (fold_offsetof): Add TYPE argument defaulted to size_type_node and
2432 CTX argument defaulted to ERROR_MARK.
2433 * c-common.c (fold_offsetof_1): Renamed to ...
2434 (fold_offsetof): ... this. Remove wrapper function. Add TYPE
2435 argument, convert the pointer constant to TYPE and use size_binop
2436 with PLUS_EXPR instead of fold_build_pointer_plus if type is not
2437 a pointer type. Adjust recursive calls.
2439 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
2442 * c-attribs.c (handle_visibility_attribute): Do not set no_add_attrs.
2444 2018-05-07 Nathan Sidwell <nathan@acm.org>
2446 * c.opt (ffor-scope): Remove functionality, issue warning.
2448 2018-05-03 Nathan Sidwell <nathan@acm.org>
2450 * c.opt (ffriend-injection): Remove functionality, issue warning.
2452 2018-05-01 David Malcolm <dmalcolm@redhat.com>
2455 * c-format.c (struct format_check_results): Add field
2457 (check_format_info): Initialize it, and warn if encountered.
2458 (check_format_arg): Distinguish between wide char and
2459 everything else when detecting arrays of non-char.
2461 2018-04-30 David Malcolm <dmalcolm@redhat.com>
2463 * c-format.c (get_corrected_substring): Update for
2464 location_get_source_line returning a char_span. Use a char_span
2465 when handling the prefix of the correction.
2466 * c-indentation.c (get_visual_column): Update for
2467 location_get_source_line returning a char_span.
2468 (get_first_nws_vis_column): Likewise.
2470 2018-03-29 David Malcolm <dmalcolm@redhat.com>
2473 * known-headers.cc (get_stdlib_header_for_name): Add various names
2474 from <assert.h>, <string.h>, and <memory.h>; add more names from
2477 2018-03-27 Jakub Jelinek <jakub@redhat.com>
2480 * c-common.c (fold_offsetof_1) <case COMPOUND_EXPR>: Assert that
2481 get_base_address of the second operand is a VAR_P, rather than the
2482 operand itself, and use gcc_checking_assert instead of gcc_assert.
2484 2018-03-23 Marek Polacek <polacek@redhat.com>
2487 * c-pretty-print.c (c_pretty_printer::multiplicative_expression)
2488 <case RDIV_EXPR>: Tweak condition.
2490 2018-03-20 Eric Botcazou <ebotcazou@adacore.com>
2492 * c-ada-spec.c (pp_ada_tree_identifier): Deal specifically with _Bool.
2494 2018-03-16 Jakub Jelinek <jakub@redhat.com>
2497 * c-warn.c (conversion_warning): Replace "to to" with "to" in
2501 * c-warn.c (diagnose_mismatched_attributes): Remove trailing space from
2504 2018-03-16 Richard Biener <rguenther@suse.de>
2507 * c-gimplify.c (c_gimplify_expr): Revert previous change. Instead
2508 unshare the possibly folded expression.
2510 2018-03-15 Richard Biener <rguenther@suse.de>
2513 * c-gimplify.c (c_gimplify_expr): Do not fold expressions.
2515 2018-03-13 Martin Sebor <msebor@redhat.com>
2517 PR tree-optimization/84725
2518 * c-attribs.c (handle_nonstring_attribute): Allow attribute nonstring
2519 with all three narrow character types, including their qualified forms.
2521 2018-03-12 Martin Sebor <msebor@redhat.com>
2523 PR tree-optimization/83456
2524 * c-common.c (check_function_restrict): Return bool.
2525 Restore checking of bounded built-in functions.
2526 (check_function_arguments): Also return the result
2527 of warn_for_restrict.
2528 * c-common.c (check_function_restrict): Return bool.
2529 * c-warn.c (warn_for_restrict): Return bool.
2531 2018-03-02 Marek Polacek <polacek@redhat.com>
2534 * c-warn.c (warn_for_sign_compare): Bail out if any of the operands
2537 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
2539 * c-attribs.c (c_common_attribute_table): Remove "cilk simd
2542 2018-03-01 Marek Polacek <polacek@redhat.com>
2545 * c-attribs.c (common_handle_aligned_attribute): Don't use invalid
2546 alignment in computation.
2548 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
2550 * c-ada-spec.c (dump_ada_node) <NULLPTR_TYPE>: New case.
2551 <REAL_TYPE>: Deal specifically with _Float128/__float128.
2553 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
2555 * c-ada-spec.c (dump_ada_double_name) <ENUMERAL_TYPE>: New case.
2556 (is_char_array): Take a type instead of a declaration.
2557 (dump_ada_array_type): Likewise.
2558 (is_simple_enum): Minor tweak.
2559 (dump_ada_enum_type): New function extracted from...
2560 (dump_ada_node) <ENUMERAL_TYPE>: ...here. Invoke it.
2561 <INTEGER_TYPE>: Remove unreachable code.
2562 <RECORD_TYPE>: Likewise. Minor tweaks.
2563 (dump_nested_type) <ARRAY_TYPE>: Adjust to above changes.
2564 <ENUMERAL_TYPE>: New case.
2565 <RECORD_TYPE>: Factor out common code.
2566 (dump_ada_declaration) <ARRAY_TYPE>: Adjust to above changes.
2567 Minor tweaks. Deal with enumeral types.
2568 (dump_ada_structure): Minor tweaks.
2570 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
2572 * c-ada-spec.c (dump_ada_node) <POINTER_TYPE>: Do not use generic
2573 address for incomplete structures.
2574 (dump_forward_type): Do not bail out for incomplete structures.
2575 (dump_ada_declaration): Do not special-case incomplete structures
2576 for subtypes. Dump them as null records for types.
2578 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
2580 * c-ada-spec.c (dump_ada_import): Use boolean and fix formatting.
2581 (is_char_array): Fix formatting.
2582 (dump_template_types): Likewise.
2583 (dump_generic_ada_node): Rename into...
2584 (dump_ada_node): ...this.
2585 <POINTER_TYPE>: Remove superfluous space. Use generic address for
2586 incomplete structures and not for empty structures. Do not use it
2587 when forward declarations are needed.
2588 (dump_forward_type): New function.
2589 (dump_nested_types): Remove FORWARD parameter. Do not consider
2590 TREE_VISITED and do not generate a forward declaration. Only dump
2591 original nested types for nested declaration.
2592 (dump_nested_type) <POINTER_TYPE>: Call dump_forward_type.
2593 <ARRAY_TYPE>: Likewise if the component type is an anonymous pointer.
2594 <RECORD_TYPE>: Do not consider TREE_VISITED.
2595 (dump_ada_declaration): Use booleans and fix formatting throughout.
2596 <TYPE_DECL>: Skip incomplete structures and not empty structures.
2597 Call dump_forward_type instead of dump_nested_types for a typedef.
2598 Remove superfluous check and adjust call to dump_nested_types.
2599 <POINTER_TYPE>: Call dump_forward_type and fall through.
2600 (dump_ada_struct_decl): Rename into...
2601 (dump_ada_structure): ...this. Do not special-case empty structures.
2603 2018-02-27 Martin Sebor <msebor@redhat.com>
2606 * c.opt (-Wmissing-attributes): New option.
2608 2018-02-21 Martin Liska <mliska@suse.cz>
2610 * c.opt (Wcatch-value=): Add IntegerRange.
2612 2018-02-15 Jason Merrill <jason@redhat.com>
2614 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_deduction_guides.
2616 2018-02-09 Nathan Sidwell <nathan@acm.org>
2619 * c-common.h (strict_aliasing_warning): Drop OTYPE arg, insert LOC
2621 * c-warn.c (strict_aliasing_warning): Drop OTYPE arg, require LOC
2624 2018-02-09 Martin Sebor <msebor@redhat.com>
2627 * c.opt (-Wstringop-overflow, -Warray-bounds): Add LTO.
2628 (-Walloc-size-larger-than, -Wformat-truncation=): Same.
2629 (-Wmaybe-uninitialized, -Wnonnull, -Wrestrict): Same.
2630 (-Wstrict-overflow, -Wsuggest-attribute): Same.
2631 (-Wuninitialized): Same.
2633 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
2635 * c-ada-spec.c (dump_ada_declaration): Do not generate the 'constant'
2636 keyword for components.
2638 2018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
2640 * c-common.h (DECL_UNNAMED_BIT_FIELD): New.
2642 2018-02-02 Julia Koval <julia.koval@intel.com>
2644 * c-common.h (omp_clause_mask): Move to wide_int_bitmask.h.
2646 2018-01-29 Marek Polacek <polacek@redhat.com>
2649 * c-format.c (check_function_format): Check current_function_decl.
2651 2018-01-27 Jakub Jelinek <jakub@redhat.com>
2653 * c-cppbuiltin.c (c_cpp_builtins): Use ggc_strdup for the fp_suffix
2655 (LAZY_HEX_FP_VALUES_CNT): Define.
2656 (lazy_hex_fp_values): Allow up to LAZY_HEX_FP_VALUES_CNT lazy hex fp
2657 values rather than just 12.
2658 (builtin_define_with_hex_fp_value): Likewise.
2660 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
2663 * c.opt (-fmacro-prefix-map): New option.
2664 * c-opts.c (c_common_handle_option): Handle it.
2665 * c-lex.c (init_c_lex): Set remap_filename cpp callback.
2666 * c-ppoutput.c (init_pp_output): Likewise.
2668 2018-01-17 David Malcolm <dmalcolm@redhat.com>
2671 * c-common.c (fold_for_warn): Move to c/c-fold.c and cp/expr.c.
2673 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
2675 * c-ada-spec.c (dump_number): Add FLOAT_P parameter.
2676 Skip 'f' and 'F' characters if it is true.
2677 (store_ada_macro): Minor tweak.
2678 (dump_ada_macros) <CPP_COMMENT>: Likewise.
2679 <CPP_WSTRING>: Likewise.
2680 <CPP_STRING>: Output '&' in the buffer if not the first string.
2681 <CPP_NUMBER>: Adjust calls to dump_number.
2683 2018-01-10 David Malcolm <dmalcolm@redhat.com>
2686 * c-common.c: Include "selftest.h".
2687 (get_atomic_generic_size): Perform the test for integral type
2688 before the range test for any integer constant, fixing indentation
2689 of braces. Call fold_for_warn before testing for an INTEGER_CST.
2690 (reject_gcc_builtin): Strip any location wrapper from EXPR.
2691 (selftest::test_fold_for_warn): New function.
2692 (selftest::c_common_c_tests): New function.
2693 (selftest::c_family_tests): Call it, and
2694 selftest::c_pretty_print_c_tests.
2695 * c-common.h (selftest::c_pretty_print_c_tests): New decl.
2696 * c-format.c (check_format_arg): Convert VAR_P check to a
2698 * c-pretty-print.c: Include "selftest.h".
2699 (pp_c_cast_expression): Don't print casts for location wrappers.
2700 (selftest::assert_c_pretty_printer_output): New function.
2701 (ASSERT_C_PRETTY_PRINTER_OUTPUT): New macro.
2702 (selftest::test_location_wrappers): New function.
2703 (selftest::c_pretty_print_c_tests): New function.
2704 * c-warn.c (warn_for_memset): Call fold_for_warn on the arguments.
2706 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
2707 Alan Hayward <alan.hayward@arm.com>
2708 David Sherwood <david.sherwood@arm.com>
2710 * c-common.c (c_common_type_for_mode): Handle MODE_VECTOR_BOOL.
2712 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
2713 Alan Hayward <alan.hayward@arm.com>
2714 David Sherwood <david.sherwood@arm.com>
2716 * c-ubsan.c (ubsan_instrument_shift): Treat GET_MODE_BITSIZE
2719 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
2720 Alan Hayward <alan.hayward@arm.com>
2721 David Sherwood <david.sherwood@arm.com>
2723 * c-common.c (vector_types_convertible_p, c_build_vec_perm_expr)
2724 (convert_vector_to_array_for_subscript): Handle polynomial
2725 TYPE_VECTOR_SUBPARTS.
2726 (c_common_type_for_mode): Check valid_vector_subparts_p.
2727 * c-pretty-print.c (pp_c_initializer_list): Handle polynomial
2730 2018-01-03 Jakub Jelinek <jakub@redhat.com>
2732 Update copyright years.
2734 2017-12-22 Mike Stump <mikestump@comcast.net>
2735 Eric Botcazou <ebotcazou@adacore.com>
2737 * c-pragma.c (init_pragma): Register pragma GCC unroll.
2738 * c-pragma.h (enum pragma_kind): Add PRAGMA_UNROLL.
2740 2017-12-22 Alexandre Oliva <aoliva@redhat.com>
2744 * c-semantics.c (only_debug_stmts_after_p): New.
2745 (pop_stmt_list): Clear side effects in debug-only stmt list.
2746 Check for single nondebug stmt followed by debug stmts only.
2748 2017-12-21 Alexandre Oliva <aoliva@redhat.com>
2751 * c-semantics.c (pop_stmt_list): Propagate side effects from
2752 single nondebug stmt to container list.
2754 2017-12-19 Jakub Jelinek <jakub@redhat.com>
2756 * known-headers.cc (get_stdlib_header_for_name): Replace Yoda
2757 conditions with typical order conditions.
2759 2017-12-18 Marek Polacek <polacek@redhat.com>
2761 * c-warn.c (warn_logical_operator): Return early if -Wlogical-op is
2764 2017-12-17 Martin Sebor <msebor@redhat.com>
2766 * c-attribs.c (common_handle_aligned_attribute): Avoid issuing
2767 an error for attribute warn_if_not_aligned.
2769 2017-12-16 Martin Sebor <msebor@redhat.com>
2771 PR tree-optimization/78918
2772 * c-common.c (check_function_restrict): Avoid checking built-ins.
2773 * c.opt (-Wrestrict): Include in -Wall.
2775 2017-12-15 Jakub Jelinek <jakub@redhat.com>
2777 * c-attribs.c (c_common_attribute_table,
2778 c_common_format_attribute_table): Swap affects_type_identity
2779 and handler fields, adjust comments.
2781 2017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
2783 * c.opt (Wcast-function-type): New warning option.
2784 * c-lex.c (get_fileinfo): Avoid warning.
2785 * c-ppoutput.c (scan_translation_unit_directives_only): Remove cast.
2787 2017-12-14 Qing Zhao <qing.zhao@oracle.com>
2790 * c-cppbuiltin.c (builtin_define_with_hex_fp_value):
2791 Adjust the size of buf1 and buf2, add a new buf to avoid
2792 format-overflow warning.
2794 2017-12-12 Alexandre Oliva <aoliva@redhat.com>
2796 * c-semantics.c (pop_stmt_list): Move begin stmt marker into
2797 subsequent statement list.
2799 2017-12-07 Martin Sebor <msebor@redhat.com>
2803 * c-attribs.c (attr_aligned_exclusions): New array.
2804 (attr_alloc_exclusions, attr_cold_hot_exclusions): Same.
2805 (attr_common_exclusions, attr_const_pure_exclusions): Same.
2806 (attr_gnu_inline_exclusions, attr_inline_exclusions): Same.
2807 (attr_noreturn_exclusions, attr_returns_twice_exclusions): Same.
2808 (attr_warn_unused_result_exclusions): Same.
2809 (handle_hot_attribute, handle_cold_attribute): Simplify.
2810 (handle_const_attribute): Warn on function returning void.
2811 (handle_pure_attribute): Same.
2812 (handle_aligned_attribute): Diagnose conflicting attribute
2814 * c-warn.c (diagnose_mismatched_attributes): Simplify.
2816 2017-12-06 David Malcolm <dmalcolm@redhat.com>
2819 * c-common.c (selftest::c_family_tests): Call
2820 selftest::c_spellcheck_cc_tests.
2821 * c-common.h (selftest::c_spellcheck_cc_tests): New decl.
2822 * c-spellcheck.cc: Include "selftest.h".
2823 (name_reserved_for_implementation_p): New function.
2824 (should_suggest_as_macro_p): New function.
2825 (find_closest_macro_cpp_cb): Move the check for NT_MACRO to
2826 should_suggest_as_macro_p and call it.
2827 (selftest::test_name_reserved_for_implementation_p): New function.
2828 (selftest::c_spellcheck_cc_tests): New function.
2829 * c-spellcheck.h (name_reserved_for_implementation_p): New decl.
2831 2017-12-06 David Malcolm <dmalcolm@redhat.com>
2833 * c-spellcheck.cc: New file, taken from macro-handling code in
2835 * c-spellcheck.h: New file, taken from macro-handling code in
2838 2017-12-01 Jakub Jelinek <jakub@redhat.com>
2840 * c-attribs.c (c_common_attribute_table): Remove "cilk simd function"
2842 (handle_simd_attribute): Don't check for "cilk simd function"
2843 attribute. Reindent, formatting changes.
2845 2017-11-30 Julia Koval <julia.koval@intel.com>
2847 * c-common.h (inv_list): Remove.
2849 2017-11-28 Jakub Jelinek <jakub@redhat.com>
2852 * c-common.c (c_switch_covers_all_cases_p_1,
2853 c_switch_covers_all_cases_p): New functions.
2854 * c-common.h (c_switch_covers_all_cases_p): Declare.
2856 2017-11-28 Julia Koval <julia.koval@intel.com>
2857 Sebastian Peryt <sebastian.peryt@intel.com>
2859 * array-notation-common.c: Delete.
2860 * c-cilkplus.c: Ditto.
2861 * c-common.c (_Cilk_spawn, _Cilk_sync, _Cilk_for): Remove.
2862 * c-common.def (ARRAY_NOTATION_REF): Remove.
2863 * c-common.h (RID_CILK_SPAWN, build_array_notation_expr,
2864 build_array_notation_ref, C_ORT_CILK, c_check_cilk_loop,
2865 c_validate_cilk_plus_loop, cilkplus_an_parts,
2866 cilk_ignorable_spawn_rhs_op,
2867 cilk_recognize_spawn): Remove.
2868 * c-gimplify.c (CILK_SPAWN_STMT): Remove.
2869 * c-omp.c: Remove CILK_SIMD check.
2870 * c-pragma.c: Ditto.
2871 * c-pragma.h: Remove CILK related pragmas.
2872 * c-pretty-print.c (c_pretty_printer::postfix_expression): Remove
2873 ARRAY_NOTATION_REF condition.
2874 (c_pretty_printer::expression): Ditto.
2875 * c.opt (fcilkplus): Remove.
2878 2017-11-21 Marc Glisse <marc.glisse@inria.fr>
2880 * c-pretty-print.c (pp_c_additive_expression,
2881 c_pretty_printer::expression): Handle POINTER_DIFF_EXPR.
2883 2017-11-21 Jakub Jelinek <jakub@redhat.com>
2885 * c-common.c (get_nonnull_operand): Use tree_to_uhwi.
2888 * c-common.c (get_atomic_generic_size): Use TREE_INT_CST_LOW
2889 instead of tree_to_uhwi, formatting fix.
2891 2017-11-20 David Malcolm <dmalcolm@redhat.com>
2894 * known-headers.cc: New file, based on material from c/c-decl.c.
2895 (suggest_missing_header): Copied as-is.
2896 (get_stdlib_header_for_name): New, based on get_c_name_hint but
2897 heavily edited to add C++ support. Add some knowledge about
2898 <limits.h>, <stdint.h>, and <wchar.h>.
2899 * known-headers.h: Likewise.
2901 2017-11-20 David Malcolm <dmalcolm@redhat.com>
2903 * c-common.h (enum lookup_name_fuzzy_kind): Move to name-hint.h.
2904 (lookup_name_fuzzy): Likewise. Convert return type from
2905 const char * to name_hint. Add location_t param.
2906 * name-hint.h: New header.
2908 2017-11-19 Jakub Jelinek <jakub@redhat.com>
2912 * c-common.h (c_fully_fold): Add LVAL argument defaulted to false.
2914 2017-11-16 Joseph Myers <joseph@codesourcery.com>
2916 * c.opt (-std=c17, std=gnu17, -std=iso9899:2017): Refer to 2018
2917 expected publication date of C17.
2918 (-std=c18, -std=gnu18, -std=iso9899:2018): New option aliases.
2920 2017-11-15 Joseph Myers <joseph@codesourcery.com>
2923 * c-common.c (c_common_reswords): Add __builtin_tgmath.
2924 * c-common.h (enum rid): Add RID_BUILTIN_TGMATH.
2926 2017-11-10 Martin Sebor <msebor@redhat.com>
2929 * c-common.c (catenate_strings): Use memcpy instead of strncpy.
2930 * c-warn.c (sizeof_pointer_memaccess_warning): Handle arrays.
2931 * c.opt (-Wstringop-truncation): New option.
2933 2017-11-06 Martin Liska <mliska@suse.cz>
2936 * c-opts.c (c_common_post_options): Set -Wreturn-type for C++
2938 * c.opt: Set default value of warn_return_type.
2940 2017-10-31 David Malcolm <dmalcolm@redhat.com>
2942 * c-common.c (binary_op_error): Update for renaming of
2944 (c_parse_error): Likewise.
2945 * c-warn.c (warn_logical_not_parentheses): Likewise for
2946 renaming of inform_at_rich_loc.
2947 (warn_for_restrict): Likewise for renaming of
2948 warning_at_rich_loc_n.
2950 2017-10-30 Joseph Myers <joseph@codesourcery.com>
2952 * c.opt (std=c17, std=gnu17, std=iso9899:2017): New options.
2953 * c-opts.c (set_std_c17): New function.
2954 (c_common_init_options): Use gnu17 as default C version.
2955 (c_common_handle_option): Handle -std=c17 and -std=gnu17.
2957 2017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
2959 * c-cppbuiltin.c (mode_has_fma): Add support for PowerPC KFmode.
2960 (c_cpp_builtins): If a machine has a fast fma _Float<N> and
2961 _Float<N>X variant, define __FP_FAST_FMA<N> and/or
2964 2017-10-23 Marek Polacek <polacek@redhat.com>
2967 * c-warn.c (warnings_for_convert_and_check): Fix typos.
2969 2017-10-19 Eric Botcazou <ebotcazou@adacore.com>
2971 * c-common.c (check_builtin_function_arguments): Also check arguments
2972 of __builtin_alloca_with_align_and_max.
2974 2017-10-17 David Malcolm <dmalcolm@redhat.com>
2976 * c-format.c (format_warning_at_char): Pass UNKNOWN_LOCATION
2977 rather than NULL to format_warning_va.
2978 (check_format_types): Likewise when calling format_type_warning.
2979 Remove code to extract source_ranges and source_range * in favor
2980 of just a location_t.
2981 (format_type_warning): Convert source_range * param to a
2984 2017-10-13 Jakub Jelinek <jakub@redhat.com>
2986 * c-gimplify.c (c_gimplify_expr): Handle [LR]ROTATE_EXPR like
2989 2017-10-12 David Malcolm <dmalcolm@redhat.com>
2991 * c-common.c (enum missing_token_insertion_kind): New enum.
2992 (get_missing_token_insertion_kind): New function.
2993 (maybe_suggest_missing_token_insertion): New function.
2994 * c-common.h (maybe_suggest_missing_token_insertion): New decl.
2996 2017-10-11 Nathan Sidwell <nathan@acm.org>
2998 * c-opts.c (add_prefixed_path): Change chain to incpath_kind.
2999 (c_common_handle_option): Update incpath_kind names.
3001 2017-10-11 Martin Liska <mliska@suse.cz>
3004 * c-attribs.c (handle_no_sanitize_attribute): Report directly
3005 Wattributes warning.
3007 2017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
3009 * c-ada-spec.c (dump_generic_ada_node): Use wi::to_wide when
3010 operating on trees as wide_ints.
3011 * c-common.c (pointer_int_sum): Likewise.
3012 * c-pretty-print.c (pp_c_integer_constant): Likewise.
3013 * c-warn.c (match_case_to_enum_1): Likewise.
3014 (c_do_switch_warnings): Likewise.
3015 (maybe_warn_shift_overflow): Likewise.
3017 2017-10-10 Jakub Jelinek <jakub@redhat.com>
3020 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_wide
3021 instead of wide_int::from.
3023 2017-10-06 Jakub Jelinek <jakub@redhat.com>
3026 * c-warn.c (warn_tautological_bitwise_comparison): Instead of
3027 using to_widest use wide_int with the larger of the two precisions.
3029 2017-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
3031 * c-pretty-print.c (pp_c_parameter_type_list): Print ... for variadic
3034 2017-10-02 Richard Sandiford <richard.sandiford@linaro.org>
3036 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_widest
3037 when combining the original unconverted comparison operands.
3039 2017-09-29 Jakub Jelinek <jakub@redhat.com>
3041 * c-attribs.c (handle_noipa_attribute): Don't add "stack_protect"
3044 2017-09-29 Eric Botcazou <ebotcazou@adacore.com>
3046 * c-ada-spec.c (to_ada_name): Add index parameter.
3047 (pp_ada_tree_identifier): Likewise.
3048 (dump_ada_macros): Adjust call to to_ada_name.
3049 (struct overloaded_name_hash): New type.
3050 (struct overloaded_name_hasher): Likewise.
3051 (overloaded_names): New hash table.
3052 (compute_overloading_index): New function.
3053 (dump_ada_decl_name): Call it and pass the result to
3054 pp_ada_tree_identifier.
3055 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
3056 (dump_ada_function_declaration): Likewise.
3057 (dump_generic_ada_node): Likewise.
3058 (print_constructor): Likewise.
3059 (print_destructor): Likewise.
3060 (dump_ada_specs): Delete overloaded_names table.
3062 2017-09-29 Eric Botcazou <ebotcazou@adacore.com>
3064 * c-ada-spec.c (max_ada_macros): Move around.
3065 (store_ada_macro_index): Likewise.
3066 (source_file): Rename into...
3067 (macro_source_file): ...this.
3068 (count_ada_macro): Move around.
3069 (store_ada_macro): Likewise.
3070 (compare_macro): Likewise.
3071 (print_ada_macros): Merge in...
3072 (dump_ada_macros): ...this.
3073 (source_file_base): Rename into...
3074 (current_source_file): ...this.
3075 (print_comment): Move around.
3076 (dump_ada_nodes): Call dump_ada_declaration directly.
3077 (struct with): Change type of limited field to bool.
3078 (append_withs): Change type of limited_access parameter to bool.
3079 (pp_ada_tree_identifie): Likewise.
3080 (dump_ada_decl_nam): Likewise.
3081 (dump_generic_ada_node): Likewise. Do not print the return type.
3082 (to_ada_name): Change type of space_found parameter to bool.
3083 (dump_ada_function_declaration): Return void and change type of
3084 parameters to bool. Also print the return type for a function.
3085 (print_ada_methods): Rename into...
3086 (dump_ada_methods): ...this.
3087 (print_ada_declaration): Rename into ...
3088 (dump_ada_declaration): ...this. Do not print the return type.
3089 (print_ada_struct_decl): Rename into...
3090 (dump_ada_struct_decl): ...this.
3092 2017-09-29 Jakub Jelinek <jakub@redhat.com>
3094 * c-attribs.c (handle_packed_attribute): Test DECL_C_BIT_FIELD
3095 rather than DECL_INITIAL.
3096 (common_handle_aligned_attribute): Likewise.
3098 2017-09-20 Alexandre Oliva <aoliva@redhat.com>
3100 * c.opt (gen-decls): Add RejectNegative.
3102 2017-09-15 Andrew Sutton <andrew.n.sutton@gmail.com>
3103 Jakub Jelinek <jakub@redhat.com>
3105 Add support for -std=c++2a.
3106 * c-common.h (cxx_dialect): Add cxx2a as a dialect.
3107 * opt.c: Add options for -std=c++2a and -std=gnu++2a.
3108 * c-opts.c (set_std_cxx2a): New.
3109 (c_common_handle_option): Set options when -std=c++2a is enabled.
3110 (c_common_post_options): Adjust comments.
3111 (set_std_cxx14, set_std_cxx17): Likewise.
3113 2017-09-15 Eric Botcazou <ebotcazou@adacore.com>
3115 * c-pragma.c (handle_pragma_scalar_storage_order): Expand on error
3116 message for non-uniform endianness and issue a warning in C++.
3118 2017-09-15 Jakub Jelinek <jakub@redhat.com>
3120 * c.opt (Wc++1z-compat): Change from option to undocumented alias.
3121 (Wc++17-compat): Change from undocumented alias to option.
3122 (Wnoexcept-type): Enable by Wc++17-compat instead of Wc++1z-compat,
3123 change C++1z to C++17 in description.
3124 (std=c++1z, std=gnu++1z): Change from option to undocumented
3126 (std=c++17, std=gnu++17): Change from undocumented alias to option.
3128 * c-common.h (enum cxx_dialect): Rename cxx1z to cxx17.
3129 * c-opts.c (set_std_cxx1z): Rename to ...
3130 (set_std_cxx17): ... this.
3131 (c_common_handle_option): Rename OPT_std_c__1z to OPT_std_c__17
3132 and OPT_std_gnu__1z to OPT_std_gnu__17. Adjust set_std_cxx1z
3134 (c_common_post_options): Use cxx17 instead of cxx1z. Adjust
3137 2017-09-12 H.J. Lu <hongjiu.lu@intel.com>
3139 * c-attribs.c (common_handle_aligned_attribute): Don't warn
3140 function alignment if warn_if_not_aligned_p is true.
3142 2017-09-12 Nathan Sidwell <nathan@acm.org>
3144 * c-common.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
3145 resort_sorted_fields): Move to c/c-decl.c.
3146 * c-common.h (field_decl_cmp, resort_sorted_fields): Delete.
3147 (struct sorted_fields_type): Move to c/c-lang.h.
3149 2017-09-09 Jonathan Wakely <jwakely@redhat.com>
3152 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_threadsafe_static_init.
3154 2017-09-04 Marek Polacek <polacek@redhat.com>
3157 * c-warn.c (warn_tautological_bitwise_comparison): New function.
3158 (warn_tautological_cmp): Call it.
3160 2017-09-01 Boris Kolpackov <boris@codesynthesis.com>
3162 * c-opts.c (c_common_finish): Write dependency information even if
3165 2017-09-01 Jakub Jelinek <jakub@redhat.com>
3168 * c-pragma.c (omp_pragmas): Move "ordered" entry from here to ...
3169 (omp_pragmas_simd): ... here.
3170 * c-omp.c (c_finish_omp_ordered): If clauses isn't simd clause alone,
3171 create new clauses list containing just simd clause.
3173 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
3174 Alan Hayward <alan.hayward@arm.com>
3175 David Sherwood <david.sherwood@arm.com>
3177 * c-attribs.c (vector_mode_valid_p) Fold GET_MODE_INNER call
3178 into scalar_mode_supported_p call.
3179 (handle_mode_attribute): Update call to scalar_mode_supported_p.
3181 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
3182 Alan Hayward <alan.hayward@arm.com>
3183 David Sherwood <david.sherwood@arm.com>
3185 * c-common.c (c_common_fixed_point_type_for_size): Use opt_scalar_mode
3186 for the mode iterator.
3188 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
3189 Alan Hayward <alan.hayward@arm.com>
3190 David Sherwood <david.sherwood@arm.com>
3192 * c-lex.c (interpret_fixed): Use SCALAR_TYPE_MODE.
3193 * c-common.c (c_build_vec_perm_expr): Likewise.
3195 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
3196 Alan Hayward <alan.hayward@arm.com>
3197 David Sherwood <david.sherwood@arm.com>
3199 * c-common.c (c_common_type_for_mode): Use as_a <scalar_int_mode>.
3201 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
3202 Alan Hayward <alan.hayward@arm.com>
3203 David Sherwood <david.sherwood@arm.com>
3205 * c-attribs.c (handle_mode_attribute): Check for a scalar_int_mode
3206 before calling targetm.addr_space.valid_pointer_mode.
3208 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
3209 Alan Hayward <alan.hayward@arm.com>
3210 David Sherwood <david.sherwood@arm.com>
3212 * c-cppbuiltin.c (c_cpp_builtins): Use opt_scalar_float_mode.
3214 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
3215 Alan Hayward <alan.hayward@arm.com>
3216 David Sherwood <david.sherwood@arm.com>
3218 * c-common.c (c_common_fixed_point_type_for_size): Use new mode
3220 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
3222 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
3223 Alan Hayward <alan.hayward@arm.com>
3224 David Sherwood <david.sherwood@arm.com>
3226 * c-cppbuiltin.c (mode_has_fma): Prefix mode names with E_ in
3229 2017-08-29 Martin Liska <mliska@suse.cz>
3232 * c-common.c (parse_optimize_options): Add argument to function
3234 * c-pragma.c (handle_pragma_diagnostic): Likewise.
3236 2017-08-24 David Malcolm <dmalcolm@redhat.com>
3238 * c-lex.c (interpret_float): Use token location
3239 when building an EXCESS_PRECISION_EXPR.
3241 2017-08-21 David Malcolm <dmalcolm@redhat.com>
3243 * c-common.c (check_function_arguments): Add "arglogs" param; pass
3244 it to check_function_format.
3245 * c-common.h (check_function_arguments): Add vec<location_t> *
3247 (check_function_format): Likewise.
3248 * c-format.c (struct format_check_context): Add field "arglocs".
3249 (check_function_format): Add param "arglocs"; pass it to
3251 (check_format_info): Add param "arglocs"; use it to initialize
3252 new field of format_ctx.
3253 (check_format_arg): Pass format_ctx->arglocs to new param of
3254 check_format_info_main.
3255 (class argument_parser): New field "arglocs".
3256 (argument_parser::argument_parser): Add "arglocs_" param and use
3257 it to initialize new field.
3258 (argument_parser::check_argument_type): Pass new arglocs field to
3260 (check_format_info_main): Add param "arglocs", and use it when
3261 constructing arg_parser.
3262 (check_format_types): Add param "arglocs"; use it if non-NULL when
3263 !EXPR_HAS_LOCATION (cur_param) to get at location information.
3265 2017-08-18 H.J. Lu <hongjiu.lu@intel.com>
3268 * c-attribs.c (handle_warn_if_not_aligned_attribute): New.
3269 (c_common_attribute_table): Add warn_if_not_aligned.
3270 (handle_aligned_attribute): Renamed to ...
3271 (common_handle_aligned_attribute): Remove argument, name, and add
3272 argument, warn_if_not_aligned. Handle warn_if_not_aligned.
3273 (handle_aligned_attribute): New.
3274 * c.opt: Add -Wif-not-aligned and -Wpacked-not-aligned.
3276 2017-08-14 Martin Sebor <msebor@redhat.com>
3279 * c-attribs.c (c_common_attribute_table): Add nonstring entry.
3280 (handle_nonstring_attribute): New function.
3282 2017-08-14 Martin Sebor <msebor@redhat.com>
3285 * c-format.h (T89_G): New macro.
3286 * c-format.c (local_gcall_ptr_node): New variable.
3287 (init_dynamic_diag_info): Initialize it.
3289 2017-08-11 Martin Liska <mliska@suse.cz>
3291 * c-opts.c (c_common_post_options): Replace ASM_OUTPUT_DEF with
3292 TARGET_SUPPORTS_ALIASES.
3294 2017-08-10 David Malcolm <dmalcolm@redhat.com>
3296 * c-common.c (c_parse_error): Add rich_location * param, using it
3297 rather implicitly using input_location.
3298 * c-common.h (c_parse_error): Add rich_location * param.
3300 2017-08-09 Marek Polacek <polacek@redhat.com>
3302 * c-common.c (pointer_int_sum): Use true/false instead of 1/0.
3303 (c_common_truthvalue_conversion): Likewise.
3304 * c-omp.c (c_finish_omp_atomic): Likewise.
3305 * c-common.h (build_binary_op): Update declaration.
3307 2017-08-08 Martin Liska <mliska@suse.cz>
3309 * c-ada-spec.c: Include header files.
3310 * c-ubsan.c: Likewise.
3311 * c-warn.c: Likewise.
3313 2017-08-07 Jakub Jelinek <jakub@redhat.com>
3316 * c-omp.c (c_finish_omp_atomic): Handle atomics on bitfields.
3318 2017-08-07 Eric Botcazou <ebotcazou@adacore.com>
3320 * c-ada-spec.c (has_nontrivial_methods): Test for FUNCTION_DECL.
3321 (print_ada_methods): Likewise.
3322 (print_ada_declaration): Likewise.
3324 2017-08-07 Martin Liska <mliska@suse.cz>
3326 * array-notation-common.c: Add new includes.
3327 * c-format.c( handle_format_attribute): Canonicalize a format
3329 * c-lex.c (c_common_has_attribute): Canonicalize name of an
3331 * c-pretty-print.c: Add new include.
3333 2017-08-05 Eric Botcazou <ebotcazou@adacore.com>
3335 * c-ada-spec.c (has_static_fields): Look only into variables.
3336 (print_constructor): Add TYPE parameter and use it for the name.
3337 (print_destructor): Likewise.
3338 (print_ada_declaration): Adjust to new constructor/destructor names.
3339 Adjust calls to print_constructor and print_destructor.
3340 (print_ada_struct_decl): Do not test TREE_STATIC on FIELD_DECL.
3341 Look only into variables in the final loop.
3343 2017-08-01 Eric Botcazou <ebotcazou@adacore.com>
3345 * c-ada-spec.c (has_static_fields): Look only into fields.
3346 (dump_generic_ada_node): Small tweak.
3347 (dump_nested_types): Look only into fields.
3348 (print_ada_declaration): Look only into methods. Small tweak.
3349 (print_ada_struct_decl): Look only into fields. Use DECL_VIRTUAL_P.
3351 2017-08-01 Eric Botcazou <ebotcazou@adacore.com>
3353 * c-ada-spec.c (print_generic_ada_decl): Pass correctly-typed constant.
3354 (dump_ada_function_declaration): Likewise.
3355 (dump_generic_ada_node): Likewise.
3356 (print_ada_declaration): Add support for const-qualified variables.
3358 2017-07-31 Martin Liska <mliska@suse.cz>
3361 * c-ubsan.c (ubsan_maybe_instrument_array_ref):
3362 Guard condition with flag_sanitize_p also with current_function_decl
3364 (ubsan_maybe_instrument_reference_or_call): Likewise.
3366 2017-07-30 Uros Bizjak <ubizjak@gmail.com>
3368 * c-format.c (asm_fprintf_char_table): Add 'z' to format_chars.
3370 2017-07-29 Eric Botcazou <ebotcazou@adacore.com>
3372 * c-ada-spec.c (dump_generic_ada_node): Take into account signedness
3374 (print_ada_declaration): Add missing guard for record types.
3376 2017-07-27 Jakub Jelinek <jakub@redhat.com>
3379 * c-omp.c (c_finish_omp_for): If the condition is wrapped in
3380 rhs of COMPOUND_EXPR(s), skip them and readd their lhs into
3381 new COMPOUND_EXPRs around the rhs of the comparison.
3383 2017-07-27 Marek Polacek <polacek@redhat.com>
3386 * c-warn.c (warn_for_sign_compare): Tweak the warning message. Print
3389 2017-07-27 Jakub Jelinek <jakub@redhat.com>
3391 * c-attribs.c (c_common_attribute_table): Add noipa attribute.
3392 (handle_noipa_attribute): New function.
3394 2017-07-07 Torsten Duwe <duwe@suse.de>
3396 * c-attribs.c (c_common_attribute_table): Add entry for
3397 "patchable_function_entry".
3399 2017-07-20 Nathan Sidwell <nathan@acm.org>
3401 Remove TYPE_METHODS.
3402 * c-ada-spec.c (is_tagged_type, has_nontrivial_methods,
3403 dump_ada_template, print_ada_methods,
3404 print_ada_declaration): Member fns are on TYPE_FIELDS.
3406 2017-07-18 Nathan Sidwell <nathan@acm.org>
3408 * c-warn.c (warn_for_memset): Use TYPE_{MIN,MAX}_VALUE.
3410 2017-07-14 David Malcolm <dmalcolm@redhat.com>
3412 * c-common.c (try_to_locate_new_include_insertion_point): New
3414 (per_file_includes_t): New typedef.
3415 (added_includes_t): New typedef.
3416 (added_includes): New variable.
3417 (maybe_add_include_fixit): New function.
3418 * c-common.h (maybe_add_include_fixit): New decl.
3420 2017-07-10 Martin Sebor <msebor@redhat.com>
3423 * c.opt (-Wstringop-overflow): Set defaults in LangEnabledBy.
3425 2017-07-06 David Malcolm <dmalcolm@redhat.com>
3427 * c-common.c (selftest::c_family_tests): New.
3428 * c-common.h (selftest::run_c_tests): Move decl to c/c-lang.h.
3429 (selftest::c_family_tests): New decl.
3431 2017-07-04 Marek Polacek <polacek@redhat.com>
3434 * c-common.c (sync_resolve_size): Give error for pointers to incomplete
3437 2017-07-04 Marek Polacek <polacek@redhat.com>
3439 * c-warn.c (warn_if_unused_value): Remove WITH_CLEANUP_EXPR handling.
3441 2017-06-28 Martin Liska <mliska@suse.cz>
3444 * c-attribs.c (handle_alias_ifunc_attribute): Append ifunc alias
3445 to a function declaration.
3447 2017-06-28 Martin Liska <mliska@suse.cz>
3450 * c.opt: Add IntegerRange to various options.
3452 2017-06-26 Marek Polacek <polacek@redhat.com>
3455 * c-common.h (warn_for_multistatement_macros): Declare.
3456 * c-warn.c: Include "c-family/c-indentation.h".
3457 (warn_for_multistatement_macros): New function.
3458 * c.opt (Wmultistatement-macros): New option.
3459 * c-indentation.c (guard_tinfo_to_string): No longer static.
3460 Change the parameter type to "enum rid". Handle RID_SWITCH.
3461 * c-indentation.h (guard_tinfo_to_string): Declare.
3463 2017-06-23 Marc Glisse <marc.glisse@inria.fr>
3465 * c-common.c (c_common_nodes_and_builtins): Use builtin_structptr_types.
3467 2017-06-15 Martin Sebor <msebor@redhat.com>
3470 * c.opt (-Wclass-memaccess): New option.
3472 2017-06-14 Boris Kolpackov <boris@codesynthesis.com>
3474 * c-opts.c (c_common_finish): Handle '-' special value to -MF.
3476 2017-06-13 Marek Polacek <polacek@redhat.com>
3479 * c-warn.c (do_warn_duplicated_branches): Return if any of the
3482 2017-06-13 Martin Liska <mliska@suse.cz>
3485 * c-attribs.c (add_no_sanitize_value): New function.
3486 (handle_no_sanitize_attribute): Likewise.
3487 (handle_no_sanitize_address_attribute): Use the function.
3488 (handle_no_sanitize_thread_attribute): New function.
3489 (handle_no_address_safety_analysis_attribute): Use
3490 add_no_sanitize_value.
3491 (handle_no_sanitize_undefined_attribute): Likewise.
3492 * c-common.h: Declare new functions.
3493 * c-ubsan.c (ubsan_instrument_division): Use sanitize_flags_p.
3494 (ubsan_instrument_shift): Likewise.
3495 (ubsan_instrument_bounds): Likewise.
3496 (ubsan_maybe_instrument_array_ref): Likewise.
3497 (ubsan_maybe_instrument_reference_or_call): Likewise.
3499 2017-06-11 Jason Merrill <jason@redhat.com>
3501 * c-ada-spec.c, c-pragma.c: Use id_equal.
3503 2017-06-04 Marek Polacek <polacek@redhat.com>
3506 * c-format.c (matching_type_p): Return false if any of the types
3507 requires structural equality.
3509 2017-06-02 Martin Sebor <msebor@redhat.com>
3512 * c-warn.c (conversion_warning): Use -Wconversion for integer
3513 conversion and -Wfloat-conversion for floating one.
3515 2017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
3517 * c.opt (Wsizeof-pointer-div): New warning option.
3519 2017-06-01 Volker Reichelt <v.reichelt@netcologne.de>
3521 * c.opt (Wcatch-value): New shortcut for Wcatch-value=1.
3522 (Wcatch-value=1): Enable by -Wall.
3524 2017-05-30 David Malcolm <dmalcolm@redhat.com>
3526 * c-format.c (gcc_cxxdiag_char_table): Add 'H' and 'I' to
3528 * c.opt (fdiagnostics-show-template-tree): New option.
3529 (felide-type): New option.
3531 2017-05-25 Volker Reichelt <v.reichelt@netcologne.de>
3533 * c.opt (Wcatch-value=): New C++ warning flag.
3535 2017-05-24 Nathan Sidwell <nathan@acm.org>
3537 * c=common.c (field_decl_cmp, resort_field_decl_cmp): Adjust T
3538 const casts to avoid warning.
3540 2017-05-24 Martin Sebor <msebor@redhat.com>
3543 * c-common.h (unsafe_conversion_p): Add a function argument.
3544 * c-common.c (unsafe_conversion_p): Same.
3545 Add type names and values to diagnostics.
3546 (scalar_to_vector): Adjust.
3547 * c-warn.c (constant_expression_error): Add a function argument.
3548 Add type names and values to diagnostics.
3549 (conversion_warning): Add a function argument.
3550 Add type names and values to diagnostics.
3551 (warnings_for_convert_and_check): Same.
3553 2017-05-19 Jason Merrill <jason@redhat.com>
3555 * c-warn.c (match_case_to_enum_1): Don't warn about enums with no
3558 2017-05-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
3560 * c-format.c (locus): Move out of function scope,
3563 2017-05-19 Nathan Sidwell <nathan@acm.org>
3565 * c-opts.c (class_dump_file, class_dump_flags): Delete.
3566 (c_common_parse_file): Remove class dump handling.
3567 (get_dump_info): Likewise.
3569 2017-05-19 Richard Biener <rguenther@suse.de>
3572 * c-warn.c (strict_aliasing_warning): Do not warn for accesses
3573 to alias-set zero memory.
3575 2017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
3577 * c-format.c (local_tree_type_node): Add GTY attribute.
3579 2017-05-18 Marek Polacek <polacek@redhat.com>
3581 * c-common.c (c_common_type_for_size): Use NULL_TREE instead of 0.
3582 (c_common_fixed_point_type_for_size): Likewise.
3583 (c_common_type_for_mode): Likewise.
3584 (shorten_compare): Likewise.
3585 (c_promoting_integer_type_p): Use false/true instead of 0/1.
3586 * c-pragma.c (maybe_apply_renaming_pragma): Use NULL_TREE instead of 0.
3588 2017-05-18 Marek Polacek <polacek@redhat.com>
3590 * c-common.c (self_promoting_args_p): Change the return type to bool.
3591 Use false/true instead of 0/1.
3592 * c-common.h (self_promoting_args_p): Update.
3594 2017-05-17 Marek Polacek <polacek@redhat.com>
3596 * c-common.c: Use NULL_TREE instead of 0 where appropriate.
3597 * c-warn.c: Likewise.
3599 2017-05-17 Ville Voutilainen <ville.voutilainen@gmail.com>
3601 Implement new C++ intrinsics __is_assignable and __is_constructible.
3602 * c-common.c (__is_assignable, __is_constructible): New.
3603 * c-common.h (RID_IS_ASSIGNABLE, RID_IS_CONSTRUCTIBLE): Likewise.
3605 2017-05-17 Martin Liska <mliska@suse.cz>
3607 * c-common.h: Introduce dump_flags_t type and
3608 use it instead of int type.
3609 * c-gimplify.c (c_genericize): Likewise.
3610 * c-opts.c: Likewise.
3612 2017-05-17 Marek Polacek <polacek@redhat.com>
3614 * c-common.c (c_save_expr): Remove.
3615 (c_common_truthvalue_conversion): Remove a call to c_save_expr.
3616 * c-common.h (c_save_expr): Remove declaration.
3618 2017-05-09 Volker Reichelt <v.reichelt@netcologne.de>
3621 * c-pretty-print.c (c_pretty_printer::expression): Handle MAX_EXPR,
3622 MIN_EXPR, EXACT_DIV_EXPR, RDIV_EXPR, LROTATE_EXPR, RROTATE_EXPR.
3623 (c_pretty_printer::postfix_expression): Handle MAX_EXPR, MIN_EXPR.
3624 (c_pretty_printer::multiplicative_expression): Handle EXACT_DIV_EXPR,
3626 (pp_c_shift_expression): Handle LROTATE_EXPR, RROTATE_EXPR.
3628 2017-05-09 Marek Polacek <polacek@redhat.com>
3631 * c-warn.c (unwrap_c_maybe_const): New.
3632 (warn_logical_operator): Call it.
3634 2017-05-09 Nathan Sidwell <nathan@acm.org>
3636 * c-common.c (c_register_builtin_type): Use pushdecl lang_hook.
3637 * c-common.h (pushdecl_top_level, pushdecl): Don't declare here.
3639 2017-05-08 Martin Sebor <msebor@redhat.com>
3641 PR translation/80280
3642 * c-format.h (struct format_flag_spec): Add new member.
3644 * c-format.c (local_tree_type_node): New global.
3645 (printf_flag_specs, asm_fprintf_flag_spec): Initialize new data.
3646 (gcc_diag_flag_specs, scanf_flag_specs, strftime_flag_specs): Ditto.
3647 (strfmon_flag_specs): Likewise.
3648 (gcc_diag_char_table, gcc_cdiag_char_table): Split up specifiers
3649 with distinct quoting properties.
3650 (gcc_tdiag_char_table, gcc_cxxdiag_char_table): Same.
3651 (flag_chars_t::validate): Add argument and handle bad quoting.
3652 (check_format_info_main): Handle quoting problems.
3653 (init_dynamic_diag_info): Simplify.
3655 2017-05-08 Jason Merrill <jason@redhat.com>
3657 * c-opts.c (c_common_post_options): Update defaults for
3658 flag_abi_version and flag_abi_compat_version.
3660 2017-05-05 David Malcolm <dmalcolm@redhat.com>
3662 * c-common.c (c_cpp_error): Replace report_diagnostic
3663 with diagnostic_report_diagnostic.
3665 2017-05-04 Martin Sebor <msebor@redhat.com>
3667 PR translation/80280
3668 * c-attribs.c (handle_alias_ifunc_attribute): Quote a %D directive.
3669 (handle_weakref_attribute): Same.
3671 2017-05-03 Nathan Sidwell <nathan@acm.org>
3673 Canonicalize canonical type hashing
3674 * c-common.c (complete_array_type): Use type_hash_canon.
3676 2017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
3679 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): Remove
3681 (cilk_install_body_pedigree_operations): Likewise.
3682 * cilk.c (cilk_set_spawn_marker): Mark functions that should be
3684 (cilk_gimplify_call_params_in_spawned_fn): Remove.
3685 (cilk_install_body_pedigree_operations): Likewise.
3686 (gimplify_cilk_spawn): Add EXPR_STMT and CLEANUP_POINT_EXPR
3689 2017-04-27 Jakub Jelinek <jakub@redhat.com>
3692 * c-common.c (complete_array_type): Only hash TYPE_TYPELESS_STORAGE
3693 flag on non-aggregate element types.
3695 2017-04-25 Bernd Edlinger <bernd.edlinger@hotmail.de>
3697 * c-common.c (c_type_hasher, type_hash_table): Remove.
3698 (c_common_get_alias_set): Remove unreachable code.
3699 * c-opts.c (c_common_post_options): Make sure cc1 takes only one file.
3701 2017-04-20 Volker Reichelt <v.reichelt@netcologne.de>
3703 * c.opt (Wextra-semi): New C++ warning flag.
3705 2017-04-20 Jakub Jelinek <jakub@redhat.com>
3708 * c-common.c (complete_array_type): Preserve TYPE_TYPELESS_STORAGE.
3710 2017-04-18 Jakub Jelinek <jakub@redhat.com>
3714 * c-common.c (c_common_type_for_mode): Don't handle
3715 widest_*_literal_type_node here.
3716 c_common_signed_or_unsigned_type): Likewise.
3717 (c_common_nodes_and_builtins): Set widest_*_literal_type_node
3718 to *intTI_type_node or *intDI_type_node depending on whether
3719 TImode is supported by the target or not.
3721 2017-04-10 Martin Liska <mliska@suse.cz>
3724 * c-ubsan.c (ubsan_instrument_shift): Evaluate RHS before
3725 doing an UBSAN check.
3727 2017-04-03 Jonathan Wakely <jwakely@redhat.com>
3729 * c-warn.c (do_warn_double_promotion): Fix typo in comment.
3731 2017-03-31 Jakub Jelinek <jakub@redhat.com>
3734 * c-ubsan.h (ubsan_maybe_instrument_reference): Change argument to
3736 * c-ubsan.c (ubsan_maybe_instrument_reference): Likewise. Handle
3737 not just NOP_EXPR to REFERENCE_TYPE, but also INTEGER_CST with
3740 2017-03-31 David Malcolm <dmalcolm@redhat.com>
3742 PR documentation/78732
3743 * c.opt (Wendif-labels): Fix description to refer to
3744 #else rather than #elif.
3746 2017-03-31 Jakub Jelinek <jakub@redhat.com>
3749 * c-common.h (enum rid): Add RID_IS_AGGREGATE.
3750 * c-common.c (c_common_reswords): Add __is_aggregate trait.
3752 2017-03-27 Jakub Jelinek <jakub@redhat.com>
3755 * c-common.c (c_common_mark_addressable_vec): Don't set
3756 TREE_ADDRESSABLE on DECL_HARD_REGISTER.
3758 2017-03-21 Martin Sebor <msebor@redhat.com>
3761 * c-common.c (set_underlying_type): Mark type used only when
3762 original del is declared unused.
3764 2017-03-10 David Malcolm <dmalcolm@redhat.com>
3766 PR translation/79848
3767 * c-format.c (check_format_string): Simplify uses of "%<%s%>" to
3770 2017-03-10 David Malcolm <dmalcolm@redhat.com>
3773 * c-indentation.c (warn_for_misleading_indentation): Remove parens
3774 from inform's message, so that xgettext can locate it.
3776 2017-03-09 Marek Polacek <polacek@redhat.com>
3780 * c-attribs.c (handle_nonnull_attribute): Save the result of default
3781 conversion to the attribute list.
3783 2017-03-09 Martin Liska <mliska@suse.cz>
3785 * c-ada-spec.c (macro_length): Increment value instead of a pointer.
3787 2017-03-03 Jason Merrill <jason@redhat.com>
3789 * c.opt (Wnoexcept-type): New.
3791 2017-03-02 Richard Biener <rguenther@suse.de>
3794 * c-common.c (c_common_mark_addressable_vec): Look through
3797 2017-02-28 Martin Liska <mliska@suse.cz>
3799 * c.opt: Replace space with tabular for options of <number>
3802 2017-02-28 Martin Liska <mliska@suse.cz>
3804 * c.opt: Fix --help=option -Q for options which are of
3807 2017-02-24 Jakub Jelinek <jakub@redhat.com>
3810 * c-common.c (check_function_restrict): New function.
3811 (check_function_arguments): Add FNDECL argument. Call
3812 check_function_restrict if -Wrestrict.
3813 * c-warn.c (warn_for_restrict): Remove ARGS argument, add ARGARRAY
3814 and NARGS. Use auto_vec for ARG_POSITIONS, simplify.
3815 * c-common.h (check_function_arguments): Add FNDECL argument.
3816 (warn_for_restrict): Remove ARGS argument, add ARGARRAY and NARGS.
3818 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
3820 * c-ada-spec.c (dump_ada_function_declaration): Add comment about the
3821 treatment of parameters with pointer-to-tagged type and tidy up.
3822 (print_ada_methods): Remove the special treatment of C++ static member
3825 2017-02-22 Martin Liska <mliska@suse.cz>
3827 * c.opt: Replace inequality signs with square brackets
3830 2017-02-21 Jakub Jelinek <jakub@redhat.com>
3833 * c-attribs.c (handle_mode_attribute): Use build_qualified_type to
3836 2017-02-17 Joseph Myers <joseph@codesourcery.com>
3838 * c-cppbuiltin.c (builtin_define_float_constants): Define
3839 __DECIMAL_DIG__ to the value for long double.
3841 2017-02-15 Marek Polacek <polacek@redhat.com>
3844 * c-warn.c (do_warn_double_promotion): Don't warn if an invalid
3845 conversion has occured.
3847 2017-01-24 David Malcolm <dmalcolm@redhat.com>
3849 * c-common.c (c_common_reswords): Add "__RTL".
3850 * c-common.h (enum rid): Add RID_RTL.
3852 2017-01-20 Marek Polacek <polacek@redhat.com>
3855 * c-common.h (do_warn_duplicated_branches_r): Declare.
3856 * c-gimplify.c (c_genericize): Walk the function tree calling
3857 do_warn_duplicated_branches_r.
3858 * c-warn.c (expr_from_macro_expansion_r): New.
3859 (do_warn_duplicated_branches): New.
3860 (do_warn_duplicated_branches_r): New.
3861 * c.opt (Wduplicated-branches): New option.
3863 2017-01-17 David Malcolm <dmalcolm@redhat.com>
3866 * c-indentation.c (warn_for_misleading_indentation): Use the past
3867 subjunctive in the note.
3869 2017-01-17 Aldy Hernandez <aldyh@redhat.com>
3872 * array-notation-common.c (cilkplus_extract_an_triplets): Convert
3873 start type to integer_type.
3875 2017-01-16 Jakub Jelinek <jakub@redhat.com>
3878 * c.opt (gen-decls): Add Driver flag.
3880 2017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
3883 2017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
3886 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
3888 2017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
3891 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
3893 2017-01-12 Martin Sebor <msebor@redhat.com>
3895 (-Wformat-overflow): ...to this.
3897 2017-01-11 Martin Sebor <msebor@redhat.com>
3900 * c.opt (-Walloca-larger-than, -Wformat-length, -Wformat-truncation):
3901 Also enable for LTO.
3903 2017-01-10 Jason Merrill <jason@redhat.com>
3905 Implement P0195R2, C++17 variadic using.
3906 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_variadic_using.
3908 2017-01-09 Jakub Jelinek <jakub@redhat.com>
3910 PR translation/79019
3911 PR translation/79020
3912 * c.opt (Wnormalized=): Fix typo in description.
3914 2017-01-08 Martin Sebor <msebor@redhat.com>
3917 * c.opt (-Wformat-truncation): New option.
3919 2017-01-06 Alexandre Oliva <aoliva@redhat.com>
3921 * c-pretty-print.c (pp_c_tree_decl_identifier): Convert 16-bit
3922 value to unsigned short to fit in 4 hex digits without
3925 2017-01-05 Eric Botcazou <ebotcazou@adacore.com>
3927 * c.opt (fsso-struct): Add 'native' value.
3929 2017-01-05 Martin Liska <mliska@suse.cz>
3932 * c-opts.c (c_common_post_options): Reject '-' filename for a precompiled
3935 2017-01-04 Marek Polacek <polacek@redhat.com>
3938 * c.opt (Wpointer-compare): New option.
3940 2017-01-04 Jakub Jelinek <jakub@redhat.com>
3943 * c.opt (fsso-struct=): Add RejectNegative.
3945 2017-01-01 Jakub Jelinek <jakub@redhat.com>
3947 Update copyright years.
3949 2016-12-29 Martin Liska <mliska@suse.cz>
3952 * c.opt (strong-eval-order): Add RejectNegative keyword.
3954 2016-12-22 Jason Merrill <jason@redhat.com>
3956 Implement P0522R0, matching of template template arguments.
3957 * c-cppbuiltin.c (c_cpp_builtins): Define
3958 __cpp_template_template_args.
3960 2016-12-21 Jakub Jelinek <jakub@redhat.com>
3963 * c-common.c (struct nonnull_arg_ctx): New type.
3964 (check_function_nonnull): Return bool instead of void. Use
3965 nonnull_arg_ctx as context rather than just location_t.
3966 (check_nonnull_arg): Adjust for the new context type, set
3967 warned_p to true if a warning has been diagnosed.
3968 (check_function_arguments): Return bool instead of void.
3969 * c-common.h (check_function_arguments): Adjust prototype.
3971 2016-12-21 Jason Merrill <jason@redhat.com>
3973 * c.opt (-fnew-ttp-matching): New flag.
3974 * c-opts.c (c_common_post_options): Default on if -std=c++1z.
3976 2016-12-14 Martin Jambor <mjambor@suse.cz>
3978 * c-omp.c: Include omp-general.h instead of omp-low.h.
3979 (c_finish_oacc_wait): Adjusted call to find_omp_clause to use its new
3982 2016-12-14 Martin Sebor <msebor@redhat.com>
3985 * c-common.c (check_nonnull_arg): Disable when optimization
3988 2016-12-12 Marek Polacek <polacek@redhat.com>
3991 * c-common.c (attribute_fallthrough_p): Return false for
3994 2016-12-08 Martin Sebor <msebor@redhat.com>
3997 * c.opt (-Walloc-zero, -Walloc-size-larger-than): New options.
3999 2016-12-08 Martin Sebor <msebor@redhat.com>
4002 * c-pretty-print (pp_c_integer_constant): Avoid formatting type
4005 2016-12-07 Martin Sebor <msebor@redhat.com>
4011 * c.opt (-Wstringop-overflow): New option.
4013 2016-12-02 Maxim Ostapenko <m.ostapenko@samsung.com>
4015 * c-attribs.c (asan odr indicator): New attribute.
4016 (handle_asan_odr_indicator_attribute): New function.
4018 2016-11-26 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4020 * c-common.c (c_common_nodes_and_builtins): Remove initialization of
4023 2016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
4025 * c-common.c (excess_precision_mode_join): New.
4026 (c_ts18661_flt_eval_method): New.
4027 (c_c11_flt_eval_method): Likewise.
4028 (c_flt_eval_method): Likewise.
4029 * c-common.h (excess_precision_mode_join): New.
4030 (c_flt_eval_method): Likewise.
4031 * c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): New.
4032 (cpp_iec_559_value): Call it.
4033 (c_cpp_builtins): Modify logic for __LIBGCC_*_EXCESS_PRECISION__,
4034 call c_flt_eval_method to set __FLT_EVAL_METHOD__ and
4035 __FLT_EVAL_METHOD_TS_18661_3__.
4037 2016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
4039 * c-opts.c (c_common_post_options): Add logic to handle the default
4040 case for -fpermitted-flt-eval-methods.
4042 2016-11-23 Paolo Bonzini <bonzini@gnu.org>
4044 * c.opt (Wexpansion-to-defined): New.
4046 2016-11-23 Jakub Jelinek <jakub@redhat.com>
4049 * c-pragma.c (handle_pragma_target): Don't replace
4050 current_target_pragma, but chainon the new args to the current one.
4052 2016-11-22 Nathan Sidwell <nathan@acm.org>
4054 * array-notation-common.c (cilkplus_extract_an_trplets): Fix
4055 indentation and formatting.
4057 2016-11-21 Martin Sebor <msebor@redhat.com>
4059 * c.opt (-fprintf-return-value): Enable by default.
4061 2016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
4064 * c.opt (-Wbuiltin-declaration-mismatch): New warning.
4065 * c-common.c (c_common_nodes_and_builtins): Initialize
4066 const_tm_ptr_type_node.
4068 2016-11-16 Marek Polacek <polacek@redhat.com>
4071 * c-common.c (c_add_case_label): Turn error_at calls into inform.
4073 2016-11-14 Jakub Jelinek <jakub@redhat.com>
4075 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_structured_bindings.
4077 2016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
4078 Richard Biener <rguenther@suse.de>
4080 * c-common.h (c_common_resword): Add RID_GIMPLE, RID_PHI types.
4081 * c-common.h (enum rid): Add RID_GIMPLE, RID_PHI.
4082 * c.opt (fgimple): New option.
4084 2016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4087 * c-common.h (warn_for_restrict): Declare.
4088 * c-warn.c: Include gcc-rich-location.h.
4089 (warn_for_restrict): New function.
4090 * c-format.c (gcc_tdiag_char_table): Add entry for "Z" specifier.
4091 (gcc_cdiag_char_table): Likewise.
4092 (gcc_cxxdiag_char_table): Likewise.
4093 * c.opt (Wrestrict): New option.
4095 2016-11-13 Eric Botcazou <ebotcazou@adacore.com>
4097 * c-ada-spec.c (print_ada_declaration): For typedef declarations, look
4098 for nested types only if the type is a record or union and dump SLOC.
4100 2016-11-09 Jason Merrill <jason@redhat.com>
4102 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_template_auto.
4104 2016-11-09 Jakub Jelinek <jakub@redhat.com>
4106 * c-ubsan.c (ubsan_instrument_shift): Handle split
4107 -fsanitize=shift-base and -fsanitize=shift-exponent.
4109 2016-11-07 Jason Merrill <jason@redhat.com>
4111 * c.opt (Wc++1z-compat): New.
4112 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_noexcept_function_type.
4114 2016-11-07 Martin Liska <mliska@suse.cz>
4116 * c-warn.c (warn_for_unused_label): Save all labels used
4117 in goto or in &label.
4119 2016-11-03 Jason Merrill <jason@redhat.com>
4121 * c-cppbuiltin.c (c_cpp_builtins): Correct
4122 __cpp_inheriting_constructors.
4124 2016-11-01 Jason Merrill <jason@redhat.com>
4126 * c-cppbuiltin.c (c_cpp_builtins): Update
4127 __cpp_inheriting_constructors.
4129 * c.opt (-fnew-inheriting-ctors): New.
4130 * c-opts.c: Default to on for ABI 11+.
4132 2016-10-31 Jakub Jelinek <jakub@redhat.com>
4135 * c.opt (fext-numeric-literals): Add Var and Init.
4136 * c-opts.c (c_common_handle_option): Don't clear
4137 cpp_opts->ext_numeric_literals for -std=c++{11,14,1z}.
4138 (c_common_post_options): Clear it here if not set
4141 2016-10-28 Aldy Hernandez <aldyh@redhat.com>
4144 * c-pretty-print.c (simple_type_specifier): Do not dereference `t'
4147 2016-10-25 Jakub Jelinek <jakub@redhat.com>
4149 * c-common.h (enum rid): Add RID_BUILTIN_LAUNDER.
4150 * c-common.c (c_common_reswords): Add __builtin_launder.
4152 2016-10-24 Bernd Edlinger <bernd.edlinger@hotmail.de>
4154 * c-common.c (c_common_truthvalue_conversion): Warn for
4155 multiplications in boolean context. Fix the quoting of '<<' and '<'
4156 in the shift warning.
4158 2016-10-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
4160 * c-common.c (c_common_truthvalue_conversion): Fix the comment.
4162 2016-10-20 Jason Merrill <jason@redhat.com>
4164 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_concepts value.
4166 2016-10-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
4168 * c-common.c (c_common_truthvalue_conversion): Warn only for signed
4169 integer shift ops in boolean context.
4171 2016-10-18 Aldy Hernandez <aldyh@redhat.com>
4173 * c.opt (Walloca): New.
4174 (Walloca-larger-than=): New.
4175 (Wvla-larger-than=): New.
4177 2016-10-17 Marek Polacek <polacek@redhat.com>
4179 * c-warn.c (find_array_ref_with_const_idx_r): Remove parameter names.
4180 Return immediately when finding a match.
4181 (warn_tautological_cmp): Remove a boolean variable that is no longer
4184 2016-10-17 Marek Polacek <polacek@redhat.com>
4186 * c-attribs.c: New file.
4187 * c-common.c: Move attributes handling to c-attribs.c.
4188 (get_nonnull_operand): No longer static.
4189 * c-common.h: Move the declarations from c-attribs.c to its own section.
4191 2016-10-14 Jason Merrill <jason@redhat.com>
4193 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_aggregate_bases
4194 and __cpp_deduction_guides.
4196 2016-10-13 Jason Merrill <jason@redhat.com>
4198 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_inline_variables.
4200 2016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
4202 * c-cppbuiltin.c: Include memmodel.h.
4203 * c-opts.c: Likewise.
4204 * c-pragma.c: Likewise.
4205 * c-warn.c: Likewise.
4207 2016-10-12 Jakub Jelinek <jakub@redhat.com>
4209 * c.opt (Wextra): Add as C/C++/ObjC/ObjC++ option.
4210 (Wimplicit-fallthrough=): Enable for these languages by -Wextra.
4211 * c-opts.c (sanitize_cpp_opts): Initialize
4212 cpp_opts->cpp_warn_implicit_fallthrough.
4214 2016-10-11 Marek Polacek <polacek@redhat.com>
4216 * c-common.c (warning_candidate_p): Change the return type to bool
4217 and return true/false instead of 1/0.
4218 (vector_mode_valid_p): Likewise.
4220 2016-10-11 Marek Polacek <polacek@redhat.com>
4222 * c-common.c (fold_for_warn): No longer static.
4223 (bool_promoted_to_int_p): Likewise.
4224 (c_common_get_narrower): Likewise.
4225 (constant_expression_warning): Move to c-warn.c.
4226 (constant_expression_error): Likewise.
4227 (overflow_warning): Likewise.
4228 (warn_logical_operator): Likewise.
4229 (find_array_ref_with_const_idx_r): Likewise.
4230 (warn_tautological_cmp): Likewise.
4231 (expr_has_boolean_operands_p): Likewise.
4232 (warn_logical_not_parentheses): Likewise.
4233 (warn_if_unused_value): Likewise.
4234 (strict_aliasing_warning): Likewise.
4235 (sizeof_pointer_memaccess_warning): Likewise.
4236 (check_main_parameter_types): Likewise.
4237 (conversion_warning): Likewise.
4238 (warnings_for_convert_and_check): Likewise.
4239 (match_case_to_enum_1): Likewise.
4240 (match_case_to_enum): Likewise.
4241 (c_do_switch_warnings): Likewise.
4242 (warn_for_omitted_condop): Likewise.
4243 (readonly_error): Likewise.
4244 (lvalue_error): Likewise.
4245 (invalid_indirection_error): Likewise.
4246 (warn_array_subscript_with_type_char): Likewise.
4247 (warn_about_parentheses): Likewise.
4248 (warn_for_unused_label): Likewise.
4249 (warn_for_div_by_zero): Likewise.
4250 (warn_for_memset): Likewise.
4251 (warn_for_sign_compare): Likewise.
4252 (do_warn_double_promotion): Likewise.
4253 (do_warn_unused_parameter): Likewise.
4254 (record_locally_defined_typedef): Likewise.
4255 (maybe_record_typedef_use): Likewise.
4256 (maybe_warn_unused_local_typedefs): Likewise.
4257 (maybe_warn_bool_compare): Likewise.
4258 (maybe_warn_shift_overflow): Likewise.
4259 (warn_duplicated_cond_add_or_warn): Likewise.
4260 (diagnose_mismatched_attributes): Likewise.
4261 * c-common.h: Move the declarations from c-warn.c to its own section.
4262 * c-warn.c: New file.
4264 2016-10-08 Jason Merrill <jason@redhat.com>
4266 * c-common.c (c_common_truthvalue_conversion): Don't distribute
4267 into COND_EXPR in C++.
4269 2016-10-08 Jakub Jelinek <jakub@redhat.com>
4271 * c-lex.c (c_lex_with_flags) <case CPP_COMMENT>: For CPP_COMMENT
4272 token with PREV_FALLTHROUGH, skip all following CPP_PADDING and
4273 CPP_COMMENT tokens and set add_flags to PREV_FALLTHROUGH afterwards.
4275 2016-10-07 Jakub Jelinek <jakub@redhat.com>
4277 Implement LWG2296 helper intrinsic
4278 * c-common.h (enum rid): Add RID_ADDRESSOF.
4279 * c-common.c (c_common_reswords): Add __builtin_addressof.
4281 2016-10-07 Bernd Edlinger <bernd.edlinger@hotmail.de>
4284 * c-common.c (c_common_truthvalue_conversion): Warn also for
4285 suspicious enum values in boolean context.
4287 2016-10-06 Jakub Jelinek <jakub@redhat.com>
4289 Implement P0258R2 - helper for C++17
4290 std::has_unique_object_representations trait
4291 * c-common.h (enum rid): Add RID_HAS_UNIQUE_OBJ_REPRESENTATIONS.
4292 * c-common.c (c_common_reswords): Add
4293 __has_unique_object_representations.
4295 2016-10-05 Jakub Jelinek <jakub@redhat.com>
4298 * c-ubsan.c (ubsan_instrument_return): Don't call
4299 initialize_sanitizer_builtins here.
4301 2016-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
4303 * c-common.c (c_common_truthvalue_conversion): Warn also for suspicious
4304 conditional expression in boolean context when only one arm is
4307 2016-10-05 Jakub Jelinek <jakub@redhat.com>
4310 * c-ubsan.c (ubsan_instrument_shift): Return NULL_TREE if type0
4313 * c-common.c (c_common_reswords): Update comment for C++11.
4315 2016-10-04 Jason Merrill <jason@redhat.com>
4317 * c-common.c (make_tree_vector_from_ctor): New.
4318 * c-common.h: Declare it.
4320 2016-10-04 Jakub Jelinek <jakub@redhat.com>
4322 * c-cppbuiltin.c (c_cpp_builtins): Don't define
4323 __LIBGCC_JCR_SECTION_NAME__.
4325 2016-10-03 Bernd Edlinger <bernd.edlinger@hotmail.de>
4327 * c-common.c (c_common_truthvalue_conversion): Warn for suspicious
4328 left shift in boolean context.
4330 2016-09-29 Jakub Jelinek <jakub@redhat.com>
4332 Implement P0001R1 - C++17 removal of register storage class specifier
4333 * c.opt (Wregister): New warning.
4334 * c-opts.c (c_common_post_options): Enable -Wregister by
4337 2016-09-29 James Greenhalgh <james.greenhalgh@arm.com>
4339 * c-opts.c (c_common_post_options): Remove special case for
4340 TARGET_FLT_EVAL_METHOD_NON_DEFAULT with -fexcess-precision=standard
4343 2016-09-27 Jakub Jelinek <jakub@redhat.com>
4345 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_capture_star_this for
4348 * c-ada-spec.c (print_ada_declaration): Remove break after return.
4350 2016-09-26 Thomas Preud'homme <thomas.preudhomme@arm.com>
4352 * c-common.c: Include memmodel.h.
4354 2016-09-26 Marek Polacek <polacek@redhat.com>
4356 * c-lex.c (c_common_has_attribute): Handle attribute fallthrough.
4358 2016-09-26 Marek Polacek <polacek@redhat.com>
4361 * c-common.c (c_common_attribute_table): Add fallthrough attribute.
4362 (handle_fallthrough_attribute): New function.
4363 (attribute_fallthrough_p): New function.
4364 * c-common.h (attribute_fallthrough_p): Declare.
4366 2016-09-24 Marek Polacek <polacek@redhat.com>
4369 * c.opt (Wbool-operation): New.
4371 2016-09-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
4373 * c-common.c (c_common_truthvalue_conversion): Inhibit
4374 Wint-in-bool-context warning with from_macro_definition_at.
4375 Mention the expression will always evaluate to true.
4377 2016-09-21 Martin Sebor <msebor@redhat.com>
4380 * c.opt (fprintf-return-value): Temporarily initialize to zero
4381 to unblock bootstrap failures.
4383 2016-09-21 Jakub Jelinek <jakub@redhat.com>
4386 * c.opt (Waligned-new=): Add RejectNegative.
4387 (faligned-new=): Likewise. Spelling fix - change
4388 aligned_new_threshhold to aligned_new_threshold.
4389 * c-cppbuiltin.c (c_cpp_builtins): Change aligned_new_threshhold
4390 to aligned_new_threshold.
4392 2016-09-20 Martin Sebor <msebor@redhat.com>
4395 * c.opt: Add -Wformat-length and -fprintf-return-value.
4397 2016-09-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
4400 * c.opt (Wint-in-bool-context): New warning.
4401 * c-common.c (c_common_truthvalue_conversion): Warn on integer
4402 constants in boolean context.
4404 2016-09-19 Joseph Myers <joseph@codesourcery.com>
4406 * c-common.c (max_align_t_align): Also consider alignment of
4409 2016-09-15 Jason Merrill <jason@redhat.com>
4411 * c-common.c (check_cxx_fundamental_alignment_constraints): Check
4414 2016-09-14 Jason Merrill <jason@redhat.com>
4416 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
4417 limit FIELD_DECL, either.
4419 2016-09-14 Marek Polacek <polacek@redhat.com>
4421 * c-common.c (c_common_truthvalue_conversion): Use false instead of 0.
4422 * c-common.h (build_unary_op): Change nonconvert parameter type to bool.
4423 * c-omp.c (c_finish_omp_atomic): Use false instead of 0.
4425 2016-09-13 David Malcolm <dmalcolm@redhat.com>
4427 * c-common.c (warn_logical_not_parentheses): Replace
4428 rich_location::add_fixit_insert calls with add_fixit_insert_before
4429 and add_fixit_insert_after, eliminating the "next_loc" calculation.
4431 2016-09-13 Jason Merrill <jason@redhat.com>
4432 Tom de Vries <tom@codesourcery.com>
4435 * c-common.c (set_underlying_type): Don't treat array as builtin type.
4437 2016-09-13 Jason Merrill <jason@redhat.com>
4439 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
4442 2016-09-12 Jason Merrill <jason@redhat.com>
4444 * c-common.c (check_cxx_fundamental_alignment_constraints): Fix
4445 bit/byte confusion, allow large alignment for types.
4447 2016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
4450 * c-common.c (warn_for_omitted_condop): Also warn for boolean data.
4452 2016-09-12 David Malcolm <dmalcolm@redhat.com>
4455 * c-format.c (argument_parser::check_argument_type): Add params
4456 "type_start" and "conversion_char". Use the former to generate
4457 offset_to_type_start and pass it and conversion_char to
4459 (check_format_info_main): Capture the start of the type
4460 information as "type_start", and pass it an format_char
4461 to arg_parser.check_argument_type.
4462 (check_format_types): Provide an example in the leading comment.
4463 Add params "offset_to_type_start" and "conversion_char"; pass
4464 them to format_type_warning calls.
4465 (test_get_modifier_for_format_len): Likewise.
4466 (matching_type_p): New function.
4467 (get_format_for_type): Add param "conversion_char" and move
4468 implementation into...
4469 (get_format_for_type_1): ...new function, called twice.
4470 Use new function matching_type_p rather than checking for
4471 TYPE_CANONICAL equality.
4472 (get_corrected_substring): New function.
4473 (format_type_warning): Provide an example in the leading comment.
4474 Add params "offset_to_type_start" and "conversion_char". Replace
4475 call to get_format_for_type with call to get_corrected_substring
4476 and move rejection of hints for widths/precisions there.
4477 (assert_format_for_type_streq): Add param "conversion_char".
4478 (ASSERT_FORMAT_FOR_TYPE_STREQ): Add param CONVERSION_CHAR.
4479 (test_get_format_for_type_printf): Add conversion chars to the
4480 tests, adding coverage for various combinations of integer
4481 vs double conversions, and for preserving octal and hexadecimal
4483 (test_get_format_for_type_scanf): Add conversion chars to the
4486 2016-09-10 Tom de Vries <tom@codesourcery.com>
4489 * c-common.c (build_va_arg): Handle more strict
4490 targetm.canonical_va_list_type. Replace first argument type error with
4493 2016-09-09 Martin Sebor <msebor@redhat.com>
4497 * c-format.c (argument_parser::find_format_char_info): Use %qc
4498 format directive unconditionally.
4500 2016-09-09 Jason Merrill <jason@redhat.com>
4502 Implement C++17 new of over-aligned types.
4503 * c.opt: Add -faligned-new and -Waligned-new.
4504 * c-common.c (max_align_t_align): Split out from...
4505 (cxx_fundamental_alignment_p): ...here.
4506 * c-common.h: Declare it.
4507 * c-cppbuiltin.c (c_cpp_builtins): Handle aligned new.
4509 2016-09-09 Joseph Myers <joseph@codesourcery.com>
4511 * c-cppbuiltin.c (builtin_define_type_width): New function.
4512 (builtin_define_stdint_macros, c_cpp_builtins): Define type width
4515 2016-09-07 David Malcolm <dmalcolm@redhat.com>
4517 * c-common.c (get_cpp_ttype_from_string_type): Handle being passed
4519 (substring_loc::get_location): Move to substring-locations.c,
4520 keeping implementation as...
4521 (c_get_substring_location): New function, from the above, reworked
4522 to use accessors rather than member lookup.
4523 * c-common.h (class substring_loc): Move to substring-locations.h,
4524 replacing with a forward decl.
4525 (c_get_substring_location): New decl.
4526 * c-format.c: Include "substring-locations.h".
4527 (format_warning_va): Move to substring-locations.c.
4528 (format_warning_at_substring): Likewise.
4530 2016-09-06 Martin Sebor <msebor@redhat.com>
4533 * c-format.c (check_function_format): Avoid issuing warnings for
4534 functions unless they call format functions with non-constant
4537 2016-09-06 Richard Biener <rguenther@suse.de>
4540 * c-common.c (c_common_mark_addressable_vec): Handle
4541 COMPOUND_LITERAL_EXPR.
4543 2016-09-05 Marek Polacek <polacek@redhat.com>
4546 * c-common.c (bool_promoted_to_int_p): New function.
4547 (expr_has_boolean_operands_p): New function.
4548 (warn_logical_not_parentheses): Return if expr_has_boolean_operands_p.
4549 (maybe_warn_bool_compare): Use bool_promoted_to_int_p.
4551 2016-09-04 Tom de Vries <tom@codesourcery.com>
4554 2016-08-29 Tom de Vries <tom@codesourcery.com>
4556 * c-common.c (build_va_arg): Replace first argument type error
4559 2016-09-02 Jakub Jelinek <jakub@redhat.com>
4562 * c-omp.c (c_finish_omp_atomic): Reject _Atomic qualified expressions.
4563 (c_finish_omp_for): Reject _Atomic qualified iterators.
4565 2016-09-01 Martin Sebor <msebor@redhat.com>
4567 * c-ada-spec.c (dump_ada_function_declaration): Increase buffer
4568 size to guarantee it fits the output of the formatted function
4569 regardless of its arguments.
4571 2016-09-01 Marek Polacek <polacek@redhat.com>
4574 * c-common.c (resolve_overloaded_builtin): Fix formatting. Add
4577 2016-08-29 Marek Polacek <polacek@redhat.com>
4580 * c-common.c (warn_logical_not_parentheses): Don't warn for
4581 a comparison or a logical operator.
4583 2016-08-29 Tom de Vries <tom@codesourcery.com>
4585 * c-common.c (build_va_arg): Fix type comparison assert.
4587 2016-08-29 Tom de Vries <tom@codesourcery.com>
4589 * c-common.c (build_va_arg): Replace first argument type error
4592 2016-08-29 Tom de Vries <tom@codesourcery.com>
4595 * c-common.c (build_va_arg): Add first argument error. Build va_arg
4596 with error_mark_node as va_list instead of with illegal va_list.
4598 2016-08-25 Marek Polacek <polacek@redhat.com>
4599 David Malcolm <dmalcolm@redhat.com>
4601 * c-common.c (warn_logical_not_parentheses): Print fixit hints.
4602 * c-common.h (warn_logical_not_parentheses): Update declaration.
4604 2016-08-22 Marek Polacek <polacek@redhat.com>
4607 * c-common.c (warn_for_memset): Check type for null.
4609 2016-08-22 Joseph Myers <joseph@codesourcery.com>
4611 * c-cppbuiltin.c (c_cpp_builtins): Check _FloatN and
4612 _FloatNx types for suffixes for built-in functions.
4614 2016-08-19 Joseph Myers <joseph@codesourcery.com>
4617 * c-common.h (RID_FLOAT16, RID_FLOATN_NX_FIRST, RID_FLOAT32)
4618 (RID_FLOAT64, RID_FLOAT128, RID_FLOAT32X, RID_FLOAT64X)
4619 (RID_FLOAT128X): New enum rid values.
4620 (CASE_RID_FLOATN_NX): New macro.
4621 * c-common.c (c_common_reswords): Add _FloatN and _FloatNx
4623 (c_common_type_for_mode): Check for _FloatN and _FloatNx and
4624 corresponding complex types.
4625 (c_common_nodes_and_builtins): For non-C++, register _FloatN and
4626 _FloatNx and corresponding complex types.
4627 (keyword_begins_type_specifier): Use CASE_RID_FLOATN_NX.
4628 * c-cppbuiltin.c (builtin_define_float_constants): Check _FloatN
4629 and _FloatNx types for the widest type for determining
4630 DECIMAL_DIG. Define __LDBL_DECIMAL_DIG__ as well as
4631 __DECIMAL_DIG__ for long double. Handle FMA_SUFFIX being NULL.
4632 (c_cpp_builtins): Call builtin_define_float_constants for _FloatN
4634 * c-lex.c (interpret_float): Handle _FloatN and _FloatNx
4636 * c-pretty-print.c (pp_c_floating_constant): Handle _FloatN and
4639 2016-08-18 David Malcolm <dmalcolm@redhat.com>
4641 * c-opts.c (c_diagnostic_finalizer): Update for change to
4642 diagnostic_show_locus.
4644 2016-08-18 David Malcolm <dmalcolm@redhat.com>
4646 * c-common.c: Include "spellcheck.h".
4647 (cb_get_suggestion): New function.
4648 * c-common.h (cb_get_suggestion): New decl.
4649 * c-lex.c (init_c_lex): Initialize cb->get_suggestion to
4652 2016-08-18 Marek Polacek <polacek@redhat.com>
4655 * c-common.c (get_atomic_generic_size): Disallow pointer-to-function
4658 2016-08-16 David Malcolm <dmalcolm@redhat.com>
4661 * c-common.c (substring_loc::get_range): Rename to...
4662 (substring_loc::get_location): ...this, converting param from a
4663 source_range * to a location_t *. Call
4664 get_source_location_for_substring rather than
4665 get_source_range_for_substring, and pass in m_caret_idx.
4666 * c-common.h (substring_loc::substring_loc): Add param "caret_idx".
4667 (substring_loc::get_range): Replace with...
4668 (substring_loc::get_location): ...this.
4669 (substring_loc::set_caret_index): New method.
4670 (substring_loc): Add field m_caret_idx.
4671 * c-format.c (format_warning_va): Update for above changes.
4672 Rename local "substring_loc" to "fmt_substring_loc" to avoid
4673 clashing with type name.
4674 (format_warning_at_char): Add caret_idx param to substring_loc ctor.
4675 (check_argument_type): Likewise.
4676 (format_type_warning): Rename param "fmt_loc" to "whole_fmt_loc"
4677 Use a copy when emitting warnings, setting the caret index from TYPE.
4679 2016-08-16 Eric Botcazou <ebotcazou@adacore.com>
4680 Arnaud Charlet <charlet@adacore.com>
4682 * c-ada-spec.c (dump_number): New function.
4683 (handle_escape_character): Likewise.
4684 (print_ada_macros): Add handling of constant integers and strings.
4686 2016-08-12 Marek Polacek <polacek@redhat.com>
4689 * c-common.c (scalar_to_vector): Adjust fall through comment.
4690 * c-opts.c (c_common_handle_option): Likewise.
4691 * c-pragma.c (handle_pragma_pack): Add FALLTHRU.
4692 * c-pretty-print.c (c_pretty_printer::postfix_expression): Adjust
4693 fall through comment.
4694 * cilk.c (extract_free_variables): Add FALLTHRU.
4696 2016-08-10 Jason Merrill <jason@redhat.com>
4698 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_if_constexpr.
4700 2016-08-09 Jason Merrill <jason@redhat.com>
4702 * c-common.c (c_common_attribute_table): vector_size affects type
4705 2016-08-09 Marek Polacek <polacek@redhat.com>
4708 * c-ada-spec.c (dump_generic_ada_node): Add return.
4710 2016-08-09 Jason Merrill <jason@redhat.com>
4712 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_constexpr for
4713 C++17 constexpr lambdas.
4715 2016-08-08 David Malcolm <dmalcolm@redhat.com>
4718 * c-common.h (selftest::c_format_c_tests): New declaration.
4719 (selftest::run_c_tests): New declaration.
4720 * c-format.c: Include "selftest.h.
4721 (format_warning_va): Add param "corrected_substring" and use
4722 it to add a replacement fix-it hint.
4723 (format_warning_at_substring): Likewise.
4724 (format_warning_at_char): Update for new param of
4726 (argument_parser::check_argument_type): Pass "fki" to
4728 (check_format_types): Add param "fki" and pass it to
4729 format_type_warning.
4730 (deref_n_times): New function.
4731 (get_modifier_for_format_len): New function.
4732 (selftest::test_get_modifier_for_format_len): New function.
4733 (get_format_for_type): New function.
4734 (format_type_warning): Add param "fki" and use it to attempt
4735 to provide hints for argument types when calling
4736 format_warning_at_substring.
4737 (selftest::get_info): New function.
4738 (selftest::assert_format_for_type_streq): New function.
4739 (ASSERT_FORMAT_FOR_TYPE_STREQ): New macro.
4740 (selftest::test_get_format_for_type_printf): New function.
4741 (selftest::test_get_format_for_type_scanf): New function.
4742 (selftest::c_format_c_tests): New function.
4744 2016-08-08 David Malcolm <dmalcolm@redhat.com>
4747 * c-format.c: Include "diagnostic.h".
4748 (location_column_from_byte_offset): Delete.
4749 (location_from_offset): Delete.
4750 (format_warning_va): New function.
4751 (format_warning_at_substring): New function.
4752 (format_warning_at_char): New function.
4753 (check_format_arg): Capture location of format_tree and pass to
4754 check_format_info_main.
4755 (argument_parser): Add fields "start_of_this_format" and
4756 "format_string_cst".
4757 (flag_chars_t::validate): Add param "format_string_cst". Convert
4758 warning_at call using location_from_offset to call to
4759 format_warning_at_char.
4760 (argument_parser::argument_parser): Add param "format_string_cst_"
4761 and use use it to initialize field "format_string_cst".
4762 Initialize new field "start_of_this_format".
4763 (argument_parser::read_format_flags): Convert warning_at call
4764 using location_from_offset to a call to format_warning_at_char.
4765 (argument_parser::read_any_format_left_precision): Likewise.
4766 (argument_parser::read_any_format_precision): Likewise.
4767 (argument_parser::read_any_other_modifier): Likewise.
4768 (argument_parser::find_format_char_info): Likewise, in three places.
4769 (argument_parser::parse_any_scan_set): Likewise, in one place.
4770 (argument_parser::handle_conversions): Likewise, in two places.
4771 (argument_parser::check_argument_type): Add param "fmt_param_loc"
4772 and use it to make a substring_loc. Pass the latter to
4774 (check_format_info_main): Add params "fmt_param_loc" and
4775 "format_string_cst". Convert warning_at calls using
4776 location_from_offset to calls to format_warning_at_char. Pass the
4777 new params to the arg_parser ctor. Pass "format_string_cst" to
4778 flag_chars.validate. Pass "fmt_param_loc" to
4779 arg_parser.check_argument_type.
4780 (check_format_types): Convert first param from a location_t
4781 to a const substring_loc & and rename to "fmt_loc". Attempt
4782 to extract the range of the relevant parameter and pass it
4783 to format_type_warning.
4784 (format_type_warning): Convert first param from a location_t
4785 to a const substring_loc & and rename to "fmt_loc". Add
4786 params "param_range" and "type". Replace calls to warning_at
4787 with calls to format_warning_at_substring.
4789 2016-08-08 David Malcolm <dmalcolm@redhat.com>
4791 * c-format.c (class flag_chars_t): New class.
4792 (struct length_modifier): New struct.
4793 (class argument_parser): New class.
4794 (flag_chars_t::flag_chars_t): New ctor.
4795 (flag_chars_t::has_char_p): New method.
4796 (flag_chars_t::add_char): New method.
4797 (flag_chars_t::validate): New method.
4798 (flag_chars_t::get_alloc_flag): New method.
4799 (flag_chars_t::assignment_suppression_p): New method.
4800 (argument_parser::argument_parser): New ctor.
4801 (argument_parser::read_any_dollar): New method.
4802 (argument_parser::read_format_flags): New method.
4803 (argument_parser::read_any_format_width): New method.
4804 (argument_parser::read_any_format_left_precision): New method.
4805 (argument_parser::read_any_format_precision): New method.
4806 (argument_parser::handle_alloc_chars): New method.
4807 (argument_parser::read_any_length_modifier): New method.
4808 (argument_parser::read_any_other_modifier): New method.
4809 (argument_parser::find_format_char_info): New method.
4810 (argument_parser::validate_flag_pairs): New method.
4811 (argument_parser::give_y2k_warnings): New method.
4812 (argument_parser::parse_any_scan_set): New method.
4813 (argument_parser::handle_conversions): New method.
4814 (argument_parser::check_argument_type): New method.
4815 (check_format_info_main): Introduce classes argument_parser
4816 and flag_chars_t, moving the code within the loop into methods
4817 of these classes. Make various locals "const".
4819 2016-08-05 David Malcolm <dmalcolm@redhat.com>
4821 * c-common.c: Include "substring-locations.h".
4822 (get_cpp_ttype_from_string_type): New function.
4823 (g_string_concat_db): New global.
4824 (substring_loc::get_range): New method.
4825 * c-common.h (g_string_concat_db): New declaration.
4826 (class substring_loc): New class.
4827 * c-lex.c (lex_string): When concatenating strings, capture the
4828 locations of all tokens using a new obstack, and record the
4829 concatenation locations within g_string_concat_db.
4830 * c-opts.c (c_common_init_options): Construct g_string_concat_db
4833 2016-07-29 Marek Polacek <polacek@redhat.com>
4836 * c-common.c (c_common_truthvalue_conversion): Use LOCATION for the
4837 parentheses warning.
4840 * c-common.c (handle_alloc_align_attribute): Also check FUNCTION_DECL.
4842 2016-07-28 Martin Liska <mliska@suse.cz>
4844 PR gcov-profile/68025
4845 * c-common.c (handle_no_profile_instrument_function_attribute):
4847 2016-07-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
4849 * c-common.c (check_user_alignment): Use LOG2_BITS_PER_UNIT instead of
4852 2016-07-25 Jason Merrill <jason@redhat.com>
4855 * c.opt (fconstexpr-loop-limit): New.
4857 2016-07-22 Martin Sebor <msebor@redhat.com>
4860 * c-common.c (resolve_overloaded_builtin): Avoid converting
4861 __atomic_compare_exchange_n return type to that of what its
4862 first argument points to.
4864 2016-07-22 Uros Bizjak <ubizjak@gmail.com>
4866 * c-common.c: Use HOST_WIDE_INT_M1U instead of
4867 ~(unsigned HOST_WIDE_INT) 0.
4869 2016-07-22 Martin Liska <mliska@suse.cz>
4871 PR gcov-profile/69028
4872 PR gcov-profile/62047
4873 * cilk.c (create_cilk_helper_decl): Set location of a new decl
4874 to the current_function_decl.
4876 2016-07-21 Jason Merrill <jason@redhat.com>
4879 * c-common.c (c_common_truthvalue_conversion): Check
4880 c_inhibit_evaluation_warnings for warning about address of
4883 2016-07-20 David Malcolm <dmalcolm@redhat.com>
4885 * c-common.h (lookup_name_fuzzy): Convert return type from tree to
4888 2016-07-15 Jason Merrill <jason@redhat.com>
4890 * c-opts.c (c_common_post_options): Update -fabi-version default to 11.
4892 2016-07-15 Jakub Jelinek <jakub@redhat.com>
4895 * c-common.h (enum lookup_name_fuzzy_kind): Add
4896 FUZZY_LOOKUP_FUNCTION_NAME.
4898 2016-07-08 Jason Merrill <jason@redhat.com>
4900 P0145: Refining Expression Order for C++.
4901 * c.opts (-fargs-in-order): Rename to -fstrong-eval-order.
4904 2016-07-05 Markus Trippelsdorf <markus@trippelsdorf.de>
4907 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_rvalue_references.
4909 2016-06-29 Thomas Schwinge <thomas@codesourcery.com>
4911 * c-pragma.h (enum pragma_kind): Rename
4912 PRAGMA_OMP_DECLARE_REDUCTION to PRAGMA_OMP_DECLARE. Adjust all
4915 2016-06-29 Richard Biener <rguenther@suse.de>
4918 * c-common.c (c_common_get_alias_set): Remove union type punning case.
4920 2016-06-24 Jason Merrill <jason@redhat.com>
4922 P0145R2: Refining Expression Order for C++.
4923 * c-common.c (verify_tree) [COMPOUND_EXPR]: Fix handling on LHS of
4926 2016-06-24 Jakub Jelinek <jakub@redhat.com>
4928 * c-common.c (check_builtin_function_arguments): Require last
4929 argument of BUILT_IN_*_OVERFLOW_P to have INTEGER_TYPE type.
4930 Adjust wording of diagnostics for BUILT_IN_*_OVERLFLOW
4931 if the last argument is pointer to enumerated or boolean type.
4933 2016-06-22 David Malcolm <dmalcolm@redhat.com>
4936 * c-common.h (enum lookup_name_fuzzy_kind): New enum.
4937 (lookup_name_fuzzy): New prototype.
4939 2016-06-21 John David Anglin <danglin@gcc.gnu.org>
4941 * c-common.c (get_source_date_epoch): Use int64_t instead of long long.
4943 2016-06-14 Jason Merrill <jason@redhat.com>
4945 P0145R2: Refining Expression Order for C++.
4946 * c.opt (fargs-in-order): New.
4947 * c-opts.c (c_common_post_options): Adjust flag_args_in_order.
4949 2016-06-13 Jakub Jelinek <jakub@redhat.com>
4952 * c-gimplify.c (ubsan_walk_array_refs_r): Set *walk_subtrees = 0 on
4953 all BIND_EXPRs, and on all BIND_EXPRs recurse also on BIND_EXPR_BODY.
4955 PR preprocessor/71183
4956 * c-ppoutput.c (init_pp_output): Set cb->get_source_date_epoch
4957 to cb_get_source_date_epoch.
4959 2016-06-10 Jakub Jelinek <jakub@redhat.com>
4962 * c.opt (Wpsabi): Add Warning flag.
4964 2016-06-10 Martin Sebor <msebor@redhat.com>
4967 * c-common.c (handle_nonnull_attribute): Accept
4968 the nonnull attribute in type-generic builtins.
4970 2016-06-09 Martin Sebor <msebor@redhat.com>
4973 * c-common.c (builtin_function_validate_nargs): Make text of error
4974 message consistent with others like it.
4976 2016-06-08 Martin Sebor <msebor@redhat.com>
4977 Jakub Jelinek <jakub@redhat.com>
4981 * c-common.c (check_builtin_function_arguments): Handle
4982 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
4984 2016-06-08 Richard Biener <rguenther@suse.de>
4986 * c-common.c (parse_optimize_options): Improve diagnostic messages.
4988 2016-06-07 Richard Biener <rguenther@suse.de>
4991 * c-common.c (parse_optimize_options): Only apply CL_OPTIMIZATION
4992 options and warn about others.
4994 2016-06-01 Eduard Sanou <dhole@openmailbox.org>
4996 * c-common.c (get_source_date_epoch): Rename to
4997 cb_get_source_date_epoch.
4998 * c-common.c (cb_get_source_date_epoch): Use a single generic erorr
4999 message when the parsing fails. Use error_at instead of fatal_error.
5000 * c-common.h (get_source_date_epoch): Rename to
5001 cb_get_source_date_epoch.
5002 * c-common.h (cb_get_source_date_epoch): Prototype.
5003 * c-common.h (MAX_SOURCE_DATE_EPOCH): Define.
5004 * c-common.h (c_omp_region_type): Remove trailing comma.
5005 * c-lex.c (init_c_lex): Set cb->get_source_date_epoch callback.
5006 * c-lex.c (c_lex_with_flags): Remove initialization of
5007 pfile->source_date_epoch.
5009 2016-05-30 Jakub Jelinek <jakub@redhat.com>
5012 * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_DEPEND to
5013 C_OMP_CLAUSE_SPLIT_TARGET. Put OMP_CLAUSE_NOWAIT to
5014 C_OMP_CLAUSE_SPLIT_TARGET if combined with target construct,
5015 instead of C_OMP_CLAUSE_SPLIT_FOR.
5017 2016-05-24 Richard Biener <rguenther@suse.de>
5021 * c-common.h (convert_vector_to_pointer_for_subscript): Rename to ...
5022 (convert_vector_to_array_for_subscript): ... this.
5023 * c-common.c (convert_vector_to_pointer_for_subscript): Use a
5024 VIEW_CONVERT_EXPR to an array type. Rename to ...
5025 (convert_vector_to_array_for_subscript): ... this.
5027 2016-05-12 Marek Polacek <polacek@redhat.com>
5030 * c-common.c (pointer_int_sum): Call size_in_bytes_loc instead of
5031 size_in_bytes and pass LOC to it.
5033 2016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
5036 * c.opt (Wduplicate-decl-specifier): New option.
5038 2016-05-11 Marek Polacek <polacek@redhat.com>
5041 * c-common.c (diagnose_mismatched_attributes): New function.
5042 * c-common.h (diagnose_mismatched_attributes): Declare.
5044 2016-05-04 Marek Polacek <polacek@redhat.com>
5046 * c.opt (Wdangling-else): New option.
5048 2016-05-03 Marek Polacek <polacek@redhat.com>
5051 * c-common.c (builtin_function_validate_nargs): Add location
5053 (check_builtin_function_arguments): Add location and arguments
5054 parameters. Use them.
5055 * c-common.h (check_builtin_function_arguments): Update declaration.
5057 2016-05-03 Richard Biener <rguenther@suse.de>
5059 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Do not
5060 allow call args to gimplify to SSA names.
5062 2016-05-03 Marek Polacek <polacek@redhat.com>
5064 * c-common.h (enum c_omp_region_type): Remove stray comma.
5066 2016-05-02 Cesar Philippidis <cesar@codesourcery.com>
5068 * c-common.h (enum c_omp_region_type): Define.
5070 2016-05-02 Richard Sandiford <richard.sandiford@arm.com>
5072 * c-common.c (shorten_compare): Use wi::to_wide.
5074 2016-04-29 Cesar Philippidis <cesar@codesourcery.com>
5077 * c-common.h (c_oacc_split_loop_clauses): Add boolean argument.
5078 * c-omp.c (c_oacc_split_loop_clauses): Use it to duplicate
5079 reduction clauses in acc parallel loops.
5081 2016-04-29 Marek Polacek <polacek@redhat.com>
5084 * c-common.c (warn_for_memset): Check domain before accessing it.
5086 2016-04-29 Dominik Vogt <vogt@linux.vnet.ibm.com>
5089 * c-common.c (handle_aligned_attribute): Allow 0 as an argument to the
5090 "aligned" attribute.
5092 2016-04-28 Jason Merrill <jason@redhat.com>
5094 * c-lex.c (c_common_has_attribute): Handle nodiscard.
5096 2016-04-28 Eduard Sanou <dhole@openmailbox.org>
5097 Matthias Klose <doko@debian.org>
5099 * c-common.c (get_source_date_epoch): New function, gets the environment
5100 variable SOURCE_DATE_EPOCH and parses it as long long with error
5102 * c-common.h (get_source_date_epoch): Prototype.
5103 * c-lex.c (c_lex_with_flags): set parse_in->source_date_epoch.
5105 2015-04-27 Ryan Burn <contact@rnburn.com>
5109 * cilk.c (cilk_ignorable_spawn_rhs_op): Change to external linkage.
5110 (cilk_recognize_spawn): Renamed from recognize_spawn and change to
5112 (cilk_detect_and_unwrap): Corresponding changes.
5113 (extract_free_variables): Don't extract free variables from
5114 AGGR_INIT_EXPR slot.
5115 * c-common.h (cilk_ignorable_spawn_rhs_op): Prototype.
5116 (cilk_recognize_spawn): Likewise.
5118 2016-04-27 Bernd Schmidt <bschmidt@redhat.com>
5120 * c.opt (Wmemset-elt-size): New option.
5121 * c-common.c (warn_for_memset): New function.
5122 * c-common.h (warn_for_memset): Declare.
5124 2016-04-25 Jason Merrill <jason@redhat.com>
5126 * c-common.c (handle_unused_attribute): Accept CONST_DECL.
5128 * c-common.h: Declare it.
5129 * c-lex.c (c_common_has_attribute): Add maybe_unused.
5131 2016-04-22 Jason Merrill <jason@redhat.com>
5133 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_range_based_for.
5135 2016-04-20 Ilya Verbin <ilya.verbin@intel.com>
5138 * c-cilkplus.c (c_finish_cilk_clauses): Remove function.
5139 * c-common.h (c_finish_cilk_clauses): Remove declaration.
5141 2016-04-18 Michael Matz <matz@suse.de>
5143 * c-common.c (handle_aligned_attribute): Use SET_TYPE_ALIGN
5146 2016-04-17 Eric Botcazou <ebotcazou@adacore.com>
5148 * c-ada-spec.c (get_underlying_decl): Return the typedef, if any.
5149 (dump_generic_ada_node) <POINTER_TYPE>: Clean up handling of access
5150 to incomplete types.
5151 (dump_nested_type): Remove redundant tests and tidy up.
5152 (print_ada_declaration): Also set TREE_VISITED on the declaration of
5153 a type which is the typedef of an original type.
5155 2016-04-15 Marek Polacek <polacek@redhat.com>
5158 * c-common.c (build_va_arg): Change two asserts into errors and return
5161 2016-04-13 Marek Polacek <polacek@redhat.com>
5164 * c-indentation.c (should_warn_for_misleading_indentation): Bail out
5165 for switch statements, too.
5167 2016-03-28 Jason Merrill <jason@redhat.com>
5169 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_range_based_for.
5171 2016-03-23 Marek Polacek <polacek@redhat.com>
5174 * c.opt (Wignored-attributes): New option.
5176 2016-03-22 David Malcolm <dmalcolm@redhat.com>
5179 * c-indentation.c (warn_for_misleading_indentation): Rewrite the
5180 diagnostic text, reversing the order of the warning and note so
5181 that they appear in source order.
5183 2016-03-17 Marek Polacek <polacek@redhat.com>
5186 * c-common.c (resolve_overloaded_builtin): Set TREE_USED for the fetch
5189 2016-03-14 Jason Merrill <jason@redhat.com>
5191 * c-cppbuiltin.c (c_cpp_builtins): Set __cpp_hex_float.
5193 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_range_based_for.
5195 2016-03-09 Richard Biener <rguenther@suse.de>
5198 * c-common.c (strict_aliasing_warning): Add back
5199 alias_sets_conflict_p check.
5201 2016-03-08 Jason Merrill <jason@redhat.com>
5203 * c-opts.c (set_std_cxx1z): Don't enable concepts.
5205 2016-03-04 David Malcolm <dmalcolm@redhat.com>
5208 * c-indentation.c (get_visual_column): Move code to determine next
5210 (next_tab_stop): ...this new function.
5211 (line_contains_hash_if): Delete function.
5212 (detect_preprocessor_logic): Delete function.
5213 (get_first_nws_vis_column): New function.
5214 (detect_intervening_unindent): New function.
5215 (should_warn_for_misleading_indentation): Replace call to
5216 detect_preprocessor_logic with a call to
5217 detect_intervening_unindent.
5219 2016-03-04 David Malcolm <dmalcolm@redhat.com>
5222 * c-indentation.c (should_warn_for_misleading_indentation): When
5223 suppressing warnings about cases where the guard and body are on
5224 the same column, only use the first non-whitespace column in place
5225 of the guard token column when dealing with "else" clauses.
5226 When rejecting aligned BODY and NEXT, loosen the requirement
5227 from equality with the first non-whitespace of guard to simply
5228 that they not be indented relative to it.
5230 2016-03-04 Richard Biener <rguenther@suse.de>
5233 * c-common.c (strict_aliasing_warning): Use alias_set_subset_of
5234 instead of alias_sets_conflict_p.
5236 2016-03-01 Marek Polacek <polacek@redhat.com>
5239 * c-common.c (reject_gcc_builtin): Check for FUNCTION_DECL rather than
5242 2016-02-22 Martin Sebor <msebor@redhat.com>
5245 * c-common.c (check_builtin_function_arguments): Validate and
5246 reject invalid arguments to __builtin_alloca_with_align.
5248 2016-02-20 Mark Wielaard <mjw@redhat.com>
5251 * c.opt (Wunused-const-variable): Turn into Alias for...
5252 (Wunused-const-variable=): New option.
5254 2016-02-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
5257 * c-opts.c (c_common_post_options): Move call to set_std_cxx14 from
5259 (c_common_init_options): ...to here.
5260 (set_std_cxx98): Initialize flag_isoc94 and flag_isoc99.
5262 2016-02-19 Jakub Jelinek <jakub@redhat.com>
5265 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_GRAINSIZE.
5266 (init_pragma): Register PRAGMA_CILK_GRAINSIZE even for
5267 flag_preprocess_only.
5269 2016-02-16 Jakub Jelinek <jakub@redhat.com>
5272 * c.opt (Wnonnull-compare): Enable for -Wall.
5274 2016-02-15 Jakub Jelinek <jakub@redhat.com>
5277 * c-common.c (sync_resolve_size): Diagnose too few arguments
5278 even when params is non-NULL empty vector.
5280 2016-02-08 Bernd Schmidt <bschmidt@redhat.com>
5283 * c.opt (fshort-double): Remove.
5285 2016-02-05 Martin Sebor <msebor@redhat.com>
5288 * c.opt (Warning options): Update -Wplacement-new to take
5289 an optional argument.
5291 2016-02-01 Jakub Jelinek <jakub@redhat.com>
5293 PR preprocessor/69543
5295 * c-pragma.c (handle_pragma_diagnostic): Pass input_location
5296 instead of loc to control_warning_option.
5298 2016-02-01 Nathan Sidwell <nathan@codesourcery.com>
5300 * c.opt (fopenacc-dim=): New option.
5302 2016-01-27 Ryan Burn <contact@rnburn.com>
5305 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Change to use
5306 gimplify_arg. Removed superfluous post_p argument.
5307 * c-family.h (cilk_gimplify_call_params_in_spawned_fn): Removed
5308 superfluous post_p argument.
5309 * c-gimplify.c (c_gimplify_expr): Likewise.
5311 2016-01-26 David Malcolm <dmalcolm@redhat.com>
5314 * c-opts.c (c_diagnostic_finalizer): Replace invocation of
5315 pp_newline_and_flush with pp_flush.
5317 2016-01-20 Martin Sebor <msebor@redhat.com>
5320 * c-common.c (sync_resolve_size): Avoid printing diagnostic about
5321 an incompatible argument when the argument isn't a valid tree node.
5323 2016-01-18 Jason Merrill <jason@redhat.com>
5326 * c-common.c (check_function_arguments_recurse): Fold the whole
5327 COND_EXPR, not just the condition.
5329 2016-01-18 Tom de Vries <tom@codesourcery.com>
5331 * c-omp.c (c_oacc_split_loop_clauses): Don't copy OMP_CLAUSE_REDUCTION,
5332 classify as loop clause.
5334 2016-01-15 Jakub Jelinek <jakub@redhat.com>
5337 * c-pragma.c (c_register_pragma_1): Adjust comment to note that
5338 C++ FE no longer has limit on number of pragmas.
5340 2015-01-14 Ryan Burn <contact@rnburn.com>
5343 * cilk.c (create_cilk_wrapper_body): Call fold_build_cleanup_point_expr
5344 to add missing cleanup point.
5346 2016-01-14 David Malcolm <dmalcolm@redhat.com>
5349 * c-indentation.c (get_visual_column): Add location_t param.
5350 Handle the column number being zero by effectively disabling the
5351 warning, with an "inform".
5352 (should_warn_for_misleading_indentation): Add location_t argument
5353 for all uses of get_visual_column.
5355 2016-01-10 Patrick Palka <ppalka@gcc.gnu.org>
5358 * c-indentation.c (should_warn_for_misleading_indentation):
5359 Don't warn about do-while statements.
5361 2016-01-07 Martin Sebor <msebor@redhat.com>
5364 * c-common.c (sync_resolve_size): Reject first argument when it's
5367 2016-01-05 David Malcolm <dmalcolm@redhat.com>
5370 * c-indentation.c (get_visual_column): Remove default argument.
5371 (should_warn_for_misleading_indentation): For the multiline case,
5372 update call to get_visual_column for next_stmt_exploc so that it
5373 captures the location of the first non-whitespace character in the
5374 relevant line. Don't issue warnings if there is non-whitespace
5375 before the next statement.
5377 2016-01-04 Jakub Jelinek <jakub@redhat.com>
5379 Update copyright years.
5381 2015-12-21 David Malcolm <dmalcolm@redhat.com>
5383 * c-common.c (binary_op_error): Convert first param from
5384 location_t to rich_location * and use it when emitting an error.
5385 * c-common.h (binary_op_error): Convert first param from
5386 location_t to rich_location *.
5388 2015-12-16 David Malcolm <dmalcolm@redhat.com>
5390 * c-common.h (conflict_marker_get_final_tok_kind): New prototype.
5391 * c-lex.c (conflict_marker_get_final_tok_kind): New function.
5393 2015-12-15 Ilya Verbin <ilya.verbin@intel.com>
5395 * c-common.c (c_common_attribute_table): Handle "omp declare target
5398 2015-12-14 Jakub Jelinek <jakub@redhat.com>
5401 * c.opt (Wmissing-format-attribute, Wnormalized): Add Warning option.
5403 2014-12-12 Tobias Burnus <burnus@net-b.de>
5406 * c-format.c (gcc_gfc_char_table): Add 'q' flag to remaining
5407 specifiers (%d, %i,%u and %c).
5409 2015-12-10 David Malcolm <dmalcolm@redhat.com>
5411 * c.opt (Wmisleading-indentation): Add to -Wall for C and C++.
5413 2015-12-08 Jakub Jelinek <jakub@redhat.com>
5417 * c.opt (Wfloat-conversion, Wsign-conversion): Add Warning.
5418 * c-pragma.c (handle_pragma_diagnostic): Adjust
5419 control_warning_option caller.
5421 2015-12-07 David Malcolm <dmalcolm@redhat.com>
5423 * c-common.c (c_cpp_error): Update for change to
5424 rich_location::set_range.
5426 2015-12-04 Paolo Bonzini <bonzini@gnu.org>
5428 * c-common.c (maybe_warn_shift_overflow): Warn on all overflows if
5429 shifting 1 out of the sign bit.
5431 2015-12-04 Kirill Yukhin <kirill.yukhin@intel.com>
5433 * c-common.c (c_common_attribute_table[]): Update max arguments
5434 count for "simd" attribute.
5435 (handle_simd_attribute): Parse "notinbranch" and "inbranch" arguments.
5437 2015-12-03 Jakub Jelinek <jakub@redhat.com>
5439 PR preprocessor/57580
5440 * c-ppoutput.c (print): Change printed field to bool.
5441 Move src_file last for smaller padding.
5442 (init_pp_output): Set print.printed to false instead of 0.
5443 (scan_translation_unit): Fix up formatting. Set print.printed
5444 to true after printing something other than newline.
5445 (scan_translation_unit_trad): Set print.printed to true instead of 1.
5446 (maybe_print_line_1): Set print.printed to false instead of 0.
5447 (print_line_1): Likewise.
5448 (do_line_change): Set print.printed to true instead of 1.
5449 (cb_define, dump_queued_macros, cb_include, cb_def_pragma,
5450 dump_macro): Set print.printed to false after printing newline.
5452 2015-12-02 Jason Merrill <jason@redhat.com>
5454 * c-common.c (fold_for_warn): New.
5455 (warn_logical_operator, warn_tautological_cmp)
5456 (check_function_arguments_recurse, maybe_warn_bool_compare): Use it.
5458 * c-common.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
5459 (c_fully_fold_internal, decl_constant_value_for_optimization):
5461 * c-common.h: Don't declare decl_constant_value_for_optimization.
5463 2015-12-02 Joseph Myers <joseph@codesourcery.com>
5466 * c-common.h (c_build_qualified_type): Add extra default
5469 2015-12-01 Julian Brown <julian@codesourcery.com>
5470 Cesar Philippidis <cesar@codesourcery.com>
5471 James Norris <James_Norris@mentor.com>
5473 * c-pragma.c (oacc_pragmas): Add PRAGMA_OACC_HOST_DATA.
5474 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_HOST_DATA.
5475 (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_USE_DEVICE.
5477 2015-11-30 Eric Botcazou <ebotcazou@adacore.com>
5479 * c-ada-spec.c (print_ada_macros): Remove redundant blank line.
5480 (decl_sloc_common): Delete and move bulk of processing to...
5481 (decl_sloc): ...here.
5482 (pp_ada_tree_identifier): Remove reference to QUAL_UNION_TYPE.
5483 (dump_ada_double_name): Remove S parameter and compute the suffix.
5484 (dump_ada_array_type): Add PARENT parameter. Simplify computation of
5485 element type and deal with an anonymous one.
5486 (dump_ada_template): Use RECORD_OR_UNION_TYPE_P macro.
5487 (dump_generic_ada_node): Tweak. Adjust call to dump_ada_array_type
5488 and remove reference to QUAL_UNION_TYPE.
5489 (dump_nested_types): Make 2 passes on the fields and move bulk to...
5490 (dump_nested_type): ...here. New function extracted from above.
5491 Generate a full declaration for anonymous element type of arrays.
5492 (print_ada_declaration): Really skip anonymous declarations. Remove
5493 references to QUAL_UNION_TYPE. Adjust call to dump_ada_array_type.
5494 Clean up processing of declarations of array types and objects.
5495 (print_ada_struct_decl): Remove reference to QUAL_UNION_TYPE.
5496 Remove obsolete code and tidy up.
5498 2015-11-29 Jan Hubicka <hubicka@ucw.cz>
5501 * c-common.c (handle_transparent_union_attribute): Update
5504 2015-11-27 Martin Liska <mliska@suse.cz>
5507 * array-notation-common.c (cilkplus_extract_an_triplets):
5508 Release vector of vectors.
5509 * cilk.c (gimplify_cilk_spawn): Free allocated memory.
5511 2015-11-26 Eric Botcazou <ebotcazou@adacore.com>
5514 * c-ada-spec.c (dump_nested_types): Add guard for error_mark_node.
5515 (print_ada_struct_decl): Likewise.
5517 2015-11-23 Igor Zamyatin <igor.zamyatin@intel.com>
5520 * c-gimplify.c (c_gimplify_expr): Stop the process if see an error.
5521 * cilk.c (recognize_spawn): Determine location in a more precise
5524 2015-11-19 Jason Merrill <jason@redhat.com>
5526 * c-common.c (shorten_compare): But look through macros from
5529 2015-11-18 Jason Merrill <jason@redhat.com>
5531 * c-common.c (shorten_compare): Don't -Wtype-limits if the
5532 non-constant operand comes from a macro.
5534 2015-11-17 Jason Merrill <jason@redhat.com>
5537 * c-common.c (warn_tautological_cmp): Fold before checking for
5540 2015-11-16 Marek Polacek <polacek@redhat.com>
5543 * c-common.c (check_case_bounds): Fold low and high cases.
5545 2015-11-16 Marek Polacek <polacek@redhat.com>
5547 * c-ada-spec.c (dump_ada_template): Use RECORD_OR_UNION_TYPE_P.
5548 * c-common.c (c_common_get_alias_set): Likewise.
5549 (handle_visibility_attribute): Likewise.
5551 2015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
5553 * c-common.c (handle_simd_attribute): New.
5554 (struct attribute_spec): Add entry for "simd".
5555 (handle_simd_attribute): New.
5557 2015-11-13 Kai Tietz <ktietz70@googlemail.com>
5559 * c-lex.c (interpret_float): Use fold_convert.
5561 2015-11-13 David Malcolm <dmalcolm@redhat.com>
5563 * c-common.c (c_fully_fold_internal): Capture existing souce_range,
5564 and store it on the result.
5565 * c-opts.c (c_common_init_options): Set
5566 global_dc->colorize_source_p.
5568 2015-11-12 James Norris <jnorris@codesourcery.com>
5569 Joseph Myers <joseph@codesourcery.com>
5571 * c-pragma.c (oacc_pragmas): Add entry for declare directive.
5572 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_DECLARE.
5573 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT and
5574 PRAGMA_OACC_CLAUSE_LINK.
5576 2015-11-11 Marek Polacek <polacek@redhat.com>
5580 * c-common.c (valid_array_size_p): New function.
5581 * c-common.h (valid_array_size_p): Declare.
5583 2015-11-11 Dominique d'Humieres <dominiq@lps.ens.fr>
5586 * c-pragma.c (c_register_pragma_1): Update the gcc_assert to 256.
5588 2015-11-11 Andrew MacLeod <amacleod@redhat.com>
5590 * array-notation-common.c: Remove unused header files.
5591 * c-ada-spec.c: Likewise.
5592 * c-cilkplus.c: Likewise.
5593 * c-common.c: Likewise.
5594 * c-cppbuiltin.c: Likewise.
5595 * c-dump.c: Likewise.
5596 * c-format.c: Likewise.
5597 * c-gimplify.c: Likewise.
5598 * c-indentation.c: Likewise.
5599 * c-lex.c: Likewise.
5600 * c-omp.c: Likewise.
5601 * c-opts.c: Likewise.
5602 * c-pch.c: Likewise.
5603 * c-ppoutput.c: Likewise.
5604 * c-pragma.c: Likewise.
5605 * c-pretty-print.c: Likewise.
5606 * c-semantics.c: Likewise.
5607 * c-ubsan.c: Likewise.
5609 * stub-objc.c: Likewise.
5611 2015-11-09 Thomas Schwinge <thomas@codesourcery.com>
5612 Cesar Philippidis <cesar@codesourcery.com>
5613 James Norris <jnorris@codesourcery.com>
5614 Julian Brown <julian@codesourcery.com>
5615 Nathan Sidwell <nathan@codesourcery.com>
5617 * c-pragma.c (oacc_pragmas): Add "routine".
5618 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ROUTINE.
5620 2015-11-08 Eric Botcazou <ebotcazou@adacore.com>
5622 * c-common.c (c_common_attributes): Add scalar_storage_order.
5623 (handle_scalar_storage_order_attribute): New function.
5624 * c-pragma.c (global_sso): New variable.
5625 (maybe_apply_pragma_scalar_storage_order): New function.
5626 (handle_pragma_scalar_storage_order): Likewise.
5627 (init_pragma): Register scalar_storage_order.
5628 * c-pragma.h (maybe_apply_pragma_scalar_storage_order): Declare.
5629 * c.opt (Wscalar-storage-order): New warning.
5630 (fsso-struct=): New option.
5632 2015-11-08 Martin Sebor <msebor@redhat.com>
5634 * c.opt (Wplacement-new): Add a period to the end of a sentence.
5636 2015-11-07 Richard Sandiford <richard.sandiford@arm.com>
5638 * c-common.c: Don't undef DEF_BUILTIN.
5640 2015-11-06 David Malcolm <dmalcolm@redhat.com>
5642 * c-common.c (c_cpp_error): Convert parameter from location_t to
5643 rich_location *. Eliminate the "column_override" parameter and
5644 the call to diagnostic_override_column.
5645 Update the "done_lexing" clause to set range 0
5646 on the rich_location, rather than overwriting a location_t.
5647 * c-common.h (c_cpp_error): Convert parameter from location_t to
5648 rich_location *. Eliminate the "column_override" parameter.
5650 2015-11-05 Cesar Philippidis <cesar@codesourcery.com>
5651 Thomas Schwinge <thomas@codesourcery.com>
5652 James Norris <jnorris@codesourcery.com>
5654 * c-omp.c (c_oacc_split_loop_clauses): Make TILE, GANG, WORKER, VECTOR,
5655 AUTO, SEQ, INDEPENDENT and PRIVATE loop clauses. Associate REDUCTION
5656 clauses with parallel and kernels and loops.
5657 * c-pragma.h (enum pragma_omp_clause): Add entries for
5658 PRAGMA_OACC_CLAUSE_{INDEPENDENT,TILE,DEFAULT}.
5659 * pt.c (tsubst_omp_clauses): Add support for OMP_CLAUSE_{NUM_GANGS,
5660 NUM_WORKERS,VECTOR_LENGTH,GANG,WORKER,VECTOR,ASYNC,WAIT,TILE,AUTO,
5662 (tsubst_expr): Add support for OMP_CLAUSE_{KERNELS,PARALLEL,LOOP}.
5664 2015-11-05 Martin Sebor <msebor@redhat.com>
5667 * c.opt (-Wplacement-new): New option.
5669 2015-11-05 Jakub Jelinek <jakub@redhat.com>
5671 * c-common.h (c_finish_omp_atomic): Add TEST argument.
5672 (c_omp_check_loop_iv, c_omp_check_loop_iv_exprs): New prototypes.
5673 * c-omp.c (c_finish_omp_atomic): Add TEST argument. Don't call
5674 save_expr or create_tmp_var* if TEST is true.
5675 (c_finish_omp_for): Store OMP_FOR_ORIG_DECLS always.
5676 Don't call add_stmt here.
5677 (struct c_omp_check_loop_iv_data): New type.
5678 (c_omp_check_loop_iv_r, c_omp_check_loop_iv,
5679 c_omp_check_loop_iv_exprs): New functions.
5680 (c_omp_split_clauses): Adjust for lastprivate being allowed on
5682 (c_omp_declare_simd_clauses_to_numbers): Change
5683 OMP_CLAUSE_LINEAR_VARIABLE_STRIDE OMP_CLAUSE_LINEAR_STEP into numbers.
5684 (c_omp_declare_simd_clauses_to_decls): Similarly change those
5685 from numbers to PARM_DECLs.
5687 2015-11-04 Mikhail Maltsev <maltsevm@gmail.com>
5689 * c-omp.c (c_omp_split_clauses): Remove conditional compilation. Use
5692 2015-11-03 Bernd Schmidt <bschmidt@redhat.com>
5695 * c-common.h (fold_offsetof_1): Add argument.
5696 * c-common.c (fold_offsetof_1): Diagnose more invalid
5697 offsetof expressions that reference elements past the end of
5700 2015-11-03 Thomas Schwinge <thomas@codesourcery.com>
5701 Chung-Lin Tang <cltang@codesourcery.com>
5703 * c-pragma.c (oacc_pragmas): Add "atomic".
5704 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ATOMIC.
5706 2015-10-30 Evgeny Stupachenko <evstupac@gmail.com>
5708 * c-common.c (handle_target_clones_attribute): New.
5709 (c_common_attribute_table): Add handle_target_clones_attribute.
5710 (handle_always_inline_attribute): Add check on target_clones attribute.
5711 (handle_target_attribute): Ditto.
5713 2015-10-29 Andrew MacLeod <amacleod@redhat.com>
5715 * array-notation-common.c: Reorder #include's and remove duplicates.
5716 * c-ada-spec.c: Likewise.
5717 * c-cilkplus.c: Likewise.
5718 * c-common.c: Likewise.
5719 * c-cppbuiltin.c: Likewise.
5720 * c-dump.c: Likewise.
5721 * c-format.c: Likewise.
5722 * c-gimplify.c: Likewise.
5723 * c-indentation.c: Likewise.
5724 * c-lex.c: Likewise.
5725 * c-omp.c: Likewise.
5726 * c-opts.c: Likewise.
5727 * c-pch.c: Likewise.
5728 * c-ppoutput.c: Likewise.
5729 * c-pragma.c: Likewise.
5730 * c-pretty-print.c: Likewise.
5731 * c-semantics.c: Likewise.
5732 * c-ubsan.c: Likewise.
5734 * stub-objc.c: Likewise.
5736 2015-10-28 Jason Merrill <jason@redhat.com>
5738 * c-common.c (pointer_int_sum): Fold the MULT_EXPR.
5740 2015-10-27 Thomas Schwinge <thomas@codesourcery.com>
5741 James Norris <jnorris@codesourcery.com>
5742 Cesar Philippidis <cesar@codesourcery.com>
5746 * c-common.h (c_oacc_split_loop_clauses): Declare function.
5747 * c-omp.c (c_oacc_split_loop_clauses): New function.
5749 2015-10-21 Martin Sebor <msebor@redhat.com>
5752 * c.opt: End each sentence that describes an option with a period.
5754 2015-10-20 Marek Polacek <polacek@redhat.com>
5756 * array-notation-common.c (is_cilkplus_vector_p): Define.
5757 * c-common.h (is_cilkplus_vector_p): Declare.
5759 2015-10-20 Marek Polacek <polacek@redhat.com>
5761 * c.opt (std=gnu++11): Do not describe as experimental.
5762 (std=gnu++14): Likewise.
5764 2015-10-19 Jason Merrill <jason@redhat.com>
5766 * c-cppbuiltin.c (c_cpp_builtins): Define
5767 __cpp_nontype_template_args.
5769 2015-10-19 Jason Merrill <jason@redhat.com>
5771 * c-cppbuiltin.c (c_cpp_builtins): Define
5772 __cpp_enumerator_attributes, __cpp_fold_expressions,
5773 __cpp_unicode_characters.
5775 2015-10-13 Jakub Jelinek <jakub@redhat.com>
5776 Aldy Hernandez <aldyh@redhat.com>
5778 * c-common.c (enum c_builtin_type): Define DEF_FUNCTION_TYPE_9,
5779 DEF_FUNCTION_TYPE_10 and DEF_FUNCTION_TYPE_11.
5780 (c_define_builtins): Likewise.
5781 * c-common.h (enum c_omp_clause_split): Add
5782 C_OMP_CLAUSE_SPLIT_TASKLOOP.
5783 (c_finish_omp_critical, c_finish_omp_ordered): Add CLAUSES argument.
5784 (c_finish_omp_for): Add ORIG_DECLV argument.
5785 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP as
5786 201511 instead of 201307.
5787 * c-omp.c (c_finish_omp_critical): Add CLAUSES argument, set
5788 OMP_CRITICAL_CLAUSES to it.
5789 (c_finish_omp_ordered): Add CLAUSES argument, set
5790 OMP_ORDERED_CLAUSES to it.
5791 (c_finish_omp_for): Add ORIG_DECLV argument, set OMP_FOR_ORIG_DECLS
5792 to it if OMP_FOR. Clear DECL_INITIAL on the IVs.
5793 (c_omp_split_clauses): Handle OpenMP 4.5 combined/composite
5794 constructs and new OpenMP 4.5 clauses. Clear
5795 OMP_CLAUSE_SCHEDULE_SIMD if not combined with OMP_SIMD. Add
5797 * c-pragma.c (omp_pragmas_simd): Add taskloop.
5798 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKLOOP.
5799 (enum pragma_omp_clause): Add
5800 PRAGMA_OMP_CLAUSE_{DEFAULTMAP,GRAINSIZE,HINT,{IS,USE}_DEVICE_PTR}
5801 and PRAGMA_OMP_CLAUSE_{LINK,NOGROUP,NUM_TASKS,PRIORITY,SIMD,THREADS}.
5803 2015-10-05 Richard Sandiford <richard.sandiford@arm.com>
5805 * c-lex.c (interpret_float): Use real_equal instead of
5808 2015-10-04 Jason Merrill <jason@redhat.com>
5810 Implement N4514, C++ Extensions for Transactional Memory.
5811 * c-common.c (c_common_reswords): Add C++ TM TS keywords.
5812 (c_common_attribute_table): Add transaction_safe_dynamic.
5813 transaction_safe now affects type identity.
5814 (handle_tm_attribute): Handle transaction_safe_dynamic.
5815 * c-common.h (enum rid): Add RID_ATOMIC_NOEXCEPT,
5816 RID_ATOMIC_CANCEL, RID_SYNCHRONIZED.
5817 (OBJC_IS_CXX_KEYWORD): Add RID_SYNCHRONIZED.
5819 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_transactional_memory.
5820 * c-pretty-print.c (pp_c_attributes_display): Don't print
5821 transaction_safe in C++.
5823 2015-10-02 Marek Polacek <polacek@redhat.com>
5825 * c.opt (Wduplicated-cond): Don't enable by -Wall anymore.
5827 2015-10-02 Marek Polacek <polacek@redhat.com>
5830 * c-common.c (warn_duplicated_cond_add_or_warn): New function.
5831 * c-common.h (warn_duplicated_cond_add_or_warn): Declare.
5832 * c.opt (Wduplicated-cond): New option.
5834 2015-10-01 Joseph Myers <joseph@codesourcery.com>
5836 * c.opt (std=c11): Do not describe as experimental.
5837 (std=gnu11): Likewise.
5838 (std=iso9899:2011): Likewise.
5840 2015-09-28 Nathan Sidwell <nathan@codesourcery.com>
5842 * c-common.c (DEF_FUNCTION_TYPE_VAR_6): New.
5843 (DEF_FUNCTION_TYPE_VAR_11): Delete.
5845 2015-09-25 Marek Polacek <polacek@redhat.com>
5847 * c-ubsan.c (ubsan_instrument_division): Remove unnecessary code.
5848 (ubsan_instrument_shift): Likewise.
5850 2015-09-25 Marek Polacek <polacek@redhat.com>
5853 * c-ubsan.c (ubsan_instrument_division): Also pre-evaluate OP1.
5855 2015-09-24 Patrick Palka <ppalka@gcc.gnu.org>
5857 * c-indentation.c (should_warn_for_misleading_indentation):
5858 Compare next_stmt_vis_column with guard_line_first_nws instead
5859 of with guard_line_vis_column.
5861 2015-09-23 Manuel López-Ibáñez <manu@gcc.gnu.org>
5865 * c-pragma.c (handle_pragma_diagnostic): Detect non-warning
5866 options and options not valid for the current language.
5868 2015-09-22 Patrick Palka <ppalka@gcc.gnu.org>
5870 * c-indentation.c (should_warn_for_misleading_indentation):
5871 Float out and consolidate the calls to get_visual_column that
5872 are passed guard_exploc as an argument. Compare
5873 next_stmt_vis_column with guard_line_first_nws instead of with
5874 body_line_first_nws.
5876 2015-09-22 Nathan Sidwell <nathan@codesourcery.com>
5878 * c.opt (Wmultiple-inheritance, Wvirtual-inheritance, Wtemplates,
5879 Wnamespaces): New C++ warnings.
5881 2015-09-22 Jason Merrill <jason@redhat.com>
5883 * c-common.h (abi_compat_version_crosses): New.
5884 (warn_abi_version): Declare.
5885 * c-common.c: Define it.
5886 * c-opts.c (c_common_post_options): Handle it.
5887 flag_abi_compat_version defaults to 8.
5889 2015-09-21 Ville Voutilainen <ville.voutilainen@gmail.com>
5891 Complete the implementation of N4230, Nested namespace definition.
5892 * c-cppbuiltin.c: Add __cpp_namespace_attributes and
5893 __cpp_nested_namespace_definitions.
5895 2015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
5897 * c-pragma.c (handle_pragma_diagnostic): Fix wrong return.
5899 2015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
5901 * c-pragma.c (handle_pragma_diagnostic): Use explicit location
5903 * c-pragma.h (pragma_lex): Add optional loc argument.
5905 2015-09-16 Mikhail Maltsev <maltsevm@gmail.com>
5907 * c-format.c (check_format_arg): Adjust to use common block size in all
5910 2015-09-15 David Malcolm <dmalcolm@redhat.com>
5912 * c-format.c (location_from_offset): Update for change in
5913 signature of location_get_source_line.
5914 * c-indentation.c (get_visual_column): Likewise.
5915 (line_contains_hash_if): Likewise.
5917 2015-09-14 Marek Polacek <polacek@redhat.com>
5919 * c-opts.c (c_common_post_options): Set C++ standard earlier, before
5920 setting various warnings.
5922 2015-09-14 Marek Polacek <polacek@redhat.com>
5924 * c-common.c (warn_for_sign_compare): Cast to unsigned when shifting
5927 2015-09-11 Mark Wielaard <mjw@redhat.com>
5930 * c.opt (Wunused-variable): Option from common.opt.
5931 (Wunused-const-variable): New option.
5933 2015-09-09 Paolo Carlini <paolo.carlini@oracle.com>
5936 * c.opt ([Wsubobject-linkage]): Add.
5938 2015-09-03 Martin Sebor <msebor@redhat.com>
5941 * c-common.h (c_decl_implicit, reject_gcc_builtin): Declare new
5943 * c-common.c (reject_gcc_builtin): Define.
5945 2015-09-02 Balaji V. Iyer <balaji.v.iyer@intel.com>
5948 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): New
5950 * c-gimplify.c (c_gimplify_expr): Added a call to the function
5951 cilk_gimplify_call_params_in_spawned_fn.
5952 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): New function.
5953 (gimplify_cilk_spawn): Removed EXPR_STMT and CLEANUP_POINT_EXPR
5956 2015-08-25 Marek Polacek <polacek@redhat.com>
5959 * c-common.c (handle_weak_attribute): Don't check whether the
5960 visibility can be changed here.
5962 2015-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
5964 * c-lex.c (c_lex_with_flags): Use explicit locations.
5966 2015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
5968 * c-ada-spec.h, c-common.c, c-common.h, c-format.c, c-format.h,
5969 c-objc.h, c-ppoutput.c, c-pragma.c, c-pragma.h: Remove useless
5971 2015-08-18 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
5974 * c-common.c (check_builtin_function_arguments): Add check
5975 for BUILT_IN_SIGNBIT argument.
5977 2015-08-18 Paolo Carlini <paolo.carlini@oracle.com>
5980 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_static_assert value
5983 2015-08-17 Marek Polacek <polacek@redhat.com>
5985 * c-pretty-print.c (pp_c_cv_qualifiers): Remove code dealing
5986 with whitespaces before qualifier names.
5988 2015-08-12 Marek Polacek <polacek@redhat.com>
5991 * c-common.c (maybe_warn_shift_overflow): Properly handle
5992 left-shifting 1 into the sign bit.
5994 2015-08-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
5996 * c.opt (Wchkp): Use LangEnabledBy instead of EnabledBy.
5998 2015-08-06 Andrew Sutton <andrew.n.sutton@gmail.com>
5999 Braden Obrzut <admin@maniacsvault.net>
6000 Jason Merrill <jason@redhat.com>
6002 Add C++ Concepts TS support.
6003 * c-common.c (c_common_reswords): Add __is_same_as, concept, requires.
6004 * c-common.h (enum rid): Add RID_IS_SAME_AS, RID_CONCEPT, RID_REQUIRES.
6005 (D_CXX_CONCEPTS, D_CXX_CONCEPTS_FLAGS): New.
6006 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_concepts.
6007 * c-opts.c (set_std_cxx1z): Set flag_concepts.
6008 * c.opt (fconcepts): New.
6010 2015-08-02 Martin Sebor <msebor@redhat.com>
6012 * c.opt (-Wframe-address): New warning option.
6014 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
6016 * c-indentation.c (should_warn_for_misleading_indentation):
6019 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
6021 * c-indentation.c (get_visual_column): Add parameter first_nws,
6022 use it. Update comment documenting the function.
6023 (is_first_nonwhitespace_on_line): Remove.
6024 (should_warn_for_misleading_indentation): Replace usage of
6025 of is_first_nonwhitespace_on_line with get_visual_column.
6027 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
6029 * c-indentation.h (struct token_indent_info): Define.
6030 (get_token_indent_info): Define.
6031 (warn_for_misleading_information): Declare.
6032 * c-common.h (warn_for_misleading_information): Remove.
6033 * c-identation.c (warn_for_misleading_indentation):
6034 Change declaration to take three token_indent_infos. Adjust
6036 * c-identation.c (should_warn_for_misleading_indentation):
6037 Likewise. Bail out early if the body is a compound statement.
6038 (guard_tinfo_to_string): Define.
6040 2015-07-30 Jason Merrill <jason@redhat.com>
6042 * c-pretty-print.c (unary_expression) [INDIRECT_REF]: Don't print
6043 '*' for reference decay.
6045 2015-07-30 Marek Polacek <polacek@redhat.com>
6047 * c-common.c (warn_tautological_cmp): Bail for float types.
6049 2015-07-27 Marek Polacek <polacek@redhat.com>
6052 * c-common.c (warn_tautological_cmp): Don't warn for macro expansion.
6054 2015-07-27 Marek Polacek <polacek@redhat.com>
6058 * c-common.c (find_array_ref_with_const_idx_r): New function.
6059 (warn_tautological_cmp): New function.
6060 * c-common.h (warn_tautological_cmp): Declare.
6061 * c.opt (Wtautological-compare): New option.
6063 2015-07-23 Marek Polacek <polacek@redhat.com>
6065 * c-ubsan.c (ubsan_instrument_division): Use unshare_expr throughout.
6066 (ubsan_instrument_shift): Likewise.
6068 2015-07-23 Marek Polacek <polacek@redhat.com>
6071 * c-ubsan.c: Include gimplify.h.
6072 (ubsan_instrument_division): Unshare OP0 and OP1.
6073 (ubsan_instrument_shift): Likewise.
6075 2015-07-20 Marek Polacek <polacek@redhat.com>
6076 Richard Sandiford <richard.sandiford@arm.com>
6079 * c-common.c (c_fully_fold_internal): Warn about left shift overflows.
6080 Use EXPR_LOC_OR_LOC.
6081 (maybe_warn_shift_overflow): New function.
6082 * c-common.h (maybe_warn_shift_overflow): Declare.
6083 * c-opts.c (c_common_post_options): Set warn_shift_overflow.
6084 * c.opt (Wshift-overflow): New option.
6086 2015-07-16 Martin Liska <mliska@suse.cz>
6088 * c-format.c (static void check_format_info_main): Use
6089 object_allocator instead of pool_allocator.
6090 (check_format_arg): Likewise.
6091 (check_format_info_main): Likewise.
6093 2015-07-15 Andrew MacLeod <amacleod@redhat.com>
6095 * c-opts.c: Remove multiline #include comment.
6097 2015-07-12 Aldy Hernandez <aldyh@redhat.com>
6099 * c-common.c: Fix double word typos.
6101 2015-07-10 Eric Botcazou <ebotcazou@adacore.com>
6103 * c-ada-spec.h (cpp_operation): Revert latest change.
6104 * c-ada-spec.c (print_ada_declaration): Likewise. Skip implicit
6105 constructors and destructors.
6107 2015-07-09 Andrew MacLeod <amacleod@redhat.com>
6109 * c-common.h: Adjust includes for flags.h changes.
6110 * stub-objc.c: Likewise.
6112 2015-07-08 Eric Botcazou <ebotcazou@adacore.com>
6114 * c-ada-spec.h (cpp_operation): Add IS_CONSTEXPR.
6115 * c-ada-spec.c (print_ada_declaration): Skip constexpr constructors.
6117 2015-07-08 Jakub Jelinek <jakub@redhat.com>
6119 * c-omp.c (c_omp_declare_simd_clauses_to_numbers): If all clauses
6120 are to be removed, return NULL rather than original clauses list.
6122 2015-07-07 Andrew MacLeod <amacleod@redhat.com>
6124 * array-notation-common.c: Adjust includes.
6125 * c-ada-spec.c: Likewise.
6126 * c-cilkplus.c: Likewise.
6127 * c-common.h: Likewise.
6128 * c-cppbuiltin.c: Likewise.
6129 * c-dump.c: Likewise.
6130 * c-format.c: Likewise.
6131 * c-gimplify.c: Likewise.
6132 * c-indentation.c: Likewise.
6133 * c-lex.c: Likewise.
6134 * c-omp.c: Likewise.
6135 * c-opts.c: Likewise.
6136 * c-pch.c: Likewise.
6137 * c-ppoutput.c: Likewise.
6138 * c-pragma.c: Likewise.
6139 * c-pretty-print.c: Likewise.
6140 * c-semantics.c: Likewise.
6141 * c-ubsan.c: Likewise.
6143 * stub-objc.c: Likewise.
6145 2015-07-07 Eric Botcazou <ebotcazou@adacore.com>
6147 * c-ada-spec.h (cpp_operation): Add IS_MOVE_CONSTRUCTOR.
6148 * c-ada-spec.c (print_ada_declaration): Skip move constructors.
6150 2015-07-01 Jason Merrill <jason@redhat.com>
6152 * c-common.h (D_CXX11): Rename from D_CXX0X.
6153 (RID_FIRST_CXX11, RID_LAST_CXX11): Rename from *_CXX0X.
6154 * c-common.c: Adjust.
6156 * c-opts.c (c_common_post_options): Default to C++14.
6158 * c-opts.c (c_common_post_options): Highest ABI level is now 10.
6160 2015-06-30 Edward Smith-Rowland <3dw4rd@verizon.net>
6162 Implement N4197 - Adding u8 character literals
6163 * c-ada-spec.c (print_ada_macros): Treat CPP_UTF8CHAR like
6165 * c-common.c (c_parse_error): Print CPP_UTF8CHAR and
6166 CPP_UTF8CHAR_USERDEF tokens.
6167 * c-lex.c (c_lex_with_flags): Treat CPP_UTF8CHAR_USERDEF
6168 and CPP_UTF8CHAR tokens.
6169 (lex_charconst): Treat CPP_UTF8CHAR token.
6171 2015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
6174 * c-common.c (do_warn_unused_parameter): Move here.
6175 * c-common.h (do_warn_unused_parameter): Declare.
6177 2015-06-29 Marek Polacek <polacek@redhat.com>
6180 * c-common.c (check_case_bounds): Add bool * parameter. Set
6182 (c_add_case_label): Add bool * parameter. Pass it down to
6184 (c_do_switch_warnings): Add bool parameters. Implement -Wswitch-bool
6186 * c-common.h (c_add_case_label, c_do_switch_warnings): Update
6189 2015-06-27 Marek Polacek <polacek@redhat.com>
6191 * c-common.c (check_main_parameter_types): Use VECTOR_TYPE_P
6192 or VECTOR_INTEGER_TYPE_P throughout.
6193 * c-gimplify.c: Likewise.
6195 2015-06-26 Marek Polacek <polacek@redhat.com>
6197 * array-notation-common.c (find_rank): Use INDIRECT_REF_P.
6198 * c-common.c (c_fully_fold_internal): Likewise.
6199 (c_alignof_expr): Likewise.
6200 * c-pretty-print.c (c_pretty_printer::postfix_expression): Likewise.
6201 * c-ubsan.c (ubsan_instrument_bounds): Likewise.
6202 * cilk.c (create_parm_list): Likewise.
6204 2015-06-26 Marek Polacek <polacek@redhat.com>
6206 * c-common.c (handle_unused_attribute): Use VAR_OR_FUNCTION_DECL_P.
6208 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
6210 * c-common.c: Remove ipa-ref.h and plugin-api.h from include list.
6211 * c-gimplify.c: Likewise.
6212 * c-pragma.c: Likewise.
6213 * c-ubsan.c: Likewise.
6216 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
6218 * c-common.c (c_type_hasher): Inherit from ggc_ptr_hash rather than
6221 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
6223 * cilk.c: Move calls.h after tm.h in the include chain.
6225 2015-06-25 Marek Polacek <polacek@redhat.com>
6227 * array-notation-common.c: Use VAR_P throughout.
6228 * c-ada-spec.c: Likewise.
6229 * c-common.c: Likewise.
6230 * c-format.c: Likewise.
6231 * c-gimplify.c: Likewise.
6232 * c-omp.c: Likewise.
6233 * c-pragma.c: Likewise.
6234 * c-pretty-print.c: Likewise.
6237 2015-06-25 Marek Polacek <polacek@redhat.com>
6239 * cilk.c (extract_free_variables): Use is_global_var.
6241 2015-06-23 Richard Sandiford <richard.sandiford@arm.com>
6243 * c-common.c: Don't include target-def.h.
6245 2015-06-23 Marek Polacek <polacek@redhat.com>
6247 * c-common.c (warn_logical_operator): Use tree_int_cst_equal
6248 when comparing INTEGER_CSTs.
6250 2015-06-22 Pierre-Marie de Rodat <derodat@adacore.com>
6252 * c-ada-spec.h (cpp_operation): Add HAS_DEPENDENT_TEMPLATE_ARGS.
6253 * c-ada-spec.c (collect_ada_nodes): Skip NAMESPACE_DECL
6254 (dump_ada_template): Skip partially specialized types.
6256 2015-06-22 Mikhail Maltsev <maltsevm@gmail.com>
6258 * c-common.c (scalar_to_vector): Use std::swap instead of manually
6261 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
6263 * array-notation-common.c: Do not include input.h, line-map.h or is-a.h.
6264 * c-ada-spec.c: Likewise.
6265 * c-cilkplus.c: Likewise.
6266 * c-common.c: Likewise.
6267 * c-common.h: Likewise.
6268 * c-cppbuiltin.c: Likewise.
6269 * c-dump.c: Likewise.
6270 * c-format.c: Likewise.
6271 * c-gimplify.c: Likewise.
6272 * c-indentation.c: Likewise.
6273 * c-lex.c: Likewise.
6274 * c-omp.c: Likewise.
6275 * c-opts.c: Likewise.
6276 * c-pch.c: Likewise.
6277 * c-ppoutput.c: Likewise.
6278 * c-pragma.c: Likewise.
6279 * c-pretty-print.c: Likewise.
6280 * c-semantics.c: Likewise.
6281 * c-ubsan.c: Likewise.
6283 * stub-objc.c: Likewise.
6285 2015-06-13 Patrick Palka <ppalka@gcc.gnu.org>
6288 * c-common.c (c_common_truthvalue_conversion): Warn when
6289 converting an address of a reference to a truth value.
6291 2015-06-08 Andrew MacLeod <amacleod@redhat.com>
6293 * array-notation-common.c : Adjust include files.
6294 * c-ada-spec.c : Likewise.
6295 * c-cilkplus.c : Likewise.
6296 * c-common.c : Likewise.
6297 * c-common.h : Likewise.
6298 * c-cppbuiltin.c : Likewise.
6299 * c-dump.c : Likewise.
6300 * c-format.c : Likewise.
6301 * c-gimplify.c : Likewise.
6302 * c-indentation.c : Likewise.
6303 * c-lex.c : Likewise.
6304 * c-omp.c : Likewise.
6305 * c-opts.c : Likewise.
6306 * c-pch.c : Likewise.
6307 * c-ppoutput.c : Likewise.
6308 * c-pragma.c : Likewise.
6309 * c-pretty-print.c : Likewise.
6310 * c-semantics.c : Likewise.
6311 * c-ubsan.c : Likewise.
6312 * cilk.c : Likewise.
6313 * stub-objc.c : Likewise.
6315 2015-06-08 Marek Polacek <polacek@redhat.com>
6318 * c-format.c (location_from_offset): Return LOC if LINE is null.
6320 2015-06-05 Aldy Hernandez <aldyh@redhat.com>
6322 * c-common.h (c_parse_final_cleanups): New prototype.
6323 * c-opts.c (c_common_parse_file): Call c_parse_final_cleanups.
6325 2015-06-04 Sriraman Tallam <tmsriram@google.com>
6327 * c-common.c (noplt): New attribute.
6328 (handle_noplt_attribute): New handler.
6330 2015-06-04 Andrew MacLeod <amacleod@redhat.com>
6332 * array-notation-common.c: Adjust includes for restructured coretypes.h.
6333 * c-ada-spec.c: Likewise.
6334 * c-cilkplus.c: Likewise.
6335 * c-common.c: Likewise.
6336 * c-common.h: Likewise.
6337 * c-cppbuiltin.c: Likewise.
6338 * c-dump.c: Likewise.
6339 * c-format.c: Likewise.
6340 * c-gimplify.c: Likewise.
6341 * c-indentation.c: Likewise.
6342 * c-lex.c: Likewise.
6343 * c-omp.c: Likewise.
6344 * c-opts.c: Likewise.
6345 * c-pch.c: Likewise.
6346 * c-ppoutput.c: Likewise.
6347 * c-pragma.c: Likewise.
6348 * c-pretty-print.c: Likewise.
6349 * c-semantics.c: Likewise.
6350 * c-ubsan.c: Likewise.
6352 * stub-objc.c: Likewise.
6354 2015-06-02 David Malcolm <dmalcolm@redhat.com>
6357 * c-indentation.c (should_warn_for_misleading_indentation): Use
6358 expand_location rather than expand_location_to_spelling_point.
6359 Don't warn if the guarding statement is more indented than the
6362 2015-06-02 David Malcolm <dmalcolm@redhat.com>
6364 * c-indentation.c (warn_for_misleading_indentation): Bail out
6365 immediately if -Wmisleading-indentation isn't enabled.
6367 2015-06-01 Martin Liska <mliska@suse.cz>
6369 * c-format.c (check_format_arg):Use new type-based pool allocator.
6370 (check_format_info_main) Likewise.
6372 2015-05-31 Eric Botcazou <ebotcazou@adacore.com>
6374 * c-ada-spec.c (is_tagged_type): Test for TYPE_METHODS on main variant.
6375 (has_nontrivial_methods): Likewise.
6377 2015-05-25 Marek Polacek <polacek@redhat.com>
6379 * c-ubsan.c (ubsan_instrument_shift): Use type0.
6381 2015-05-22 Marek Polacek <polacek@redhat.com>
6384 * c-common.c (handle_deprecated_attribute): Allow CONST_DECL.
6386 2015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
6388 * c-cppbuiltin.c (c_cpp_builtins): Use if instead of #if with
6389 STACK_GROWS_DOWNWARD.
6391 2015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
6393 * c-cppbuiltin.c (c_cpp_builtins): Check the value of
6394 STACK_GROWS_DOWNWARD rather than if it is defined.
6396 2015-05-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
6399 * c-format.c (location_column_from_byte_offset): New.
6400 (location_from_offset): New.
6401 (struct format_wanted_type): Add offset_loc field.
6402 (check_format_info): Move handling of location for extra arguments
6403 closer to the point of warning.
6404 (check_format_info_main): Pass the result of location_from_offset
6406 (format_type_warning): Pass the result of location_from_offset
6409 2015-05-20 Marek Polacek <polacek@redhat.com>
6411 * c-omp.c (check_omp_for_incr_expr): Use BINARY_CLASS_P.
6413 2015-05-20 Marek Polacek <polacek@redhat.com>
6415 * c-ada-spec.c (dump_sloc): Use DECL_P.
6417 2015-05-20 Marek Polacek <polacek@redhat.com>
6419 * c-pragma.c: Use VAR_OR_FUNCTION_DECL_P throughout.
6420 * c-common.c: Likewise.
6422 2015-05-19 David Malcolm <dmalcolm@redhat.com>
6424 * c-common.h (fe_file_change): Strengthen param from
6425 const line_map * to const line_map_ordinary *.
6426 (pp_file_change): Likewise.
6427 * c-lex.c (fe_file_change): Likewise.
6428 (cb_define): Use linemap_check_ordinary when invoking
6430 (cb_undef): Likewise.
6431 * c-opts.c (c_finish_options): Use linemap_check_ordinary when
6432 invoking cb_file_change.
6433 (c_finish_options): Likewise.
6434 (push_command_line_include): Likewise.
6435 (cb_file_change): Strengthen param "new_map" from
6436 const line_map * to const line_map_ordinary *.
6437 * c-ppoutput.c (cb_define): Likewise for local "map".
6438 (pp_file_change): Likewise for param "map" and local "from".
6440 2015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
6442 * c-common.c (shorten_compare): Use std::swap instead of explicit swaps.
6444 2015-05-18 Tom de Vries <tom@codesourcery.com>
6446 * c-common.c (build_va_arg_1): New function.
6447 (build_va_arg): Add address operator to va_list operand if necessary.
6449 2015-05-15 Mikhail Maltsev <maltsevm@gmail.com>
6452 * c-common.c (int_safely_convertible_to_real_p): Define.
6453 (unsafe_conversion_p): Check conversions involving complex types.
6454 (conversion_warning): Add new warning message for conversions which
6455 discard imaginary component.
6456 * c-common.h: (enum conversion_safety): Add new enumerator for such
6459 2015-05-14 Marek Polacek <polacek@redhat.com>
6463 * c-common.c (c_fully_fold): Pass false down to c_fully_fold_internal.
6464 (c_fully_fold_internal): Fold C_MAYBE_CONST_EXPRs with
6465 C_MAYBE_CONST_EXPR_INT_OPERANDS set. Add FOR_INT_CONST argument and
6466 use it. If FOR_INT_CONST, require that all evaluated operands be
6469 2015-05-12 David Malcolm <dmalcolm@redhat.com>
6471 * c-common.h (warn_for_misleading_indentation): New prototype.
6472 * c-indentation.c: New file.
6473 * c.opt (Wmisleading-indentation): New option.
6475 2015-05-12 Tom de Vries <tom@codesourcery.com>
6477 PR tree-optimization/66010
6478 * c-common.c (build_va_arg): Don't mark ap addressable unless necessary.
6480 2015-05-09 Jason Merrill <jason@redhat.com>
6482 * c-opts.c (c_common_post_options): Also clear
6483 cpp_opts->cpp_warn_cxx11_compat.
6485 * c-common.h (enum cxx_dialect): Add cxx_unset.
6486 * c-common.c (cxx_dialect): Initialize to cxx_unset.
6487 * c-opts.c (c_common_post_options): Set C++ dialect to C++98 if unset.
6489 * c.opt (std=c++14): Remove Undocumented flag and experimental warning.
6490 (std=gnu++0x): Mark as Undocumented.
6491 (std=gnu++1y): Add deprecated message.
6493 2015-05-08 Jason Merrill <jason@redhat.com>
6495 * c.opt (Wc++11-compat): Make primary. Rename var warn_cxx11_compat.
6498 * c.opt (Wc++0x-compat): Also set cpp_warn_cxx11_compat.
6500 2015-05-08 Marek Polacek <polacek@redhat.com>
6503 * c.opt (Woverride-init-side-effects): New option.
6505 2015-05-07 Marek Polacek <polacek@redhat.com>
6508 * c-common.c (c_fully_fold_internal): Warn when left shifting a
6510 * c.opt (Wshift-negative-value): New option.
6511 * c-opts.c (c_common_post_options): Set warn_shift_negative_value
6512 when -Wextra and C99/C++11 mode.
6514 2015-05-07 Marek Polacek <polacek@redhat.com>
6515 Martin Uecker <uecker@eecs.berkeley.edu>
6517 * c-ubsan.c (ubsan_instrument_bounds): Don't skip instrumenting
6518 flexible member array-like members if SANITIZE_BOUNDS_STRICT.
6520 2015-05-05 Jason Merrill <jason@redhat.com>
6522 * c.opt (Wterminate): New.
6524 2015-04-30 Marek Polacek <polacek@redhat.com>
6526 * c-common.c (maybe_warn_bool_compare): When comparing with 0/1,
6527 require that the non-constant be of a boolean type.
6529 2015-04-29 Josh Triplett <josh@joshtriplett.org>
6531 * c-common.c (handle_section_attribute): Refactor to reduce
6532 nesting and distinguish between error cases.
6534 2015-04-29 Marek Polacek <polacek@redhat.com>
6537 * c-common.c (maybe_warn_bool_compare): Warn when comparing a boolean
6540 2015-04-29 Jakub Jelinek <jakub@redhat.com>
6542 * c-common.h (omp_clause_mask): Unconditionally define as a class.
6543 Use uint64_t instead of unsigned HOST_WIDE_INT and 64 instead of
6544 HOST_BITS_PER_WIDE_INT.
6546 2015-04-28 Tom de Vries <tom@codesourcery.com>
6548 PR tree-optimization/65887
6549 * c-common.c (build_va_arg): Mark va_arg ap argument as addressable.
6551 2015-04-28 Eric Botcazou <ebotcazou@adacore.com>
6552 Pierre-Marie de Rodat <derodat@adacore.com>
6554 * c-ada-spec.c (in_function): Delete.
6555 (dump_generic_ada_node): Do not change in_function and remove the
6556 redundant code dealing with it.
6557 (print_ada_declaration): Do not change in_function. Use INDENT_INCR.
6558 (print_ada_methods): Output the static member functions in a nested
6559 package after the regular methods as well as associated renamings.
6561 2015-04-24 Marek Polacek <polacek@redhat.com>
6564 * c-common.c (c_fully_fold_internal): Use OPT_Wshift_count_negative
6565 and OPT_Wshift_count_overflow.
6568 * c-common.c (warn_logical_operator): Warn if the operands have the
6571 2015-04-24 Marek Polacek <polacek@redhat.com>
6574 * c-common.c (warn_logical_operator): Bail if either operand comes
6575 from a macro expansion.
6577 2015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
6580 * c-common.c (c_default_pointer_mode): Add definition.
6581 * c-common.h (c_default_pointer_mode): Add declaration.
6583 2015-03-11 Jakub Jelinek <jakub@redhat.com>
6585 * c-common.c (c_common_nodes_and_builtins): Don't call xstrdup
6586 on record_builtin_type argument.
6588 2015-03-10 Jakub Jelinek <jakub@redhat.com>
6591 * c-common.c (warn_logical_not_parentheses): Don't warn for
6594 2015-03-07 Marek Polacek <polacek@redhat.com>
6597 * c-ubsan.c (ubsan_instrument_bounds): Check for COMPONENT_REF
6598 before trying to figure out whether we have a flexible array member.
6600 2015-03-06 Eric Botcazou <ebotcazou@adacore.com>
6601 Jonathan Wakely <jwakely.gcc@gmail.com>
6603 * c-ada-spec.c (dump_ada_double_name): Fix pasto.
6605 2015-03-05 Eric Botcazou <ebotcazou@adacore.com>
6608 * c-ada-spec.c (print_destructor): Remove obsolete code.
6610 2015-03-01 Eric Botcazou <ebotcazou@adacore.com>
6612 * c-ada-spec.c (is_tagged_type): Add guard for DECL_VINDEX.
6613 (dump_template_types): Adjust DECL_TEMPLATE_INSTANTIATIONS and
6614 DECL_TEMPLATE_RESULT emulations.
6615 (dump_ada_template)): Add guard for TYPE_METHODS.
6617 2015-02-27 Marek Polacek <polacek@redhat.com>
6620 * c.opt (Wformat-signedness): Don't enable by -Wformat=2.
6622 2015-02-27 Kai Tietz <ktietz@redhat.com>
6625 * c-pragma.c (handle_pragma_weak): Do not try to create
6626 weak/alias of declarations not being function, or variable
6629 2015-02-24 Thomas Schwinge <thomas@codesourcery.com>
6632 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
6634 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
6636 2015-02-16 Marek Polacek <polacek@redhat.com>
6639 * c-format.c (check_format_types): Handle null param.
6641 2015-02-13 Marek Polacek <polacek@redhat.com>
6644 * c-format.c (check_format_types): Don't warn about different
6645 signedness if the original value is in the range of WANTED_TYPE.
6647 2015-02-12 Jason Merrill <jason@redhat.com>
6650 * c-opts.c (c_common_post_options): Change flag_abi_version from 0
6651 to the current highest version.
6652 * c-cppbuiltin.c (c_cpp_builtins): Assert that it isn't 0.
6654 2015-02-04 Jakub Jelinek <jakub@redhat.com>
6658 * c-omp.c (c_finish_omp_atomic): Use TRUNC_DIV_EXPR
6659 instead of RDIV_EXPR. Use build_binary_op instead of
6662 2015-01-30 Joseph Myers <joseph@codesourcery.com>
6664 * c-opts.c, c-pch.c, cppspec.c: All callers of fatal_error changed
6665 to pass input_location as first argument.
6667 2015-01-23 Tom de Vries <tom@codesourcery.com>
6670 * c.opt (fopenacc): Mark as LTO option.
6672 2015-01-23 Tom de Vries <tom@codesourcery.com>
6675 * c.opt (fopenmp): Mark as LTO option.
6677 2015-01-21 Jakub Jelinek <jakub@redhat.com>
6680 * cilk.c (fill_decls_vec): Only put decls into vector v.
6681 (compare_decls): Fix up formatting.
6683 2015-01-21 Igor Zamyatin <igor.zamyatin@intel.com>
6686 * cilk.c: Include vec.h.
6687 (struct cilk_decls): New structure.
6688 (wrapper_parm_cb): Split this function to...
6689 (fill_decls_vec): ...this...
6690 (create_parm_list): ...and this.
6691 (compare_decls): New function.
6692 (for_local_cb): Remove.
6693 (wrapper_local_cb): Ditto.
6694 (build_wrapper_type): For now first traverse and fill vector of
6695 declarations then sort it and then deal with sorted vector.
6696 (cilk_outline): Ditto.
6697 (declare_one_free_variable): Ditto.
6699 2015-01-21 Jason Merrill <jason@redhat.com>
6702 * c-format.c (check_format_arg): Call decl_constant_value.
6704 2015-01-19 Martin Liska <mliska@suse.cz>
6706 * c-common.c (handle_noicf_attribute): New function.
6708 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
6709 Bernd Schmidt <bernds@codesourcery.com>
6710 James Norris <jnorris@codesourcery.com>
6711 Cesar Philippidis <cesar@codesourcery.com>
6712 Ilmir Usmanov <i.usmanov@samsung.com>
6713 Jakub Jelinek <jakub@redhat.com>
6715 * c.opt (fopenacc): New option.
6716 * c-cppbuiltin.c (c_cpp_builtins): Conditionally define _OPENACC.
6717 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
6719 * c-common.h (c_finish_oacc_wait): New prototype.
6720 * c-omp.c: Include "omp-low.h" and "gomp-constants.h".
6721 (c_finish_oacc_wait): New function.
6722 * c-pragma.c (oacc_pragmas): New variable.
6723 (c_pp_lookup_pragma, init_pragma): Handle it.
6724 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_CACHE,
6725 PRAGMA_OACC_DATA, PRAGMA_OACC_ENTER_DATA, PRAGMA_OACC_EXIT_DATA,
6726 PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP, PRAGMA_OACC_PARALLEL,
6727 PRAGMA_OACC_UPDATE, PRAGMA_OACC_WAIT.
6728 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ASYNC,
6729 PRAGMA_OACC_CLAUSE_AUTO, PRAGMA_OACC_CLAUSE_COLLAPSE,
6730 PRAGMA_OACC_CLAUSE_COPY, PRAGMA_OACC_CLAUSE_COPYIN,
6731 PRAGMA_OACC_CLAUSE_COPYOUT, PRAGMA_OACC_CLAUSE_CREATE,
6732 PRAGMA_OACC_CLAUSE_DELETE, PRAGMA_OACC_CLAUSE_DEVICE,
6733 PRAGMA_OACC_CLAUSE_DEVICEPTR, PRAGMA_OACC_CLAUSE_FIRSTPRIVATE,
6734 PRAGMA_OACC_CLAUSE_GANG, PRAGMA_OACC_CLAUSE_HOST,
6735 PRAGMA_OACC_CLAUSE_IF, PRAGMA_OACC_CLAUSE_NUM_GANGS,
6736 PRAGMA_OACC_CLAUSE_NUM_WORKERS, PRAGMA_OACC_CLAUSE_PRESENT,
6737 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPY,
6738 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYIN,
6739 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYOUT,
6740 PRAGMA_OACC_CLAUSE_PRESENT_OR_CREATE, PRAGMA_OACC_CLAUSE_PRIVATE,
6741 PRAGMA_OACC_CLAUSE_REDUCTION, PRAGMA_OACC_CLAUSE_SELF,
6742 PRAGMA_OACC_CLAUSE_SEQ, PRAGMA_OACC_CLAUSE_VECTOR,
6743 PRAGMA_OACC_CLAUSE_VECTOR_LENGTH, PRAGMA_OACC_CLAUSE_WAIT,
6744 PRAGMA_OACC_CLAUSE_WORKER.
6746 2015-01-14 Marcos Diaz <marcos.diaz@tallertechnologies.com>
6748 * c-cppbuiltin.c (c_cpp_builtins): New cpp define __SSP_EXPLICIT__
6749 for the new option fstack-protector_explicit.
6750 * c-common.c (c_common_attribute_table): Add stack_protect attribute.
6751 (handle_stack_protect_attribute): New function.
6753 2015-01-13 Martin Uecker <uecker@eecs.berkeley.edu>
6755 * c.opt: New option -Warray-bounds=.
6757 2015-01-09 Michael Collison <michael.collison@linaro.org>
6759 * array-notation-common.c: Include hash-set.h, machmode.h,
6760 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
6761 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
6762 * c-ada-spec.c: Ditto.
6763 * c-cilkplus.c: Ditto.
6764 * c-common.c: Include input.h due to flattening of tree.h.
6765 Define macro GCC_C_COMMON_C.
6766 * c-common.h: Flatten tree.h header files into c-common.h.
6767 Remove include of tree-core.h.
6768 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
6769 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
6770 fold-const.h, wide-int.h, and inchash.h due to
6771 flattening of tree.h.
6773 * c-format.c: Flatten tree.h header files into c-common.h.
6774 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
6775 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
6776 fold-const.h, wide-int.h, and inchash.h due to
6777 flattening of tree.h.
6778 * c-dump.c: Include hash-set.h, machmode.h,
6779 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
6780 fold-const.h, wide-int.h, and inchash.h due to
6781 flattening of tree.h.
6782 * c-format.c: Include hash-set.h, machmode.h,
6783 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
6784 fold-const.h, wide-int.h, inchash.h and real.h due to
6785 flattening of tree.h.
6786 * c-gimplify.c: Include hash-set.h, machmode.h,
6787 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
6788 fold-const.h, wide-int.h, and inchash.h due to
6789 flattening of tree.h.
6795 * c-ppoutput.c: Ditto.
6796 * c-pragma.c: Ditto.
6797 * c-pretty-print.c: Ditto.
6798 * c-semantics.c: Ditto.
6800 * stub-objc.c: Ditto.
6802 2015-01-08 Jason Merrill <jason@redhat.com>
6804 * c-ubsan.c (ubsan_maybe_instrument_array_ref): Use
6805 do_ubsan_in_current_function.
6806 (ubsan_maybe_instrument_reference_or_call): Likewise.
6807 * c-ubsan.h: Declare it.
6809 2015-01-08 Mike Stump <mikestump@comcast.net>
6811 * c-common.c (c_common_attribute_table): Add no_sanitize_thread.
6813 2015-01-07 Marek Polacek <polacek@redhat.com>
6816 * c-common.c (c_fully_fold_internal): Warn for division and modulo
6817 if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST and is zero.
6819 2015-01-05 Trevor Saunders <tsaunders@mozilla.com>
6822 * c.opt (Wsuggest-override): New option.
6824 2015-01-05 Jakub Jelinek <jakub@redhat.com>
6826 Update copyright years.
6828 2015-01-05 Marek Polacek <polacek@redhat.com>
6831 * c-common.c (warn_array_subscript_with_type_char): Add location_t
6833 * c-common.h (warn_array_subscript_with_type_char): Update
6836 2014-12-20 Edward Smith-Rowland <3dw4rd@verizon.net>
6838 * c-cppbuiltin.c (__cpp_sized_deallocation): Uncomment and move macro.
6839 Control macro with flag_sized_deallocation.
6841 2014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
6843 * c.opt (Wdiscarded-array-qualifiers): New option.
6845 2014-12-19 Jakub Jelinek <jakub@redhat.com>
6847 PR preprocessor/63831
6848 * c-cppbuiltin.c (c_cpp_builtins): Don't define __has_attribute
6849 and __has_cpp_attribute here.
6850 * c-ppoutput.c (init_pp_output): Set cb->has_attribute to
6851 c_common_has_attribute.
6852 * c-common.h (c_common_has_attribute): New prototype.
6853 * c-lex.c (init_c_lex): Set cb->has_attribute to
6854 c_common_has_attribute instead of cb_has_attribute.
6855 (get_token_no_padding): New function.
6856 (cb_has_attribute): Renamed to ...
6857 (c_common_has_attribute): ... this. No longer static. Use
6858 get_token_no_padding, require ()s, don't build TREE_LIST
6859 unnecessarily, fix up formatting, adjust diagnostics, call
6862 2014-12-15 Jason Merrill <jason@redhat.com>
6864 * c.opt (-fsized-deallocation, -Wc++14-compat): New.
6865 (-Wsized-deallocation): New.
6866 * c-opts.c (c_common_post_options): -fsized-deallocation defaults
6867 to on in C++14 and up.
6869 2014-12-11 Jason Merrill <jason@redhat.com>
6871 * c-cppbuiltin.c (c_cpp_builtins): Enable C++14 __cpp_constexpr.
6873 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_runtime_arrays if
6874 we aren't complaining about VLAs.
6876 2014-12-06 Marek Polacek <polacek@redhat.com>
6878 PR tree-optimization/64183
6879 * c-gimplify.c (c_gimplify_expr): Don't convert the RHS of a
6880 shift-expression if it is integer_type_node. Use types_compatible_p.
6882 2014-11-29 Jakub Jelinek <jakub@redhat.com>
6884 * c-common.c (convert_vector_to_pointer_for_subscript): Remove NULL
6885 last argument from create_tmp_var_raw and create_tmp_var calls.
6886 * cilk.c (gimplify_cilk_spawn): Likewise.
6887 * c-omp.c (c_finish_omp_atomic): Likewise.
6889 2014-11-28 Marek Polacek <polacek@redhat.com>
6891 * c-ubsan.c (ubsan_instrument_shift): Use op1_utype for MINUS_EXPR
6892 instead of unsigned_type_node.
6894 2014-11-28 Marek Polacek <polacek@redhat.com>
6897 * c-ubsan.c (ubsan_instrument_shift): Change the type of a MINUS_EXPR
6899 * c-gimplify.c (c_gimplify_expr): Convert right operand of a shift
6900 expression to unsigned_type_node.
6902 2014-11-20 Mark Wielaard <mjw@redhat.com>
6905 * c-opts.c (set_std_c89): Set lang_hooks.name.
6906 (set_std_c99): Likewise.
6907 (set_std_c11): Likewise.
6908 (set_std_cxx98): Likewise.
6909 (set_std_cxx11): Likewise.
6910 (set_std_cxx14): Likewise.
6911 (set_std_cxx1z): Likewise.
6913 2014-11-21 Jakub Jelinek <jakub@redhat.com>
6916 * c-common.h (convert_vector_to_pointer_for_subscript): Change
6917 return type to bool.
6918 * c-common.c: Include gimple-expr.h.
6919 (convert_vector_to_pointer_for_subscript): Change return type to
6920 bool. If *vecp is not lvalue_p and has VECTOR_TYPE, return true
6921 and copy it into a TARGET_EXPR and use that instead of *vecp
6924 2014-11-19 David Malcolm <dmalcolm@redhat.com>
6926 Merger of git branch "gimple-classes-v2-option-3".
6927 * ChangeLog.gimple-classes: New.
6928 * c-gimplify.c (add_block_to_enclosing): Strengthen local "stack"
6929 from being just a vec<gimple> to a vec<gbind *>.
6931 2014-11-18 Jakub Jelinek <jakub@redhat.com>
6934 * c-ubsan.c (ubsan_maybe_instrument_reference_or_call): Change type
6935 argument to ptype, set type to TREE_TYPE (ptype). Don't call
6936 get_pointer_alignment for non-pointers. Use ptype, or if it is
6937 reference type, corresponding pointer type, as type of kind
6939 (ubsan_maybe_instrument_reference,
6940 ubsan_maybe_instrument_member_call): Adjust callers.
6942 2014-11-15 Marek Polacek <polacek@redhat.com>
6945 * array-notation-common.c (is_sec_implicit_index_fn): Return false
6947 (extract_array_notation_exprs): Return for NULL node.
6949 2014-11-12 Joseph Myers <joseph@codesourcery.com>
6951 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Define and
6952 undefine __NO_MATH_ERRNO__ based on changes to -fmath-errno state.
6954 2014-11-12 Jakub Jelinek <jakub@redhat.com>
6957 * c-common.c (check_builtin_function_arguments): Handle
6958 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW.
6960 2014-11-10 Andi Kleen <ak@linux.intel.com>
6963 * c-common.h (check_no_cilk): Declare.
6964 * cilk.c (get_error_location): New function.
6965 (check_no_cilk): Dito.
6967 2014-11-10 Andi Kleen <ak@linux.intel.com>
6969 * cilk.c (recognize_spawn): Use expression location
6972 2014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
6974 * c.opt ([Wshift-count-negative, Wshift-count-overflow]): Add.
6976 2014-11-10 Edward Smith-Rowland <3dw4rd@verizon.net>
6978 * c-cppbuiltin.c (__has_attribute, __has_cpp_attribute): New macros;
6979 (__cpp_rtti, __cpp_exceptions): New macros for C++98;
6980 (__cpp_range_based_for, __cpp_initializer_lists,
6981 __cpp_delegating_constructors, __cpp_nsdmi,
6982 __cpp_inheriting_constructors, __cpp_ref_qualifiers): New macros
6983 for C++11; (__cpp_attribute_deprecated): Remove in favor of
6984 __has_cpp_attribute.
6985 * c-lex.c (cb_has_attribute): New callback CPP function;
6986 (init_c_lex): Set has_attribute callback.
6988 2014-11-04 Richard Biener <rguenther@suse.de>
6990 * c-common.c (shorten_compare): Do not shorten mixed
6991 DFP and non-DFP compares.
6993 2014-11-01 Edward Smith-Rowland <3dw4rd@verizon.net>
6995 * g++.dg/cpp1y/feat-cxx11.C: Commentary and rearrangement of tests.
6996 * g++.dg/cpp1y/feat-cxx11-neg.C: Add aggregate NSDMI test.
6997 Commentary and rearrangement of tests.
6998 * g++.dg/cpp1y/feat-cxx14.C: Enable aggregate NSDMI test.
6999 Commentary and rearrangement of tests.
7000 * g++.dg/cpp1y/feat-cxx98-neg.C: Ditto.
7001 * g++.dg/cpp1y/feat-cxx98.C: Commentary.
7003 2014-10-29 Richard Sandiford <richard.sandiford@arm.com>
7005 * c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant
7006 enum from machine_mode.
7008 2014-10-28 Andrew MacLeod <amacleod@redhat.com>
7010 * c-common.c: Adjust include files.
7011 * c-gimplify.c: Ditto.
7013 * c-pragma.c: Ditto.
7016 2014-10-27 Andrew MacLeod <amacleod@redhat.com>
7018 * c-gimplify.c: Adjust include files.
7020 2014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
7023 * c-opts.c (c_common_diagnostics_set_defaults): Renamed from
7024 c_common_initialize_diagnostics.
7025 * c-common.h: Likewise.
7027 2014-10-24 Marek Polacek <polacek@redhat.com>
7030 * c-pretty-print.c (c_pretty_printer::simple_type_specifier): Don't
7031 print "struct"/"union"/"enum" for typedefed names.
7033 2014-10-23 Marek Polacek <polacek@redhat.com>
7035 * c-ubsan.c (ubsan_instrument_shift): Perform the MINUS_EXPR
7038 2014-10-22 Jakub Jelinek <jakub@redhat.com>
7039 Yury Gribov <y.gribov@samsung.com>
7041 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
7042 ubsan_instrument_vla): Check bits in flag_sanitize_recover bitmask
7043 instead of flag_sanitize_recover as bool flag.
7045 2014-10-21 Kirill Yukhin <kirill.yukhin@intel.com>
7047 * cilk.c: Revert previous change.
7049 2014-10-20 Igor Zamyatin <igor.zamyatin@intel.com>
7052 * cilk.c: Include vec.h.
7053 (struct cilk_decls): New structure.
7054 (wrapper_parm_cb): Split this function to...
7055 (fill_decls_vec): ...this...
7056 (create_parm_list): ...and this.
7057 (compare_decls): New function.
7058 (for_local_cb): Remove.
7059 (wrapper_local_cb): Ditto.
7060 (build_wrapper_type): For now first traverse and fill vector of
7061 declarations then sort it and then deal with sorted vector.
7062 (cilk_outline): Ditto.
7063 (declare_one_free_variable): Ditto.
7065 2014-10-17 Marek Polacek <polacek@redhat.com>
7067 * c-opts.c (c_common_post_options): Set warn_implicit_int.
7068 * c.opt (Wimplicit-int): Initialize to -1.
7070 2014-10-16 Andrew MacLeod <amacleod@redhat.com>
7072 * c-pragma.c: Adjust include files.
7073 * c-semantics.c: Likewise.
7075 2014-10-16 DJ Delorie <dj@redhat.com>
7077 * c-cppbuiltin.c (cpp_atomic_builtins): Don't assume pointers are
7080 2014-10-14 Jason Merrill <jason@redhat.com>
7083 * c-common.h (CPP_PREPARSED_EXPR): New.
7084 (N_CP_TTYPES): Adjust.
7086 2014-10-15 Marek Polacek <polacek@redhat.com>
7088 * c-opts.c (c_common_init_options): Make -std=gnu11 the default for C.
7090 2014-10-14 DJ Delorie <dj@redhat.com>
7092 * c-pretty-print.c (pp_c_integer_constant): Check for all __intN
7093 types, not just __int128.
7094 * c-cppbuiltin.c (c_cpp_builtins): Add builtins for all __intN
7095 types, not just __int128.
7096 (cpp_atomic_builtins): Round pointer sizes up.
7097 (type_suffix): Use type precision, not specific types.
7098 * c-common.c (c_common_reswords): Remove __int128 special case.
7099 (c_common_type_for_size): Check for all __intN types, not just
7101 (c_common_type_for_mode): Likewise.
7102 (c_common_signed_or_unsigned_type): Likewise.
7103 (c_build_bitfield_integer_type): Likewise.
7104 (c_common_nodes_and_builtins): Likewise.
7105 (keyword_begins_type_specifier): Likewise.
7106 * c-common.h (rid): Remove RID_INT128 and add RID_INT_N_* for all
7109 2014-10-12 Trevor Saunders <tsaunders@mozilla.com>
7111 * c-common.c: Use hash_table instead of hashtab.
7113 2014-10-06 Edward Smith-Rowland <3dw4rd@verizon.net>
7115 * c-cppbuiltin.c: Move __cpp_attribute_deprecated to the
7118 2014-10-03 Marc Glisse <marc.glisse@inria.fr>
7123 * c-common.c (warn_logical_operator): Punt for vectors.
7125 2014-10-01 Edward Smith-Rowland <3dw4rd@verizon.net>
7127 Implement SD-6: SG10 Feature Test Recommendations
7128 * c-cppbuiltin.c (c_cpp_builtins()): Define language feature
7129 macros and the __has_header macro.
7131 2014-09-30 Jason Merrill <jason@redhat.com>
7133 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_ASSIGNABLE and
7134 RID_IS_TRIVIALLY_CONSTRUCTIBLE.
7135 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
7137 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_COPYABLE.
7138 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
7140 * c-common.h (enum rid): Remove RID_IS_CONVERTIBLE_TO.
7141 * c-common.c (c_common_reswords): Remove __is_convertible_to.
7143 2014-09-24 Marek Polacek <polacek@redhat.com>
7147 * c-common.h (struct c_common_resword): Don't define CPP_KEYWORD.
7149 2014-09-23 Andi Kleen <ak@linux.intel.com>
7151 * c-common.c (handle_no_reorder_attribute): New function.
7152 (c_common_attribute_table): Add no_reorder attribute.
7154 2014-09-22 Joseph Myers <joseph@codesourcery.com>
7156 * c-cppbuiltin.c (c_cpp_builtins): Define
7157 __LIBGCC_*_EXCESS_PRECISION__ macros for supported floating-point
7160 2014-09-18 Joseph Myers <joseph@codesourcery.com>
7162 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_*_FUNC_EXT__
7163 for supported floating-point modes.
7165 2014-09-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
7167 * c.opt (Wpsabi): Use LangEnabledBy.
7168 * c-opts.c (c_common_handle_option): Do not handle here.
7170 2014-09-12 Joseph Myers <joseph@codesourcery.com>
7172 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_HAS_%s_MODE__
7173 macros for floating-point modes.
7175 2014-09-11 Marc Glisse <marc.glisse@inria.fr>
7178 * c-cppbuiltin.c (builtin_define_float_constants): Correct
7179 __*_DENORM_MIN__ without denormals.
7181 2014-09-10 Jakub Jelinek <jakub@redhat.com>
7183 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
7184 ubsan_instrument_vla, ubsan_instrument_return): Adjust
7185 ubsan_create_data callers.
7186 (ubsan_instrument_bounds): Don't emit UBSAN_BOUNDS at all if
7187 index is constant or BIT_AND_EXPR with constant mask and is
7188 small enough for the bound.
7189 * c-gimplify.c (ubsan_walk_array_refs_r): For ADDR_EXPR of
7190 ARRAY_REF, make sure the inner ARRAY_REF is not walked again.
7192 2014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
7194 * c.opt: Add CppReason to various flags.
7195 (Wdate-time): Re-sort.
7196 * c-common.c: Include c-common.h earlier.
7197 (struct reason_option_codes_t): Delete.
7198 (c_option_controlling_cpp_error): Prefix global type and struct
7201 2014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
7203 * c.opt (Wnormalized): New.
7204 (Wnormalized=): Use Enum and Reject Negative.
7205 * c-opts.c (c_common_handle_option): Do not handle Wnormalized here.
7207 2014-09-08 Joseph Myers <joseph@codesourcery.com>
7209 * c-cppbuiltin.c (c_cpp_builtins): Define macros for mantissa
7210 digits of floating-point modes if -fbuilding-libgcc.
7212 2014-09-05 Joseph Myers <joseph@codesourcery.com>
7214 * c-cppbuiltin.c (c_cpp_builtins): Also define
7215 __LIBGCC_EH_TABLES_CAN_BE_READ_ONLY__,
7216 __LIBGCC_EH_FRAME_SECTION_NAME__, __LIBGCC_JCR_SECTION_NAME__,
7217 __LIBGCC_CTORS_SECTION_ASM_OP__, __LIBGCC_DTORS_SECTION_ASM_OP__,
7218 __LIBGCC_TEXT_SECTION_ASM_OP__, __LIBGCC_INIT_SECTION_ASM_OP__,
7219 __LIBGCC_INIT_ARRAY_SECTION_ASM_OP__,
7220 __LIBGCC_STACK_GROWS_DOWNWARD__,
7221 __LIBGCC_DONT_USE_BUILTIN_SETJMP__,
7222 __LIBGCC_DWARF_ALT_FRAME_RETURN_COLUMN__,
7223 __LIBGCC_DWARF_FRAME_REGISTERS__,
7224 __LIBGCC_EH_RETURN_STACKADJ_RTX__, __LIBGCC_JMP_BUF_SIZE__,
7225 __LIBGCC_STACK_POINTER_REGNUM__ and
7226 __LIBGCC_VTABLE_USES_DESCRIPTORS__ for -fbuilding-libgcc.
7227 (builtin_define_with_value): Handle backslash-escaping in string
7230 2014-09-05 Richard Biener <rguenther@suse.de>
7233 * c-format.c (check_format_arg): Properly handle
7234 effectively signed POINTER_PLUS_EXPR offset.
7236 2014-09-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
7238 * c.opt (Wc90-c99-compat,Wc++-compat,Wcomment,Wendif-labels,
7239 Winvalid-pch,Wlong-long,Wmissing-include-dirs,Wmultichar,Wpedantic,
7240 (Wdate-time,Wtraditional,Wundef,Wvariadic-macros): Add CPP, Var
7242 * c-opts.c (c_common_handle_option): Do not handle here.
7243 (sanitize_cpp_opts): Likewise.
7244 * c-common.c (struct reason_option_codes_t): Handle
7245 CPP_W_C90_C99_COMPAT and CPP_W_PEDANTIC.
7247 2014-09-03 Marek Polacek <polacek@redhat.com>
7249 * c.opt (Wlogical-not-parentheses): Enable by -Wall.
7251 2014-09-02 Jakub Jelinek <jakub@redhat.com>
7252 Balaji V. Iyer <balaji.v.iyer@intel.com>
7253 Igor Zamyatin <igor.zamyatin@intel.com>
7255 * c-cilkplus.c (cilk_for_number_of_iterations): New function.
7256 * c-common.c (c_common_reswords): Added _Cilk_for.
7257 * c-common.h (enum rid): Added RID_CILK_FOR.
7258 (cilk_for_number_of_iterations): Add declaration.
7259 * c-omp.c (c_finish_omp_for): Added checks for CILK_SIMD and
7261 * c-pragma.c (init_pragma): Register "grainsize" pragma.
7262 * c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_GRAINSIZE.
7264 2014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
7266 * c.opt (Wbuiltin-macro-redefined,Wdeprecated,Wendif-labels,
7267 Winvalid-pch,Wliteral-suffix,Wmissing-include-dirs,Wtrigraphs,
7268 Wundef): Use CPP, Var and Init.
7269 * c-opts.c (c_common_handle_option): Do not handle the above flags here.
7271 2014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
7273 * c.opt (Wbuiltin-macro-redefined): Use CPP, Var and Init.
7274 * c-opts.c (c_common_handle_option): Do not handle here.
7276 2014-08-25 Jason Merrill <jason@redhat.com>
7278 * c.opt: Change -std=c++1y and -std=gnu++1y to be aliases for
7279 -std=c++14 and -std=gnu++14, rather than the reverse.
7280 * c-opts.c (c_common_handle_option): Change OPT_std_c__1y and
7281 OPT_std_gnu__1y to OPT_std_c__14 and OPT_std_gnu__14.
7282 * c-common.h (cxx_dialect): Remove cxx1y.
7284 2014-08-23 Edward Smith-Rowland <3dw4rd@verizon.net>
7286 * c-common.h (enum cxx_dialect): Add cxx14.
7287 * c-opts.c (set_std_cxx1y): Rename to set_std_cxx14; Use cxx14.
7288 * c-ubsan.c (ubsan_instrument_shift): Change comment and logic from
7289 cxx_dialect == cxx11 || cxx_dialect == cxx1y to cxx_dialect >= cxx11.
7291 2014-08-22 Jason Merrill <jason@redhat.com>
7293 * c.opt (std=gnu++17): Fix alias.
7295 2014-08-22 Marek Polacek <polacek@redhat.com>
7298 * c-common.c (warn_logical_not_parentheses): Don't check LHS. Don't
7299 check for vector types. Drop LHS argument.
7300 * c-common.h (warn_logical_not_parentheses): Adjust.
7302 2014-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
7304 * c.opt (Wcomment): Use CPP, Var and LangEnabledBy.
7305 (Wmultichar): Likewise.
7306 (Wdate-time): Use C-family languages instead of Common. Use CPP
7308 * c-opts.c (c_common_handle_option): Do not handle the above
7310 (sanitize_cpp_opts): Likewise.
7312 2014-08-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
7315 * c-opts.c: Include tree-diagnostics.h.
7316 (c_diagnostic_finalizer): New.
7317 (c_common_initialize_diagnostics): Use it.
7319 2014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
7321 PR preprocessor/51303
7322 * c-common.c (struct reason_option_codes_t option_codes):
7323 Add CPP_W_MISSING_INCLUDE_DIRS. Sort alphabetically.
7325 2014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
7329 * c.opt (Wvariadic-macros): Use CPP and LangEnabledBy.
7330 * c-opts.c (c_common_handle_option): Call cpp_handle_option_auto.
7331 (c_common_post_options): Call init_global_opts_from_cpp.
7332 (sanitize_cpp_opts): Do not handle Wvariadic-macros here.
7334 2014-08-19 Marek Polacek <polacek@redhat.com>
7337 * c-common.c (maybe_warn_bool_compare): New function.
7338 * c-common.h (maybe_warn_bool_compare): Declare.
7339 * c.opt (Wbool-compare): New option.
7341 2014-08-19 Marek Polacek <polacek@redhat.com>
7343 * c.opt (Wc99-c11-compat): New option.
7345 2014-08-19 Marek Polacek <polacek@redhat.com>
7347 * c-opts.c (sanitize_cpp_opts): Make warn_long_long be set according
7348 to warn_c90_c99_compat.
7349 * c.opt (Wc90-c99-compat, Wdeclaration-after-statement): Initialize
7352 2014-08-19 Manuel López-Ibáñez <manu@gcc.gnu.org>
7353 Steven Bosscher <steven@gcc.gnu.org>
7356 * c-format.c: Add extra_arg_loc and format_string_loc to struct
7357 format_check_results.
7358 (check_function_format): Use true and add comment for boolean
7360 (finish_dollar_format_checking): Use explicit location when warning.
7361 (check_format_info): Likewise.
7362 (check_format_arg): Set extra_arg_loc and format_string_loc.
7363 (check_format_info_main): Use explicit location when warning.
7364 (check_format_types): Pass explicit location.
7365 (format_type_warning): Likewise.
7367 2014-08-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
7370 * c-format.c: Handle Fortran flags.
7372 2014-08-12 Igor Zamyatin <igor.zamyatin@intel.com>
7375 * array-notation-common.c (find_rank): Added handling for other
7376 types of references.
7378 2014-08-10 Marek Polacek <polacek@redhat.com>
7381 * c-opts.c (sanitize_cpp_opts): Pass warn_c90_c99_compat to libcpp.
7382 * c.opt (Wc90-c99-compat): Add option.
7384 2014-08-07 Trevor Saunders <tsaunders@mozilla.com>
7386 * c-gimplify.c, cilk.c: Remove includes of pointer-set.h.
7388 2014-08-03 Marek Polacek <polacek@redhat.com>
7390 * c-common.c (check_case_value): Add location_t parameter. Use it.
7391 (c_add_case_label): Pass loc to check_case_value.
7393 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
7395 * cilk.c: Use hash_map instead of pointer_map.
7397 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
7399 * c-gimplify.c: Use hash_set instead of pointer_set.
7401 2014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
7404 * array-notation-common.c (extract_array_notation_exprs): Handling
7407 2014-08-01 Jakub Jelinek <jakub@redhat.com>
7409 * c-common.h (min_align_of_type): Removed prototype.
7410 * c-common.c (min_align_of_type): Removed.
7411 * c-ubsan.h (ubsan_maybe_instrument_reference,
7412 ubsan_maybe_instrument_member_call): New prototypes.
7413 * c-ubsan.c: Include stor-layout.h and builtins.h.
7414 (ubsan_maybe_instrument_reference_or_call,
7415 ubsan_maybe_instrument_reference, ubsan_maybe_instrument_call): New
7418 2014-07-31 Marc Glisse <marc.glisse@inria.fr>
7421 * c.opt (-Wreturn-local-addr): Move to common.opt.
7423 2014-07-30 Jason Merrill <jason@redhat.com>
7428 * c.opt (-fuse-all-virtuals): New.
7430 2014-07-30 Tom Tromey <tromey@redhat.com>
7433 * c.opt (Wdesignated-init): New option.
7434 * c-common.c (c_common_attribute_table): Add "designated_init".
7435 (handle_designated_init): New function.
7437 2014-07-24 Marek Polacek <polacek@redhat.com>
7440 * c-opts.c (c_finish_options): If -imacros is in effect, return.
7442 2014-07-16 Dodji Seketeli <dodji@redhat.com>
7444 PR preprocessor/60723 - missing system-ness marks for macro tokens
7445 * c-ppoutput.c (struct print::prev_was_system_token): New data
7447 (init_pp_output): Initialize it.
7448 (maybe_print_line_1, maybe_print_line, print_line_1, print_line)
7449 (do_line_change): Return a flag saying if a line marker was
7451 (scan_translation_unit): Detect if the system-ness of the token we
7452 are about to emit is different from the one of the previously
7453 emitted token. If so, emit a line marker. Avoid emitting useless
7454 adjacent line markers. Avoid emitting line markers for tokens
7455 originating from the expansion of built-in macros.
7456 (scan_translation_unit_directives_only): Adjust.
7458 2014-07-15 Marek Polacek <polacek@redhat.com>
7460 * c-ubsan.c (ubsan_instrument_bounds): Don't instrument if
7461 TYPE_MAX_VALUE is NULL.
7463 2014-07-14 Jakub Jelinek <jakub@redhat.com>
7466 * c.opt (Wmemset-transposed-args): New warning.
7468 2014-07-10 Jason Merrill <jason@redhat.com>
7472 * c.opt (-fuse-all-virtuals): New.
7474 2014-07-09 Richard Biener <rguenther@suse.de>
7477 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
7478 using unsigned arithmetic if overflow does not wrap instead of
7479 if overflow is undefined.
7481 2014-07-06 Marek Polacek <polacek@redhat.com>
7484 * c.opt (Wsizeof-array-argument): New option.
7486 2014-07-03 Jakub Jelinek <jakub@redhat.com>
7488 * c-ada-spec.c (dump_ada_nodes): Don't call qsort if
7489 comments->count <= 1, as comments->entries might be NULL.
7491 2014-07-01 Marek Polacek <polacek@redhat.com>
7493 * c.opt (Wint-conversion): New option.
7495 2014-07-01 Marek Polacek <polacek@redhat.com>
7498 * c.opt (Wincompatible-pointer-types): New option.
7500 2014-06-30 Paolo Carlini <paolo.carlini@oracle.com>
7503 * c-common.c (handle_noreturn_attribute, handle_const_attribute):
7504 Do not discard TYPE_QUALS of type.
7506 2014-06-26 Jason Merrill <jason@redhat.com>
7508 * c-common.h (enum cxx_dialect): Add cxx1z.
7509 * c.opt (std=c++1z, std=c++17, std=gnu++1z, std=gnu++17): New.
7510 * c-opts.c (c_common_handle_option, set_std_cxx1z): Handle it.
7512 2014-06-26 Teresa Johnson <tejohnson@google.com>
7514 * c-common.h (get_dump_info): Declare.
7515 * c-gimplify.c (c_genericize): Use saved dump files.
7516 * c-opts.c (c_common_parse_file): Begin and end dumps
7517 once around parsing invocation.
7518 (get_dump_info): New function.
7520 2014-06-23 Marek Polacek <polacek@redhat.com>
7521 Andrew MacLeod <amacleod@redhat.com>
7524 * c-common.c (get_atomic_generic_size): Don't segfault if the
7525 type doesn't have a size.
7527 2014-06-20 Marek Polacek <polacek@redhat.com>
7529 * c-gimplify.c: Include "c-ubsan.h" and "pointer-set.h".
7530 (ubsan_walk_array_refs_r): New function.
7531 (c_genericize): Instrument array bounds.
7532 * c-ubsan.c: Include "internal-fn.h".
7533 (ubsan_instrument_division): Mark instrumented arrays as having
7534 side effects. Adjust ubsan_type_descriptor call.
7535 (ubsan_instrument_shift): Likewise.
7536 (ubsan_instrument_vla): Adjust ubsan_type_descriptor call.
7537 (ubsan_instrument_bounds): New function.
7538 (ubsan_array_ref_instrumented_p): New function.
7539 (ubsan_maybe_instrument_array_ref): New function.
7540 * c-ubsan.h (ubsan_instrument_bounds): Declare.
7541 (ubsan_array_ref_instrumented_p): Declare.
7542 (ubsan_maybe_instrument_array_ref): Declare.
7544 2014-06-20 Hale Wang <hale.wang@arm.com>
7547 * c.opt (fshort-enums): Add to LTO.
7548 * c.opt (fshort-wchar): Likewise.
7550 2014-06-16 Marek Polacek <polacek@redhat.com>
7553 * c.opt (Wswitch-bool): Add Var.
7555 2014-06-12 Jakub Jelinek <jakub@redhat.com>
7558 * c-omp.c (c_omp_split_clauses): Don't crash on firstprivate in
7559 #pragma omp target teams or
7560 #pragma omp {,target }teams distribute simd.
7562 2014-06-12 Jason Merrill <jason@redhat.com>
7564 * c.opt (Wabi=, fabi-compat-version): New.
7565 * c-opts.c (c_common_handle_option): Handle -Wabi=.
7566 (c_common_post_options): Handle flag_abi_compat_version default.
7567 Disallow -fabi-compat-version=1.
7568 * c-common.h (abi_version_crosses): New.
7570 2014-06-11 Jan Hubicka <hubicka@ucw.cz>
7572 * c-common.c (handle_section_attribute): Update handling for
7573 section names that are no longer trees.
7575 2014-06-10 Jakub Jelinek <jakub@redhat.com>
7578 * c-pragma.c (omp_pragmas_simd): Move PRAGMA_OMP_TASK...
7579 (omp_pragmas): ... back here.
7581 2014-06-05 Marek Polacek <polacek@redhat.com>
7584 * c-common.c (warn_logical_not_parentheses): New function.
7585 * c-common.h (warn_logical_not_parentheses): Declare.
7586 * c.opt (Wlogical-not-parentheses): New option.
7588 2014-06-04 Marek Polacek <polacek@redhat.com>
7591 * c-common.c (check_case_bounds): Add location parameter.
7593 (c_add_case_label): Pass loc to check_case_bounds.
7595 2014-06-03 Marek Polacek <polacek@redhat.com>
7598 * c.opt (Wswitch-bool): New option.
7600 2014-05-22 Thomas Schwinge <thomas@codesourcery.com>
7602 * c-common.h (c_omp_sharing_predetermined, c_omp_remap_decl):
7604 (record_types_used_by_current_var_decl): Move prototype to where
7607 * c-common.c (DEF_FUNCTION_TYPE_0, DEF_FUNCTION_TYPE_6)
7608 (DEF_FUNCTION_TYPE_7, DEF_FUNCTION_TYPE_8)
7609 (DEF_FUNCTION_TYPE_VAR_5): Cosmetic fixes.
7611 2014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
7613 * c-common.h (CTI_VOID_ZERO, void_zero_node): Delete.
7614 * c-common.c (c_common_nodes_and_builtins): Don't initialize
7616 * c-pretty-print.c (pp_c_void_constant): New function.
7617 (c_pretty_printer::constant, c_pretty_printer::primary_expression)
7618 (c_pretty_printer::expression): Handle VOID_CST.
7619 * cilk.c (extract_free_variables): Likewise.
7620 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift)
7621 (ubsan_instrument_vla): Use void_node instead of void_zero_node.
7623 2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
7625 * c-common.h (sorted_fields_type): Remove variable_size GTY attribute.
7626 * c-pragma.c (push_alignment): Adjust.
7627 (handle_pragma_push_options): Likewise.
7629 2014-05-09 Marek Polacek <polacek@redhat.com>
7632 * c-common.c (check_user_alignment): Return -1 if alignment is error
7634 (handle_aligned_attribute): Don't call default_conversion on
7636 (handle_vector_size_attribute): Likewise.
7637 (handle_tm_wrap_attribute): Handle case when wrap_decl is error node.
7638 (handle_sentinel_attribute): Call default_conversion and allow even
7639 integral types as an argument.
7641 2014-05-08 Marek Polacek <polacek@redhat.com>
7644 * c-common.c (min_align_of_type): New function factored out from...
7645 (c_sizeof_or_alignof_type): ...here.
7646 * c-common.h (min_align_of_type): Declare.
7648 2014-05-08 Marek Polacek <polacek@redhat.com>
7651 * c-common.c (check_main_parameter_types): Warn for _Atomic-qualified
7652 parameter type of main.
7654 2014-05-07 DJ Delorie <dj@redhat.com>
7656 * c-cppbuiltin.c (print_bits_of_hex): New.
7657 (builtin_define_type_minmax): Print values using hex so as not to
7658 require a pre-computed list of string values.
7660 2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
7661 Mike Stump <mikestump@comcast.net>
7662 Richard Sandiford <rdsandiford@googlemail.com>
7664 * c-ada-spec.c: Include wide-int.h.
7665 (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Remove.
7666 (dump_generic_ada_node): Use wide-int interfaces.
7667 * c-common.c: Include wide-int-print.h.
7668 (shorten_compare): Use wide-int interfaces and tree_int_cst_lt.
7669 (pointer_int_sum): Use wide-int interfaces.
7670 (c_common_nodes_and_builtins): Use make_int_cst.
7671 (match_case_to_enum_1): Use tree_fits_uhwi_p and tree_fits_shwi_p.
7672 (handle_alloc_size_attribute): Use wide-int interfaces.
7673 (get_nonnull_operand): Likewise.
7674 * c-format.c (get_constant): Use tree_fits_uhwi_p.
7675 * c-lex.c: Include wide-int.h.
7676 (narrowest_unsigned_type): Take a widest_int rather than two
7678 (narrowest_signed_type): Likewise.
7679 (interpret_integer): Update accordingly. Use wide-int interfaces.
7680 (lex_charconst): Use wide-int interfaces.
7681 * c-pretty-print.c: Include wide-int.h.
7682 (pp_c_integer_constant): Use wide-int interfaces.
7683 * cilk.c (declare_one_free_variable): Use tree_int_cst_lt instead of
7684 INT_CST_LT_UNSIGNED.
7686 2014-05-06 Richard Biener <rguenther@suse.de>
7688 * c-opts.c (c_common_post_options): For -freestanding,
7689 -fno-hosted and -fno-builtin disable pattern recognition
7690 if not enabled explicitely.
7692 2014-05-02 Marek Polacek <polacek@redhat.com>
7694 * c.opt (Wsizeof-pointer-memaccess): Describe option.
7696 2014-05-01 Marek Polacek <polacek@redhat.com>
7699 * c.opt (Wdiscarded-qualifiers): Add.
7701 2014-04-30 Marek Polacek <polacek@redhat.com>
7703 * c-ubsan.c (ubsan_instrument_division): Handle REAL_TYPEs. Perform
7704 INT_MIN / -1 sanitization only for integer types.
7706 2014-04-25 Marek Polacek <polacek@redhat.com>
7709 * c-common.c (handle_noinline_attribute): Warn if the attribute
7710 conflicts with always_inline attribute.
7711 (handle_always_inline_attribute): Warn if the attribute conflicts
7712 with noinline attribute.
7714 2014-04-25 Marek Polacek <polacek@redhat.com>
7717 * c-common.c (check_main_parameter_types): Warn about variadic main.
7719 2014-04-24 Mike Stump <mikestump@comcast.net>
7721 * c.opt (Wshadow-ivar): Default to on.
7723 2014-04-24 Dimitris Papavasiliou <dpapavas@gmail.com>
7725 * c.opt (Wshadow-ivar, flocal-ivars, fivar-visibility): Add.
7727 2014-04-23 Marek Polacek <polacek@redhat.com>
7729 * c-common.c (handle_tm_wrap_attribute): Tweak error message.
7731 2014-04-22 Jakub Jelinek <jakub@redhat.com>
7734 * c-ubsan.c (ubsan_instrument_return): Return __builtin_trap ()
7735 if flag_sanitize_undefined_trap_on_error.
7736 (ubsan_instrument_division, ubsan_instrument_shift,
7737 ubsan_instrument_vla): Likewise. Use __ubsan_handle_*_abort ()
7738 if !flag_sanitize_recover.
7740 2014-04-22 Marc Glisse <marc.glisse@inria.fr>
7743 * c-common.c (registered_builtin_types): Make non-static.
7744 * c-common.h (registered_builtin_types): Declare.
7746 2014-04-14 Richard Biener <rguenther@suse.de>
7747 Marc Glisse <marc.glisse@inria.fr>
7750 * c-common.c (convert_vector_to_pointer_for_subscript): Properly
7751 apply may-alias the scalar pointer type when applicable.
7753 2014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
7756 * cilk.c (cilk_set_spawn_marker): Remove FUNCTION_DECL
7757 as possible argument for Cilk_spawn.
7759 2014-04-11 Tobias Burnus <burnus@net-b.de>
7762 * c.opt (Wformat-signedness): Add
7763 * c-format.c(check_format_types): Use it.
7765 2014-04-11 Jason Merrill <jason@redhat.com>
7768 * c-common.c (sync_resolve_size, get_atomic_generic_size): Call
7769 default_conversion for an array argument.
7771 2014-04-08 Marek Polacek <polacek@redhat.com>
7774 * c-ubsan.c: Include asan.h.
7775 (ubsan_instrument_return): Call initialize_sanitizer_builtins.
7777 2014-04-03 Nathan Sidwell <nathan@codesourcery.com>
7779 * c.opt (Wnon-virtual-dtor): Auto set when Weffc++.
7781 2014-04-02 Marek Polacek <polacek@redhat.com>
7783 * c-common.h (c_expand_expr): Remove declaration.
7785 2014-03-28 Jakub Jelinek <jakub@redhat.com>
7788 * c-common.c (add_atomic_size_parameter): When creating new
7789 params vector, push the size argument first.
7791 2014-03-26 Jakub Jelinek <jakub@redhat.com>
7793 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
7794 ubsan_instrument_vla, ubsan_instrument_return): Adjust
7795 ubsan_create_data callers.
7797 2014-03-22 Jakub Jelinek <jakub@redhat.com>
7800 * c-opts.c (c_finish_options): Restore cb_file_change call to
7803 2014-03-13 Jakub Jelinek <jakub@redhat.com>
7806 * c-pragma.c (apply_pragma_weak): Only look at
7807 TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl)) if
7808 DECL_ASSEMBLER_NAME_SET_P (decl).
7809 (maybe_apply_pending_pragma_weaks): Exit early if
7810 vec_safe_is_empty (pending_weaks) rather than only when
7812 (maybe_apply_pragma_weak): Likewise. If !DECL_ASSEMBLER_NAME_SET_P,
7813 set assembler name back to NULL afterwards.
7815 2014-03-11 Jason Merrill <jason@redhat.com>
7817 * c.opt: Add -std=gnu++14.
7819 2014-03-11 Ian Bolton <ian.bolton@arm.com>
7821 * c-opts.c (c_common_post_options): Don't override
7822 -ffp-contract=fast if unsafe-math-optimizations is on.
7824 2014-03-08 Paulo Matos <paulo@matos-sorge.com>
7826 * c.opt: Enable LTO FE for fshort-double.
7828 2014-03-07 Jason Merrill <jason@redhat.com>
7830 * c.opt: Add -std=c++14.
7832 2014-03-06 Marek Polacek <polacek@redhat.com>
7835 * cilk.c (contains_cilk_spawn_stmt): New function.
7836 (contains_cilk_spawn_stmt_walker): Likewise.
7837 (recognize_spawn): Give error on invalid use of _Cilk_spawn.
7838 * c-common.h (contains_cilk_spawn_stmt): Add declaration.
7840 2014-03-03 Jakub Jelinek <jakub@redhat.com>
7842 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_SIMD.
7843 (init_pragma): Call cpp_register_deferred_pragma for PRAGMA_CILK_SIMD
7844 even when flag_preprocess_only.
7846 2014-02-26 Jason Merrill <jason@redhat.com>
7850 * c-common.c (shorten_compare): Don't check
7851 c_inhibit_evaluation_warnings.
7853 2014-02-19 Jakub Jelinek <jakub@redhat.com>
7856 * c-common.c (c_common_nodes_and_builtins): When initializing
7857 c_uint{16,32,64}_type_node, also set corresponding
7858 uint{16,32,64}_type_node to the same value.
7861 * c-pragma.c (init_pragma): Don't call cpp_register_deferred_pragma
7862 for PRAGMA_IVDEP if flag_preprocess_only.
7864 2014-02-12 Jakub Jelinek <jakub@redhat.com>
7867 * c-common.c (merge_tlist): If copy is true, call new_tlist,
7868 if false, add ADD itself, rather than vice versa.
7869 (verify_tree): For COND_EXPR, don't call merge_tlist with non-zero
7870 copy. For SAVE_EXPR, only call merge_tlist once.
7872 2014-02-08 Jakub Jelinek <jakub@redhat.com>
7875 * c-common.c (handle_alloc_size_attribute): Use tree_fits_uhwi_p
7877 (handle_alloc_align_attribute, handle_assume_aligned_attribute): New
7879 (c_common_attribute_table): Add alloc_align and assume_aligned
7882 2014-02-06 Marek Polacek <polacek@redhat.com>
7885 * c-common.c (warn_for_sign_compare): Call warning_at with location
7888 2014-02-05 Marek Polacek <polacek@redhat.com>
7891 * c-omp.c (c_finish_omp_atomic): Remove unreachable return
7894 2014-02-04 Marek Polacek <polacek@redhat.com>
7897 * c-common.c (conversion_warning): Unwrap C_MAYBE_CONST_EXPR and/or
7900 2014-02-03 Marc Glisse <marc.glisse@inria.fr>
7904 * c-common.c (handle_aligned_attribute, handle_alloc_size_attribute,
7905 handle_vector_size_attribute, handle_nonnull_attribute): Call
7906 default_conversion on the attribute argument.
7907 (handle_nonnull_attribute): Increment the argument number.
7909 2014-01-31 Marek Polacek <polacek@redhat.com>
7912 * c-common.c (add_atomic_size_parameter): Pass vNULL to
7913 build_function_call_vec.
7914 (resolve_overloaded_builtin): Likewise.
7915 * c-common.h (build_function_call_vec): Adjust declaration.
7917 2014-01-30 Marek Polacek <polacek@redhat.com>
7920 * c-common.h (unsafe_conversion_p): Adjust declaration.
7921 (warnings_for_convert_and_check): Likewise.
7922 (convert_and_check): Likewise.
7923 * c-common.c (unsafe_conversion_p): Add location parameter. Call
7924 expansion_point_location_if_in_system_header on it.
7925 (warnings_for_convert_and_check): Add location parameter. Call
7926 expansion_point_location_if_in_system_header on it. Use it.
7927 (convert_and_check): Add location parameter. Use it.
7928 (conversion_warning): Likewise.
7929 (c_add_case_label): Adjust convert_and_check calls.
7930 (scalar_to_vector): Adjust unsafe_conversion_p calls.
7932 2014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
7934 * c-common.c (c_define_builtins): Replaced flag_enable_cilkplus with
7936 * c-pragma.c (init_pragma): Likewise.
7939 2014-01-23 Marek Polacek <polacek@redhat.com>
7942 * c-common.c (shorten_compare): Add location_t parameter.
7943 * c-common.h (shorten_binary_op): Adjust declaration.
7945 2014-01-23 Marek Polacek <polacek@redhat.com>
7948 * c-common.c (pointer_to_zero_sized_aggr_p): New function.
7949 * c-common.h: Declare it.
7951 2014-01-20 Eric Botcazou <ebotcazou@adacore.com>
7953 * c-ada-spec.h (dump_ada_specs): Revert prototype change.
7954 * c-ada-spec.c (dump_ads): Likewise.
7955 (cpp_check): Likewise.
7956 (dump_ada_specs): Likewise.
7958 2014-01-15 Laurent Alfonsi <laurent.alfonsi@st.com>
7961 * c-common.c (handle_no_instrument_function_attribute): Allow
7962 no_instrument_function attribute in class member
7963 definition/declaration.
7965 2014-01-15 Jakub Jelinek <jakub@redhat.com>
7968 * c-omp.c (c_finish_omp_atomic): Set in_late_binary_op around
7969 build_modify_expr with non-NOP_EXPR opcode. Handle return from it
7970 being COMPOUND_EXPR.
7971 (c_finish_omp_for): Handle incr being COMPOUND_EXPR with first
7972 operand a SAVE_EXPR and second MODIFY_EXPR.
7974 2014-01-09 Jakub Jelinek <jakub@redhat.com>
7977 * c-pch.c (c_common_write_pch): Call
7978 prepare_target_option_nodes_for_pch.
7980 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
7982 Update copyright years
7984 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
7986 * array-notation-common.c, c-cilkplus.c: Use the standard form for
7987 the copyright notice.
7989 2013-12-28 Eric Botcazou <ebotcazou@adacore.com>
7991 * c-ada-spec.c (print_constructor): New function.
7992 (print_destructor): Retrieve the origin of the destructor.
7993 (print_ada_declaration): Revamp handling of constructors/destructors.
7995 2013-12-23 Stuart Hastings <stuart@apple.com>
7996 Bill Maddox <maddox@google.com>
7997 Jason Merrill <jason@redhat.com>
7999 * c.opt: Add -fdeclone-ctor-dtor.
8000 * c-opts.c (c_common_post_options): Default to on iff -Os.
8002 2013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
8004 * c-common.c (c_common_attribute_table): Added "cilk simd function"
8006 * c-pragma.h (enum pragma_cilk_clause): Remove.
8007 (enum pragma_omp_clause): Added the following fields:
8008 PRAGMA_CILK_CLAUSE_NOMASK, PRAGMA_CILK_CLAUSE_MASK,
8009 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_NONE,
8010 PRAGMA_CILK_CLAUSE_LINEAR, PRAGMA_CILK_CLAUSE_PRIVATE,
8011 PRAGMA_CILK_CLAUSE_FIRSTPRIVATE, PRAGMA_CILK_CLAUSE_LASTPRIVATE,
8012 PRAGMA_CILK_CLAUSE_UNIFORM.
8015 2013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
8017 * cilk.c (cilk_outline): Made this function non-static.
8018 (gimplify_cilk_spawn): Removed pre_p and post_p arguments.
8019 (create_cilk_wrapper): Added a new parameter: a function pointer.
8020 (c_install_body_w_frame_cleanup): Remove
8021 (extract_free_variables): Added VEC_INIT_EXPR and CONSTRUCTOR case.
8022 * c-common.h (cilk_outline): New prototype.
8023 (gimplify_cilk_spawn): Removed two parameters.
8024 (cilk_install_body_with_frame_cleanup): New prototype.
8025 * c-gimplify.c (c_gimplify_expr): Added MODIFY_EXPR, CALL_EXPR and
8026 CILK_SPAWN_STMT case.
8028 2013-12-11 Bernd Schmidt <bernds@codesourcery.com>
8030 * c-common.c (c_fully_fold_internal): Handle ADDR_SPACE_CONVERT_EXPR.
8032 * c-common.h (enum c_tree_index): Remove CTI_INT_ARRAY_TYPE.
8033 (int_array_type_node): Remove.
8034 * c-common.c (c_common_nodes_and_builtins): Don't build it.
8036 2013-12-05 Marek Polacek <polacek@redhat.com>
8039 * c-common.c (c_sizeof_or_alignof_type): Move a declaration into
8040 [ADJUST_FIELD_ALIGN].
8042 2013-12-04 Joseph Myers <joseph@codesourcery.com>
8045 * c-common.c (c_sizeof_or_alignof_type): Add parameter min_alignof
8046 and check field alignment if set.
8047 * c-common.h (c_sizeof_or_alignof_type): Update prototype.
8048 (c_sizeof, c_alignof): Update calls to c_sizeof_or_alignof_type.
8050 2013-12-04 Jakub Jelinek <jakub@redhat.com>
8051 Marek Polacek <polacek@redhat.com>
8053 * c-gimplify.c (c_gimplify_expr): If doing the integer-overflow
8054 sanitization, call unsigned_type_for only when !TYPE_OVERFLOW_WRAPS.
8056 2013-11-29 H.J. Lu <hongjiu.lu@intel.com>
8059 * cilk.c (gimplify_cilk_spawn): Properly handle function without
8062 2013-11-29 Jakub Jelinek <jakub@redhat.com>
8065 * c-common.c (get_priority): If TREE_VALUE (args) is IDENTIFIER_NODE,
8066 goto invalid. If it is error_mark_node, don't issue further
8069 2013-11-28 Sergey Ostanevich <sergos.gnu@gmail.com>
8071 * c.opt (Wopenmp-simd): New.
8073 2013-11-22 Jakub Jelinek <jakub@redhat.com>
8075 * c-ubsan.h (ubsan_instrument_return): New prototype.
8076 * c-ubsan.c (ubsan_instrument_return): New function.
8078 2013-11-22 Andrew MacLeod <amacleod@redhat.com>
8080 * c-common.c: Add required include files from gimple.h.
8081 * c-gimplify.c: Likewise.
8084 2013-11-22 David Malcolm <dmalcolm@redhat.com>
8086 * c-common.c (unsafe_conversion_p): Remove use of
8087 EXPR_LOC_OR_HERE macro.
8088 (conversion_warning): Likewise.
8089 (warnings_for_convert_and_check): Likewise.
8090 (warn_for_collisions_1): Likewise.
8091 (shorten_compare): Likewise, and remove use of in_system_header
8092 macro, using the location from the former.
8093 * c-lex.c (dump_one_header): Remove use of input_filename macro.
8094 (cb_def_pragma): Remove use of in_system_header macro.
8095 (lex_string): Likewise.
8096 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
8098 2013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
8099 Mike Stump <mikestump@comcast.net>
8100 Richard Sandiford <rdsandiford@googlemail.com>
8102 * c-ada-spec.c (is_simple_enum): Use tree_to_shwi and tree_to_uhwi
8103 instead of TREE_INT_CST_LOW, in cases where there is a protecting
8104 tree_fits_shwi_p or tree_fits_uhwi_p.
8105 (dump_generic_ada_node): Likewise.
8106 * c-format.c (check_format_arg): Likewise.
8107 * c-pretty-print.c (pp_c_integer_constant): Likewise.
8109 2013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
8111 * c-common.c (check_function_arguments_recurse): Use tree_to_uhwi.
8113 2013-11-19 Joshua J Cogliati <jrincayc@yahoo.com>
8116 * c-common.c (unsafe_conversion_p): Make this function
8117 return an enumeration with more detail.
8118 (conversion_warning): Use the new return type of
8119 unsafe_conversion_p to separately warn either about conversions
8120 that lower floating point number precision or about the other
8121 kinds of conversions.
8122 * c-common.h (enum conversion_safety): New enumeration.
8123 (unsafe_conversion_p): switching return type to
8124 conversion_safety enumeration.
8125 * c.opt: Adding new warning -Wfloat-conversion and
8126 enabling it with -Wconversion.
8128 2013-11-19 Basile Starynkevitch <basile@starynkevitch.net>
8130 * c-opts.c: Include plugin.h.
8131 (cb_file_change): Invoke plugin event PLUGIN_INCLUDE_FILE.
8133 2013-11-19 Marek Polacek <polacek@redhat.com>
8135 * c-ubsan.c (ubsan_instrument_division): Adjust ubsan_create_data
8137 (ubsan_instrument_shift): Likewise.
8138 (ubsan_instrument_vla): Likewise.
8140 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
8142 * c-common.c (convert_vector_to_pointer_for_subscript): Remove
8143 cast to unsigned type.
8145 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
8147 * c-common.c (fold_offsetof_1): Use tree_to_uhwi rather than
8149 (complete_array_type): Update comment to refer to tree_to_[su]hwi
8150 rather than tree_low_cst.
8152 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
8154 * c-common.c, c-cppbuiltin.c: Replace tree_low_cst (..., 1) with
8155 tree_to_uhwi throughout.
8157 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
8159 * c-common.c, c-format.c, c-omp.c, c-pretty-print.c: Replace
8160 tree_low_cst (..., 0) with tree_to_shwi throughout.
8162 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
8164 * c-ada-spec.c, c-common.c, c-pretty-print.c: Replace
8165 host_integerp (..., 1) with tree_fits_uhwi_p throughout.
8167 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
8169 * c-ada-spec.c, c-common.c, c-format.c, c-pretty-print.c: Replace
8170 host_integerp (..., 0) with tree_fits_shwi_p throughout.
8172 2013-11-15 Aldy Hernandez <aldyh@redhat.com>
8174 * c-cilkplus.c: New file.
8175 * c-common.c (readonly_error): Add location argument.
8176 * c-common.h (readonly_error): Same.
8177 (c_finish_cilk_clauses): Protoize.
8178 (c_check_cilk_loop): Same.
8179 c-omp.c (c_finish_omp_for): Handle CILK_SIMD nodes.
8180 Do not fail on error_mark_node.
8181 Abstract increment canonicalization to here...
8182 (c_omp_for_incr_canonicalize_ptr): New.
8183 c-pragma.c (init_pragma): Register "simd" pragma.
8184 c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_SIMD.
8185 (enum pragma_cilk_clause): New.
8187 2013-11-15 Richard Sandiford <rdsandiford@googlemail.com>
8189 * c-pretty-print.c (pp_c_character_constant): Remove unnecessary
8190 wchar_type and host_integerp checks.
8192 2013-11-14 Andrew MacLeod <amacleod@redhat.com>
8194 * c-common.c: Likewise.
8195 * c-gimplify.c: Likewise.
8198 2013-11-14 Diego Novillo <dnovillo@google.com>
8200 * c-common.c: Include fold-const.h.
8201 Include stor-layout.h.
8203 Include stringpool.h.
8206 Include trans-mem.h.
8207 * c-cppbuiltin.c: Include stor-layout.h.
8208 Include stringpool.h.
8209 * c-format.c: Include stringpool.h.
8210 * c-lex.c: Include stringpool.h.
8211 Include stor-layout.h.
8212 * c-pragma.c: Include stringpool.h.
8215 Include gcc-symtab.h.
8216 * c-pretty-print.c: Include stor-layout.h.
8218 * cilk.c: Include stringpool.h.
8221 2013-11-13 Joseph Myers <joseph@codesourcery.com>
8223 * c-common.h (enum rid): Add RID_AUTO_TYPE.
8224 * c-common.c (c_common_reswords): Add __auto_type.
8225 (keyword_begins_type_specifier): Handle RID_AUTO_TYPE.
8227 2013-11-12 Andrew MacLeod <amacleod@redhat.com>
8229 * c-common.c: Include gimplify.h.
8230 * c-gimplify.c: Likewise.
8232 * c-omp.c: Include gimple-expr.h instead of gimple.h.
8233 * c-ubsan.c: Don't include gimple.h.
8235 2013-11-12 Joseph Myers <joseph@codesourcery.com>
8237 * c-common.c (c_common_reswords): Add _Thread_local.
8239 2013-11-09 Joseph Myers <joseph@codesourcery.com>
8241 * c-common.c (atomic_size_supported_p): New function.
8242 (resolve_overloaded_atomic_exchange)
8243 (resolve_overloaded_atomic_compare_exchange)
8244 (resolve_overloaded_atomic_load, resolve_overloaded_atomic_store):
8245 Use it instead of comparing size with a local list of sizes.
8247 2013-11-07 Andrew MacLeod <amacleod@redhat.com>
8248 Joseph Myers <joseph@codesourcery.com>
8250 * c-common.h (enum rid): Add RID_ATOMIC.
8251 * c-common.c (c_common_reswords): Add _Atomic.
8252 (sync_resolve_params): Use TYPE_MAIN_VARIANT on pointer argument.
8253 (keyword_is_type_qualifier): Accept RID_ATOMIC.
8254 * c-format.c (check_format_types): Check for extra _Atomic
8255 qualifiers in format argument.
8256 * c-pretty-print.c (pp_c_cv_qualifiers): Handle atomic qualifier.
8257 (pp_c_type_qualifier_list): Mention _Atomic in comment.
8259 2013-11-06 Tobias Burnus <burnus@net-b.de>
8261 * c-common.c (reason_option_codes_t): Add CPP_W_DATE_TIME.
8263 2013-11-06 Joseph Myers <joseph@codesourcery.com>
8265 * c-opts.c (c_common_post_options): Set -ffp-contract=off in C
8267 * c-cppbuiltin.c (cpp_iec_559_value): Consider -ffp-contract=fast
8268 to mean lack of IEEE 754 support.
8270 2013-11-05 Tobias Burnus <burnus@net-b.de>
8272 * c.opt (-Wdate-time): New option
8273 * c-opts.c (sanitize_cpp_opts): Pass on to libcpp.
8275 2013-11-05 Joseph Myers <joseph@codesourcery.com>
8277 * c-cppbuiltin.c (cpp_iec_559_value): Test
8278 flag_excess_precision_cmdline not flag_excess_precision.
8280 2013-11-05 Tobias Burnus <burnus@net-b.de>
8282 * c.opt (fopenmp-simd): New option.
8283 * c-pragma.c (omp_pragmas): Move pragmas which can contain simd to ...
8284 (omp_pragmas): ... this new struct.
8285 (c_pp_lookup_pragma): Also walk omp_pragmas.
8286 (init_pragma): Init pragmas for -fopenmp-simd.
8288 2013-11-04 Marek Polacek <polacek@redhat.com>
8291 * c-common.c (invalid_indirection_error): Handle RO_ARROW_STAR case.
8293 2013-11-04 Joseph Myers <joseph@codesourcery.com>
8295 * c-cppbuiltin.c (cpp_iec_559_value, cpp_iec_559_complex_value):
8297 (c_cpp_builtins): Define __GCC_IEC_559 and __GCC_IEC_559_COMPLEX.
8299 2013-11-04 Eric Botcazou <ebotcazou@adacore.com>
8301 * c-ada-spec.h (cpp_operation): Add IS_TRIVIAL.
8302 (dump_ada_specs): Adjust prototype of second callback.
8303 * c-ada-spec.c (cpp_check): New global variable.
8304 (dump_ada_nodes): Remove cpp_check parameter and do not pass it down.
8305 (print_generic_ada_decl): Likewise.
8306 (has_static_fields): Change return type to bool and add guard.
8307 (has_nontrivial_methods): New predicate.
8308 (is_tagged_type): Change return type to bool.
8309 (separate_class_package): Call has_nontrivial_methods.
8310 (pp_ada_tree_identifier): Minor tweaks.
8311 (dump_ada_function_declaration): Adjust calls to dump_generic_ada_node.
8312 (dump_ada_array_domains): Likewise.
8313 (dump_ada_array_type): Likewise.
8314 (dump_template_types): Remove cpp_check parameter and do not pass it to
8315 dump_generic_ada_node.
8316 (dump_ada_template): Likewise.
8317 (dump_generic_ada_node): Remove cpp_check parameter and do not pass it
8319 (print_ada_methods): Change return type to integer. Remove cpp_check
8320 parameter and do not pass it down.
8321 (dump_nested_types): Remove cpp_check parameter and do not pass it to
8322 dump_generic_ada_node.
8323 (print_ada_declaration): Likewise. Test RECORD_OR_UNION_TYPE_P before
8325 (print_ada_struct_decl): Remove cpp_check parameter and do not pass it
8326 down. Use has_nontrivial_methods to recognize C++ classes. Use return
8327 value of print_ada_methods.
8328 (dump_ads): Rename cpp_check parameter to check and adjust prototype.
8329 Set cpp_check to it before invoking dump_ada_nodes.
8330 (dump_ada_specs): Likewise.
8332 2013-11-03 Marek Polacek <polacek@redhat.com>
8334 * c-ubsan.c: Don't include hash-table.h.
8335 (ubsan_instrument_vla): New function.
8336 * c-ubsan.h: Declare it.
8338 2013-10-31 David Malcolm <dmalcolm@redhat.com>
8340 Automated part of renaming of symtab_node_base to symtab_node.
8342 Patch autogenerated by rename_symtab.py from
8343 https://github.com/davidmalcolm/gcc-refactoring-scripts
8344 revision 58bb219cc090b2f4516a9297d868c245495ee622
8346 * c-pragma.c (maybe_apply_pending_pragma_weaks): Rename
8347 symtab_node_base to symtab_node.
8349 2013-10-31 Edward Smith-Rowland <3dw4rd@verizon.net>
8351 Implement C++14 digit separators.
8352 * c-lex.c (interpret_float): Remove digit separators from scratch string
8353 before building real literal.
8355 2013-10-30 Jakub Jelinek <jakub@redhat.com>
8357 * cilk.c (create_cilk_helper_decl): Use HOST_WIDE_INT_PRINT_DEC.
8359 2013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
8361 * c-common.c (c_common_reswords[]): Added _Cilk_spawn and _Cilk_sync
8363 (c_define_builtins): Called cilk_init_builtins if Cilk Plus is
8365 * c-common.h (enum rid): Added RID_CILK_SPAWN and RID_CILK_SYNC.
8366 (insert_cilk_frame): New prototype.
8367 (cilk_init_builtins): Likewise.
8368 (gimplify_cilk_spawn): Likewise.
8369 (c_cilk_install_body_w_frame_cleanup): Likewise.
8370 (cilk_detect_spawn_and_unwrap): Likewise.
8371 (cilk_set_spawn_marker): Likewise.
8372 (build_cilk_sync): Likewise.
8373 (build_cilk_spawn): Likewise.
8376 2013-10-29 David Malcolm <dmalcolm@redhat.com>
8378 Patch autogenerated by refactor_symtab.py from
8379 https://github.com/davidmalcolm/gcc-refactoring-scripts
8380 revision 58bb219cc090b2f4516a9297d868c245495ee622
8382 * c-gimplify.c (c_genericize): Update for conversion of symtab types
8383 to a true class hierarchy.
8384 * c-pragma.c (maybe_apply_pending_pragma_weaks): Likewise.
8386 2013-10-27 Richard Sandiford <rdsandiford@googlemail.com>
8388 * c-lex.c (interpret_integer): Remove call to cpp_num_sign_extend.
8390 2013-10-26 Jeff Law <law@redhat.com>
8392 * c-common.c (c_define_builtins): Remove mudflap support.
8393 * c.opt: Ignore and warn for mudflap options.
8395 2013-10-24 Tobias Burnus <burnus@net-b.de>
8398 * c-pragma.c (init_pragma) Add #pragma ivdep handling.
8399 * c-pragma.h (pragma_kind): Add PRAGMA_IVDEP.
8401 2013-10-23 Jason Merrill <jason@redhat.com>
8403 * c-format.c (gcc_cxxdiag_char_table): Add %X.
8405 2013-10-11 Jakub Jelinek <jakub@redhat.com>
8407 * c-common.h (omp_clause_mask::operator !=): New method.
8408 * c-omp.c (c_omp_split_clauses): Use if ((mask & something) != 0)
8409 instead of if (mask & something) tests everywhere.
8411 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP to
8412 201307 instead of 201107.
8413 * c-common.c (DEF_FUNCTION_TYPE_8): Define.
8414 (c_common_attribute_table): Add "omp declare target" and
8415 "omp declare simd" attributes.
8416 (handle_omp_declare_target_attribute,
8417 handle_omp_declare_simd_attribute): New functions.
8418 * c-omp.c: Include c-pragma.h.
8419 (c_finish_omp_taskgroup): New function.
8420 (c_finish_omp_atomic): Add swapped argument, if true,
8421 build the operation first with rhs, lhs arguments and use NOP_EXPR
8423 (c_finish_omp_for): Add code argument, pass it down to make_code.
8424 (c_omp_split_clauses): New function.
8425 (c_split_parallel_clauses): Removed.
8426 (c_omp_declare_simd_clause_cmp, c_omp_declare_simd_clauses_to_numbers,
8427 c_omp_declare_simd_clauses_to_decls): New functions.
8428 * c-common.h (omp_clause_mask): New type.
8429 (OMP_CLAUSE_MASK_1): Define.
8430 (omp_clause_mask::omp_clause_mask, omp_clause_mask::operator &=,
8431 omp_clause_mask::operator |=, omp_clause_mask::operator ~,
8432 omp_clause_mask::operator |, omp_clause_mask::operator &,
8433 omp_clause_mask::operator <<, omp_clause_mask::operator >>,
8434 omp_clause_mask::operator ==): New methods.
8435 (enum c_omp_clause_split): New.
8436 (c_finish_omp_taskgroup): New prototype.
8437 (c_finish_omp_atomic): Add swapped argument.
8438 (c_finish_omp_for): Add code argument.
8439 (c_omp_split_clauses): New prototype.
8440 (c_split_parallel_clauses): Removed.
8441 (c_omp_declare_simd_clauses_to_numbers,
8442 c_omp_declare_simd_clauses_to_decls): New prototypes.
8443 * c-pragma.c (omp_pragmas): Add new OpenMP 4.0 constructs.
8444 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_CANCEL,
8445 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_DECLARE_REDUCTION,
8446 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_SIMD,
8447 PRAGMA_OMP_TARGET, PRAGMA_OMP_TASKGROUP and PRAGMA_OMP_TEAMS.
8448 Remove PRAGMA_OMP_PARALLEL_FOR and PRAGMA_OMP_PARALLEL_SECTIONS.
8449 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ALIGNED,
8450 PRAGMA_OMP_CLAUSE_DEPEND, PRAGMA_OMP_CLAUSE_DEVICE,
8451 PRAGMA_OMP_CLAUSE_DIST_SCHEDULE, PRAGMA_OMP_CLAUSE_FOR,
8452 PRAGMA_OMP_CLAUSE_FROM, PRAGMA_OMP_CLAUSE_INBRANCH,
8453 PRAGMA_OMP_CLAUSE_LINEAR, PRAGMA_OMP_CLAUSE_MAP,
8454 PRAGMA_OMP_CLAUSE_NOTINBRANCH, PRAGMA_OMP_CLAUSE_NUM_TEAMS,
8455 PRAGMA_OMP_CLAUSE_PARALLEL, PRAGMA_OMP_CLAUSE_PROC_BIND,
8456 PRAGMA_OMP_CLAUSE_SAFELEN, PRAGMA_OMP_CLAUSE_SECTIONS,
8457 PRAGMA_OMP_CLAUSE_SIMDLEN, PRAGMA_OMP_CLAUSE_TASKGROUP,
8458 PRAGMA_OMP_CLAUSE_THREAD_LIMIT, PRAGMA_OMP_CLAUSE_TO and
8459 PRAGMA_OMP_CLAUSE_UNIFORM.
8461 2013-10-09 Marc Glisse <marc.glisse@inria.fr>
8463 PR tree-optimization/20318
8464 * c-common.c (handle_returns_nonnull_attribute): New function.
8465 (c_common_attribute_table): Add returns_nonnull.
8467 2013-10-03 Marc Glisse <marc.glisse@inria.fr>
8470 * c.opt (fcheck-new): Move to common.opt.
8472 2013-09-25 Marek Polacek <polacek@redhat.com>
8473 Jakub Jelinek <jakub@redhat.com>
8476 * c-ubsan.c (ubsan_instrument_shift): Don't instrument
8477 an expression if we can prove it is correct.
8478 (ubsan_instrument_division): Likewise. Remove unnecessary
8481 2013-09-18 Marek Polacek <polacek@redhat.com>
8484 * c-common.c (handle_no_sanitize_undefined_attribute): New function.
8486 (struct attribute_spec c_common_att): Add no_sanitize_undefined.
8488 2013-09-14 Iain Sandoe <iain@codesourcery.com>
8491 * c.opt (fgnu-runtime, fnext-runtime, fobjc-abi-version,
8492 fobjc-gc, freplace-objc-classes): Accept for LTO.
8494 2013-09-13 Jacek Caban <jacek@codeweavers.com>
8496 * c-target.def: New hook
8498 2013-09-09 Paolo Carlini <paolo.carlini@oracle.com>
8501 * c.opt (Wdelete-incomplete): Add.
8503 2013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
8505 * c-common.c (same_scalar_type_ignoring_signedness): Delete.
8506 (vector_types_compatible_elements_p): New function.
8507 * c-common.h: (same_scalar_type_ignoring_signedness): Delete
8509 (vector_types_compatible_elements_p): Declare.
8511 2013-09-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
8513 * c-pretty-print.h (c_pretty_printer::simple_type_specifier): Now
8514 a virtual member function.
8515 (pp_simple_type_specifier): Remove.
8516 (pp_c_type_specifier): Likewise.
8517 * c-pretty-print.c (c_pretty_printer::simple_type_specifier):
8518 Rename from pp_c_type_specifier. Adjust.
8519 (c_pretty_printer::c_pretty_printer): Do not assign to
8520 simple_type_specifier.
8522 2013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
8524 * c-pretty-print.h (c_pretty_printer::type_id): Now a virtual
8526 (c_pretty_printer::storage_class_specifier): Likewise.
8527 (c_pretty_printer::initializer): Likewise.
8528 (pp_declaration): Remove.
8529 (pp_declaration_specifiers): Likewise.
8530 (pp_abstract_declarator): Likewise.
8531 (pp_declarator): Likewise.
8532 (pp_type_id): Likewise.
8533 (pp_statement): Likewise.
8534 (pp_constant): Likewise.
8535 (pp_id_expression): Likewise.
8536 (pp_primary_expression): Likewise.
8537 (pp_unary_expression): Likewise.
8538 (pp_multiplicative_expression): Likewise.
8539 (pp_conditional_expression): Likewise.
8540 (pp_assignment_expression): Likewise.
8541 (pp_expression): Likewise.
8542 (pp_c_type_id): Likewise.
8543 (pp_c_storage_class_specifier): Likewise.
8544 * c-pretty-print.c (pp_c_type_cast): Tidy.
8545 (pp_c_pointer): Likewise.
8546 (pp_c_type_specifier): Likewise.
8547 (pp_c_parameter_type_list): Likewise.
8548 (pp_c_function_definition): Likewise.
8549 (pp_c_init_declarator): Likewise.
8550 (pp_c_initializer_list): Likewise.
8551 (pp_c_constructor_elts): Likewise.
8552 (c_pretty_printer::direct_abstract_declarator): Likewise.
8553 (c_pretty_printer::declaration_specifiers): Likewise.
8554 (c_pretty_printer::primary_expression): Likewise.
8555 (c_pretty_printer::postfix_expression): Likewise.
8556 (c_pretty_printer::type_id): Rename from pp_c_type_id.
8557 (c_pretty_printer::storage_class_specifier): Rename from
8558 pp_c_storage_class_specifier.
8559 (c_pretty_printer::initializer): Rename from pp_c_initializer.
8560 (c_pretty_printer::c_pretty_printer): Do not assign to type_id,
8561 storage_class_specifier, initializer, offset_list, flags.
8563 2013-08-30 Marek Polacek <polacek@redhat.com>
8565 * c-ubsan.c: New file.
8566 * c-ubsan.h: New file.
8568 2013-08-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
8570 * c-pretty-print.h (c_pretty_printer::declaration): Now a virtual
8572 (c_pretty_printer::declaration_specifiers): Likewise.
8573 (c_pretty_printer::declarator): Likewise.
8574 (c_pretty_printer::abstract_declarator): Likewise.
8575 (c_pretty_printer::direct_abstract_declarator): Likewise.
8576 (c_pretty_printer::direct_declarator): Likewise.
8577 (c_pretty_printer::function_specifier): Likewise.
8578 (pp_declaration): Adjust.
8579 (pp_declaration_specifiers): Likewise.
8580 (pp_abstract_declarator): Likewise.
8581 (pp_direct_declarator): Likewise.
8582 (pp_function_specifier): Likewise.
8583 (pp_direct_abstract_declarator): Remove as unused.
8584 (pp_c_declaration): Remove.
8585 (pp_c_declaration_specifiers): Likewise.
8586 (pp_c_declarator): Likewise.
8587 (pp_c_direct_declarator): Likewise.
8588 (pp_c_function_specifier): Likewise.
8589 (pp_c_direct_abstract_declarator): Likewise.
8590 * c-pretty-print.c (c_pretty_printer::abstract_declarator): Rename
8591 from pp_c_abstract_declarator. Adjust.
8592 (c_pretty_printer::direct_abstract_declarator): Rename from
8593 pp_c_direct_abstract_declarator. Adjust.
8594 (c_pretty_printer::function_specifier): Rename from
8595 pp_c_function_specifier. Adjust.
8596 (c_pretty_printer::declaration_specifiers): Rename from
8597 pp_c_declaration_specifiers. Adjust.
8598 (c_pretty_printer::direct_declarator): Rename from
8599 pp_c_direct_declarator. Adjust.
8600 (c_pretty_printer::declarator): Rename from pp_c_declarator. Adjust.
8601 (c_pretty_printer::declaration): Rename from pp_c_declaration. Adjust.
8602 (c_pretty_printer::c_pretty_printer): Do not assign to
8603 declaration, declaration_specifiers, declarator,
8604 direct_declarator, direct_abstract_declarator, function_specifier.
8606 2013-08-26 Gabriel Dos Reis <gdre@integrable-solutions.net>
8608 * c-pretty-print.h (c_pretty_printer::unary_expression): Now a
8609 virtual member function.
8610 (c_pretty_printer::multiplicative_expression): Likewise.
8611 (c_pretty_printer::conditional_expression): Likewise.
8612 (c_pretty_printer::assignment_expression): Likewise.
8613 (c_pretty_printer::expression): Likewise.
8614 (pp_unary_expression): Adjust.
8615 (pp_multiplicative_expression): Likewise.
8616 (pp_assignment_expression): Likewise.
8617 (pp_conditional_expression): Likewise.
8618 (pp_expression): Likewise.
8619 * c-pretty-print.c (c_pretty_printer::unary_expression): Rename
8620 from pp_c_unary_expression. Adjust.
8621 (c_pretty_printer::multiplicative_expression): Rename from
8622 pp_c_multiplicative_expression. Adjust.
8623 (c_pretty_printer::conditional_expression): Rename from
8624 pp_c_conditional_expression. Adjust.
8625 (c_pretty_printer::assignment_expression): Rename from
8626 pp_c_assignment_expression. Adjust.
8627 (c_pretty_printer::expression): Rename from pp_c_expression. Adjust.
8628 (c_pretty_printer::c_pretty_printer): Do not assign to
8629 unary_expression, multiplicative_expression,
8630 conditional_expression, expression.
8632 2013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
8634 * c-pretty-print.h (c_pretty_printer::postfix_expression): Now a
8635 virtual member function.
8636 (pp_postfix_expression): Adjust.
8637 (pp_c_postfix_expression): Remove.
8638 * c-pretty-print.c (c_pretty_printer::postfix_expression): Rename
8639 from pp_c_postfix_expression. Adjust.
8640 (c_pretty_printer::c_pretty_printer): Do not assign to
8643 2013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
8645 * c-pretty-print.h (c_pretty_printer::primary_expression): Now a
8646 virtua member function.
8647 (pp_primary_expression): Adjust.
8648 (pp_c_primary_expression): Remove.
8649 * c-pretty-print.c (c_pretty_printer::primary_expression): Rename
8650 from pp_c_primary_expression. Adjust.
8651 (pp_c_initializer_list): Use pp_primary_expression.
8652 (c_pretty_printer::c_pretty_printer): Do not assign to
8655 2013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
8657 * c-pretty-print.h (c_pretty_printer::translate_string): Declare.
8658 * c-pretty-print.c (M_): Remove.
8659 (c_pretty_printer::translate_string): Define.
8660 (pp_c_type_specifier): Use it.
8661 (pp_c_primary_expression): Likewise.
8662 (pp_c_expression): Likewise.
8664 2013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
8666 * c-pretty-print.h (c_pretty_printer::id_expression): Now a
8668 (pp_c_id_expression): Remove.
8669 (pp_id_expression): Adjust.
8670 * c-pretty-print.c (c_pretty_printer::id_expression): Rename from
8671 pp_c_id_expression. Adjust.
8672 (pp_c_postfix_expression): Use pp_id_expression.
8673 (c_pretty_printer::c_pretty_printer): Do not assign to id_expression.
8675 2013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
8677 * c-pretty-print.h (c_pretty_printer::constant): Now a virtual
8679 (pp_constant): Adjust.
8680 (pp_c_constant): Remove.
8681 * c-pretty-print.c (c_pretty_printer::constant): Rename from
8682 pp_c_constant. Adjust.
8684 (pp_c_primary_expression): Call pp_constant in lieu of pp_c_constant.
8685 (c_pretty_printer::c_pretty_printer): Remove assignment to constant.
8687 2013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
8689 * c-pretty-print.h (pp_c_pretty_printer_init): Remove.
8690 (c_pretty_printer::c_pretty_printer): Declare.
8691 * c-pretty-print.c (pretty_printer::c_pretty_printer): Rename from
8692 c_pretty_printer_init. Adjust.
8693 (print_c_tree): Do not call c_pretty_printer_init.
8694 * c-ada-spec.c (dump_ads): Remove call to pp_construct.
8696 2013-08-09 Arnaud Charlet <charlet@adacore.com>
8698 * c-ada-spec.c (print_ada_declaration): Prevent accessing null asm name
8700 2013-08-05 Paolo Carlini <paolo.carlini@oracle.com>
8703 * c-common.c (pointer_int_sum): Add bool parameter.
8704 * c-common.h (pointer_int_sum): Adjust declaration.
8706 2013-08-05 Gabriel Dos Reis <gdr@integrable-solutions.net>
8708 * c-pretty-print.c (print_c_tree): Simplify. Use non-static local
8709 c_pretty_printer variable.
8711 2013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
8713 * c-pretty-print.h (c_pretty_printer): Derive from pretty_printer.
8715 (pp_c_base): Likewise. Adjust users.
8716 * c-pretty-print.c (pp_c_maybe_whitespace): Adjust.
8717 (pp_c_whitespace): Do not call pp_base.
8718 (pp_c_left_paren): Likewise.
8719 (pp_c_right_paren): Likewise.
8720 (pp_c_left_brace): Likewise.
8721 (pp_c_right_brace): Likewise.
8722 (pp_c_left_bracket): Likewise.
8723 (pp_c_right_bracket): Likewise.
8724 (pp_c_dot): Likewise.
8725 (pp_c_ampersand): Likewise.
8726 (pp_c_star): Likewise.
8727 (pp_c_arrow): Likewise.
8728 (pp_c_semicolon): Likewise.
8729 (pp_c_complement): Likewise.
8730 (pp_c_exclamation): Likewise.
8731 (pp_c_direct_declarator): Likewise.
8732 (pp_c_ws_string): Likewise.
8733 (pp_c_identifier): Likewise.
8734 (pp_c_statement): Likewise.
8735 (print_c_tree): Likewise.
8737 2013-08-04 Ed Smith-Rowland <3dw4rd@verizon.net>
8740 * c-common.c (c_parse_error): Catch user-defined literal tokens and
8741 provide useful error strings.
8743 2013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
8745 * c-ada-spec.c (pp_ada_tree_identifier): Use specialized pretty
8746 printer functions instead of pp_string or operators and punctuators.
8747 (dump_generic_ada_node): Likewise.
8748 * c-pretty-print.c (pp_c_type_specifier): Likewise.
8749 (pp_c_relational_expression): Likewise.
8750 (pp_c_logical_or_expression): Likewise.
8752 2013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
8754 * c-ada-spec.c (print_ada_macros): Use specialized pretty printer
8755 functions instead of pp_character.
8756 (pp_ada_tree_identifier): Likewise.
8757 (dump_ada_double_name): Likewise.
8758 (dump_ada_function_declaration): Likewise.
8759 (dump_ada_array_domains): Likewise.
8760 (dump_template_types): Likewise.
8761 (dump_generic_ada_node): Likewise.
8762 (print_ada_declaration): Likewise.
8763 (print_ada_struct_decl): Likewise.
8764 * c-pretty-print.c (pp_c_integer_constant): Likewise.
8766 2013-07-23 Tom Tromey <tromey@redhat.com>
8768 * c-common.h (enum rid) <RID_GENERIC>: New constant.
8769 * c-common.c (c_common_reswords): Add _Generic.
8771 2013-07-21 OndÅ
\99ej BÃlka <neleai@seznam.cz>
8773 * c-common.c: Fix typos.
8774 * c-common.h: Likewise.
8776 2013-07-13 Lubos Lunak <l.lunak@suse.cz>
8779 * c-common.c (c_common_attribute_table): Add warn_unused.
8780 (handle_warn_unused_attribute): New.
8782 2013-07-10 Jakub Jelinek <jakub@redhat.com>
8784 * c-ppoutput.c (scan_translation_unit): Call account_for_newlines
8785 for all CPP_TOKEN_FLD_STR tokens, not just CPP_COMMENT.
8787 2013-07-10 Paolo Carlini <paolo.carlini@oracle.com>
8790 * c.opt: Add Wconditionally-supported.
8792 2013-07-08 Graham Stott <graham.stott@btinternet.com>
8794 * array-notation-common.c (length_mismatch_in_expr_p): Delete
8795 unused variables l_length and l_node.
8797 2013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
8800 * c-common.c (complete_array_type): Delay folding first index
8801 like other indices. When folding, check for index overflow.
8803 2013-06-27 Marc Glisse <marc.glisse@inria.fr>
8806 * c-common.h (c_build_vec_perm_expr): New complain argument.
8807 * c-common.c (c_build_vec_perm_expr): Likewise.
8808 Use save_expr also in C++.
8810 2013-06-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
8812 * c-common.c (c_common_nodes_and_builtins): Use cxx11 in lieu of cxx0x.
8813 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
8814 * c-opts.c (c_common_post_options): Likewise.
8816 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
8818 * array-notation-common.c (length_mismatch_in_expr): Changed the
8819 parameter type's from a dynamic array to a vec_tree. Also removed
8820 the size parameters.
8821 * c-common.h (length_mismatch_in_expr_p): Fixed prototype's as per
8824 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
8826 * c-common.h (struct cilkplus_an_parts): New structure.
8827 (struct cilkplus_an_loop_parts): Likewise.
8828 (cilkplus_extract_an_triplets): New prototype.
8829 (fix_sec_implicit_args): Likewise.
8830 * array-notation-common.c (cilkplus_extract_an_triplets): New function.
8831 (fix_sec_implicit_args): Likewise.
8833 2013-06-20 Balaji V. Iyer <balaji.v.iyer@intel.com>
8835 * array-notation-common.c (find_inv_trees): Removed an unwanted
8837 * c-common.h (struct inv_list::additional_tcodes): Changed type from
8838 enum rid to enum tree_code.
8840 2013-06-11 Jan Hubicka <jh@suse.cz>
8842 * c-common.c (handle_alias_ifunc_attribute): Do not set
8843 DECL_EXTERNAL for weakref variables.
8844 * c-pragma.c (handle_pragma_weak): Make sure aliases
8845 are not declared as external.
8847 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
8849 * array-notation-common.c (length_mismatch_in_expr_p): Moved this
8850 function from c/c-array-notation.c.
8851 (is_cilkplus_reduce_builtin): Likewise.
8852 (find_rank): Likewise.
8853 (extract_array_notation_exprs): Likewise.
8854 (replace_array_notations): Likewise.
8855 (find_inv_trees): Likewise.
8856 (replace_inv_trees): Likewise.
8857 (contains_array_notation_expr): Likewise.
8858 (find_correct_array_notation_type): Likewise.
8859 * c-common.h (struct inv_list): Moved this struct from the file
8860 c/c-array-notation.c and added a new field called additional tcodes.
8861 (length_mismatch_in_expr_p): New prototype.
8862 (is_cilkplus_reduce_builtin): Likewise.
8863 (find_rank): Likewise.
8864 (extract_array_notation_exprs): Likewise.
8865 (replace_array_notation): Likewise.
8866 (find_inv_trees): Likewise.
8867 (replace_inv_trees): Likewise.
8868 (find_correct_array_notation_type): Likewise.
8870 2013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
8872 * c-common.c (c_define_builtins): When cilkplus is enabled, the
8873 function array_notation_init_builtins is called.
8874 (c_common_init_ts): Added ARRAY_NOTATION_REF as typed.
8875 * c-common.def (ARRAY_NOTATION_REF): New tree.
8876 * c-common.h (build_array_notation_expr): New function declaration.
8877 (build_array_notation_ref): Likewise.
8878 (extract_sec_implicit_index_arg): New extern declaration.
8879 (is_sec_implicit_index_fn): Likewise.
8880 (ARRAY_NOTATION_CHECK): New define.
8881 (ARRAY_NOTATION_ARRAY): Likewise.
8882 (ARRAY_NOTATION_START): Likewise.
8883 (ARRAY_NOTATION_LENGTH): Likewise.
8884 (ARRAY_NOTATION_STRIDE): Likewise.
8885 * c-pretty-print.c (pp_c_postifix_expression): Added a new case for
8887 (pp_c_expression): Likewise.
8888 * c.opt (flag_enable_cilkplus): New flag.
8889 * array-notation-common.c: New file.
8891 2013-05-14 Jakub Jelinek <jakub@redhat.com>
8894 * c-common.c (verify_tree): Don't recurse into SIZEOF_EXPR.
8896 2013-05-10 Marc Glisse <marc.glisse@inria.fr>
8898 * c-common.c (vector_types_convertible_p): No TYPE_PRECISION for
8901 2013-05-07 Han Shen <shenhan@google.com>
8903 * c-cppbuiltin.c (c_cpp_builtins): Added "__SSP_STRONG__=3".
8905 2013-04-29 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
8907 * c-common.c (check_user_alignment): Emit error for negative values.
8909 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
8911 * c-opts.c (set_std_cxx11): Use CLK_CXX1Y and CLK_GNUCXX1Y.
8913 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
8915 * c-cppbuiltin.c (c_cpp_builtins): Do not define
8916 __GXX_EXPERIMENTAL_CXX1Y__.
8918 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
8919 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
8921 * c.opt ([Wpointer-arith]): Enabled by -Wpedantic, as documented.
8922 * c-common.c (pointer_int_sum): Change -Wpointer-arith pedwarns
8923 to simply use OPT_Wpointer_arith.
8924 (c_sizeof_or_alignof_type): Likewise.
8926 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
8928 * c-cppbuiltin.c (c_cpp_builtins): Define __GXX_EXPERIMENTAL_CXX1Y__.
8930 2013-04-12 Jakub Jelinek <jakub@redhat.com>
8932 * c-format.c (gcc_diag_char_table, gcc_tdiag_char_table,
8933 gcc_cdiag_char_table, gcc_cxxdiag_char_table): Add %r and %R format
8936 2013-04-07 Steven Bosscher <steven@gcc.gnu.org>
8938 * c-pragma.c (add_to_renaming_pragma_list): Fix leading comment.
8940 2013-04-03 Paolo Carlini <paolo.carlini@oracle.com>
8942 * c-common.c (pointer_int_sum): Remove dead code.
8944 2013-03-09 Richard Sandiford <rdsandiford@googlemail.com>
8947 * c-common.c (handle_optimize_attribute): Don't call
8948 save_optabs_if_changed.
8950 2013-03-05 Jakub Jelinek <jakub@redhat.com>
8953 * c-pch.c (pch_init): Free target_validity at the end.
8955 2013-03-04 Jakub Jelinek <jakub@redhat.com>
8957 * c-pretty-print.c (pp_c_pretty_printer_init): Clear pp->flags.
8959 2013-02-28 Konstantin Serebryany <konstantin.s.serebryany@gmail.com>
8960 Jakub Jelinek <jakub@redhat.com>
8963 * c-common.c (handle_no_sanitize_address_attribute): New function.
8964 (c_common_attribute_table): Add no_sanitize_address attribute.
8965 (handle_no_address_safety_analysis_attribute): Add
8966 no_sanitize_address attribute, not no_address_safety_analysis
8969 2013-02-18 Aldy Hernandez <aldyh@redhat.com>
8972 * c-common.c (handle_optimize_attribute): Call
8973 save_optabs_if_changed.
8975 2013-02-18 Jakub Jelinek <jakub@redhat.com>
8976 Steven Bosscher <steven@gcc.gnu.org>
8979 * c-opts.c (c_common_post_options): If debug info is enabled
8980 and non-dwarf*, refuse to load PCH files and when writing PCH
8983 2013-02-05 Jakub Jelinek <jakub@redhat.com>
8986 * c-common.c (handle_error_attribute): Fix condition.
8988 2013-01-30 Jakub Jelinek <jakub@redhat.com>
8991 * c-common.c (handle_target_attribute): Revert 2012-12-26 change.
8993 2013-01-18 Jason Merrill <jason@redhat.com>
8996 * c.opt (-fextern-tls-init): New.
8997 * c-opts.c (c_common_post_options): Handle it.
8999 2013-01-09 Jakub Jelinek <jakub@redhat.com>
9002 * c-common.c (c_fully_fold_internal): Warn for LSHIFT_EXPR and
9003 RSHIFT_EXPR, if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST
9004 and is either negative or bigger or equal to type precision
9005 of the first operand.
9007 2012-12-03 Marek Polacek <polacek@redhat.com>
9010 * c-common.c (check_user_alignment): Swap order of tests,
9011 check TREE_CODE first.
9013 2012-11-29 Ed Smith-Rowland <3dw4rd@verizon.net>
9016 * c-common.h (overflow_type): New enum.
9017 (build_userdef_literal): Add overflow_type argument.
9018 (tree_userdef_literal): Add overflow_type.
9019 (USERDEF_LITERAL_OVERFLOW): New access macro.
9020 * c-common.c (build_userdef_literal): Add overflow_type
9022 * c-lex.c (c_lex_with_flags): Add overflow_type to
9023 build_userdef_literal calls.
9024 (interpret_integer, interpret_float): Add overflow_type argument.
9026 2012-11-28 Richard Biener <rguenther@suse.de>
9029 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
9030 here and use a type with proper overflow behavior for types that would
9031 need to be promoted for the arithmetic.
9033 2012-11-23 Jakub Jelinek <jakub@redhat.com>
9036 * c-common.c (handle_no_address_safety_analysis_attribute): New
9038 (c_common_attribute_table): Add no_address_safety_analysis.
9040 2012-11-16 Simon Baldwin <simonb@google.com>
9042 * c.opt: Add f[no-]canonical-system-headers.
9043 * c-opts.c (c_common_handle_option): Handle
9044 OPT_fcanonical_system_headers.
9046 2012-11-09 Ed Smith-Rowland <3dw4rd@verizon.net>
9049 * c-opts.c (c_common_handle_option): Set new flags.
9050 * c.opt: Describe new flags.
9052 2012-11-09 Jason Merrill <jason@redhat.com>
9054 * c.opt (Wabi-tag): New.
9056 2012-11-09 Andi Kleen <ak@linux.intel.com>
9059 * c-common.c (get_atomic_generic_size): Mask with
9062 2012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
9065 * c.opt (Wformat): Make it Alias Wformat=1.
9066 (Wformat-contains-nul,Wformat-extra-args,Wformat-nonliteral,
9067 Wformat-security,Wformat-y2k,Wformat-zero-length): Use
9069 (Wformat=): RejectNegative. Use LangEnabledBy.
9070 (Wnonnull): Use LangEnabledBy.
9071 * c-opts.c (c_common_handle_option): Do not handle Wformat here.
9072 * c-format.c (set_Wformat): Delete.
9073 (decode_format_attr): Replace OPT_Wformat with OPT_Wformat_.
9074 (maybe_read_dollar_number): Likewise.
9075 (avoid_dollar_number): Likewise.
9076 (finish_dollar_format_checking): Likewise.
9077 (check_format_info): Likewise.
9078 (check_format_info_main): Likewise.
9079 (check_format_types): Likewise.
9080 (format_type_warning): Likewise.
9081 * c-common.c (int): Likewise.
9082 (check_function_sentinel): Likewise.
9083 * c-common.h (warn_format,set_Wformat): Do not declare here.
9085 2012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
9088 * c.opt(Warray-bounds,Wdelete-non-virtual-dtor,Wenum-compare,
9089 Wmain,Woverlength-strings, Wunknown-pragmas,Wunused-macros):
9091 (Wswitch,Wswitch-default,Wswitch-enum): Likewise. Move here from
9093 (Wvariadic-macros): Init(1).
9094 * c-opts.c (c_common_handle_option): Do not handle them
9096 (c_common_post_options): Likewise.
9097 (sanitize_cpp_opts): warn_unused_macros is now
9098 cpp_warn_unused_macros.
9099 (push_command_line_include): Likewise.
9100 * c-common.c (warn_unknown_pragmas): Do not define.
9101 * c-common.h (warn_unknown_pragmas): Do not declare.
9103 2012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
9106 * c-common.c (conversion_warning): Handle conditional expressions.
9108 2012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
9111 * c.opt (Wreturn_local_addr): Define new option.
9113 2012-10-25 Jason Merrill <jason@redhat.com>
9115 * c.opt (Wvirtual-move-assign): New.
9117 * c.opt (Winherited-variadic-ctor): New.
9119 2012-10-25 Marc Glisse <marc.glisse@inria.fr>
9122 * c-common.c (scalar_to_vector): Handle VEC_COND_EXPR.
9124 2012-10-23 Joseph Myers <joseph@codesourcery.com>
9126 * c-common.h (pch_cpp_save_state): Declare.
9127 * c-target.def (c_preinclude): New hook.
9128 * c-opts.c (done_preinclude): New.
9129 (push_command_line_include): Handle default preincluded header.
9130 (cb_file_change): Call pch_cpp_save_state when calling
9131 push_command_line_include.
9132 * c-pch.c (pch_ready_to_save_cpp_state, pch_cpp_state_saved)
9133 (pch_cpp_save_state): New.
9134 (pch_init): Call pch_cpp_save_state conditionally, instead of
9135 calling cpp_save_state.
9137 2012-10-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
9141 * c.opt (Waddress,Wchar-subscripts,Wsign-conversion,Wimplicit,
9142 Wimplicit-function-declaration,Wimplicit-int,Wsizeof-pointer-memaccess,
9143 Wnarrowing,Wparentheses,Wpointer-sign,Wreturn-type,Wsequence-point,
9144 Wsign-compare,Wuninitialized,Wmaybe-uninitialized,Wunused,
9145 Wvolatile-register-var): Add LangEnabledBy or EnabledBy.
9146 * c-opts.c (c_common_handle_option): Remove explicit handling from
9148 (c_common_post_options): Likewise.
9150 2012-10-18 Eric Botcazou <ebotcazou@adacore.com>
9152 * c-ada-spec.c (LOCATION_COL): Delete.
9153 (compare_location): New function.
9154 (compare_node): Use it.
9155 (compare_comment): Likewise.
9157 2012-10-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
9161 * c.opt (Wstrict-aliasing=,Wstrict-overflow=): Use LangEnabledBy.
9162 * c-opts.c (c_common_handle_option): Do not set them here. Add
9164 (c_common_post_options): Likewise.
9166 2012-10-16 Eric Botcazou <ebotcazou@adacore.com>
9168 * c-ada-spec.c (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Define.
9169 (dump_generic_ada_node) <INTEGER_CST>: Deal with sizetype specially.
9170 Remove POINTER_TYPE handling, add large unsigned handling and use
9171 ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX for big numbers.
9173 2012-10-12 Jakub Jelinek <jakub@redhat.com>
9176 * c-common.h (sizeof_pointer_memaccess_warning): Adjust prototype.
9177 * c-common.c (sizeof_pointer_memaccess_warning): Take array of 3
9178 locs and array of 3 trees instead of just single loc and single
9179 sizeof_arg tree. Handle __builtin___*_chk builtins too, and
9180 also stpncpy, bcopy, bcmp, bzero, snprintf and vsnprintf builtins.
9181 For *cmp* builtins that take two sources strings report warnings
9182 about first and second source, not about destination and source.
9184 2012-10-12 Marc Glisse <marc.glisse@inria.fr>
9187 * c-common.h (enum ref_operator) [RO_ARROW_STAR]: New.
9189 2012-10-11 Eric Botcazou <ebotcazou@adacore.com>
9191 * c-ada-spec.c (dump_ada_template): Bail out for template declarations
9192 declaring something coming from another file.
9194 2012-10-10 Arnaud Charlet <charlet@adacore.com>
9197 * c-ada-spec.c (print_ada_struct_decl): Increase buf size.
9199 2012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
9202 * c-common.c (warn_about_parentheses): Add location_t parameter;
9203 use EXPR_LOC_OR_LOC.
9204 * c-common.h: Update declaration.
9206 2012-10-09 Marc Glisse <marc.glisse@inria.fr>
9209 * c-common.c (scalar_to_vector): Moved from c-typeck.c. Support
9210 more operations. Make error messages optional.
9211 * c-common.h (enum stv_conv): Moved from c-typeck.c.
9212 (scalar_to_vector): Declare.
9214 2012-10-08 Jason Merrill <jason@redhat.com>
9216 * c-common.c (c_common_reswords): Add thread_local.
9218 2012-10-08 Dodji Seketeli <dodji@redhat.com>
9220 PR c++/53528 C++11 attribute support
9221 * c-common.h (bitfield_p, cxx_fundamental_alignment_p): Declare
9223 * c-common.c (check_cxx_fundamental_alignment_constraints): New
9225 (handle_aligned_attribute): In choose strictest alignment
9226 among many. Use new check_cxx_fundamental_alignment_constraints.
9227 (handle_transparent_union_attribute): In c++11 attribute syntax,
9228 don't look through typedefs.
9230 2012-10-04 Arnaud Charlet <charlet@adacore.com>
9232 * c-ada-spec.c (print_ada_declaration): Remove handling of TDF_RAW.
9233 * c.opt (-fdump-ada-spec, -fdump-ada-spec-slim): Move switch definition
9236 2012-09-25 Dehao Chen <dehao@google.com>
9239 * c-pch.c (c_common_read_pch): Rebuild the location_adhoc_data
9240 map when read in the pch.
9242 2012-09-18 Arnaud Charlet <charlet@adacore.com>
9244 * c-ada-spec.c: Style fixes.
9246 2012-09-18 Thomas Quinot <quinot@adacore.com>
9248 * c.opt (-fada-spec-parent): Define new command line switch.
9249 * c-ada-spec.c (get_ada_package): When -fada-spec-parent
9250 is specified, generate binding spec as a child of the specified unit.
9252 2012-09-13 Paolo Carlini <paolo.carlini@oracle.com>
9253 Manuel López-Ibáñez <manu@gcc.gnu.org>
9256 * c.opt ([Winit-self]): Enabled by -Wall in C++.
9258 2012-08-23 Arnaud Charlet <charlet@adacore.com>
9260 * c-ada-spec.c (dump_generic_ada_node): Fix handling of name_only
9261 for pointers, and add missing Convention C pragma.
9262 (print_ada_struct_decl): Add missing aliased keyword.
9263 (dump_ads): Add pragma Ada_2005 and Style_Checks (Off).
9265 2012-08-17 Jakub Jelinek <jakub@redhat.com>
9267 * c-common.c (sizeof_pointer_memaccess_warning): New function.
9268 * c.opt (-Wsizeof-pointer-memaccess): Add new option.
9269 * c-opts.c (c_common_handle_option): Enable it for -Wall.
9270 * c-common.h (sizeof_pointer_memaccess_warning): Add prototype.
9271 * c-common.def (SIZEOF_EXPR): Moved here from cp-tree.def.
9273 2012-08-10 Richard Guenther <rguenther@suse.de>
9275 * c-pretty-print.c (pp_c_expression): Handle anonymous SSA names.
9277 2012-08-07 Steven Bosscher <steven@gcc.gnu.org>
9279 * c-pretty-print.c (pp_c_function_definition): Use pp_newline_and_flush
9280 instead of separate pp_newline and pp_flush.
9281 (print_c_tree): Likewise.
9283 2012-07-26 Richard Henderson <rth@redhat.com>
9285 * c-common.c (handle_hot_attribute): Allow labels.
9286 (handle_cold_attribute): Likewise.
9288 2012-07-20 Jakub Jelinek <jakub@redhat.com>
9291 * c-common.c (check_function_nonnull): Handle multiple nonnull
9292 attributes properly.
9294 2012-07-16 Steven Bosscher <steven@gcc.gnu.org>
9296 * c-gimplify.c: Include dumpfile.h instead of tree-dump.h.
9297 * c-ada-spec.c: Likewise.
9298 * c-dump.c (dump_stmt): Move to cp/dump.c, the only user.
9300 2012-07-14 Steven Bosscher <steven@gcc.gnu.org>
9302 * c-pch.c (CHECK_NO_ASM_OUT_DURING_PCH): Do not define.
9303 Remove code conditional on it.
9305 2012-07-11 Steven Bosscher <steven@gcc.gnu.org>
9307 * c-gimplify.c: Do not include basic-block.h.
9308 * c-common.c: Do not include linfuncs.h.
9310 2012-07-08 Steven Bosscher <steven@gcc.gnu.org>
9312 * c-common.h: Include tree.h.
9314 2012-07-02 Jason Merrill <jason@redhat.com>
9317 * c-common.c (get_priority): Call default_conversion.
9319 2012-07-01 Uros Bizjak <ubizjak@gmail.com>
9321 * c-pch.c (c_common_write_pch): Remove unused variables.
9323 2012-06-29 Steven Bosscher <steven@gcc.gnu.org>
9325 * cppspec.c: Moved from gcc/ to here.
9327 2012-06-27 Kai Tietz <ktietz@redhat.com>
9329 PR preprocessor/37215
9330 * c-ppoutput.c (preprocess_file): Check for nonempty buffer.
9332 2012-06-21 Steven Bosscher <steven@gcc.gnu.org>
9334 * c-common.h (c_common_print_pch_checksum): Remove.
9335 * c-pch.c: Do not include output.h.
9336 (CHECK_NO_ASM_OUT_DURING_PCH): Define and add FIXME.
9337 (asm_out_file): Define iff CHECK_NO_ASM_OUT_DURING_PCH isdefined.
9338 (asm_file_startpos): Define iff CHECK_NO_ASM_OUT_DURING_PCH is defined.
9339 (struct c_pch_header): Remove.
9340 (get_ident): Update gpch version.
9341 (pch_init): Do not print executable_checksum to asm_out_file.
9342 Do not fail if there is no asm_out_file to read back from. Set
9343 asm_file_startpos only if CHECK_NO_ASM_OUT_DURING_PCH is defined.
9344 (c_common_write_pch): Verify that nothing was written to asm_out_file
9345 since pch_init was called. Do not write a c_pch_header, and do not
9346 copy from asm_out_file to the PCH.
9347 (c_common_read_pch): Do not read a c_pch_header, and do not restore
9348 the content of asm_out_file from the PCH.
9349 (c_common_print_pch_checksum): Remove.
9350 * c-opts.c (c_common_init): Print out executable_checksum directly.
9352 2012-06-19 Steven Bosscher <steven@gcc.gnu.org>
9354 * c-target.def (objc_declare_unresolved_class_reference,
9355 objc_declare_class_definition): Add new hooks.
9357 2012-06-19 Steven Bosscher <steven@gcc.gnu.org>
9359 * c-lex.c: Do not include output.h.
9360 (cb_ident): Try to put out .ident with targetm.asm_out.output_ident.
9361 Remove uses of ASM_OUTPUT_IDENT.
9363 2012-06-15 Marc Glisse <marc.glisse@inria.fr>
9366 * c-common.h (c_build_vec_perm_expr): Move decl here.
9367 * c-common.c (c_build_vec_perm_expr): Move definition
9370 2012-06-06 Steven Bosscher <steven@gcc.gnu.org>
9372 * c.opt (fconserve-space): Turn into a no-op.
9374 2012-06-04 Sterling Augustine <saugustine@google.com>
9376 * c-pretty-print.h (pp_c_flag_gnu_v3): New enumerator.
9377 * c-pretty-print.c (pp_c_specifier_qualifier_list): Check it at
9378 both the start and end of the function.
9380 2012-06-04 Steven Bosscher <steven@gcc.gnu.org>
9382 * c-common.c: Do not include output.h.
9383 * c-pragma.c: Likewise.
9385 2012-06-04 Steven Bosscher <steven@gcc.gnu.org>
9387 * error.c (dump_decl): Check pp_c_flag_gnu_v3.
9388 (decl_as_dwarf_string, lang_decl_dwarf_name): New functions.
9389 (lang_decl_name): Handle namespace decls.
9391 2012-05-31 Steven Bosscher <steven@gcc.gnu.org>
9393 * c-ada-spec.c: Do not include output.h.
9394 * c-semantics.c: Likewise.
9396 2012-05-29 Joseph Myers <joseph@codesourcery.com>
9398 * c-common.c: Fix typo.
9400 2012-05-29 Michael Matz <matz@suse.de>
9402 * c-common.h (c_expand_decl): Remove prototype.
9404 2012-05-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
9406 * c.opt (Wmissing-braces): Use LangEnabledBy(C ObjC,Wall).
9407 * c-opts.c (c_common_handle_option): Remove code handling
9408 warn_missing_braces.
9410 2012-05-28 Paolo Carlini <paolo.carlini@oracle.com>
9413 * c-opts.c (c_common_handle_option): For C++ -Wall doesn't enable
9416 2012-05-22 Dodji Seketeli <dodji@redhat.com>
9419 * c.opt (Wunused-local-typedefs): Use EnabledBy(Wunused).
9421 2012-05-17 Manuel López-Ibáñez <manu@gcc.gnu.org>
9423 * c.opt (--pedantic-errors,-pedantic-errors): Do not handle here.
9424 * c-opts.c (c_common_handle_option): Do not handle explicitly
9425 Wreturn-type, Wwrite-strings, warn_ecpp, and -pedantic-errors.
9427 2012-05-16 Dodji Seketeli <dodji@redhat.com>
9429 PR preprocessor/7263
9430 * c-lex.c (c_lex_with_flags): Pass a virtual location to the call
9431 to cpp_classify_number. For diagnostics, use the precise location
9432 instead of the global input_location.
9434 2012-05-15 Paolo Carlini <paolo.carlini@oracle.com>
9437 * c-common.c (shorten_compare): Check c_inhibit_evaluation_warnings.
9439 2012-05-14 Bernd Schmidt <bernds@codesourcery.com>
9441 * c-common.c (DEF_ATTR_STRING): Define and undefine as necessary.
9443 2012-05-14 Manuel López-Ibáñez <manu@gcc.gnu.org>
9446 * c.opt (Wc++0X-compat,Wdelete-non-virtual-dtor,Wjump-misses-init,
9447 Wreorder): Use LangEnabledBy.
9448 * c-opts.c (c_common_handle_option): Do not enable them
9449 explicitly. Call lang-specific generated functions.
9450 (c_common_post_options): Do not set them here.
9452 2012-05-13 Manuel López-Ibáñez <manu@gcc.gnu.org>
9454 * c.opt (Wclobbered,Wempty-body,Wignored-qualifiers,
9455 Wmissing-field-initializers,Wmissing-parameter-type,
9456 Wold-style-declaration,Woverride-init): Use EnabledBy.
9457 * c-opts.c (c_common_post_options): Do not set here explicitly.
9459 2012-05-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
9462 * c-opts.c (c_common_handle_option): Use handle_generated_option
9463 to enable sub-options.
9465 2012-05-10 Paolo Carlini <paolo.carlini@oracle.com>
9468 * c-common.c (warnings_for_convert_and_check): Use warning_at.
9470 2012-05-10 Richard Guenther <rguenther@suse.de>
9472 * c-common.c (c_sizeof_or_alignof_type): Remove assert and
9473 adjust commentary about TYPE_IS_SIZETYPE types.
9475 2012-05-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
9478 * c-common.c (warn_logical_operator): Check that argument of
9479 integer_zerop is not NULL.
9481 2012-05-05 Manuel López-Ibáñez <manu@gcc.gnu.org>
9484 * c-common.c (warn_logical_operator): Do not warn if either side
9485 is already true or false.
9487 2012-05-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
9490 * c-common.c (expr_original_type): New.
9491 (shorten_compare): Do not warn for enumeration types.
9493 2012-05-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
9495 * c.opt (fpermissive): Add Var(flag_permissive).
9497 2012-04-30 Marc Glisse <marc.glisse@inria.fr>
9500 * c-common.c (convert_vector_to_pointer_for_subscript): New function.
9501 * c-common.h (convert_vector_to_pointer_for_subscript): Declare it.
9503 2012-04-30 Dodji Seketeli <dodji@redhat.com>
9505 Add -Wvarargs option
9506 * c.opt (Wvarargs): Define new option.
9508 2012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
9510 * c-common.c (check_function_arguments): Replace
9511 Wmissing-format-attribute with Wsuggest-attribute=format.
9513 2012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
9515 * c.opt (Wsuggest-attribute=format): New. Alias of
9516 Wmissing-format-attribute.
9517 * c-format.c (decode_format_type): Replace
9518 Wmissing-format-attribute with Wsuggest-attribute=format.
9519 (check_function_format): Likewise.
9521 2012-04-27 Ollie Wild <aaw@google.com>
9523 * c-common.c: Add CPP_W_LITERAL_SUFFIX mapping.
9524 * c-opts.c (c_common_handle_option): Handle OPT_Wliteral_suffix.
9525 * c.opt: Add Wliteral-suffix.
9527 2012-04-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
9530 * c.opt (Wpedantic): New.
9531 (pedantic): Alias Wpedantic.
9532 * c-opts.c (c_common_handle_option): Replace -pedantic with -Wpedantic.
9533 (c_common_post_options): Likewise.
9534 (sanitize_cpp_opts): Likewise.
9535 * c-lex.c (interpret_float): Likewise.
9536 * c-format.c (check_format_types): Likewise.
9537 * c-common.c (pointer_int_sum): Likewise.
9538 (c_sizeof_or_alignof_type): Likewise.
9539 (c_add_case_label): Likewise.
9540 (c_do_switch_warnings): Likewise.
9541 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
9543 2012-04-15 Jason Merrill <jason@redhat.com>
9546 * c-format.c (CPLUSPLUS_STD_VER): C++11 inherits from C99.
9547 (C_STD_NAME): Distinguish between C++98 and C++11.
9549 2012-04-11 Eric Botcazou <ebotcazou@adacore.com>
9552 * c-common.h (uint16_type_node): Rename into...
9553 (c_uint16_type_node): ...this.
9554 * c-common.c (c_common_nodes_and_builtins): Adjust for above renaming.
9555 * c-cppbuiltin.c (builtin_define_stdint_macros): Likewise.
9557 2012-04-10 Manuel López-Ibáñez <manu@gcc.gnu.org>
9559 * c-common.c (warn_if_unused_value): Move definition to here.
9560 * c-common.h (warn_if_unused_value): Move declaration to here.
9562 2012-03-23 William Bader <williambader@hotmail.com>
9564 * c-lex.c (c_lex_with_flags): Avoid declarations after stmts.
9566 2012-03-20 Jason Merrill <jason@redhat.com>
9568 * c-common.h (enum cxx_dialect): Add cxx1y.
9569 * c-common.c (c_common_nodes_and_builtins): Use >= for cxx_dialect
9571 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
9572 * c-opts.c (c_common_post_options): Likewise.
9573 (set_std_cxx1y): New.
9574 (c_common_handle_option): Call it.
9575 * c.opt (-std=c++1y, -std=gnu++1y): New flags.
9577 2012-03-19 Paolo Carlini <paolo.carlini@oracle.com>
9580 * c.opt ([Wuseless-cast]): Add.
9582 2012-03-16 Richard Guenther <rguenther@suse.de>
9584 * c-pretty-print.c (pp_c_initializer_list): Adjust.
9586 2012-03-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
9589 * c.opt (ftemplate-backtrace-limit) Add.
9591 2012-03-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9593 * c-cppbuiltin.c (c_cpp_builtins): Remove #pragma extern_prefix
9595 * c-pragma.c (handle_pragma_extern_prefix): Remove.
9596 (init_pragma): Don't register extern_prefix.
9598 2012-03-12 Richard Guenther <rguenther@suse.de>
9600 * c-common.c (c_common_get_narrower): Use c_common_type_for_size.
9601 (builtin_type_for_size): Likewise.
9603 2012-02-13 Jakub Jelinek <jakub@redhat.com>
9606 * c-common.c (sync_resolve_params): Don't decide whether to convert
9607 or not based on TYPE_SIZE comparison, convert whenever arg_type
9608 is unsigned INTEGER_TYPE.
9610 2012-02-06 Paolo Carlini <paolo.carlini@oracle.com>
9613 * c.opt ([Wunused-local-typedefs]): Fix description.
9615 2012-01-24 Mike Stump <mikestump@comcast.net>
9617 * c-common.c (c_common_type_for_mode): Match signed/unsigned types
9620 2012-01-18 Richard Guenther <rguenther@suse.de>
9622 * c-opts.c (c_common_post_options): Reset LTO flags if
9623 we are about to generate a PCH.
9625 2012-01-17 Paolo Carlini <paolo.carlini@oracle.com>
9628 * c-pretty-print.c (pp_c_integer_constant): For unsigned constants
9629 use pp_unsigned_wide_integer.
9631 2012-01-10 Richard Guenther <rguenther@suse.de>
9634 * c-opts.c (c_common_handle_option): Move -Werror handling
9635 to language independent code.
9637 2012-01-05 Richard Guenther <rguenther@suse.de>
9640 * c.opt (Wmudflap, fmudflap, fmudflapth, fmudflapir): Move here
9643 2011-12-30 Paolo Carlini <paolo.carlini@oracle.com>
9646 * c-common.c (c_sizeof_or_alignof_type): In C++ allow for alignof
9647 of array types with an unknown bound.
9649 2011-12-20 Joseph Myers <joseph@codesourcery.com>
9651 * c-common.c (flag_isoc99): Update comment to refer to C11.
9652 (flag_isoc1x): Change to flag_isoc11.
9653 * c-common.h (flag_isoc99): Update comment to refer to C11.
9654 (flag_isoc1x): Change to flag_isoc11.
9655 * c-cppbuiltin.c (cpp_atomic_builtins): Change comment to refer to
9657 * c-opts.c (set_std_c1x): Change to set_std_c11.
9658 (c_common_handle_option): Handle OPT_std_c11 and OPT_std_gnu11.
9660 (set_std_c89, set_std_c99, set_std_c11): Use flag_isoc11.
9661 (set_std_c1): Use CLK_STDC11 and CLK_GNUC11.
9662 * c.opt (std=c1x): Change to std=c11. Document as non-draft
9664 (std=c1x, std=iso9899:2011): Add as aliases of std=c11.
9665 (std=gnu1x): Change to std=gnu11. Refer to non-draft standard.
9666 (std=gnu1x): Make alias of std=gnu11.
9668 2011-12-19 Jason Merrill <jason@redhat.com>
9671 * c-common.c (handle_transparent_union_attribute): Check the first
9672 field if the type is complete.
9674 2011-12-15 Jonathan Wakely <jwakely.gcc@gmail.com>
9677 * c-common.c (RID_IS_FINAL): Add.
9678 * c-common.h (RID_IS_FINAL): Add.
9680 2011-11-30 Iain Sandoe <iains@gcc.gnu.org>
9682 * c.opt (fgnu-runtime): Provide full description.
9683 (fnext-runtime): Likewise.
9684 * c-opts.c (OPT_fgnu_runtime, OPT_fnext_runtime) Remove.
9686 2011-11-28 Andrew MacLeod <amacleod@redhat.com>
9688 * c-cpp-builtin.c (cpp_atomic_builtins):New. Emit all atomic
9689 predefines in one place. Add LOCK_FREE predefines.
9690 (c_cpp_builtins): Move Legacy HAVE_SYNC predefines to
9693 2011-11-24 Andrew MacLeod <amacleod@redhat.com>
9696 * c-common.c (get_atomic_generic_size): Check for various error
9698 (resolve_overloaded_atomic_exchange,
9699 resolve_overloaded_atomic_compare_exchange,
9700 resolve_overloaded_atomic_load, resolve_overloaded_atomic_store): Return
9701 error_mark_node for error conditions.
9703 2011-11-08 Richard Guenther <rguenther@suse.de>
9706 * c-pretty-print.c (pp_c_expression): Handle SSA_NAMEs.
9708 2011-11-07 Richard Henderson <rth@redhat.com>
9709 Aldy Hernandez <aldyh@redhat.com>
9710 Torvald Riegel <triegel@redhat.com>
9712 Merged from transactional-memory.
9714 * c-common.c (handle_tm_wrap_attribute,
9715 handle_tm_attribute, ignore_attribute, parse_tm_stmt_attr): New.
9716 (struct c_common_reswords): Added __transaction* keywords.
9717 (struct c_common_attribute_table): Added transaction* and tm_regparm
9719 * c-common.h: Added RID_TRANSACTION*. Added TM_ATTR* and TM_STMT*
9721 (parse_tm_stmt_attr, tm_attr_to_mask, tm_mask_to_attr,
9722 find_tm_attribute): Declare.
9724 2011-11-07 Jason Merrill <jason@redhat.com>
9727 * c-common.c, c-common.h: Revert yesterday's changes.
9729 2011-11-06 Jason Merrill <jason@redhat.com>
9732 * c-common.c (decl_has_visibility_attr): Split out from...
9733 (c_determine_visibility): ...here.
9734 * c-common.h: Declare it.
9736 2011-11-06 Joseph Myers <joseph@codesourcery.com>
9738 * c-common.c (c_common_reswords): Add _Alignas and _Alignof.
9739 (c_sizeof_or_alignof_type): Diagnose alignof applied to a function
9741 (check_user_alignment): New. Split out of
9742 handle_aligned_attribute. Disallow integer constants with
9743 noninteger types. Conditionally allow zero.
9744 (handle_aligned_attribute): Use check_user_alignment.
9745 * c-common.h (RID_ALIGNAS, check_user_alignment): New.
9747 2011-11-06 Andrew MacLeod <amacleod@redhat.com>
9748 Richard Henderson <rth@redhat.com>
9750 Merged from cxx-mem-model.
9752 * c-cppbuiltin.c (c_cpp_builtins): Test both atomic and sync patterns.
9753 * c-common.c (sync_resolve_params, sync_resolve_return): Only tweak
9754 parameters that are the same type size.
9755 (get_atomic_generic_size): New. Find size of generic
9756 atomic function parameters and do typechecking.
9757 (add_atomic_size_parameter): New. Insert size into parameter list.
9758 (resolve_overloaded_atomic_exchange): Restructure __atomic_exchange to
9759 either __atomic_exchange_n or external library call.
9760 (resolve_overloaded_atomic_compare_exchange): Restructure
9761 __atomic_compare_exchange to either _n variant or external library call.
9762 (resolve_overloaded_atomic_load): Restructure __atomic_load to either
9763 __atomic_load_n or an external library call.
9764 (resolve_overloaded_atomic_store): Restructure __atomic_store to either
9765 __atomic_store_n or an external library call.
9766 (resolve_overloaded_builtin): Handle new __atomic builtins.
9768 2011-11-04 Eric Botcazou <ebotcazou@adacore.com>
9771 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Call fold_offsetof_1.
9772 (fold_offsetof_1): Make global. Remove STOP_REF argument and adjust.
9773 <INDIRECT_REF>: Return the argument.
9774 <ARRAY_REF>: Remove special code for negative offset.
9775 Call fold_build_pointer_plus instead of size_binop.
9776 (fold_offsetof): Remove STOP_REF argument and adjust.
9777 * c-common.h (fold_offsetof_1): Declare.
9778 (fold_offsetof): Remove STOP_REF argument.
9780 2011-11-02 Paolo Carlini <paolo.carlini@oracle.com>
9783 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
9784 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
9785 Wnarrowing for C++0x and C++98.
9786 * c.opt ([Wnarrowing]): Update.
9788 2011-11-01 Paolo Carlini <paolo.carlini@oracle.com>
9791 * c.opt: Add Wzero-as-null-pointer-constant.
9793 2011-10-31 Jason Merrill <jason@redhat.com>
9795 * c.opt (-fdeduce-init-list): Off by default.
9798 * c-common.h (cxx_dialect): Add cxx11 and cxx03.
9799 * c.opt: Add -std=c++11, -std=gnu++11, -std=gnu++03,
9801 * c-opts.c (set_std_cxx11): Rename from set_std_cxx0x.
9803 2011-10-27 Roberto Agostino Vitillo <ravitillo@lbl.gov>
9806 * c.opt (fvisibility-inlines-hidden): Description change.
9808 2011-10-26 Ed Smith-Rowland <3dw4rd@verizon.net>
9810 Implement C++11 user-defined literals.
9811 * c-common.c (build_userdef_literal): New.
9812 * c-common.def: New tree code.
9813 * c-common.h (tree_userdef_literal): New tree struct and accessors.
9814 * c-lex.c (interpret_float): Add suffix parm.
9815 (c_lex_with_flags): Build literal tokens.
9817 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
9821 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
9824 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
9825 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
9826 Wnarrowing for C++0x and C++98.
9827 * c.opt ([Wnarrowing]): Update.
9829 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
9832 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
9833 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
9834 Wnarrowing for C++0x and C++98.
9835 * c.opt ([Wnarrowing]): Update.
9837 2011-10-21 Paolo Carlini <paolo.carlini@oracle.com>
9840 * c-common.c (conversion_warning): Remove code looking for
9841 artificial operands.
9843 2011-10-18 Dodji Seketeli <dodji@redhat.com>
9846 * c-lex.c (fe_file_change): Use LINEMAP_SYSP when
9847 !NO_IMPLICIT_EXTERN_C.
9849 2011-10-17 Michael Spertus <mike_spertus@symantec.com>
9851 * c-common.c (c_common_reswords): Add __bases,
9853 * c-common.h: Add RID_BASES and RID_DIRECT_BASES.
9855 2011-10-17 Paolo Carlini <paolo.carlini@oracle.com>
9858 * c.opt ([Wnonnull]): Add C++ and Objective-C++.
9860 2011-10-15 Tom Tromey <tromey@redhat.com>
9861 Dodji Seketeli <dodji@redhat.com>
9863 * c.opt (fdebug-cpp): New option.
9864 * c-opts.c (c_common_handle_option): Handle the option.
9865 * c-ppoutput.c (maybe_print_line_1): New static function. Takes an
9866 output stream in parameter. Factorized from ...
9867 (maybe_print_line): ... this. Dump location debug information when
9868 -fdebug-cpp is in effect.
9869 (print_line_1): New static function. Takes an output stream in
9870 parameter. Factorized from ...
9871 (print_line): ... here. Dump location information when -fdebug-cpp
9873 (scan_translation_unit): Dump location information when
9874 -fdebug-cpp is in effect.
9876 2011-10-15 Tom Tromey <tromey@redhat.com>
9877 Dodji Seketeli <dodji@redhat.com>
9879 * c.opt (ftrack-macro-expansion): New option. Handle it with and
9881 * c-opts.c (c_common_handle_option)<case
9882 OPT_ftrack_macro_expansion_, case OPT_ftrack_macro_expansion>: New
9883 cases. Handle -ftrack-macro-expansion with and without argument.
9885 2011-10-15 Tom Tromey <tromey@redhat.com>
9886 Dodji Seketeli <dodji@redhat.com>
9888 * c-ppoutput.c (scan_translation_unit, maybe_print_line)
9889 (print_line, cb_define, do_line_change): Adjust to avoid touching
9890 the internals of struct line_map. Use the public API instead.
9891 * c-pch.c (c_common_read_pch): Likewise.
9892 * c-lex.c (fe_file_change): Likewise.
9894 2011-10-14 Paolo Carlini <paolo.carlini@oracle.com>
9897 * c.opt ([Wformat-zero-length]): Add C++ and Objective-C++.
9899 2011-10-11 Paolo Carlini <paolo.carlini@oracle.com>
9902 * c-pretty-print.c (pp_c_floating_constant): Output
9903 max_digits10 (in the ISO C++ WG N1822 sense) decimal digits.
9905 2011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
9907 * c-common.c (def_builtin_1): Delete old interface with two
9908 parallel arrays to hold standard builtin declarations, and replace
9909 it with a function based interface that can support creating
9910 builtins on the fly in the future. Change all uses, and poison
9911 the old names. Make sure 0 is not a legitimate builtin index.
9912 * c-omp.c (c_finish_omp_barrier): Ditto.
9913 (c_finish_omp_taskwait): Ditto.
9914 (c_finish_omp_flush): Ditto.
9916 2011-10-11 Tristan Gingold <gingold@adacore.com>
9918 * c.opt: (fallow-parameterless-variadic-functions): New.
9920 2011-09-08 Dodji Seketeli <dodji@redhat.com>
9922 PR c++/33255 - Support -Wunused-local-typedefs warning
9923 * c-common.h (struct c_language_function::local_typedefs): New
9925 (record_locally_defined_typedef, maybe_record_typedef_use)
9926 (maybe_warn_unused_local_typedefs): Declare new functions.
9927 * c-common.c (record_locally_defined_typedef)
9928 (maybe_record_typedef_use)
9929 (maybe_warn_unused_local_typedefs): Define new functions.
9930 * c.opt: Declare new -Wunused-local-typedefs flag.
9932 2011-09-06 Eric Botcazou <ebotcazou@adacore.com>
9935 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Fold offsetof-like
9938 2011-09-05 Richard Guenther <rguenther@suse.de>
9940 * c-common.c (complete_array_type): Use ssize_int (-1) instead
9941 of integer_minus_one_node for empty array upper bounds.
9943 2011-08-28 Dodji Seketeli <dodji@redhat.com>
9945 * c-pch.c (c_common_read_pch): Call linemap_add with LC_ENTER as
9946 it's the first time it's being called on this main TU.
9948 2011-08-24 Richard Guenther <rguenther@suse.de>
9951 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Fix conditional.
9953 2011-08-22 Gabriel Charette <gchare@google.com>
9955 * c-opts.c (c_finish_options): Force BUILTINS_LOCATION for tokens
9956 defined in cpp_init_builtins and c_cpp_builtins.
9958 2011-08-19 Joseph Myers <joseph@codesourcery.com>
9960 * c-common.c (c_common_reswords): Add __builtin_complex.
9961 * c-common.h (RID_BUILTIN_COMPLEX): New.
9963 2011-08-18 Joseph Myers <joseph@codesourcery.com>
9965 * c-common.c (c_common_reswords): Add _Noreturn.
9966 (keyword_is_function_specifier): Handle RID_NORETURN.
9967 * c-common.h (RID_NORETURN): New.
9969 2011-08-10 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
9971 * c-common.c (unsafe_conversion_p): New function. Check if it is
9972 unsafe to convert an expression to the type.
9973 (conversion_warning): Adjust, use unsafe_conversion_p.
9974 * c-common.h (unsafe_conversion_p): New function declaration.
9976 2011-08-02 Jakub Jelinek <jakub@redhat.com>
9978 * c-common.h (c_finish_omp_atomic): Adjust prototype.
9979 (c_finish_omp_taskyield): New prototype.
9980 * c-omp.c (c_finish_omp_atomic): Add OPCODE, V, LHS1 and RHS1
9981 arguments. Handle OMP_ATOMIC_READ, OMP_ATOMIC_CAPTURE_OLD and
9982 OMP_ATOMIC_CAPTURE_NEW in addition to OMP_ATOMIC. If LHS1
9983 or RHS1 have side-effects, evaluate those too in the right spot,
9984 if it is a decl and LHS is also a decl, error out if they
9986 (c_finish_omp_taskyield): New function.
9987 * c-cppbuiltin.c (c_cpp_builtins): Change _OPENMP to 201107.
9988 * c-pragma.c (omp_pragmas): Add taskyield.
9989 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKYIELD.
9990 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_FINAL and
9991 PRAGMA_OMP_CLAUSE_MERGEABLE.
9993 2011-07-25 Dodji Seketeli <dodji@redhat.com>
9995 * c-common.h (set_underlying_type): Remove parm name from
9998 2011-07-25 Romain Geissler <romain.geissler@gmail.com>
10000 * c-pretty-print.h: Search c-common.h in c-family.
10002 2011-07-22 Jason Merrill <jason@redhat.com>
10005 * c.opt (Wnarrowing): New.
10008 * c-common.h: Declare c_linkage_bindings.
10009 * c-pragma.c (handle_pragma_redefine_extname): Use it.
10012 * c-opts.c (set_std_cxx0x): Set flag_isoc94 and flag_isoc99.
10013 * c-pretty-print.c (pp_c_cv_qualifiers): Check c_dialect_cxx as well
10014 as flag_isoc99 for 'restrict'.
10015 (pp_c_specifier_qualifier_list): Likewise for _Complex.
10017 2011-07-21 Ian Lance Taylor <iant@google.com>
10019 PR middle-end/49705
10020 * c-common.c (c_disable_warnings): New static function.
10021 (c_enable_warnings): New static function.
10022 (c_fully_fold_internal): Change local unused_p to bool. Call
10023 c_disable_warnings and c_enable_warnings rather than change
10024 c_inhibit_evaluation_warnings.
10026 2011-07-20 Jason Merrill <jason@redhat.com>
10028 PR c++/6709 (DR 743)
10029 PR c++/42603 (DR 950)
10030 * c-common.h (CPP_KEYWORD, CPP_TEMPLATE_ID): Move from cp/parser.h.
10031 (CPP_NESTED_NAME_SPECIFIER, N_CP_TTYPES): Likewise.
10032 (CPP_DECLTYPE): New.
10033 * c-common.c (c_parse_error): Handle CPP_DECLTYPE.
10035 2011-07-19 Richard Guenther <rguenther@suse.de>
10037 * c-common.c (pointer_int_sum): Use fold_build_pointer_plus.
10038 * c-omp.c (c_finish_omp_for): Likewise.
10040 2011-07-12 Eric Botcazou <ebotcazou@adacore.com>
10042 * c-ada-spec.c (dump_nested_types): Put semi-colon after empty loop
10043 body on the next line.
10045 2011-07-08 Jason Merrill <jason@redhat.com>
10048 * c-omp.c (check_omp_for_incr_expr): Handle preevaluation.
10051 * c-common.c (c_apply_type_quals_to_decl): Don't check
10052 TYPE_NEEDS_CONSTRUCTING.
10054 2011-07-06 Richard Guenther <rguenther@suse.de>
10056 * c-common.c (c_common_nodes_and_builtins):
10057 Merge calls to build_common_tree_nodes and build_common_tree_nodes_2.
10059 2011-07-05 Richard Guenther <rguenther@suse.de>
10061 * c-common.c (c_common_nodes_and_builtins): Build all common
10064 2011-06-27 Jakub Jelinek <jakub@redhat.com>
10066 * c-common.h (c_tree_chain_next): New static inline function.
10068 * c-common.c (check_builtin_function_arguments): Handle
10069 BUILT_IN_ASSUME_ALIGNED.
10071 2011-06-21 Andrew MacLeod <amacleod@redhat.com>
10073 * c-common.c: Add sync_ or SYNC__ to builtin names.
10074 * c-omp.c: Add sync_ or SYNC__ to builtin names.
10076 2011-06-20 Pierre Vittet <piervit@pvittet.com>
10078 * c-pragma.h (pragma_handler_1arg, pragma_handler_2arg): New
10080 (gen_pragma_handler): New union.
10081 (internal_pragma_handler): New type.
10082 (c_register_pragma_with_data)
10083 (c_register_pragma_with_expansion_and_data): New functions.
10085 * c-pragma.c (registered_pragmas, c_register_pragma_1)
10086 (c_register_pragma, c_register_pragma_with_expansion)
10087 (c_invoke_pragma_handler): Changed to work with
10088 internal_pragma_handler.
10089 (c_register_pragma_with_data)
10090 (c_register_pragma_with_expansion_and_data): New functions.
10092 2011-06-14 Joseph Myers <joseph@codesourcery.com>
10094 * c-common.c: Include common/common-target.h.
10095 (handle_section_attribute): Use
10096 targetm_common.have_named_sections.
10097 * c-cppbuiltin.c: Include common/common-target.h.
10098 (c_cpp_builtins): Use targetm_common.except_unwind_info.
10100 2011-06-10 Richard Guenther <rguenther@suse.de>
10102 * c-pretty-print.c (pp_c_type_specifier): Use pp_c_identifier
10103 to print a IDENTIFIER_NODE.
10105 2011-06-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10106 Joseph Myers <joseph@codesourcery.com>
10108 * c.opt (fbuilding-libgcc): New option.
10109 * c-cppbuiltin.c (c_cpp_builtins): Define
10110 __LIBGCC_TRAMPOLINE_SIZE__ if flag_building_libgcc.
10112 2011-06-07 Jason Merrill <jason@redhat.com>
10114 * c-common.c (max_tinst_depth): Lower default to 900.
10116 * c-format.c (gcc_cxxdiag_char_table): Add 'S' format.
10118 2011-06-07 Richard Guenther <rguenther@suse.de>
10120 * c-common.c (c_common_nodes_and_builtins): Do not set
10121 size_type_node or call set_sizetype.
10123 2011-06-07 Dodji Seketeli <dodji@redhat.com>
10126 * c-pretty-print.c (pp_c_integer_constant): Consider the canonical
10127 type when using pointer comparison to compare types.
10129 2011-06-02 Jonathan Wakely <jwakely.gcc@gmail.com>
10131 * c.opt: Add -Wdelete-non-virtual-dtor.
10132 * c-opts.c (c_common_handle_option): Include it in -Wall.
10134 2011-05-30 Nathan Froyd <froydnj@gcc.gnu.org>
10139 2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
10141 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
10144 2011-05-27 Jakub Jelinek <jakub@redhat.com>
10147 * c-common.c (c_common_truthvalue_conversion) <case COND_EXPR>: For
10148 C++ don't call c_common_truthvalue_conversion on void type arms.
10150 2011-05-27 Nathan Froyd <froydnj@codesourcery.com>
10152 * c-common.h (struct stmt_tree_s) [x_cur_stmt_list]: Change to a VEC.
10153 (stmt_list_stack): Define.
10154 (cur_stmt_list): Adjust for new type of x_cur_stmt_list.
10155 * c-semantics.c (push_stmt_list, pop_stmt_list): Likewise.
10157 2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
10159 * c-common.c (warning_candidate_p): Check for BLOCKs.
10161 2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
10163 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
10166 2011-05-25 Jakub Jelinek <jakub@redhat.com>
10168 * c-common.c (def_fn_type): Remove extra va_end.
10170 2011-05-23 Jason Merrill <jason@redhat.com>
10173 * c-common.c (c_common_get_narrower): New.
10174 (shorten_binary_op, shorten_compare, warn_for_sign_compare): Use it.
10176 2011-05-23 Nathan Froyd <froydnj@codesourcery.com>
10178 * c-common.h (check_function_arguments): Tweak prototype of
10179 check_function_arguments.
10180 * c-common.c (check_function_arguments): Likewise. Adjust
10181 calls to check_function_nonnull, check_function_format, and
10182 check_function_sentinel.
10183 (check_function_sentinel): Take a FUNCTION_TYPE rather than
10184 separate attributes and typelist arguments. Use
10185 FOREACH_FUNCTION_ARGS to iterate over argument types.
10187 2011-05-15 Paolo Carlini <paolo.carlini@oracle.com>
10189 * c-common.c (c_common_reswords): Reorder.
10190 * c-common.h (rid): Likewise.
10192 2011-05-10 Nathan Froyd <froydnj@codesourcery.com>
10194 * c-common.c (def_fn_type): Don't call build_function_type, call
10195 build_function_type_array or build_varargs_function_type_array
10197 (c_common_nodes_and_builtins): Likewise.
10199 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
10201 * c-common.c (c_add_case_label): Omit the loc argument to
10203 * c-common.h (build_case_label): Remove.
10204 * c-semantics.c (build_case_label): Remove.
10206 2011-05-05 Joseph Myers <joseph@codesourcery.com>
10208 * c-objc.h (objc_start_method_definition): Update prototype.
10209 * stub-objc.c (objc_start_method_definition): Add extra parameter.
10211 2011-05-04 Nathan Froyd <froydnj@codesourcery.com>
10213 * c-common.c (check_main_parameter_types): Reindent. Don't use
10214 TYPE_ARG_TYPES directly.
10215 (handle_nonnull_attribute): Likewise.
10216 (sync_resolve_params): Likewise.
10217 * c-format.c (handle_format_arg_attribute): Likewise. Adjust call
10218 to check_format_string.
10219 (handle_format_attribute): Likewise.
10220 (check_format_string): Take a function type to examine instead of
10221 a type list. Use a function_arg_iterator to step through argument
10224 2011-05-04 Richard Guenther <rguenther@suse.de>
10226 * c-common.c (fix_string_type): Use size_int for index type bounds.
10227 (start_fname_decls): Do not pass NULL to build_int_cst.
10228 (c_init_attributes): Likewise.
10229 * c-lex.c (c_lex_with_flags): Likewise.
10231 2011-04-27 Jason Merrill <jason@redhat.com>
10233 * c-common.c (make_tree_vector_from_list): New.
10234 * c-common.h: Declare it.
10236 2011-04-26 Richard Guenther <rguenther@suse.de>
10238 PR preprocessor/48248
10239 * c-ppoutput.c (maybe_print_line): Always optimize newlines
10240 for output size with -P.
10242 2011-04-25 Paolo Carlini <paolo.carlini@oracle.com>
10244 * c-common.c (struct c_common_resword): Add __underlying_type.
10245 * c-common.h (enum rid): Add RID_UNDERLYING_TYPE.
10247 2011-04-20 Jim Meyering <meyering@redhat.com>
10249 * c-format.c (init_dollar_format_checking): Remove useless
10252 2011-04-15 Nicola Pero <nicola.pero@meta-innovation.com>
10254 * c-objc.h (objc_get_interface_ivars): Removed.
10255 (objc_detect_field_duplicates): New.
10256 * stub-objc.c: Likewise.
10258 2011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
10260 * stub-objc.c (objc_declare_protocols): Renamed to
10261 objc_declare_protocol.
10262 * c-objc.h: Likewise.
10264 2011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
10266 * stub-objc.c (objc_declare_class): Updated argument name.
10268 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
10270 * c-common.h (c_common_init_ts): Declare.
10271 * c-common.c (c_common_init_ts): Define.
10273 2011-04-12 Nicola Pero <nicola.pero@meta-innovation.com>
10275 * c-objc.h (objc_build_message_expr): Updated prototype.
10276 * stub-objc.c (objc_build_message_expr): Likewise.
10278 2011-04-12 Martin Jambor <mjambor@suse.cz>
10280 * c-gimplify.c (c_genericize): Call cgraph_get_create_node instead
10283 2011-04-11 Richard Guenther <rguenther@suse.de>
10285 * c-common.c (complete_array_type): Build a range type of
10288 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
10290 * c-common.c (handle_sentinel_attribute): Don't use TYPE_ARG_TYPES.
10291 (handle_type_generic_attribute): Likewise.
10293 2011-04-07 Jason Merrill <jason@redhat.com>
10296 * c-common.c (c_common_truthvalue_conversion): Don't ignore
10297 conversion from C++0x scoped enum.
10299 2011-04-06 Joseph Myers <joseph@codesourcery.com>
10301 * c-target-def.h: New file.
10302 * c-target.def: New file.
10303 * c-target.h: New file.
10304 * c-common.c (targetcm): Don't define here.
10305 * c-common.h (default_handle_c_option): Declare.
10306 * c-format.c: Include c-target.h instead of target.h.
10307 * c-opts.c: Include c-target.h instead of target.h. Explicitly
10309 (default_handle_c_option): Move from targhooks.c.
10311 2011-03-29 Jakub Jelinek <jakub@redhat.com>
10313 PR preprocessor/48248
10314 * c-ppoutput.c (print): Add src_file field.
10315 (init_pp_output): Initialize it.
10316 (maybe_print_line): Don't optimize by adding up to 8 newlines
10317 if map->to_file and print.src_file are different file.
10318 (print_line): Update print.src_file.
10320 2011-03-25 Kai Tietz <ktietz@redhat.com>
10322 * c-ada-spec.c (compare_comment): Use filename_cmp
10323 instead of strcmp for filename.
10325 2011-03-25 Jeff Law <law@redhat.com>
10327 * c-common.c (def_fn_type): Add missing va_end.
10329 2011-03-25 Jason Merrill <jason@redhat.com>
10331 * c.opt: Add -std=c++03.
10333 2011-03-22 Eric Botcazou <ebotcazou@adacore.com>
10335 * c-ada-spec.c (dump_ada_template): Skip non-class instances.
10337 2011-03-17 Kai Tietz <ktietz@redhat.com>
10340 * c-pretty-print.c (pp_c_specifier_qualifier_list):
10341 Display allowed attributes for function pointer types.
10342 (pp_c_attributes_display): New function to display
10343 attributes having affects_type_identity flag set to true.
10344 * c-pretty-print.h (pp_c_attributes_display): New prototype.
10346 * c-common.c (c_common_attribute_table):
10348 (c_common_format_attribute_table): Likewise.
10350 2011-03-18 Jason Merrill <jason@redhat.com>
10352 * c.opt (fconstexpr-depth): Add Var(max_constexpr_depth).
10353 * c-common.h: Don't declare it here.
10354 * c-common.c: Or define it here.
10355 * c-opts.c (c_common_handle_option): Or set it here.
10358 * c-common.c (handle_transparent_union_attribute): Don't
10359 make a duplicate type in C++.
10361 2011-03-15 Jason Merrill <jason@redhat.com>
10363 * c-common.c (max_constexpr_depth): New.
10364 * c-common.h: Declare it.
10365 * c-opts.c (c_common_handle_option): Set it.
10366 * c.opt (fconstexpr-depth): New option.
10368 2011-03-11 Jason Merrill <jason@redhat.com>
10370 * c-common.c (attribute_takes_identifier_p): Add missing const.
10373 * c-common.c (attribute_takes_identifier_p): Assume that an
10374 unknown attribute takes an identifier.
10376 2011-03-07 Nathan Froyd <froydnj@codesourcery.com>
10379 * c-common.c (c_type_hash): Call list_length instead of iterating
10380 through DECL_CHAIN. Rename 'i' to 'n_elements'.
10382 2011-02-19 Jakub Jelinek <jakub@redhat.com>
10385 * c-common.c (c_fully_fold_internal): Handle VIEW_CONVERT_EXPR.
10387 2011-02-17 Iain Sandoe <iains@gcc.gnu.org>
10389 * c.opt (fobjc-abi-version=) New.
10390 (fobjc-nilcheck): New.
10392 2011-02-03 Nathan Froyd <froydnj@codesourcery.com>
10395 * c-common.h (keyword_is_decl_specifier): Declare.
10396 * c-common.c (keyword_is_decl_specifier): Define.
10397 (keyword_is_function_specifier): New function.
10399 2011-01-26 Jakub Jelinek <jakub@redhat.com>
10402 * c-lex.c (interpret_float): If CPP_N_IMAGINARY, ensure
10403 EXCESS_PRECISION_EXPR is created with COMPLEX_TYPE instead of
10406 2011-01-26 Arnaud Charlet <charlet@adacore.com>
10408 * c-ada-spec.c (dump_generic_ada_node): Avoid dereferencing null type.
10410 2011-01-26 Jakub Jelinek <jakub@redhat.com>
10413 * c-opts.c (c_common_post_options): Call c_common_no_more_pch
10414 after init_c_lex if pch_file is set.
10416 2011-01-26 Dave Korn <dave.korn.cygwin@gmail.com>
10419 * c.opt (-fkeep-inline-dllexport): New switch.
10421 2011-01-12 Richard Guenther <rguenther@suse.de>
10423 PR middle-end/32511
10424 * c-common.c (handle_weak_attribute): Warn instead of error
10425 on declaring an inline function weak.
10427 2011-01-05 Tom Tromey <tromey@redhat.com>
10429 * c-common.h (lvalue_error): Update.
10430 * c-common.c (lvalue_error): Add 'loc' argument. Call error_at,
10433 2010-12-29 Nicola Pero <nicola.pero@meta-innovation.com>
10436 * c-objc.h (objc_finish_message_expr): Added argument to
10439 2010-12-22 Nathan Froyd <froydnj@codesourcery.com>
10441 * c-common.c (handle_nonnull_attribute, handle_sentinel_attribute):
10444 2010-12-18 Nicola Pero <nicola.pero@meta-innovation.com>
10446 * c-objc.h (objc_maybe_warn_exceptions): New.
10447 * stub-objc.c (objc_maybe_warn_exceptions): New.
10449 2010-12-10 Nathan Froyd <froydnj@codesourcery.com>
10451 * c-common.h (readonly_error): Declare.
10452 * c-common.c (readonly_error): Define.
10454 2010-12-09 Nathan Froyd <froydnj@codesourcery.com>
10456 * c-common.h (invalid_indirection_error): Declare.
10457 * c-common.c (invalid_indirection_error): Define.
10459 2010-12-03 Richard Guenther <rguenther@suse.de>
10462 * c-pretty-print.c (pp_c_postfix_expression): Handle MEM_REF.
10463 (pp_c_unary_expression): Likewise.
10464 (pp_c_expression): Likewise.
10466 2010-11-30 Nicola Pero <nicola.pero@meta-innovation.com>
10468 * c-common.h (objc_finish_function): New.
10469 (objc_non_volatilized_type): Removed.
10470 (objc_type_quals_match): Removed.
10471 * stub-objc.c (objc_finish_function): New.
10472 (objc_non_volatilized_type): Removed.
10473 (objc_type_quals_match): Removed.
10475 2010-11-30 Joseph Myers <joseph@codesourcery.com>
10477 * c-common.h (parse_optimize_options): Declare.
10478 * c-cppbuiltin.c, c-format.c, c-gimplify.c, c-lex.c, c-omp.c,
10479 c-pch.c, c-pragma.c, c-semantics.c: Don't include toplev.h.
10481 2010-11-29 Joseph Myers <joseph@codesourcery.com>
10483 * c-opts.c (check_deps_environment_vars): Use getenv instead of
10485 * c-pch.c (O_BINARY): Don't define here.
10486 * c-pragma.h: Include "cpplib.h" instead of <cpplib.h>.
10488 2010-11-25 Joseph Myers <joseph@codesourcery.com>
10490 * c-cppbuiltin.c (c_cpp_builtins): Pass &global_options to
10491 targetm.except_unwind_info.
10493 2010-11-23 Joseph Myers <joseph@codesourcery.com>
10495 * c-opts.c (c_common_handle_option): Pass location to
10496 set_struct_debug_option.
10498 2010-11-23 Joseph Myers <joseph@codesourcery.com>
10500 * c-common.c (visibility_options): Move from ../opts.c.
10501 * c-common.h (struct visibility_flags, visibility_options):
10503 * c-opts.c (finish_options): Rename to c_finish_options.
10504 (c_common_init): Update call to finish_options.
10506 2010-11-22 Nicola Pero <nicola.pero@meta-innovation.com>
10509 * c-lex.c (lex_string): Check that each string in an Objective-C
10510 string concat sequence starts with either one or zero '@', and
10511 that there are no spurious '@' signs at the end.
10513 2010-11-20 Joseph Myers <joseph@codesourcery.com>
10515 * c-pragma.c: Remove conditionals on HANDLE_PRAGMA_PACK,
10516 HANDLE_PRAGMA_PACK_PUSH_POP, HANDLE_PRAGMA_WEAK and
10517 HANDLE_PRAGMA_VISIBILITY.
10518 * c-pragma.h (HANDLE_PRAGMA_WEAK, HANDLE_PRAGMA_PACK,
10519 HANDLE_PRAGMA_VISIBILITY): Don't define.
10520 (HANDLE_SYSV_PRAGMA, HANDLE_PRAGMA_PACK_PUSH_POP): Don't test.
10522 2010-11-20 Nathan Froyd <froydnj@codesourcery.com>
10527 * c-common.h (keyword_begins_type_specifier): Declare.
10528 (keyword_is_storage_class_specifier): Declare.
10529 (keyword_is_type_qualifier): Declare.
10530 * c-common.c (keyword_begins_type_specifier): New function.
10531 (keyword_is_storage_class_specifier): New function.
10532 (keyword_is_type_qualifier): Declare.
10534 2010-11-19 Joseph Myers <joseph@codesourcery.com>
10537 * c-common.c (in_late_binary_op): Define.
10538 (c_common_truthvalue_conversion): Check in_late_binary_op before
10539 calling c_save_expr.
10540 * c-common.h (in_late_binary_op): Declare.
10542 2010-11-19 Joseph Myers <joseph@codesourcery.com>
10544 * c-opts.c (c_common_handle_option): Update calls to
10545 set_struct_debug_option.
10547 2010-11-19 Nicola Pero <nicola.pero@meta-innovation.com>
10549 * c-common.h (objc_declare_protocols): Added additional argument.
10550 * stub-objc.c (objc_declare_protocol): Same change.
10552 2010-11-18 Nathan Froyd <froydnj@codesourcery.com>
10555 * c-common.h (build_real_imag_expr): Declare.
10556 * c-semantics.c (build_real_imag_expr): Define.
10558 2010-11-17 Joseph Myers <joseph@codesourcery.com>
10560 * c-opts.c (c_common_parse_file): Take no arguments.
10561 * c-common.h (c_common_parse_file): Update prototype.
10563 2010-11-16 Jakub Jelinek <jakub@redhat.com>
10566 * c-common.c (warning_candidate_p): Don't track non-const calls
10569 2010-11-15 Ian Lance Taylor <iant@google.com>
10571 * c-lex.c (init_c_lex): Set macro debug callbacks if
10572 flag_dump_go_spec is set.
10574 2010-11-15 Nicola Pero <nicola.pero@meta-innovation.com>
10576 * c-common.h (objc_build_incr_expr_for_property_ref): New.
10577 * stub-objc.c (objc_build_incr_expr_for_property_ref): New.
10579 2010-11-15 Nathan Froyd <froydnj@codesourcery.com>
10581 PR preprocessor/45038
10582 * c-cppbuiltin.c (c_cpp_builtins): Use different format for C++
10585 2010-11-12 Joseph Myers <joseph@codesourcery.com>
10587 * c-common.h (c_family_lang_mask): Declare.
10588 * c-opts.c (c_family_lang_mask): Make extern.
10589 * c-pragma.c (handle_pragma_diagnostic): Use
10590 control_warning_option.
10592 2010-11-12 Joseph Myers <joseph@codesourcery.com>
10594 * c-common.c (parse_optimize_options): Update call to
10596 * c-common.h (c_common_handle_option): Update prototype.
10597 * c-opts.c (c_common_handle_option): Take location_t parameter and
10598 pass it to other functions.
10600 2010-11-11 Joseph Myers <joseph@codesourcery.com>
10602 * c-opts.c (warning_as_error_callback): Remove.
10603 (c_common_initialize_diagnostics): Don't call
10604 register_warning_as_error_callback.
10605 (c_common_handle_option): Handle -Werror=normalized= here.
10607 2010-11-10 Joseph Myers <joseph@codesourcery.com>
10609 * c-common.c (handle_mode_attribute): Use %' and word "signedness"
10611 * c-opts.c (c_common_parse_file): Start diagnostics with lowercase
10613 * c-pragma.c (handle_pragma_target, handle_pragma_optimize):
10614 Remove trailing '.' from diagnostics.
10615 * c.opt (Wwrite-strings_: Avoid '`' in help text.
10617 2010-11-10 Joseph Myers <joseph@codesourcery.com>
10619 * c-common.c (parse_optimize_options): Pass global_dc to
10621 * c-opts.c (c_common_handle_option): Pass &global_options to
10622 set_Wstrict_aliasing.
10623 * c.opt (v): Don't mark Common or document here.
10625 2010-11-06 Iain Sandoe <iains@gcc.gnu.org>
10628 * c-format.c (format_type): New type gcc_objc_string_format_type.
10629 (valid_stringptr_type_p): New.
10630 (handle_format_arg_attribute): Use valid_stringptr_type_p ().
10631 (check_format_string): Pass expected type, use
10632 valid_stringptr_type_p (), check that the format string types are
10633 consistent with the format specification.
10634 (decode_format_attr): Warn if NSString is used outside objective-c.
10635 (format_types_orig): Add NSString.
10636 (format_name): New.
10637 (format_flags): New.
10638 (check_format_arg): Handle format strings requiring an external parser.
10639 first_target_format_type: New variable.
10640 (handle_format_attribute): Set up first_target_format_type, pass the
10641 expected format arg string type to check_format_string().
10642 * c-common.h (FMT_FLAG_PARSE_ARG_CONVERT_EXTERNAL): New flag.
10643 * stub-objc.c (objc_string_ref_type_p): New.
10644 (objc_check_format_arg): New.
10646 2010-11-04 Nicola Pero <nicola.pero@meta-innovation.com>
10648 Fixed using the Objective-C 2.0 dot-syntax with class names.
10649 * c-common.h (objc_build_class_component_ref): New.
10650 * stub-objc.c (objc_build_class_component_ref): New.
10652 2010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
10654 * c.opt (Wproperty-assign-default): New option.
10656 2010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
10658 Implemented -fobjc-std=objc1 flag.
10659 * c.opt (fobjc-std=objc1): New option.
10661 2010-11-01 Nicola Pero <nicola.pero@meta-innovation.com>
10663 Implemented format and noreturn attributes for Objective-C methods.
10664 * c-common.c (handle_noreturn_attribute): Recognize 'noreturn'
10665 attribute for Objective-C methods.
10667 2010-10-31 Jason Merrill <jason@redhat.com>
10669 * c-common.c (conversion_warning, warn_for_collisions_1): Use
10672 2010-10-30 Nicola Pero <nicola.pero@meta-innovation.com>
10674 Implemented Objective-C 2.0 @property, @synthesize and @dynamic.
10675 * c-common.h (enum rid): Removed RID_COPIES and RID_IVAR.
10676 (objc_add_property_declaration): Removed arguments for copies and
10678 (objc_build_getter_call): Renamed to
10679 objc_maybe_build_component_ref.
10680 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
10681 (objc_is_property_ref): New.
10682 * c-common.c (c_common_reswords): Removed copies and ivar.
10683 * stub-objc.c (objc_add_property_declaration): Removed arguments
10684 for copies and ivar.
10685 (objc_build_getter_call): Renamed to
10686 objc_maybe_build_component_ref.
10687 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
10688 (objc_is_property_ref): New.
10690 2010-10-29 Arnaud Charlet <charlet@adacore.com>
10691 Matthew Gingell <gingell@adacore.com>
10693 * c-ada-spec.c (separate_class_package): New function.
10694 (pp_ada_tree_identifier): Prefix references to C++ classes with the
10695 name of their enclosing package.
10696 (print_ada_declaration): Use separate_class_package.
10698 2010-10-27 Jason Merrill <jason@redhat.com>
10700 * c-common.c (c_common_reswords): Add __is_literal_type.
10701 * c-common.h (enum rid): Add RID_IS_LITERAL_TYPE.
10703 * c-common.c (check_case_value): Remove special C++ code.
10705 2010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
10707 * c-common.h (enum rid): Added RID_READWRITE, RID_ASSIGN,
10708 RID_RETAIN, RID_COPY and RID_NONATOMIC. Updated RID_FIRST_PATTR
10709 and RID_LAST_PATTR.
10710 (objc_add_property_declaration): Added additional arguments.
10711 (objc_property_attribute_kind): Removed.
10712 (objc_set_property_attr): Removed.
10713 * c-common.c (c_common_reswords): Added readwrite, assign, retain,
10714 copy and nonatomic.
10715 * stub-objc.c (objc_add_property_declaration): Added additional
10717 (objc_set_property_attr): Removed.
10719 2010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
10721 * c-common.h (objc_add_property_variable): Renamed to
10722 objc_add_property_declaration. Added location argument.
10723 * stub-objc.c (objc_add_property_variable): Same change.
10725 2010-10-23 Nicola Pero <nicola.pero@meta-innovation.com>
10727 * c-common.h (objc_maybe_printable_name): New.
10728 * stub-objc.c (objc_maybe_printable_name): New.
10730 2010-10-22 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
10731 Andrew Pinski <pinskia@gmail.com>
10733 * c-common.h (c_common_mark_addressable_vec): Declare.
10734 * c-common.c (c_common_mark_addressable_vec): New function.
10736 2010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
10738 * c-common.h (objc_set_method_type): Removed.
10739 (objc_add_method_declaration): Added boolean argument.
10740 (objc_start_method_definition): Same change.
10741 (objc_build_method_signature): Same change.
10742 * stub-objc.c (objc_set_method_type): Removed.
10743 (objc_add_method_declaration): Added boolean argument.
10744 (objc_start_method_definition): Same change.
10745 (objc_build_method_signature): Same change.
10747 2010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
10749 * c-common.h (finish_file): Removed.
10750 (objc_write_global_declarations): New.
10751 * c-opts.c (c_common_parse_file): Do not call finish_file.
10752 * stub-objc.c (objc_write_global_declarations): New.
10754 2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
10756 Implemented parsing @synthesize and @dynamic for
10757 Objective-C/Objective-C++.
10758 * c-common.h (enum rid): Add RID_AT_SYNTHESIZE and RID_AT_DYNAMIC.
10759 (objc_add_synthesize_declaration): New.
10760 (objc_add_dynamic_declaration): New.
10761 * c-common.c (c_common_reswords): Add synthesize and dynamic.
10762 * stub-objc.c (objc_add_synthesize_declaration): New.
10763 (objc_add_dynamic_declaration): New.
10765 2010-10-18 Michael Meissner <meissner@linux.vnet.ibm.com>
10768 * c-cppbuiltin.c (mode_has_fma): Move function here from
10769 builtins.c. Don't use the fma optab, instead just use the
10770 HAVE_fma* macros, so that __FP_FAST_FMA* will be defined when
10773 2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
10775 Merge from 'apple/trunk' branch on FSF servers.
10777 2005-11-08 Fariborz Jahanian <fjahanian@apple.com>
10780 * c-common.h (objc_non_volatilized_type): New declaration
10781 * stub-objc.c (objc_non_volatilized_type): New stub.
10783 2010-10-17 Nicola Pero <nicola.pero@meta-innovation.com>
10785 Merge from 'apple/trunk' branch on FSF servers.
10787 2006-03-27 Fariborz Jahanian <fjahanian@apple.com>
10790 * c-common.h (objc_diagnose_private_ivar): New decl.
10791 * stub-objc.c (objc_diagnose_private_ivar): New stub.
10793 2010-10-17 Iain Sandoe <iains@gcc.gnu.org>
10795 * c-common.c (c_common_reswords): Add package, RID_AT_PACKAGE.
10796 * c-common.h (enum rid): Add RID_AT_PACKAGE.
10797 (objc_ivar_visibility_kind): New enum.
10798 (objc_set_visibility): Adjust prototype to use visibility enum.
10799 * stub-objc.c (objc_set_visibility): Adjust stub to use
10802 2010-10-14 Michael Meissner <meissner@linux.vnet.ibm.com>
10804 * c-cppbuiltin.c (builtin_define_float_constants): Emit
10805 __FP_FAST_FMA, __FP_FAST_FMAF, and __FP_FAST_FMAL if the machine
10806 has the appropriate fma builtins.
10807 (c_cpp_builtins): Adjust call to builtin_define_float_constants.
10809 2010-10-14 Iain Sandoe <iains@gcc.gnu.org>
10811 merge from FSF apple 'trunk' branch.
10812 2006 Fariborz Jahanian <fjahanian@apple.com>
10814 Radars 4436866, 4505126, 4506903, 4517826
10815 * c-common.c (c_common_resword): Define @property and its attributes.
10816 * c-common.h: Define property attribute enum entries.
10817 (OBJC_IS_PATTR_KEYWORD): New.
10818 (objc_property_attribute_kind): New enum.
10819 Declare objc_set_property_attr (), objc_add_property_variable (),
10820 objc_build_getter_call () and objc_build_setter_call ().
10821 * stub-objc.c (objc_set_property_attr): New stub.
10822 (objc_add_property_variable): Likewise.
10823 (objc_build_getter_call): Likewise.
10824 (objc_build_setter_call) Likewise.
10826 2010-10-13 Iain Sandoe <iains@gcc.gnu.org>
10828 merge from FSF apple 'trunk' branch.
10829 2006-04-26 Fariborz Jahanian <fjahanian@apple.com>
10831 Radar 3803157 (method attributes)
10832 * c-common.c (handle_deprecated_attribute): Recognize
10833 objc methods as valid declarations.
10834 * c-common.h: Declare objc_method_decl ().
10835 * stub-objc.c (objc_method_decl): New stub.
10837 2010-10-08 Joseph Myers <joseph@codesourcery.com>
10839 * c-common.c (parse_optimize_options): Call
10840 decode_cmdline_options_to_array_default_mask before
10841 decode_options. Update arguments to decode_options.
10842 * c-common.h (c_common_init_options_struct): Declare.
10843 * c-opts.c (c_common_init_options_struct): New. Split out from
10844 c_common_init_options.
10846 2010-10-06 Nicola Pero <nicola.pero@meta-innovation.com>
10848 Implemented fast enumeration for Objective-C.
10849 * c-common.h (objc_finish_foreach_loop): New.
10850 * stub-objc.c (objc_finish_foreach_loop): New.
10852 2010-10-05 Joseph Myers <joseph@codesourcery.com>
10854 * c-common.h (struct diagnostic_context): Don't declare here.
10855 (c_common_initialize_diagnostics): Declare using
10856 diagnostic_context typedef.
10857 * c-opts.c (c_common_handle_option): Pass global_dc to
10858 handle_generated_option.
10860 2010-10-04 Joseph Myers <joseph@codesourcery.com>
10862 * c-opts.c (c_common_handle_option): Pass &global_options_set to
10863 handle_generated_option.
10865 2010-10-03 Ian Lance Taylor <iant@google.com>
10867 * c.opt (-fplan9-extensions): New option.
10869 2010-10-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
10871 * c-cppbuiltin.c (define__GNUC__, builtin_define_type_precision):
10873 (c_cpp_builtins): Call functions from cppbuiltin.c instead
10874 of duplicating code.
10876 2010-09-30 Iain Sandoe <iains@gcc.gnu.org>
10878 * c-common.c: Add two new entries for @optional
10879 and @required keywords.
10881 merge from FSF 'apple/trunk' branch.
10882 2006-01-30 Fariborz Jahanian <fjahanian@apple.com>
10885 * c-common.h (RID_AT_OPTIONAL, RID_AT_REQUIRED): Two new
10886 objective-c keywords.
10887 (objc_set_method_opt): New declaration.
10888 * stub-objc.c (objc_set_method_opt): New stub.
10890 2010-09-30 Joseph Myers <joseph@codesourcery.com>
10892 * c-common.c (handle_optimize_attribute): Pass &global_options to
10893 cl_optimization_save and cl_optimization_restore.
10894 * c-opts.c (c_common_handle_option): Pass &global_options to
10895 handle_generated_option.
10896 * c-pragma.c (handle_pragma_diagnostic): Use option_flag_var.
10897 (handle_pragma_pop_options, handle_pragma_reset_options): Pass
10898 &global_options to cl_optimization_restore.
10900 2010-09-30 Nicola Pero <nicola.pero@meta-innovation.com>
10902 * c-lex.c (c_lex_with_flags): Updated comments for CPP_AT_NAME
10903 Objective-C/Objective-C++ keywords.
10905 2010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
10907 Merge from 'apple/trunk' branch on FSF servers.
10909 2005-10-04 Fariborz Jahanian <fjahanian@apple.com>
10912 * c-common.h (objc_check_global_decl): New declaration.
10913 * stub-objc.c (objc_check_global_decl): New stub.
10915 2010-09-29 Joseph Myers <joseph@codesourcery.com>
10917 * c.opt: Don't use VarExists.
10919 2010-09-29 Joseph Myers <joseph@codesourcery.com>
10921 * c-common.c (c_cpp_error): Update names of diagnostic_context
10923 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Update names of
10924 cl_optimization members.
10925 * c-opts.c (warning_as_error_callback, c_common_handle_option,
10926 sanitize_cpp_opts, finish_options): Update names of cpp_options
10929 2010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
10931 * c-common.h (OBJC_IS_CXX_KEYWORD): New macro. Updated comments.
10932 (objc_is_reserved_word): Removed.
10933 * c-common.c: Updated comments.
10934 * c-lex.c (c_lex_with_flags): Use OBJC_IS_CXX_KEYWORD instead of
10935 objc_is_reserved_word.
10936 * stub-objc.c (objc_is_reserved_word): Removed.
10938 2010-09-28 Iain Sandoe <iains@gcc.gnu.org>
10940 * c-common.h (objc_add_method_declaration): Adjust prototype to
10941 include attributes.
10942 (objc_start_method_definition): Likewise.
10943 (objc_build_keyword_decl): Likewise.
10944 * stub-objc.c:(objc_add_method_declaration): Handle attributes.
10945 (objc_start_method_definition): Likewise.
10946 (objc_build_keyword_decl): Likewise.
10948 2010-09-28 Iain Sandoe <iains@gcc.gnu.org>
10950 * c-common.h (objc_start_class_interface): Adjust prototype.
10951 (objc_start_category_interface): Likewise.
10952 (objc_start_protocol): Likewise.
10953 * stub-objc.c (objc_start_protocol): Adjust for extra argument.
10954 (objc_start_class_interface): Likewise.
10955 (objc_start_category_interface): Likewise.
10957 2010-09-27 Ian Lance Taylor <iant@google.com>
10959 * c-common.c (c_common_attribute_table): Add no_split_stack.
10960 (handle_no_split_stack_attribute): New static function.
10962 2010-09-27 Nicola Pero <nicola.pero@meta-innovation.com>
10964 Merge from 'apple/trunk' branch on FSF servers.
10966 2005-12-15 Fariborz Jahanian <fjahanian@apple.com>
10969 * c-common.h (objc_have_common_type): New declaration.
10970 * stub-objc.c (objc_have_common_type): New stub.
10972 2005-06-22 Ziemowit Laski <zlaski@apple.com>
10975 * c-common.h (objc_common_type): New prototype.
10976 * stub-objc.c (objc_common_type): New stub.
10978 2010-09-24 Jan Hubicka <jh@suse.cz>
10980 * c-common.c (handle_leaf_attribute): New function.
10981 (struct attribute_spec c_common_att): Add leaf.
10983 2010-09-22 Joseph Myers <joseph@codesourcery.com>
10985 * c.opt (-all-warnings, -ansi, -assert, -assert=, -comments,
10986 -comments-in-macros, -define-macro, -define-macro=, -dependencies,
10987 -dump, -dump=, -imacros, -imacros=, -include, -include=,
10988 -include-barrier, -include-directory, -include-directory=,
10989 -include-directory-after, -include-directory-after=,
10990 -include-prefix, -include-prefix=, -include-with-prefix,
10991 -include-with-prefix=, -include-with-prefix-after,
10992 -include-with-prefix-after=, -include-with-prefix-before,
10993 -include-with-prefix-before=, -no-integrated-cpp,
10994 -no-line-commands, -no-standard-includes, -no-warnings, -output,
10995 -output=, -pedantic, -pedantic-errors, -preprocess,
10996 -print-missing-file-dependencies, -trace-includes, -traditional,
10997 -traditional-cpp, -trigraphs, -undefine-macro, -undefine-macro=,
10998 -user-dependencies, -verbose, -write-dependencies,
10999 -write-user-dependencies, no-integrated-cpp, traditional): New.
11001 2010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
11004 * c-common.h (objc_start_method_definition): Return bool instead
11006 * stub-objc.c (objc_start_method_definition): Return bool instead
11009 2010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
11012 * c-common.h (objc_get_interface_ivars): New declaration.
11013 * stub-objc.c (objc_get_interface_ivars): New stub.
11015 2010-09-15 Ian Lance Taylor <iant@google.com>
11017 * c-common.c (parse_optimize_options): Do not capitalize warning
11018 messages. Remove period at end of warning message.
11020 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
11022 * c-common.c (handle_alias_ifunc_attribute): New, broken out of ...
11023 (handle_alias_attribute): ... here.
11024 (handle_ifunc_attribute): New.
11026 2010-09-06 Mark Mitchell <mark@codesourcery.com>
11028 * c-common.h (do_warn_double_promotion): Declare.
11029 * c-common.c (do_warn_double_promotion): Define.
11031 2010-09-05 Mark Mitchell <mark@codesourcery.com>
11033 * c.opt (Wdouble-promotion): New.
11035 2010-09-02 Joseph Myers <joseph@codesourcery.com>
11037 * c.opt (falt-external-templates, fhuge-objects, fvtable-gc,
11038 fvtable-thunks, fxref): Mark no longer supported in help text.
11040 2010-09-02 Joseph Myers <joseph@codesourcery.com>
11042 * c.opt (Wimport, fall-virtual, falt-external-templates,
11043 fdefault-inline, fenum-int-equiv, fexternal-templates,
11044 fguiding-decls, fhonor-std, fhuge-objects, flabels-ok,
11045 fname-mangling-version-, fnew-abi, fnonnull-objects,
11046 foptional-diags, fsquangle, fstrict-prototype, fthis-is-variable,
11047 fvtable-gc, fvtable-thunks, fxref): Mark with Ignore and Warn as
11049 (fhandle-exceptions): Mark with Alias and Warn.
11050 * c-opts.c (c_common_handle_option): Don't handle options marked
11053 2010-09-02 Joseph Myers <joseph@codesourcery.com>
11055 * c.opt (Wcomments, Werror-implicit-function-declaration,
11056 ftemplate-depth-, std=c89, std=c9x, std=gnu89, std=gnu9x,
11057 std=iso9899:1990, std=iso9899:1999, std=iso9899:199x): Mark as
11059 * c-common.c (option_codes): Use OPT_Wcomment instead of
11061 * c-opts.c (warning_as_error_callback, c_common_handle_option):
11062 Don't handle options marked as aliases.
11064 2010-08-25 Richard Guenther <rguenther@suse.de>
11066 * c-common.c (c_common_get_alias_set): Remove special
11067 handling for pointers.
11069 2010-08-20 Nathan Froyd <froydnj@codesourcery.com>
11071 * c-common.c: Use FOR_EACH_VEC_ELT.
11072 * c-gimplify.c: Likewise.
11073 * c-pragma.c: Likewise.
11075 2010-08-16 Joseph Myers <joseph@codesourcery.com>
11077 * c.opt (MDX): Change back to MD. Mark NoDriverArg instead of
11079 (MMDX): Change back to MMD. Mark NoDriverArg instead of
11081 * c-opts.c (c_common_handle_option): Use OPT_MD and OPT_MMD
11082 instead of OPT_MDX and OPT_MMDX.
11084 2010-08-16 Joseph Myers <joseph@codesourcery.com>
11086 * c.opt (MDX, MMDX, lang-asm): Mark RejectDriver.
11088 2010-08-12 Joseph Myers <joseph@codesourcery.com>
11090 * c.opt (MD, MMD): Change to MDX and MMDX.
11091 * c-opts.c (c_common_handle_option): Use OPT_MMD and OPT_MMDX.
11093 2010-08-11 Joseph Myers <joseph@codesourcery.com>
11095 * c-opts.c (c_common_handle_option): Call handle_generated_option
11096 instead of handle_option.
11098 2010-08-08 Nathan Froyd <froydnj@codesourcery.com>
11100 * c-pragma.c (add_to_renaming_pragma_list): Fix call to VEC_safe_push.
11101 (maybe_apply_renaming_pragma): Delete unneeded declarations.
11103 2010-08-08 Nathan Froyd <froydnj@codesourcery.com>
11105 * c-pragma.c (pending_redefinition): Declare. Declare a VEC of it.
11106 (pending_redefine_extname): Change type to a VEC.
11107 (add_to_renaming_pragma_list): Update for new type of
11108 pending_redefine_extname.
11109 (maybe_apply_renaming_pragma): Likewise.
11111 2010-08-04 Arnaud Charlet <charlet@adacore.com>
11113 * c-ada-spec.c (dump_ada_template): Mark underlying instance type as
11115 (dump_generic_ada_node): Code clean up. Use TREE_VISITED flag to
11116 decide whether a type has already been declared/seen.
11117 Do not go to the original type.
11118 (dump_nested_types): New parameter forward.
11119 Generate forward declaration if needed and mark type as visited.
11120 (print_ada_declaration): Call dump_nested_types if not already done.
11121 Mark types as visited.
11123 2010-08-03 Joseph Myers <joseph@codesourcery.com>
11125 * c.opt (-print-pch-checksum): Remove option.
11126 * c-opts.c (c_common_handle_option): Don't handle
11127 OPT_print_pch_checksum.
11129 2010-07-27 Joseph Myers <joseph@codesourcery.com>
11131 * c-common.h (c_common_handle_option): Update prototype and return
11133 * c-opts.c (c_common_handle_option): Update prototype and return
11134 value type. Update calls to handle_option and
11135 enable_warning_as_error.
11137 2010-07-27 Jakub Jelinek <jakub@redhat.com>
11140 * c-pretty-print.c (pp_c_expression): Handle C_MAYBE_CONST_EXPR.
11142 2010-07-27 Joseph Myers <joseph@codesourcery.com>
11144 * c-common.h (c_common_missing_argument): Remove.
11145 * c-opts.c (c_common_missing_argument): Remove.
11146 * c.opt (A, D, F, I, MD, MMD, MQ, MT, U, fconstant-string-class=,
11147 idirafter, imacros, include, isysroot, isystem, iquote): Add
11149 * c-objc-common.h (LANG_HOOKS_MISSING_ARGUMENT): Remove.
11151 2010-07-27 Joseph Myers <joseph@codesourcery.com>
11153 * c-common.h (c_common_option_lang_mask,
11154 c_common_initialize_diagnostics, c_common_complain_wrong_lang_p):
11156 (c_common_init_options): Update prototype.
11157 * c-opts.c (c_common_option_lang_mask): New.
11158 (c_common_initialize_diagnostics): Split out of
11159 c_common_init_options.
11160 (accept_all_c_family_options, c_common_complain_wrong_lang_p):
11162 (c_common_init_options): Update prototype. Use decoded options in
11163 search for -lang-asm.
11165 2010-07-15 Nathan Froyd <froydnj@codesourcery.com>
11167 * c-common.c: Carefully replace TREE_CHAIN with DECL_CHAIN.
11168 * c-format.c: Likewise.
11170 2010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
11172 * c-common.h: Include diagnostic-core.h. Error if already
11174 * c-semantics.c: Do not define GCC_DIAG_STYLE here.
11176 2010-07-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
11178 * c-common.c (IN_GCC_FRONTEND): Do not undef.
11179 Do not include expr.h
11180 (vector_mode_valid_p): Move here.
11182 2010-06-21 DJ Delorie <dj@redhat.com>
11184 * c-pragma.c (handle_pragma_diagnostic): Add push/pop,
11185 allow these pragmas anywhere.
11187 2010-06-14 Jakub Jelinek <jakub@redhat.com>
11190 * c-cppbuiltin.c: Include gt-c-family-c-cppbuiltin.h.
11191 (lazy_hex_fp_values, lazy_hex_fp_value_count): Add GTY(()) markers.
11192 (lazy_hex_fp_value, builtin_define_with_hex_fp_value): Use
11193 ggc_strdup instead of xstrdup.
11195 2010-06-10 Jakub Jelinek <jakub@redhat.com>
11197 * c-cppbuiltin.c: Include cpp-id-data.h.
11198 (lazy_hex_fp_values, lazy_hex_fp_value_count): New variables.
11199 (lazy_hex_fp_value): New function.
11200 (builtin_define_with_hex_fp_value): Provide definitions lazily.
11202 2010-06-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
11204 * c-gimplify.c: Do not include tree-flow.h
11206 2010-06-29 Joern Rennecke <joern.rennecke@embecosm.com>
11209 * c-common.c: Rename targetm member:
11210 targetm.enum_va_list -> targetm.enum_va_list_p
11212 2010-06-28 Anatoly Sokolov <aesok@post.ru>
11214 * c-common.c (shorten_compare): Adjust call to force_fit_type_double.
11216 2010-06-28 Steven Bosscher <steven@gcc.gnu.org>
11218 * c-cppbuiltin.c: Do not include except.h.
11220 2010-06-24 Andi Kleen <ak@linux.intel.com>
11222 * c-common.c (warn_for_omitted_condop): New.
11223 * c-common.h (warn_for_omitted_condop): Add prototype.
11225 2010-06-21 Joseph Myers <joseph@codesourcery.com>
11227 * c.opt (lang-objc): Remove.
11228 * c-opts.c (c_common_handle_option): Don't handle OPT_lang_objc.
11230 2010-06-21 Joern Rennecke <joern.rennecke@embecosm.com>
11232 * c-opts.c: Include "tm_p.h".
11234 2010-06-20 Joseph Myers <joseph@codesourcery.com>
11236 * c-common.c (parse_optimize_options): Update call to
11239 2010-06-18 Nathan Froyd <froydnj@codesourcery.com>
11241 * c-common.c (record_types_used_by_current_var_decl): Adjust for
11242 new type of types_used_by_cur_var_decl.
11244 2010-06-17 Joern Rennecke <joern.rennecke@embecosm.com>
11247 * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Add cast
11248 for C++ standard compliance.
11250 2010-06-16 Jason Merrill <jason@redhat.com>
11252 * c.opt: Add -Wnoexcept.
11254 2010-06-16 Richard Guenther <rguenther@suse.de>
11257 * c-common.c (c_common_truthvalue_conversion): Remove
11258 premature and wrong optimization concering ADDR_EXPRs.
11260 2010-06-15 Arnaud Charlet <charlet@adacore.com>
11262 * c-ada-spec.c (dump_sloc): Remove column info.
11263 (is_simple_enum): New function.
11264 (dump_generic_ada_node, print_ada_declaration): Map C enum types to Ada
11265 enum types when relevant.
11267 2010-06-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
11269 * c-common.c (conversion_warning): Warn at expression
11272 2010-06-10 Joseph Myers <joseph@codesourcery.com>
11274 * c-opts.c (c_common_handle_option): Don't handle
11277 2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
11279 * c-pragma.c (push_alignment): Use typed GC allocation.
11280 (handle_pragma_push_options): Likewise.
11282 * c-common.c (parse_optimize_options): Likewise.
11284 * c-common.h (struct sorted_fields_type): Add variable_size GTY
11287 2010-06-07 Joseph Myers <joseph@codesourcery.com>
11289 * c-common.c (flag_preprocess_only, flag_undef, flag_no_builtin,
11290 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
11291 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
11292 flag_signed_bitfields, warn_strict_null_sentinel,
11293 flag_nil_receivers, flag_zero_link, flag_replace_objc_classes,
11294 flag_gen_declaration, flag_no_gnu_keywords,
11295 flag_implement_inlines, flag_implicit_templates,
11296 flag_implicit_inline_templates, flag_optional_diags,
11297 flag_elide_constructors, flag_default_inline, flag_rtti,
11298 flag_conserve_space, flag_access_control, flag_check_new,
11299 flag_new_for_scope, flag_weak, flag_working_directory,
11300 flag_use_cxa_atexit, flag_use_cxa_get_exception_ptr,
11301 flag_enforce_eh_specs, flag_threadsafe_statics,
11302 flag_pretty_templates): Remove.
11303 * c-common.h (flag_preprocess_only, flag_nil_receivers,
11304 flag_objc_exceptions, flag_objc_sjlj_exceptions, flag_zero_link,
11305 flag_replace_objc_classes, flag_undef, flag_no_builtin,
11306 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
11307 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
11308 flag_const_strings, flag_signed_bitfields, flag_gen_declaration,
11309 flag_no_gnu_keywords, flag_implement_inlines,
11310 flag_implicit_templates, flag_implicit_inline_templates,
11311 flag_optional_diags, flag_elide_constructors, flag_default_inline,
11312 flag_rtti, flag_conserve_space, flag_access_control,
11313 flag_check_new, flag_new_for_scope, flag_weak,
11314 flag_working_directory, flag_use_cxa_atexit,
11315 flag_use_cxa_get_exception_ptr, flag_enforce_eh_specs,
11316 flag_threadsafe_statics, flag_pretty_templates,
11317 warn_strict_null_sentinel): Remove.
11318 * c.opt (E, Wstrict-null-sentinel, faccess-control, fasm,
11319 fbuiltin, fcheck-new, fconserve-space, felide-constructors,
11320 fenforce-eh-specs, ffor-scope, fgnu-keywords, fimplement-inlines,
11321 fimplicit-inline-templates, fimplicit-templates,
11322 flax-vector-conversions, fms-extensions, fnil-receivers,
11323 fnonansi-builtins, fpretty-templates, freplace-objc-classes,
11324 frtti, fshort-double, fshort-enums, fshort-wchar,
11325 fsigned-bitfields, fsigned-char, fstats, fthreadsafe-statics,
11326 funsigned-bitfields, funsigned-char, fuse-cxa-atexit,
11327 fuse-cxa-get-exception-ptr, fweak, fworking-directory, fzero-link,
11328 gen-decls, undef): Use Var.
11329 (fdefault-inline, foptional-diags): Document as doing nothing.
11330 * c-opts.c (c_common_handle_option): Remove cases for options now
11331 using Var. Mark ignored options as such.
11333 2010-06-05 Steven Bosscher <steven@gcc.gnu.org>
11335 * c-common.c: Moved to here from parent directory.
11336 * c-common.def: Likewise.
11337 * c-common.h: Likewise.
11338 * c-cppbuiltin.c: Likewise.
11339 * c-dump.c: Likewise.
11340 * c-format.c: Likewise.
11341 * c-format.h : Likewise.
11342 * c-gimplify.c: Likewise.
11343 * c-lex.c: Likewise.
11344 * c-omp.c: Likewise.
11346 * c-opts.c: Likewise.
11347 * c-pch.c: Likewise.
11348 * c-ppoutput.c: Likewise.
11349 * c-pragma.c: Likewise.
11350 * c-pragma.h: Likewise.
11351 * c-pretty-print.c: Likewise.
11352 * c-pretty-print.h: Likewise.
11353 * c-semantics.c: Likewise.
11354 * stub-objc.c: Likewise.
11356 * c-common.c: Include gt-c-family-c-common.h.
11357 * c-pragma.c: Include gt-c-family-c-pragma.h.
11359 Copyright (C) 2010-2020 Free Software Foundation, Inc.
11361 Copying and distribution of this file, with or without modification,
11362 are permitted in any medium without royalty provided the copyright
11363 notice and this notice are preserved.