1 2019-01-01 Jakub Jelinek <jakub@redhat.com>
3 Update copyright years.
5 2018-12-20 H.J. Lu <hongjiu.lu@intel.com>
8 * c-common.h (warn_for_address_or_pointer_of_packed_member): New.
9 * c-warn.c (check_alignment_of_packed_member): New function.
10 (check_address_of_packed_member): Likewise.
11 (check_and_warn_address_of_packed_member): Likewise.
12 (warn_for_address_or_pointer_of_packed_member): Likewise.
13 * c.opt: Add -Wno-address-of-packed-member.
15 2018-12-20 David Malcolm <dmalcolm@redhat.com>
18 * c-warn.c (get_outermost_macro_expansion): New function.
19 (spelled_the_same_p): Use it to unwind the macro expansions, and
20 compare the outermost macro in each nested expansion, rather than
23 2018-12-19 David Malcolm <dmalcolm@redhat.com>
26 * c-common.h (warn_tautological_cmp): Convert 1st param from
27 location_t to const op_location_t &.
28 * c-warn.c (find_array_ref_with_const_idx_r): Call fold_for_warn
29 when testing for INTEGER_CST.
30 (warn_tautological_bitwise_comparison): Convert 1st param from
31 location_t to const op_location_t &; use it to build a
32 binary_op_rich_location, and use this.
33 (spelled_the_same_p): New function.
34 (warn_tautological_cmp): Convert 1st param from location_t to
35 const op_location_t &. Warn for macro expansions if
36 spelled_the_same_p. Use binary_op_rich_location.
38 2018-12-19 David Malcolm <dmalcolm@redhat.com>
42 * c-common.c (unsafe_conversion_p): Fold any location wrapper.
43 (verify_tree): Handle location wrappers.
44 (c_common_truthvalue_conversion): Strip any location wrapper.
46 (fold_offsetof): Strip any location wrapper.
47 (complete_array_type): Likewise for initial_value.
48 (convert_vector_to_array_for_subscript): Call fold_for_warn on the
49 index before checking for INTEGER_CST.
50 * c-pretty-print.c (c_pretty_printer::primary_expression): Don't
51 print parentheses around location wrappers.
52 * c-warn.c (warn_logical_operator): Call fold_for_warn on op_right
53 before checking for INTEGER_CST.
54 (warn_tautological_bitwise_comparison): Call
55 tree_strip_any_location_wrapper on lhs, rhs, and bitop's operand
56 before checking for INTEGER_CST.
57 (readonly_error): Strip any location wrapper.
58 (warn_array_subscript_with_type_char): Strip location wrappers
59 before checking for INTEGER_CST. Use the location of the index if
62 2018-12-06 Jason Merrill <jason@redhat.com>
64 PR c++/88136 - -Wdeprecated-copy false positives
65 * c.opt (Wdeprecated-copy-dtor): New.
66 (Wdeprecated-copy): Move to -Wextra.
68 2018-11-29 Martin Sebor <msebor@redhat.com>
72 * c-attribs.c (common_handle_aligned_attribute): Silently avoid setting
73 alignments to values less than the target requires.
74 (has_attribute): For attribute aligned consider both the attribute
75 and the alignment bits.
76 * c-common.c (c_init_attributes): Optionally issue a warning for
79 2018-11-28 Martin Sebor <msebor@redhat.com>
83 * c-warn.c (sizeof_pointer_memaccess_warning): Bail if source
84 or destination is an error.
86 2018-11-28 Jakub Jelinek <jakub@redhat.com>
89 * c-ubsan.c: Include langhooks.h.
90 (ubsan_instrument_division): Change gcc_assert that main variants
91 of op0 and op1 types are equal to gcc_checking_assert that the
92 main variants are compatible types.
94 2018-11-27 Eric Botcazou <ebotcazou@adacore.com>
96 * c-ada-spec.c: Include stringpool.h.
97 (has_static_fields): Return false for incomplete types.
98 (is_tagged_type): Likewise.
99 (has_nontrivial_methods): Likewise.
100 (dump_ada_node) <INTEGER_TYPE>: Deal specifically with __int128.
101 (struct overloaded_name_hash): New structure.
102 (struct overloaded_name_hasher): Likewise.
103 (overloaded_names): New global variable.
104 (init_overloaded_names): New static function.
105 (overloaded_name_p): New predicate.
106 (dump_ada_declaration) <TYPE_DECL>: Tidy up and set TREE_VISITED
107 on the TYPE_STUB_DECL of the original type of a typedef, if any.
108 <FUNCTION_DECL>: Bail out for an unsupported overloaded name.
109 Remove always-true condition and dump forward types.
110 (dump_ada_specs): Delete overloaded_names.
112 2018-11-20 Martin Sebor <msebor@redhat.com>
114 * c-attribs.c (type_for_vector_size): New function.
115 (type_valid_for_vector_size): Same.
116 (handle_vector_size_attribute): Move code to the functions above
118 (validate_attribute, has_attribute): New functions.
119 * c-common.h (has_attribute): Declare.
120 (rid): Add RID_HAS_ATTRIBUTE_EXPRESSION.
121 * c-common.c (c_common_resword): Same.
123 2018-11-16 Jason Merrill <jason@redhat.com>
125 * c-lex.c (c_common_has_attribute): Handle likely/unlikely.
126 * c-attribs.c (attr_cold_hot_exclusions): Make public.
128 2018-11-16 Jakub Jelinek <jakub@redhat.com>
131 * c-common.c (fix_string_type): Reject string literals larger than
132 TYPE_MAX_VALUE (ssizetype) bytes.
134 2018-11-15 Martin Sebor <msebor@redhat.com>
138 * c-attribs.c (positional_argument): New function.
139 (handle_alloc_size_attribute): Use it and simplify.
140 (handle_alloc_align_attribute): Same.
141 (handle_assume_aligned_attribute): Same.
142 (handle_nonnull_attribute): Same.
143 * c-common.c (check_function_arguments): Pass fntype to
144 check_function_format.
145 * c-common.h (check_function_format): Add an argument.
146 (PosArgFlags, positional_argument): Declare new type and function.
147 * c-format.c (decode_format_attr): Add arguments.
148 (check_format_string, get_constant): Same.
149 (convert_format_name_to_system_name): Adjust.
151 2018-11-15 David Malcolm <dmalcolm@redhat.com>
154 * c-opts.c (c_diagnostic_finalizer): Add diagnostic_t param.
156 2018-11-14 Jakub Jelinek <jakub@redhat.com>
158 P1236R1 - Signed integers are two's complement
159 * c-warn.c (maybe_warn_shift_overflow): Don't warn for c++2a.
160 * c-ubsan.c (ubsan_instrument_shift): Make signed shifts
161 with in-range second operand well defined for -std=c++2a.
164 * c-common.c (parse_optimize_options): Allocate option string from
165 opts_obstack rather than as GC memory. Move the allocation after
166 warning for invalid option.
168 2018-11-13 David Malcolm <dmalcolm@redhat.com>
170 * c-common.c (c_get_substring_location): Update for renaming of
171 get_source_location_for_substring to get_location_within_string.
172 * c-lex.c: Replace "source_location" with "location_t".
173 * c-opts.c: Likewise.
174 * c-ppoutput.c: Likewise.
176 2018-11-13 Martin Sebor <msebor@redhat.com>
179 * c-attribs.c (handle_copy_attribute): Exclude inlining attributes.
180 (handle_tls_model_attribute): Improve diagnostics.
182 2018-11-12 Jason Merrill <jason@redhat.com>
184 * c-cppbuiltin.c (c_cpp_builtins): Define
185 __cpp_impl_destroying_delete.
187 * c-cppbuiltin.c (c_cpp_builtins): Change __cpp_explicit_bool to
188 __cpp_conditional_explicit.
190 2018-11-09 Martin Sebor <msebor@redhat.com>
193 * c-attribs.c (handle_copy_attribute): New function.
195 2018-11-09 Martin Sebor <msebor@redhat.com>
198 * c-common.c (check_user_alignment): Use MAX_OFILE_ALIGNMENT.
200 2018-11-08 Jakub Jelinek <jakub@redhat.com>
202 * c-common.h (c_finish_omp_taskgroup): Add CLAUSES argument.
203 (c_finish_omp_atomic): Replace bool SEQ_CST argument with
204 enum omp_memory_order MEMORY_ORDER.
205 (c_finish_omp_flush): Add MO argument.
206 (c_omp_depend_t_p, c_finish_omp_depobj): Declare.
207 (c_finish_omp_for): Add FINAL_P argument.
208 * c-omp.c: Include memmodel.h.
209 (c_finish_omp_taskgroup): Add CLAUSES argument. Set
210 OMP_TASKGROUP_CLAUSES to it.
211 (c_finish_omp_atomic): Replace bool SEQ_CST argument with
212 enum omp_memory_order MEMORY_ORDER. Set OMP_ATOMIC_MEMORY_ORDER
213 instead of OMP_ATOMIC_SEQ_CST.
214 (c_omp_depend_t_p, c_finish_omp_depobj): New functions.
215 (c_finish_omp_flush): Add MO argument, if not MEMMODEL_LAST, emit
216 __atomic_thread_fence call with the given value.
217 (check_omp_for_incr_expr): Formatting fixes.
218 (c_finish_omp_for): Add FINAL_P argument. Allow NE_EXPR
219 even in OpenMP loops, diagnose if NE_EXPR and incr expression
220 is not constant expression 1 or -1. Transform NE_EXPR loops
221 with iterators pointers to VLA into LT_EXPR or GT_EXPR loops.
222 (c_omp_check_loop_iv_r): Look for orig decl of C++ range for
224 (c_omp_split_clauses): Add support for combined
225 #pragma omp parallel master and
226 #pragma omp {,parallel }master taskloop{, simd} constructs.
227 Handle OMP_CLAUSE_IN_REDUCTION. Handle OMP_CLAUSE_REDUCTION_TASK.
228 Handle OMP_CLAUSE_NONTEMPORAL. Handle splitting OMP_CLAUSE_IF
229 also to OMP_SIMD. Copy OMP_CLAUSE_LASTPRIVATE_CONDITIONAL.
230 (c_omp_predetermined_sharing): Don't return
231 OMP_CLAUSE_DEFAULT_SHARED for const qualified decls.
232 * c-pragma.c (omp_pragmas): Add PRAGMA_OMP_DEPOBJ and
234 * c-pragma.h (enum pragma_kind): Likewise.
235 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_NONTEMPORAL
236 and PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
238 2018-11-08 David Malcolm <dmalcolm@redhat.com>
240 * c-format.c (gcc_dump_printf_char_table): Add entry for %f.
242 2018-11-08 David Malcolm <dmalcolm@redhat.com>
244 * c-format.c (local_cgraph_node_ptr_node): New variable.
245 (gcc_dump_printf_char_table): Add entry for %C.
246 (get_pointer_to_named_type): New function, taken from the handling
247 code for "gimple *" from...
248 (init_dynamic_diag_info): ...here. Add handling for
250 * c-format.h (T_CGRAPH_NODE): New.
252 2018-10-19 Jason Merrill <jason@redhat.com>
254 * c-cppbuiltin.c (c_cpp_builtins): Add
255 __cpp_nontype_template_parameter_class.
257 2018-10-31 Nathan Sidwell <nathan@acm.org>
259 * c-opts.c (c_finish_options): Force command line macro
260 location. Refactor to avoid repeating main debug hook.
261 (push_command_line_include): Clarify comment.
263 * c-opts.c (c_finish_options): Adjust cpp_force_token_locations call.
265 2018-10-30 Martin Sebor <msebor@redhat.com>
268 * c-format.c (check_format_types): Avoid diagnosing null pointer
269 arguments to printf-family of functions.
271 2018-10-30 Marek Polacek <polacek@redhat.com>
273 Implement P0892R2, explicit(bool).
274 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_explicit_bool.
276 2018-10-29 David Malcolm <dmalcolm@redhat.com>
278 * name-hint.h (name_hint::take_deferred): New member function.
280 2018-10-29 David Malcolm <dmalcolm@redhat.com>
283 * c-common.c (check_function_sentinel): Call fold_for_warn on the
285 (check_function_restrict): Rename param "argarray" to
286 "unfolded_argarray", and make a copy named "argarray", calling
287 fold_for_warn on each argument.
288 (check_function_arguments): Add note about responsibility for
289 folding the arguments.
291 2018-10-17 Joseph Myers <joseph@codesourcery.com>
293 * c-common.c (flag_isoc2x): New variable.
294 * c-common.h (clk_c): Update comment to reference C2X.
295 (flag_isoc99, flag_isoc11): Update comments to reference future
296 standard versions in general.
297 (flag_isoc2x): Declare.
298 * c-opts.c (set_std_c2x): New function.
299 (c_common_handle_option): Handle -std=c2x and -std=gnu2x.
300 (set_std_c89, set_std_c99, set_std_c11, set_std_c17): Set
302 * c.opt (Wc11-c2x-compat, std=c2x, std=gnu2x): New options.
304 2018-10-17 Joseph Myers <joseph@codesourcery.com>
306 * c.opt (std=c17, std=c18, std=gnu17, std=gnu18, std=iso9899:2017)
307 (std=iso9899:2018): Document C17 as published in 2018.
309 2018-10-12 Christophe Lyon <christophe.lyon@linaro.org>
312 * c-pretty-print.c (c_pretty_printer::constant): Fix typo.
314 2018-10-11 Will Wray <wjwray@gmail.com>
317 * c-pretty-print.h (pp_c_type_cast): Prototype.
318 (pp_c_integer_constant): Likewise.
319 * c-pretty-print.c (pp_c_type_cast): No longer static.
320 (pp_c_integer_constant): Likewise.
321 (pp_c_enumeration_constant): Fix loop termination when finding
322 name of constant. No longer returns a value. Call
323 pp_c_integer_constant.
324 (c_pretty_printer::constant): Update for changes to
325 pp_c_enumeration_constant.
327 2018-10-11 Jakub Jelinek <jakub@redhat.com>
329 * c-lex.c (c_common_has_attribute): Return 201803 instead of 20180312
330 for no_unique_address.
332 2018-10-09 David Malcolm <dmalcolm@redhat.com>
334 * c-common.c (c_option_controlling_cpp_error): Rename to...
335 (c_option_controlling_cpp_diagnostic): ...this, and convert
336 "reason" from int to enum.
337 (c_cpp_error): Rename to...
338 (c_cpp_diagnostic): ...this, converting level and reason to enums.
339 * c-common.h (c_cpp_error): Rename to...
340 (c_cpp_diagnostic): ...this, converting level and reason to enums.
341 * c-opts.c (c_common_init_options): Update for renaming.
343 2018-10-08 Richard Sandiford <richard.sandiford@arm.com>
346 * c-common.c (vector_types_compatible_elements_p): Use
347 INTEGRAL_TYPE_P instead of checking only for INTEGER_TYPE.
349 2018-10-04 Vinay Kumar <vinay.kumar@blackfigtech.com>
351 * c-attribs.c (get_priority): Add a warning flag warn_prio_ctor_dtor
352 to generate constructor destructor priority warning.
353 * c.opt (-Wprio-ctor-dtor): New option.
355 2018-10-01 Jason Merrill <jason@redhat.com>
357 * c-lex.c (c_common_has_attribute): Add no_unique_address.
359 2018-10-01 Eric Botcazou <ebotcazou@adacore.com>
361 * c-ada-spec.c (get_underlying_decl): Get to the main type variant.
362 (dump_ada_node): Add const keyword.
364 2018-09-25 Martin Liska <mliska@suse.cz>
366 * c-common.c (c_common_truthvalue_conversion):
367 Remove Pascal from documentation.
369 2018-09-21 Eric Botcazou <ebotcazou@adacore.com>
371 * c-ada-spec.c: Include diagnostic.h.
372 (dump_ada_declaration) <RECORD_TYPE>: Issue a warning on packed layout.
374 2018-09-19 Marek Polacek <polacek@redhat.com>
376 * c.opt (Wclass-conversion): New.
378 2018-09-17 David Malcolm <dmalcolm@redhat.com>
380 * c-format.c (range_label_for_format_type_mismatch::get_text):
381 Update for new param.
383 2018-09-17 David Malcolm <dmalcolm@redhat.com>
385 * c-format.c (format_warning_at_char): Update for introduction of
386 format_string_diagnostic_t.
387 (format_type_warning): Likewise.
389 2018-09-17 Martin Jambor <mjambor@suse.cz>
392 * c.opt (Wabsolute-value): New.
394 2018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
396 * c-common.c (complete_flexible_array_elts): New helper function.
397 * c-common.h (complete_flexible_array_elts): Declare.
399 2018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
401 * c-common.c (braced_list_to_string): Remove eval parameter.
402 Add some more checks. Always create zero-terminated STRING_CST.
403 * c-common.h (braced_list_to_string): Adjust prototype.
405 2018-08-27 David Malcolm <dmalcolm@redhat.com>
408 * c-common.c (c_cpp_error): Update for conversion of show_caret_p
410 (maybe_suggest_missing_token_insertion): Likewise.
411 (maybe_add_include_fixit): Add param "override_location". If set,
412 and source-printing is enabled, then override the rich_location's
413 primary location with that of the insertion point for the fix-it
414 hint, marking it with SHOW_LINES_WITHOUT_RANGE.
415 * c-common.h (extern void maybe_add_include_fixit): Add bool
417 * c-format.c (selftest::test_type_mismatch_range_labels): Update
418 for conversion of show_caret_p to a tri-state.
419 * c-warn.c (warn_for_restrict): Likewise.
421 (suggest_missing_header::~suggest_missing_header): Update call to
422 maybe_add_include_fixit to suggest overriding the location, as it
425 2018-08-27 Martin Liska <mliska@suse.cz>
427 * c-common.c (check_function_restrict): Use new function
428 fndecl_built_in_p and remove check for FUNCTION_DECL if
430 (check_builtin_function_arguments): Likewise.
431 (reject_gcc_builtin): Likewise.
432 * c-warn.c (sizeof_pointer_memaccess_warning): Likewise.
434 2018-08-26 Marek Polacek <polacek@redhat.com>
436 PR c++/87029, Implement -Wredundant-move.
437 * c.opt (Wredundant-move): New option.
439 2018-08-21 Marek Polacek <polacek@redhat.com>
441 PR c++/86981, Implement -Wpessimizing-move.
442 * c.opt (Wpessimizing-move): New option.
444 2018-08-20 David Malcolm <dmalcolm@redhat.com>
447 * c-attribs.c (common_handle_aligned_attribute): Add
448 auto_diagnostic_group instance.
449 * c-indentation.c (warn_for_misleading_indentation): Likewise.
450 * c-opts.c (c_common_post_options): Likewise.
451 * c-warn.c (warn_logical_not_parentheses): Likewise.
452 (warn_duplicated_cond_add_or_warn): Likewise.
453 (warn_for_multistatement_macros): Likewise.
455 2018-08-20 Nathan Sidwell <nathan@acm.org>
457 * c-ada-spec.c (macro_length, dump_ada_macros): Adjust macro parm
460 2018-08-17 Nathan Sidwell <nathan@acm.org>
462 * c-cppbuiltin.c (struct lazy_hex_fp_value_struct): Remove macro
464 (laxy_hex_fp_value_count): Make unsigned.
465 (lazy_hex_fp_value): Provided with macro & lazy number. Directly
466 manipulate the macro.
467 (builtin_defin_with_hex_fp_value): Adjust callback name, use
470 2018-08-17 David Malcolm <dmalcolm@redhat.com>
472 * c-format.c (enum format_type): Add gcc_dump_printf_format_type.
473 (gcc_dump_printf_length_specs): New.
474 (gcc_dump_printf_flag_pairs): New.
475 (gcc_dump_printf_flag_specs): New.
476 (gcc_dump_printf_char_table): New.
477 (format_types_orig): Add entry for "gcc_dump_printf".
478 (init_dynamic_diag_info): Set up length_char_specs and
479 conversion_specs for gcc_dump_printf_format_type.
480 (handle_format_attribute): Handle gcc_dump_printf_format_type.
482 2018-08-17 Nathan Sidwell <nathan@acm.org>
484 * c-ada-spec.c (macro_length, dump_ada_macros): Constify.
486 * c-ada-spec.c: Don't #include "cpp-id-data.h"
487 * c-cppbuiltin.c: Likewise.
489 2018-08-17 Martin Liska <mliska@suse.cz>
491 * c.opt: Remove Warn, Init and Report for options with
492 Ignore/Deprecated flag. Warning is done automatically for
495 2018-08-16 David Malcolm <dmalcolm@redhat.com>
498 * c-common.c (selftest::c_family_tests): Call
499 selftest::c_indentation_c_tests.
500 * c-common.h (selftest::c_indentation_c_tests): New decl.
501 * c-indentation.c: Include "selftest.h".
502 (next_tab_stop): Add "tab_width" param, rather than accessing
504 (get_visual_column): Likewise. Clarify comment. Bulletproof
505 against reading past the end of the line.
506 (get_first_nws_vis_column): Add "tab_width" param.
507 (detect_intervening_unindent): Likewise.
508 (should_warn_for_misleading_indentation): Read tab width from
509 cpp_opts and pass around.
510 (selftest::test_next_tab_stop): New test.
511 (selftest::assert_get_visual_column_succeeds): New function.
512 (ASSERT_GET_VISUAL_COLUMN_SUCCEEDS): New macro.
513 (selftest::assert_get_visual_column_fails): New function.
514 (ASSERT_GET_VISUAL_COLUMN_FAILS): New macro.
515 (selftest::test_get_visual_column): New test.
516 (selftest::c_indentation_c_tests): New function.
518 2018-08-16 Nathan Sidwell <nathan@acm.org>
520 * c-ada-spec.c (count_ada_macro): Use cpp_user_macro_p.
521 (store_ada_macro): Likewise.
522 * c-ppoutput.c (cb_used_define, dump_macro): Likewise.
523 * c-spellcheck.cc (should-suggest_as_macro_p): Likewise,
525 2018-08-15 David Malcolm <dmalcolm@redhat.com>
527 * c-format.c: Include "selftest-diagnostic.h" and
528 "gcc-rich-location.h".
529 (format_warning_at_char): Pass NULL for new label params of
531 (class indirection_suffix): New class.
532 (class range_label_for_format_type_mismatch): New class.
533 (format_type_warning): Move logic for generating "*" suffix to
534 class indirection_suffix. Create "fmt_label" and "param_label"
535 to show their types, and pass them to the
536 format_warning_at_substring calls.
537 (selftest::test_type_mismatch_range_labels): New test.
538 (selftest::c_format_c_tests): Call it.
540 2018-08-13 Martin Sebor <msebor@redhat.com>
542 PR tree-optimization/71625
543 * c-common.c (braced_list_to_string): New function.
544 * c-common.h (braced_list_to_string): Declare it.
546 2018-08-08 Nathan Sidwell <nathan@acm.org>
548 * c-common.c (try_to_locate_new_include_inertion_point): Use
549 linemap_included_from_linemap.
550 * c-lex.c (fe_file_change): Use linemap_included_from.
551 * c-ppoutput.c (pp_file_change): Likewise.
553 2018-08-01 Martin Sebor <msebor@redhat.com>
555 PR tree-optimization/86650
556 * c-family/c-format.c (gcc_tdiag_char_table): Update comment for "%G".
557 (gcc_cdiag_char_table, gcc_cxxdiag_char_table): Same.
558 (init_dynamic_diag_info): Update from "gcall *" to "gimple *".
559 * c-format.h (T89_G): Update to be "gimple *" rather than
561 (local_gcall_ptr_node): Rename...
562 (local_gimple_ptr_node): ...to this.
564 2018-07-31 David Malcolm <dmalcolm@redhat.com>
566 * c-format.c (PP_FORMAT_CHAR_TABLE): New macro, based on existing
567 table entries for gcc_diag_char_table, and the 'Z' entry from
568 gcc_tdiag_char_table, changing the "chain" entry for 'Z' from
569 &gcc_tdiag_char_table[0] to &gcc_diag_char_table[0].
570 (gcc_diag_char_table): Use PP_FORMAT_CHAR_TABLE, implicitly
571 adding missing "Z" for this table. Remove erroneous "G" and "K"
573 (gcc_tdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
574 (gcc_cdiag_char_table): Use PP_FORMAT_CHAR_TABLE.
575 (gcc_cxxdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
577 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
579 * c-common.c (speculation_safe_resolve_call): New function.
580 (speculation_safe_resolve_params): New function.
581 (speculation_safe_resolve_return): New function.
582 (resolve_overloaded_builtin): Handle __builtin_speculation_safe_value.
583 * c-cppbuiltin.c (c_cpp_builtins): Add pre-define for
584 __HAVE_SPECULATION_SAFE_VALUE.
586 2018-07-20 David Malcolm <dmalcolm@redhat.com>
588 * c-common.c (c_cpp_error): Remove redundant "line_table"
589 parameter from call to rich_location::set_range.
590 (maybe_suggest_missing_token_insertion): Likewise.
592 2018-07-20 Martin Sebor <msebor@redhat.com>
595 * gcc/c-family/c.opt (-Warray-bounds): Remove redundant -Wall.
597 2018-07-20 Martin Sebor <msebor@redhat.com>
600 * c-common.h (c_common_handle_option): Change function argument
602 * c-opts.c (c_common_init_options): Same.
603 (c_common_handle_option): Same. Remove special handling of
604 OPT_Walloca_larger_than_ and OPT_Wvla_larger_than_.
605 * c.opt (-Walloc-size-larger-than, -Walloca-larger-than): Change
606 options to take a HOST_WIDE_INT argument and accept a byte-size
608 (-Wvla-larger-than): Same.
609 (-Wno-alloc-size-larger-than, -Wno-alloca-larger-than): New.
610 (-Wno-vla-larger-than): Same.
612 2018-07-12 Jakub Jelinek <jakub@redhat.com>
614 * c-attribs.c (c_common_attribute_table): Add
615 "omp declare target implicit" attribute.
617 2018-07-12 Richard Biener <rguenther@suse.de>
620 * c-attribs.c (handle_packed_attribute): Do not build a variant
621 type with TYPE_PACKED, instead ignore the attribute if we may
622 not apply to the original type.
624 2018-07-10 Jakub Jelinek <jakub@redhat.com>
627 * c-omp.c (c_omp_check_loop_iv_r, c_omp_check_loop_iv): Allow declv
628 to contain TREE_LIST for both the original class iterator and the
631 2018-07-07 Eric Botcazou <ebotcazou@adacore.com>
633 * c-ada-spec.c (to_ada_name): Remove index parameter.
634 (pp_ada_tree_identifier): Likewise.
635 (dump_ada_macros): Adjust call to to_ada_name.
636 (struct overloaded_name_hash): Delete.
637 (struct overloaded_name_hasher): Likewise.
638 (overloaded_names): Likewise.
639 (compute_overloading_index): Likewise.
640 (dump_ada_decl_name): Do not call compute_overloading_index and
641 adjust calls to pp_ada_tree_identifier.
642 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
643 (dump_ada_import): Add spc parameter and switch to aspect syntax.
644 (dump_ada_function_declaration): Adjust call to pp_ada_tree_identifier.
645 (dump_ada_enum_type): Remove type and display_convention parameters.
646 Adjust calls to pp_ada_tree_identifier.
647 (dump_ada_node): Likewise and for dump_ada_structure.
648 (dump_nested_type) <ENUMERAL_TYPE>: Adjust call to dump_ada_enum_type
650 <RECORD_TYPE>: Adjust call to dump_ada_structure and switch to aspect
652 (print_constructor): Adjust call to pp_ada_tree_identifier.
653 (print_destructor): Likewise.
654 (dump_ada_declaration): Switch to aspect syntax.
655 (dump_ada_structure): Likewise and tidy up. Replace display_convention
656 parameter with nested parameter.
657 (dump_ads): Emit pragma Ada_2012 in lieu of pragma Ada_2005.
658 (dump_ada_specs): Do not delete overloaded_names table.
660 2018-07-06 Peter Bergner <bergner@linux.ibm.com>
663 * c-attribs.c (handle_mode_attribute): Call translate_mode_attribute
666 2018-07-05 Nathan Sidwell <nathan@acm.org>
668 * c-lex.c (fe_file_change): Check SYSTEM_IMPLICIT_EXTERN_C not
669 NO_IMPLICIT_EXTERN_C.
671 2018-06-28 Martin Liska <mliska@suse.cz>
673 * cppspec.c: Include opt-suggestions.h.
675 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
676 Thomas Schwinge <thomas@codesourcery.com>
677 Cesar Philippidis <cesar@codesourcery.com>
679 * c-pragma.h (enum pragma_omp_clause): Add
680 PRAGMA_OACC_CLAUSE_{FINALIZE,IF_PRESENT}. Remove
681 PRAGMA_OACC_CLAUSE_PRESENT_OR_{COPY,COPYIN,COPYOUT,CREATE}.
683 2018-06-20 Jakub Jelinek <jakub@redhat.com>
686 * c-common.c (check_nonnull_arg): Use fold_for_warn. Adjust obsolete
689 2018-06-18 Martin Sebor <msebor@redhat.com>
692 * c-warn.c (sizeof_pointer_memaccess_warning): Check for attribute
695 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
697 * c-common.c (c_common_truthvalue_conversion): Handle ABSU_EXPR.
699 2018-06-13 Jason Merrill <jason@redhat.com>
701 * c-opts.c (c_common_post_options): Warn about useless -Wabi.
702 (c_common_handle_option) [OPT_Wabi_]: Remove flag_abi_compat_version
705 PR c++/86094 - wrong code with defaulted move ctor.
706 * c-opts.c (c_common_post_options): Bump the current ABI version to
707 13. Set warn_abi_version and flag_abi_compat_version to the current
708 version rather than 0. Fix defaulting flag_abi_compat_version from
711 2018-06-12 Martin Sebor <msebor@redhat.com>
714 * c-warn.c (sizeof_pointer_memaccess_warning): Avoid warning when
715 sizeof source and destination yields the same value.
717 2018-06-12 Martin Liska <mliska@suse.cz>
719 * c.opt: Make MPX-related options as Deprecated.
721 2018-06-08 David Malcolm <dmalcolm@redhat.com>
723 * c-pretty-print.c (c_pretty_printer::statement): Use TDF_NONE
726 2018-06-08 Martin Liska <mliska@suse.cz>
728 * c-attribs.c (handle_bnd_variable_size_attribute): Remove support
729 for MPX (macros, related functions, fields in cgraph_node, ...).
730 (handle_bnd_legacy): Likewise.
731 (handle_bnd_instrument): Likewise.
734 2018-06-06 Jakub Jelinek <jakub@redhat.com>
737 * c-cppbuiltin.c (c_cpp_builtins): Fix a typo, set
738 __cpp_transactional_memory to 201500 instead of 210500.
740 2018-06-06 Jason Merrill <jason@redhat.com>
742 PR c++/85710 - ICE with -Wmemset-elt-size.
743 * c-warn.c (warn_for_memset): Don't crash on incomplete element type.
745 2018-06-01 Jason Merrill <jason@redhat.com>
747 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_deduction_guides to
750 2018-06-01 Eric Botcazou <ebotcazou@adacore.com>
752 * c-ada-spec.c (dump_ada_declaration) <TYPE_DECL>: Generate a forward
753 declaration for a typedef independently of whether the declaration of
754 the subtype is generated.
756 2018-05-31 Martin Sebor <msebor@redhat.com>
759 * c.opt (-Wno-alloc-size-larger-than): New option.
761 2018-04-22 David Pagan <dave.pagan@oracle.com>
764 * c-opts.c (c_common_post_options): Set default for warn_return_type
765 for C++/C++ with ObjC extensions only. For C, makes it possible to
766 differentiate between default (no option), -Wreturn-type, and
769 2018-05-29 Jason Merrill <jason@redhat.com>
771 * c.opt (Winit-list-lifetime): New flag.
773 2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
775 * c-lex.c (get_fileinfo): Use splay_tree_compare_strings and
776 splay_tree_delete_pointers.
778 2018-05-26 Jakub Jelinek <jakub@redhat.com>
781 * c-warn.c (diagnose_mismatched_attributes): Remove unnecessary
782 noinline variable to workaround broken kernel headers.
784 2018-05-18 Jason Merrill <jason@redhat.com>
786 * c.opt (Wdeprecated-copy): New flag.
788 2018-05-17 Martin Liska <mliska@suse.cz>
790 * c-warn.c (overflow_warning): Do not use
791 space in between 'G_' and '('.
793 2018-05-09 Jason Merrill <jason@redhat.com>
795 * c-common.c (valid_array_size_p): Add complain parameter.
796 * c-common.h: ...which defaults to true.
798 2018-05-11 Jakub Jelinek <jakub@redhat.com>
801 * c-omp.c (c_omp_predetermined_sharing): Return
802 OMP_CLAUSE_DEFAULT_SHARED for artificial vars with integral type.
804 2018-05-11 Martin Liska <mliska@suse.cz>
807 * c-attribs.c (handle_no_sanitize_attribute): Iterate all
810 2018-05-10 Jakub Jelinek <jakub@redhat.com>
813 * c-common.h (fold_offsetof_1): Removed.
814 (fold_offsetof): Add TYPE argument defaulted to size_type_node and
815 CTX argument defaulted to ERROR_MARK.
816 * c-common.c (fold_offsetof_1): Renamed to ...
817 (fold_offsetof): ... this. Remove wrapper function. Add TYPE
818 argument, convert the pointer constant to TYPE and use size_binop
819 with PLUS_EXPR instead of fold_build_pointer_plus if type is not
820 a pointer type. Adjust recursive calls.
822 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
825 * c-attribs.c (handle_visibility_attribute): Do not set no_add_attrs.
827 2018-05-07 Nathan Sidwell <nathan@acm.org>
829 * c.opt (ffor-scope): Remove functionality, issue warning.
831 2018-05-03 Nathan Sidwell <nathan@acm.org>
833 * c.opt (ffriend-injection): Remove functionality, issue warning.
835 2018-05-01 David Malcolm <dmalcolm@redhat.com>
838 * c-format.c (struct format_check_results): Add field
840 (check_format_info): Initialize it, and warn if encountered.
841 (check_format_arg): Distinguish between wide char and
842 everything else when detecting arrays of non-char.
844 2018-04-30 David Malcolm <dmalcolm@redhat.com>
846 * c-format.c (get_corrected_substring): Update for
847 location_get_source_line returning a char_span. Use a char_span
848 when handling the prefix of the correction.
849 * c-indentation.c (get_visual_column): Update for
850 location_get_source_line returning a char_span.
851 (get_first_nws_vis_column): Likewise.
853 2018-03-29 David Malcolm <dmalcolm@redhat.com>
856 * known-headers.cc (get_stdlib_header_for_name): Add various names
857 from <assert.h>, <string.h>, and <memory.h>; add more names from
860 2018-03-27 Jakub Jelinek <jakub@redhat.com>
863 * c-common.c (fold_offsetof_1) <case COMPOUND_EXPR>: Assert that
864 get_base_address of the second operand is a VAR_P, rather than the
865 operand itself, and use gcc_checking_assert instead of gcc_assert.
867 2018-03-23 Marek Polacek <polacek@redhat.com>
870 * c-pretty-print.c (c_pretty_printer::multiplicative_expression)
871 <case RDIV_EXPR>: Tweak condition.
873 2018-03-20 Eric Botcazou <ebotcazou@adacore.com>
875 * c-ada-spec.c (pp_ada_tree_identifier): Deal specifically with _Bool.
877 2018-03-16 Jakub Jelinek <jakub@redhat.com>
880 * c-warn.c (conversion_warning): Replace "to to" with "to" in
884 * c-warn.c (diagnose_mismatched_attributes): Remove trailing space from
887 2018-03-16 Richard Biener <rguenther@suse.de>
890 * c-gimplify.c (c_gimplify_expr): Revert previous change. Instead
891 unshare the possibly folded expression.
893 2018-03-15 Richard Biener <rguenther@suse.de>
896 * c-gimplify.c (c_gimplify_expr): Do not fold expressions.
898 2018-03-13 Martin Sebor <msebor@redhat.com>
900 PR tree-optimization/84725
901 * c-attribs.c (handle_nonstring_attribute): Allow attribute nonstring
902 with all three narrow character types, including their qualified forms.
904 2018-03-12 Martin Sebor <msebor@redhat.com>
906 PR tree-optimization/83456
907 * gcc/c-family/c-common.c (check_function_restrict): Return bool.
908 Restore checking of bounded built-in functions.
909 (check_function_arguments): Also return the result
910 of warn_for_restrict.
911 * gcc/c-family/c-common.c (check_function_restrict): Return bool.
912 * gcc/c-family/c-warn.c (warn_for_restrict): Return bool.
914 2018-03-02 Marek Polacek <polacek@redhat.com>
917 * c-warn.c (warn_for_sign_compare): Bail out if any of the operands
920 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
922 * c-attribs.c (c_common_attribute_table): Remove "cilk simd
925 2018-03-01 Marek Polacek <polacek@redhat.com>
928 * c-attribs.c (common_handle_aligned_attribute): Don't use invalid
929 alignment in computation.
931 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
933 * c-ada-spec.c (dump_ada_node) <NULLPTR_TYPE>: New case.
934 <REAL_TYPE>: Deal specifically with _Float128/__float128.
936 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
938 * c-ada-spec.c (dump_ada_double_name) <ENUMERAL_TYPE>: New case.
939 (is_char_array): Take a type instead of a declaration.
940 (dump_ada_array_type): Likewise.
941 (is_simple_enum): Minor tweak.
942 (dump_ada_enum_type): New function extracted from...
943 (dump_ada_node) <ENUMERAL_TYPE>: ...here. Invoke it.
944 <INTEGER_TYPE>: Remove unreachable code.
945 <RECORD_TYPE>: Likewise. Minor tweaks.
946 (dump_nested_type) <ARRAY_TYPE>: Adjust to above changes.
947 <ENUMERAL_TYPE>: New case.
948 <RECORD_TYPE>: Factor out common code.
949 (dump_ada_declaration) <ARRAY_TYPE>: Adjust to above changes.
950 Minor tweaks. Deal with enumeral types.
951 (dump_ada_structure): Minor tweaks.
953 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
955 * c-ada-spec.c (dump_ada_node) <POINTER_TYPE>: Do not use generic
956 address for incomplete structures.
957 (dump_forward_type): Do not bail out for incomplete structures.
958 (dump_ada_declaration): Do not special-case incomplete structures
959 for subtypes. Dump them as null records for types.
961 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
963 * c-ada-spec.c (dump_ada_import): Use boolean and fix formatting.
964 (is_char_array): Fix formatting.
965 (dump_template_types): Likewise.
966 (dump_generic_ada_node): Rename into...
967 (dump_ada_node): ...this.
968 <POINTER_TYPE>: Remove superfluous space. Use generic address for
969 incomplete structures and not for empty structures. Do not use it
970 when forward declarations are needed.
971 (dump_forward_type): New function.
972 (dump_nested_types): Remove FORWARD parameter. Do not consider
973 TREE_VISITED and do not generate a forward declaration. Only dump
974 original nested types for nested declaration.
975 (dump_nested_type) <POINTER_TYPE>: Call dump_forward_type.
976 <ARRAY_TYPE>: Likewise if the component type is an anonymous pointer.
977 <RECORD_TYPE>: Do not consider TREE_VISITED.
978 (dump_ada_declaration): Use booleans and fix formatting throughout.
979 <TYPE_DECL>: Skip incomplete structures and not empty structures.
980 Call dump_forward_type instead of dump_nested_types for a typedef.
981 Remove superfluous check and adjust call to dump_nested_types.
982 <POINTER_TYPE>: Call dump_forward_type and fall through.
983 (dump_ada_struct_decl): Rename into...
984 (dump_ada_structure): ...this. Do not special-case empty structures.
986 2018-02-27 Martin Sebor <msebor@redhat.com>
989 * c.opt (-Wmissing-attributes): New option.
991 2018-02-21 Martin Liska <mliska@suse.cz>
993 * c.opt (Wcatch-value=): Add IntegerRange.
995 2018-02-15 Jason Merrill <jason@redhat.com>
997 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_deduction_guides.
999 2018-02-09 Nathan Sidwell <nathan@acm.org>
1002 * c-common.h (strict_aliasing_warning): Drop OTYPE arg, insert LOC
1004 * c-warn.c (strict_aliasing_warning): Drop OTYPE arg, require LOC
1007 2018-02-09 Martin Sebor <msebor@redhat.com>
1010 * c.opt (-Wstringop-overflow, -Warray-bounds): Add LTO.
1011 (-Walloc-size-larger-than, -Wformat-truncation=): Same.
1012 (-Wmaybe-uninitialized, -Wnonnull, -Wrestrict): Same.
1013 (-Wstrict-overflow, -Wsuggest-attribute): Same.
1014 (-Wuninitialized): Same.
1016 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
1018 * c-ada-spec.c (dump_ada_declaration): Do not generate the 'constant'
1019 keyword for components.
1021 2018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
1023 * c-common.h (DECL_UNNAMED_BIT_FIELD): New.
1025 2018-02-02 Julia Koval <julia.koval@intel.com>
1027 * c-common.h (omp_clause_mask): Move to wide_int_bitmask.h.
1029 2018-01-29 Marek Polacek <polacek@redhat.com>
1032 * c-format.c (check_function_format): Check current_function_decl.
1034 2018-01-27 Jakub Jelinek <jakub@redhat.com>
1036 * c-cppbuiltin.c (c_cpp_builtins): Use ggc_strdup for the fp_suffix
1038 (LAZY_HEX_FP_VALUES_CNT): Define.
1039 (lazy_hex_fp_values): Allow up to LAZY_HEX_FP_VALUES_CNT lazy hex fp
1040 values rather than just 12.
1041 (builtin_define_with_hex_fp_value): Likewise.
1043 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
1046 * c.opt (-fmacro-prefix-map): New option.
1047 * c-opts.c (c_common_handle_option): Handle it.
1048 * c-lex.c (init_c_lex): Set remap_filename cpp callback.
1049 * c-ppoutput.c (init_pp_output): Likewise.
1051 2018-01-17 David Malcolm <dmalcolm@redhat.com>
1054 * c-common.c (fold_for_warn): Move to c/c-fold.c and cp/expr.c.
1056 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
1058 * c-ada-spec.c (dump_number): Add FLOAT_P parameter.
1059 Skip 'f' and 'F' characters if it is true.
1060 (store_ada_macro): Minor tweak.
1061 (dump_ada_macros) <CPP_COMMENT>: Likewise.
1062 <CPP_WSTRING>: Likewise.
1063 <CPP_STRING>: Output '&' in the buffer if not the first string.
1064 <CPP_NUMBER>: Adjust calls to dump_number.
1066 2018-01-10 David Malcolm <dmalcolm@redhat.com>
1069 * c-common.c: Include "selftest.h".
1070 (get_atomic_generic_size): Perform the test for integral type
1071 before the range test for any integer constant, fixing indentation
1072 of braces. Call fold_for_warn before testing for an INTEGER_CST.
1073 (reject_gcc_builtin): Strip any location wrapper from EXPR.
1074 (selftest::test_fold_for_warn): New function.
1075 (selftest::c_common_c_tests): New function.
1076 (selftest::c_family_tests): Call it, and
1077 selftest::c_pretty_print_c_tests.
1078 * c-common.h (selftest::c_pretty_print_c_tests): New decl.
1079 * c-format.c (check_format_arg): Convert VAR_P check to a
1081 * c-pretty-print.c: Include "selftest.h".
1082 (pp_c_cast_expression): Don't print casts for location wrappers.
1083 (selftest::assert_c_pretty_printer_output): New function.
1084 (ASSERT_C_PRETTY_PRINTER_OUTPUT): New macro.
1085 (selftest::test_location_wrappers): New function.
1086 (selftest::c_pretty_print_c_tests): New function.
1087 * c-warn.c (warn_for_memset): Call fold_for_warn on the arguments.
1089 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
1090 Alan Hayward <alan.hayward@arm.com>
1091 David Sherwood <david.sherwood@arm.com>
1093 * c-common.c (c_common_type_for_mode): Handle MODE_VECTOR_BOOL.
1095 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
1096 Alan Hayward <alan.hayward@arm.com>
1097 David Sherwood <david.sherwood@arm.com>
1099 * c-ubsan.c (ubsan_instrument_shift): Treat GET_MODE_BITSIZE
1102 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
1103 Alan Hayward <alan.hayward@arm.com>
1104 David Sherwood <david.sherwood@arm.com>
1106 * c-common.c (vector_types_convertible_p, c_build_vec_perm_expr)
1107 (convert_vector_to_array_for_subscript): Handle polynomial
1108 TYPE_VECTOR_SUBPARTS.
1109 (c_common_type_for_mode): Check valid_vector_subparts_p.
1110 * c-pretty-print.c (pp_c_initializer_list): Handle polynomial
1113 2018-01-03 Jakub Jelinek <jakub@redhat.com>
1115 Update copyright years.
1117 2017-12-22 Mike Stump <mikestump@comcast.net>
1118 Eric Botcazou <ebotcazou@adacore.com>
1120 * c-pragma.c (init_pragma): Register pragma GCC unroll.
1121 * c-pragma.h (enum pragma_kind): Add PRAGMA_UNROLL.
1123 2017-12-22 Alexandre Oliva <aoliva@redhat.com>
1127 * c-semantics.c (only_debug_stmts_after_p): New.
1128 (pop_stmt_list): Clear side effects in debug-only stmt list.
1129 Check for single nondebug stmt followed by debug stmts only.
1131 2017-12-21 Alexandre Oliva <aoliva@redhat.com>
1134 * c-semantics.c (pop_stmt_list): Propagate side effects from
1135 single nondebug stmt to container list.
1137 2017-12-19 Jakub Jelinek <jakub@redhat.com>
1139 * known-headers.cc (get_stdlib_header_for_name): Replace Yoda
1140 conditions with typical order conditions.
1142 2017-12-18 Marek Polacek <polacek@redhat.com>
1144 * c-warn.c (warn_logical_operator): Return early if -Wlogical-op is
1147 2017-12-17 Martin Sebor <msebor@redhat.com>
1149 * c-attribs.c (common_handle_aligned_attribute): Avoid issuing
1150 an error for attribute warn_if_not_aligned.
1152 2017-12-16 Martin Sebor <msebor@redhat.com>
1154 PR tree-optimization/78918
1155 * c-common.c (check_function_restrict): Avoid checking built-ins.
1156 * c.opt (-Wrestrict): Include in -Wall.
1158 2017-12-15 Jakub Jelinek <jakub@redhat.com>
1160 * c-attribs.c (c_common_attribute_table,
1161 c_common_format_attribute_table): Swap affects_type_identity
1162 and handler fields, adjust comments.
1164 2017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
1166 * c.opt (Wcast-function-type): New warning option.
1167 * c-lex.c (get_fileinfo): Avoid warning.
1168 * c-ppoutput.c (scan_translation_unit_directives_only): Remove cast.
1170 2017-12-14 Qing Zhao <qing.zhao@oracle.com>
1173 * c-cppbuiltin.c (builtin_define_with_hex_fp_value):
1174 Adjust the size of buf1 and buf2, add a new buf to avoid
1175 format-overflow warning.
1177 2017-12-12 Alexandre Oliva <aoliva@redhat.com>
1179 * c-semantics.c (pop_stmt_list): Move begin stmt marker into
1180 subsequent statement list.
1182 2017-12-07 Martin Sebor <msebor@redhat.com>
1186 * c-attribs.c (attr_aligned_exclusions): New array.
1187 (attr_alloc_exclusions, attr_cold_hot_exclusions): Same.
1188 (attr_common_exclusions, attr_const_pure_exclusions): Same.
1189 (attr_gnu_inline_exclusions, attr_inline_exclusions): Same.
1190 (attr_noreturn_exclusions, attr_returns_twice_exclusions): Same.
1191 (attr_warn_unused_result_exclusions): Same.
1192 (handle_hot_attribute, handle_cold_attribute): Simplify.
1193 (handle_const_attribute): Warn on function returning void.
1194 (handle_pure_attribute): Same.
1195 (handle_aligned_attribute): Diagnose conflicting attribute
1197 * c-warn.c (diagnose_mismatched_attributes): Simplify.
1199 2017-12-06 David Malcolm <dmalcolm@redhat.com>
1202 * c-common.c (selftest::c_family_tests): Call
1203 selftest::c_spellcheck_cc_tests.
1204 * c-common.h (selftest::c_spellcheck_cc_tests): New decl.
1205 * c-spellcheck.cc: Include "selftest.h".
1206 (name_reserved_for_implementation_p): New function.
1207 (should_suggest_as_macro_p): New function.
1208 (find_closest_macro_cpp_cb): Move the check for NT_MACRO to
1209 should_suggest_as_macro_p and call it.
1210 (selftest::test_name_reserved_for_implementation_p): New function.
1211 (selftest::c_spellcheck_cc_tests): New function.
1212 * c-spellcheck.h (name_reserved_for_implementation_p): New decl.
1214 2017-12-06 David Malcolm <dmalcolm@redhat.com>
1216 * c-spellcheck.cc: New file, taken from macro-handling code in
1218 * c-spellcheck.h: New file, taken from macro-handling code in
1221 2017-12-01 Jakub Jelinek <jakub@redhat.com>
1223 * c-attribs.c (c_common_attribute_table): Remove "cilk simd function"
1225 (handle_simd_attribute): Don't check for "cilk simd function"
1226 attribute. Reindent, formatting changes.
1228 2017-11-30 Julia Koval <julia.koval@intel.com>
1230 * c-common.h (inv_list): Remove.
1232 2017-11-28 Jakub Jelinek <jakub@redhat.com>
1235 * c-common.c (c_switch_covers_all_cases_p_1,
1236 c_switch_covers_all_cases_p): New functions.
1237 * c-common.h (c_switch_covers_all_cases_p): Declare.
1239 2017-11-28 Julia Koval <julia.koval@intel.com>
1240 Sebastian Peryt <sebastian.peryt@intel.com>
1242 * array-notation-common.c: Delete.
1243 * c-cilkplus.c: Ditto.
1244 * c-common.c (_Cilk_spawn, _Cilk_sync, _Cilk_for): Remove.
1245 * c-common.def (ARRAY_NOTATION_REF): Remove.
1246 * c-common.h (RID_CILK_SPAWN, build_array_notation_expr,
1247 build_array_notation_ref, C_ORT_CILK, c_check_cilk_loop,
1248 c_validate_cilk_plus_loop, cilkplus_an_parts,
1249 cilk_ignorable_spawn_rhs_op,
1250 cilk_recognize_spawn): Remove.
1251 * c-gimplify.c (CILK_SPAWN_STMT): Remove.
1252 * c-omp.c: Remove CILK_SIMD check.
1253 * c-pragma.c: Ditto.
1254 * c-pragma.h: Remove CILK related pragmas.
1255 * c-pretty-print.c (c_pretty_printer::postfix_expression): Remove
1256 ARRAY_NOTATION_REF condition.
1257 (c_pretty_printer::expression): Ditto.
1258 * c.opt (fcilkplus): Remove.
1261 2017-11-21 Marc Glisse <marc.glisse@inria.fr>
1263 * c-pretty-print.c (pp_c_additive_expression,
1264 c_pretty_printer::expression): Handle POINTER_DIFF_EXPR.
1266 2017-11-21 Jakub Jelinek <jakub@redhat.com>
1268 * c-common.c (get_nonnull_operand): Use tree_to_uhwi.
1271 * c-common.c (get_atomic_generic_size): Use TREE_INT_CST_LOW
1272 instead of tree_to_uhwi, formatting fix.
1274 2017-11-20 David Malcolm <dmalcolm@redhat.com>
1277 * known-headers.cc: New file, based on material from c/c-decl.c.
1278 (suggest_missing_header): Copied as-is.
1279 (get_stdlib_header_for_name): New, based on get_c_name_hint but
1280 heavily edited to add C++ support. Add some knowledge about
1281 <limits.h>, <stdint.h>, and <wchar.h>.
1282 * known-headers.h: Likewise.
1284 2017-11-20 David Malcolm <dmalcolm@redhat.com>
1286 * c-common.h (enum lookup_name_fuzzy_kind): Move to name-hint.h.
1287 (lookup_name_fuzzy): Likewise. Convert return type from
1288 const char * to name_hint. Add location_t param.
1289 * name-hint.h: New header.
1291 2017-11-19 Jakub Jelinek <jakub@redhat.com>
1295 * c-common.h (c_fully_fold): Add LVAL argument defaulted to false.
1297 2017-11-16 Joseph Myers <joseph@codesourcery.com>
1299 * c.opt (-std=c17, std=gnu17, -std=iso9899:2017): Refer to 2018
1300 expected publication date of C17.
1301 (-std=c18, -std=gnu18, -std=iso9899:2018): New option aliases.
1303 2017-11-15 Joseph Myers <joseph@codesourcery.com>
1306 * c-common.c (c_common_reswords): Add __builtin_tgmath.
1307 * c-common.h (enum rid): Add RID_BUILTIN_TGMATH.
1309 2017-11-10 Martin Sebor <msebor@redhat.com>
1312 * c-common.c (catenate_strings): Use memcpy instead of strncpy.
1313 * c-warn.c (sizeof_pointer_memaccess_warning): Handle arrays.
1314 * c.opt (-Wstringop-truncation): New option.
1316 2017-11-06 Martin Liska <mliska@suse.cz>
1319 * c-opts.c (c_common_post_options): Set -Wreturn-type for C++
1321 * c.opt: Set default value of warn_return_type.
1323 2017-10-31 David Malcolm <dmalcolm@redhat.com>
1325 * c-common.c (binary_op_error): Update for renaming of
1327 (c_parse_error): Likewise.
1328 * c-warn.c (warn_logical_not_parentheses): Likewise for
1329 renaming of inform_at_rich_loc.
1330 (warn_for_restrict): Likewise for renaming of
1331 warning_at_rich_loc_n.
1333 2017-10-30 Joseph Myers <joseph@codesourcery.com>
1335 * c.opt (std=c17, std=gnu17, std=iso9899:2017): New options.
1336 * c-opts.c (set_std_c17): New function.
1337 (c_common_init_options): Use gnu17 as default C version.
1338 (c_common_handle_option): Handle -std=c17 and -std=gnu17.
1340 2017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
1342 * c-cppbuiltin.c (mode_has_fma): Add support for PowerPC KFmode.
1343 (c_cpp_builtins): If a machine has a fast fma _Float<N> and
1344 _Float<N>X variant, define __FP_FAST_FMA<N> and/or
1347 2017-10-23 Marek Polacek <polacek@redhat.com>
1350 * c-warn.c (warnings_for_convert_and_check): Fix typos.
1352 2017-10-19 Eric Botcazou <ebotcazou@adacore.com>
1354 * c-common.c (check_builtin_function_arguments): Also check arguments
1355 of __builtin_alloca_with_align_and_max.
1357 2017-10-17 David Malcolm <dmalcolm@redhat.com>
1359 * c-format.c (format_warning_at_char): Pass UNKNOWN_LOCATION
1360 rather than NULL to format_warning_va.
1361 (check_format_types): Likewise when calling format_type_warning.
1362 Remove code to extract source_ranges and source_range * in favor
1363 of just a location_t.
1364 (format_type_warning): Convert source_range * param to a
1367 2017-10-13 Jakub Jelinek <jakub@redhat.com>
1369 * c-gimplify.c (c_gimplify_expr): Handle [LR]ROTATE_EXPR like
1372 2017-10-12 David Malcolm <dmalcolm@redhat.com>
1374 * c-common.c (enum missing_token_insertion_kind): New enum.
1375 (get_missing_token_insertion_kind): New function.
1376 (maybe_suggest_missing_token_insertion): New function.
1377 * c-common.h (maybe_suggest_missing_token_insertion): New decl.
1379 2017-10-11 Nathan Sidwell <nathan@acm.org>
1381 * c-opts.c (add_prefixed_path): Change chain to incpath_kind.
1382 (c_common_handle_option): Update incpath_kind names.
1384 2017-10-11 Martin Liska <mliska@suse.cz>
1387 * c-attribs.c (handle_no_sanitize_attribute): Report directly
1388 Wattributes warning.
1390 2017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
1392 * c-ada-spec.c (dump_generic_ada_node): Use wi::to_wide when
1393 operating on trees as wide_ints.
1394 * c-common.c (pointer_int_sum): Likewise.
1395 * c-pretty-print.c (pp_c_integer_constant): Likewise.
1396 * c-warn.c (match_case_to_enum_1): Likewise.
1397 (c_do_switch_warnings): Likewise.
1398 (maybe_warn_shift_overflow): Likewise.
1400 2017-10-10 Jakub Jelinek <jakub@redhat.com>
1403 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_wide
1404 instead of wide_int::from.
1406 2017-10-06 Jakub Jelinek <jakub@redhat.com>
1409 * c-warn.c (warn_tautological_bitwise_comparison): Instead of
1410 using to_widest use wide_int with the larger of the two precisions.
1412 2017-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
1414 * c-pretty-print.c (pp_c_parameter_type_list): Print ... for variadic
1417 2017-10-02 Richard Sandiford <richard.sandiford@linaro.org>
1419 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_widest
1420 when combining the original unconverted comparison operands.
1422 2017-09-29 Jakub Jelinek <jakub@redhat.com>
1424 * c-attribs.c (handle_noipa_attribute): Don't add "stack_protect"
1427 2017-09-29 Eric Botcazou <ebotcazou@adacore.com>
1429 * c-ada-spec.c (to_ada_name): Add index parameter.
1430 (pp_ada_tree_identifier): Likewise.
1431 (dump_ada_macros): Adjust call to to_ada_name.
1432 (struct overloaded_name_hash): New type.
1433 (struct overloaded_name_hasher): Likewise.
1434 (overloaded_names): New hash table.
1435 (compute_overloading_index): New function.
1436 (dump_ada_decl_name): Call it and pass the result to
1437 pp_ada_tree_identifier.
1438 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
1439 (dump_ada_function_declaration): Likewise.
1440 (dump_generic_ada_node): Likewise.
1441 (print_constructor): Likewise.
1442 (print_destructor): Likewise.
1443 (dump_ada_specs): Delete overloaded_names table.
1445 2017-09-29 Eric Botcazou <ebotcazou@adacore.com>
1447 * c-ada-spec.c (max_ada_macros): Move around.
1448 (store_ada_macro_index): Likewise.
1449 (source_file): Rename into...
1450 (macro_source_file): ...this.
1451 (count_ada_macro): Move around.
1452 (store_ada_macro): Likewise.
1453 (compare_macro): Likewise.
1454 (print_ada_macros): Merge in...
1455 (dump_ada_macros): ...this.
1456 (source_file_base): Rename into...
1457 (current_source_file): ...this.
1458 (print_comment): Move around.
1459 (dump_ada_nodes): Call dump_ada_declaration directly.
1460 (struct with): Change type of limited field to bool.
1461 (append_withs): Change type of limited_access parameter to bool.
1462 (pp_ada_tree_identifie): Likewise.
1463 (dump_ada_decl_nam): Likewise.
1464 (dump_generic_ada_node): Likewise. Do not print the return type.
1465 (to_ada_name): Change type of space_found parameter to bool.
1466 (dump_ada_function_declaration): Return void and change type of
1467 parameters to bool. Also print the return type for a function.
1468 (print_ada_methods): Rename into...
1469 (dump_ada_methods): ...this.
1470 (print_ada_declaration): Rename into ...
1471 (dump_ada_declaration): ...this. Do not print the return type.
1472 (print_ada_struct_decl): Rename into...
1473 (dump_ada_struct_decl): ...this.
1475 2017-09-29 Jakub Jelinek <jakub@redhat.com>
1477 * c-attribs.c (handle_packed_attribute): Test DECL_C_BIT_FIELD
1478 rather than DECL_INITIAL.
1479 (common_handle_aligned_attribute): Likewise.
1481 2017-09-20 Alexandre Oliva <aoliva@redhat.com>
1483 * c.opt (gen-decls): Add RejectNegative.
1485 2017-09-15 Andrew Sutton <andrew.n.sutton@gmail.com>
1486 Jakub Jelinek <jakub@redhat.com>
1488 Add support for -std=c++2a.
1489 * c-common.h (cxx_dialect): Add cxx2a as a dialect.
1490 * opt.c: Add options for -std=c++2a and -std=gnu++2a.
1491 * c-opts.c (set_std_cxx2a): New.
1492 (c_common_handle_option): Set options when -std=c++2a is enabled.
1493 (c_common_post_options): Adjust comments.
1494 (set_std_cxx14, set_std_cxx17): Likewise.
1496 2017-09-15 Eric Botcazou <ebotcazou@adacore.com>
1498 * c-pragma.c (handle_pragma_scalar_storage_order): Expand on error
1499 message for non-uniform endianness and issue a warning in C++.
1501 2017-09-15 Jakub Jelinek <jakub@redhat.com>
1503 * c.opt (Wc++1z-compat): Change from option to undocumented alias.
1504 (Wc++17-compat): Change from undocumented alias to option.
1505 (Wnoexcept-type): Enable by Wc++17-compat instead of Wc++1z-compat,
1506 change C++1z to C++17 in description.
1507 (std=c++1z, std=gnu++1z): Change from option to undocumented
1509 (std=c++17, std=gnu++17): Change from undocumented alias to option.
1511 * c-common.h (enum cxx_dialect): Rename cxx1z to cxx17.
1512 * c-opts.c (set_std_cxx1z): Rename to ...
1513 (set_std_cxx17): ... this.
1514 (c_common_handle_option): Rename OPT_std_c__1z to OPT_std_c__17
1515 and OPT_std_gnu__1z to OPT_std_gnu__17. Adjust set_std_cxx1z
1517 (c_common_post_options): Use cxx17 instead of cxx1z. Adjust
1520 2017-09-12 H.J. Lu <hongjiu.lu@intel.com>
1522 * c-attribs.c (common_handle_aligned_attribute): Don't warn
1523 function alignment if warn_if_not_aligned_p is true.
1525 2017-09-12 Nathan Sidwell <nathan@acm.org>
1527 * c-common.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
1528 resort_sorted_fields): Move to c/c-decl.c.
1529 * c-common.h (field_decl_cmp, resort_sorted_fields): Delete.
1530 (struct sorted_fields_type): Move to c/c-lang.h.
1532 2017-09-09 Jonathan Wakely <jwakely@redhat.com>
1535 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_threadsafe_static_init.
1537 2017-09-04 Marek Polacek <polacek@redhat.com>
1540 * c-warn.c (warn_tautological_bitwise_comparison): New function.
1541 (warn_tautological_cmp): Call it.
1543 2017-09-01 Boris Kolpackov <boris@codesynthesis.com>
1545 * c-opts.c (c_common_finish): Write dependency information even if
1548 2017-09-01 Jakub Jelinek <jakub@redhat.com>
1551 * c-pragma.c (omp_pragmas): Move "ordered" entry from here to ...
1552 (omp_pragmas_simd): ... here.
1553 * c-omp.c (c_finish_omp_ordered): If clauses isn't simd clause alone,
1554 create new clauses list containing just simd clause.
1556 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1557 Alan Hayward <alan.hayward@arm.com>
1558 David Sherwood <david.sherwood@arm.com>
1560 * c-attribs.c (vector_mode_valid_p) Fold GET_MODE_INNER call
1561 into scalar_mode_supported_p call.
1562 (handle_mode_attribute): Update call to scalar_mode_supported_p.
1564 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1565 Alan Hayward <alan.hayward@arm.com>
1566 David Sherwood <david.sherwood@arm.com>
1568 * c-common.c (c_common_fixed_point_type_for_size): Use opt_scalar_mode
1569 for the mode iterator.
1571 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1572 Alan Hayward <alan.hayward@arm.com>
1573 David Sherwood <david.sherwood@arm.com>
1575 * c-lex.c (interpret_fixed): Use SCALAR_TYPE_MODE.
1576 * c-common.c (c_build_vec_perm_expr): Likewise.
1578 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1579 Alan Hayward <alan.hayward@arm.com>
1580 David Sherwood <david.sherwood@arm.com>
1582 * c-common.c (c_common_type_for_mode): Use as_a <scalar_int_mode>.
1584 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1585 Alan Hayward <alan.hayward@arm.com>
1586 David Sherwood <david.sherwood@arm.com>
1588 * c-attribs.c (handle_mode_attribute): Check for a scalar_int_mode
1589 before calling targetm.addr_space.valid_pointer_mode.
1591 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1592 Alan Hayward <alan.hayward@arm.com>
1593 David Sherwood <david.sherwood@arm.com>
1595 * c-cppbuiltin.c (c_cpp_builtins): Use opt_scalar_float_mode.
1597 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1598 Alan Hayward <alan.hayward@arm.com>
1599 David Sherwood <david.sherwood@arm.com>
1601 * c-common.c (c_common_fixed_point_type_for_size): Use new mode
1603 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
1605 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1606 Alan Hayward <alan.hayward@arm.com>
1607 David Sherwood <david.sherwood@arm.com>
1609 * c-cppbuiltin.c (mode_has_fma): Prefix mode names with E_ in
1612 2017-08-29 Martin Liska <mliska@suse.cz>
1615 * c-common.c (parse_optimize_options): Add argument to function
1617 * c-pragma.c (handle_pragma_diagnostic): Likewise.
1619 2017-08-24 David Malcolm <dmalcolm@redhat.com>
1621 * c-lex.c (interpret_float): Use token location
1622 when building an EXCESS_PRECISION_EXPR.
1624 2017-08-21 David Malcolm <dmalcolm@redhat.com>
1626 * c-common.c (check_function_arguments): Add "arglogs" param; pass
1627 it to check_function_format.
1628 * c-common.h (check_function_arguments): Add vec<location_t> *
1630 (check_function_format): Likewise.
1631 * c-format.c (struct format_check_context): Add field "arglocs".
1632 (check_function_format): Add param "arglocs"; pass it to
1634 (check_format_info): Add param "arglocs"; use it to initialize
1635 new field of format_ctx.
1636 (check_format_arg): Pass format_ctx->arglocs to new param of
1637 check_format_info_main.
1638 (class argument_parser): New field "arglocs".
1639 (argument_parser::argument_parser): Add "arglocs_" param and use
1640 it to initialize new field.
1641 (argument_parser::check_argument_type): Pass new arglocs field to
1643 (check_format_info_main): Add param "arglocs", and use it when
1644 constructing arg_parser.
1645 (check_format_types): Add param "arglocs"; use it if non-NULL when
1646 !EXPR_HAS_LOCATION (cur_param) to get at location information.
1648 2017-08-18 H.J. Lu <hongjiu.lu@intel.com>
1651 * c-attribs.c (handle_warn_if_not_aligned_attribute): New.
1652 (c_common_attribute_table): Add warn_if_not_aligned.
1653 (handle_aligned_attribute): Renamed to ...
1654 (common_handle_aligned_attribute): Remove argument, name, and add
1655 argument, warn_if_not_aligned. Handle warn_if_not_aligned.
1656 (handle_aligned_attribute): New.
1657 * c.opt: Add -Wif-not-aligned and -Wpacked-not-aligned.
1659 2017-08-14 Martin Sebor <msebor@redhat.com>
1662 * c-attribs.c (c_common_attribute_table): Add nonstring entry.
1663 (handle_nonstring_attribute): New function.
1665 2017-08-14 Martin Sebor <msebor@redhat.com>
1668 * c-format.h (T89_G): New macro.
1669 * c-format.c (local_gcall_ptr_node): New variable.
1670 (init_dynamic_diag_info): Initialize it.
1672 2017-08-11 Martin Liska <mliska@suse.cz>
1674 * c-opts.c (c_common_post_options): Replace ASM_OUTPUT_DEF with
1675 TARGET_SUPPORTS_ALIASES.
1677 2017-08-10 David Malcolm <dmalcolm@redhat.com>
1679 * c-common.c (c_parse_error): Add rich_location * param, using it
1680 rather implicitly using input_location.
1681 * c-common.h (c_parse_error): Add rich_location * param.
1683 2017-08-09 Marek Polacek <polacek@redhat.com>
1685 * c-common.c (pointer_int_sum): Use true/false instead of 1/0.
1686 (c_common_truthvalue_conversion): Likewise.
1687 * c-omp.c (c_finish_omp_atomic): Likewise.
1688 * c-common.h (build_binary_op): Update declaration.
1690 2017-08-08 Martin Liska <mliska@suse.cz>
1692 * c-ada-spec.c: Include header files.
1693 * c-ubsan.c: Likewise.
1694 * c-warn.c: Likewise.
1696 2017-08-07 Jakub Jelinek <jakub@redhat.com>
1699 * c-omp.c (c_finish_omp_atomic): Handle atomics on bitfields.
1701 2017-08-07 Eric Botcazou <ebotcazou@adacore.com>
1703 * c-ada-spec.c (has_nontrivial_methods): Test for FUNCTION_DECL.
1704 (print_ada_methods): Likewise.
1705 (print_ada_declaration): Likewise.
1707 2017-08-07 Martin Liska <mliska@suse.cz>
1709 * array-notation-common.c: Add new includes.
1710 * c-format.c( handle_format_attribute): Canonicalize a format
1712 * c-lex.c (c_common_has_attribute): Canonicalize name of an
1714 * c-pretty-print.c: Add new include.
1716 2017-08-05 Eric Botcazou <ebotcazou@adacore.com>
1718 * c-ada-spec.c (has_static_fields): Look only into variables.
1719 (print_constructor): Add TYPE parameter and use it for the name.
1720 (print_destructor): Likewise.
1721 (print_ada_declaration): Adjust to new constructor/destructor names.
1722 Adjust calls to print_constructor and print_destructor.
1723 (print_ada_struct_decl): Do not test TREE_STATIC on FIELD_DECL.
1724 Look only into variables in the final loop.
1726 2017-08-01 Eric Botcazou <ebotcazou@adacore.com>
1728 * c-ada-spec.c (has_static_fields): Look only into fields.
1729 (dump_generic_ada_node): Small tweak.
1730 (dump_nested_types): Look only into fields.
1731 (print_ada_declaration): Look only into methods. Small tweak.
1732 (print_ada_struct_decl): Look only into fields. Use DECL_VIRTUAL_P.
1734 2017-08-01 Eric Botcazou <ebotcazou@adacore.com>
1736 * c-ada-spec.c (print_generic_ada_decl): Pass correctly-typed constant.
1737 (dump_ada_function_declaration): Likewise.
1738 (dump_generic_ada_node): Likewise.
1739 (print_ada_declaration): Add support for const-qualified variables.
1741 2017-07-31 Martin Liska <mliska@suse.cz>
1744 * c-ubsan.c (ubsan_maybe_instrument_array_ref):
1745 Guard condition with flag_sanitize_p also with current_function_decl
1747 (ubsan_maybe_instrument_reference_or_call): Likewise.
1749 2017-07-30 Uros Bizjak <ubizjak@gmail.com>
1751 * c-format.c (asm_fprintf_char_table): Add 'z' to format_chars.
1753 2017-07-29 Eric Botcazou <ebotcazou@adacore.com>
1755 * c-ada-spec.c (dump_generic_ada_node): Take into account signedness
1757 (print_ada_declaration): Add missing guard for record types.
1759 2017-07-27 Jakub Jelinek <jakub@redhat.com>
1762 * c-omp.c (c_finish_omp_for): If the condition is wrapped in
1763 rhs of COMPOUND_EXPR(s), skip them and readd their lhs into
1764 new COMPOUND_EXPRs around the rhs of the comparison.
1766 2017-07-27 Marek Polacek <polacek@redhat.com>
1769 * c-warn.c (warn_for_sign_compare): Tweak the warning message. Print
1772 2017-07-27 Jakub Jelinek <jakub@redhat.com>
1774 * c-attribs.c (c_common_attribute_table): Add noipa attribute.
1775 (handle_noipa_attribute): New function.
1777 2017-07-07 Torsten Duwe <duwe@suse.de>
1779 * c-attribs.c (c_common_attribute_table): Add entry for
1780 "patchable_function_entry".
1782 2017-07-20 Nathan Sidwell <nathan@acm.org>
1784 Remove TYPE_METHODS.
1785 * c-ada-spec.c (is_tagged_type, has_nontrivial_methods,
1786 dump_ada_template, print_ada_methods,
1787 print_ada_declaration): Member fns are on TYPE_FIELDS.
1789 2017-07-18 Nathan Sidwell <nathan@acm.org>
1791 * c-warn.c (warn_for_memset): Use TYPE_{MIN,MAX}_VALUE.
1793 2017-07-14 David Malcolm <dmalcolm@redhat.com>
1795 * c-common.c (try_to_locate_new_include_insertion_point): New
1797 (per_file_includes_t): New typedef.
1798 (added_includes_t): New typedef.
1799 (added_includes): New variable.
1800 (maybe_add_include_fixit): New function.
1801 * c-common.h (maybe_add_include_fixit): New decl.
1803 2017-07-10 Martin Sebor <msebor@redhat.com>
1806 * c.opt (-Wstringop-overflow): Set defaults in LangEnabledBy.
1808 2017-07-06 David Malcolm <dmalcolm@redhat.com>
1810 * c-common.c (selftest::c_family_tests): New.
1811 * c-common.h (selftest::run_c_tests): Move decl to c/c-lang.h.
1812 (selftest::c_family_tests): New decl.
1814 2017-07-04 Marek Polacek <polacek@redhat.com>
1817 * c-common.c (sync_resolve_size): Give error for pointers to incomplete
1820 2017-07-04 Marek Polacek <polacek@redhat.com>
1822 * c-warn.c (warn_if_unused_value): Remove WITH_CLEANUP_EXPR handling.
1824 2017-06-28 Martin Liska <mliska@suse.cz>
1827 * c-attribs.c (handle_alias_ifunc_attribute): Append ifunc alias
1828 to a function declaration.
1830 2017-06-28 Martin Liska <mliska@suse.cz>
1833 * c.opt: Add IntegerRange to various options.
1835 2017-06-26 Marek Polacek <polacek@redhat.com>
1838 * c-common.h (warn_for_multistatement_macros): Declare.
1839 * c-warn.c: Include "c-family/c-indentation.h".
1840 (warn_for_multistatement_macros): New function.
1841 * c.opt (Wmultistatement-macros): New option.
1842 * c-indentation.c (guard_tinfo_to_string): No longer static.
1843 Change the parameter type to "enum rid". Handle RID_SWITCH.
1844 * c-indentation.h (guard_tinfo_to_string): Declare.
1846 2017-06-23 Marc Glisse <marc.glisse@inria.fr>
1848 * c-common.c (c_common_nodes_and_builtins): Use builtin_structptr_types.
1850 2017-06-15 Martin Sebor <msebor@redhat.com>
1853 * c.opt (-Wclass-memaccess): New option.
1855 2017-06-14 Boris Kolpackov <boris@codesynthesis.com>
1857 * c-opts.c (c_common_finish): Handle '-' special value to -MF.
1859 2017-06-13 Marek Polacek <polacek@redhat.com>
1862 * c-warn.c (do_warn_duplicated_branches): Return if any of the
1865 2017-06-13 Martin Liska <mliska@suse.cz>
1868 * c-attribs.c (add_no_sanitize_value): New function.
1869 (handle_no_sanitize_attribute): Likewise.
1870 (handle_no_sanitize_address_attribute): Use the function.
1871 (handle_no_sanitize_thread_attribute): New function.
1872 (handle_no_address_safety_analysis_attribute): Use
1873 add_no_sanitize_value.
1874 (handle_no_sanitize_undefined_attribute): Likewise.
1875 * c-common.h: Declare new functions.
1876 * c-ubsan.c (ubsan_instrument_division): Use sanitize_flags_p.
1877 (ubsan_instrument_shift): Likewise.
1878 (ubsan_instrument_bounds): Likewise.
1879 (ubsan_maybe_instrument_array_ref): Likewise.
1880 (ubsan_maybe_instrument_reference_or_call): Likewise.
1882 2017-06-11 Jason Merrill <jason@redhat.com>
1884 * c-ada-spec.c, c-pragma.c: Use id_equal.
1886 2017-06-04 Marek Polacek <polacek@redhat.com>
1889 * c-format.c (matching_type_p): Return false if any of the types
1890 requires structural equality.
1892 2017-06-02 Martin Sebor <msebor@redhat.com>
1895 * c-warn.c (conversion_warning): Use -Wconversion for integer
1896 conversion and -Wfloat-conversion for floating one.
1898 2017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
1900 * c.opt (Wsizeof-pointer-div): New warning option.
1902 2017-06-01 Volker Reichelt <v.reichelt@netcologne.de>
1904 * c.opt (Wcatch-value): New shortcut for Wcatch-value=1.
1905 (Wcatch-value=1): Enable by -Wall.
1907 2017-05-30 David Malcolm <dmalcolm@redhat.com>
1909 * c-format.c (gcc_cxxdiag_char_table): Add 'H' and 'I' to
1911 * c.opt (fdiagnostics-show-template-tree): New option.
1912 (felide-type): New option.
1914 2017-05-25 Volker Reichelt <v.reichelt@netcologne.de>
1916 * c.opt (Wcatch-value=): New C++ warning flag.
1918 2017-05-24 Nathan Sidwell <nathan@acm.org>
1920 * c=common.c (field_decl_cmp, resort_field_decl_cmp): Adjust T
1921 const casts to avoid warning.
1923 2017-05-24 Martin Sebor <msebor@redhat.com>
1926 * c-common.h (unsafe_conversion_p): Add a function argument.
1927 * c-common.c (unsafe_conversion_p): Same.
1928 Add type names and values to diagnostics.
1929 (scalar_to_vector): Adjust.
1930 * c-warn.c (constant_expression_error): Add a function argument.
1931 Add type names and values to diagnostics.
1932 (conversion_warning): Add a function argument.
1933 Add type names and values to diagnostics.
1934 (warnings_for_convert_and_check): Same.
1936 2017-05-19 Jason Merrill <jason@redhat.com>
1938 * c-warn.c (match_case_to_enum_1): Don't warn about enums with no
1941 2017-05-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
1943 * c-format.c (locus): Move out of function scope,
1946 2017-05-19 Nathan Sidwell <nathan@acm.org>
1948 * c-opts.c (class_dump_file, class_dump_flags): Delete.
1949 (c_common_parse_file): Remove class dump handling.
1950 (get_dump_info): Likewise.
1952 2017-05-19 Richard Biener <rguenther@suse.de>
1955 * c-warn.c (strict_aliasing_warning): Do not warn for accesses
1956 to alias-set zero memory.
1958 2017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
1960 * c-format.c (local_tree_type_node): Add GTY attribute.
1962 2017-05-18 Marek Polacek <polacek@redhat.com>
1964 * c-common.c (c_common_type_for_size): Use NULL_TREE instead of 0.
1965 (c_common_fixed_point_type_for_size): Likewise.
1966 (c_common_type_for_mode): Likewise.
1967 (shorten_compare): Likewise.
1968 (c_promoting_integer_type_p): Use false/true instead of 0/1.
1969 * c-pragma.c (maybe_apply_renaming_pragma): Use NULL_TREE instead of 0.
1971 2017-05-18 Marek Polacek <polacek@redhat.com>
1973 * c-common.c (self_promoting_args_p): Change the return type to bool.
1974 Use false/true instead of 0/1.
1975 * c-common.h (self_promoting_args_p): Update.
1977 2017-05-17 Marek Polacek <polacek@redhat.com>
1979 * c-common.c: Use NULL_TREE instead of 0 where appropriate.
1980 * c-warn.c: Likewise.
1982 2017-05-17 Ville Voutilainen <ville.voutilainen@gmail.com>
1984 Implement new C++ intrinsics __is_assignable and __is_constructible.
1985 * c-common.c (__is_assignable, __is_constructible): New.
1986 * c-common.h (RID_IS_ASSIGNABLE, RID_IS_CONSTRUCTIBLE): Likewise.
1988 2017-05-17 Martin Liska <mliska@suse.cz>
1990 * c-common.h: Introduce dump_flags_t type and
1991 use it instead of int type.
1992 * c-gimplify.c (c_genericize): Likewise.
1993 * c-opts.c: Likewise.
1995 2017-05-17 Marek Polacek <polacek@redhat.com>
1997 * c-common.c (c_save_expr): Remove.
1998 (c_common_truthvalue_conversion): Remove a call to c_save_expr.
1999 * c-common.h (c_save_expr): Remove declaration.
2001 2017-05-09 Volker Reichelt <v.reichelt@netcologne.de>
2004 * c-pretty-print.c (c_pretty_printer::expression): Handle MAX_EXPR,
2005 MIN_EXPR, EXACT_DIV_EXPR, RDIV_EXPR, LROTATE_EXPR, RROTATE_EXPR.
2006 (c_pretty_printer::postfix_expression): Handle MAX_EXPR, MIN_EXPR.
2007 (c_pretty_printer::multiplicative_expression): Handle EXACT_DIV_EXPR,
2009 (pp_c_shift_expression): Handle LROTATE_EXPR, RROTATE_EXPR.
2011 2017-05-09 Marek Polacek <polacek@redhat.com>
2014 * c-warn.c (unwrap_c_maybe_const): New.
2015 (warn_logical_operator): Call it.
2017 2017-05-09 Nathan Sidwell <nathan@acm.org>
2019 * c-common.c (c_register_builtin_type): Use pushdecl lang_hook.
2020 * c-common.h (pushdecl_top_level, pushdecl): Don't declare here.
2022 2017-05-08 Martin Sebor <msebor@redhat.com>
2024 PR translation/80280
2025 * c-format.h (struct format_flag_spec): Add new member.
2027 * c-format.c (local_tree_type_node): New global.
2028 (printf_flag_specs, asm_fprintf_flag_spec): Initialize new data.
2029 (gcc_diag_flag_specs, scanf_flag_specs, strftime_flag_specs): Ditto.
2030 (strfmon_flag_specs): Likewise.
2031 (gcc_diag_char_table, gcc_cdiag_char_table): Split up specifiers
2032 with distinct quoting properties.
2033 (gcc_tdiag_char_table, gcc_cxxdiag_char_table): Same.
2034 (flag_chars_t::validate): Add argument and handle bad quoting.
2035 (check_format_info_main): Handle quoting problems.
2036 (init_dynamic_diag_info): Simplify.
2038 2017-05-08 Jason Merrill <jason@redhat.com>
2040 * c-opts.c (c_common_post_options): Update defaults for
2041 flag_abi_version and flag_abi_compat_version.
2043 2017-05-05 David Malcolm <dmalcolm@redhat.com>
2045 * c-common.c (c_cpp_error): Replace report_diagnostic
2046 with diagnostic_report_diagnostic.
2048 2017-05-04 Martin Sebor <msebor@redhat.com>
2050 PR translation/80280
2051 * c-attribs.c (handle_alias_ifunc_attribute): Quote a %D directive.
2052 (handle_weakref_attribute): Same.
2054 2017-05-03 Nathan Sidwell <nathan@acm.org>
2056 Canonicalize canonical type hashing
2057 * c-common.c (complete_array_type): Use type_hash_canon.
2059 2017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
2062 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): Remove
2064 (cilk_install_body_pedigree_operations): Likewise.
2065 * cilk.c (cilk_set_spawn_marker): Mark functions that should be
2067 (cilk_gimplify_call_params_in_spawned_fn): Remove.
2068 (cilk_install_body_pedigree_operations): Likewise.
2069 (gimplify_cilk_spawn): Add EXPR_STMT and CLEANUP_POINT_EXPR
2072 2017-04-27 Jakub Jelinek <jakub@redhat.com>
2075 * c-common.c (complete_array_type): Only hash TYPE_TYPELESS_STORAGE
2076 flag on non-aggregate element types.
2078 2017-04-25 Bernd Edlinger <bernd.edlinger@hotmail.de>
2080 * c-common.c (c_type_hasher, type_hash_table): Remove.
2081 (c_common_get_alias_set): Remove unreachable code.
2082 * c-opts.c (c_common_post_options): Make sure cc1 takes only one file.
2084 2017-04-20 Volker Reichelt <v.reichelt@netcologne.de>
2086 * c.opt (Wextra-semi): New C++ warning flag.
2088 2017-04-20 Jakub Jelinek <jakub@redhat.com>
2091 * c-common.c (complete_array_type): Preserve TYPE_TYPELESS_STORAGE.
2093 2017-04-18 Jakub Jelinek <jakub@redhat.com>
2097 * c-common.c (c_common_type_for_mode): Don't handle
2098 widest_*_literal_type_node here.
2099 c_common_signed_or_unsigned_type): Likewise.
2100 (c_common_nodes_and_builtins): Set widest_*_literal_type_node
2101 to *intTI_type_node or *intDI_type_node depending on whether
2102 TImode is supported by the target or not.
2104 2017-04-10 Martin Liska <mliska@suse.cz>
2107 * c-ubsan.c (ubsan_instrument_shift): Evaluate RHS before
2108 doing an UBSAN check.
2110 2017-04-03 Jonathan Wakely <jwakely@redhat.com>
2112 * c-warn.c (do_warn_double_promotion): Fix typo in comment.
2114 2017-03-31 Jakub Jelinek <jakub@redhat.com>
2117 * c-ubsan.h (ubsan_maybe_instrument_reference): Change argument to
2119 * c-ubsan.c (ubsan_maybe_instrument_reference): Likewise. Handle
2120 not just NOP_EXPR to REFERENCE_TYPE, but also INTEGER_CST with
2123 2017-03-31 David Malcolm <dmalcolm@redhat.com>
2125 PR documentation/78732
2126 * c.opt (Wendif-labels): Fix description to refer to
2127 #else rather than #elif.
2129 2017-03-31 Jakub Jelinek <jakub@redhat.com>
2132 * c-common.h (enum rid): Add RID_IS_AGGREGATE.
2133 * c-common.c (c_common_reswords): Add __is_aggregate trait.
2135 2017-03-27 Jakub Jelinek <jakub@redhat.com>
2138 * c-common.c (c_common_mark_addressable_vec): Don't set
2139 TREE_ADDRESSABLE on DECL_HARD_REGISTER.
2141 2017-03-21 Martin Sebor <msebor@redhat.com>
2144 * c-common.c (set_underlying_type): Mark type used only when
2145 original del is declared unused.
2147 2017-03-10 David Malcolm <dmalcolm@redhat.com>
2149 PR translation/79848
2150 * c-format.c (check_format_string): Simplify uses of "%<%s%>" to
2153 2017-03-10 David Malcolm <dmalcolm@redhat.com>
2156 * c-indentation.c (warn_for_misleading_indentation): Remove parens
2157 from inform's message, so that xgettext can locate it.
2159 2017-03-09 Marek Polacek <polacek@redhat.com>
2163 * c-attribs.c (handle_nonnull_attribute): Save the result of default
2164 conversion to the attribute list.
2166 2017-03-09 Martin Liska <mliska@suse.cz>
2168 * c-ada-spec.c (macro_length): Increment value instead of a pointer.
2170 2017-03-03 Jason Merrill <jason@redhat.com>
2172 * c.opt (Wnoexcept-type): New.
2174 2017-03-02 Richard Biener <rguenther@suse.de>
2177 * c-common.c (c_common_mark_addressable_vec): Look through
2180 2017-02-28 Martin Liska <mliska@suse.cz>
2182 * c.opt: Replace space with tabular for options of <number>
2185 2017-02-28 Martin Liska <mliska@suse.cz>
2187 * c.opt: Fix --help=option -Q for options which are of
2190 2017-02-24 Jakub Jelinek <jakub@redhat.com>
2193 * c-common.c (check_function_restrict): New function.
2194 (check_function_arguments): Add FNDECL argument. Call
2195 check_function_restrict if -Wrestrict.
2196 * c-warn.c (warn_for_restrict): Remove ARGS argument, add ARGARRAY
2197 and NARGS. Use auto_vec for ARG_POSITIONS, simplify.
2198 * c-common.h (check_function_arguments): Add FNDECL argument.
2199 (warn_for_restrict): Remove ARGS argument, add ARGARRAY and NARGS.
2201 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
2203 * c-ada-spec.c (dump_ada_function_declaration): Add comment about the
2204 treatment of parameters with pointer-to-tagged type and tidy up.
2205 (print_ada_methods): Remove the special treatment of C++ static member
2208 2017-02-22 Martin Liska <mliska@suse.cz>
2210 * c.opt: Replace inequality signs with square brackets
2213 2017-02-21 Jakub Jelinek <jakub@redhat.com>
2216 * c-attribs.c (handle_mode_attribute): Use build_qualified_type to
2219 2017-02-17 Joseph Myers <joseph@codesourcery.com>
2221 * c-cppbuiltin.c (builtin_define_float_constants): Define
2222 __DECIMAL_DIG__ to the value for long double.
2224 2017-02-15 Marek Polacek <polacek@redhat.com>
2227 * c-warn.c (do_warn_double_promotion): Don't warn if an invalid
2228 conversion has occured.
2230 2017-01-24 David Malcolm <dmalcolm@redhat.com>
2232 * c-common.c (c_common_reswords): Add "__RTL".
2233 * c-common.h (enum rid): Add RID_RTL.
2235 2017-01-20 Marek Polacek <polacek@redhat.com>
2238 * c-common.h (do_warn_duplicated_branches_r): Declare.
2239 * c-gimplify.c (c_genericize): Walk the function tree calling
2240 do_warn_duplicated_branches_r.
2241 * c-warn.c (expr_from_macro_expansion_r): New.
2242 (do_warn_duplicated_branches): New.
2243 (do_warn_duplicated_branches_r): New.
2244 * c.opt (Wduplicated-branches): New option.
2246 2017-01-17 David Malcolm <dmalcolm@redhat.com>
2249 * c-indentation.c (warn_for_misleading_indentation): Use the past
2250 subjunctive in the note.
2252 2017-01-17 Aldy Hernandez <aldyh@redhat.com>
2255 * array-notation-common.c (cilkplus_extract_an_triplets): Convert
2256 start type to integer_type.
2258 2017-01-16 Jakub Jelinek <jakub@redhat.com>
2261 * c.opt (gen-decls): Add Driver flag.
2263 2017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
2266 2017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
2269 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
2271 2017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
2274 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
2276 2017-01-12 Martin Sebor <msebor@redhat.com>
2278 (-Wformat-overflow): ...to this.
2280 2017-01-11 Martin Sebor <msebor@redhat.com>
2283 * c.opt (-Walloca-larger-than, -Wformat-length, -Wformat-truncation):
2284 Also enable for LTO.
2286 2017-01-10 Jason Merrill <jason@redhat.com>
2288 Implement P0195R2, C++17 variadic using.
2289 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_variadic_using.
2291 2017-01-09 Jakub Jelinek <jakub@redhat.com>
2293 PR translation/79019
2294 PR translation/79020
2295 * c.opt (Wnormalized=): Fix typo in description.
2297 2017-01-08 Martin Sebor <msebor@redhat.com>
2300 * c.opt (-Wformat-truncation): New option.
2302 2017-01-06 Alexandre Oliva <aoliva@redhat.com>
2304 * c-pretty-print.c (pp_c_tree_decl_identifier): Convert 16-bit
2305 value to unsigned short to fit in 4 hex digits without
2308 2017-01-05 Eric Botcazou <ebotcazou@adacore.com>
2310 * c.opt (fsso-struct): Add 'native' value.
2312 2017-01-05 Martin Liska <mliska@suse.cz>
2315 * c-opts.c (c_common_post_options): Reject '-' filename for a precompiled
2318 2017-01-04 Marek Polacek <polacek@redhat.com>
2321 * c.opt (Wpointer-compare): New option.
2323 2017-01-04 Jakub Jelinek <jakub@redhat.com>
2326 * c.opt (fsso-struct=): Add RejectNegative.
2328 2017-01-01 Jakub Jelinek <jakub@redhat.com>
2330 Update copyright years.
2332 2016-12-29 Martin Liska <mliska@suse.cz>
2335 * c.opt (strong-eval-order): Add RejectNegative keyword.
2337 2016-12-22 Jason Merrill <jason@redhat.com>
2339 Implement P0522R0, matching of template template arguments.
2340 * c-cppbuiltin.c (c_cpp_builtins): Define
2341 __cpp_template_template_args.
2343 2016-12-21 Jakub Jelinek <jakub@redhat.com>
2346 * c-common.c (struct nonnull_arg_ctx): New type.
2347 (check_function_nonnull): Return bool instead of void. Use
2348 nonnull_arg_ctx as context rather than just location_t.
2349 (check_nonnull_arg): Adjust for the new context type, set
2350 warned_p to true if a warning has been diagnosed.
2351 (check_function_arguments): Return bool instead of void.
2352 * c-common.h (check_function_arguments): Adjust prototype.
2354 2016-12-21 Jason Merrill <jason@redhat.com>
2356 * c.opt (-fnew-ttp-matching): New flag.
2357 * c-opts.c (c_common_post_options): Default on if -std=c++1z.
2359 2016-12-14 Martin Jambor <mjambor@suse.cz>
2361 * c-omp.c: Include omp-general.h instead of omp-low.h.
2362 (c_finish_oacc_wait): Adjusted call to find_omp_clause to use its new
2365 2016-12-14 Martin Sebor <msebor@redhat.com>
2368 * c-common.c (check_nonnull_arg): Disable when optimization
2371 2016-12-12 Marek Polacek <polacek@redhat.com>
2374 * c-common.c (attribute_fallthrough_p): Return false for
2377 2016-12-08 Martin Sebor <msebor@redhat.com>
2380 * c.opt (-Walloc-zero, -Walloc-size-larger-than): New options.
2382 2016-12-08 Martin Sebor <msebor@redhat.com>
2385 * c-pretty-print (pp_c_integer_constant): Avoid formatting type
2388 2016-12-07 Martin Sebor <msebor@redhat.com>
2394 * c.opt (-Wstringop-overflow): New option.
2396 2016-12-02 Maxim Ostapenko <m.ostapenko@samsung.com>
2398 * c-attribs.c (asan odr indicator): New attribute.
2399 (handle_asan_odr_indicator_attribute): New function.
2401 2016-11-26 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2403 * c-common.c (c_common_nodes_and_builtins): Remove initialization of
2406 2016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
2408 * c-common.c (excess_precision_mode_join): New.
2409 (c_ts18661_flt_eval_method): New.
2410 (c_c11_flt_eval_method): Likewise.
2411 (c_flt_eval_method): Likewise.
2412 * c-common.h (excess_precision_mode_join): New.
2413 (c_flt_eval_method): Likewise.
2414 * c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): New.
2415 (cpp_iec_559_value): Call it.
2416 (c_cpp_builtins): Modify logic for __LIBGCC_*_EXCESS_PRECISION__,
2417 call c_flt_eval_method to set __FLT_EVAL_METHOD__ and
2418 __FLT_EVAL_METHOD_TS_18661_3__.
2420 2016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
2422 * c-opts.c (c_common_post_options): Add logic to handle the default
2423 case for -fpermitted-flt-eval-methods.
2425 2016-11-23 Paolo Bonzini <bonzini@gnu.org>
2427 * c.opt (Wexpansion-to-defined): New.
2429 2016-11-23 Jakub Jelinek <jakub@redhat.com>
2432 * c-pragma.c (handle_pragma_target): Don't replace
2433 current_target_pragma, but chainon the new args to the current one.
2435 2016-11-22 Nathan Sidwell <nathan@acm.org>
2437 * array-notation-common.c (cilkplus_extract_an_trplets): Fix
2438 indentation and formatting.
2440 2016-11-21 Martin Sebor <msebor@redhat.com>
2442 * c.opt (-fprintf-return-value): Enable by default.
2444 2016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
2447 * c.opt (-Wbuiltin-declaration-mismatch): New warning.
2448 * c-common.c (c_common_nodes_and_builtins): Initialize
2449 const_tm_ptr_type_node.
2451 2016-11-16 Marek Polacek <polacek@redhat.com>
2454 * c-common.c (c_add_case_label): Turn error_at calls into inform.
2456 2016-11-14 Jakub Jelinek <jakub@redhat.com>
2458 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_structured_bindings.
2460 2016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
2461 Richard Biener <rguenther@suse.de>
2463 * c-common.h (c_common_resword): Add RID_GIMPLE, RID_PHI types.
2464 * c-common.h (enum rid): Add RID_GIMPLE, RID_PHI.
2465 * c.opt (fgimple): New option.
2467 2016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2470 * c-common.h (warn_for_restrict): Declare.
2471 * c-warn.c: Include gcc-rich-location.h.
2472 (warn_for_restrict): New function.
2473 * c-format.c (gcc_tdiag_char_table): Add entry for "Z" specifier.
2474 (gcc_cdiag_char_table): Likewise.
2475 (gcc_cxxdiag_char_table): Likewise.
2476 * c.opt (Wrestrict): New option.
2478 2016-11-13 Eric Botcazou <ebotcazou@adacore.com>
2480 * c-ada-spec.c (print_ada_declaration): For typedef declarations, look
2481 for nested types only if the type is a record or union and dump SLOC.
2483 2016-11-09 Jason Merrill <jason@redhat.com>
2485 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_template_auto.
2487 2016-11-09 Jakub Jelinek <jakub@redhat.com>
2489 * c-ubsan.c (ubsan_instrument_shift): Handle split
2490 -fsanitize=shift-base and -fsanitize=shift-exponent.
2492 2016-11-07 Jason Merrill <jason@redhat.com>
2494 * c.opt (Wc++1z-compat): New.
2495 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_noexcept_function_type.
2497 2016-11-07 Martin Liska <mliska@suse.cz>
2499 * c-warn.c (warn_for_unused_label): Save all labels used
2500 in goto or in &label.
2502 2016-11-03 Jason Merrill <jason@redhat.com>
2504 * c-cppbuiltin.c (c_cpp_builtins): Correct
2505 __cpp_inheriting_constructors.
2507 2016-11-01 Jason Merrill <jason@redhat.com>
2509 * c-cppbuiltin.c (c_cpp_builtins): Update
2510 __cpp_inheriting_constructors.
2512 * c.opt (-fnew-inheriting-ctors): New.
2513 * c-opts.c: Default to on for ABI 11+.
2515 2016-10-31 Jakub Jelinek <jakub@redhat.com>
2518 * c.opt (fext-numeric-literals): Add Var and Init.
2519 * c-opts.c (c_common_handle_option): Don't clear
2520 cpp_opts->ext_numeric_literals for -std=c++{11,14,1z}.
2521 (c_common_post_options): Clear it here if not set
2524 2016-10-28 Aldy Hernandez <aldyh@redhat.com>
2527 * c-pretty-print.c (simple_type_specifier): Do not dereference `t'
2530 2016-10-25 Jakub Jelinek <jakub@redhat.com>
2532 * c-common.h (enum rid): Add RID_BUILTIN_LAUNDER.
2533 * c-common.c (c_common_reswords): Add __builtin_launder.
2535 2016-10-24 Bernd Edlinger <bernd.edlinger@hotmail.de>
2537 * c-common.c (c_common_truthvalue_conversion): Warn for
2538 multiplications in boolean context. Fix the quoting of '<<' and '<'
2539 in the shift warning.
2541 2016-10-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
2543 * c-common.c (c_common_truthvalue_conversion): Fix the comment.
2545 2016-10-20 Jason Merrill <jason@redhat.com>
2547 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_concepts value.
2549 2016-10-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
2551 * c-common.c (c_common_truthvalue_conversion): Warn only for signed
2552 integer shift ops in boolean context.
2554 2016-10-18 Aldy Hernandez <aldyh@redhat.com>
2556 * c.opt (Walloca): New.
2557 (Walloca-larger-than=): New.
2558 (Wvla-larger-than=): New.
2560 2016-10-17 Marek Polacek <polacek@redhat.com>
2562 * c-warn.c (find_array_ref_with_const_idx_r): Remove parameter names.
2563 Return immediately when finding a match.
2564 (warn_tautological_cmp): Remove a boolean variable that is no longer
2567 2016-10-17 Marek Polacek <polacek@redhat.com>
2569 * c-attribs.c: New file.
2570 * c-common.c: Move attributes handling to c-attribs.c.
2571 (get_nonnull_operand): No longer static.
2572 * c-common.h: Move the declarations from c-attribs.c to its own section.
2574 2016-10-14 Jason Merrill <jason@redhat.com>
2576 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_aggregate_bases
2577 and __cpp_deduction_guides.
2579 2016-10-13 Jason Merrill <jason@redhat.com>
2581 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_inline_variables.
2583 2016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
2585 * c-cppbuiltin.c: Include memmodel.h.
2586 * c-opts.c: Likewise.
2587 * c-pragma.c: Likewise.
2588 * c-warn.c: Likewise.
2590 2016-10-12 Jakub Jelinek <jakub@redhat.com>
2592 * c.opt (Wextra): Add as C/C++/ObjC/ObjC++ option.
2593 (Wimplicit-fallthrough=): Enable for these languages by -Wextra.
2594 * c-opts.c (sanitize_cpp_opts): Initialize
2595 cpp_opts->cpp_warn_implicit_fallthrough.
2597 2016-10-11 Marek Polacek <polacek@redhat.com>
2599 * c-common.c (warning_candidate_p): Change the return type to bool
2600 and return true/false instead of 1/0.
2601 (vector_mode_valid_p): Likewise.
2603 2016-10-11 Marek Polacek <polacek@redhat.com>
2605 * c-common.c (fold_for_warn): No longer static.
2606 (bool_promoted_to_int_p): Likewise.
2607 (c_common_get_narrower): Likewise.
2608 (constant_expression_warning): Move to c-warn.c.
2609 (constant_expression_error): Likewise.
2610 (overflow_warning): Likewise.
2611 (warn_logical_operator): Likewise.
2612 (find_array_ref_with_const_idx_r): Likewise.
2613 (warn_tautological_cmp): Likewise.
2614 (expr_has_boolean_operands_p): Likewise.
2615 (warn_logical_not_parentheses): Likewise.
2616 (warn_if_unused_value): Likewise.
2617 (strict_aliasing_warning): Likewise.
2618 (sizeof_pointer_memaccess_warning): Likewise.
2619 (check_main_parameter_types): Likewise.
2620 (conversion_warning): Likewise.
2621 (warnings_for_convert_and_check): Likewise.
2622 (match_case_to_enum_1): Likewise.
2623 (match_case_to_enum): Likewise.
2624 (c_do_switch_warnings): Likewise.
2625 (warn_for_omitted_condop): Likewise.
2626 (readonly_error): Likewise.
2627 (lvalue_error): Likewise.
2628 (invalid_indirection_error): Likewise.
2629 (warn_array_subscript_with_type_char): Likewise.
2630 (warn_about_parentheses): Likewise.
2631 (warn_for_unused_label): Likewise.
2632 (warn_for_div_by_zero): Likewise.
2633 (warn_for_memset): Likewise.
2634 (warn_for_sign_compare): Likewise.
2635 (do_warn_double_promotion): Likewise.
2636 (do_warn_unused_parameter): Likewise.
2637 (record_locally_defined_typedef): Likewise.
2638 (maybe_record_typedef_use): Likewise.
2639 (maybe_warn_unused_local_typedefs): Likewise.
2640 (maybe_warn_bool_compare): Likewise.
2641 (maybe_warn_shift_overflow): Likewise.
2642 (warn_duplicated_cond_add_or_warn): Likewise.
2643 (diagnose_mismatched_attributes): Likewise.
2644 * c-common.h: Move the declarations from c-warn.c to its own section.
2645 * c-warn.c: New file.
2647 2016-10-08 Jason Merrill <jason@redhat.com>
2649 * c-common.c (c_common_truthvalue_conversion): Don't distribute
2650 into COND_EXPR in C++.
2652 2016-10-08 Jakub Jelinek <jakub@redhat.com>
2654 * c-lex.c (c_lex_with_flags) <case CPP_COMMENT>: For CPP_COMMENT
2655 token with PREV_FALLTHROUGH, skip all following CPP_PADDING and
2656 CPP_COMMENT tokens and set add_flags to PREV_FALLTHROUGH afterwards.
2658 2016-10-07 Jakub Jelinek <jakub@redhat.com>
2660 Implement LWG2296 helper intrinsic
2661 * c-common.h (enum rid): Add RID_ADDRESSOF.
2662 * c-common.c (c_common_reswords): Add __builtin_addressof.
2664 2016-10-07 Bernd Edlinger <bernd.edlinger@hotmail.de>
2667 * c-common.c (c_common_truthvalue_conversion): Warn also for
2668 suspicious enum values in boolean context.
2670 2016-10-06 Jakub Jelinek <jakub@redhat.com>
2672 Implement P0258R2 - helper for C++17
2673 std::has_unique_object_representations trait
2674 * c-common.h (enum rid): Add RID_HAS_UNIQUE_OBJ_REPRESENTATIONS.
2675 * c-common.c (c_common_reswords): Add
2676 __has_unique_object_representations.
2678 2016-10-05 Jakub Jelinek <jakub@redhat.com>
2681 * c-ubsan.c (ubsan_instrument_return): Don't call
2682 initialize_sanitizer_builtins here.
2684 2016-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
2686 * c-common.c (c_common_truthvalue_conversion): Warn also for suspicious
2687 conditional expression in boolean context when only one arm is
2690 2016-10-05 Jakub Jelinek <jakub@redhat.com>
2693 * c-ubsan.c (ubsan_instrument_shift): Return NULL_TREE if type0
2696 * c-common.c (c_common_reswords): Update comment for C++11.
2698 2016-10-04 Jason Merrill <jason@redhat.com>
2700 * c-common.c (make_tree_vector_from_ctor): New.
2701 * c-common.h: Declare it.
2703 2016-10-04 Jakub Jelinek <jakub@redhat.com>
2705 * c-cppbuiltin.c (c_cpp_builtins): Don't define
2706 __LIBGCC_JCR_SECTION_NAME__.
2708 2016-10-03 Bernd Edlinger <bernd.edlinger@hotmail.de>
2710 * c-common.c (c_common_truthvalue_conversion): Warn for suspicious
2711 left shift in boolean context.
2713 2016-09-29 Jakub Jelinek <jakub@redhat.com>
2715 Implement P0001R1 - C++17 removal of register storage class specifier
2716 * c.opt (Wregister): New warning.
2717 * c-opts.c (c_common_post_options): Enable -Wregister by
2720 2016-09-29 James Greenhalgh <james.greenhalgh@arm.com>
2722 * c-opts.c (c_common_post_options): Remove special case for
2723 TARGET_FLT_EVAL_METHOD_NON_DEFAULT with -fexcess-precision=standard
2726 2016-09-27 Jakub Jelinek <jakub@redhat.com>
2728 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_capture_star_this for
2731 * c-ada-spec.c (print_ada_declaration): Remove break after return.
2733 2016-09-26 Thomas Preud'homme <thomas.preudhomme@arm.com>
2735 * c-common.c: Include memmodel.h.
2737 2016-09-26 Marek Polacek <polacek@redhat.com>
2739 * c-lex.c (c_common_has_attribute): Handle attribute fallthrough.
2741 2016-09-26 Marek Polacek <polacek@redhat.com>
2744 * c-common.c (c_common_attribute_table): Add fallthrough attribute.
2745 (handle_fallthrough_attribute): New function.
2746 (attribute_fallthrough_p): New function.
2747 * c-common.h (attribute_fallthrough_p): Declare.
2749 2016-09-24 Marek Polacek <polacek@redhat.com>
2752 * c.opt (Wbool-operation): New.
2754 2016-09-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
2756 * c-common.c (c_common_truthvalue_conversion): Inhibit
2757 Wint-in-bool-context warning with from_macro_definition_at.
2758 Mention the expression will always evaluate to true.
2760 2016-09-21 Martin Sebor <msebor@redhat.com>
2763 * c.opt (fprintf-return-value): Temporarily initialize to zero
2764 to unblock bootstrap failures.
2766 2016-09-21 Jakub Jelinek <jakub@redhat.com>
2769 * c.opt (Waligned-new=): Add RejectNegative.
2770 (faligned-new=): Likewise. Spelling fix - change
2771 aligned_new_threshhold to aligned_new_threshold.
2772 * c-cppbuiltin.c (c_cpp_builtins): Change aligned_new_threshhold
2773 to aligned_new_threshold.
2775 2016-09-20 Martin Sebor <msebor@redhat.com>
2778 * c.opt: Add -Wformat-length and -fprintf-return-value.
2780 2016-09-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
2783 * c.opt (Wint-in-bool-context): New warning.
2784 * c-common.c (c_common_truthvalue_conversion): Warn on integer
2785 constants in boolean context.
2787 2016-09-19 Joseph Myers <joseph@codesourcery.com>
2789 * c-common.c (max_align_t_align): Also consider alignment of
2792 2016-09-15 Jason Merrill <jason@redhat.com>
2794 * c-common.c (check_cxx_fundamental_alignment_constraints): Check
2797 2016-09-14 Jason Merrill <jason@redhat.com>
2799 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
2800 limit FIELD_DECL, either.
2802 2016-09-14 Marek Polacek <polacek@redhat.com>
2804 * c-common.c (c_common_truthvalue_conversion): Use false instead of 0.
2805 * c-common.h (build_unary_op): Change nonconvert parameter type to bool.
2806 * c-omp.c (c_finish_omp_atomic): Use false instead of 0.
2808 2016-09-13 David Malcolm <dmalcolm@redhat.com>
2810 * c-common.c (warn_logical_not_parentheses): Replace
2811 rich_location::add_fixit_insert calls with add_fixit_insert_before
2812 and add_fixit_insert_after, eliminating the "next_loc" calculation.
2814 2016-09-13 Jason Merrill <jason@redhat.com>
2815 Tom de Vries <tom@codesourcery.com>
2818 * c-common.c (set_underlying_type): Don't treat array as builtin type.
2820 2016-09-13 Jason Merrill <jason@redhat.com>
2822 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
2825 2016-09-12 Jason Merrill <jason@redhat.com>
2827 * c-common.c (check_cxx_fundamental_alignment_constraints): Fix
2828 bit/byte confusion, allow large alignment for types.
2830 2016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
2833 * c-common.c (warn_for_omitted_condop): Also warn for boolean data.
2835 2016-09-12 David Malcolm <dmalcolm@redhat.com>
2838 * c-format.c (argument_parser::check_argument_type): Add params
2839 "type_start" and "conversion_char". Use the former to generate
2840 offset_to_type_start and pass it and conversion_char to
2842 (check_format_info_main): Capture the start of the type
2843 information as "type_start", and pass it an format_char
2844 to arg_parser.check_argument_type.
2845 (check_format_types): Provide an example in the leading comment.
2846 Add params "offset_to_type_start" and "conversion_char"; pass
2847 them to format_type_warning calls.
2848 (test_get_modifier_for_format_len): Likewise.
2849 (matching_type_p): New function.
2850 (get_format_for_type): Add param "conversion_char" and move
2851 implementation into...
2852 (get_format_for_type_1): ...new function, called twice.
2853 Use new function matching_type_p rather than checking for
2854 TYPE_CANONICAL equality.
2855 (get_corrected_substring): New function.
2856 (format_type_warning): Provide an example in the leading comment.
2857 Add params "offset_to_type_start" and "conversion_char". Replace
2858 call to get_format_for_type with call to get_corrected_substring
2859 and move rejection of hints for widths/precisions there.
2860 (assert_format_for_type_streq): Add param "conversion_char".
2861 (ASSERT_FORMAT_FOR_TYPE_STREQ): Add param CONVERSION_CHAR.
2862 (test_get_format_for_type_printf): Add conversion chars to the
2863 tests, adding coverage for various combinations of integer
2864 vs double conversions, and for preserving octal and hexadecimal
2866 (test_get_format_for_type_scanf): Add conversion chars to the
2869 2016-09-10 Tom de Vries <tom@codesourcery.com>
2872 * c-common.c (build_va_arg): Handle more strict
2873 targetm.canonical_va_list_type. Replace first argument type error with
2876 2016-09-09 Martin Sebor <msebor@redhat.com>
2880 * c-format.c (argument_parser::find_format_char_info): Use %qc
2881 format directive unconditionally.
2883 2016-09-09 Jason Merrill <jason@redhat.com>
2885 Implement C++17 new of over-aligned types.
2886 * c.opt: Add -faligned-new and -Waligned-new.
2887 * c-common.c (max_align_t_align): Split out from...
2888 (cxx_fundamental_alignment_p): ...here.
2889 * c-common.h: Declare it.
2890 * c-cppbuiltin.c (c_cpp_builtins): Handle aligned new.
2892 2016-09-09 Joseph Myers <joseph@codesourcery.com>
2894 * c-cppbuiltin.c (builtin_define_type_width): New function.
2895 (builtin_define_stdint_macros, c_cpp_builtins): Define type width
2898 2016-09-07 David Malcolm <dmalcolm@redhat.com>
2900 * c-common.c (get_cpp_ttype_from_string_type): Handle being passed
2902 (substring_loc::get_location): Move to substring-locations.c,
2903 keeping implementation as...
2904 (c_get_substring_location): New function, from the above, reworked
2905 to use accessors rather than member lookup.
2906 * c-common.h (class substring_loc): Move to substring-locations.h,
2907 replacing with a forward decl.
2908 (c_get_substring_location): New decl.
2909 * c-format.c: Include "substring-locations.h".
2910 (format_warning_va): Move to substring-locations.c.
2911 (format_warning_at_substring): Likewise.
2913 2016-09-06 Martin Sebor <msebor@redhat.com>
2916 * c-format.c (check_function_format): Avoid issuing warnings for
2917 functions unless they call format functions with non-constant
2920 2016-09-06 Richard Biener <rguenther@suse.de>
2923 * c-common.c (c_common_mark_addressable_vec): Handle
2924 COMPOUND_LITERAL_EXPR.
2926 2016-09-05 Marek Polacek <polacek@redhat.com>
2929 * c-common.c (bool_promoted_to_int_p): New function.
2930 (expr_has_boolean_operands_p): New function.
2931 (warn_logical_not_parentheses): Return if expr_has_boolean_operands_p.
2932 (maybe_warn_bool_compare): Use bool_promoted_to_int_p.
2934 2016-09-04 Tom de Vries <tom@codesourcery.com>
2937 2016-08-29 Tom de Vries <tom@codesourcery.com>
2939 * c-common.c (build_va_arg): Replace first argument type error
2942 2016-09-02 Jakub Jelinek <jakub@redhat.com>
2945 * c-omp.c (c_finish_omp_atomic): Reject _Atomic qualified expressions.
2946 (c_finish_omp_for): Reject _Atomic qualified iterators.
2948 2016-09-01 Martin Sebor <msebor@redhat.com>
2950 * c-ada-spec.c (dump_ada_function_declaration): Increase buffer
2951 size to guarantee it fits the output of the formatted function
2952 regardless of its arguments.
2954 2016-09-01 Marek Polacek <polacek@redhat.com>
2957 * c-common.c (resolve_overloaded_builtin): Fix formatting. Add
2960 2016-08-29 Marek Polacek <polacek@redhat.com>
2963 * c-common.c (warn_logical_not_parentheses): Don't warn for
2964 a comparison or a logical operator.
2966 2016-08-29 Tom de Vries <tom@codesourcery.com>
2968 * c-common.c (build_va_arg): Fix type comparison assert.
2970 2016-08-29 Tom de Vries <tom@codesourcery.com>
2972 * c-common.c (build_va_arg): Replace first argument type error
2975 2016-08-29 Tom de Vries <tom@codesourcery.com>
2978 * c-common.c (build_va_arg): Add first argument error. Build va_arg
2979 with error_mark_node as va_list instead of with illegal va_list.
2981 2016-08-25 Marek Polacek <polacek@redhat.com>
2982 David Malcolm <dmalcolm@redhat.com>
2984 * c-common.c (warn_logical_not_parentheses): Print fixit hints.
2985 * c-common.h (warn_logical_not_parentheses): Update declaration.
2987 2016-08-22 Marek Polacek <polacek@redhat.com>
2990 * c-common.c (warn_for_memset): Check type for null.
2992 2016-08-22 Joseph Myers <joseph@codesourcery.com>
2994 * c-cppbuiltin.c (c_cpp_builtins): Check _FloatN and
2995 _FloatNx types for suffixes for built-in functions.
2997 2016-08-19 Joseph Myers <joseph@codesourcery.com>
3000 * c-common.h (RID_FLOAT16, RID_FLOATN_NX_FIRST, RID_FLOAT32)
3001 (RID_FLOAT64, RID_FLOAT128, RID_FLOAT32X, RID_FLOAT64X)
3002 (RID_FLOAT128X): New enum rid values.
3003 (CASE_RID_FLOATN_NX): New macro.
3004 * c-common.c (c_common_reswords): Add _FloatN and _FloatNx
3006 (c_common_type_for_mode): Check for _FloatN and _FloatNx and
3007 corresponding complex types.
3008 (c_common_nodes_and_builtins): For non-C++, register _FloatN and
3009 _FloatNx and corresponding complex types.
3010 (keyword_begins_type_specifier): Use CASE_RID_FLOATN_NX.
3011 * c-cppbuiltin.c (builtin_define_float_constants): Check _FloatN
3012 and _FloatNx types for the widest type for determining
3013 DECIMAL_DIG. Define __LDBL_DECIMAL_DIG__ as well as
3014 __DECIMAL_DIG__ for long double. Handle FMA_SUFFIX being NULL.
3015 (c_cpp_builtins): Call builtin_define_float_constants for _FloatN
3017 * c-lex.c (interpret_float): Handle _FloatN and _FloatNx
3019 * c-pretty-print.c (pp_c_floating_constant): Handle _FloatN and
3022 2016-08-18 David Malcolm <dmalcolm@redhat.com>
3024 * c-opts.c (c_diagnostic_finalizer): Update for change to
3025 diagnostic_show_locus.
3027 2016-08-18 David Malcolm <dmalcolm@redhat.com>
3029 * c-common.c: Include "spellcheck.h".
3030 (cb_get_suggestion): New function.
3031 * c-common.h (cb_get_suggestion): New decl.
3032 * c-lex.c (init_c_lex): Initialize cb->get_suggestion to
3035 2016-08-18 Marek Polacek <polacek@redhat.com>
3038 * c-common.c (get_atomic_generic_size): Disallow pointer-to-function
3041 2016-08-16 David Malcolm <dmalcolm@redhat.com>
3044 * c-common.c (substring_loc::get_range): Rename to...
3045 (substring_loc::get_location): ...this, converting param from a
3046 source_range * to a location_t *. Call
3047 get_source_location_for_substring rather than
3048 get_source_range_for_substring, and pass in m_caret_idx.
3049 * c-common.h (substring_loc::substring_loc): Add param "caret_idx".
3050 (substring_loc::get_range): Replace with...
3051 (substring_loc::get_location): ...this.
3052 (substring_loc::set_caret_index): New method.
3053 (substring_loc): Add field m_caret_idx.
3054 * c-format.c (format_warning_va): Update for above changes.
3055 Rename local "substring_loc" to "fmt_substring_loc" to avoid
3056 clashing with type name.
3057 (format_warning_at_char): Add caret_idx param to substring_loc ctor.
3058 (check_argument_type): Likewise.
3059 (format_type_warning): Rename param "fmt_loc" to "whole_fmt_loc"
3060 Use a copy when emitting warnings, setting the caret index from TYPE.
3062 2016-08-16 Eric Botcazou <ebotcazou@adacore.com>
3063 Arnaud Charlet <charlet@adacore.com>
3065 * c-ada-spec.c (dump_number): New function.
3066 (handle_escape_character): Likewise.
3067 (print_ada_macros): Add handling of constant integers and strings.
3069 2016-08-12 Marek Polacek <polacek@redhat.com>
3072 * c-common.c (scalar_to_vector): Adjust fall through comment.
3073 * c-opts.c (c_common_handle_option): Likewise.
3074 * c-pragma.c (handle_pragma_pack): Add FALLTHRU.
3075 * c-pretty-print.c (c_pretty_printer::postfix_expression): Adjust
3076 fall through comment.
3077 * cilk.c (extract_free_variables): Add FALLTHRU.
3079 2016-08-10 Jason Merrill <jason@redhat.com>
3081 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_if_constexpr.
3083 2016-08-09 Jason Merrill <jason@redhat.com>
3085 * c-common.c (c_common_attribute_table): vector_size affects type
3088 2016-08-09 Marek Polacek <polacek@redhat.com>
3091 * c-ada-spec.c (dump_generic_ada_node): Add return.
3093 2016-08-09 Jason Merrill <jason@redhat.com>
3095 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_constexpr for
3096 C++17 constexpr lambdas.
3098 2016-08-08 David Malcolm <dmalcolm@redhat.com>
3101 * c-common.h (selftest::c_format_c_tests): New declaration.
3102 (selftest::run_c_tests): New declaration.
3103 * c-format.c: Include "selftest.h.
3104 (format_warning_va): Add param "corrected_substring" and use
3105 it to add a replacement fix-it hint.
3106 (format_warning_at_substring): Likewise.
3107 (format_warning_at_char): Update for new param of
3109 (argument_parser::check_argument_type): Pass "fki" to
3111 (check_format_types): Add param "fki" and pass it to
3112 format_type_warning.
3113 (deref_n_times): New function.
3114 (get_modifier_for_format_len): New function.
3115 (selftest::test_get_modifier_for_format_len): New function.
3116 (get_format_for_type): New function.
3117 (format_type_warning): Add param "fki" and use it to attempt
3118 to provide hints for argument types when calling
3119 format_warning_at_substring.
3120 (selftest::get_info): New function.
3121 (selftest::assert_format_for_type_streq): New function.
3122 (ASSERT_FORMAT_FOR_TYPE_STREQ): New macro.
3123 (selftest::test_get_format_for_type_printf): New function.
3124 (selftest::test_get_format_for_type_scanf): New function.
3125 (selftest::c_format_c_tests): New function.
3127 2016-08-08 David Malcolm <dmalcolm@redhat.com>
3130 * c-format.c: Include "diagnostic.h".
3131 (location_column_from_byte_offset): Delete.
3132 (location_from_offset): Delete.
3133 (format_warning_va): New function.
3134 (format_warning_at_substring): New function.
3135 (format_warning_at_char): New function.
3136 (check_format_arg): Capture location of format_tree and pass to
3137 check_format_info_main.
3138 (argument_parser): Add fields "start_of_this_format" and
3139 "format_string_cst".
3140 (flag_chars_t::validate): Add param "format_string_cst". Convert
3141 warning_at call using location_from_offset to call to
3142 format_warning_at_char.
3143 (argument_parser::argument_parser): Add param "format_string_cst_"
3144 and use use it to initialize field "format_string_cst".
3145 Initialize new field "start_of_this_format".
3146 (argument_parser::read_format_flags): Convert warning_at call
3147 using location_from_offset to a call to format_warning_at_char.
3148 (argument_parser::read_any_format_left_precision): Likewise.
3149 (argument_parser::read_any_format_precision): Likewise.
3150 (argument_parser::read_any_other_modifier): Likewise.
3151 (argument_parser::find_format_char_info): Likewise, in three places.
3152 (argument_parser::parse_any_scan_set): Likewise, in one place.
3153 (argument_parser::handle_conversions): Likewise, in two places.
3154 (argument_parser::check_argument_type): Add param "fmt_param_loc"
3155 and use it to make a substring_loc. Pass the latter to
3157 (check_format_info_main): Add params "fmt_param_loc" and
3158 "format_string_cst". Convert warning_at calls using
3159 location_from_offset to calls to format_warning_at_char. Pass the
3160 new params to the arg_parser ctor. Pass "format_string_cst" to
3161 flag_chars.validate. Pass "fmt_param_loc" to
3162 arg_parser.check_argument_type.
3163 (check_format_types): Convert first param from a location_t
3164 to a const substring_loc & and rename to "fmt_loc". Attempt
3165 to extract the range of the relevant parameter and pass it
3166 to format_type_warning.
3167 (format_type_warning): Convert first param from a location_t
3168 to a const substring_loc & and rename to "fmt_loc". Add
3169 params "param_range" and "type". Replace calls to warning_at
3170 with calls to format_warning_at_substring.
3172 2016-08-08 David Malcolm <dmalcolm@redhat.com>
3174 * c-format.c (class flag_chars_t): New class.
3175 (struct length_modifier): New struct.
3176 (class argument_parser): New class.
3177 (flag_chars_t::flag_chars_t): New ctor.
3178 (flag_chars_t::has_char_p): New method.
3179 (flag_chars_t::add_char): New method.
3180 (flag_chars_t::validate): New method.
3181 (flag_chars_t::get_alloc_flag): New method.
3182 (flag_chars_t::assignment_suppression_p): New method.
3183 (argument_parser::argument_parser): New ctor.
3184 (argument_parser::read_any_dollar): New method.
3185 (argument_parser::read_format_flags): New method.
3186 (argument_parser::read_any_format_width): New method.
3187 (argument_parser::read_any_format_left_precision): New method.
3188 (argument_parser::read_any_format_precision): New method.
3189 (argument_parser::handle_alloc_chars): New method.
3190 (argument_parser::read_any_length_modifier): New method.
3191 (argument_parser::read_any_other_modifier): New method.
3192 (argument_parser::find_format_char_info): New method.
3193 (argument_parser::validate_flag_pairs): New method.
3194 (argument_parser::give_y2k_warnings): New method.
3195 (argument_parser::parse_any_scan_set): New method.
3196 (argument_parser::handle_conversions): New method.
3197 (argument_parser::check_argument_type): New method.
3198 (check_format_info_main): Introduce classes argument_parser
3199 and flag_chars_t, moving the code within the loop into methods
3200 of these classes. Make various locals "const".
3202 2016-08-05 David Malcolm <dmalcolm@redhat.com>
3204 * c-common.c: Include "substring-locations.h".
3205 (get_cpp_ttype_from_string_type): New function.
3206 (g_string_concat_db): New global.
3207 (substring_loc::get_range): New method.
3208 * c-common.h (g_string_concat_db): New declaration.
3209 (class substring_loc): New class.
3210 * c-lex.c (lex_string): When concatenating strings, capture the
3211 locations of all tokens using a new obstack, and record the
3212 concatenation locations within g_string_concat_db.
3213 * c-opts.c (c_common_init_options): Construct g_string_concat_db
3216 2016-07-29 Marek Polacek <polacek@redhat.com>
3219 * c-common.c (c_common_truthvalue_conversion): Use LOCATION for the
3220 parentheses warning.
3223 * c-common.c (handle_alloc_align_attribute): Also check FUNCTION_DECL.
3225 2016-07-28 Martin Liska <mliska@suse.cz>
3227 PR gcov-profile/68025
3228 * c-common.c (handle_no_profile_instrument_function_attribute):
3230 2016-07-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
3232 * c-common.c (check_user_alignment): Use LOG2_BITS_PER_UNIT instead of
3235 2016-07-25 Jason Merrill <jason@redhat.com>
3238 * c.opt (fconstexpr-loop-limit): New.
3240 2016-07-22 Martin Sebor <msebor@redhat.com>
3243 * c-common.c (resolve_overloaded_builtin): Avoid converting
3244 __atomic_compare_exchange_n return type to that of what its
3245 first argument points to.
3247 2016-07-22 Uros Bizjak <ubizjak@gmail.com>
3249 * c-common.c: Use HOST_WIDE_INT_M1U instead of
3250 ~(unsigned HOST_WIDE_INT) 0.
3252 2016-07-22 Martin Liska <mliska@suse.cz>
3254 PR gcov-profile/69028
3255 PR gcov-profile/62047
3256 * cilk.c (create_cilk_helper_decl): Set location of a new decl
3257 to the current_function_decl.
3259 2016-07-21 Jason Merrill <jason@redhat.com>
3262 * c-common.c (c_common_truthvalue_conversion): Check
3263 c_inhibit_evaluation_warnings for warning about address of
3266 2016-07-20 David Malcolm <dmalcolm@redhat.com>
3268 * c-common.h (lookup_name_fuzzy): Convert return type from tree to
3271 2016-07-15 Jason Merrill <jason@redhat.com>
3273 * c-opts.c (c_common_post_options): Update -fabi-version default to 11.
3275 2016-07-15 Jakub Jelinek <jakub@redhat.com>
3278 * c-common.h (enum lookup_name_fuzzy_kind): Add
3279 FUZZY_LOOKUP_FUNCTION_NAME.
3281 2016-07-08 Jason Merrill <jason@redhat.com>
3283 P0145: Refining Expression Order for C++.
3284 * c.opts (-fargs-in-order): Rename to -fstrong-eval-order.
3287 2016-07-05 Markus Trippelsdorf <markus@trippelsdorf.de>
3290 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_rvalue_references.
3292 2016-06-29 Thomas Schwinge <thomas@codesourcery.com>
3294 * c-pragma.h (enum pragma_kind): Rename
3295 PRAGMA_OMP_DECLARE_REDUCTION to PRAGMA_OMP_DECLARE. Adjust all
3298 2016-06-29 Richard Biener <rguenther@suse.de>
3301 * c-common.c (c_common_get_alias_set): Remove union type punning case.
3303 2016-06-24 Jason Merrill <jason@redhat.com>
3305 P0145R2: Refining Expression Order for C++.
3306 * c-common.c (verify_tree) [COMPOUND_EXPR]: Fix handling on LHS of
3309 2016-06-24 Jakub Jelinek <jakub@redhat.com>
3311 * c-common.c (check_builtin_function_arguments): Require last
3312 argument of BUILT_IN_*_OVERFLOW_P to have INTEGER_TYPE type.
3313 Adjust wording of diagnostics for BUILT_IN_*_OVERLFLOW
3314 if the last argument is pointer to enumerated or boolean type.
3316 2016-06-22 David Malcolm <dmalcolm@redhat.com>
3319 * c-common.h (enum lookup_name_fuzzy_kind): New enum.
3320 (lookup_name_fuzzy): New prototype.
3322 2016-06-21 John David Anglin <danglin@gcc.gnu.org>
3324 * c-common.c (get_source_date_epoch): Use int64_t instead of long long.
3326 2016-06-14 Jason Merrill <jason@redhat.com>
3328 P0145R2: Refining Expression Order for C++.
3329 * c.opt (fargs-in-order): New.
3330 * c-opts.c (c_common_post_options): Adjust flag_args_in_order.
3332 2016-06-13 Jakub Jelinek <jakub@redhat.com>
3335 * c-gimplify.c (ubsan_walk_array_refs_r): Set *walk_subtrees = 0 on
3336 all BIND_EXPRs, and on all BIND_EXPRs recurse also on BIND_EXPR_BODY.
3338 PR preprocessor/71183
3339 * c-ppoutput.c (init_pp_output): Set cb->get_source_date_epoch
3340 to cb_get_source_date_epoch.
3342 2016-06-10 Jakub Jelinek <jakub@redhat.com>
3345 * c.opt (Wpsabi): Add Warning flag.
3347 2016-06-10 Martin Sebor <msebor@redhat.com>
3350 * c-common.c (handle_nonnull_attribute): Accept
3351 the nonnull attribute in type-generic builtins.
3353 2016-06-09 Martin Sebor <msebor@redhat.com>
3356 * c-common.c (builtin_function_validate_nargs): Make text of error
3357 message consistent with others like it.
3359 2016-06-08 Martin Sebor <msebor@redhat.com>
3360 Jakub Jelinek <jakub@redhat.com>
3364 * c-common.c (check_builtin_function_arguments): Handle
3365 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
3367 2016-06-08 Richard Biener <rguenther@suse.de>
3369 * c-common.c (parse_optimize_options): Improve diagnostic messages.
3371 2016-06-07 Richard Biener <rguenther@suse.de>
3374 * c-common.c (parse_optimize_options): Only apply CL_OPTIMIZATION
3375 options and warn about others.
3377 2016-06-01 Eduard Sanou <dhole@openmailbox.org>
3379 * c-common.c (get_source_date_epoch): Rename to
3380 cb_get_source_date_epoch.
3381 * c-common.c (cb_get_source_date_epoch): Use a single generic erorr
3382 message when the parsing fails. Use error_at instead of fatal_error.
3383 * c-common.h (get_source_date_epoch): Rename to
3384 cb_get_source_date_epoch.
3385 * c-common.h (cb_get_source_date_epoch): Prototype.
3386 * c-common.h (MAX_SOURCE_DATE_EPOCH): Define.
3387 * c-common.h (c_omp_region_type): Remove trailing comma.
3388 * c-lex.c (init_c_lex): Set cb->get_source_date_epoch callback.
3389 * c-lex.c (c_lex_with_flags): Remove initialization of
3390 pfile->source_date_epoch.
3392 2016-05-30 Jakub Jelinek <jakub@redhat.com>
3395 * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_DEPEND to
3396 C_OMP_CLAUSE_SPLIT_TARGET. Put OMP_CLAUSE_NOWAIT to
3397 C_OMP_CLAUSE_SPLIT_TARGET if combined with target construct,
3398 instead of C_OMP_CLAUSE_SPLIT_FOR.
3400 2016-05-24 Richard Biener <rguenther@suse.de>
3404 * c-common.h (convert_vector_to_pointer_for_subscript): Rename to ...
3405 (convert_vector_to_array_for_subscript): ... this.
3406 * c-common.c (convert_vector_to_pointer_for_subscript): Use a
3407 VIEW_CONVERT_EXPR to an array type. Rename to ...
3408 (convert_vector_to_array_for_subscript): ... this.
3410 2016-05-12 Marek Polacek <polacek@redhat.com>
3413 * c-common.c (pointer_int_sum): Call size_in_bytes_loc instead of
3414 size_in_bytes and pass LOC to it.
3416 2016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
3419 * c.opt (Wduplicate-decl-specifier): New option.
3421 2016-05-11 Marek Polacek <polacek@redhat.com>
3424 * c-common.c (diagnose_mismatched_attributes): New function.
3425 * c-common.h (diagnose_mismatched_attributes): Declare.
3427 2016-05-04 Marek Polacek <polacek@redhat.com>
3429 * c.opt (Wdangling-else): New option.
3431 2016-05-03 Marek Polacek <polacek@redhat.com>
3434 * c-common.c (builtin_function_validate_nargs): Add location
3436 (check_builtin_function_arguments): Add location and arguments
3437 parameters. Use them.
3438 * c-common.h (check_builtin_function_arguments): Update declaration.
3440 2016-05-03 Richard Biener <rguenther@suse.de>
3442 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Do not
3443 allow call args to gimplify to SSA names.
3445 2016-05-03 Marek Polacek <polacek@redhat.com>
3447 * c-common.h (enum c_omp_region_type): Remove stray comma.
3449 2016-05-02 Cesar Philippidis <cesar@codesourcery.com>
3451 * c-common.h (enum c_omp_region_type): Define.
3453 2016-05-02 Richard Sandiford <richard.sandiford@arm.com>
3455 * c-common.c (shorten_compare): Use wi::to_wide.
3457 2016-04-29 Cesar Philippidis <cesar@codesourcery.com>
3460 * c-common.h (c_oacc_split_loop_clauses): Add boolean argument.
3461 * c-omp.c (c_oacc_split_loop_clauses): Use it to duplicate
3462 reduction clauses in acc parallel loops.
3464 2016-04-29 Marek Polacek <polacek@redhat.com>
3467 * c-common.c (warn_for_memset): Check domain before accessing it.
3469 2016-04-29 Dominik Vogt <vogt@linux.vnet.ibm.com>
3472 * c-common.c (handle_aligned_attribute): Allow 0 as an argument to the
3473 "aligned" attribute.
3475 2016-04-28 Jason Merrill <jason@redhat.com>
3477 * c-lex.c (c_common_has_attribute): Handle nodiscard.
3479 2016-04-28 Eduard Sanou <dhole@openmailbox.org>
3480 Matthias Klose <doko@debian.org>
3482 * c-common.c (get_source_date_epoch): New function, gets the environment
3483 variable SOURCE_DATE_EPOCH and parses it as long long with error
3485 * c-common.h (get_source_date_epoch): Prototype.
3486 * c-lex.c (c_lex_with_flags): set parse_in->source_date_epoch.
3488 2015-04-27 Ryan Burn <contact@rnburn.com>
3492 * cilk.c (cilk_ignorable_spawn_rhs_op): Change to external linkage.
3493 (cilk_recognize_spawn): Renamed from recognize_spawn and change to
3495 (cilk_detect_and_unwrap): Corresponding changes.
3496 (extract_free_variables): Don't extract free variables from
3497 AGGR_INIT_EXPR slot.
3498 * c-common.h (cilk_ignorable_spawn_rhs_op): Prototype.
3499 (cilk_recognize_spawn): Likewise.
3501 2016-04-27 Bernd Schmidt <bschmidt@redhat.com>
3503 * c.opt (Wmemset-elt-size): New option.
3504 * c-common.c (warn_for_memset): New function.
3505 * c-common.h (warn_for_memset): Declare.
3507 2016-04-25 Jason Merrill <jason@redhat.com>
3509 * c-common.c (handle_unused_attribute): Accept CONST_DECL.
3511 * c-common.h: Declare it.
3512 * c-lex.c (c_common_has_attribute): Add maybe_unused.
3514 2016-04-22 Jason Merrill <jason@redhat.com>
3516 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_range_based_for.
3518 2016-04-20 Ilya Verbin <ilya.verbin@intel.com>
3521 * c-cilkplus.c (c_finish_cilk_clauses): Remove function.
3522 * c-common.h (c_finish_cilk_clauses): Remove declaration.
3524 2016-04-18 Michael Matz <matz@suse.de>
3526 * c-common.c (handle_aligned_attribute): Use SET_TYPE_ALIGN
3529 2016-04-17 Eric Botcazou <ebotcazou@adacore.com>
3531 * c-ada-spec.c (get_underlying_decl): Return the typedef, if any.
3532 (dump_generic_ada_node) <POINTER_TYPE>: Clean up handling of access
3533 to incomplete types.
3534 (dump_nested_type): Remove redundant tests and tidy up.
3535 (print_ada_declaration): Also set TREE_VISITED on the declaration of
3536 a type which is the typedef of an original type.
3538 2016-04-15 Marek Polacek <polacek@redhat.com>
3541 * c-common.c (build_va_arg): Change two asserts into errors and return
3544 2016-04-13 Marek Polacek <polacek@redhat.com>
3547 * c-indentation.c (should_warn_for_misleading_indentation): Bail out
3548 for switch statements, too.
3550 2016-03-28 Jason Merrill <jason@redhat.com>
3552 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_range_based_for.
3554 2016-03-23 Marek Polacek <polacek@redhat.com>
3557 * c.opt (Wignored-attributes): New option.
3559 2016-03-22 David Malcolm <dmalcolm@redhat.com>
3562 * c-indentation.c (warn_for_misleading_indentation): Rewrite the
3563 diagnostic text, reversing the order of the warning and note so
3564 that they appear in source order.
3566 2016-03-17 Marek Polacek <polacek@redhat.com>
3569 * c-common.c (resolve_overloaded_builtin): Set TREE_USED for the fetch
3572 2016-03-14 Jason Merrill <jason@redhat.com>
3574 * c-cppbuiltin.c (c_cpp_builtins): Set __cpp_hex_float.
3576 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_range_based_for.
3578 2016-03-09 Richard Biener <rguenther@suse.de>
3581 * c-common.c (strict_aliasing_warning): Add back
3582 alias_sets_conflict_p check.
3584 2016-03-08 Jason Merrill <jason@redhat.com>
3586 * c-opts.c (set_std_cxx1z): Don't enable concepts.
3588 2016-03-04 David Malcolm <dmalcolm@redhat.com>
3591 * c-indentation.c (get_visual_column): Move code to determine next
3593 (next_tab_stop): ...this new function.
3594 (line_contains_hash_if): Delete function.
3595 (detect_preprocessor_logic): Delete function.
3596 (get_first_nws_vis_column): New function.
3597 (detect_intervening_unindent): New function.
3598 (should_warn_for_misleading_indentation): Replace call to
3599 detect_preprocessor_logic with a call to
3600 detect_intervening_unindent.
3602 2016-03-04 David Malcolm <dmalcolm@redhat.com>
3605 * c-indentation.c (should_warn_for_misleading_indentation): When
3606 suppressing warnings about cases where the guard and body are on
3607 the same column, only use the first non-whitespace column in place
3608 of the guard token column when dealing with "else" clauses.
3609 When rejecting aligned BODY and NEXT, loosen the requirement
3610 from equality with the first non-whitespace of guard to simply
3611 that they not be indented relative to it.
3613 2016-03-04 Richard Biener <rguenther@suse.de>
3616 * c-common.c (strict_aliasing_warning): Use alias_set_subset_of
3617 instead of alias_sets_conflict_p.
3619 2016-03-01 Marek Polacek <polacek@redhat.com>
3622 * c-common.c (reject_gcc_builtin): Check for FUNCTION_DECL rather than
3625 2016-02-22 Martin Sebor <msebor@redhat.com>
3628 * c-common.c (check_builtin_function_arguments): Validate and
3629 reject invalid arguments to __builtin_alloca_with_align.
3631 2016-02-20 Mark Wielaard <mjw@redhat.com>
3634 * c.opt (Wunused-const-variable): Turn into Alias for...
3635 (Wunused-const-variable=): New option.
3637 2016-02-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
3640 * c-opts.c (c_common_post_options): Move call to set_std_cxx14 from
3642 (c_common_init_options): ...to here.
3643 (set_std_cxx98): Initialize flag_isoc94 and flag_isoc99.
3645 2016-02-19 Jakub Jelinek <jakub@redhat.com>
3648 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_GRAINSIZE.
3649 (init_pragma): Register PRAGMA_CILK_GRAINSIZE even for
3650 flag_preprocess_only.
3652 2016-02-16 Jakub Jelinek <jakub@redhat.com>
3655 * c.opt (Wnonnull-compare): Enable for -Wall.
3657 2016-02-15 Jakub Jelinek <jakub@redhat.com>
3660 * c-common.c (sync_resolve_size): Diagnose too few arguments
3661 even when params is non-NULL empty vector.
3663 2016-02-08 Bernd Schmidt <bschmidt@redhat.com>
3666 * c.opt (fshort-double): Remove.
3668 2016-02-05 Martin Sebor <msebor@redhat.com>
3671 * c.opt (Warning options): Update -Wplacement-new to take
3672 an optional argument.
3674 2016-02-01 Jakub Jelinek <jakub@redhat.com>
3676 PR preprocessor/69543
3678 * c-pragma.c (handle_pragma_diagnostic): Pass input_location
3679 instead of loc to control_warning_option.
3681 2016-02-01 Nathan Sidwell <nathan@codesourcery.com>
3683 * c.opt (fopenacc-dim=): New option.
3685 2016-01-27 Ryan Burn <contact@rnburn.com>
3688 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Change to use
3689 gimplify_arg. Removed superfluous post_p argument.
3690 * c-family.h (cilk_gimplify_call_params_in_spawned_fn): Removed
3691 superfluous post_p argument.
3692 * c-gimplify.c (c_gimplify_expr): Likewise.
3694 2016-01-26 David Malcolm <dmalcolm@redhat.com>
3697 * c-opts.c (c_diagnostic_finalizer): Replace invocation of
3698 pp_newline_and_flush with pp_flush.
3700 2016-01-20 Martin Sebor <msebor@redhat.com>
3703 * c-common.c (sync_resolve_size): Avoid printing diagnostic about
3704 an incompatible argument when the argument isn't a valid tree node.
3706 2016-01-18 Jason Merrill <jason@redhat.com>
3709 * c-common.c (check_function_arguments_recurse): Fold the whole
3710 COND_EXPR, not just the condition.
3712 2016-01-18 Tom de Vries <tom@codesourcery.com>
3714 * c-omp.c (c_oacc_split_loop_clauses): Don't copy OMP_CLAUSE_REDUCTION,
3715 classify as loop clause.
3717 2016-01-15 Jakub Jelinek <jakub@redhat.com>
3720 * c-pragma.c (c_register_pragma_1): Adjust comment to note that
3721 C++ FE no longer has limit on number of pragmas.
3723 2015-01-14 Ryan Burn <contact@rnburn.com>
3726 * cilk.c (create_cilk_wrapper_body): Call fold_build_cleanup_point_expr
3727 to add missing cleanup point.
3729 2016-01-14 David Malcolm <dmalcolm@redhat.com>
3732 * c-indentation.c (get_visual_column): Add location_t param.
3733 Handle the column number being zero by effectively disabling the
3734 warning, with an "inform".
3735 (should_warn_for_misleading_indentation): Add location_t argument
3736 for all uses of get_visual_column.
3738 2016-01-10 Patrick Palka <ppalka@gcc.gnu.org>
3741 * c-indentation.c (should_warn_for_misleading_indentation):
3742 Don't warn about do-while statements.
3744 2016-01-07 Martin Sebor <msebor@redhat.com>
3747 * c-common.c (sync_resolve_size): Reject first argument when it's
3750 2016-01-05 David Malcolm <dmalcolm@redhat.com>
3753 * c-indentation.c (get_visual_column): Remove default argument.
3754 (should_warn_for_misleading_indentation): For the multiline case,
3755 update call to get_visual_column for next_stmt_exploc so that it
3756 captures the location of the first non-whitespace character in the
3757 relevant line. Don't issue warnings if there is non-whitespace
3758 before the next statement.
3760 2016-01-04 Jakub Jelinek <jakub@redhat.com>
3762 Update copyright years.
3764 2015-12-21 David Malcolm <dmalcolm@redhat.com>
3766 * c-common.c (binary_op_error): Convert first param from
3767 location_t to rich_location * and use it when emitting an error.
3768 * c-common.h (binary_op_error): Convert first param from
3769 location_t to rich_location *.
3771 2015-12-16 David Malcolm <dmalcolm@redhat.com>
3773 * c-common.h (conflict_marker_get_final_tok_kind): New prototype.
3774 * c-lex.c (conflict_marker_get_final_tok_kind): New function.
3776 2015-12-15 Ilya Verbin <ilya.verbin@intel.com>
3778 * c-common.c (c_common_attribute_table): Handle "omp declare target
3781 2015-12-14 Jakub Jelinek <jakub@redhat.com>
3784 * c.opt (Wmissing-format-attribute, Wnormalized): Add Warning option.
3786 2014-12-12 Tobias Burnus <burnus@net-b.de>
3789 * c-format.c (gcc_gfc_char_table): Add 'q' flag to remaining
3790 specifiers (%d, %i,%u and %c).
3792 2015-12-10 David Malcolm <dmalcolm@redhat.com>
3794 * c.opt (Wmisleading-indentation): Add to -Wall for C and C++.
3796 2015-12-08 Jakub Jelinek <jakub@redhat.com>
3800 * c.opt (Wfloat-conversion, Wsign-conversion): Add Warning.
3801 * c-pragma.c (handle_pragma_diagnostic): Adjust
3802 control_warning_option caller.
3804 2015-12-07 David Malcolm <dmalcolm@redhat.com>
3806 * c-common.c (c_cpp_error): Update for change to
3807 rich_location::set_range.
3809 2015-12-04 Paolo Bonzini <bonzini@gnu.org>
3811 * c-common.c (maybe_warn_shift_overflow): Warn on all overflows if
3812 shifting 1 out of the sign bit.
3814 2015-12-04 Kirill Yukhin <kirill.yukhin@intel.com>
3816 * c-common.c (c_common_attribute_table[]): Update max arguments
3817 count for "simd" attribute.
3818 (handle_simd_attribute): Parse "notinbranch" and "inbranch" arguments.
3820 2015-12-03 Jakub Jelinek <jakub@redhat.com>
3822 PR preprocessor/57580
3823 * c-ppoutput.c (print): Change printed field to bool.
3824 Move src_file last for smaller padding.
3825 (init_pp_output): Set print.printed to false instead of 0.
3826 (scan_translation_unit): Fix up formatting. Set print.printed
3827 to true after printing something other than newline.
3828 (scan_translation_unit_trad): Set print.printed to true instead of 1.
3829 (maybe_print_line_1): Set print.printed to false instead of 0.
3830 (print_line_1): Likewise.
3831 (do_line_change): Set print.printed to true instead of 1.
3832 (cb_define, dump_queued_macros, cb_include, cb_def_pragma,
3833 dump_macro): Set print.printed to false after printing newline.
3835 2015-12-02 Jason Merrill <jason@redhat.com>
3837 * c-common.c (fold_for_warn): New.
3838 (warn_logical_operator, warn_tautological_cmp)
3839 (check_function_arguments_recurse, maybe_warn_bool_compare): Use it.
3841 * c-common.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
3842 (c_fully_fold_internal, decl_constant_value_for_optimization):
3844 * c-common.h: Don't declare decl_constant_value_for_optimization.
3846 2015-12-02 Joseph Myers <joseph@codesourcery.com>
3849 * c-common.h (c_build_qualified_type): Add extra default
3852 2015-12-01 Julian Brown <julian@codesourcery.com>
3853 Cesar Philippidis <cesar@codesourcery.com>
3854 James Norris <James_Norris@mentor.com>
3856 * c-pragma.c (oacc_pragmas): Add PRAGMA_OACC_HOST_DATA.
3857 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_HOST_DATA.
3858 (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_USE_DEVICE.
3860 2015-11-30 Eric Botcazou <ebotcazou@adacore.com>
3862 * c-ada-spec.c (print_ada_macros): Remove redundant blank line.
3863 (decl_sloc_common): Delete and move bulk of processing to...
3864 (decl_sloc): ...here.
3865 (pp_ada_tree_identifier): Remove reference to QUAL_UNION_TYPE.
3866 (dump_ada_double_name): Remove S parameter and compute the suffix.
3867 (dump_ada_array_type): Add PARENT parameter. Simplify computation of
3868 element type and deal with an anonymous one.
3869 (dump_ada_template): Use RECORD_OR_UNION_TYPE_P macro.
3870 (dump_generic_ada_node): Tweak. Adjust call to dump_ada_array_type
3871 and remove reference to QUAL_UNION_TYPE.
3872 (dump_nested_types): Make 2 passes on the fields and move bulk to...
3873 (dump_nested_type): ...here. New function extracted from above.
3874 Generate a full declaration for anonymous element type of arrays.
3875 (print_ada_declaration): Really skip anonymous declarations. Remove
3876 references to QUAL_UNION_TYPE. Adjust call to dump_ada_array_type.
3877 Clean up processing of declarations of array types and objects.
3878 (print_ada_struct_decl): Remove reference to QUAL_UNION_TYPE.
3879 Remove obsolete code and tidy up.
3881 2015-11-29 Jan Hubicka <hubicka@ucw.cz>
3884 * c-common.c (handle_transparent_union_attribute): Update
3887 2015-11-27 Martin Liska <mliska@suse.cz>
3890 * array-notation-common.c (cilkplus_extract_an_triplets):
3891 Release vector of vectors.
3892 * cilk.c (gimplify_cilk_spawn): Free allocated memory.
3894 2015-11-26 Eric Botcazou <ebotcazou@adacore.com>
3897 * c-ada-spec.c (dump_nested_types): Add guard for error_mark_node.
3898 (print_ada_struct_decl): Likewise.
3900 2015-11-23 Igor Zamyatin <igor.zamyatin@intel.com>
3903 * c-gimplify.c (c_gimplify_expr): Stop the process if see an error.
3904 * cilk.c (recognize_spawn): Determine location in a more precise
3907 2015-11-19 Jason Merrill <jason@redhat.com>
3909 * c-common.c (shorten_compare): But look through macros from
3912 2015-11-18 Jason Merrill <jason@redhat.com>
3914 * c-common.c (shorten_compare): Don't -Wtype-limits if the
3915 non-constant operand comes from a macro.
3917 2015-11-17 Jason Merrill <jason@redhat.com>
3920 * c-common.c (warn_tautological_cmp): Fold before checking for
3923 2015-11-16 Marek Polacek <polacek@redhat.com>
3926 * c-common.c (check_case_bounds): Fold low and high cases.
3928 2015-11-16 Marek Polacek <polacek@redhat.com>
3930 * c-ada-spec.c (dump_ada_template): Use RECORD_OR_UNION_TYPE_P.
3931 * c-common.c (c_common_get_alias_set): Likewise.
3932 (handle_visibility_attribute): Likewise.
3934 2015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
3936 * c-common.c (handle_simd_attribute): New.
3937 (struct attribute_spec): Add entry for "simd".
3938 (handle_simd_attribute): New.
3940 2015-11-13 Kai Tietz <ktietz70@googlemail.com>
3942 * c-lex.c (interpret_float): Use fold_convert.
3944 2015-11-13 David Malcolm <dmalcolm@redhat.com>
3946 * c-common.c (c_fully_fold_internal): Capture existing souce_range,
3947 and store it on the result.
3948 * c-opts.c (c_common_init_options): Set
3949 global_dc->colorize_source_p.
3951 2015-11-12 James Norris <jnorris@codesourcery.com>
3952 Joseph Myers <joseph@codesourcery.com>
3954 * c-pragma.c (oacc_pragmas): Add entry for declare directive.
3955 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_DECLARE.
3956 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT and
3957 PRAGMA_OACC_CLAUSE_LINK.
3959 2015-11-11 Marek Polacek <polacek@redhat.com>
3963 * c-common.c (valid_array_size_p): New function.
3964 * c-common.h (valid_array_size_p): Declare.
3966 2015-11-11 Dominique d'Humieres <dominiq@lps.ens.fr>
3969 * c-pragma.c (c_register_pragma_1): Update the gcc_assert to 256.
3971 2015-11-11 Andrew MacLeod <amacleod@redhat.com>
3973 * array-notation-common.c: Remove unused header files.
3974 * c-ada-spec.c: Likewise.
3975 * c-cilkplus.c: Likewise.
3976 * c-common.c: Likewise.
3977 * c-cppbuiltin.c: Likewise.
3978 * c-dump.c: Likewise.
3979 * c-format.c: Likewise.
3980 * c-gimplify.c: Likewise.
3981 * c-indentation.c: Likewise.
3982 * c-lex.c: Likewise.
3983 * c-omp.c: Likewise.
3984 * c-opts.c: Likewise.
3985 * c-pch.c: Likewise.
3986 * c-ppoutput.c: Likewise.
3987 * c-pragma.c: Likewise.
3988 * c-pretty-print.c: Likewise.
3989 * c-semantics.c: Likewise.
3990 * c-ubsan.c: Likewise.
3992 * stub-objc.c: Likewise.
3994 2015-11-09 Thomas Schwinge <thomas@codesourcery.com>
3995 Cesar Philippidis <cesar@codesourcery.com>
3996 James Norris <jnorris@codesourcery.com>
3997 Julian Brown <julian@codesourcery.com>
3998 Nathan Sidwell <nathan@codesourcery.com>
4000 * c-pragma.c (oacc_pragmas): Add "routine".
4001 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ROUTINE.
4003 2015-11-08 Eric Botcazou <ebotcazou@adacore.com>
4005 * c-common.c (c_common_attributes): Add scalar_storage_order.
4006 (handle_scalar_storage_order_attribute): New function.
4007 * c-pragma.c (global_sso): New variable.
4008 (maybe_apply_pragma_scalar_storage_order): New function.
4009 (handle_pragma_scalar_storage_order): Likewise.
4010 (init_pragma): Register scalar_storage_order.
4011 * c-pragma.h (maybe_apply_pragma_scalar_storage_order): Declare.
4012 * c.opt (Wscalar-storage-order): New warning.
4013 (fsso-struct=): New option.
4015 2015-11-08 Martin Sebor <msebor@redhat.com>
4017 * c.opt (Wplacement-new): Add a period to the end of a sentence.
4019 2015-11-07 Richard Sandiford <richard.sandiford@arm.com>
4021 * c-common.c: Don't undef DEF_BUILTIN.
4023 2015-11-06 David Malcolm <dmalcolm@redhat.com>
4025 * c-common.c (c_cpp_error): Convert parameter from location_t to
4026 rich_location *. Eliminate the "column_override" parameter and
4027 the call to diagnostic_override_column.
4028 Update the "done_lexing" clause to set range 0
4029 on the rich_location, rather than overwriting a location_t.
4030 * c-common.h (c_cpp_error): Convert parameter from location_t to
4031 rich_location *. Eliminate the "column_override" parameter.
4033 2015-11-05 Cesar Philippidis <cesar@codesourcery.com>
4034 Thomas Schwinge <thomas@codesourcery.com>
4035 James Norris <jnorris@codesourcery.com>
4037 * c-omp.c (c_oacc_split_loop_clauses): Make TILE, GANG, WORKER, VECTOR,
4038 AUTO, SEQ, INDEPENDENT and PRIVATE loop clauses. Associate REDUCTION
4039 clauses with parallel and kernels and loops.
4040 * c-pragma.h (enum pragma_omp_clause): Add entries for
4041 PRAGMA_OACC_CLAUSE_{INDEPENDENT,TILE,DEFAULT}.
4042 * pt.c (tsubst_omp_clauses): Add support for OMP_CLAUSE_{NUM_GANGS,
4043 NUM_WORKERS,VECTOR_LENGTH,GANG,WORKER,VECTOR,ASYNC,WAIT,TILE,AUTO,
4045 (tsubst_expr): Add support for OMP_CLAUSE_{KERNELS,PARALLEL,LOOP}.
4047 2015-11-05 Martin Sebor <msebor@redhat.com>
4050 * c.opt (-Wplacement-new): New option.
4052 2015-11-05 Jakub Jelinek <jakub@redhat.com>
4054 * c-common.h (c_finish_omp_atomic): Add TEST argument.
4055 (c_omp_check_loop_iv, c_omp_check_loop_iv_exprs): New prototypes.
4056 * c-omp.c (c_finish_omp_atomic): Add TEST argument. Don't call
4057 save_expr or create_tmp_var* if TEST is true.
4058 (c_finish_omp_for): Store OMP_FOR_ORIG_DECLS always.
4059 Don't call add_stmt here.
4060 (struct c_omp_check_loop_iv_data): New type.
4061 (c_omp_check_loop_iv_r, c_omp_check_loop_iv,
4062 c_omp_check_loop_iv_exprs): New functions.
4063 (c_omp_split_clauses): Adjust for lastprivate being allowed on
4065 (c_omp_declare_simd_clauses_to_numbers): Change
4066 OMP_CLAUSE_LINEAR_VARIABLE_STRIDE OMP_CLAUSE_LINEAR_STEP into numbers.
4067 (c_omp_declare_simd_clauses_to_decls): Similarly change those
4068 from numbers to PARM_DECLs.
4070 2015-11-04 Mikhail Maltsev <maltsevm@gmail.com>
4072 * c-omp.c (c_omp_split_clauses): Remove conditional compilation. Use
4075 2015-11-03 Bernd Schmidt <bschmidt@redhat.com>
4078 * c-common.h (fold_offsetof_1): Add argument.
4079 * c-common.c (fold_offsetof_1): Diagnose more invalid
4080 offsetof expressions that reference elements past the end of
4083 2015-11-03 Thomas Schwinge <thomas@codesourcery.com>
4084 Chung-Lin Tang <cltang@codesourcery.com>
4086 * c-pragma.c (oacc_pragmas): Add "atomic".
4087 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ATOMIC.
4089 2015-10-30 Evgeny Stupachenko <evstupac@gmail.com>
4091 * c-common.c (handle_target_clones_attribute): New.
4092 (c_common_attribute_table): Add handle_target_clones_attribute.
4093 (handle_always_inline_attribute): Add check on target_clones attribute.
4094 (handle_target_attribute): Ditto.
4096 2015-10-29 Andrew MacLeod <amacleod@redhat.com>
4098 * array-notation-common.c: Reorder #include's and remove duplicates.
4099 * c-ada-spec.c: Likewise.
4100 * c-cilkplus.c: Likewise.
4101 * c-common.c: Likewise.
4102 * c-cppbuiltin.c: Likewise.
4103 * c-dump.c: Likewise.
4104 * c-format.c: Likewise.
4105 * c-gimplify.c: Likewise.
4106 * c-indentation.c: Likewise.
4107 * c-lex.c: Likewise.
4108 * c-omp.c: Likewise.
4109 * c-opts.c: Likewise.
4110 * c-pch.c: Likewise.
4111 * c-ppoutput.c: Likewise.
4112 * c-pragma.c: Likewise.
4113 * c-pretty-print.c: Likewise.
4114 * c-semantics.c: Likewise.
4115 * c-ubsan.c: Likewise.
4117 * stub-objc.c: Likewise.
4119 2015-10-28 Jason Merrill <jason@redhat.com>
4121 * c-common.c (pointer_int_sum): Fold the MULT_EXPR.
4123 2015-10-27 Thomas Schwinge <thomas@codesourcery.com>
4124 James Norris <jnorris@codesourcery.com>
4125 Cesar Philippidis <cesar@codesourcery.com>
4129 * c-common.h (c_oacc_split_loop_clauses): Declare function.
4130 * c-omp.c (c_oacc_split_loop_clauses): New function.
4132 2015-10-21 Martin Sebor <msebor@redhat.com>
4135 * c.opt: End each sentence that describes an option with a period.
4137 2015-10-20 Marek Polacek <polacek@redhat.com>
4139 * array-notation-common.c (is_cilkplus_vector_p): Define.
4140 * c-common.h (is_cilkplus_vector_p): Declare.
4142 2015-10-20 Marek Polacek <polacek@redhat.com>
4144 * c.opt (std=gnu++11): Do not describe as experimental.
4145 (std=gnu++14): Likewise.
4147 2015-10-19 Jason Merrill <jason@redhat.com>
4149 * c-cppbuiltin.c (c_cpp_builtins): Define
4150 __cpp_nontype_template_args.
4152 2015-10-19 Jason Merrill <jason@redhat.com>
4154 * c-cppbuiltin.c (c_cpp_builtins): Define
4155 __cpp_enumerator_attributes, __cpp_fold_expressions,
4156 __cpp_unicode_characters.
4158 2015-10-13 Jakub Jelinek <jakub@redhat.com>
4159 Aldy Hernandez <aldyh@redhat.com>
4161 * c-common.c (enum c_builtin_type): Define DEF_FUNCTION_TYPE_9,
4162 DEF_FUNCTION_TYPE_10 and DEF_FUNCTION_TYPE_11.
4163 (c_define_builtins): Likewise.
4164 * c-common.h (enum c_omp_clause_split): Add
4165 C_OMP_CLAUSE_SPLIT_TASKLOOP.
4166 (c_finish_omp_critical, c_finish_omp_ordered): Add CLAUSES argument.
4167 (c_finish_omp_for): Add ORIG_DECLV argument.
4168 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP as
4169 201511 instead of 201307.
4170 * c-omp.c (c_finish_omp_critical): Add CLAUSES argument, set
4171 OMP_CRITICAL_CLAUSES to it.
4172 (c_finish_omp_ordered): Add CLAUSES argument, set
4173 OMP_ORDERED_CLAUSES to it.
4174 (c_finish_omp_for): Add ORIG_DECLV argument, set OMP_FOR_ORIG_DECLS
4175 to it if OMP_FOR. Clear DECL_INITIAL on the IVs.
4176 (c_omp_split_clauses): Handle OpenMP 4.5 combined/composite
4177 constructs and new OpenMP 4.5 clauses. Clear
4178 OMP_CLAUSE_SCHEDULE_SIMD if not combined with OMP_SIMD. Add
4180 * c-pragma.c (omp_pragmas_simd): Add taskloop.
4181 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKLOOP.
4182 (enum pragma_omp_clause): Add
4183 PRAGMA_OMP_CLAUSE_{DEFAULTMAP,GRAINSIZE,HINT,{IS,USE}_DEVICE_PTR}
4184 and PRAGMA_OMP_CLAUSE_{LINK,NOGROUP,NUM_TASKS,PRIORITY,SIMD,THREADS}.
4186 2015-10-05 Richard Sandiford <richard.sandiford@arm.com>
4188 * c-lex.c (interpret_float): Use real_equal instead of
4191 2015-10-04 Jason Merrill <jason@redhat.com>
4193 Implement N4514, C++ Extensions for Transactional Memory.
4194 * c-common.c (c_common_reswords): Add C++ TM TS keywords.
4195 (c_common_attribute_table): Add transaction_safe_dynamic.
4196 transaction_safe now affects type identity.
4197 (handle_tm_attribute): Handle transaction_safe_dynamic.
4198 * c-common.h (enum rid): Add RID_ATOMIC_NOEXCEPT,
4199 RID_ATOMIC_CANCEL, RID_SYNCHRONIZED.
4200 (OBJC_IS_CXX_KEYWORD): Add RID_SYNCHRONIZED.
4202 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_transactional_memory.
4203 * c-pretty-print.c (pp_c_attributes_display): Don't print
4204 transaction_safe in C++.
4206 2015-10-02 Marek Polacek <polacek@redhat.com>
4208 * c.opt (Wduplicated-cond): Don't enable by -Wall anymore.
4210 2015-10-02 Marek Polacek <polacek@redhat.com>
4213 * c-common.c (warn_duplicated_cond_add_or_warn): New function.
4214 * c-common.h (warn_duplicated_cond_add_or_warn): Declare.
4215 * c.opt (Wduplicated-cond): New option.
4217 2015-10-01 Joseph Myers <joseph@codesourcery.com>
4219 * c.opt (std=c11): Do not describe as experimental.
4220 (std=gnu11): Likewise.
4221 (std=iso9899:2011): Likewise.
4223 2015-09-28 Nathan Sidwell <nathan@codesourcery.com>
4225 * c-common.c (DEF_FUNCTION_TYPE_VAR_6): New.
4226 (DEF_FUNCTION_TYPE_VAR_11): Delete.
4228 2015-09-25 Marek Polacek <polacek@redhat.com>
4230 * c-ubsan.c (ubsan_instrument_division): Remove unnecessary code.
4231 (ubsan_instrument_shift): Likewise.
4233 2015-09-25 Marek Polacek <polacek@redhat.com>
4236 * c-ubsan.c (ubsan_instrument_division): Also pre-evaluate OP1.
4238 2015-09-24 Patrick Palka <ppalka@gcc.gnu.org>
4240 * c-indentation.c (should_warn_for_misleading_indentation):
4241 Compare next_stmt_vis_column with guard_line_first_nws instead
4242 of with guard_line_vis_column.
4244 2015-09-23 Manuel López-Ibáñez <manu@gcc.gnu.org>
4248 * c-pragma.c (handle_pragma_diagnostic): Detect non-warning
4249 options and options not valid for the current language.
4251 2015-09-22 Patrick Palka <ppalka@gcc.gnu.org>
4253 * c-indentation.c (should_warn_for_misleading_indentation):
4254 Float out and consolidate the calls to get_visual_column that
4255 are passed guard_exploc as an argument. Compare
4256 next_stmt_vis_column with guard_line_first_nws instead of with
4257 body_line_first_nws.
4259 2015-09-22 Nathan Sidwell <nathan@codesourcery.com>
4261 * c.opt (Wmultiple-inheritance, Wvirtual-inheritance, Wtemplates,
4262 Wnamespaces): New C++ warnings.
4264 2015-09-22 Jason Merrill <jason@redhat.com>
4266 * c-common.h (abi_compat_version_crosses): New.
4267 (warn_abi_version): Declare.
4268 * c-common.c: Define it.
4269 * c-opts.c (c_common_post_options): Handle it.
4270 flag_abi_compat_version defaults to 8.
4272 2015-09-21 Ville Voutilainen <ville.voutilainen@gmail.com>
4274 Complete the implementation of N4230, Nested namespace definition.
4275 * c-cppbuiltin.c: Add __cpp_namespace_attributes and
4276 __cpp_nested_namespace_definitions.
4278 2015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
4280 * c-pragma.c (handle_pragma_diagnostic): Fix wrong return.
4282 2015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
4284 * c-pragma.c (handle_pragma_diagnostic): Use explicit location
4286 * c-pragma.h (pragma_lex): Add optional loc argument.
4288 2015-09-16 Mikhail Maltsev <maltsevm@gmail.com>
4290 * c-format.c (check_format_arg): Adjust to use common block size in all
4293 2015-09-15 David Malcolm <dmalcolm@redhat.com>
4295 * c-format.c (location_from_offset): Update for change in
4296 signature of location_get_source_line.
4297 * c-indentation.c (get_visual_column): Likewise.
4298 (line_contains_hash_if): Likewise.
4300 2015-09-14 Marek Polacek <polacek@redhat.com>
4302 * c-opts.c (c_common_post_options): Set C++ standard earlier, before
4303 setting various warnings.
4305 2015-09-14 Marek Polacek <polacek@redhat.com>
4307 * c-common.c (warn_for_sign_compare): Cast to unsigned when shifting
4310 2015-09-11 Mark Wielaard <mjw@redhat.com>
4313 * c.opt (Wunused-variable): Option from common.opt.
4314 (Wunused-const-variable): New option.
4316 2015-09-09 Paolo Carlini <paolo.carlini@oracle.com>
4319 * c.opt ([Wsubobject-linkage]): Add.
4321 2015-09-03 Martin Sebor <msebor@redhat.com>
4324 * c-common.h (c_decl_implicit, reject_gcc_builtin): Declare new
4326 * c-common.c (reject_gcc_builtin): Define.
4328 2015-09-02 Balaji V. Iyer <balaji.v.iyer@intel.com>
4331 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): New
4333 * c-gimplify.c (c_gimplify_expr): Added a call to the function
4334 cilk_gimplify_call_params_in_spawned_fn.
4335 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): New function.
4336 (gimplify_cilk_spawn): Removed EXPR_STMT and CLEANUP_POINT_EXPR
4339 2015-08-25 Marek Polacek <polacek@redhat.com>
4342 * c-common.c (handle_weak_attribute): Don't check whether the
4343 visibility can be changed here.
4345 2015-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
4347 * c-lex.c (c_lex_with_flags): Use explicit locations.
4349 2015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
4351 * c-ada-spec.h, c-common.c, c-common.h, c-format.c, c-format.h,
4352 c-objc.h, c-ppoutput.c, c-pragma.c, c-pragma.h: Remove useless
4354 2015-08-18 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
4357 * c-common.c (check_builtin_function_arguments): Add check
4358 for BUILT_IN_SIGNBIT argument.
4360 2015-08-18 Paolo Carlini <paolo.carlini@oracle.com>
4363 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_static_assert value
4366 2015-08-17 Marek Polacek <polacek@redhat.com>
4368 * c-pretty-print.c (pp_c_cv_qualifiers): Remove code dealing
4369 with whitespaces before qualifier names.
4371 2015-08-12 Marek Polacek <polacek@redhat.com>
4374 * c-common.c (maybe_warn_shift_overflow): Properly handle
4375 left-shifting 1 into the sign bit.
4377 2015-08-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
4379 * c.opt (Wchkp): Use LangEnabledBy instead of EnabledBy.
4381 2015-08-06 Andrew Sutton <andrew.n.sutton@gmail.com>
4382 Braden Obrzut <admin@maniacsvault.net>
4383 Jason Merrill <jason@redhat.com>
4385 Add C++ Concepts TS support.
4386 * c-common.c (c_common_reswords): Add __is_same_as, concept, requires.
4387 * c-common.h (enum rid): Add RID_IS_SAME_AS, RID_CONCEPT, RID_REQUIRES.
4388 (D_CXX_CONCEPTS, D_CXX_CONCEPTS_FLAGS): New.
4389 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_concepts.
4390 * c-opts.c (set_std_cxx1z): Set flag_concepts.
4391 * c.opt (fconcepts): New.
4393 2015-08-02 Martin Sebor <msebor@redhat.com>
4395 * c.opt (-Wframe-address): New warning option.
4397 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
4399 * c-indentation.c (should_warn_for_misleading_indentation):
4402 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
4404 * c-indentation.c (get_visual_column): Add parameter first_nws,
4405 use it. Update comment documenting the function.
4406 (is_first_nonwhitespace_on_line): Remove.
4407 (should_warn_for_misleading_indentation): Replace usage of
4408 of is_first_nonwhitespace_on_line with get_visual_column.
4410 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
4412 * c-indentation.h (struct token_indent_info): Define.
4413 (get_token_indent_info): Define.
4414 (warn_for_misleading_information): Declare.
4415 * c-common.h (warn_for_misleading_information): Remove.
4416 * c-identation.c (warn_for_misleading_indentation):
4417 Change declaration to take three token_indent_infos. Adjust
4419 * c-identation.c (should_warn_for_misleading_indentation):
4420 Likewise. Bail out early if the body is a compound statement.
4421 (guard_tinfo_to_string): Define.
4423 2015-07-30 Jason Merrill <jason@redhat.com>
4425 * c-pretty-print.c (unary_expression) [INDIRECT_REF]: Don't print
4426 '*' for reference decay.
4428 2015-07-30 Marek Polacek <polacek@redhat.com>
4430 * c-common.c (warn_tautological_cmp): Bail for float types.
4432 2015-07-27 Marek Polacek <polacek@redhat.com>
4435 * c-common.c (warn_tautological_cmp): Don't warn for macro expansion.
4437 2015-07-27 Marek Polacek <polacek@redhat.com>
4441 * c-common.c (find_array_ref_with_const_idx_r): New function.
4442 (warn_tautological_cmp): New function.
4443 * c-common.h (warn_tautological_cmp): Declare.
4444 * c.opt (Wtautological-compare): New option.
4446 2015-07-23 Marek Polacek <polacek@redhat.com>
4448 * c-ubsan.c (ubsan_instrument_division): Use unshare_expr throughout.
4449 (ubsan_instrument_shift): Likewise.
4451 2015-07-23 Marek Polacek <polacek@redhat.com>
4454 * c-ubsan.c: Include gimplify.h.
4455 (ubsan_instrument_division): Unshare OP0 and OP1.
4456 (ubsan_instrument_shift): Likewise.
4458 2015-07-20 Marek Polacek <polacek@redhat.com>
4459 Richard Sandiford <richard.sandiford@arm.com>
4462 * c-common.c (c_fully_fold_internal): Warn about left shift overflows.
4463 Use EXPR_LOC_OR_LOC.
4464 (maybe_warn_shift_overflow): New function.
4465 * c-common.h (maybe_warn_shift_overflow): Declare.
4466 * c-opts.c (c_common_post_options): Set warn_shift_overflow.
4467 * c.opt (Wshift-overflow): New option.
4469 2015-07-16 Martin Liska <mliska@suse.cz>
4471 * c-format.c (static void check_format_info_main): Use
4472 object_allocator instead of pool_allocator.
4473 (check_format_arg): Likewise.
4474 (check_format_info_main): Likewise.
4476 2015-07-15 Andrew MacLeod <amacleod@redhat.com>
4478 * c-opts.c: Remove multiline #include comment.
4480 2015-07-12 Aldy Hernandez <aldyh@redhat.com>
4482 * c-common.c: Fix double word typos.
4484 2015-07-10 Eric Botcazou <ebotcazou@adacore.com>
4486 * c-ada-spec.h (cpp_operation): Revert latest change.
4487 * c-ada-spec.c (print_ada_declaration): Likewise. Skip implicit
4488 constructors and destructors.
4490 2015-07-09 Andrew MacLeod <amacleod@redhat.com>
4492 * c-common.h: Adjust includes for flags.h changes.
4493 * stub-objc.c: Likewise.
4495 2015-07-08 Eric Botcazou <ebotcazou@adacore.com>
4497 * c-ada-spec.h (cpp_operation): Add IS_CONSTEXPR.
4498 * c-ada-spec.c (print_ada_declaration): Skip constexpr constructors.
4500 2015-07-08 Jakub Jelinek <jakub@redhat.com>
4502 * c-omp.c (c_omp_declare_simd_clauses_to_numbers): If all clauses
4503 are to be removed, return NULL rather than original clauses list.
4505 2015-07-07 Andrew MacLeod <amacleod@redhat.com>
4507 * array-notation-common.c: Adjust includes.
4508 * c-ada-spec.c: Likewise.
4509 * c-cilkplus.c: Likewise.
4510 * c-common.h: Likewise.
4511 * c-cppbuiltin.c: Likewise.
4512 * c-dump.c: Likewise.
4513 * c-format.c: Likewise.
4514 * c-gimplify.c: Likewise.
4515 * c-indentation.c: Likewise.
4516 * c-lex.c: Likewise.
4517 * c-omp.c: Likewise.
4518 * c-opts.c: Likewise.
4519 * c-pch.c: Likewise.
4520 * c-ppoutput.c: Likewise.
4521 * c-pragma.c: Likewise.
4522 * c-pretty-print.c: Likewise.
4523 * c-semantics.c: Likewise.
4524 * c-ubsan.c: Likewise.
4526 * stub-objc.c: Likewise.
4528 2015-07-07 Eric Botcazou <ebotcazou@adacore.com>
4530 * c-ada-spec.h (cpp_operation): Add IS_MOVE_CONSTRUCTOR.
4531 * c-ada-spec.c (print_ada_declaration): Skip move constructors.
4533 2015-07-01 Jason Merrill <jason@redhat.com>
4535 * c-common.h (D_CXX11): Rename from D_CXX0X.
4536 (RID_FIRST_CXX11, RID_LAST_CXX11): Rename from *_CXX0X.
4537 * c-common.c: Adjust.
4539 * c-opts.c (c_common_post_options): Default to C++14.
4541 * c-opts.c (c_common_post_options): Highest ABI level is now 10.
4543 2015-06-30 Edward Smith-Rowland <3dw4rd@verizon.net>
4545 Implement N4197 - Adding u8 character literals
4546 * c-ada-spec.c (print_ada_macros): Treat CPP_UTF8CHAR like
4548 * c-common.c (c_parse_error): Print CPP_UTF8CHAR and
4549 CPP_UTF8CHAR_USERDEF tokens.
4550 * c-lex.c (c_lex_with_flags): Treat CPP_UTF8CHAR_USERDEF
4551 and CPP_UTF8CHAR tokens.
4552 (lex_charconst): Treat CPP_UTF8CHAR token.
4554 2015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
4557 * c-common.c (do_warn_unused_parameter): Move here.
4558 * c-common.h (do_warn_unused_parameter): Declare.
4560 2015-06-29 Marek Polacek <polacek@redhat.com>
4563 * c-common.c (check_case_bounds): Add bool * parameter. Set
4565 (c_add_case_label): Add bool * parameter. Pass it down to
4567 (c_do_switch_warnings): Add bool parameters. Implement -Wswitch-bool
4569 * c-common.h (c_add_case_label, c_do_switch_warnings): Update
4572 2015-06-27 Marek Polacek <polacek@redhat.com>
4574 * c-common.c (check_main_parameter_types): Use VECTOR_TYPE_P
4575 or VECTOR_INTEGER_TYPE_P throughout.
4576 * c-gimplify.c: Likewise.
4578 2015-06-26 Marek Polacek <polacek@redhat.com>
4580 * array-notation-common.c (find_rank): Use INDIRECT_REF_P.
4581 * c-common.c (c_fully_fold_internal): Likewise.
4582 (c_alignof_expr): Likewise.
4583 * c-pretty-print.c (c_pretty_printer::postfix_expression): Likewise.
4584 * c-ubsan.c (ubsan_instrument_bounds): Likewise.
4585 * cilk.c (create_parm_list): Likewise.
4587 2015-06-26 Marek Polacek <polacek@redhat.com>
4589 * c-common.c (handle_unused_attribute): Use VAR_OR_FUNCTION_DECL_P.
4591 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
4593 * c-common.c: Remove ipa-ref.h and plugin-api.h from include list.
4594 * c-gimplify.c: Likewise.
4595 * c-pragma.c: Likewise.
4596 * c-ubsan.c: Likewise.
4599 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
4601 * c-common.c (c_type_hasher): Inherit from ggc_ptr_hash rather than
4604 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
4606 * cilk.c: Move calls.h after tm.h in the include chain.
4608 2015-06-25 Marek Polacek <polacek@redhat.com>
4610 * array-notation-common.c: Use VAR_P throughout.
4611 * c-ada-spec.c: Likewise.
4612 * c-common.c: Likewise.
4613 * c-format.c: Likewise.
4614 * c-gimplify.c: Likewise.
4615 * c-omp.c: Likewise.
4616 * c-pragma.c: Likewise.
4617 * c-pretty-print.c: Likewise.
4620 2015-06-25 Marek Polacek <polacek@redhat.com>
4622 * cilk.c (extract_free_variables): Use is_global_var.
4624 2015-06-23 Richard Sandiford <richard.sandiford@arm.com>
4626 * c-common.c: Don't include target-def.h.
4628 2015-06-23 Marek Polacek <polacek@redhat.com>
4630 * c-common.c (warn_logical_operator): Use tree_int_cst_equal
4631 when comparing INTEGER_CSTs.
4633 2015-06-22 Pierre-Marie de Rodat <derodat@adacore.com>
4635 * c-ada-spec.h (cpp_operation): Add HAS_DEPENDENT_TEMPLATE_ARGS.
4636 * c-ada-spec.c (collect_ada_nodes): Skip NAMESPACE_DECL
4637 (dump_ada_template): Skip partially specialized types.
4639 2015-06-22 Mikhail Maltsev <maltsevm@gmail.com>
4641 * c-common.c (scalar_to_vector): Use std::swap instead of manually
4644 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
4646 * array-notation-common.c: Do not include input.h, line-map.h or is-a.h.
4647 * c-ada-spec.c: Likewise.
4648 * c-cilkplus.c: Likewise.
4649 * c-common.c: Likewise.
4650 * c-common.h: Likewise.
4651 * c-cppbuiltin.c: Likewise.
4652 * c-dump.c: Likewise.
4653 * c-format.c: Likewise.
4654 * c-gimplify.c: Likewise.
4655 * c-indentation.c: Likewise.
4656 * c-lex.c: Likewise.
4657 * c-omp.c: Likewise.
4658 * c-opts.c: Likewise.
4659 * c-pch.c: Likewise.
4660 * c-ppoutput.c: Likewise.
4661 * c-pragma.c: Likewise.
4662 * c-pretty-print.c: Likewise.
4663 * c-semantics.c: Likewise.
4664 * c-ubsan.c: Likewise.
4666 * stub-objc.c: Likewise.
4668 2015-06-13 Patrick Palka <ppalka@gcc.gnu.org>
4671 * c-common.c (c_common_truthvalue_conversion): Warn when
4672 converting an address of a reference to a truth value.
4674 2015-06-08 Andrew MacLeod <amacleod@redhat.com>
4676 * array-notation-common.c : Adjust include files.
4677 * c-ada-spec.c : Likewise.
4678 * c-cilkplus.c : Likewise.
4679 * c-common.c : Likewise.
4680 * c-common.h : Likewise.
4681 * c-cppbuiltin.c : Likewise.
4682 * c-dump.c : Likewise.
4683 * c-format.c : Likewise.
4684 * c-gimplify.c : Likewise.
4685 * c-indentation.c : Likewise.
4686 * c-lex.c : Likewise.
4687 * c-omp.c : Likewise.
4688 * c-opts.c : Likewise.
4689 * c-pch.c : Likewise.
4690 * c-ppoutput.c : Likewise.
4691 * c-pragma.c : Likewise.
4692 * c-pretty-print.c : Likewise.
4693 * c-semantics.c : Likewise.
4694 * c-ubsan.c : Likewise.
4695 * cilk.c : Likewise.
4696 * stub-objc.c : Likewise.
4698 2015-06-08 Marek Polacek <polacek@redhat.com>
4701 * c-format.c (location_from_offset): Return LOC if LINE is null.
4703 2015-06-05 Aldy Hernandez <aldyh@redhat.com>
4705 * c-common.h (c_parse_final_cleanups): New prototype.
4706 * c-opts.c (c_common_parse_file): Call c_parse_final_cleanups.
4708 2015-06-04 Sriraman Tallam <tmsriram@google.com>
4710 * c-common.c (noplt): New attribute.
4711 (handle_noplt_attribute): New handler.
4713 2015-06-04 Andrew MacLeod <amacleod@redhat.com>
4715 * array-notation-common.c: Adjust includes for restructured coretypes.h.
4716 * c-ada-spec.c: Likewise.
4717 * c-cilkplus.c: Likewise.
4718 * c-common.c: Likewise.
4719 * c-common.h: Likewise.
4720 * c-cppbuiltin.c: Likewise.
4721 * c-dump.c: Likewise.
4722 * c-format.c: Likewise.
4723 * c-gimplify.c: Likewise.
4724 * c-indentation.c: Likewise.
4725 * c-lex.c: Likewise.
4726 * c-omp.c: Likewise.
4727 * c-opts.c: Likewise.
4728 * c-pch.c: Likewise.
4729 * c-ppoutput.c: Likewise.
4730 * c-pragma.c: Likewise.
4731 * c-pretty-print.c: Likewise.
4732 * c-semantics.c: Likewise.
4733 * c-ubsan.c: Likewise.
4735 * stub-objc.c: Likewise.
4737 2015-06-02 David Malcolm <dmalcolm@redhat.com>
4740 * c-indentation.c (should_warn_for_misleading_indentation): Use
4741 expand_location rather than expand_location_to_spelling_point.
4742 Don't warn if the guarding statement is more indented than the
4745 2015-06-02 David Malcolm <dmalcolm@redhat.com>
4747 * c-indentation.c (warn_for_misleading_indentation): Bail out
4748 immediately if -Wmisleading-indentation isn't enabled.
4750 2015-06-01 Martin Liska <mliska@suse.cz>
4752 * c-format.c (check_format_arg):Use new type-based pool allocator.
4753 (check_format_info_main) Likewise.
4755 2015-05-31 Eric Botcazou <ebotcazou@adacore.com>
4757 * c-ada-spec.c (is_tagged_type): Test for TYPE_METHODS on main variant.
4758 (has_nontrivial_methods): Likewise.
4760 2015-05-25 Marek Polacek <polacek@redhat.com>
4762 * c-ubsan.c (ubsan_instrument_shift): Use type0.
4764 2015-05-22 Marek Polacek <polacek@redhat.com>
4767 * c-common.c (handle_deprecated_attribute): Allow CONST_DECL.
4769 2015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
4771 * c-cppbuiltin.c (c_cpp_builtins): Use if instead of #if with
4772 STACK_GROWS_DOWNWARD.
4774 2015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
4776 * c-cppbuiltin.c (c_cpp_builtins): Check the value of
4777 STACK_GROWS_DOWNWARD rather than if it is defined.
4779 2015-05-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
4782 * c-format.c (location_column_from_byte_offset): New.
4783 (location_from_offset): New.
4784 (struct format_wanted_type): Add offset_loc field.
4785 (check_format_info): Move handling of location for extra arguments
4786 closer to the point of warning.
4787 (check_format_info_main): Pass the result of location_from_offset
4789 (format_type_warning): Pass the result of location_from_offset
4792 2015-05-20 Marek Polacek <polacek@redhat.com>
4794 * c-omp.c (check_omp_for_incr_expr): Use BINARY_CLASS_P.
4796 2015-05-20 Marek Polacek <polacek@redhat.com>
4798 * c-ada-spec.c (dump_sloc): Use DECL_P.
4800 2015-05-20 Marek Polacek <polacek@redhat.com>
4802 * c-pragma.c: Use VAR_OR_FUNCTION_DECL_P throughout.
4803 * c-common.c: Likewise.
4805 2015-05-19 David Malcolm <dmalcolm@redhat.com>
4807 * c-common.h (fe_file_change): Strengthen param from
4808 const line_map * to const line_map_ordinary *.
4809 (pp_file_change): Likewise.
4810 * c-lex.c (fe_file_change): Likewise.
4811 (cb_define): Use linemap_check_ordinary when invoking
4813 (cb_undef): Likewise.
4814 * c-opts.c (c_finish_options): Use linemap_check_ordinary when
4815 invoking cb_file_change.
4816 (c_finish_options): Likewise.
4817 (push_command_line_include): Likewise.
4818 (cb_file_change): Strengthen param "new_map" from
4819 const line_map * to const line_map_ordinary *.
4820 * c-ppoutput.c (cb_define): Likewise for local "map".
4821 (pp_file_change): Likewise for param "map" and local "from".
4823 2015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
4825 * c-common.c (shorten_compare): Use std::swap instead of explicit swaps.
4827 2015-05-18 Tom de Vries <tom@codesourcery.com>
4829 * c-common.c (build_va_arg_1): New function.
4830 (build_va_arg): Add address operator to va_list operand if necessary.
4832 2015-05-15 Mikhail Maltsev <maltsevm@gmail.com>
4835 * c-common.c (int_safely_convertible_to_real_p): Define.
4836 (unsafe_conversion_p): Check conversions involving complex types.
4837 (conversion_warning): Add new warning message for conversions which
4838 discard imaginary component.
4839 * c-common.h: (enum conversion_safety): Add new enumerator for such
4842 2015-05-14 Marek Polacek <polacek@redhat.com>
4846 * c-common.c (c_fully_fold): Pass false down to c_fully_fold_internal.
4847 (c_fully_fold_internal): Fold C_MAYBE_CONST_EXPRs with
4848 C_MAYBE_CONST_EXPR_INT_OPERANDS set. Add FOR_INT_CONST argument and
4849 use it. If FOR_INT_CONST, require that all evaluated operands be
4852 2015-05-12 David Malcolm <dmalcolm@redhat.com>
4854 * c-common.h (warn_for_misleading_indentation): New prototype.
4855 * c-indentation.c: New file.
4856 * c.opt (Wmisleading-indentation): New option.
4858 2015-05-12 Tom de Vries <tom@codesourcery.com>
4860 PR tree-optimization/66010
4861 * c-common.c (build_va_arg): Don't mark ap addressable unless necessary.
4863 2015-05-09 Jason Merrill <jason@redhat.com>
4865 * c-opts.c (c_common_post_options): Also clear
4866 cpp_opts->cpp_warn_cxx11_compat.
4868 * c-common.h (enum cxx_dialect): Add cxx_unset.
4869 * c-common.c (cxx_dialect): Initialize to cxx_unset.
4870 * c-opts.c (c_common_post_options): Set C++ dialect to C++98 if unset.
4872 * c.opt (std=c++14): Remove Undocumented flag and experimental warning.
4873 (std=gnu++0x): Mark as Undocumented.
4874 (std=gnu++1y): Add deprecated message.
4876 2015-05-08 Jason Merrill <jason@redhat.com>
4878 * c.opt (Wc++11-compat): Make primary. Rename var warn_cxx11_compat.
4881 * c.opt (Wc++0x-compat): Also set cpp_warn_cxx11_compat.
4883 2015-05-08 Marek Polacek <polacek@redhat.com>
4886 * c.opt (Woverride-init-side-effects): New option.
4888 2015-05-07 Marek Polacek <polacek@redhat.com>
4891 * c-common.c (c_fully_fold_internal): Warn when left shifting a
4893 * c.opt (Wshift-negative-value): New option.
4894 * c-opts.c (c_common_post_options): Set warn_shift_negative_value
4895 when -Wextra and C99/C++11 mode.
4897 2015-05-07 Marek Polacek <polacek@redhat.com>
4898 Martin Uecker <uecker@eecs.berkeley.edu>
4900 * c-ubsan.c (ubsan_instrument_bounds): Don't skip instrumenting
4901 flexible member array-like members if SANITIZE_BOUNDS_STRICT.
4903 2015-05-05 Jason Merrill <jason@redhat.com>
4905 * c.opt (Wterminate): New.
4907 2015-04-30 Marek Polacek <polacek@redhat.com>
4909 * c-common.c (maybe_warn_bool_compare): When comparing with 0/1,
4910 require that the non-constant be of a boolean type.
4912 2015-04-29 Josh Triplett <josh@joshtriplett.org>
4914 * c-common.c (handle_section_attribute): Refactor to reduce
4915 nesting and distinguish between error cases.
4917 2015-04-29 Marek Polacek <polacek@redhat.com>
4920 * c-common.c (maybe_warn_bool_compare): Warn when comparing a boolean
4923 2015-04-29 Jakub Jelinek <jakub@redhat.com>
4925 * c-common.h (omp_clause_mask): Unconditionally define as a class.
4926 Use uint64_t instead of unsigned HOST_WIDE_INT and 64 instead of
4927 HOST_BITS_PER_WIDE_INT.
4929 2015-04-28 Tom de Vries <tom@codesourcery.com>
4931 PR tree-optimization/65887
4932 * c-common.c (build_va_arg): Mark va_arg ap argument as addressable.
4934 2015-04-28 Eric Botcazou <ebotcazou@adacore.com>
4935 Pierre-Marie de Rodat <derodat@adacore.com>
4937 * c-ada-spec.c (in_function): Delete.
4938 (dump_generic_ada_node): Do not change in_function and remove the
4939 redundant code dealing with it.
4940 (print_ada_declaration): Do not change in_function. Use INDENT_INCR.
4941 (print_ada_methods): Output the static member functions in a nested
4942 package after the regular methods as well as associated renamings.
4944 2015-04-24 Marek Polacek <polacek@redhat.com>
4947 * c-common.c (c_fully_fold_internal): Use OPT_Wshift_count_negative
4948 and OPT_Wshift_count_overflow.
4951 * c-common.c (warn_logical_operator): Warn if the operands have the
4954 2015-04-24 Marek Polacek <polacek@redhat.com>
4957 * c-common.c (warn_logical_operator): Bail if either operand comes
4958 from a macro expansion.
4960 2015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
4963 * c-common.c (c_default_pointer_mode): Add definition.
4964 * c-common.h (c_default_pointer_mode): Add declaration.
4966 2015-03-11 Jakub Jelinek <jakub@redhat.com>
4968 * c-common.c (c_common_nodes_and_builtins): Don't call xstrdup
4969 on record_builtin_type argument.
4971 2015-03-10 Jakub Jelinek <jakub@redhat.com>
4974 * c-common.c (warn_logical_not_parentheses): Don't warn for
4977 2015-03-07 Marek Polacek <polacek@redhat.com>
4980 * c-ubsan.c (ubsan_instrument_bounds): Check for COMPONENT_REF
4981 before trying to figure out whether we have a flexible array member.
4983 2015-03-06 Eric Botcazou <ebotcazou@adacore.com>
4984 Jonathan Wakely <jwakely.gcc@gmail.com>
4986 * c-ada-spec.c (dump_ada_double_name): Fix pasto.
4988 2015-03-05 Eric Botcazou <ebotcazou@adacore.com>
4991 * c-ada-spec.c (print_destructor): Remove obsolete code.
4993 2015-03-01 Eric Botcazou <ebotcazou@adacore.com>
4995 * c-ada-spec.c (is_tagged_type): Add guard for DECL_VINDEX.
4996 (dump_template_types): Adjust DECL_TEMPLATE_INSTANTIATIONS and
4997 DECL_TEMPLATE_RESULT emulations.
4998 (dump_ada_template)): Add guard for TYPE_METHODS.
5000 2015-02-27 Marek Polacek <polacek@redhat.com>
5003 * c.opt (Wformat-signedness): Don't enable by -Wformat=2.
5005 2015-02-27 Kai Tietz <ktietz@redhat.com>
5008 * c-pragma.c (handle_pragma_weak): Do not try to create
5009 weak/alias of declarations not being function, or variable
5012 2015-02-24 Thomas Schwinge <thomas@codesourcery.com>
5015 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
5017 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
5019 2015-02-16 Marek Polacek <polacek@redhat.com>
5022 * c-format.c (check_format_types): Handle null param.
5024 2015-02-13 Marek Polacek <polacek@redhat.com>
5027 * c-format.c (check_format_types): Don't warn about different
5028 signedness if the original value is in the range of WANTED_TYPE.
5030 2015-02-12 Jason Merrill <jason@redhat.com>
5033 * c-opts.c (c_common_post_options): Change flag_abi_version from 0
5034 to the current highest version.
5035 * c-cppbuiltin.c (c_cpp_builtins): Assert that it isn't 0.
5037 2015-02-04 Jakub Jelinek <jakub@redhat.com>
5041 * c-omp.c (c_finish_omp_atomic): Use TRUNC_DIV_EXPR
5042 instead of RDIV_EXPR. Use build_binary_op instead of
5045 2015-01-30 Joseph Myers <joseph@codesourcery.com>
5047 * c-opts.c, c-pch.c, cppspec.c: All callers of fatal_error changed
5048 to pass input_location as first argument.
5050 2015-01-23 Tom de Vries <tom@codesourcery.com>
5053 * c.opt (fopenacc): Mark as LTO option.
5055 2015-01-23 Tom de Vries <tom@codesourcery.com>
5058 * c.opt (fopenmp): Mark as LTO option.
5060 2015-01-21 Jakub Jelinek <jakub@redhat.com>
5063 * cilk.c (fill_decls_vec): Only put decls into vector v.
5064 (compare_decls): Fix up formatting.
5066 2015-01-21 Igor Zamyatin <igor.zamyatin@intel.com>
5069 * cilk.c: Include vec.h.
5070 (struct cilk_decls): New structure.
5071 (wrapper_parm_cb): Split this function to...
5072 (fill_decls_vec): ...this...
5073 (create_parm_list): ...and this.
5074 (compare_decls): New function.
5075 (for_local_cb): Remove.
5076 (wrapper_local_cb): Ditto.
5077 (build_wrapper_type): For now first traverse and fill vector of
5078 declarations then sort it and then deal with sorted vector.
5079 (cilk_outline): Ditto.
5080 (declare_one_free_variable): Ditto.
5082 2015-01-21 Jason Merrill <jason@redhat.com>
5085 * c-format.c (check_format_arg): Call decl_constant_value.
5087 2015-01-19 Martin Liska <mliska@suse.cz>
5089 * c-common.c (handle_noicf_attribute): New function.
5091 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
5092 Bernd Schmidt <bernds@codesourcery.com>
5093 James Norris <jnorris@codesourcery.com>
5094 Cesar Philippidis <cesar@codesourcery.com>
5095 Ilmir Usmanov <i.usmanov@samsung.com>
5096 Jakub Jelinek <jakub@redhat.com>
5098 * c.opt (fopenacc): New option.
5099 * c-cppbuiltin.c (c_cpp_builtins): Conditionally define _OPENACC.
5100 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
5102 * c-common.h (c_finish_oacc_wait): New prototype.
5103 * c-omp.c: Include "omp-low.h" and "gomp-constants.h".
5104 (c_finish_oacc_wait): New function.
5105 * c-pragma.c (oacc_pragmas): New variable.
5106 (c_pp_lookup_pragma, init_pragma): Handle it.
5107 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_CACHE,
5108 PRAGMA_OACC_DATA, PRAGMA_OACC_ENTER_DATA, PRAGMA_OACC_EXIT_DATA,
5109 PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP, PRAGMA_OACC_PARALLEL,
5110 PRAGMA_OACC_UPDATE, PRAGMA_OACC_WAIT.
5111 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ASYNC,
5112 PRAGMA_OACC_CLAUSE_AUTO, PRAGMA_OACC_CLAUSE_COLLAPSE,
5113 PRAGMA_OACC_CLAUSE_COPY, PRAGMA_OACC_CLAUSE_COPYIN,
5114 PRAGMA_OACC_CLAUSE_COPYOUT, PRAGMA_OACC_CLAUSE_CREATE,
5115 PRAGMA_OACC_CLAUSE_DELETE, PRAGMA_OACC_CLAUSE_DEVICE,
5116 PRAGMA_OACC_CLAUSE_DEVICEPTR, PRAGMA_OACC_CLAUSE_FIRSTPRIVATE,
5117 PRAGMA_OACC_CLAUSE_GANG, PRAGMA_OACC_CLAUSE_HOST,
5118 PRAGMA_OACC_CLAUSE_IF, PRAGMA_OACC_CLAUSE_NUM_GANGS,
5119 PRAGMA_OACC_CLAUSE_NUM_WORKERS, PRAGMA_OACC_CLAUSE_PRESENT,
5120 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPY,
5121 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYIN,
5122 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYOUT,
5123 PRAGMA_OACC_CLAUSE_PRESENT_OR_CREATE, PRAGMA_OACC_CLAUSE_PRIVATE,
5124 PRAGMA_OACC_CLAUSE_REDUCTION, PRAGMA_OACC_CLAUSE_SELF,
5125 PRAGMA_OACC_CLAUSE_SEQ, PRAGMA_OACC_CLAUSE_VECTOR,
5126 PRAGMA_OACC_CLAUSE_VECTOR_LENGTH, PRAGMA_OACC_CLAUSE_WAIT,
5127 PRAGMA_OACC_CLAUSE_WORKER.
5129 2015-01-14 Marcos Diaz <marcos.diaz@tallertechnologies.com>
5131 * c-cppbuiltin.c (c_cpp_builtins): New cpp define __SSP_EXPLICIT__
5132 for the new option fstack-protector_explicit.
5133 * c-common.c (c_common_attribute_table): Add stack_protect attribute.
5134 (handle_stack_protect_attribute): New function.
5136 2015-01-13 Martin Uecker <uecker@eecs.berkeley.edu>
5138 * c.opt: New option -Warray-bounds=.
5140 2015-01-09 Michael Collison <michael.collison@linaro.org>
5142 * array-notation-common.c: Include hash-set.h, machmode.h,
5143 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
5144 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
5145 * c-ada-spec.c: Ditto.
5146 * c-cilkplus.c: Ditto.
5147 * c-common.c: Include input.h due to flattening of tree.h.
5148 Define macro GCC_C_COMMON_C.
5149 * c-common.h: Flatten tree.h header files into c-common.h.
5150 Remove include of tree-core.h.
5151 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
5152 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
5153 fold-const.h, wide-int.h, and inchash.h due to
5154 flattening of tree.h.
5156 * c-format.c: Flatten tree.h header files into c-common.h.
5157 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
5158 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
5159 fold-const.h, wide-int.h, and inchash.h due to
5160 flattening of tree.h.
5161 * c-dump.c: Include hash-set.h, machmode.h,
5162 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
5163 fold-const.h, wide-int.h, and inchash.h due to
5164 flattening of tree.h.
5165 * c-format.c: Include hash-set.h, machmode.h,
5166 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
5167 fold-const.h, wide-int.h, inchash.h and real.h due to
5168 flattening of tree.h.
5169 * c-gimplify.c: Include hash-set.h, machmode.h,
5170 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
5171 fold-const.h, wide-int.h, and inchash.h due to
5172 flattening of tree.h.
5178 * c-ppoutput.c: Ditto.
5179 * c-pragma.c: Ditto.
5180 * c-pretty-print.c: Ditto.
5181 * c-semantics.c: Ditto.
5183 * stub-objc.c: Ditto.
5185 2015-01-08 Jason Merrill <jason@redhat.com>
5187 * c-ubsan.c (ubsan_maybe_instrument_array_ref): Use
5188 do_ubsan_in_current_function.
5189 (ubsan_maybe_instrument_reference_or_call): Likewise.
5190 * c-ubsan.h: Declare it.
5192 2015-01-08 Mike Stump <mikestump@comcast.net>
5194 * c-common.c (c_common_attribute_table): Add no_sanitize_thread.
5196 2015-01-07 Marek Polacek <polacek@redhat.com>
5199 * c-common.c (c_fully_fold_internal): Warn for division and modulo
5200 if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST and is zero.
5202 2015-01-05 Trevor Saunders <tsaunders@mozilla.com>
5205 * c.opt (Wsuggest-override): New option.
5207 2015-01-05 Jakub Jelinek <jakub@redhat.com>
5209 Update copyright years.
5211 2015-01-05 Marek Polacek <polacek@redhat.com>
5214 * c-common.c (warn_array_subscript_with_type_char): Add location_t
5216 * c-common.h (warn_array_subscript_with_type_char): Update
5219 2014-12-20 Edward Smith-Rowland <3dw4rd@verizon.net>
5221 * c-cppbuiltin.c (__cpp_sized_deallocation): Uncomment and move macro.
5222 Control macro with flag_sized_deallocation.
5224 2014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
5226 * c.opt (Wdiscarded-array-qualifiers): New option.
5228 2014-12-19 Jakub Jelinek <jakub@redhat.com>
5230 PR preprocessor/63831
5231 * c-cppbuiltin.c (c_cpp_builtins): Don't define __has_attribute
5232 and __has_cpp_attribute here.
5233 * c-ppoutput.c (init_pp_output): Set cb->has_attribute to
5234 c_common_has_attribute.
5235 * c-common.h (c_common_has_attribute): New prototype.
5236 * c-lex.c (init_c_lex): Set cb->has_attribute to
5237 c_common_has_attribute instead of cb_has_attribute.
5238 (get_token_no_padding): New function.
5239 (cb_has_attribute): Renamed to ...
5240 (c_common_has_attribute): ... this. No longer static. Use
5241 get_token_no_padding, require ()s, don't build TREE_LIST
5242 unnecessarily, fix up formatting, adjust diagnostics, call
5245 2014-12-15 Jason Merrill <jason@redhat.com>
5247 * c.opt (-fsized-deallocation, -Wc++14-compat): New.
5248 (-Wsized-deallocation): New.
5249 * c-opts.c (c_common_post_options): -fsized-deallocation defaults
5250 to on in C++14 and up.
5252 2014-12-11 Jason Merrill <jason@redhat.com>
5254 * c-cppbuiltin.c (c_cpp_builtins): Enable C++14 __cpp_constexpr.
5256 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_runtime_arrays if
5257 we aren't complaining about VLAs.
5259 2014-12-06 Marek Polacek <polacek@redhat.com>
5261 PR tree-optimization/64183
5262 * c-gimplify.c (c_gimplify_expr): Don't convert the RHS of a
5263 shift-expression if it is integer_type_node. Use types_compatible_p.
5265 2014-11-29 Jakub Jelinek <jakub@redhat.com>
5267 * c-common.c (convert_vector_to_pointer_for_subscript): Remove NULL
5268 last argument from create_tmp_var_raw and create_tmp_var calls.
5269 * cilk.c (gimplify_cilk_spawn): Likewise.
5270 * c-omp.c (c_finish_omp_atomic): Likewise.
5272 2014-11-28 Marek Polacek <polacek@redhat.com>
5274 * c-ubsan.c (ubsan_instrument_shift): Use op1_utype for MINUS_EXPR
5275 instead of unsigned_type_node.
5277 2014-11-28 Marek Polacek <polacek@redhat.com>
5280 * c-ubsan.c (ubsan_instrument_shift): Change the type of a MINUS_EXPR
5282 * c-gimplify.c (c_gimplify_expr): Convert right operand of a shift
5283 expression to unsigned_type_node.
5285 2014-11-20 Mark Wielaard <mjw@redhat.com>
5288 * c-opts.c (set_std_c89): Set lang_hooks.name.
5289 (set_std_c99): Likewise.
5290 (set_std_c11): Likewise.
5291 (set_std_cxx98): Likewise.
5292 (set_std_cxx11): Likewise.
5293 (set_std_cxx14): Likewise.
5294 (set_std_cxx1z): Likewise.
5296 2014-11-21 Jakub Jelinek <jakub@redhat.com>
5299 * c-common.h (convert_vector_to_pointer_for_subscript): Change
5300 return type to bool.
5301 * c-common.c: Include gimple-expr.h.
5302 (convert_vector_to_pointer_for_subscript): Change return type to
5303 bool. If *vecp is not lvalue_p and has VECTOR_TYPE, return true
5304 and copy it into a TARGET_EXPR and use that instead of *vecp
5307 2014-11-19 David Malcolm <dmalcolm@redhat.com>
5309 Merger of git branch "gimple-classes-v2-option-3".
5310 * ChangeLog.gimple-classes: New.
5311 * c-gimplify.c (add_block_to_enclosing): Strengthen local "stack"
5312 from being just a vec<gimple> to a vec<gbind *>.
5314 2014-11-18 Jakub Jelinek <jakub@redhat.com>
5317 * c-ubsan.c (ubsan_maybe_instrument_reference_or_call): Change type
5318 argument to ptype, set type to TREE_TYPE (ptype). Don't call
5319 get_pointer_alignment for non-pointers. Use ptype, or if it is
5320 reference type, corresponding pointer type, as type of kind
5322 (ubsan_maybe_instrument_reference,
5323 ubsan_maybe_instrument_member_call): Adjust callers.
5325 2014-11-15 Marek Polacek <polacek@redhat.com>
5328 * array-notation-common.c (is_sec_implicit_index_fn): Return false
5330 (extract_array_notation_exprs): Return for NULL node.
5332 2014-11-12 Joseph Myers <joseph@codesourcery.com>
5334 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Define and
5335 undefine __NO_MATH_ERRNO__ based on changes to -fmath-errno state.
5337 2014-11-12 Jakub Jelinek <jakub@redhat.com>
5340 * c-common.c (check_builtin_function_arguments): Handle
5341 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW.
5343 2014-11-10 Andi Kleen <ak@linux.intel.com>
5346 * c-common.h (check_no_cilk): Declare.
5347 * cilk.c (get_error_location): New function.
5348 (check_no_cilk): Dito.
5350 2014-11-10 Andi Kleen <ak@linux.intel.com>
5352 * cilk.c (recognize_spawn): Use expression location
5355 2014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
5357 * c.opt ([Wshift-count-negative, Wshift-count-overflow]): Add.
5359 2014-11-10 Edward Smith-Rowland <3dw4rd@verizon.net>
5361 * c-cppbuiltin.c (__has_attribute, __has_cpp_attribute): New macros;
5362 (__cpp_rtti, __cpp_exceptions): New macros for C++98;
5363 (__cpp_range_based_for, __cpp_initializer_lists,
5364 __cpp_delegating_constructors, __cpp_nsdmi,
5365 __cpp_inheriting_constructors, __cpp_ref_qualifiers): New macros
5366 for C++11; (__cpp_attribute_deprecated): Remove in favor of
5367 __has_cpp_attribute.
5368 * c-lex.c (cb_has_attribute): New callback CPP function;
5369 (init_c_lex): Set has_attribute callback.
5371 2014-11-04 Richard Biener <rguenther@suse.de>
5373 * c-common.c (shorten_compare): Do not shorten mixed
5374 DFP and non-DFP compares.
5376 2014-11-01 Edward Smith-Rowland <3dw4rd@verizon.net>
5378 * g++.dg/cpp1y/feat-cxx11.C: Commentary and rearrangement of tests.
5379 * g++.dg/cpp1y/feat-cxx11-neg.C: Add aggregate NSDMI test.
5380 Commentary and rearrangement of tests.
5381 * g++.dg/cpp1y/feat-cxx14.C: Enable aggregate NSDMI test.
5382 Commentary and rearrangement of tests.
5383 * g++.dg/cpp1y/feat-cxx98-neg.C: Ditto
5384 * g++.dg/cpp1y/feat-cxx98.C: Commentary.
5386 2014-10-29 Richard Sandiford <richard.sandiford@arm.com>
5388 * c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant
5389 enum from machine_mode.
5391 2014-10-28 Andrew MacLeod <amacleod@redhat.com>
5393 * c-common.c: Adjust include files.
5394 * c-gimplify.c: Ditto.
5396 * c-pragma.c: Ditto.
5399 2014-10-27 Andrew MacLeod <amacleod@redhat.com>
5401 * c-gimplify.c: Adjust include files.
5403 2014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
5406 * c-opts.c (c_common_diagnostics_set_defaults): Renamed from
5407 c_common_initialize_diagnostics.
5408 * c-common.h: Likewise.
5410 2014-10-24 Marek Polacek <polacek@redhat.com>
5413 * c-pretty-print.c (c_pretty_printer::simple_type_specifier): Don't
5414 print "struct"/"union"/"enum" for typedefed names.
5416 2014-10-23 Marek Polacek <polacek@redhat.com>
5418 * c-ubsan.c (ubsan_instrument_shift): Perform the MINUS_EXPR
5421 2014-10-22 Jakub Jelinek <jakub@redhat.com>
5422 Yury Gribov <y.gribov@samsung.com>
5424 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
5425 ubsan_instrument_vla): Check bits in flag_sanitize_recover bitmask
5426 instead of flag_sanitize_recover as bool flag.
5428 2014-10-21 Kirill Yukhin <kirill.yukhin@intel.com>
5430 * cilk.c: Revert previous change.
5432 2014-10-20 Igor Zamyatin <igor.zamyatin@intel.com>
5435 * cilk.c: Include vec.h.
5436 (struct cilk_decls): New structure.
5437 (wrapper_parm_cb): Split this function to...
5438 (fill_decls_vec): ...this...
5439 (create_parm_list): ...and this.
5440 (compare_decls): New function.
5441 (for_local_cb): Remove.
5442 (wrapper_local_cb): Ditto.
5443 (build_wrapper_type): For now first traverse and fill vector of
5444 declarations then sort it and then deal with sorted vector.
5445 (cilk_outline): Ditto.
5446 (declare_one_free_variable): Ditto.
5448 2014-10-17 Marek Polacek <polacek@redhat.com>
5450 * c-opts.c (c_common_post_options): Set warn_implicit_int.
5451 * c.opt (Wimplicit-int): Initialize to -1.
5453 2014-10-16 Andrew MacLeod <amacleod@redhat.com>
5455 * c-pragma.c: Adjust include files.
5456 * c-semantics.c: Likewise.
5458 2014-10-16 DJ Delorie <dj@redhat.com>
5460 * c-cppbuiltin.c (cpp_atomic_builtins): Don't assume pointers are
5463 2014-10-14 Jason Merrill <jason@redhat.com>
5466 * c-common.h (CPP_PREPARSED_EXPR): New.
5467 (N_CP_TTYPES): Adjust.
5469 2014-10-15 Marek Polacek <polacek@redhat.com>
5471 * c-opts.c (c_common_init_options): Make -std=gnu11 the default for C.
5473 2014-10-14 DJ Delorie <dj@redhat.com>
5475 * c-pretty-print.c (pp_c_integer_constant): Check for all __intN
5476 types, not just __int128.
5477 * c-cppbuiltin.c (c_cpp_builtins): Add builtins for all __intN
5478 types, not just __int128.
5479 (cpp_atomic_builtins): Round pointer sizes up.
5480 (type_suffix): Use type precision, not specific types.
5481 * c-common.c (c_common_reswords): Remove __int128 special case.
5482 (c_common_type_for_size): Check for all __intN types, not just
5484 (c_common_type_for_mode): Likewise.
5485 (c_common_signed_or_unsigned_type): Likewise.
5486 (c_build_bitfield_integer_type): Likewise.
5487 (c_common_nodes_and_builtins): Likewise.
5488 (keyword_begins_type_specifier): Likewise.
5489 * c-common.h (rid): Remove RID_INT128 and add RID_INT_N_* for all
5492 2014-10-12 Trevor Saunders <tsaunders@mozilla.com>
5494 * c-common.c: Use hash_table instead of hashtab.
5496 2014-10-06 Edward Smith-Rowland <3dw4rd@verizon.net>
5498 * c-cppbuiltin.c: Move __cpp_attribute_deprecated to the
5501 2014-10-03 Marc Glisse <marc.glisse@inria.fr>
5506 * c-common.c (warn_logical_operator): Punt for vectors.
5508 2014-10-01 Edward Smith-Rowland <3dw4rd@verizon.net>
5510 Implement SD-6: SG10 Feature Test Recommendations
5511 * c-cppbuiltin.c (c_cpp_builtins()): Define language feature
5512 macros and the __has_header macro.
5514 2014-09-30 Jason Merrill <jason@redhat.com>
5516 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_ASSIGNABLE and
5517 RID_IS_TRIVIALLY_CONSTRUCTIBLE.
5518 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
5520 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_COPYABLE.
5521 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
5523 * c-common.h (enum rid): Remove RID_IS_CONVERTIBLE_TO.
5524 * c-common.c (c_common_reswords): Remove __is_convertible_to.
5526 2014-09-24 Marek Polacek <polacek@redhat.com>
5530 * c-common.h (struct c_common_resword): Don't define CPP_KEYWORD.
5532 2014-09-23 Andi Kleen <ak@linux.intel.com>
5534 * c-common.c (handle_no_reorder_attribute): New function.
5535 (c_common_attribute_table): Add no_reorder attribute.
5537 2014-09-22 Joseph Myers <joseph@codesourcery.com>
5539 * c-cppbuiltin.c (c_cpp_builtins): Define
5540 __LIBGCC_*_EXCESS_PRECISION__ macros for supported floating-point
5543 2014-09-18 Joseph Myers <joseph@codesourcery.com>
5545 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_*_FUNC_EXT__
5546 for supported floating-point modes.
5548 2014-09-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
5550 * c.opt (Wpsabi): Use LangEnabledBy.
5551 * c-opts.c (c_common_handle_option): Do not handle here.
5553 2014-09-12 Joseph Myers <joseph@codesourcery.com>
5555 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_HAS_%s_MODE__
5556 macros for floating-point modes.
5558 2014-09-11 Marc Glisse <marc.glisse@inria.fr>
5561 * c-cppbuiltin.c (builtin_define_float_constants): Correct
5562 __*_DENORM_MIN__ without denormals.
5564 2014-09-10 Jakub Jelinek <jakub@redhat.com>
5566 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
5567 ubsan_instrument_vla, ubsan_instrument_return): Adjust
5568 ubsan_create_data callers.
5569 (ubsan_instrument_bounds): Don't emit UBSAN_BOUNDS at all if
5570 index is constant or BIT_AND_EXPR with constant mask and is
5571 small enough for the bound.
5572 * c-gimplify.c (ubsan_walk_array_refs_r): For ADDR_EXPR of
5573 ARRAY_REF, make sure the inner ARRAY_REF is not walked again.
5575 2014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
5577 * c.opt: Add CppReason to various flags.
5578 (Wdate-time): Re-sort.
5579 * c-common.c: Include c-common.h earlier.
5580 (struct reason_option_codes_t): Delete.
5581 (c_option_controlling_cpp_error): Prefix global type and struct
5584 2014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
5586 * c.opt (Wnormalized): New.
5587 (Wnormalized=): Use Enum and Reject Negative.
5588 * c-opts.c (c_common_handle_option): Do not handle Wnormalized here.
5590 2014-09-08 Joseph Myers <joseph@codesourcery.com>
5592 * c-cppbuiltin.c (c_cpp_builtins): Define macros for mantissa
5593 digits of floating-point modes if -fbuilding-libgcc.
5595 2014-09-05 Joseph Myers <joseph@codesourcery.com>
5597 * c-cppbuiltin.c (c_cpp_builtins): Also define
5598 __LIBGCC_EH_TABLES_CAN_BE_READ_ONLY__,
5599 __LIBGCC_EH_FRAME_SECTION_NAME__, __LIBGCC_JCR_SECTION_NAME__,
5600 __LIBGCC_CTORS_SECTION_ASM_OP__, __LIBGCC_DTORS_SECTION_ASM_OP__,
5601 __LIBGCC_TEXT_SECTION_ASM_OP__, __LIBGCC_INIT_SECTION_ASM_OP__,
5602 __LIBGCC_INIT_ARRAY_SECTION_ASM_OP__,
5603 __LIBGCC_STACK_GROWS_DOWNWARD__,
5604 __LIBGCC_DONT_USE_BUILTIN_SETJMP__,
5605 __LIBGCC_DWARF_ALT_FRAME_RETURN_COLUMN__,
5606 __LIBGCC_DWARF_FRAME_REGISTERS__,
5607 __LIBGCC_EH_RETURN_STACKADJ_RTX__, __LIBGCC_JMP_BUF_SIZE__,
5608 __LIBGCC_STACK_POINTER_REGNUM__ and
5609 __LIBGCC_VTABLE_USES_DESCRIPTORS__ for -fbuilding-libgcc.
5610 (builtin_define_with_value): Handle backslash-escaping in string
5613 2014-09-05 Richard Biener <rguenther@suse.de>
5616 * c-format.c (check_format_arg): Properly handle
5617 effectively signed POINTER_PLUS_EXPR offset.
5619 2014-09-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
5621 * c.opt (Wc90-c99-compat,Wc++-compat,Wcomment,Wendif-labels,
5622 Winvalid-pch,Wlong-long,Wmissing-include-dirs,Wmultichar,Wpedantic,
5623 (Wdate-time,Wtraditional,Wundef,Wvariadic-macros): Add CPP, Var
5625 * c-opts.c (c_common_handle_option): Do not handle here.
5626 (sanitize_cpp_opts): Likewise.
5627 * c-common.c (struct reason_option_codes_t): Handle
5628 CPP_W_C90_C99_COMPAT and CPP_W_PEDANTIC.
5630 2014-09-03 Marek Polacek <polacek@redhat.com>
5632 * c.opt (Wlogical-not-parentheses): Enable by -Wall.
5634 2014-09-02 Jakub Jelinek <jakub@redhat.com>
5635 Balaji V. Iyer <balaji.v.iyer@intel.com>
5636 Igor Zamyatin <igor.zamyatin@intel.com>
5638 * c-cilkplus.c (cilk_for_number_of_iterations): New function.
5639 * c-common.c (c_common_reswords): Added _Cilk_for.
5640 * c-common.h (enum rid): Added RID_CILK_FOR.
5641 (cilk_for_number_of_iterations): Add declaration.
5642 * c-omp.c (c_finish_omp_for): Added checks for CILK_SIMD and
5644 * c-pragma.c (init_pragma): Register "grainsize" pragma.
5645 * c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_GRAINSIZE.
5647 2014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
5649 * c.opt (Wbuiltin-macro-redefined,Wdeprecated,Wendif-labels,
5650 Winvalid-pch,Wliteral-suffix,Wmissing-include-dirs,Wtrigraphs,
5651 Wundef): Use CPP, Var and Init.
5652 * c-opts.c (c_common_handle_option): Do not handle the above flags here.
5654 2014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
5656 * c.opt (Wbuiltin-macro-redefined): Use CPP, Var and Init.
5657 * c-opts.c (c_common_handle_option): Do not handle here.
5659 2014-08-25 Jason Merrill <jason@redhat.com>
5661 * c.opt: Change -std=c++1y and -std=gnu++1y to be aliases for
5662 -std=c++14 and -std=gnu++14, rather than the reverse.
5663 * c-opts.c (c_common_handle_option): Change OPT_std_c__1y and
5664 OPT_std_gnu__1y to OPT_std_c__14 and OPT_std_gnu__14.
5665 * c-common.h (cxx_dialect): Remove cxx1y.
5667 2014-08-23 Edward Smith-Rowland <3dw4rd@verizon.net>
5669 * c-common.h (enum cxx_dialect): Add cxx14.
5670 * c-opts.c (set_std_cxx1y): Rename to set_std_cxx14; Use cxx14.
5671 * c-ubsan.c (ubsan_instrument_shift): Change comment and logic from
5672 cxx_dialect == cxx11 || cxx_dialect == cxx1y to cxx_dialect >= cxx11.
5674 2014-08-22 Jason Merrill <jason@redhat.com>
5676 * c.opt (std=gnu++17): Fix alias.
5678 2014-08-22 Marek Polacek <polacek@redhat.com>
5681 * c-common.c (warn_logical_not_parentheses): Don't check LHS. Don't
5682 check for vector types. Drop LHS argument.
5683 * c-common.h (warn_logical_not_parentheses): Adjust.
5685 2014-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
5687 * c.opt (Wcomment): Use CPP, Var and LangEnabledBy.
5688 (Wmultichar): Likewise.
5689 (Wdate-time): Use C-family languages instead of Common. Use CPP
5691 * c-opts.c (c_common_handle_option): Do not handle the above
5693 (sanitize_cpp_opts): Likewise.
5695 2014-08-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
5698 * c-opts.c: Include tree-diagnostics.h.
5699 (c_diagnostic_finalizer): New.
5700 (c_common_initialize_diagnostics): Use it.
5702 2014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
5704 PR preprocessor/51303
5705 * c-common.c (struct reason_option_codes_t option_codes):
5706 Add CPP_W_MISSING_INCLUDE_DIRS. Sort alphabetically.
5708 2014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
5712 * c.opt (Wvariadic-macros): Use CPP and LangEnabledBy.
5713 * c-opts.c (c_common_handle_option): Call cpp_handle_option_auto.
5714 (c_common_post_options): Call init_global_opts_from_cpp.
5715 (sanitize_cpp_opts): Do not handle Wvariadic-macros here.
5717 2014-08-19 Marek Polacek <polacek@redhat.com>
5720 * c-common.c (maybe_warn_bool_compare): New function.
5721 * c-common.h (maybe_warn_bool_compare): Declare.
5722 * c.opt (Wbool-compare): New option.
5724 2014-08-19 Marek Polacek <polacek@redhat.com>
5726 * c.opt (Wc99-c11-compat): New option.
5728 2014-08-19 Marek Polacek <polacek@redhat.com>
5730 * c-opts.c (sanitize_cpp_opts): Make warn_long_long be set according
5731 to warn_c90_c99_compat.
5732 * c.opt (Wc90-c99-compat, Wdeclaration-after-statement): Initialize
5735 2014-08-19 Manuel López-Ibáñez <manu@gcc.gnu.org>
5736 Steven Bosscher <steven@gcc.gnu.org>
5739 * c-format.c: Add extra_arg_loc and format_string_loc to struct
5740 format_check_results.
5741 (check_function_format): Use true and add comment for boolean
5743 (finish_dollar_format_checking): Use explicit location when warning.
5744 (check_format_info): Likewise.
5745 (check_format_arg): Set extra_arg_loc and format_string_loc.
5746 (check_format_info_main): Use explicit location when warning.
5747 (check_format_types): Pass explicit location.
5748 (format_type_warning): Likewise.
5750 2014-08-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
5753 * c-format.c: Handle Fortran flags.
5755 2014-08-12 Igor Zamyatin <igor.zamyatin@intel.com>
5758 * array-notation-common.c (find_rank): Added handling for other
5759 types of references.
5761 2014-08-10 Marek Polacek <polacek@redhat.com>
5764 * c-opts.c (sanitize_cpp_opts): Pass warn_c90_c99_compat to libcpp.
5765 * c.opt (Wc90-c99-compat): Add option.
5767 2014-08-07 Trevor Saunders <tsaunders@mozilla.com>
5769 * c-gimplify.c, cilk.c: Remove includes of pointer-set.h.
5771 2014-08-03 Marek Polacek <polacek@redhat.com>
5773 * c-common.c (check_case_value): Add location_t parameter. Use it.
5774 (c_add_case_label): Pass loc to check_case_value.
5776 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
5778 * cilk.c: Use hash_map instead of pointer_map.
5780 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
5782 * c-gimplify.c: Use hash_set instead of pointer_set.
5784 2014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
5787 * array-notation-common.c (extract_array_notation_exprs): Handling
5790 2014-08-01 Jakub Jelinek <jakub@redhat.com>
5792 * c-common.h (min_align_of_type): Removed prototype.
5793 * c-common.c (min_align_of_type): Removed.
5794 * c-ubsan.h (ubsan_maybe_instrument_reference,
5795 ubsan_maybe_instrument_member_call): New prototypes.
5796 * c-ubsan.c: Include stor-layout.h and builtins.h.
5797 (ubsan_maybe_instrument_reference_or_call,
5798 ubsan_maybe_instrument_reference, ubsan_maybe_instrument_call): New
5801 2014-07-31 Marc Glisse <marc.glisse@inria.fr>
5804 * c.opt (-Wreturn-local-addr): Move to common.opt.
5806 2014-07-30 Jason Merrill <jason@redhat.com>
5811 * c.opt (-fuse-all-virtuals): New.
5813 2014-07-30 Tom Tromey <tromey@redhat.com>
5816 * c.opt (Wdesignated-init): New option.
5817 * c-common.c (c_common_attribute_table): Add "designated_init".
5818 (handle_designated_init): New function.
5820 2014-07-24 Marek Polacek <polacek@redhat.com>
5823 * c-opts.c (c_finish_options): If -imacros is in effect, return.
5825 2014-07-16 Dodji Seketeli <dodji@redhat.com>
5827 PR preprocessor/60723 - missing system-ness marks for macro tokens
5828 * c-ppoutput.c (struct print::prev_was_system_token): New data
5830 (init_pp_output): Initialize it.
5831 (maybe_print_line_1, maybe_print_line, print_line_1, print_line)
5832 (do_line_change): Return a flag saying if a line marker was
5834 (scan_translation_unit): Detect if the system-ness of the token we
5835 are about to emit is different from the one of the previously
5836 emitted token. If so, emit a line marker. Avoid emitting useless
5837 adjacent line markers. Avoid emitting line markers for tokens
5838 originating from the expansion of built-in macros.
5839 (scan_translation_unit_directives_only): Adjust.
5841 2014-07-15 Marek Polacek <polacek@redhat.com>
5843 * c-ubsan.c (ubsan_instrument_bounds): Don't instrument if
5844 TYPE_MAX_VALUE is NULL.
5846 2014-07-14 Jakub Jelinek <jakub@redhat.com>
5849 * c.opt (Wmemset-transposed-args): New warning.
5851 2014-07-10 Jason Merrill <jason@redhat.com>
5855 * c.opt (-fuse-all-virtuals): New.
5857 2014-07-09 Richard Biener <rguenther@suse.de>
5860 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
5861 using unsigned arithmetic if overflow does not wrap instead of
5862 if overflow is undefined.
5864 2014-07-06 Marek Polacek <polacek@redhat.com>
5867 * c.opt (Wsizeof-array-argument): New option.
5869 2014-07-03 Jakub Jelinek <jakub@redhat.com>
5871 * c-ada-spec.c (dump_ada_nodes): Don't call qsort if
5872 comments->count <= 1, as comments->entries might be NULL.
5874 2014-07-01 Marek Polacek <polacek@redhat.com>
5876 * c.opt (Wint-conversion): New option.
5878 2014-07-01 Marek Polacek <polacek@redhat.com>
5881 * c.opt (Wincompatible-pointer-types): New option.
5883 2014-06-30 Paolo Carlini <paolo.carlini@oracle.com>
5886 * c-common.c (handle_noreturn_attribute, handle_const_attribute):
5887 Do not discard TYPE_QUALS of type.
5889 2014-06-26 Jason Merrill <jason@redhat.com>
5891 * c-common.h (enum cxx_dialect): Add cxx1z.
5892 * c.opt (std=c++1z, std=c++17, std=gnu++1z, std=gnu++17): New.
5893 * c-opts.c (c_common_handle_option, set_std_cxx1z): Handle it.
5895 2014-06-26 Teresa Johnson <tejohnson@google.com>
5897 * c-common.h (get_dump_info): Declare.
5898 * c-gimplify.c (c_genericize): Use saved dump files.
5899 * c-opts.c (c_common_parse_file): Begin and end dumps
5900 once around parsing invocation.
5901 (get_dump_info): New function.
5903 2014-06-23 Marek Polacek <polacek@redhat.com>
5904 Andrew MacLeod <amacleod@redhat.com>
5907 * c-common.c (get_atomic_generic_size): Don't segfault if the
5908 type doesn't have a size.
5910 2014-06-20 Marek Polacek <polacek@redhat.com>
5912 * c-gimplify.c: Include "c-ubsan.h" and "pointer-set.h".
5913 (ubsan_walk_array_refs_r): New function.
5914 (c_genericize): Instrument array bounds.
5915 * c-ubsan.c: Include "internal-fn.h".
5916 (ubsan_instrument_division): Mark instrumented arrays as having
5917 side effects. Adjust ubsan_type_descriptor call.
5918 (ubsan_instrument_shift): Likewise.
5919 (ubsan_instrument_vla): Adjust ubsan_type_descriptor call.
5920 (ubsan_instrument_bounds): New function.
5921 (ubsan_array_ref_instrumented_p): New function.
5922 (ubsan_maybe_instrument_array_ref): New function.
5923 * c-ubsan.h (ubsan_instrument_bounds): Declare.
5924 (ubsan_array_ref_instrumented_p): Declare.
5925 (ubsan_maybe_instrument_array_ref): Declare.
5927 2014-06-20 Hale Wang <hale.wang@arm.com>
5930 * c.opt (fshort-enums): Add to LTO.
5931 * c.opt (fshort-wchar): Likewise.
5933 2014-06-16 Marek Polacek <polacek@redhat.com>
5936 * c.opt (Wswitch-bool): Add Var.
5938 2014-06-12 Jakub Jelinek <jakub@redhat.com>
5941 * c-omp.c (c_omp_split_clauses): Don't crash on firstprivate in
5942 #pragma omp target teams or
5943 #pragma omp {,target }teams distribute simd.
5945 2014-06-12 Jason Merrill <jason@redhat.com>
5947 * c.opt (Wabi=, fabi-compat-version): New.
5948 * c-opts.c (c_common_handle_option): Handle -Wabi=.
5949 (c_common_post_options): Handle flag_abi_compat_version default.
5950 Disallow -fabi-compat-version=1.
5951 * c-common.h (abi_version_crosses): New.
5953 2014-06-11 Jan Hubicka <hubicka@ucw.cz>
5955 * c-common.c (handle_section_attribute): Update handling for
5956 section names that are no longer trees.
5958 2014-06-10 Jakub Jelinek <jakub@redhat.com>
5961 * c-pragma.c (omp_pragmas_simd): Move PRAGMA_OMP_TASK...
5962 (omp_pragmas): ... back here.
5964 2014-06-05 Marek Polacek <polacek@redhat.com>
5967 * c-common.c (warn_logical_not_parentheses): New function.
5968 * c-common.h (warn_logical_not_parentheses): Declare.
5969 * c.opt (Wlogical-not-parentheses): New option.
5971 2014-06-04 Marek Polacek <polacek@redhat.com>
5974 * c-common.c (check_case_bounds): Add location parameter.
5976 (c_add_case_label): Pass loc to check_case_bounds.
5978 2014-06-03 Marek Polacek <polacek@redhat.com>
5981 * c.opt (Wswitch-bool): New option.
5983 2014-05-22 Thomas Schwinge <thomas@codesourcery.com>
5985 * c-common.h (c_omp_sharing_predetermined, c_omp_remap_decl):
5987 (record_types_used_by_current_var_decl): Move prototype to where
5990 * c-common.c (DEF_FUNCTION_TYPE_0, DEF_FUNCTION_TYPE_6)
5991 (DEF_FUNCTION_TYPE_7, DEF_FUNCTION_TYPE_8)
5992 (DEF_FUNCTION_TYPE_VAR_5): Cosmetic fixes.
5994 2014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
5996 * c-common.h (CTI_VOID_ZERO, void_zero_node): Delete.
5997 * c-common.c (c_common_nodes_and_builtins): Don't initialize
5999 * c-pretty-print.c (pp_c_void_constant): New function.
6000 (c_pretty_printer::constant, c_pretty_printer::primary_expression)
6001 (c_pretty_printer::expression): Handle VOID_CST.
6002 * cilk.c (extract_free_variables): Likewise.
6003 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift)
6004 (ubsan_instrument_vla): Use void_node instead of void_zero_node.
6006 2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
6008 * c-common.h (sorted_fields_type): Remove variable_size GTY attribute.
6009 * c-pragma.c (push_alignment): Adjust.
6010 (handle_pragma_push_options): Likewise.
6012 2014-05-09 Marek Polacek <polacek@redhat.com>
6015 * c-common.c (check_user_alignment): Return -1 if alignment is error
6017 (handle_aligned_attribute): Don't call default_conversion on
6019 (handle_vector_size_attribute): Likewise.
6020 (handle_tm_wrap_attribute): Handle case when wrap_decl is error node.
6021 (handle_sentinel_attribute): Call default_conversion and allow even
6022 integral types as an argument.
6024 2014-05-08 Marek Polacek <polacek@redhat.com>
6027 * c-common.c (min_align_of_type): New function factored out from...
6028 (c_sizeof_or_alignof_type): ...here.
6029 * c-common.h (min_align_of_type): Declare.
6031 2014-05-08 Marek Polacek <polacek@redhat.com>
6034 * c-common.c (check_main_parameter_types): Warn for _Atomic-qualified
6035 parameter type of main.
6037 2014-05-07 DJ Delorie <dj@redhat.com>
6039 * c-cppbuiltin.c (print_bits_of_hex): New.
6040 (builtin_define_type_minmax): Print values using hex so as not to
6041 require a pre-computed list of string values.
6043 2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
6044 Mike Stump <mikestump@comcast.net>
6045 Richard Sandiford <rdsandiford@googlemail.com>
6047 * c-ada-spec.c: Include wide-int.h.
6048 (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Remove.
6049 (dump_generic_ada_node): Use wide-int interfaces.
6050 * c-common.c: Include wide-int-print.h.
6051 (shorten_compare): Use wide-int interfaces and tree_int_cst_lt.
6052 (pointer_int_sum): Use wide-int interfaces.
6053 (c_common_nodes_and_builtins): Use make_int_cst.
6054 (match_case_to_enum_1): Use tree_fits_uhwi_p and tree_fits_shwi_p.
6055 (handle_alloc_size_attribute): Use wide-int interfaces.
6056 (get_nonnull_operand): Likewise.
6057 * c-format.c (get_constant): Use tree_fits_uhwi_p.
6058 * c-lex.c: Include wide-int.h.
6059 (narrowest_unsigned_type): Take a widest_int rather than two
6061 (narrowest_signed_type): Likewise.
6062 (interpret_integer): Update accordingly. Use wide-int interfaces.
6063 (lex_charconst): Use wide-int interfaces.
6064 * c-pretty-print.c: Include wide-int.h.
6065 (pp_c_integer_constant): Use wide-int interfaces.
6066 * cilk.c (declare_one_free_variable): Use tree_int_cst_lt instead of
6067 INT_CST_LT_UNSIGNED.
6069 2014-05-06 Richard Biener <rguenther@suse.de>
6071 * c-opts.c (c_common_post_options): For -freestanding,
6072 -fno-hosted and -fno-builtin disable pattern recognition
6073 if not enabled explicitely.
6075 2014-05-02 Marek Polacek <polacek@redhat.com>
6077 * c.opt (Wsizeof-pointer-memaccess): Describe option.
6079 2014-05-01 Marek Polacek <polacek@redhat.com>
6082 * c.opt (Wdiscarded-qualifiers): Add.
6084 2014-04-30 Marek Polacek <polacek@redhat.com>
6086 * c-ubsan.c (ubsan_instrument_division): Handle REAL_TYPEs. Perform
6087 INT_MIN / -1 sanitization only for integer types.
6089 2014-04-25 Marek Polacek <polacek@redhat.com>
6092 * c-common.c (handle_noinline_attribute): Warn if the attribute
6093 conflicts with always_inline attribute.
6094 (handle_always_inline_attribute): Warn if the attribute conflicts
6095 with noinline attribute.
6097 2014-04-25 Marek Polacek <polacek@redhat.com>
6100 * c-common.c (check_main_parameter_types): Warn about variadic main.
6102 2014-04-24 Mike Stump <mikestump@comcast.net>
6104 * c.opt (Wshadow-ivar): Default to on.
6106 2014-04-24 Dimitris Papavasiliou <dpapavas@gmail.com>
6108 * c.opt (Wshadow-ivar, flocal-ivars, fivar-visibility): Add.
6110 2014-04-23 Marek Polacek <polacek@redhat.com>
6112 * c-common.c (handle_tm_wrap_attribute): Tweak error message.
6114 2014-04-22 Jakub Jelinek <jakub@redhat.com>
6117 * c-ubsan.c (ubsan_instrument_return): Return __builtin_trap ()
6118 if flag_sanitize_undefined_trap_on_error.
6119 (ubsan_instrument_division, ubsan_instrument_shift,
6120 ubsan_instrument_vla): Likewise. Use __ubsan_handle_*_abort ()
6121 if !flag_sanitize_recover.
6123 2014-04-22 Marc Glisse <marc.glisse@inria.fr>
6126 * c-common.c (registered_builtin_types): Make non-static.
6127 * c-common.h (registered_builtin_types): Declare.
6129 2014-04-14 Richard Biener <rguenther@suse.de>
6130 Marc Glisse <marc.glisse@inria.fr>
6133 * c-common.c (convert_vector_to_pointer_for_subscript): Properly
6134 apply may-alias the scalar pointer type when applicable.
6136 2014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
6139 * cilk.c (cilk_set_spawn_marker): Remove FUNCTION_DECL
6140 as possible argument for Cilk_spawn.
6142 2014-04-11 Tobias Burnus <burnus@net-b.de>
6145 * c.opt (Wformat-signedness): Add
6146 * c-format.c(check_format_types): Use it.
6148 2014-04-11 Jason Merrill <jason@redhat.com>
6151 * c-common.c (sync_resolve_size, get_atomic_generic_size): Call
6152 default_conversion for an array argument.
6154 2014-04-08 Marek Polacek <polacek@redhat.com>
6157 * c-ubsan.c: Include asan.h.
6158 (ubsan_instrument_return): Call initialize_sanitizer_builtins.
6160 2014-04-03 Nathan Sidwell <nathan@codesourcery.com>
6162 * c.opt (Wnon-virtual-dtor): Auto set when Weffc++.
6164 2014-04-02 Marek Polacek <polacek@redhat.com>
6166 * c-common.h (c_expand_expr): Remove declaration.
6168 2014-03-28 Jakub Jelinek <jakub@redhat.com>
6171 * c-common.c (add_atomic_size_parameter): When creating new
6172 params vector, push the size argument first.
6174 2014-03-26 Jakub Jelinek <jakub@redhat.com>
6176 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
6177 ubsan_instrument_vla, ubsan_instrument_return): Adjust
6178 ubsan_create_data callers.
6180 2014-03-22 Jakub Jelinek <jakub@redhat.com>
6183 * c-opts.c (c_finish_options): Restore cb_file_change call to
6186 2014-03-13 Jakub Jelinek <jakub@redhat.com>
6189 * c-pragma.c (apply_pragma_weak): Only look at
6190 TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl)) if
6191 DECL_ASSEMBLER_NAME_SET_P (decl).
6192 (maybe_apply_pending_pragma_weaks): Exit early if
6193 vec_safe_is_empty (pending_weaks) rather than only when
6195 (maybe_apply_pragma_weak): Likewise. If !DECL_ASSEMBLER_NAME_SET_P,
6196 set assembler name back to NULL afterwards.
6198 2014-03-11 Jason Merrill <jason@redhat.com>
6200 * c.opt: Add -std=gnu++14.
6202 2014-03-11 Ian Bolton <ian.bolton@arm.com>
6204 * c-opts.c (c_common_post_options): Don't override
6205 -ffp-contract=fast if unsafe-math-optimizations is on.
6207 2014-03-08 Paulo Matos <paulo@matos-sorge.com>
6209 * c.opt: Enable LTO FE for fshort-double.
6211 2014-03-07 Jason Merrill <jason@redhat.com>
6213 * c.opt: Add -std=c++14.
6215 2014-03-06 Marek Polacek <polacek@redhat.com>
6218 * cilk.c (contains_cilk_spawn_stmt): New function.
6219 (contains_cilk_spawn_stmt_walker): Likewise.
6220 (recognize_spawn): Give error on invalid use of _Cilk_spawn.
6221 * c-common.h (contains_cilk_spawn_stmt): Add declaration.
6223 2014-03-03 Jakub Jelinek <jakub@redhat.com>
6225 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_SIMD.
6226 (init_pragma): Call cpp_register_deferred_pragma for PRAGMA_CILK_SIMD
6227 even when flag_preprocess_only.
6229 2014-02-26 Jason Merrill <jason@redhat.com>
6233 * c-common.c (shorten_compare): Don't check
6234 c_inhibit_evaluation_warnings.
6236 2014-02-19 Jakub Jelinek <jakub@redhat.com>
6239 * c-common.c (c_common_nodes_and_builtins): When initializing
6240 c_uint{16,32,64}_type_node, also set corresponding
6241 uint{16,32,64}_type_node to the same value.
6244 * c-pragma.c (init_pragma): Don't call cpp_register_deferred_pragma
6245 for PRAGMA_IVDEP if flag_preprocess_only.
6247 2014-02-12 Jakub Jelinek <jakub@redhat.com>
6250 * c-common.c (merge_tlist): If copy is true, call new_tlist,
6251 if false, add ADD itself, rather than vice versa.
6252 (verify_tree): For COND_EXPR, don't call merge_tlist with non-zero
6253 copy. For SAVE_EXPR, only call merge_tlist once.
6255 2014-02-08 Jakub Jelinek <jakub@redhat.com>
6258 * c-common.c (handle_alloc_size_attribute): Use tree_fits_uhwi_p
6260 (handle_alloc_align_attribute, handle_assume_aligned_attribute): New
6262 (c_common_attribute_table): Add alloc_align and assume_aligned
6265 2014-02-06 Marek Polacek <polacek@redhat.com>
6268 * c-common.c (warn_for_sign_compare): Call warning_at with location
6271 2014-02-05 Marek Polacek <polacek@redhat.com>
6274 * c-omp.c (c_finish_omp_atomic): Remove unreachable return
6277 2014-02-04 Marek Polacek <polacek@redhat.com>
6280 * c-common.c (conversion_warning): Unwrap C_MAYBE_CONST_EXPR and/or
6283 2014-02-03 Marc Glisse <marc.glisse@inria.fr>
6287 * c-common.c (handle_aligned_attribute, handle_alloc_size_attribute,
6288 handle_vector_size_attribute, handle_nonnull_attribute): Call
6289 default_conversion on the attribute argument.
6290 (handle_nonnull_attribute): Increment the argument number.
6292 2014-01-31 Marek Polacek <polacek@redhat.com>
6295 * c-common.c (add_atomic_size_parameter): Pass vNULL to
6296 build_function_call_vec.
6297 (resolve_overloaded_builtin): Likewise.
6298 * c-common.h (build_function_call_vec): Adjust declaration.
6300 2014-01-30 Marek Polacek <polacek@redhat.com>
6303 * c-common.h (unsafe_conversion_p): Adjust declaration.
6304 (warnings_for_convert_and_check): Likewise.
6305 (convert_and_check): Likewise.
6306 * c-common.c (unsafe_conversion_p): Add location parameter. Call
6307 expansion_point_location_if_in_system_header on it.
6308 (warnings_for_convert_and_check): Add location parameter. Call
6309 expansion_point_location_if_in_system_header on it. Use it.
6310 (convert_and_check): Add location parameter. Use it.
6311 (conversion_warning): Likewise.
6312 (c_add_case_label): Adjust convert_and_check calls.
6313 (scalar_to_vector): Adjust unsafe_conversion_p calls.
6315 2014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
6317 * c-common.c (c_define_builtins): Replaced flag_enable_cilkplus with
6319 * c-pragma.c (init_pragma): Likewise.
6322 2014-01-23 Marek Polacek <polacek@redhat.com>
6325 * c-common.c (shorten_compare): Add location_t parameter.
6326 * c-common.h (shorten_binary_op): Adjust declaration.
6328 2014-01-23 Marek Polacek <polacek@redhat.com>
6331 * c-common.c (pointer_to_zero_sized_aggr_p): New function.
6332 * c-common.h: Declare it.
6334 2014-01-20 Eric Botcazou <ebotcazou@adacore.com>
6336 * c-ada-spec.h (dump_ada_specs): Revert prototype change.
6337 * c-ada-spec.c (dump_ads): Likewise.
6338 (cpp_check): Likewise.
6339 (dump_ada_specs): Likewise.
6341 2014-01-15 Laurent Alfonsi <laurent.alfonsi@st.com>
6344 * c-common.c (handle_no_instrument_function_attribute): Allow
6345 no_instrument_function attribute in class member
6346 definition/declaration.
6348 2014-01-15 Jakub Jelinek <jakub@redhat.com>
6351 * c-omp.c (c_finish_omp_atomic): Set in_late_binary_op around
6352 build_modify_expr with non-NOP_EXPR opcode. Handle return from it
6353 being COMPOUND_EXPR.
6354 (c_finish_omp_for): Handle incr being COMPOUND_EXPR with first
6355 operand a SAVE_EXPR and second MODIFY_EXPR.
6357 2014-01-09 Jakub Jelinek <jakub@redhat.com>
6360 * c-pch.c (c_common_write_pch): Call
6361 prepare_target_option_nodes_for_pch.
6363 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
6365 Update copyright years
6367 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
6369 * array-notation-common.c, c-cilkplus.c: Use the standard form for
6370 the copyright notice.
6372 2013-12-28 Eric Botcazou <ebotcazou@adacore.com>
6374 * c-ada-spec.c (print_constructor): New function.
6375 (print_destructor): Retrieve the origin of the destructor.
6376 (print_ada_declaration): Revamp handling of constructors/destructors.
6378 2013-12-23 Stuart Hastings <stuart@apple.com>
6379 Bill Maddox <maddox@google.com>
6380 Jason Merrill <jason@redhat.com>
6382 * c.opt: Add -fdeclone-ctor-dtor.
6383 * c-opts.c (c_common_post_options): Default to on iff -Os.
6385 2013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
6387 * c-common.c (c_common_attribute_table): Added "cilk simd function"
6389 * c-pragma.h (enum pragma_cilk_clause): Remove.
6390 (enum pragma_omp_clause): Added the following fields:
6391 PRAGMA_CILK_CLAUSE_NOMASK, PRAGMA_CILK_CLAUSE_MASK,
6392 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_NONE,
6393 PRAGMA_CILK_CLAUSE_LINEAR, PRAGMA_CILK_CLAUSE_PRIVATE,
6394 PRAGMA_CILK_CLAUSE_FIRSTPRIVATE, PRAGMA_CILK_CLAUSE_LASTPRIVATE,
6395 PRAGMA_CILK_CLAUSE_UNIFORM.
6398 2013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
6400 * cilk.c (cilk_outline): Made this function non-static.
6401 (gimplify_cilk_spawn): Removed pre_p and post_p arguments.
6402 (create_cilk_wrapper): Added a new parameter: a function pointer.
6403 (c_install_body_w_frame_cleanup): Remove
6404 (extract_free_variables): Added VEC_INIT_EXPR and CONSTRUCTOR case.
6405 * c-common.h (cilk_outline): New prototype.
6406 (gimplify_cilk_spawn): Removed two parameters.
6407 (cilk_install_body_with_frame_cleanup): New prototype.
6408 * c-gimplify.c (c_gimplify_expr): Added MODIFY_EXPR, CALL_EXPR and
6409 CILK_SPAWN_STMT case.
6411 2013-12-11 Bernd Schmidt <bernds@codesourcery.com>
6413 * c-common.c (c_fully_fold_internal): Handle ADDR_SPACE_CONVERT_EXPR.
6415 * c-common.h (enum c_tree_index): Remove CTI_INT_ARRAY_TYPE.
6416 (int_array_type_node): Remove.
6417 * c-common.c (c_common_nodes_and_builtins): Don't build it.
6419 2013-12-05 Marek Polacek <polacek@redhat.com>
6422 * c-common.c (c_sizeof_or_alignof_type): Move a declaration into
6423 [ADJUST_FIELD_ALIGN].
6425 2013-12-04 Joseph Myers <joseph@codesourcery.com>
6428 * c-common.c (c_sizeof_or_alignof_type): Add parameter min_alignof
6429 and check field alignment if set.
6430 * c-common.h (c_sizeof_or_alignof_type): Update prototype.
6431 (c_sizeof, c_alignof): Update calls to c_sizeof_or_alignof_type.
6433 2013-12-04 Jakub Jelinek <jakub@redhat.com>
6434 Marek Polacek <polacek@redhat.com>
6436 * c-gimplify.c (c_gimplify_expr): If doing the integer-overflow
6437 sanitization, call unsigned_type_for only when !TYPE_OVERFLOW_WRAPS.
6439 2013-11-29 H.J. Lu <hongjiu.lu@intel.com>
6442 * cilk.c (gimplify_cilk_spawn): Properly handle function without
6445 2013-11-29 Jakub Jelinek <jakub@redhat.com>
6448 * c-common.c (get_priority): If TREE_VALUE (args) is IDENTIFIER_NODE,
6449 goto invalid. If it is error_mark_node, don't issue further
6452 2013-11-28 Sergey Ostanevich <sergos.gnu@gmail.com>
6454 * c.opt (Wopenmp-simd): New.
6456 2013-11-22 Jakub Jelinek <jakub@redhat.com>
6458 * c-ubsan.h (ubsan_instrument_return): New prototype.
6459 * c-ubsan.c (ubsan_instrument_return): New function.
6461 2013-11-22 Andrew MacLeod <amacleod@redhat.com>
6463 * c-common.c: Add required include files from gimple.h.
6464 * c-gimplify.c: Likewise
6467 2013-11-22 David Malcolm <dmalcolm@redhat.com>
6469 * c-common.c (unsafe_conversion_p): Remove use of
6470 EXPR_LOC_OR_HERE macro.
6471 (conversion_warning): Likewise.
6472 (warnings_for_convert_and_check): Likewise.
6473 (warn_for_collisions_1): Likewise.
6474 (shorten_compare): Likewise, and remove use of in_system_header
6475 macro, using the location from the former.
6476 * c-lex.c (dump_one_header): Remove use of input_filename macro.
6477 (cb_def_pragma): Remove use of in_system_header macro.
6478 (lex_string): Likewise.
6479 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
6481 2013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
6482 Mike Stump <mikestump@comcast.net>
6483 Richard Sandiford <rdsandiford@googlemail.com>
6485 * c-ada-spec.c (is_simple_enum): Use tree_to_shwi and tree_to_uhwi
6486 instead of TREE_INT_CST_LOW, in cases where there is a protecting
6487 tree_fits_shwi_p or tree_fits_uhwi_p.
6488 (dump_generic_ada_node): Likewise.
6489 * c-format.c (check_format_arg): Likewise.
6490 * c-pretty-print.c (pp_c_integer_constant): Likewise.
6492 2013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
6494 * c-common.c (check_function_arguments_recurse): Use tree_to_uhwi.
6496 2013-11-19 Joshua J Cogliati <jrincayc@yahoo.com>
6499 * c-common.c (unsafe_conversion_p): Make this function
6500 return an enumeration with more detail.
6501 (conversion_warning): Use the new return type of
6502 unsafe_conversion_p to separately warn either about conversions
6503 that lower floating point number precision or about the other
6504 kinds of conversions.
6505 * c-common.h (enum conversion_safety): New enumeration.
6506 (unsafe_conversion_p): switching return type to
6507 conversion_safety enumeration.
6508 * c.opt: Adding new warning -Wfloat-conversion and
6509 enabling it with -Wconversion.
6511 2013-11-19 Basile Starynkevitch <basile@starynkevitch.net>
6513 * c-opts.c: Include plugin.h.
6514 (cb_file_change): Invoke plugin event PLUGIN_INCLUDE_FILE.
6516 2013-11-19 Marek Polacek <polacek@redhat.com>
6518 * c-ubsan.c (ubsan_instrument_division): Adjust ubsan_create_data
6520 (ubsan_instrument_shift): Likewise.
6521 (ubsan_instrument_vla): Likewise.
6523 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6525 * c-common.c (convert_vector_to_pointer_for_subscript): Remove
6526 cast to unsigned type.
6528 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6530 * c-common.c (fold_offsetof_1): Use tree_to_uhwi rather than
6532 (complete_array_type): Update comment to refer to tree_to_[su]hwi
6533 rather than tree_low_cst.
6535 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6537 * c-common.c, c-cppbuiltin.c: Replace tree_low_cst (..., 1) with
6538 tree_to_uhwi throughout.
6540 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6542 * c-common.c, c-format.c, c-omp.c, c-pretty-print.c: Replace
6543 tree_low_cst (..., 0) with tree_to_shwi throughout.
6545 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6547 * c-ada-spec.c, c-common.c, c-pretty-print.c: Replace
6548 host_integerp (..., 1) with tree_fits_uhwi_p throughout.
6550 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6552 * c-ada-spec.c, c-common.c, c-format.c, c-pretty-print.c: Replace
6553 host_integerp (..., 0) with tree_fits_shwi_p throughout.
6555 2013-11-15 Aldy Hernandez <aldyh@redhat.com>
6557 * c-cilkplus.c: New file.
6558 * c-common.c (readonly_error): Add location argument.
6559 * c-common.h (readonly_error): Same.
6560 (c_finish_cilk_clauses): Protoize.
6561 (c_check_cilk_loop): Same.
6562 c-omp.c (c_finish_omp_for): Handle CILK_SIMD nodes.
6563 Do not fail on error_mark_node.
6564 Abstract increment canonicalization to here...
6565 (c_omp_for_incr_canonicalize_ptr): New.
6566 c-pragma.c (init_pragma): Register "simd" pragma.
6567 c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_SIMD.
6568 (enum pragma_cilk_clause): New.
6570 2013-11-15 Richard Sandiford <rdsandiford@googlemail.com>
6572 * c-pretty-print.c (pp_c_character_constant): Remove unnecessary
6573 wchar_type and host_integerp checks.
6575 2013-11-14 Andrew MacLeod <amacleod@redhat.com>
6577 * c-common.c: Likewise.
6578 * c-gimplify.c: Likewise.
6581 2013-11-14 Diego Novillo <dnovillo@google.com>
6583 * c-common.c: Include fold-const.h.
6584 Include stor-layout.h.
6586 Include stringpool.h.
6589 Include trans-mem.h.
6590 * c-cppbuiltin.c: Include stor-layout.h.
6591 Include stringpool.h.
6592 * c-format.c: Include stringpool.h.
6593 * c-lex.c: Include stringpool.h.
6594 Include stor-layout.h.
6595 * c-pragma.c: Include stringpool.h.
6598 Include gcc-symtab.h.
6599 * c-pretty-print.c: Include stor-layout.h.
6601 * cilk.c: Include stringpool.h.
6604 2013-11-13 Joseph Myers <joseph@codesourcery.com>
6606 * c-common.h (enum rid): Add RID_AUTO_TYPE.
6607 * c-common.c (c_common_reswords): Add __auto_type.
6608 (keyword_begins_type_specifier): Handle RID_AUTO_TYPE.
6610 2013-11-12 Andrew MacLeod <amacleod@redhat.com>
6612 * c-common.c: Include gimplify.h.
6613 * c-gimplify.c: Likewise.
6615 * c-omp.c: Include gimple-expr.h instead of gimple.h.
6616 * c-ubsan.c: Don't include gimple.h.
6618 2013-11-12 Joseph Myers <joseph@codesourcery.com>
6620 * c-common.c (c_common_reswords): Add _Thread_local.
6622 2013-11-09 Joseph Myers <joseph@codesourcery.com>
6624 * c-common.c (atomic_size_supported_p): New function.
6625 (resolve_overloaded_atomic_exchange)
6626 (resolve_overloaded_atomic_compare_exchange)
6627 (resolve_overloaded_atomic_load, resolve_overloaded_atomic_store):
6628 Use it instead of comparing size with a local list of sizes.
6630 2013-11-07 Andrew MacLeod <amacleod@redhat.com>
6631 Joseph Myers <joseph@codesourcery.com>
6633 * c-common.h (enum rid): Add RID_ATOMIC.
6634 * c-common.c (c_common_reswords): Add _Atomic.
6635 (sync_resolve_params): Use TYPE_MAIN_VARIANT on pointer argument.
6636 (keyword_is_type_qualifier): Accept RID_ATOMIC.
6637 * c-format.c (check_format_types): Check for extra _Atomic
6638 qualifiers in format argument.
6639 * c-pretty-print.c (pp_c_cv_qualifiers): Handle atomic qualifier.
6640 (pp_c_type_qualifier_list): Mention _Atomic in comment.
6642 2013-11-06 Tobias Burnus <burnus@net-b.de>
6644 * c-common.c (reason_option_codes_t): Add CPP_W_DATE_TIME.
6646 2013-11-06 Joseph Myers <joseph@codesourcery.com>
6648 * c-opts.c (c_common_post_options): Set -ffp-contract=off in C
6650 * c-cppbuiltin.c (cpp_iec_559_value): Consider -ffp-contract=fast
6651 to mean lack of IEEE 754 support.
6653 2013-11-05 Tobias Burnus <burnus@net-b.de>
6655 * c.opt (-Wdate-time): New option
6656 * c-opts.c (sanitize_cpp_opts): Pass on to libcpp.
6658 2013-11-05 Joseph Myers <joseph@codesourcery.com>
6660 * c-cppbuiltin.c (cpp_iec_559_value): Test
6661 flag_excess_precision_cmdline not flag_excess_precision.
6663 2013-11-05 Tobias Burnus <burnus@net-b.de>
6665 * c.opt (fopenmp-simd): New option.
6666 * c-pragma.c (omp_pragmas): Move pragmas which can contain simd to ...
6667 (omp_pragmas): ... this new struct.
6668 (c_pp_lookup_pragma): Also walk omp_pragmas.
6669 (init_pragma): Init pragmas for -fopenmp-simd.
6671 2013-11-04 Marek Polacek <polacek@redhat.com>
6674 * c-common.c (invalid_indirection_error): Handle RO_ARROW_STAR case.
6676 2013-11-04 Joseph Myers <joseph@codesourcery.com>
6678 * c-cppbuiltin.c (cpp_iec_559_value, cpp_iec_559_complex_value):
6680 (c_cpp_builtins): Define __GCC_IEC_559 and __GCC_IEC_559_COMPLEX.
6682 2013-11-04 Eric Botcazou <ebotcazou@adacore.com>
6684 * c-ada-spec.h (cpp_operation): Add IS_TRIVIAL.
6685 (dump_ada_specs): Adjust prototype of second callback.
6686 * c-ada-spec.c (cpp_check): New global variable.
6687 (dump_ada_nodes): Remove cpp_check parameter and do not pass it down.
6688 (print_generic_ada_decl): Likewise.
6689 (has_static_fields): Change return type to bool and add guard.
6690 (has_nontrivial_methods): New predicate.
6691 (is_tagged_type): Change return type to bool.
6692 (separate_class_package): Call has_nontrivial_methods.
6693 (pp_ada_tree_identifier): Minor tweaks.
6694 (dump_ada_function_declaration): Adjust calls to dump_generic_ada_node.
6695 (dump_ada_array_domains): Likewise.
6696 (dump_ada_array_type): Likewise.
6697 (dump_template_types): Remove cpp_check parameter and do not pass it to
6698 dump_generic_ada_node.
6699 (dump_ada_template): Likewise.
6700 (dump_generic_ada_node): Remove cpp_check parameter and do not pass it
6702 (print_ada_methods): Change return type to integer. Remove cpp_check
6703 parameter and do not pass it down.
6704 (dump_nested_types): Remove cpp_check parameter and do not pass it to
6705 dump_generic_ada_node.
6706 (print_ada_declaration): Likewise. Test RECORD_OR_UNION_TYPE_P before
6708 (print_ada_struct_decl): Remove cpp_check parameter and do not pass it
6709 down. Use has_nontrivial_methods to recognize C++ classes. Use return
6710 value of print_ada_methods.
6711 (dump_ads): Rename cpp_check parameter to check and adjust prototype.
6712 Set cpp_check to it before invoking dump_ada_nodes.
6713 (dump_ada_specs): Likewise.
6715 2013-11-03 Marek Polacek <polacek@redhat.com>
6717 * c-ubsan.c: Don't include hash-table.h.
6718 (ubsan_instrument_vla): New function.
6719 * c-ubsan.h: Declare it.
6721 2013-10-31 David Malcolm <dmalcolm@redhat.com>
6723 Automated part of renaming of symtab_node_base to symtab_node.
6725 Patch autogenerated by rename_symtab.py from
6726 https://github.com/davidmalcolm/gcc-refactoring-scripts
6727 revision 58bb219cc090b2f4516a9297d868c245495ee622
6729 * c-pragma.c (maybe_apply_pending_pragma_weaks): Rename
6730 symtab_node_base to symtab_node.
6732 2013-10-31 Edward Smith-Rowland <3dw4rd@verizon.net>
6734 Implement C++14 digit separators.
6735 * c-lex.c (interpret_float): Remove digit separators from scratch string
6736 before building real literal.
6738 2013-10-30 Jakub Jelinek <jakub@redhat.com>
6740 * cilk.c (create_cilk_helper_decl): Use HOST_WIDE_INT_PRINT_DEC.
6742 2013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
6744 * c-common.c (c_common_reswords[]): Added _Cilk_spawn and _Cilk_sync
6746 (c_define_builtins): Called cilk_init_builtins if Cilk Plus is
6748 * c-common.h (enum rid): Added RID_CILK_SPAWN and RID_CILK_SYNC.
6749 (insert_cilk_frame): New prototype.
6750 (cilk_init_builtins): Likewise.
6751 (gimplify_cilk_spawn): Likewise.
6752 (c_cilk_install_body_w_frame_cleanup): Likewise.
6753 (cilk_detect_spawn_and_unwrap): Likewise.
6754 (cilk_set_spawn_marker): Likewise.
6755 (build_cilk_sync): Likewise.
6756 (build_cilk_spawn): Likewise.
6759 2013-10-29 David Malcolm <dmalcolm@redhat.com>
6761 Patch autogenerated by refactor_symtab.py from
6762 https://github.com/davidmalcolm/gcc-refactoring-scripts
6763 revision 58bb219cc090b2f4516a9297d868c245495ee622
6765 * c-gimplify.c (c_genericize): Update for conversion of symtab types
6766 to a true class hierarchy.
6767 * c-pragma.c (maybe_apply_pending_pragma_weaks): Likewise.
6769 2013-10-27 Richard Sandiford <rdsandiford@googlemail.com>
6771 * c-lex.c (interpret_integer): Remove call to cpp_num_sign_extend.
6773 2013-10-26 Jeff Law <law@redhat.com>
6775 * c-common.c (c_define_builtins): Remove mudflap support.
6776 * c.opt: Ignore and warn for mudflap options.
6778 2013-10-24 Tobias Burnus <burnus@net-b.de>
6781 * c-pragma.c (init_pragma) Add #pragma ivdep handling.
6782 * c-pragma.h (pragma_kind): Add PRAGMA_IVDEP.
6784 2013-10-23 Jason Merrill <jason@redhat.com>
6786 * c-format.c (gcc_cxxdiag_char_table): Add %X.
6788 2013-10-11 Jakub Jelinek <jakub@redhat.com>
6790 * c-common.h (omp_clause_mask::operator !=): New method.
6791 * c-omp.c (c_omp_split_clauses): Use if ((mask & something) != 0)
6792 instead of if (mask & something) tests everywhere.
6794 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP to
6795 201307 instead of 201107.
6796 * c-common.c (DEF_FUNCTION_TYPE_8): Define.
6797 (c_common_attribute_table): Add "omp declare target" and
6798 "omp declare simd" attributes.
6799 (handle_omp_declare_target_attribute,
6800 handle_omp_declare_simd_attribute): New functions.
6801 * c-omp.c: Include c-pragma.h.
6802 (c_finish_omp_taskgroup): New function.
6803 (c_finish_omp_atomic): Add swapped argument, if true,
6804 build the operation first with rhs, lhs arguments and use NOP_EXPR
6806 (c_finish_omp_for): Add code argument, pass it down to make_code.
6807 (c_omp_split_clauses): New function.
6808 (c_split_parallel_clauses): Removed.
6809 (c_omp_declare_simd_clause_cmp, c_omp_declare_simd_clauses_to_numbers,
6810 c_omp_declare_simd_clauses_to_decls): New functions.
6811 * c-common.h (omp_clause_mask): New type.
6812 (OMP_CLAUSE_MASK_1): Define.
6813 (omp_clause_mask::omp_clause_mask, omp_clause_mask::operator &=,
6814 omp_clause_mask::operator |=, omp_clause_mask::operator ~,
6815 omp_clause_mask::operator |, omp_clause_mask::operator &,
6816 omp_clause_mask::operator <<, omp_clause_mask::operator >>,
6817 omp_clause_mask::operator ==): New methods.
6818 (enum c_omp_clause_split): New.
6819 (c_finish_omp_taskgroup): New prototype.
6820 (c_finish_omp_atomic): Add swapped argument.
6821 (c_finish_omp_for): Add code argument.
6822 (c_omp_split_clauses): New prototype.
6823 (c_split_parallel_clauses): Removed.
6824 (c_omp_declare_simd_clauses_to_numbers,
6825 c_omp_declare_simd_clauses_to_decls): New prototypes.
6826 * c-pragma.c (omp_pragmas): Add new OpenMP 4.0 constructs.
6827 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_CANCEL,
6828 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_DECLARE_REDUCTION,
6829 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_SIMD,
6830 PRAGMA_OMP_TARGET, PRAGMA_OMP_TASKGROUP and PRAGMA_OMP_TEAMS.
6831 Remove PRAGMA_OMP_PARALLEL_FOR and PRAGMA_OMP_PARALLEL_SECTIONS.
6832 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ALIGNED,
6833 PRAGMA_OMP_CLAUSE_DEPEND, PRAGMA_OMP_CLAUSE_DEVICE,
6834 PRAGMA_OMP_CLAUSE_DIST_SCHEDULE, PRAGMA_OMP_CLAUSE_FOR,
6835 PRAGMA_OMP_CLAUSE_FROM, PRAGMA_OMP_CLAUSE_INBRANCH,
6836 PRAGMA_OMP_CLAUSE_LINEAR, PRAGMA_OMP_CLAUSE_MAP,
6837 PRAGMA_OMP_CLAUSE_NOTINBRANCH, PRAGMA_OMP_CLAUSE_NUM_TEAMS,
6838 PRAGMA_OMP_CLAUSE_PARALLEL, PRAGMA_OMP_CLAUSE_PROC_BIND,
6839 PRAGMA_OMP_CLAUSE_SAFELEN, PRAGMA_OMP_CLAUSE_SECTIONS,
6840 PRAGMA_OMP_CLAUSE_SIMDLEN, PRAGMA_OMP_CLAUSE_TASKGROUP,
6841 PRAGMA_OMP_CLAUSE_THREAD_LIMIT, PRAGMA_OMP_CLAUSE_TO and
6842 PRAGMA_OMP_CLAUSE_UNIFORM.
6844 2013-10-09 Marc Glisse <marc.glisse@inria.fr>
6846 PR tree-optimization/20318
6847 * c-common.c (handle_returns_nonnull_attribute): New function.
6848 (c_common_attribute_table): Add returns_nonnull.
6850 2013-10-03 Marc Glisse <marc.glisse@inria.fr>
6853 * c.opt (fcheck-new): Move to common.opt.
6855 2013-09-25 Marek Polacek <polacek@redhat.com>
6856 Jakub Jelinek <jakub@redhat.com>
6859 * c-ubsan.c (ubsan_instrument_shift): Don't instrument
6860 an expression if we can prove it is correct.
6861 (ubsan_instrument_division): Likewise. Remove unnecessary
6864 2013-09-18 Marek Polacek <polacek@redhat.com>
6867 * c-common.c (handle_no_sanitize_undefined_attribute): New function.
6869 (struct attribute_spec c_common_att): Add no_sanitize_undefined.
6871 2013-09-14 Iain Sandoe <iain@codesourcery.com>
6874 * c.opt (fgnu-runtime, fnext-runtime, fobjc-abi-version,
6875 fobjc-gc, freplace-objc-classes): Accept for LTO.
6877 2013-09-13 Jacek Caban <jacek@codeweavers.com>
6879 * c-target.def: New hook
6881 2013-09-09 Paolo Carlini <paolo.carlini@oracle.com>
6884 * c.opt (Wdelete-incomplete): Add.
6886 2013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
6888 * c-common.c (same_scalar_type_ignoring_signedness): Delete.
6889 (vector_types_compatible_elements_p): New function.
6890 * c-common.h: (same_scalar_type_ignoring_signedness): Delete
6892 (vector_types_compatible_elements_p): Declare.
6894 2013-09-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
6896 * c-pretty-print.h (c_pretty_printer::simple_type_specifier): Now
6897 a virtual member function.
6898 (pp_simple_type_specifier): Remove.
6899 (pp_c_type_specifier): Likewise.
6900 * c-pretty-print.c (c_pretty_printer::simple_type_specifier):
6901 Rename from pp_c_type_specifier. Adjust.
6902 (c_pretty_printer::c_pretty_printer): Do not assign to
6903 simple_type_specifier.
6905 2013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
6907 * c-pretty-print.h (c_pretty_printer::type_id): Now a virtual
6909 (c_pretty_printer::storage_class_specifier): Likewise.
6910 (c_pretty_printer::initializer): Likewise.
6911 (pp_declaration): Remove.
6912 (pp_declaration_specifiers): Likewise.
6913 (pp_abstract_declarator): Likewise.
6914 (pp_declarator): Likewise.
6915 (pp_type_id): Likewise.
6916 (pp_statement): Likewise.
6917 (pp_constant): Likewise.
6918 (pp_id_expression): Likewise.
6919 (pp_primary_expression): Likewise.
6920 (pp_unary_expression): Likewise.
6921 (pp_multiplicative_expression): Likewise.
6922 (pp_conditional_expression): Likewise.
6923 (pp_assignment_expression): Likewise.
6924 (pp_expression): Likewise.
6925 (pp_c_type_id): Likewise.
6926 (pp_c_storage_class_specifier): Likewise.
6927 * c-pretty-print.c (pp_c_type_cast): Tidy.
6928 (pp_c_pointer): Likewise.
6929 (pp_c_type_specifier): Likewise.
6930 (pp_c_parameter_type_list): Likewise.
6931 (pp_c_function_definition): Likewise.
6932 (pp_c_init_declarator): Likewise.
6933 (pp_c_initializer_list): Likewise.
6934 (pp_c_constructor_elts): Likewise.
6935 (c_pretty_printer::direct_abstract_declarator): Likewise.
6936 (c_pretty_printer::declaration_specifiers): Likewise.
6937 (c_pretty_printer::primary_expression): Likewise.
6938 (c_pretty_printer::postfix_expression): Likewise.
6939 (c_pretty_printer::type_id): Rename from pp_c_type_id.
6940 (c_pretty_printer::storage_class_specifier): Rename from
6941 pp_c_storage_class_specifier.
6942 (c_pretty_printer::initializer): Rename from pp_c_initializer.
6943 (c_pretty_printer::c_pretty_printer): Do not assign to type_id,
6944 storage_class_specifier, initializer, offset_list, flags.
6946 2013-08-30 Marek Polacek <polacek@redhat.com>
6948 * c-ubsan.c: New file.
6949 * c-ubsan.h: New file.
6951 2013-08-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
6953 * c-pretty-print.h (c_pretty_printer::declaration): Now a virtual
6955 (c_pretty_printer::declaration_specifiers): Likewise.
6956 (c_pretty_printer::declarator): Likewise.
6957 (c_pretty_printer::abstract_declarator): Likewise.
6958 (c_pretty_printer::direct_abstract_declarator): Likewise.
6959 (c_pretty_printer::direct_declarator): Likewise.
6960 (c_pretty_printer::function_specifier): Likewise.
6961 (pp_declaration): Adjust.
6962 (pp_declaration_specifiers): Likewise.
6963 (pp_abstract_declarator): Likewise.
6964 (pp_direct_declarator): Likewise.
6965 (pp_function_specifier): Likewise.
6966 (pp_direct_abstract_declarator): Remove as unused.
6967 (pp_c_declaration): Remove.
6968 (pp_c_declaration_specifiers): Likewise.
6969 (pp_c_declarator): Likewise.
6970 (pp_c_direct_declarator): Likewise.
6971 (pp_c_function_specifier): Likewise.
6972 (pp_c_direct_abstract_declarator): Likewise.
6973 * c-pretty-print.c (c_pretty_printer::abstract_declarator): Rename
6974 from pp_c_abstract_declarator. Adjust.
6975 (c_pretty_printer::direct_abstract_declarator): Rename from
6976 pp_c_direct_abstract_declarator. Adjust.
6977 (c_pretty_printer::function_specifier): Rename from
6978 pp_c_function_specifier. Adjust.
6979 (c_pretty_printer::declaration_specifiers): Rename from
6980 pp_c_declaration_specifiers. Adjust.
6981 (c_pretty_printer::direct_declarator): Rename from
6982 pp_c_direct_declarator. Adjust.
6983 (c_pretty_printer::declarator): Rename from pp_c_declarator. Adjust.
6984 (c_pretty_printer::declaration): Rename from pp_c_declaration. Adjust.
6985 (c_pretty_printer::c_pretty_printer): Do not assign to
6986 declaration, declaration_specifiers, declarator,
6987 direct_declarator, direct_abstract_declarator, function_specifier.
6989 2013-08-26 Gabriel Dos Reis <gdre@integrable-solutions.net>
6991 * c-pretty-print.h (c_pretty_printer::unary_expression): Now a
6992 virtual member function.
6993 (c_pretty_printer::multiplicative_expression): Likewise.
6994 (c_pretty_printer::conditional_expression): Likewise.
6995 (c_pretty_printer::assignment_expression): Likewise.
6996 (c_pretty_printer::expression): Likewise.
6997 (pp_unary_expression): Adjust.
6998 (pp_multiplicative_expression): Likewise.
6999 (pp_assignment_expression): Likewise.
7000 (pp_conditional_expression): Likewise.
7001 (pp_expression): Likewise.
7002 * c-pretty-print.c (c_pretty_printer::unary_expression): Rename
7003 from pp_c_unary_expression. Adjust.
7004 (c_pretty_printer::multiplicative_expression): Rename from
7005 pp_c_multiplicative_expression. Adjust.
7006 (c_pretty_printer::conditional_expression): Rename from
7007 pp_c_conditional_expression. Adjust.
7008 (c_pretty_printer::assignment_expression): Rename from
7009 pp_c_assignment_expression. Adjust.
7010 (c_pretty_printer::expression): Rename from pp_c_expression. Adjust.
7011 (c_pretty_printer::c_pretty_printer): Do not assign to
7012 unary_expression, multiplicative_expression,
7013 conditional_expression, expression.
7015 2013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
7017 * c-pretty-print.h (c_pretty_printer::postfix_expression): Now a
7018 virtual member function.
7019 (pp_postfix_expression): Adjust.
7020 (pp_c_postfix_expression): Remove.
7021 * c-pretty-print.c (c_pretty_printer::postfix_expression): Rename
7022 from pp_c_postfix_expression. Adjust.
7023 (c_pretty_printer::c_pretty_printer): Do not assign to
7026 2013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
7028 * c-pretty-print.h (c_pretty_printer::primary_expression): Now a
7029 virtua member function.
7030 (pp_primary_expression): Adjust.
7031 (pp_c_primary_expression): Remove.
7032 * c-pretty-print.c (c_pretty_printer::primary_expression): Rename
7033 from pp_c_primary_expression. Adjust.
7034 (pp_c_initializer_list): Use pp_primary_expression.
7035 (c_pretty_printer::c_pretty_printer): Do not assign to
7038 2013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
7040 * c-pretty-print.h (c_pretty_printer::translate_string): Declare.
7041 * c-pretty-print.c (M_): Remove.
7042 (c_pretty_printer::translate_string): Define.
7043 (pp_c_type_specifier): Use it.
7044 (pp_c_primary_expression): Likewise.
7045 (pp_c_expression): Likewise.
7047 2013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
7049 * c-pretty-print.h (c_pretty_printer::id_expression): Now a
7051 (pp_c_id_expression): Remove.
7052 (pp_id_expression): Adjust.
7053 * c-pretty-print.c (c_pretty_printer::id_expression): Rename from
7054 pp_c_id_expression. Adjust.
7055 (pp_c_postfix_expression): Use pp_id_expression.
7056 (c_pretty_printer::c_pretty_printer): Do not assign to id_expression.
7058 2013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
7060 * c-pretty-print.h (c_pretty_printer::constant): Now a virtual
7062 (pp_constant): Adjust.
7063 (pp_c_constant): Remove.
7064 * c-pretty-print.c (c_pretty_printer::constant): Rename from
7065 pp_c_constant. Adjust.
7067 (pp_c_primary_expression): Call pp_constant in lieu of pp_c_constant.
7068 (c_pretty_printer::c_pretty_printer): Remove assignment to constant.
7070 2013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
7072 * c-pretty-print.h (pp_c_pretty_printer_init): Remove.
7073 (c_pretty_printer::c_pretty_printer): Declare.
7074 * c-pretty-print.c (pretty_printer::c_pretty_printer): Rename from
7075 c_pretty_printer_init. Adjust.
7076 (print_c_tree): Do not call c_pretty_printer_init.
7077 * c-ada-spec.c (dump_ads): Remove call to pp_construct.
7079 2013-08-09 Arnaud Charlet <charlet@adacore.com>
7081 * c-ada-spec.c (print_ada_declaration): Prevent accessing null asm name
7083 2013-08-05 Paolo Carlini <paolo.carlini@oracle.com>
7086 * c-common.c (pointer_int_sum): Add bool parameter.
7087 * c-common.h (pointer_int_sum): Adjust declaration.
7089 2013-08-05 Gabriel Dos Reis <gdr@integrable-solutions.net>
7091 * c-pretty-print.c (print_c_tree): Simplify. Use non-static local
7092 c_pretty_printer variable.
7094 2013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
7096 * c-pretty-print.h (c_pretty_printer): Derive from pretty_printer.
7098 (pp_c_base): Likewise. Adjust users.
7099 * c-pretty-print.c (pp_c_maybe_whitespace): Adjust.
7100 (pp_c_whitespace): Do not call pp_base.
7101 (pp_c_left_paren): Likewise.
7102 (pp_c_right_paren): Likewise.
7103 (pp_c_left_brace): Likewise.
7104 (pp_c_right_brace): Likewise.
7105 (pp_c_left_bracket): Likewise.
7106 (pp_c_right_bracket): Likewise.
7107 (pp_c_dot): Likewise.
7108 (pp_c_ampersand): Likewise.
7109 (pp_c_star): Likewise.
7110 (pp_c_arrow): Likewise.
7111 (pp_c_semicolon): Likewise.
7112 (pp_c_complement): Likewise.
7113 (pp_c_exclamation): Likewise.
7114 (pp_c_direct_declarator): Likewise.
7115 (pp_c_ws_string): Likewise.
7116 (pp_c_identifier): Likewise.
7117 (pp_c_statement): Likewise.
7118 (print_c_tree): Likewise.
7120 2013-08-04 Ed Smith-Rowland <3dw4rd@verizon.net>
7123 * c-common.c (c_parse_error): Catch user-defined literal tokens and
7124 provide useful error strings.
7126 2013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
7128 * c-ada-spec.c (pp_ada_tree_identifier): Use specialized pretty
7129 printer functions instead of pp_string or operators and punctuators.
7130 (dump_generic_ada_node): Likewise.
7131 * c-pretty-print.c (pp_c_type_specifier): Likewise.
7132 (pp_c_relational_expression): Likewise.
7133 (pp_c_logical_or_expression): Likewise.
7135 2013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
7137 * c-ada-spec.c (print_ada_macros): Use specialized pretty printer
7138 functions instead of pp_character.
7139 (pp_ada_tree_identifier): Likewise.
7140 (dump_ada_double_name): Likewise.
7141 (dump_ada_function_declaration): Likewise.
7142 (dump_ada_array_domains): Likewise.
7143 (dump_template_types): Likewise.
7144 (dump_generic_ada_node): Likewise.
7145 (print_ada_declaration): Likewise.
7146 (print_ada_struct_decl): Likewise.
7147 * c-pretty-print.c (pp_c_integer_constant): Likewise.
7149 2013-07-23 Tom Tromey <tromey@redhat.com>
7151 * c-common.h (enum rid) <RID_GENERIC>: New constant.
7152 * c-common.c (c_common_reswords): Add _Generic.
7154 2013-07-21 OndÅ
\99ej BÃlka <neleai@seznam.cz>
7156 * c-common.c: Fix typos.
7157 * c-common.h: Likewise.
7159 2013-07-13 Lubos Lunak <l.lunak@suse.cz>
7162 * c-common.c (c_common_attribute_table): Add warn_unused.
7163 (handle_warn_unused_attribute): New.
7165 2013-07-10 Jakub Jelinek <jakub@redhat.com>
7167 * c-ppoutput.c (scan_translation_unit): Call account_for_newlines
7168 for all CPP_TOKEN_FLD_STR tokens, not just CPP_COMMENT.
7170 2013-07-10 Paolo Carlini <paolo.carlini@oracle.com>
7173 * c.opt: Add Wconditionally-supported.
7175 2013-07-08 Graham Stott <graham.stott@btinternet.com>
7177 * array-notation-common.c (length_mismatch_in_expr_p): Delete
7178 unused variables l_length and l_node.
7180 2013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
7183 * c-common.c (complete_array_type): Delay folding first index
7184 like other indices. When folding, check for index overflow.
7186 2013-06-27 Marc Glisse <marc.glisse@inria.fr>
7189 * c-common.h (c_build_vec_perm_expr): New complain argument.
7190 * c-common.c (c_build_vec_perm_expr): Likewise.
7191 Use save_expr also in C++.
7193 2013-06-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
7195 * c-common.c (c_common_nodes_and_builtins): Use cxx11 in lieu of cxx0x.
7196 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
7197 * c-opts.c (c_common_post_options): Likewise.
7199 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
7201 * array-notation-common.c (length_mismatch_in_expr): Changed the
7202 parameter type's from a dynamic array to a vec_tree. Also removed
7203 the size parameters.
7204 * c-common.h (length_mismatch_in_expr_p): Fixed prototype's as per
7207 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
7209 * c-common.h (struct cilkplus_an_parts): New structure.
7210 (struct cilkplus_an_loop_parts): Likewise.
7211 (cilkplus_extract_an_triplets): New prototype.
7212 (fix_sec_implicit_args): Likewise.
7213 * array-notation-common.c (cilkplus_extract_an_triplets): New function.
7214 (fix_sec_implicit_args): Likewise.
7216 2013-06-20 Balaji V. Iyer <balaji.v.iyer@intel.com>
7218 * array-notation-common.c (find_inv_trees): Removed an unwanted
7220 * c-common.h (struct inv_list::additional_tcodes): Changed type from
7221 enum rid to enum tree_code.
7223 2013-06-11 Jan Hubicka <jh@suse.cz>
7225 * c-common.c (handle_alias_ifunc_attribute): Do not set
7226 DECL_EXTERNAL for weakref variables.
7227 * c-pragma.c (handle_pragma_weak): Make sure aliases
7228 are not declared as external.
7230 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
7232 * array-notation-common.c (length_mismatch_in_expr_p): Moved this
7233 function from c/c-array-notation.c.
7234 (is_cilkplus_reduce_builtin): Likewise.
7235 (find_rank): Likewise.
7236 (extract_array_notation_exprs): Likewise.
7237 (replace_array_notations): Likewise.
7238 (find_inv_trees): Likewise.
7239 (replace_inv_trees): Likewise.
7240 (contains_array_notation_expr): Likewise.
7241 (find_correct_array_notation_type): Likewise.
7242 * c-common.h (struct inv_list): Moved this struct from the file
7243 c/c-array-notation.c and added a new field called additional tcodes.
7244 (length_mismatch_in_expr_p): New prototype.
7245 (is_cilkplus_reduce_builtin): Likewise.
7246 (find_rank): Likewise.
7247 (extract_array_notation_exprs): Likewise.
7248 (replace_array_notation): Likewise.
7249 (find_inv_trees): Likewise.
7250 (replace_inv_trees): Likewise.
7251 (find_correct_array_notation_type): Likewise.
7253 2013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
7255 * c-common.c (c_define_builtins): When cilkplus is enabled, the
7256 function array_notation_init_builtins is called.
7257 (c_common_init_ts): Added ARRAY_NOTATION_REF as typed.
7258 * c-common.def (ARRAY_NOTATION_REF): New tree.
7259 * c-common.h (build_array_notation_expr): New function declaration.
7260 (build_array_notation_ref): Likewise.
7261 (extract_sec_implicit_index_arg): New extern declaration.
7262 (is_sec_implicit_index_fn): Likewise.
7263 (ARRAY_NOTATION_CHECK): New define.
7264 (ARRAY_NOTATION_ARRAY): Likewise.
7265 (ARRAY_NOTATION_START): Likewise.
7266 (ARRAY_NOTATION_LENGTH): Likewise.
7267 (ARRAY_NOTATION_STRIDE): Likewise.
7268 * c-pretty-print.c (pp_c_postifix_expression): Added a new case for
7270 (pp_c_expression): Likewise.
7271 * c.opt (flag_enable_cilkplus): New flag.
7272 * array-notation-common.c: New file.
7274 2013-05-14 Jakub Jelinek <jakub@redhat.com>
7277 * c-common.c (verify_tree): Don't recurse into SIZEOF_EXPR.
7279 2013-05-10 Marc Glisse <marc.glisse@inria.fr>
7281 * c-common.c (vector_types_convertible_p): No TYPE_PRECISION for
7284 2013-05-07 Han Shen <shenhan@google.com>
7286 * c-cppbuiltin.c (c_cpp_builtins): Added "__SSP_STRONG__=3".
7288 2013-04-29 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
7290 * c-common.c (check_user_alignment): Emit error for negative values.
7292 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
7294 * c-opts.c (set_std_cxx11): Use CLK_CXX1Y and CLK_GNUCXX1Y.
7296 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
7298 * c-cppbuiltin.c (c_cpp_builtins): Do not define
7299 __GXX_EXPERIMENTAL_CXX1Y__.
7301 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
7302 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
7304 * c.opt ([Wpointer-arith]): Enabled by -Wpedantic, as documented.
7305 * c-common.c (pointer_int_sum): Change -Wpointer-arith pedwarns
7306 to simply use OPT_Wpointer_arith.
7307 (c_sizeof_or_alignof_type): Likewise.
7309 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
7311 * c-cppbuiltin.c (c_cpp_builtins): Define __GXX_EXPERIMENTAL_CXX1Y__.
7313 2013-04-12 Jakub Jelinek <jakub@redhat.com>
7315 * c-format.c (gcc_diag_char_table, gcc_tdiag_char_table,
7316 gcc_cdiag_char_table, gcc_cxxdiag_char_table): Add %r and %R format
7319 2013-04-07 Steven Bosscher <steven@gcc.gnu.org>
7321 * c-pragma.c (add_to_renaming_pragma_list): Fix leading comment.
7323 2013-04-03 Paolo Carlini <paolo.carlini@oracle.com>
7325 * c-common.c (pointer_int_sum): Remove dead code.
7327 2013-03-09 Richard Sandiford <rdsandiford@googlemail.com>
7330 * c-common.c (handle_optimize_attribute): Don't call
7331 save_optabs_if_changed.
7333 2013-03-05 Jakub Jelinek <jakub@redhat.com>
7336 * c-pch.c (pch_init): Free target_validity at the end.
7338 2013-03-04 Jakub Jelinek <jakub@redhat.com>
7340 * c-pretty-print.c (pp_c_pretty_printer_init): Clear pp->flags.
7342 2013-02-28 Konstantin Serebryany <konstantin.s.serebryany@gmail.com>
7343 Jakub Jelinek <jakub@redhat.com>
7346 * c-common.c (handle_no_sanitize_address_attribute): New function.
7347 (c_common_attribute_table): Add no_sanitize_address attribute.
7348 (handle_no_address_safety_analysis_attribute): Add
7349 no_sanitize_address attribute, not no_address_safety_analysis
7352 2013-02-18 Aldy Hernandez <aldyh@redhat.com>
7355 * c-common.c (handle_optimize_attribute): Call
7356 save_optabs_if_changed.
7358 2013-02-18 Jakub Jelinek <jakub@redhat.com>
7359 Steven Bosscher <steven@gcc.gnu.org>
7362 * c-opts.c (c_common_post_options): If debug info is enabled
7363 and non-dwarf*, refuse to load PCH files and when writing PCH
7366 2013-02-05 Jakub Jelinek <jakub@redhat.com>
7369 * c-common.c (handle_error_attribute): Fix condition.
7371 2013-01-30 Jakub Jelinek <jakub@redhat.com>
7374 * c-common.c (handle_target_attribute): Revert 2012-12-26 change.
7376 2013-01-18 Jason Merrill <jason@redhat.com>
7379 * c.opt (-fextern-tls-init): New.
7380 * c-opts.c (c_common_post_options): Handle it.
7382 2013-01-09 Jakub Jelinek <jakub@redhat.com>
7385 * c-common.c (c_fully_fold_internal): Warn for LSHIFT_EXPR and
7386 RSHIFT_EXPR, if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST
7387 and is either negative or bigger or equal to type precision
7388 of the first operand.
7390 2012-12-03 Marek Polacek <polacek@redhat.com>
7393 * c-common.c (check_user_alignment): Swap order of tests,
7394 check TREE_CODE first.
7396 2012-11-29 Ed Smith-Rowland <3dw4rd@verizon.net>
7399 * c-common.h (overflow_type): New enum.
7400 (build_userdef_literal): Add overflow_type argument.
7401 (tree_userdef_literal): Add overflow_type.
7402 (USERDEF_LITERAL_OVERFLOW): New access macro.
7403 * c-common.c (build_userdef_literal): Add overflow_type
7405 * c-lex.c (c_lex_with_flags): Add overflow_type to
7406 build_userdef_literal calls.
7407 (interpret_integer, interpret_float): Add overflow_type argument.
7409 2012-11-28 Richard Biener <rguenther@suse.de>
7412 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
7413 here and use a type with proper overflow behavior for types that would
7414 need to be promoted for the arithmetic.
7416 2012-11-23 Jakub Jelinek <jakub@redhat.com>
7419 * c-common.c (handle_no_address_safety_analysis_attribute): New
7421 (c_common_attribute_table): Add no_address_safety_analysis.
7423 2012-11-16 Simon Baldwin <simonb@google.com>
7425 * c.opt: Add f[no-]canonical-system-headers.
7426 * c-opts.c (c_common_handle_option): Handle
7427 OPT_fcanonical_system_headers.
7429 2012-11-09 Ed Smith-Rowland <3dw4rd@verizon.net>
7432 * c-opts.c (c_common_handle_option): Set new flags.
7433 * c.opt: Describe new flags.
7435 2012-11-09 Jason Merrill <jason@redhat.com>
7437 * c.opt (Wabi-tag): New.
7439 2012-11-09 Andi Kleen <ak@linux.intel.com>
7442 * c-common.c (get_atomic_generic_size): Mask with
7445 2012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
7448 * c.opt (Wformat): Make it Alias Wformat=1.
7449 (Wformat-contains-nul,Wformat-extra-args,Wformat-nonliteral,
7450 Wformat-security,Wformat-y2k,Wformat-zero-length): Use
7452 (Wformat=): RejectNegative. Use LangEnabledBy.
7453 (Wnonnull): Use LangEnabledBy.
7454 * c-opts.c (c_common_handle_option): Do not handle Wformat here.
7455 * c-format.c (set_Wformat): Delete.
7456 (decode_format_attr): Replace OPT_Wformat with OPT_Wformat_.
7457 (maybe_read_dollar_number): Likewise.
7458 (avoid_dollar_number): Likewise.
7459 (finish_dollar_format_checking): Likewise.
7460 (check_format_info): Likewise.
7461 (check_format_info_main): Likewise.
7462 (check_format_types): Likewise.
7463 (format_type_warning): Likewise.
7464 * c-common.c (int): Likewise.
7465 (check_function_sentinel): Likewise.
7466 * c-common.h (warn_format,set_Wformat): Do not declare here.
7468 2012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
7471 * c.opt(Warray-bounds,Wdelete-non-virtual-dtor,Wenum-compare,
7472 Wmain,Woverlength-strings, Wunknown-pragmas,Wunused-macros):
7474 (Wswitch,Wswitch-default,Wswitch-enum): Likewise. Move here from
7476 (Wvariadic-macros): Init(1).
7477 * c-opts.c (c_common_handle_option): Do not handle them
7479 (c_common_post_options): Likewise.
7480 (sanitize_cpp_opts): warn_unused_macros is now
7481 cpp_warn_unused_macros.
7482 (push_command_line_include): Likewise.
7483 * c-common.c (warn_unknown_pragmas): Do not define.
7484 * c-common.h (warn_unknown_pragmas): Do not declare.
7486 2012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
7489 * c-common.c (conversion_warning): Handle conditional expressions.
7491 2012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
7494 * c.opt (Wreturn_local_addr): Define new option.
7496 2012-10-25 Jason Merrill <jason@redhat.com>
7498 * c.opt (Wvirtual-move-assign): New.
7500 * c.opt (Winherited-variadic-ctor): New.
7502 2012-10-25 Marc Glisse <marc.glisse@inria.fr>
7505 * c-common.c (scalar_to_vector): Handle VEC_COND_EXPR.
7507 2012-10-23 Joseph Myers <joseph@codesourcery.com>
7509 * c-common.h (pch_cpp_save_state): Declare.
7510 * c-target.def (c_preinclude): New hook.
7511 * c-opts.c (done_preinclude): New.
7512 (push_command_line_include): Handle default preincluded header.
7513 (cb_file_change): Call pch_cpp_save_state when calling
7514 push_command_line_include.
7515 * c-pch.c (pch_ready_to_save_cpp_state, pch_cpp_state_saved)
7516 (pch_cpp_save_state): New.
7517 (pch_init): Call pch_cpp_save_state conditionally, instead of
7518 calling cpp_save_state.
7520 2012-10-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
7524 * c.opt (Waddress,Wchar-subscripts,Wsign-conversion,Wimplicit,
7525 Wimplicit-function-declaration,Wimplicit-int,Wsizeof-pointer-memaccess,
7526 Wnarrowing,Wparentheses,Wpointer-sign,Wreturn-type,Wsequence-point,
7527 Wsign-compare,Wuninitialized,Wmaybe-uninitialized,Wunused,
7528 Wvolatile-register-var): Add LangEnabledBy or EnabledBy.
7529 * c-opts.c (c_common_handle_option): Remove explicit handling from
7531 (c_common_post_options): Likewise.
7533 2012-10-18 Eric Botcazou <ebotcazou@adacore.com>
7535 * c-ada-spec.c (LOCATION_COL): Delete.
7536 (compare_location): New function.
7537 (compare_node): Use it.
7538 (compare_comment): Likewise.
7540 2012-10-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
7544 * c.opt (Wstrict-aliasing=,Wstrict-overflow=): Use LangEnabledBy.
7545 * c-opts.c (c_common_handle_option): Do not set them here. Add
7547 (c_common_post_options): Likewise.
7549 2012-10-16 Eric Botcazou <ebotcazou@adacore.com>
7551 * c-ada-spec.c (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Define.
7552 (dump_generic_ada_node) <INTEGER_CST>: Deal with sizetype specially.
7553 Remove POINTER_TYPE handling, add large unsigned handling and use
7554 ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX for big numbers.
7556 2012-10-12 Jakub Jelinek <jakub@redhat.com>
7559 * c-common.h (sizeof_pointer_memaccess_warning): Adjust prototype.
7560 * c-common.c (sizeof_pointer_memaccess_warning): Take array of 3
7561 locs and array of 3 trees instead of just single loc and single
7562 sizeof_arg tree. Handle __builtin___*_chk builtins too, and
7563 also stpncpy, bcopy, bcmp, bzero, snprintf and vsnprintf builtins.
7564 For *cmp* builtins that take two sources strings report warnings
7565 about first and second source, not about destination and source.
7567 2012-10-12 Marc Glisse <marc.glisse@inria.fr>
7570 * c-common.h (enum ref_operator) [RO_ARROW_STAR]: New.
7572 2012-10-11 Eric Botcazou <ebotcazou@adacore.com>
7574 * c-ada-spec.c (dump_ada_template): Bail out for template declarations
7575 declaring something coming from another file.
7577 2012-10-10 Arnaud Charlet <charlet@adacore.com>
7580 * c-ada-spec.c (print_ada_struct_decl): Increase buf size.
7582 2012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
7585 * c-common.c (warn_about_parentheses): Add location_t parameter;
7586 use EXPR_LOC_OR_LOC.
7587 * c-common.h: Update declaration.
7589 2012-10-09 Marc Glisse <marc.glisse@inria.fr>
7592 * c-common.c (scalar_to_vector): Moved from c-typeck.c. Support
7593 more operations. Make error messages optional.
7594 * c-common.h (enum stv_conv): Moved from c-typeck.c.
7595 (scalar_to_vector): Declare.
7597 2012-10-08 Jason Merrill <jason@redhat.com>
7599 * c-common.c (c_common_reswords): Add thread_local.
7601 2012-10-08 Dodji Seketeli <dodji@redhat.com>
7603 PR c++/53528 C++11 attribute support
7604 * c-common.h (bitfield_p, cxx_fundamental_alignment_p): Declare
7606 * c-common.c (check_cxx_fundamental_alignment_constraints): New
7608 (handle_aligned_attribute): In choose strictest alignment
7609 among many. Use new check_cxx_fundamental_alignment_constraints.
7610 (handle_transparent_union_attribute): In c++11 attribute syntax,
7611 don't look through typedefs.
7613 2012-10-04 Arnaud Charlet <charlet@adacore.com>
7615 * c-ada-spec.c (print_ada_declaration): Remove handling of TDF_RAW.
7616 * c.opt (-fdump-ada-spec, -fdump-ada-spec-slim): Move switch definition
7619 2012-09-25 Dehao Chen <dehao@google.com>
7622 * c-pch.c (c_common_read_pch): Rebuild the location_adhoc_data
7623 map when read in the pch.
7625 2012-09-18 Arnaud Charlet <charlet@adacore.com>
7627 * c-ada-spec.c: Style fixes.
7629 2012-09-18 Thomas Quinot <quinot@adacore.com>
7631 * c.opt (-fada-spec-parent): Define new command line switch.
7632 * c-ada-spec.c (get_ada_package): When -fada-spec-parent
7633 is specified, generate binding spec as a child of the specified unit.
7635 2012-09-13 Paolo Carlini <paolo.carlini@oracle.com>
7636 Manuel López-Ibáñez <manu@gcc.gnu.org>
7639 * c.opt ([Winit-self]): Enabled by -Wall in C++.
7641 2012-08-23 Arnaud Charlet <charlet@adacore.com>
7643 * c-ada-spec.c (dump_generic_ada_node): Fix handling of name_only
7644 for pointers, and add missing Convention C pragma.
7645 (print_ada_struct_decl): Add missing aliased keyword.
7646 (dump_ads): Add pragma Ada_2005 and Style_Checks (Off).
7648 2012-08-17 Jakub Jelinek <jakub@redhat.com>
7650 * c-common.c (sizeof_pointer_memaccess_warning): New function.
7651 * c.opt (-Wsizeof-pointer-memaccess): Add new option.
7652 * c-opts.c (c_common_handle_option): Enable it for -Wall.
7653 * c-common.h (sizeof_pointer_memaccess_warning): Add prototype.
7654 * c-common.def (SIZEOF_EXPR): Moved here from cp-tree.def.
7656 2012-08-10 Richard Guenther <rguenther@suse.de>
7658 * c-pretty-print.c (pp_c_expression): Handle anonymous SSA names.
7660 2012-08-07 Steven Bosscher <steven@gcc.gnu.org>
7662 * c-pretty-print.c (pp_c_function_definition): Use pp_newline_and_flush
7663 instead of separate pp_newline and pp_flush.
7664 (print_c_tree): Likewise.
7666 2012-07-26 Richard Henderson <rth@redhat.com>
7668 * c-common.c (handle_hot_attribute): Allow labels.
7669 (handle_cold_attribute): Likewise.
7671 2012-07-20 Jakub Jelinek <jakub@redhat.com>
7674 * c-common.c (check_function_nonnull): Handle multiple nonnull
7675 attributes properly.
7677 2012-07-16 Steven Bosscher <steven@gcc.gnu.org>
7679 * c-gimplify.c: Include dumpfile.h instead of tree-dump.h.
7680 * c-ada-spec.c: Likewise.
7681 * c-dump.c (dump_stmt): Move to cp/dump.c, the only user.
7683 2012-07-14 Steven Bosscher <steven@gcc.gnu.org>
7685 * c-pch.c (CHECK_NO_ASM_OUT_DURING_PCH): Do not define.
7686 Remove code conditional on it.
7688 2012-07-11 Steven Bosscher <steven@gcc.gnu.org>
7690 * c-gimplify.c: Do not include basic-block.h.
7691 * c-common.c: Do not include linfuncs.h.
7693 2012-07-08 Steven Bosscher <steven@gcc.gnu.org>
7695 * c-common.h: Include tree.h.
7697 2012-07-02 Jason Merrill <jason@redhat.com>
7700 * c-common.c (get_priority): Call default_conversion.
7702 2012-07-01 Uros Bizjak <ubizjak@gmail.com>
7704 * c-pch.c (c_common_write_pch): Remove unused variables.
7706 2012-06-29 Steven Bosscher <steven@gcc.gnu.org>
7708 * cppspec.c: Moved from gcc/ to here.
7710 2012-06-27 Kai Tietz <ktietz@redhat.com>
7712 PR preprocessor/37215
7713 * c-ppoutput.c (preprocess_file): Check for nonempty buffer.
7715 2012-06-21 Steven Bosscher <steven@gcc.gnu.org>
7717 * c-common.h (c_common_print_pch_checksum): Remove.
7718 * c-pch.c: Do not include output.h.
7719 (CHECK_NO_ASM_OUT_DURING_PCH): Define and add FIXME.
7720 (asm_out_file): Define iff CHECK_NO_ASM_OUT_DURING_PCH isdefined.
7721 (asm_file_startpos): Define iff CHECK_NO_ASM_OUT_DURING_PCH is defined.
7722 (struct c_pch_header): Remove.
7723 (get_ident): Update gpch version.
7724 (pch_init): Do not print executable_checksum to asm_out_file.
7725 Do not fail if there is no asm_out_file to read back from. Set
7726 asm_file_startpos only if CHECK_NO_ASM_OUT_DURING_PCH is defined.
7727 (c_common_write_pch): Verify that nothing was written to asm_out_file
7728 since pch_init was called. Do not write a c_pch_header, and do not
7729 copy from asm_out_file to the PCH.
7730 (c_common_read_pch): Do not read a c_pch_header, and do not restore
7731 the content of asm_out_file from the PCH.
7732 (c_common_print_pch_checksum): Remove.
7733 * c-opts.c (c_common_init): Print out executable_checksum directly.
7735 2012-06-19 Steven Bosscher <steven@gcc.gnu.org>
7737 * c-target.def (objc_declare_unresolved_class_reference,
7738 objc_declare_class_definition): Add new hooks.
7740 2012-06-19 Steven Bosscher <steven@gcc.gnu.org>
7742 * c-lex.c: Do not include output.h.
7743 (cb_ident): Try to put out .ident with targetm.asm_out.output_ident.
7744 Remove uses of ASM_OUTPUT_IDENT.
7746 2012-06-15 Marc Glisse <marc.glisse@inria.fr>
7749 * c-common.h (c_build_vec_perm_expr): Move decl here.
7750 * c-common.c (c_build_vec_perm_expr): Move definition
7753 2012-06-06 Steven Bosscher <steven@gcc.gnu.org>
7755 * c.opt (fconserve-space): Turn into a no-op.
7757 2012-06-04 Sterling Augustine <saugustine@google.com>
7759 * c-pretty-print.h (pp_c_flag_gnu_v3): New enumerator.
7760 * c-pretty-print.c (pp_c_specifier_qualifier_list): Check it at
7761 both the start and end of the function.
7763 2012-06-04 Steven Bosscher <steven@gcc.gnu.org>
7765 * c-common.c: Do not include output.h.
7766 * c-pragma.c: Likewise.
7768 2012-06-04 Steven Bosscher <steven@gcc.gnu.org>
7770 * error.c (dump_decl): Check pp_c_flag_gnu_v3.
7771 (decl_as_dwarf_string, lang_decl_dwarf_name): New functions.
7772 (lang_decl_name): Handle namespace decls.
7774 2012-05-31 Steven Bosscher <steven@gcc.gnu.org>
7776 * c-ada-spec.c: Do not include output.h.
7777 * c-semantics.c: Likewise.
7779 2012-05-29 Joseph Myers <joseph@codesourcery.com>
7781 * c-common.c: Fix typo.
7783 2012-05-29 Michael Matz <matz@suse.de>
7785 * c-common.h (c_expand_decl): Remove prototype.
7787 2012-05-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
7789 * c.opt (Wmissing-braces): Use LangEnabledBy(C ObjC,Wall).
7790 * c-opts.c (c_common_handle_option): Remove code handling
7791 warn_missing_braces.
7793 2012-05-28 Paolo Carlini <paolo.carlini@oracle.com>
7796 * c-opts.c (c_common_handle_option): For C++ -Wall doesn't enable
7799 2012-05-22 Dodji Seketeli <dodji@redhat.com>
7802 * c.opt (Wunused-local-typedefs): Use EnabledBy(Wunused).
7804 2012-05-17 Manuel López-Ibáñez <manu@gcc.gnu.org>
7806 * c.opt (--pedantic-errors,-pedantic-errors): Do not handle here.
7807 * c-opts.c (c_common_handle_option): Do not handle explicitly
7808 Wreturn-type, Wwrite-strings, warn_ecpp, and -pedantic-errors.
7810 2012-05-16 Dodji Seketeli <dodji@redhat.com>
7812 PR preprocessor/7263
7813 * c-lex.c (c_lex_with_flags): Pass a virtual location to the call
7814 to cpp_classify_number. For diagnostics, use the precise location
7815 instead of the global input_location.
7817 2012-05-15 Paolo Carlini <paolo.carlini@oracle.com>
7820 * c-common.c (shorten_compare): Check c_inhibit_evaluation_warnings.
7822 2012-05-14 Bernd Schmidt <bernds@codesourcery.com>
7824 * c-common.c (DEF_ATTR_STRING): Define and undefine as necessary.
7826 2012-05-14 Manuel López-Ibáñez <manu@gcc.gnu.org>
7829 * c.opt (Wc++0X-compat,Wdelete-non-virtual-dtor,Wjump-misses-init,
7830 Wreorder): Use LangEnabledBy.
7831 * c-opts.c (c_common_handle_option): Do not enable them
7832 explicitly. Call lang-specific generated functions.
7833 (c_common_post_options): Do not set them here.
7835 2012-05-13 Manuel López-Ibáñez <manu@gcc.gnu.org>
7837 * c.opt (Wclobbered,Wempty-body,Wignored-qualifiers,
7838 Wmissing-field-initializers,Wmissing-parameter-type,
7839 Wold-style-declaration,Woverride-init): Use EnabledBy.
7840 * c-opts.c (c_common_post_options): Do not set here explicitly.
7842 2012-05-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
7845 * c-opts.c (c_common_handle_option): Use handle_generated_option
7846 to enable sub-options.
7848 2012-05-10 Paolo Carlini <paolo.carlini@oracle.com>
7851 * c-common.c (warnings_for_convert_and_check): Use warning_at.
7853 2012-05-10 Richard Guenther <rguenther@suse.de>
7855 * c-common.c (c_sizeof_or_alignof_type): Remove assert and
7856 adjust commentary about TYPE_IS_SIZETYPE types.
7858 2012-05-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
7861 * c-common.c (warn_logical_operator): Check that argument of
7862 integer_zerop is not NULL.
7864 2012-05-05 Manuel López-Ibáñez <manu@gcc.gnu.org>
7867 * c-common.c (warn_logical_operator): Do not warn if either side
7868 is already true or false.
7870 2012-05-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
7873 * c-common.c (expr_original_type): New.
7874 (shorten_compare): Do not warn for enumeration types.
7876 2012-05-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
7878 * c.opt (fpermissive): Add Var(flag_permissive).
7880 2012-04-30 Marc Glisse <marc.glisse@inria.fr>
7883 * c-common.c (convert_vector_to_pointer_for_subscript): New function.
7884 * c-common.h (convert_vector_to_pointer_for_subscript): Declare it.
7886 2012-04-30 Dodji Seketeli <dodji@redhat.com>
7888 Add -Wvarargs option
7889 * c.opt (Wvarargs): Define new option.
7891 2012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
7893 * c-common.c (check_function_arguments): Replace
7894 Wmissing-format-attribute with Wsuggest-attribute=format.
7896 2012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
7898 * c.opt (Wsuggest-attribute=format): New. Alias of
7899 Wmissing-format-attribute.
7900 * c-format.c (decode_format_type): Replace
7901 Wmissing-format-attribute with Wsuggest-attribute=format.
7902 (check_function_format): Likewise.
7904 2012-04-27 Ollie Wild <aaw@google.com>
7906 * c-common.c: Add CPP_W_LITERAL_SUFFIX mapping.
7907 * c-opts.c (c_common_handle_option): Handle OPT_Wliteral_suffix.
7908 * c.opt: Add Wliteral-suffix.
7910 2012-04-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
7913 * c.opt (Wpedantic): New.
7914 (pedantic): Alias Wpedantic.
7915 * c-opts.c (c_common_handle_option): Replace -pedantic with -Wpedantic.
7916 (c_common_post_options): Likewise.
7917 (sanitize_cpp_opts): Likewise.
7918 * c-lex.c (interpret_float): Likewise.
7919 * c-format.c (check_format_types): Likewise.
7920 * c-common.c (pointer_int_sum): Likewise.
7921 (c_sizeof_or_alignof_type): Likewise.
7922 (c_add_case_label): Likewise.
7923 (c_do_switch_warnings): Likewise.
7924 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
7926 2012-04-15 Jason Merrill <jason@redhat.com>
7929 * c-format.c (CPLUSPLUS_STD_VER): C++11 inherits from C99.
7930 (C_STD_NAME): Distinguish between C++98 and C++11.
7932 2012-04-11 Eric Botcazou <ebotcazou@adacore.com>
7935 * c-common.h (uint16_type_node): Rename into...
7936 (c_uint16_type_node): ...this.
7937 * c-common.c (c_common_nodes_and_builtins): Adjust for above renaming.
7938 * c-cppbuiltin.c (builtin_define_stdint_macros): Likewise.
7940 2012-04-10 Manuel López-Ibáñez <manu@gcc.gnu.org>
7942 * c-common.c (warn_if_unused_value): Move definition to here.
7943 * c-common.h (warn_if_unused_value): Move declaration to here.
7945 2012-03-23 William Bader <williambader@hotmail.com>
7947 * c-lex.c (c_lex_with_flags): Avoid declarations after stmts.
7949 2012-03-20 Jason Merrill <jason@redhat.com>
7951 * c-common.h (enum cxx_dialect): Add cxx1y.
7952 * c-common.c (c_common_nodes_and_builtins): Use >= for cxx_dialect
7954 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
7955 * c-opts.c (c_common_post_options): Likewise.
7956 (set_std_cxx1y): New.
7957 (c_common_handle_option): Call it.
7958 * c.opt (-std=c++1y, -std=gnu++1y): New flags.
7960 2012-03-19 Paolo Carlini <paolo.carlini@oracle.com>
7963 * c.opt ([Wuseless-cast]): Add.
7965 2012-03-16 Richard Guenther <rguenther@suse.de>
7967 * c-pretty-print.c (pp_c_initializer_list): Adjust.
7969 2012-03-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
7972 * c.opt (ftemplate-backtrace-limit) Add.
7974 2012-03-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7976 * c-cppbuiltin.c (c_cpp_builtins): Remove #pragma extern_prefix
7978 * c-pragma.c (handle_pragma_extern_prefix): Remove.
7979 (init_pragma): Don't register extern_prefix.
7981 2012-03-12 Richard Guenther <rguenther@suse.de>
7983 * c-common.c (c_common_get_narrower): Use c_common_type_for_size.
7984 (builtin_type_for_size): Likewise.
7986 2012-02-13 Jakub Jelinek <jakub@redhat.com>
7989 * c-common.c (sync_resolve_params): Don't decide whether to convert
7990 or not based on TYPE_SIZE comparison, convert whenever arg_type
7991 is unsigned INTEGER_TYPE.
7993 2012-02-06 Paolo Carlini <paolo.carlini@oracle.com>
7996 * c.opt ([Wunused-local-typedefs]): Fix description.
7998 2012-01-24 Mike Stump <mikestump@comcast.net>
8000 * c-common.c (c_common_type_for_mode): Match signed/unsigned types
8003 2012-01-18 Richard Guenther <rguenther@suse.de>
8005 * c-opts.c (c_common_post_options): Reset LTO flags if
8006 we are about to generate a PCH.
8008 2012-01-17 Paolo Carlini <paolo.carlini@oracle.com>
8011 * c-pretty-print.c (pp_c_integer_constant): For unsigned constants
8012 use pp_unsigned_wide_integer.
8014 2012-01-10 Richard Guenther <rguenther@suse.de>
8017 * c-opts.c (c_common_handle_option): Move -Werror handling
8018 to language independent code.
8020 2012-01-05 Richard Guenther <rguenther@suse.de>
8023 * c.opt (Wmudflap, fmudflap, fmudflapth, fmudflapir): Move here
8026 2011-12-30 Paolo Carlini <paolo.carlini@oracle.com>
8029 * c-common.c (c_sizeof_or_alignof_type): In C++ allow for alignof
8030 of array types with an unknown bound.
8032 2011-12-20 Joseph Myers <joseph@codesourcery.com>
8034 * c-common.c (flag_isoc99): Update comment to refer to C11.
8035 (flag_isoc1x): Change to flag_isoc11.
8036 * c-common.h (flag_isoc99): Update comment to refer to C11.
8037 (flag_isoc1x): Change to flag_isoc11.
8038 * c-cppbuiltin.c (cpp_atomic_builtins): Change comment to refer to
8040 * c-opts.c (set_std_c1x): Change to set_std_c11.
8041 (c_common_handle_option): Handle OPT_std_c11 and OPT_std_gnu11.
8043 (set_std_c89, set_std_c99, set_std_c11): Use flag_isoc11.
8044 (set_std_c1): Use CLK_STDC11 and CLK_GNUC11.
8045 * c.opt (std=c1x): Change to std=c11. Document as non-draft
8047 (std=c1x, std=iso9899:2011): Add as aliases of std=c11.
8048 (std=gnu1x): Change to std=gnu11. Refer to non-draft standard.
8049 (std=gnu1x): Make alias of std=gnu11.
8051 2011-12-19 Jason Merrill <jason@redhat.com>
8054 * c-common.c (handle_transparent_union_attribute): Check the first
8055 field if the type is complete.
8057 2011-12-15 Jonathan Wakely <jwakely.gcc@gmail.com>
8060 * c-common.c (RID_IS_FINAL): Add.
8061 * c-common.h (RID_IS_FINAL): Add.
8063 2011-11-30 Iain Sandoe <iains@gcc.gnu.org>
8065 * c.opt (fgnu-runtime): Provide full description.
8066 (fnext-runtime): Likewise.
8067 * c-opts.c (OPT_fgnu_runtime, OPT_fnext_runtime) Remove.
8069 2011-11-28 Andrew MacLeod <amacleod@redhat.com>
8071 * c-cpp-builtin.c (cpp_atomic_builtins):New. Emit all atomic
8072 predefines in one place. Add LOCK_FREE predefines.
8073 (c_cpp_builtins): Move Legacy HAVE_SYNC predefines to
8076 2011-11-24 Andrew MacLeod <amacleod@redhat.com>
8079 * c-common.c (get_atomic_generic_size): Check for various error
8081 (resolve_overloaded_atomic_exchange,
8082 resolve_overloaded_atomic_compare_exchange,
8083 resolve_overloaded_atomic_load, resolve_overloaded_atomic_store): Return
8084 error_mark_node for error conditions.
8086 2011-11-08 Richard Guenther <rguenther@suse.de>
8091 2011-11-07 Richard Henderson <rth@redhat.com>
8092 Aldy Hernandez <aldyh@redhat.com>
8093 Torvald Riegel <triegel@redhat.com>
8095 Merged from transactional-memory.
8097 * c-common.c (handle_tm_wrap_attribute,
8098 handle_tm_attribute, ignore_attribute, parse_tm_stmt_attr): New.
8099 (struct c_common_reswords): Added __transaction* keywords.
8100 (struct c_common_attribute_table): Added transaction* and tm_regparm
8102 * c-common.h: Added RID_TRANSACTION*. Added TM_ATTR* and TM_STMT*
8104 (parse_tm_stmt_attr, tm_attr_to_mask, tm_mask_to_attr,
8105 find_tm_attribute): Declare.
8107 2011-11-07 Jason Merrill <jason@redhat.com>
8110 * c-common.c, c-common.h: Revert yesterday's changes.
8112 2011-11-06 Jason Merrill <jason@redhat.com>
8115 * c-common.c (decl_has_visibility_attr): Split out from...
8116 (c_determine_visibility): ...here.
8117 * c-common.h: Declare it.
8119 2011-11-06 Joseph Myers <joseph@codesourcery.com>
8121 * c-common.c (c_common_reswords): Add _Alignas and _Alignof.
8122 (c_sizeof_or_alignof_type): Diagnose alignof applied to a function
8124 (check_user_alignment): New. Split out of
8125 handle_aligned_attribute. Disallow integer constants with
8126 noninteger types. Conditionally allow zero.
8127 (handle_aligned_attribute): Use check_user_alignment.
8128 * c-common.h (RID_ALIGNAS, check_user_alignment): New.
8130 2011-11-06 Andrew MacLeod <amacleod@redhat.com>
8131 Richard Henderson <rth@redhat.com>
8133 Merged from cxx-mem-model.
8135 * c-cppbuiltin.c (c_cpp_builtins): Test both atomic and sync patterns.
8136 * c-common.c (sync_resolve_params, sync_resolve_return): Only tweak
8137 parameters that are the same type size.
8138 (get_atomic_generic_size): New. Find size of generic
8139 atomic function parameters and do typechecking.
8140 (add_atomic_size_parameter): New. Insert size into parameter list.
8141 (resolve_overloaded_atomic_exchange): Restructure __atomic_exchange to
8142 either __atomic_exchange_n or external library call.
8143 (resolve_overloaded_atomic_compare_exchange): Restructure
8144 __atomic_compare_exchange to either _n variant or external library call.
8145 (resolve_overloaded_atomic_load): Restructure __atomic_load to either
8146 __atomic_load_n or an external library call.
8147 (resolve_overloaded_atomic_store): Restructure __atomic_store to either
8148 __atomic_store_n or an external library call.
8149 (resolve_overloaded_builtin): Handle new __atomic builtins.
8151 2011-11-04 Eric Botcazou <ebotcazou@adacore.com>
8154 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Call fold_offsetof_1.
8155 (fold_offsetof_1): Make global. Remove STOP_REF argument and adjust.
8156 <INDIRECT_REF>: Return the argument.
8157 <ARRAY_REF>: Remove special code for negative offset.
8158 Call fold_build_pointer_plus instead of size_binop.
8159 (fold_offsetof): Remove STOP_REF argument and adjust.
8160 * c-common.h (fold_offsetof_1): Declare.
8161 (fold_offsetof): Remove STOP_REF argument.
8163 2011-11-02 Paolo Carlini <paolo.carlini@oracle.com>
8166 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
8167 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
8168 Wnarrowing for C++0x and C++98.
8169 * c.opt ([Wnarrowing]): Update.
8171 2011-11-01 Paolo Carlini <paolo.carlini@oracle.com>
8174 * c.opt: Add Wzero-as-null-pointer-constant.
8176 2011-10-31 Jason Merrill <jason@redhat.com>
8178 * c.opt (-fdeduce-init-list): Off by default.
8181 * c-common.h (cxx_dialect): Add cxx11 and cxx03.
8182 * c.opt: Add -std=c++11, -std=gnu++11, -std=gnu++03,
8184 * c-opts.c (set_std_cxx11): Rename from set_std_cxx0x.
8186 2011-10-27 Roberto Agostino Vitillo <ravitillo@lbl.gov>
8189 * c.opt (fvisibility-inlines-hidden): Description change.
8191 2011-10-26 Ed Smith-Rowland <3dw4rd@verizon.net>
8193 Implement C++11 user-defined literals.
8194 * c-common.c (build_userdef_literal): New.
8195 * c-common.def: New tree code.
8196 * c-common.h (tree_userdef_literal): New tree struct and accessors.
8197 * c-lex.c (interpret_float): Add suffix parm.
8198 (c_lex_with_flags): Build literal tokens.
8200 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
8204 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
8207 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
8208 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
8209 Wnarrowing for C++0x and C++98.
8210 * c.opt ([Wnarrowing]): Update.
8212 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
8215 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
8216 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
8217 Wnarrowing for C++0x and C++98.
8218 * c.opt ([Wnarrowing]): Update.
8220 2011-10-21 Paolo Carlini <paolo.carlini@oracle.com>
8223 * c-common.c (conversion_warning): Remove code looking for
8224 artificial operands.
8226 2011-10-18 Dodji Seketeli <dodji@redhat.com>
8229 * c-lex.c (fe_file_change): Use LINEMAP_SYSP when
8230 !NO_IMPLICIT_EXTERN_C.
8232 2011-10-17 Michael Spertus <mike_spertus@symantec.com>
8234 * c-common.c (c_common_reswords): Add __bases,
8236 * c-common.h: Add RID_BASES and RID_DIRECT_BASES.
8238 2011-10-17 Paolo Carlini <paolo.carlini@oracle.com>
8241 * c.opt ([Wnonnull]): Add C++ and Objective-C++.
8243 2011-10-15 Tom Tromey <tromey@redhat.com>
8244 Dodji Seketeli <dodji@redhat.com>
8246 * c.opt (fdebug-cpp): New option.
8247 * c-opts.c (c_common_handle_option): Handle the option.
8248 * c-ppoutput.c (maybe_print_line_1): New static function. Takes an
8249 output stream in parameter. Factorized from ...
8250 (maybe_print_line): ... this. Dump location debug information when
8251 -fdebug-cpp is in effect.
8252 (print_line_1): New static function. Takes an output stream in
8253 parameter. Factorized from ...
8254 (print_line): ... here. Dump location information when -fdebug-cpp
8256 (scan_translation_unit): Dump location information when
8257 -fdebug-cpp is in effect.
8259 2011-10-15 Tom Tromey <tromey@redhat.com>
8260 Dodji Seketeli <dodji@redhat.com>
8262 * c.opt (ftrack-macro-expansion): New option. Handle it with and
8264 * c-opts.c (c_common_handle_option)<case
8265 OPT_ftrack_macro_expansion_, case OPT_ftrack_macro_expansion>: New
8266 cases. Handle -ftrack-macro-expansion with and without argument.
8268 2011-10-15 Tom Tromey <tromey@redhat.com>
8269 Dodji Seketeli <dodji@redhat.com>
8271 * c-ppoutput.c (scan_translation_unit, maybe_print_line)
8272 (print_line, cb_define, do_line_change): Adjust to avoid touching
8273 the internals of struct line_map. Use the public API instead.
8274 * c-pch.c (c_common_read_pch): Likewise.
8275 * c-lex.c (fe_file_change): Likewise.
8277 2011-10-14 Paolo Carlini <paolo.carlini@oracle.com>
8280 * c.opt ([Wformat-zero-length]): Add C++ and Objective-C++.
8282 2011-10-11 Paolo Carlini <paolo.carlini@oracle.com>
8285 * c-pretty-print.c (pp_c_floating_constant): Output
8286 max_digits10 (in the ISO C++ WG N1822 sense) decimal digits.
8288 2011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
8290 * c-common.c (def_builtin_1): Delete old interface with two
8291 parallel arrays to hold standard builtin declarations, and replace
8292 it with a function based interface that can support creating
8293 builtins on the fly in the future. Change all uses, and poison
8294 the old names. Make sure 0 is not a legitimate builtin index.
8295 * c-omp.c (c_finish_omp_barrier): Ditto.
8296 (c_finish_omp_taskwait): Ditto.
8297 (c_finish_omp_flush): Ditto.
8299 2011-10-11 Tristan Gingold <gingold@adacore.com>
8301 * c.opt: (fallow-parameterless-variadic-functions): New.
8303 2011-09-08 Dodji Seketeli <dodji@redhat.com>
8305 PR c++/33255 - Support -Wunused-local-typedefs warning
8306 * c-common.h (struct c_language_function::local_typedefs): New
8308 (record_locally_defined_typedef, maybe_record_typedef_use)
8309 (maybe_warn_unused_local_typedefs): Declare new functions.
8310 * c-common.c (record_locally_defined_typedef)
8311 (maybe_record_typedef_use)
8312 (maybe_warn_unused_local_typedefs): Define new functions.
8313 * c.opt: Declare new -Wunused-local-typedefs flag.
8315 2011-09-06 Eric Botcazou <ebotcazou@adacore.com>
8318 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Fold offsetof-like
8321 2011-09-05 Richard Guenther <rguenther@suse.de>
8323 * c-common.c (complete_array_type): Use ssize_int (-1) instead
8324 of integer_minus_one_node for empty array upper bounds.
8326 2011-08-28 Dodji Seketeli <dodji@redhat.com>
8328 * c-pch.c (c_common_read_pch): Call linemap_add with LC_ENTER as
8329 it's the first time it's being called on this main TU.
8331 2011-08-24 Richard Guenther <rguenther@suse.de>
8334 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Fix conditional.
8336 2011-08-22 Gabriel Charette <gchare@google.com>
8338 * c-opts.c (c_finish_options): Force BUILTINS_LOCATION for tokens
8339 defined in cpp_init_builtins and c_cpp_builtins.
8341 2011-08-19 Joseph Myers <joseph@codesourcery.com>
8343 * c-common.c (c_common_reswords): Add __builtin_complex.
8344 * c-common.h (RID_BUILTIN_COMPLEX): New.
8346 2011-08-18 Joseph Myers <joseph@codesourcery.com>
8348 * c-common.c (c_common_reswords): Add _Noreturn.
8349 (keyword_is_function_specifier): Handle RID_NORETURN.
8350 * c-common.h (RID_NORETURN): New.
8352 2011-08-10 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
8354 * c-common.c (unsafe_conversion_p): New function. Check if it is
8355 unsafe to convert an expression to the type.
8356 (conversion_warning): Adjust, use unsafe_conversion_p.
8357 * c-common.h (unsafe_conversion_p): New function declaration.
8359 2011-08-02 Jakub Jelinek <jakub@redhat.com>
8361 * c-common.h (c_finish_omp_atomic): Adjust prototype.
8362 (c_finish_omp_taskyield): New prototype.
8363 * c-omp.c (c_finish_omp_atomic): Add OPCODE, V, LHS1 and RHS1
8364 arguments. Handle OMP_ATOMIC_READ, OMP_ATOMIC_CAPTURE_OLD and
8365 OMP_ATOMIC_CAPTURE_NEW in addition to OMP_ATOMIC. If LHS1
8366 or RHS1 have side-effects, evaluate those too in the right spot,
8367 if it is a decl and LHS is also a decl, error out if they
8369 (c_finish_omp_taskyield): New function.
8370 * c-cppbuiltin.c (c_cpp_builtins): Change _OPENMP to 201107.
8371 * c-pragma.c (omp_pragmas): Add taskyield.
8372 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKYIELD.
8373 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_FINAL and
8374 PRAGMA_OMP_CLAUSE_MERGEABLE.
8376 2011-07-25 Dodji Seketeli <dodji@redhat.com>
8378 * c-common.h (set_underlying_type): Remove parm name from
8381 2011-07-25 Romain Geissler <romain.geissler@gmail.com>
8383 * c-pretty-print.h: Search c-common.h in c-family.
8385 2011-07-22 Jason Merrill <jason@redhat.com>
8388 * c.opt (Wnarrowing): New.
8391 * c-common.h: Declare c_linkage_bindings.
8392 * c-pragma.c (handle_pragma_redefine_extname): Use it.
8395 * c-opts.c (set_std_cxx0x): Set flag_isoc94 and flag_isoc99.
8396 * c-pretty-print.c (pp_c_cv_qualifiers): Check c_dialect_cxx as well
8397 as flag_isoc99 for 'restrict'.
8398 (pp_c_specifier_qualifier_list): Likewise for _Complex.
8400 2011-07-21 Ian Lance Taylor <iant@google.com>
8403 * c-common.c (c_disable_warnings): New static function.
8404 (c_enable_warnings): New static function.
8405 (c_fully_fold_internal): Change local unused_p to bool. Call
8406 c_disable_warnings and c_enable_warnings rather than change
8407 c_inhibit_evaluation_warnings.
8409 2011-07-20 Jason Merrill <jason@redhat.com>
8411 PR c++/6709 (DR 743)
8412 PR c++/42603 (DR 950)
8413 * c-common.h (CPP_KEYWORD, CPP_TEMPLATE_ID): Move from cp/parser.h.
8414 (CPP_NESTED_NAME_SPECIFIER, N_CP_TTYPES): Likewise.
8415 (CPP_DECLTYPE): New.
8416 * c-common.c (c_parse_error): Handle CPP_DECLTYPE.
8418 2011-07-19 Richard Guenther <rguenther@suse.de>
8420 * c-common.c (pointer_int_sum): Use fold_build_pointer_plus.
8421 * c-omp.c (c_finish_omp_for): Likewise.
8423 2011-07-12 Eric Botcazou <ebotcazou@adacore.com>
8425 * c-ada-spec.c (dump_nested_types): Put semi-colon after empty loop
8426 body on the next line.
8428 2011-07-08 Jason Merrill <jason@redhat.com>
8431 * c-omp.c (check_omp_for_incr_expr): Handle preevaluation.
8434 * c-common.c (c_apply_type_quals_to_decl): Don't check
8435 TYPE_NEEDS_CONSTRUCTING.
8437 2011-07-06 Richard Guenther <rguenther@suse.de>
8439 * c-common.c (c_common_nodes_and_builtins):
8440 Merge calls to build_common_tree_nodes and build_common_tree_nodes_2.
8442 2011-07-05 Richard Guenther <rguenther@suse.de>
8444 * c-common.c (c_common_nodes_and_builtins): Build all common
8447 2011-06-27 Jakub Jelinek <jakub@redhat.com>
8449 * c-common.h (c_tree_chain_next): New static inline function.
8451 * c-common.c (check_builtin_function_arguments): Handle
8452 BUILT_IN_ASSUME_ALIGNED.
8454 2011-06-21 Andrew MacLeod <amacleod@redhat.com>
8456 * c-common.c: Add sync_ or SYNC__ to builtin names.
8457 * c-omp.c: Add sync_ or SYNC__ to builtin names.
8459 2011-06-20 Pierre Vittet <piervit@pvittet.com>
8461 * c-pragma.h (pragma_handler_1arg, pragma_handler_2arg): New
8463 (gen_pragma_handler): New union.
8464 (internal_pragma_handler): New type.
8465 (c_register_pragma_with_data)
8466 (c_register_pragma_with_expansion_and_data): New functions.
8468 * c-pragma.c (registered_pragmas, c_register_pragma_1)
8469 (c_register_pragma, c_register_pragma_with_expansion)
8470 (c_invoke_pragma_handler): Changed to work with
8471 internal_pragma_handler.
8472 (c_register_pragma_with_data)
8473 (c_register_pragma_with_expansion_and_data): New functions.
8475 2011-06-14 Joseph Myers <joseph@codesourcery.com>
8477 * c-common.c: Include common/common-target.h.
8478 (handle_section_attribute): Use
8479 targetm_common.have_named_sections.
8480 * c-cppbuiltin.c: Include common/common-target.h.
8481 (c_cpp_builtins): Use targetm_common.except_unwind_info.
8483 2011-06-10 Richard Guenther <rguenther@suse.de>
8485 * c-pretty-print.c (pp_c_type_specifier): Use pp_c_identifier
8486 to print a IDENTIFIER_NODE.
8488 2011-06-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8489 Joseph Myers <joseph@codesourcery.com>
8491 * c.opt (fbuilding-libgcc): New option.
8492 * c-cppbuiltin.c (c_cpp_builtins): Define
8493 __LIBGCC_TRAMPOLINE_SIZE__ if flag_building_libgcc.
8495 2011-06-07 Jason Merrill <jason@redhat.com>
8497 * c-common.c (max_tinst_depth): Lower default to 900.
8499 * c-format.c (gcc_cxxdiag_char_table): Add 'S' format.
8501 2011-06-07 Richard Guenther <rguenther@suse.de>
8503 * c-common.c (c_common_nodes_and_builtins): Do not set
8504 size_type_node or call set_sizetype.
8506 2011-06-07 Dodji Seketeli <dodji@redhat.com>
8509 * c-pretty-print.c (pp_c_integer_constant): Consider the canonical
8510 type when using pointer comparison to compare types.
8512 2011-06-02 Jonathan Wakely <jwakely.gcc@gmail.com>
8514 * c.opt: Add -Wdelete-non-virtual-dtor.
8515 * c-opts.c (c_common_handle_option): Include it in -Wall.
8517 2011-05-30 Nathan Froyd <froydnj@gcc.gnu.org>
8522 2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
8524 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
8527 2011-05-27 Jakub Jelinek <jakub@redhat.com>
8530 * c-common.c (c_common_truthvalue_conversion) <case COND_EXPR>: For
8531 C++ don't call c_common_truthvalue_conversion on void type arms.
8533 2011-05-27 Nathan Froyd <froydnj@codesourcery.com>
8535 * c-common.h (struct stmt_tree_s) [x_cur_stmt_list]: Change to a VEC.
8536 (stmt_list_stack): Define.
8537 (cur_stmt_list): Adjust for new type of x_cur_stmt_list.
8538 * c-semantics.c (push_stmt_list, pop_stmt_list): Likewise.
8540 2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
8542 * c-common.c (warning_candidate_p): Check for BLOCKs.
8544 2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
8546 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
8549 2011-05-25 Jakub Jelinek <jakub@redhat.com>
8551 * c-common.c (def_fn_type): Remove extra va_end.
8553 2011-05-23 Jason Merrill <jason@redhat.com>
8556 * c-common.c (c_common_get_narrower): New.
8557 (shorten_binary_op, shorten_compare, warn_for_sign_compare): Use it.
8559 2011-05-23 Nathan Froyd <froydnj@codesourcery.com>
8561 * c-common.h (check_function_arguments): Tweak prototype of
8562 check_function_arguments.
8563 * c-common.c (check_function_arguments): Likewise. Adjust
8564 calls to check_function_nonnull, check_function_format, and
8565 check_function_sentinel.
8566 (check_function_sentinel): Take a FUNCTION_TYPE rather than
8567 separate attributes and typelist arguments. Use
8568 FOREACH_FUNCTION_ARGS to iterate over argument types.
8570 2011-05-15 Paolo Carlini <paolo.carlini@oracle.com>
8572 * c-common.c (c_common_reswords): Reorder.
8573 * c-common.h (rid): Likewise.
8575 2011-05-10 Nathan Froyd <froydnj@codesourcery.com>
8577 * c-common.c (def_fn_type): Don't call build_function_type, call
8578 build_function_type_array or build_varargs_function_type_array
8580 (c_common_nodes_and_builtins): Likewise.
8582 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
8584 * c-common.c (c_add_case_label): Omit the loc argument to
8586 * c-common.h (build_case_label): Remove.
8587 * c-semantics.c (build_case_label): Remove.
8589 2011-05-05 Joseph Myers <joseph@codesourcery.com>
8591 * c-objc.h (objc_start_method_definition): Update prototype.
8592 * stub-objc.c (objc_start_method_definition): Add extra parameter.
8594 2011-05-04 Nathan Froyd <froydnj@codesourcery.com>
8596 * c-common.c (check_main_parameter_types): Reindent. Don't use
8597 TYPE_ARG_TYPES directly.
8598 (handle_nonnull_attribute): Likewise.
8599 (sync_resolve_params): Likewise.
8600 * c-format.c (handle_format_arg_attribute): Likewise. Adjust call
8601 to check_format_string.
8602 (handle_format_attribute): Likewise.
8603 (check_format_string): Take a function type to examine instead of
8604 a type list. Use a function_arg_iterator to step through argument
8607 2011-05-04 Richard Guenther <rguenther@suse.de>
8609 * c-common.c (fix_string_type): Use size_int for index type bounds.
8610 (start_fname_decls): Do not pass NULL to build_int_cst.
8611 (c_init_attributes): Likewise.
8612 * c-lex.c (c_lex_with_flags): Likewise.
8614 2011-04-27 Jason Merrill <jason@redhat.com>
8616 * c-common.c (make_tree_vector_from_list): New.
8617 * c-common.h: Declare it.
8619 2011-04-26 Richard Guenther <rguenther@suse.de>
8621 PR preprocessor/48248
8622 * c-ppoutput.c (maybe_print_line): Always optimize newlines
8623 for output size with -P.
8625 2011-04-25 Paolo Carlini <paolo.carlini@oracle.com>
8627 * c-common.c (struct c_common_resword): Add __underlying_type.
8628 * c-common.h (enum rid): Add RID_UNDERLYING_TYPE.
8630 2011-04-20 Jim Meyering <meyering@redhat.com>
8632 * c-format.c (init_dollar_format_checking): Remove useless
8635 2011-04-15 Nicola Pero <nicola.pero@meta-innovation.com>
8637 * c-objc.h (objc_get_interface_ivars): Removed.
8638 (objc_detect_field_duplicates): New.
8639 * stub-objc.c: Likewise.
8641 2011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
8643 * stub-objc.c (objc_declare_protocols): Renamed to
8644 objc_declare_protocol.
8645 * c-objc.h: Likewise.
8647 2011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
8649 * stub-objc.c (objc_declare_class): Updated argument name.
8651 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
8653 * c-common.h (c_common_init_ts): Declare.
8654 * c-common.c (c_common_init_ts): Define.
8656 2011-04-12 Nicola Pero <nicola.pero@meta-innovation.com>
8658 * c-objc.h (objc_build_message_expr): Updated prototype.
8659 * stub-objc.c (objc_build_message_expr): Likewise.
8661 2011-04-12 Martin Jambor <mjambor@suse.cz>
8663 * c-gimplify.c (c_genericize): Call cgraph_get_create_node instead
8666 2011-04-11 Richard Guenther <rguenther@suse.de>
8668 * c-common.c (complete_array_type): Build a range type of
8671 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
8673 * c-common.c (handle_sentinel_attribute): Don't use TYPE_ARG_TYPES.
8674 (handle_type_generic_attribute): Likewise.
8676 2011-04-07 Jason Merrill <jason@redhat.com>
8679 * c-common.c (c_common_truthvalue_conversion): Don't ignore
8680 conversion from C++0x scoped enum.
8682 2011-04-06 Joseph Myers <joseph@codesourcery.com>
8684 * c-target-def.h: New file.
8685 * c-target.def: New file.
8686 * c-target.h: New file.
8687 * c-common.c (targetcm): Don't define here.
8688 * c-common.h (default_handle_c_option): Declare.
8689 * c-format.c: Include c-target.h instead of target.h.
8690 * c-opts.c: Include c-target.h instead of target.h. Explicitly
8692 (default_handle_c_option): Move from targhooks.c.
8694 2011-03-29 Jakub Jelinek <jakub@redhat.com>
8696 PR preprocessor/48248
8697 * c-ppoutput.c (print): Add src_file field.
8698 (init_pp_output): Initialize it.
8699 (maybe_print_line): Don't optimize by adding up to 8 newlines
8700 if map->to_file and print.src_file are different file.
8701 (print_line): Update print.src_file.
8703 2011-03-25 Kai Tietz <ktietz@redhat.com>
8705 * c-ada-spec.c (compare_comment): Use filename_cmp
8706 instead of strcmp for filename.
8708 2011-03-25 Jeff Law <law@redhat.com>
8710 * c-common.c (def_fn_type): Add missing va_end.
8712 2011-03-25 Jason Merrill <jason@redhat.com>
8714 * c.opt: Add -std=c++03.
8716 2011-03-22 Eric Botcazou <ebotcazou@adacore.com>
8718 * c-ada-spec.c (dump_ada_template): Skip non-class instances.
8720 2011-03-17 Kai Tietz <ktietz@redhat.com>
8723 * c-pretty-print.c (pp_c_specifier_qualifier_list):
8724 Display allowed attributes for function pointer types.
8725 (pp_c_attributes_display): New function to display
8726 attributes having affects_type_identity flag set to true.
8727 * c-pretty-print.h (pp_c_attributes_display): New prototype.
8729 * c-common.c (c_common_attribute_table):
8731 (c_common_format_attribute_table): Likewise.
8733 2011-03-18 Jason Merrill <jason@redhat.com>
8735 * c.opt (fconstexpr-depth): Add Var(max_constexpr_depth).
8736 * c-common.h: Don't declare it here.
8737 * c-common.c: Or define it here.
8738 * c-opts.c (c_common_handle_option): Or set it here.
8741 * c-common.c (handle_transparent_union_attribute): Don't
8742 make a duplicate type in C++.
8744 2011-03-15 Jason Merrill <jason@redhat.com>
8746 * c-common.c (max_constexpr_depth): New.
8747 * c-common.h: Declare it.
8748 * c-opts.c (c_common_handle_option): Set it.
8749 * c.opt (fconstexpr-depth): New option.
8751 2011-03-11 Jason Merrill <jason@redhat.com>
8753 * c-common.c (attribute_takes_identifier_p): Add missing const.
8756 * c-common.c (attribute_takes_identifier_p): Assume that an
8757 unknown attribute takes an identifier.
8759 2011-03-07 Nathan Froyd <froydnj@codesourcery.com>
8762 * c-common.c (c_type_hash): Call list_length instead of iterating
8763 through DECL_CHAIN. Rename 'i' to 'n_elements'.
8765 2011-02-19 Jakub Jelinek <jakub@redhat.com>
8768 * c-common.c (c_fully_fold_internal): Handle VIEW_CONVERT_EXPR.
8770 2011-02-17 Iain Sandoe <iains@gcc.gnu.org>
8772 * c.opt (fobjc-abi-version=) New.
8773 (fobjc-nilcheck): New.
8775 2011-02-03 Nathan Froyd <froydnj@codesourcery.com>
8778 * c-common.h (keyword_is_decl_specifier): Declare.
8779 * c-common.c (keyword_is_decl_specifier): Define.
8780 (keyword_is_function_specifier): New function.
8782 2011-01-26 Jakub Jelinek <jakub@redhat.com>
8785 * c-lex.c (interpret_float): If CPP_N_IMAGINARY, ensure
8786 EXCESS_PRECISION_EXPR is created with COMPLEX_TYPE instead of
8789 2011-01-26 Arnaud Charlet <charlet@adacore.com>
8791 * c-ada-spec.c (dump_generic_ada_node): Avoid dereferencing null type.
8793 2011-01-26 Jakub Jelinek <jakub@redhat.com>
8796 * c-opts.c (c_common_post_options): Call c_common_no_more_pch
8797 after init_c_lex if pch_file is set.
8799 2011-01-26 Dave Korn <dave.korn.cygwin@gmail.com>
8802 * c.opt (-fkeep-inline-dllexport): New switch.
8804 2011-01-12 Richard Guenther <rguenther@suse.de>
8807 * c-common.c (handle_weak_attribute): Warn instead of error
8808 on declaring an inline function weak.
8810 2011-01-05 Tom Tromey <tromey@redhat.com>
8812 * c-common.h (lvalue_error): Update.
8813 * c-common.c (lvalue_error): Add 'loc' argument. Call error_at,
8816 2010-12-29 Nicola Pero <nicola.pero@meta-innovation.com>
8819 * c-objc.h (objc_finish_message_expr): Added argument to
8822 2010-12-22 Nathan Froyd <froydnj@codesourcery.com>
8824 * c-common.c (handle_nonnull_attribute, handle_sentinel_attribute):
8827 2010-12-18 Nicola Pero <nicola.pero@meta-innovation.com>
8829 * c-objc.h (objc_maybe_warn_exceptions): New.
8830 * stub-objc.c (objc_maybe_warn_exceptions): New.
8832 2010-12-10 Nathan Froyd <froydnj@codesourcery.com>
8834 * c-common.h (readonly_error): Declare.
8835 * c-common.c (readonly_error): Define.
8837 2010-12-09 Nathan Froyd <froydnj@codesourcery.com>
8839 * c-common.h (invalid_indirection_error): Declare.
8840 * c-common.c (invalid_indirection_error): Define.
8842 2010-12-03 Richard Guenther <rguenther@suse.de>
8845 * c-pretty-print.c (pp_c_postfix_expression): Handle MEM_REF.
8846 (pp_c_unary_expression): Likewise.
8847 (pp_c_expression): Likewise.
8849 2010-11-30 Nicola Pero <nicola.pero@meta-innovation.com>
8851 * c-common.h (objc_finish_function): New.
8852 (objc_non_volatilized_type): Removed.
8853 (objc_type_quals_match): Removed.
8854 * stub-objc.c (objc_finish_function): New.
8855 (objc_non_volatilized_type): Removed.
8856 (objc_type_quals_match): Removed.
8858 2010-11-30 Joseph Myers <joseph@codesourcery.com>
8860 * c-common.h (parse_optimize_options): Declare.
8861 * c-cppbuiltin.c, c-format.c, c-gimplify.c, c-lex.c, c-omp.c,
8862 c-pch.c, c-pragma.c, c-semantics.c: Don't include toplev.h.
8864 2010-11-29 Joseph Myers <joseph@codesourcery.com>
8866 * c-opts.c (check_deps_environment_vars): Use getenv instead of
8868 * c-pch.c (O_BINARY): Don't define here.
8869 * c-pragma.h: Include "cpplib.h" instead of <cpplib.h>.
8871 2010-11-25 Joseph Myers <joseph@codesourcery.com>
8873 * c-cppbuiltin.c (c_cpp_builtins): Pass &global_options to
8874 targetm.except_unwind_info.
8876 2010-11-23 Joseph Myers <joseph@codesourcery.com>
8878 * c-opts.c (c_common_handle_option): Pass location to
8879 set_struct_debug_option.
8881 2010-11-23 Joseph Myers <joseph@codesourcery.com>
8883 * c-common.c (visibility_options): Move from ../opts.c.
8884 * c-common.h (struct visibility_flags, visibility_options):
8886 * c-opts.c (finish_options): Rename to c_finish_options.
8887 (c_common_init): Update call to finish_options.
8889 2010-11-22 Nicola Pero <nicola.pero@meta-innovation.com>
8892 * c-lex.c (lex_string): Check that each string in an Objective-C
8893 string concat sequence starts with either one or zero '@', and
8894 that there are no spurious '@' signs at the end.
8896 2010-11-20 Joseph Myers <joseph@codesourcery.com>
8898 * c-pragma.c: Remove conditionals on HANDLE_PRAGMA_PACK,
8899 HANDLE_PRAGMA_PACK_PUSH_POP, HANDLE_PRAGMA_WEAK and
8900 HANDLE_PRAGMA_VISIBILITY.
8901 * c-pragma.h (HANDLE_PRAGMA_WEAK, HANDLE_PRAGMA_PACK,
8902 HANDLE_PRAGMA_VISIBILITY): Don't define.
8903 (HANDLE_SYSV_PRAGMA, HANDLE_PRAGMA_PACK_PUSH_POP): Don't test.
8905 2010-11-20 Nathan Froyd <froydnj@codesourcery.com>
8910 * c-common.h (keyword_begins_type_specifier): Declare.
8911 (keyword_is_storage_class_specifier): Declare.
8912 (keyword_is_type_qualifier): Declare.
8913 * c-common.c (keyword_begins_type_specifier): New function.
8914 (keyword_is_storage_class_specifier): New function.
8915 (keyword_is_type_qualifier): Declare.
8917 2010-11-19 Joseph Myers <joseph@codesourcery.com>
8920 * c-common.c (in_late_binary_op): Define.
8921 (c_common_truthvalue_conversion): Check in_late_binary_op before
8922 calling c_save_expr.
8923 * c-common.h (in_late_binary_op): Declare.
8925 2010-11-19 Joseph Myers <joseph@codesourcery.com>
8927 * c-opts.c (c_common_handle_option): Update calls to
8928 set_struct_debug_option.
8930 2010-11-19 Nicola Pero <nicola.pero@meta-innovation.com>
8932 * c-common.h (objc_declare_protocols): Added additional argument.
8933 * stub-objc.c (objc_declare_protocol): Same change.
8935 2010-11-18 Nathan Froyd <froydnj@codesourcery.com>
8938 * c-common.h (build_real_imag_expr): Declare.
8939 * c-semantics.c (build_real_imag_expr): Define.
8941 2010-11-17 Joseph Myers <joseph@codesourcery.com>
8943 * c-opts.c (c_common_parse_file): Take no arguments.
8944 * c-common.h (c_common_parse_file): Update prototype.
8946 2010-11-16 Jakub Jelinek <jakub@redhat.com>
8949 * c-common.c (warning_candidate_p): Don't track non-const calls
8952 2010-11-15 Ian Lance Taylor <iant@google.com>
8954 * c-lex.c (init_c_lex): Set macro debug callbacks if
8955 flag_dump_go_spec is set.
8957 2010-11-15 Nicola Pero <nicola.pero@meta-innovation.com>
8959 * c-common.h (objc_build_incr_expr_for_property_ref): New.
8960 * stub-objc.c (objc_build_incr_expr_for_property_ref): New.
8962 2010-11-15 Nathan Froyd <froydnj@codesourcery.com>
8964 PR preprocessor/45038
8965 * c-cppbuiltin.c (c_cpp_builtins): Use different format for C++
8968 2010-11-12 Joseph Myers <joseph@codesourcery.com>
8970 * c-common.h (c_family_lang_mask): Declare.
8971 * c-opts.c (c_family_lang_mask): Make extern.
8972 * c-pragma.c (handle_pragma_diagnostic): Use
8973 control_warning_option.
8975 2010-11-12 Joseph Myers <joseph@codesourcery.com>
8977 * c-common.c (parse_optimize_options): Update call to
8979 * c-common.h (c_common_handle_option): Update prototype.
8980 * c-opts.c (c_common_handle_option): Take location_t parameter and
8981 pass it to other functions.
8983 2010-11-11 Joseph Myers <joseph@codesourcery.com>
8985 * c-opts.c (warning_as_error_callback): Remove.
8986 (c_common_initialize_diagnostics): Don't call
8987 register_warning_as_error_callback.
8988 (c_common_handle_option): Handle -Werror=normalized= here.
8990 2010-11-10 Joseph Myers <joseph@codesourcery.com>
8992 * c-common.c (handle_mode_attribute): Use %' and word "signedness"
8994 * c-opts.c (c_common_parse_file): Start diagnostics with lowercase
8996 * c-pragma.c (handle_pragma_target, handle_pragma_optimize):
8997 Remove trailing '.' from diagnostics.
8998 * c.opt (Wwrite-strings_: Avoid '`' in help text.
9000 2010-11-10 Joseph Myers <joseph@codesourcery.com>
9002 * c-common.c (parse_optimize_options): Pass global_dc to
9004 * c-opts.c (c_common_handle_option): Pass &global_options to
9005 set_Wstrict_aliasing.
9006 * c.opt (v): Don't mark Common or document here.
9008 2010-11-06 Iain Sandoe <iains@gcc.gnu.org>
9011 * c-format.c (format_type): New type gcc_objc_string_format_type.
9012 (valid_stringptr_type_p): New.
9013 (handle_format_arg_attribute): Use valid_stringptr_type_p ().
9014 (check_format_string): Pass expected type, use
9015 valid_stringptr_type_p (), check that the format string types are
9016 consistent with the format specification.
9017 (decode_format_attr): Warn if NSString is used outside objective-c.
9018 (format_types_orig): Add NSString.
9020 (format_flags): New.
9021 (check_format_arg): Handle format strings requiring an external parser.
9022 first_target_format_type: New variable.
9023 (handle_format_attribute): Set up first_target_format_type, pass the
9024 expected format arg string type to check_format_string().
9025 * c-common.h (FMT_FLAG_PARSE_ARG_CONVERT_EXTERNAL): New flag.
9026 * stub-objc.c (objc_string_ref_type_p): New.
9027 (objc_check_format_arg): New.
9029 2010-11-04 Nicola Pero <nicola.pero@meta-innovation.com>
9031 Fixed using the Objective-C 2.0 dot-syntax with class names.
9032 * c-common.h (objc_build_class_component_ref): New.
9033 * stub-objc.c (objc_build_class_component_ref): New.
9035 2010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
9037 * c.opt (Wproperty-assign-default): New option.
9039 2010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
9041 Implemented -fobjc-std=objc1 flag.
9042 * c.opt (fobjc-std=objc1): New option.
9044 2010-11-01 Nicola Pero <nicola.pero@meta-innovation.com>
9046 Implemented format and noreturn attributes for Objective-C methods.
9047 * c-common.c (handle_noreturn_attribute): Recognize 'noreturn'
9048 attribute for Objective-C methods.
9050 2010-10-31 Jason Merrill <jason@redhat.com>
9052 * c-common.c (conversion_warning, warn_for_collisions_1): Use
9055 2010-10-30 Nicola Pero <nicola.pero@meta-innovation.com>
9057 Implemented Objective-C 2.0 @property, @synthesize and @dynamic.
9058 * c-common.h (enum rid): Removed RID_COPIES and RID_IVAR.
9059 (objc_add_property_declaration): Removed arguments for copies and
9061 (objc_build_getter_call): Renamed to
9062 objc_maybe_build_component_ref.
9063 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
9064 (objc_is_property_ref): New.
9065 * c-common.c (c_common_reswords): Removed copies and ivar.
9066 * stub-objc.c (objc_add_property_declaration): Removed arguments
9067 for copies and ivar.
9068 (objc_build_getter_call): Renamed to
9069 objc_maybe_build_component_ref.
9070 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
9071 (objc_is_property_ref): New.
9073 2010-10-29 Arnaud Charlet <charlet@adacore.com>
9074 Matthew Gingell <gingell@adacore.com>
9076 * c-ada-spec.c (separate_class_package): New function.
9077 (pp_ada_tree_identifier): Prefix references to C++ classes with the
9078 name of their enclosing package.
9079 (print_ada_declaration): Use separate_class_package.
9081 2010-10-27 Jason Merrill <jason@redhat.com>
9083 * c-common.c (c_common_reswords): Add __is_literal_type.
9084 * c-common.h (enum rid): Add RID_IS_LITERAL_TYPE.
9086 * c-common.c (check_case_value): Remove special C++ code.
9088 2010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
9090 * c-common.h (enum rid): Added RID_READWRITE, RID_ASSIGN,
9091 RID_RETAIN, RID_COPY and RID_NONATOMIC. Updated RID_FIRST_PATTR
9093 (objc_add_property_declaration): Added additional arguments.
9094 (objc_property_attribute_kind): Removed.
9095 (objc_set_property_attr): Removed.
9096 * c-common.c (c_common_reswords): Added readwrite, assign, retain,
9098 * stub-objc.c (objc_add_property_declaration): Added additional
9100 (objc_set_property_attr): Removed.
9102 2010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
9104 * c-common.h (objc_add_property_variable): Renamed to
9105 objc_add_property_declaration. Added location argument.
9106 * stub-objc.c (objc_add_property_variable): Same change.
9108 2010-10-23 Nicola Pero <nicola.pero@meta-innovation.com>
9110 * c-common.h (objc_maybe_printable_name): New.
9111 * stub-objc.c (objc_maybe_printable_name): New.
9113 2010-10-22 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
9114 Andrew Pinski <pinskia@gmail.com>
9116 * c-common.h (c_common_mark_addressable_vec): Declare.
9117 * c-common.c (c_common_mark_addressable_vec): New function.
9119 2010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
9121 * c-common.h (objc_set_method_type): Removed.
9122 (objc_add_method_declaration): Added boolean argument.
9123 (objc_start_method_definition): Same change.
9124 (objc_build_method_signature): Same change.
9125 * stub-objc.c (objc_set_method_type): Removed.
9126 (objc_add_method_declaration): Added boolean argument.
9127 (objc_start_method_definition): Same change.
9128 (objc_build_method_signature): Same change.
9130 2010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
9132 * c-common.h (finish_file): Removed.
9133 (objc_write_global_declarations): New.
9134 * c-opts.c (c_common_parse_file): Do not call finish_file.
9135 * stub-objc.c (objc_write_global_declarations): New.
9137 2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
9139 Implemented parsing @synthesize and @dynamic for
9140 Objective-C/Objective-C++.
9141 * c-common.h (enum rid): Add RID_AT_SYNTHESIZE and RID_AT_DYNAMIC.
9142 (objc_add_synthesize_declaration): New.
9143 (objc_add_dynamic_declaration): New.
9144 * c-common.c (c_common_reswords): Add synthesize and dynamic.
9145 * stub-objc.c (objc_add_synthesize_declaration): New.
9146 (objc_add_dynamic_declaration): New.
9148 2010-10-18 Michael Meissner <meissner@linux.vnet.ibm.com>
9151 * c-cppbuiltin.c (mode_has_fma): Move function here from
9152 builtins.c. Don't use the fma optab, instead just use the
9153 HAVE_fma* macros, so that __FP_FAST_FMA* will be defined when
9156 2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
9158 Merge from 'apple/trunk' branch on FSF servers.
9160 2005-11-08 Fariborz Jahanian <fjahanian@apple.com>
9163 * c-common.h (objc_non_volatilized_type): New declaration
9164 * stub-objc.c (objc_non_volatilized_type): New stub.
9166 2010-10-17 Nicola Pero <nicola.pero@meta-innovation.com>
9168 Merge from 'apple/trunk' branch on FSF servers.
9170 2006-03-27 Fariborz Jahanian <fjahanian@apple.com>
9173 * c-common.h (objc_diagnose_private_ivar): New decl.
9174 * stub-objc.c (objc_diagnose_private_ivar): New stub.
9176 2010-10-17 Iain Sandoe <iains@gcc.gnu.org>
9178 * c-common.c (c_common_reswords): Add package, RID_AT_PACKAGE.
9179 * c-common.h (enum rid): Add RID_AT_PACKAGE.
9180 (objc_ivar_visibility_kind): New enum.
9181 (objc_set_visibility): Adjust prototype to use visibility enum.
9182 * stub-objc.c (objc_set_visibility): Adjust stub to use
9185 2010-10-14 Michael Meissner <meissner@linux.vnet.ibm.com>
9187 * c-cppbuiltin.c (builtin_define_float_constants): Emit
9188 __FP_FAST_FMA, __FP_FAST_FMAF, and __FP_FAST_FMAL if the machine
9189 has the appropriate fma builtins.
9190 (c_cpp_builtins): Adjust call to builtin_define_float_constants.
9192 2010-10-14 Iain Sandoe <iains@gcc.gnu.org>
9194 merge from FSF apple 'trunk' branch.
9195 2006 Fariborz Jahanian <fjahanian@apple.com>
9197 Radars 4436866, 4505126, 4506903, 4517826
9198 * c-common.c (c_common_resword): Define @property and its attributes.
9199 * c-common.h: Define property attribute enum entries.
9200 (OBJC_IS_PATTR_KEYWORD): New.
9201 (objc_property_attribute_kind): New enum.
9202 Declare objc_set_property_attr (), objc_add_property_variable (),
9203 objc_build_getter_call () and objc_build_setter_call ().
9204 * stub-objc.c (objc_set_property_attr): New stub.
9205 (objc_add_property_variable): Likewise.
9206 (objc_build_getter_call): Likewise.
9207 (objc_build_setter_call) Likewise.
9209 2010-10-13 Iain Sandoe <iains@gcc.gnu.org>
9211 merge from FSF apple 'trunk' branch.
9212 2006-04-26 Fariborz Jahanian <fjahanian@apple.com>
9214 Radar 3803157 (method attributes)
9215 * c-common.c (handle_deprecated_attribute): Recognize
9216 objc methods as valid declarations.
9217 * c-common.h: Declare objc_method_decl ().
9218 * stub-objc.c (objc_method_decl): New stub.
9220 2010-10-08 Joseph Myers <joseph@codesourcery.com>
9222 * c-common.c (parse_optimize_options): Call
9223 decode_cmdline_options_to_array_default_mask before
9224 decode_options. Update arguments to decode_options.
9225 * c-common.h (c_common_init_options_struct): Declare.
9226 * c-opts.c (c_common_init_options_struct): New. Split out from
9227 c_common_init_options.
9229 2010-10-06 Nicola Pero <nicola.pero@meta-innovation.com>
9231 Implemented fast enumeration for Objective-C.
9232 * c-common.h (objc_finish_foreach_loop): New.
9233 * stub-objc.c (objc_finish_foreach_loop): New.
9235 2010-10-05 Joseph Myers <joseph@codesourcery.com>
9237 * c-common.h (struct diagnostic_context): Don't declare here.
9238 (c_common_initialize_diagnostics): Declare using
9239 diagnostic_context typedef.
9240 * c-opts.c (c_common_handle_option): Pass global_dc to
9241 handle_generated_option.
9243 2010-10-04 Joseph Myers <joseph@codesourcery.com>
9245 * c-opts.c (c_common_handle_option): Pass &global_options_set to
9246 handle_generated_option.
9248 2010-10-03 Ian Lance Taylor <iant@google.com>
9250 * c.opt (-fplan9-extensions): New option.
9252 2010-10-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
9254 * c-cppbuiltin.c (define__GNUC__, builtin_define_type_precision):
9256 (c_cpp_builtins): Call functions from cppbuiltin.c instead
9257 of duplicating code.
9259 2010-09-30 Iain Sandoe <iains@gcc.gnu.org>
9261 * c-common.c: Add two new entries for @optional
9262 and @required keywords.
9264 merge from FSF 'apple/trunk' branch.
9265 2006-01-30 Fariborz Jahanian <fjahanian@apple.com>
9268 * c-common.h (RID_AT_OPTIONAL, RID_AT_REQUIRED): Two new
9269 objective-c keywords.
9270 (objc_set_method_opt): New declaration.
9271 * stub-objc.c (objc_set_method_opt): New stub.
9273 2010-09-30 Joseph Myers <joseph@codesourcery.com>
9275 * c-common.c (handle_optimize_attribute): Pass &global_options to
9276 cl_optimization_save and cl_optimization_restore.
9277 * c-opts.c (c_common_handle_option): Pass &global_options to
9278 handle_generated_option.
9279 * c-pragma.c (handle_pragma_diagnostic): Use option_flag_var.
9280 (handle_pragma_pop_options, handle_pragma_reset_options): Pass
9281 &global_options to cl_optimization_restore.
9283 2010-09-30 Nicola Pero <nicola.pero@meta-innovation.com>
9285 * c-lex.c (c_lex_with_flags): Updated comments for CPP_AT_NAME
9286 Objective-C/Objective-C++ keywords.
9288 2010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
9290 Merge from 'apple/trunk' branch on FSF servers.
9292 2005-10-04 Fariborz Jahanian <fjahanian@apple.com>
9295 * c-common.h (objc_check_global_decl): New declaration.
9296 * stub-objc.c (objc_check_global_decl): New stub.
9298 2010-09-29 Joseph Myers <joseph@codesourcery.com>
9300 * c.opt: Don't use VarExists.
9302 2010-09-29 Joseph Myers <joseph@codesourcery.com>
9304 * c-common.c (c_cpp_error): Update names of diagnostic_context
9306 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Update names of
9307 cl_optimization members.
9308 * c-opts.c (warning_as_error_callback, c_common_handle_option,
9309 sanitize_cpp_opts, finish_options): Update names of cpp_options
9312 2010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
9314 * c-common.h (OBJC_IS_CXX_KEYWORD): New macro. Updated comments.
9315 (objc_is_reserved_word): Removed.
9316 * c-common.c: Updated comments.
9317 * c-lex.c (c_lex_with_flags): Use OBJC_IS_CXX_KEYWORD instead of
9318 objc_is_reserved_word.
9319 * stub-objc.c (objc_is_reserved_word): Removed.
9321 2010-09-28 Iain Sandoe <iains@gcc.gnu.org>
9323 * c-common.h (objc_add_method_declaration): Adjust prototype to
9325 (objc_start_method_definition): Likewise.
9326 (objc_build_keyword_decl): Likewise.
9327 * stub-objc.c:(objc_add_method_declaration): Handle attributes.
9328 (objc_start_method_definition): Likewise.
9329 (objc_build_keyword_decl): Likewise.
9331 2010-09-28 Iain Sandoe <iains@gcc.gnu.org>
9333 * c-common.h (objc_start_class_interface): Adjust prototype.
9334 (objc_start_category_interface): Likewise.
9335 (objc_start_protocol): Likewise.
9336 * stub-objc.c (objc_start_protocol): Adjust for extra argument.
9337 (objc_start_class_interface): Likewise.
9338 (objc_start_category_interface): Likewise.
9340 2010-09-27 Ian Lance Taylor <iant@google.com>
9342 * c-common.c (c_common_attribute_table): Add no_split_stack.
9343 (handle_no_split_stack_attribute): New static function.
9345 2010-09-27 Nicola Pero <nicola.pero@meta-innovation.com>
9347 Merge from 'apple/trunk' branch on FSF servers.
9349 2005-12-15 Fariborz Jahanian <fjahanian@apple.com>
9352 * c-common.h (objc_have_common_type): New declaration.
9353 * stub-objc.c (objc_have_common_type): New stub.
9355 2005-06-22 Ziemowit Laski <zlaski@apple.com>
9358 * c-common.h (objc_common_type): New prototype.
9359 * stub-objc.c (objc_common_type): New stub.
9361 2010-09-24 Jan Hubicka <jh@suse.cz>
9363 * c-common.c (handle_leaf_attribute): New function.
9364 (struct attribute_spec c_common_att): Add leaf.
9366 2010-09-22 Joseph Myers <joseph@codesourcery.com>
9368 * c.opt (-all-warnings, -ansi, -assert, -assert=, -comments,
9369 -comments-in-macros, -define-macro, -define-macro=, -dependencies,
9370 -dump, -dump=, -imacros, -imacros=, -include, -include=,
9371 -include-barrier, -include-directory, -include-directory=,
9372 -include-directory-after, -include-directory-after=,
9373 -include-prefix, -include-prefix=, -include-with-prefix,
9374 -include-with-prefix=, -include-with-prefix-after,
9375 -include-with-prefix-after=, -include-with-prefix-before,
9376 -include-with-prefix-before=, -no-integrated-cpp,
9377 -no-line-commands, -no-standard-includes, -no-warnings, -output,
9378 -output=, -pedantic, -pedantic-errors, -preprocess,
9379 -print-missing-file-dependencies, -trace-includes, -traditional,
9380 -traditional-cpp, -trigraphs, -undefine-macro, -undefine-macro=,
9381 -user-dependencies, -verbose, -write-dependencies,
9382 -write-user-dependencies, no-integrated-cpp, traditional): New.
9384 2010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
9387 * c-common.h (objc_start_method_definition): Return bool instead
9389 * stub-objc.c (objc_start_method_definition): Return bool instead
9392 2010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
9395 * c-common.h (objc_get_interface_ivars): New declaration.
9396 * stub-objc.c (objc_get_interface_ivars): New stub.
9398 2010-09-15 Ian Lance Taylor <iant@google.com>
9400 * c-common.c (parse_optimize_options): Do not capitalize warning
9401 messages. Remove period at end of warning message.
9403 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
9405 * c-common.c (handle_alias_ifunc_attribute): New, broken out of ...
9406 (handle_alias_attribute): ... here.
9407 (handle_ifunc_attribute): New.
9409 2010-09-06 Mark Mitchell <mark@codesourcery.com>
9411 * c-common.h (do_warn_double_promotion): Declare.
9412 * c-common.c (do_warn_double_promotion): Define.
9414 2010-09-05 Mark Mitchell <mark@codesourcery.com>
9416 * c.opt (Wdouble-promotion): New.
9418 2010-09-02 Joseph Myers <joseph@codesourcery.com>
9420 * c.opt (falt-external-templates, fhuge-objects, fvtable-gc,
9421 fvtable-thunks, fxref): Mark no longer supported in help text.
9423 2010-09-02 Joseph Myers <joseph@codesourcery.com>
9425 * c.opt (Wimport, fall-virtual, falt-external-templates,
9426 fdefault-inline, fenum-int-equiv, fexternal-templates,
9427 fguiding-decls, fhonor-std, fhuge-objects, flabels-ok,
9428 fname-mangling-version-, fnew-abi, fnonnull-objects,
9429 foptional-diags, fsquangle, fstrict-prototype, fthis-is-variable,
9430 fvtable-gc, fvtable-thunks, fxref): Mark with Ignore and Warn as
9432 (fhandle-exceptions): Mark with Alias and Warn.
9433 * c-opts.c (c_common_handle_option): Don't handle options marked
9436 2010-09-02 Joseph Myers <joseph@codesourcery.com>
9438 * c.opt (Wcomments, Werror-implicit-function-declaration,
9439 ftemplate-depth-, std=c89, std=c9x, std=gnu89, std=gnu9x,
9440 std=iso9899:1990, std=iso9899:1999, std=iso9899:199x): Mark as
9442 * c-common.c (option_codes): Use OPT_Wcomment instead of
9444 * c-opts.c (warning_as_error_callback, c_common_handle_option):
9445 Don't handle options marked as aliases.
9447 2010-08-25 Richard Guenther <rguenther@suse.de>
9449 * c-common.c (c_common_get_alias_set): Remove special
9450 handling for pointers.
9452 2010-08-20 Nathan Froyd <froydnj@codesourcery.com>
9454 * c-common.c: Use FOR_EACH_VEC_ELT.
9455 * c-gimplify.c: Likewise.
9456 * c-pragma.c: Likewise.
9458 2010-08-16 Joseph Myers <joseph@codesourcery.com>
9460 * c.opt (MDX): Change back to MD. Mark NoDriverArg instead of
9462 (MMDX): Change back to MMD. Mark NoDriverArg instead of
9464 * c-opts.c (c_common_handle_option): Use OPT_MD and OPT_MMD
9465 instead of OPT_MDX and OPT_MMDX.
9467 2010-08-16 Joseph Myers <joseph@codesourcery.com>
9469 * c.opt (MDX, MMDX, lang-asm): Mark RejectDriver.
9471 2010-08-12 Joseph Myers <joseph@codesourcery.com>
9473 * c.opt (MD, MMD): Change to MDX and MMDX.
9474 * c-opts.c (c_common_handle_option): Use OPT_MMD and OPT_MMDX.
9476 2010-08-11 Joseph Myers <joseph@codesourcery.com>
9478 * c-opts.c (c_common_handle_option): Call handle_generated_option
9479 instead of handle_option.
9481 2010-08-08 Nathan Froyd <froydnj@codesourcery.com>
9483 * c-pragma.c (add_to_renaming_pragma_list): Fix call to VEC_safe_push.
9484 (maybe_apply_renaming_pragma): Delete unneeded declarations.
9486 2010-08-08 Nathan Froyd <froydnj@codesourcery.com>
9488 * c-pragma.c (pending_redefinition): Declare. Declare a VEC of it.
9489 (pending_redefine_extname): Change type to a VEC.
9490 (add_to_renaming_pragma_list): Update for new type of
9491 pending_redefine_extname.
9492 (maybe_apply_renaming_pragma): Likewise.
9494 2010-08-04 Arnaud Charlet <charlet@adacore.com>
9496 * c-ada-spec.c (dump_ada_template): Mark underlying instance type as
9498 (dump_generic_ada_node): Code clean up. Use TREE_VISITED flag to
9499 decide whether a type has already been declared/seen.
9500 Do not go to the original type.
9501 (dump_nested_types): New parameter forward.
9502 Generate forward declaration if needed and mark type as visited.
9503 (print_ada_declaration): Call dump_nested_types if not already done.
9504 Mark types as visited.
9506 2010-08-03 Joseph Myers <joseph@codesourcery.com>
9508 * c.opt (-print-pch-checksum): Remove option.
9509 * c-opts.c (c_common_handle_option): Don't handle
9510 OPT_print_pch_checksum.
9512 2010-07-27 Joseph Myers <joseph@codesourcery.com>
9514 * c-common.h (c_common_handle_option): Update prototype and return
9516 * c-opts.c (c_common_handle_option): Update prototype and return
9517 value type. Update calls to handle_option and
9518 enable_warning_as_error.
9520 2010-07-27 Jakub Jelinek <jakub@redhat.com>
9523 * c-pretty-print.c (pp_c_expression): Handle C_MAYBE_CONST_EXPR.
9525 2010-07-27 Joseph Myers <joseph@codesourcery.com>
9527 * c-common.h (c_common_missing_argument): Remove.
9528 * c-opts.c (c_common_missing_argument): Remove.
9529 * c.opt (A, D, F, I, MD, MMD, MQ, MT, U, fconstant-string-class=,
9530 idirafter, imacros, include, isysroot, isystem, iquote): Add
9532 * c-objc-common.h (LANG_HOOKS_MISSING_ARGUMENT): Remove.
9534 2010-07-27 Joseph Myers <joseph@codesourcery.com>
9536 * c-common.h (c_common_option_lang_mask,
9537 c_common_initialize_diagnostics, c_common_complain_wrong_lang_p):
9539 (c_common_init_options): Update prototype.
9540 * c-opts.c (c_common_option_lang_mask): New.
9541 (c_common_initialize_diagnostics): Split out of
9542 c_common_init_options.
9543 (accept_all_c_family_options, c_common_complain_wrong_lang_p):
9545 (c_common_init_options): Update prototype. Use decoded options in
9546 search for -lang-asm.
9548 2010-07-15 Nathan Froyd <froydnj@codesourcery.com>
9550 * c-common.c: Carefully replace TREE_CHAIN with DECL_CHAIN.
9551 * c-format.c: Likewise.
9553 2010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
9555 * c-common.h: Include diagnostic-core.h. Error if already
9557 * c-semantics.c: Do not define GCC_DIAG_STYLE here.
9559 2010-07-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
9561 * c-common.c (IN_GCC_FRONTEND): Do not undef.
9562 Do not include expr.h
9563 (vector_mode_valid_p): Move here.
9565 2010-06-21 DJ Delorie <dj@redhat.com>
9567 * c-pragma.c (handle_pragma_diagnostic): Add push/pop,
9568 allow these pragmas anywhere.
9570 2010-06-14 Jakub Jelinek <jakub@redhat.com>
9573 * c-cppbuiltin.c: Include gt-c-family-c-cppbuiltin.h.
9574 (lazy_hex_fp_values, lazy_hex_fp_value_count): Add GTY(()) markers.
9575 (lazy_hex_fp_value, builtin_define_with_hex_fp_value): Use
9576 ggc_strdup instead of xstrdup.
9578 2010-06-10 Jakub Jelinek <jakub@redhat.com>
9580 * c-cppbuiltin.c: Include cpp-id-data.h.
9581 (lazy_hex_fp_values, lazy_hex_fp_value_count): New variables.
9582 (lazy_hex_fp_value): New function.
9583 (builtin_define_with_hex_fp_value): Provide definitions lazily.
9585 2010-06-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
9587 * c-gimplify.c: Do not include tree-flow.h
9589 2010-06-29 Joern Rennecke <joern.rennecke@embecosm.com>
9592 * c-common.c: Rename targetm member:
9593 targetm.enum_va_list -> targetm.enum_va_list_p
9595 2010-06-28 Anatoly Sokolov <aesok@post.ru>
9597 * c-common.c (shorten_compare): Adjust call to force_fit_type_double.
9599 2010-06-28 Steven Bosscher <steven@gcc.gnu.org>
9601 * c-cppbuiltin.c: Do not include except.h.
9603 2010-06-24 Andi Kleen <ak@linux.intel.com>
9605 * c-common.c (warn_for_omitted_condop): New.
9606 * c-common.h (warn_for_omitted_condop): Add prototype.
9608 2010-06-21 Joseph Myers <joseph@codesourcery.com>
9610 * c.opt (lang-objc): Remove.
9611 * c-opts.c (c_common_handle_option): Don't handle OPT_lang_objc.
9613 2010-06-21 Joern Rennecke <joern.rennecke@embecosm.com>
9615 * c-opts.c: Include "tm_p.h".
9617 2010-06-20 Joseph Myers <joseph@codesourcery.com>
9619 * c-common.c (parse_optimize_options): Update call to
9622 2010-06-18 Nathan Froyd <froydnj@codesourcery.com>
9624 * c-common.c (record_types_used_by_current_var_decl): Adjust for
9625 new type of types_used_by_cur_var_decl.
9627 2010-06-17 Joern Rennecke <joern.rennecke@embecosm.com>
9630 * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Add cast
9631 for C++ standard compliance.
9633 2010-06-16 Jason Merrill <jason@redhat.com>
9635 * c.opt: Add -Wnoexcept.
9637 2010-06-16 Richard Guenther <rguenther@suse.de>
9640 * c-common.c (c_common_truthvalue_conversion): Remove
9641 premature and wrong optimization concering ADDR_EXPRs.
9643 2010-06-15 Arnaud Charlet <charlet@adacore.com>
9645 * c-ada-spec.c (dump_sloc): Remove column info.
9646 (is_simple_enum): New function.
9647 (dump_generic_ada_node, print_ada_declaration): Map C enum types to Ada
9648 enum types when relevant.
9650 2010-06-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
9652 * c-common.c (conversion_warning): Warn at expression
9655 2010-06-10 Joseph Myers <joseph@codesourcery.com>
9657 * c-opts.c (c_common_handle_option): Don't handle
9660 2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
9662 * c-pragma.c (push_alignment): Use typed GC allocation.
9663 (handle_pragma_push_options): Likewise.
9665 * c-common.c (parse_optimize_options): Likewise.
9667 * c-common.h (struct sorted_fields_type): Add variable_size GTY
9670 2010-06-07 Joseph Myers <joseph@codesourcery.com>
9672 * c-common.c (flag_preprocess_only, flag_undef, flag_no_builtin,
9673 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
9674 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
9675 flag_signed_bitfields, warn_strict_null_sentinel,
9676 flag_nil_receivers, flag_zero_link, flag_replace_objc_classes,
9677 flag_gen_declaration, flag_no_gnu_keywords,
9678 flag_implement_inlines, flag_implicit_templates,
9679 flag_implicit_inline_templates, flag_optional_diags,
9680 flag_elide_constructors, flag_default_inline, flag_rtti,
9681 flag_conserve_space, flag_access_control, flag_check_new,
9682 flag_new_for_scope, flag_weak, flag_working_directory,
9683 flag_use_cxa_atexit, flag_use_cxa_get_exception_ptr,
9684 flag_enforce_eh_specs, flag_threadsafe_statics,
9685 flag_pretty_templates): Remove.
9686 * c-common.h (flag_preprocess_only, flag_nil_receivers,
9687 flag_objc_exceptions, flag_objc_sjlj_exceptions, flag_zero_link,
9688 flag_replace_objc_classes, flag_undef, flag_no_builtin,
9689 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
9690 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
9691 flag_const_strings, flag_signed_bitfields, flag_gen_declaration,
9692 flag_no_gnu_keywords, flag_implement_inlines,
9693 flag_implicit_templates, flag_implicit_inline_templates,
9694 flag_optional_diags, flag_elide_constructors, flag_default_inline,
9695 flag_rtti, flag_conserve_space, flag_access_control,
9696 flag_check_new, flag_new_for_scope, flag_weak,
9697 flag_working_directory, flag_use_cxa_atexit,
9698 flag_use_cxa_get_exception_ptr, flag_enforce_eh_specs,
9699 flag_threadsafe_statics, flag_pretty_templates,
9700 warn_strict_null_sentinel): Remove.
9701 * c.opt (E, Wstrict-null-sentinel, faccess-control, fasm,
9702 fbuiltin, fcheck-new, fconserve-space, felide-constructors,
9703 fenforce-eh-specs, ffor-scope, fgnu-keywords, fimplement-inlines,
9704 fimplicit-inline-templates, fimplicit-templates,
9705 flax-vector-conversions, fms-extensions, fnil-receivers,
9706 fnonansi-builtins, fpretty-templates, freplace-objc-classes,
9707 frtti, fshort-double, fshort-enums, fshort-wchar,
9708 fsigned-bitfields, fsigned-char, fstats, fthreadsafe-statics,
9709 funsigned-bitfields, funsigned-char, fuse-cxa-atexit,
9710 fuse-cxa-get-exception-ptr, fweak, fworking-directory, fzero-link,
9711 gen-decls, undef): Use Var.
9712 (fdefault-inline, foptional-diags): Document as doing nothing.
9713 * c-opts.c (c_common_handle_option): Remove cases for options now
9714 using Var. Mark ignored options as such.
9716 2010-06-05 Steven Bosscher <steven@gcc.gnu.org>
9718 * c-common.c: Moved to here from parent directory.
9719 * c-common.def: Likewise.
9720 * c-common.h: Likewise.
9721 * c-cppbuiltin.c: Likewise.
9722 * c-dump.c: Likewise.
9723 * c-format.c: Likewise.
9724 * c-format.h : Likewise.
9725 * c-gimplify.c: Likewise.
9726 * c-lex.c: Likewise.
9727 * c-omp.c: Likewise.
9729 * c-opts.c: Likewise.
9730 * c-pch.c: Likewise.
9731 * c-ppoutput.c: Likewise.
9732 * c-pragma.c: Likewise.
9733 * c-pragma.h: Likewise.
9734 * c-pretty-print.c: Likewise.
9735 * c-pretty-print.h: Likewise.
9736 * c-semantics.c: Likewise.
9737 * stub-objc.c: Likewise.
9739 * c-common.c: Include gt-c-family-c-common.h.
9740 * c-pragma.c: Include gt-c-family-c-pragma.h.
9742 Copyright (C) 2010-2019 Free Software Foundation, Inc.
9744 Copying and distribution of this file, with or without modification,
9745 are permitted in any medium without royalty provided the copyright
9746 notice and this notice are preserved.