Daily bump.
[official-gcc.git] / gcc / c-family / ChangeLog
blob88b2058bd8f38437d1ca26021bd471d72104c2fe
1 2024-05-02  Jakub Jelinek  <jakub@redhat.com>
3         PR c++/114458
4         * c-cppbuiltin.cc (c_cpp_builtins): Predefine
5         __cpp_deleted_function=202403L for C++26.
7 2024-04-30  Jakub Jelinek  <jakub@redhat.com>
9         PR c++/114456
10         * c-cppbuiltin.cc (c_cpp_builtins): Predefine
11         __cpp_structured_bindings for C++26 to 202403L rather than
12         201606L.
14 2024-04-23  Jakub Jelinek  <jakub@redhat.com>
16         * c-attribs.cc (handle_objc_nullability_attribute): Spelling fix:
17         recognised -> recognized.
19 2024-04-23  Jakub Jelinek  <jakub@redhat.com>
21         * c.opt (Wstrict-flex-arrays): Spelling fix: inproper -> improper.
23 2024-04-19  Jakub Jelinek  <jakub@redhat.com>
25         PR c/114780
26         * c-common.cc (check_function_sentinel): Allow as sentinel any
27         argument of NULLPTR_TYPE.
29 2024-04-13  Mark Wielaard  <mark@klomp.org>
31         * c.opt.urls: Regenerate.
33 2024-04-12  Jason Merrill  <jason@redhat.com>
34             Patrick Palka  <ppalka@redhat.com>
36         PR c++/113141
37         * c.opt: Add -Wcast-user-defined.
39 2024-04-05  Marek Polacek  <polacek@redhat.com>
41         * c-warn.cc (warn_about_parentheses): Remove an #undef.
43 2024-03-27  Jakub Jelinek  <jakub@redhat.com>
45         PR tree-optimization/114469
46         * c-common.cc (resolve_overloaded_builtin): For _BitInt result
47         on !extended targets convert result to the _BitInt type before
48         using VIEW_CONVERT_EXPR.
50 2024-03-26  Jakub Jelinek  <jakub@redhat.com>
52         PR c++/112724
53         * c-pretty-print.cc (pp_c_cast_expression,
54         c_pretty_printer::expression): Handle EXCESS_PRECISION_EXPR like
55         NOP_EXPR.
57 2024-03-19  Jakub Jelinek  <jakub@redhat.com>
59         PR c/114364
60         * c-omp.cc (enum check_loop_binding_expr_ctx): New type.
61         (check_loop_binding_expr): Remove context argument, add ctx
62         argument with check_loop_binding_expr_ctx type at the end.  Don't
63         create diagnostic message from multiple pieces.
64         (c_omp_check_loop_binding_exprs): Adjust callers.
66 2024-03-08  Jakub Jelinek  <jakub@redhat.com>
68         * c-common.cc (resolve_overloaded_atomic_exchange): Instead of setting
69         p1 to VIEW_CONVERT_EXPR<I_type> (*p1), set it to MEM_REF with p1 and
70         (typeof (p1)) 0 operands and I_type type.
71         (resolve_overloaded_atomic_compare_exchange): Similarly for p2.
73 2024-03-05  Mark Wielaard  <mark@klomp.org>
75         * c.opt.urls: Regenerate.
77 2024-03-05  Patrick Palka  <ppalka@redhat.com>
79         * c.opt (Wglobal-module): New warning.
81 2024-03-04  Mark Wielaard  <mark@klomp.org>
83         * c.opt.urls: Regenerate.
85 2024-02-22  Jakub Jelinek  <jakub@redhat.com>
87         PR c/114007
88         * c-lex.cc (c_common_has_attribute): Parse 2 CPP_COLONs with
89         the first one with COLON_SCOPE flag the same as CPP_SCOPE.
91 2024-02-10  Marek Polacek  <polacek@redhat.com>
93         DR 2237
94         PR c++/107126
95         PR c++/97202
96         * c-opts.cc (c_common_post_options): In C++20 or with -Wc++20-compat,
97         turn on -Wtemplate-id-cdtor.
98         * c.opt (Wtemplate-id-cdtor): New.
100 2024-02-10  Jakub Jelinek  <jakub@redhat.com>
102         * c-format.cc (gcc_diag_length_specs): Add t and z modifiers.
103         (PP_FORMAT_CHAR_TABLE, gcc_gfc_char_table): Add entries for t and
104         z modifiers.
106 2024-02-10  Jakub Jelinek  <jakub@redhat.com>
108         * c-ada-spec.cc (dump_template_types): Use HOST_SIZE_T_PRINT_UNSIGNED
109         and casts to fmt_size_t instead of "%lu" and casts to unsigned long.
111 2024-02-01  Lewis Hyatt  <lhyatt@gmail.com>
113         PR preprocessor/105608
114         * c-pch.cc (c_common_read_pch): Adjust line map so that libcpp
115         assigns a location to restored macros which is the same location
116         that triggered the PCH include.
118 2024-01-31  Marek Polacek  <polacek@redhat.com>
120         * c-opts.cc (c_common_post_options): Add an inform saying that
121         -fconcepts-ts is deprecated and will be removed in GCC 15.
123 2024-01-27  Lewis Hyatt  <lhyatt@gmail.com>
125         PR preprocessor/105608
126         * c-pch.cc (c_common_read_pch): Start a new line map before asking
127         libcpp to restore macros defined prior to reading the PCH, instead
128         of afterward.
130 2024-01-23  Jakub Jelinek  <jakub@redhat.com>
132         PR c/113518
133         * c-common.cc (atomic_bitint_fetch_using_cas_loop): Call c_fully_fold
134         on lhs_addr, val and model for C.
136 2024-01-23  Sandra Loosemore  <sandra@codesourcery.com>
138         * c.opt: Improve sorting of warning options.
140 2024-01-16  Eric Botcazou  <ebotcazou@adacore.com>
142         PR ada/113397
143         * c-ada-spec.cc (check_type_name_conflict): Add guard for the
144         presence of DECL_NAME on a TYPE_DECL.
146 2024-01-11  Julian Brown  <julian@codesourcery.com>
148         * c-pretty-print.cc (c_pretty_printer::postfix_expression,
149         c_pretty_printer::expression): Add OMP_ARRAY_SECTION support.
151 2024-01-09  waffl3x  <waffl3x@protonmail.com>
153         PR c++/102609
154         PR c++/102609
155         C++23 P0847R7 (deducing this) - diagnostics.
156         * c-cppbuiltin.cc (c_cpp_builtins): Define
157         __cpp_explicit_this_parameter=202110L feature test macro.
159 2024-01-09  Jakub Jelinek  <jakub@redhat.com>
161         PR c/113262
162         * c-attribs.cc (handle_copy_attribute): Don't use
163         DECL_SOURCE_LOCATION (decl) if decl is not DECL_P, use input_location
164         instead.  Formatting fixes.
166 2024-01-09  Julian Brown  <julian@codesourcery.com>
168         * c-common.h (c_omp_address_inspector): Remove static from get_origin
169         and maybe_unconvert_ref methods.
170         * c-omp.cc (c_omp_split_clauses): Support OMP_ARRAY_SECTION.
171         (c_omp_address_inspector::map_supported_p): Handle OMP_ARRAY_SECTION.
172         (c_omp_address_inspector::get_origin): Avoid dereferencing possibly
173         NULL type when processing template decls.
174         (c_omp_address_inspector::maybe_unconvert_ref): Likewise.
176 2024-01-04  David Malcolm  <dmalcolm@redhat.com>
178         * c.opt.urls: New file, autogenerated by regenerate-opt-urls.py.
180 2023-12-21  Jakub Jelinek  <jakub@redhat.com>
182         * c.opt (Walloc-size): Enable also for C++ and ObjC++.
184 2023-12-21  Jakub Jelinek  <jakub@redhat.com>
186         PR sanitizer/113092
187         * c-ubsan.cc (ubsan_instrument_shift): Workaround for missing
188         ubsan _BitInt support for the shift count.
190 2023-12-20  Florian Weimer  <fweimer@redhat.com>
192         PR c/113050
193         * c-common.cc (get_atomic_generic_size): Use
194         OPT_Wdiscarded_qualifiers instead of
195         OPT_Wincompatible_pointer_types.
197 2023-12-20  Jakub Jelinek  <jakub@redhat.com>
199         * c.opt (Wcalloc-transposed-args): New warning.
200         * c-common.h (warn_for_calloc, warn_for_alloc_size): Declare.
201         * c-warn.cc (warn_for_calloc, warn_for_alloc_size): New functions.
203 2023-12-16  Andrew Carlotti  <andrew.carlotti@arm.com>
205         * c-attribs.cc (attr_target_exclusions): Make
206         target/target_clones exclusion target-dependent.
207         (attr_target_clones_exclusions): Ditto, and add target_version.
208         (attr_target_version_exclusions): New.
209         (c_common_attribute_table): Add target_version.
210         (handle_target_version_attribute): New.
211         (handle_target_attribute): Amend comment.
212         (handle_target_clones_attribute): Ditto.
214 2023-12-16  Andrew Carlotti  <andrew.carlotti@arm.com>
216         * c-attribs.cc (attr_always_inline_exclusions): New.
217         (attr_target_exclusions): Ditto.
218         (attr_target_clones_exclusions): Ditto.
219         (c_common_attribute_table): Add new exclusion lists.
220         (handle_noinline_attribute): Remove custom exclusion handling.
221         (handle_always_inline_attribute): Ditto.
222         (handle_target_attribute): Ditto.
223         (handle_target_clones_attribute): Ditto.
225 2023-12-13  Patrick Palka  <ppalka@redhat.com>
227         * c.opt: Add -fdiagnostics-all-candidates.
229 2023-12-13  Jason Merrill  <jason@redhat.com>
231         * c-warn.cc (check_address_or_pointer_of_packed_member):
232         Rename to check_address_of_packed_member.
233         (check_and_warn_address_or_pointer_of_packed_member):
234         Rename to check_and_warn_address_of_packed_member.
235         (warn_for_address_or_pointer_of_packed_member):
236         Rename to warn_for_address_of_packed_member.
237         * c-common.h: Adjust.
239 2023-12-13  Jason Merrill  <jason@redhat.com>
241         * c-warn.cc (check_address_or_pointer_of_packed_member):
242         Remove warning based on TYPE_PACKED.
244 2023-12-13  Julian Brown  <julian@codesourcery.com>
246         * c-common.h (c_omp_region_type): Add C_ORT_EXIT_DATA,
247         C_ORT_OMP_EXIT_DATA and C_ORT_ACC_TARGET.
248         (omp_addr_token): Add forward declaration.
249         (c_omp_address_inspector): New class.
250         * c-omp.cc (c_omp_adjust_map_clauses): Mark decls addressable here, but
251         do not change any mapping node types.
252         (c_omp_address_inspector::unconverted_ref_origin,
253         c_omp_address_inspector::component_access_p,
254         c_omp_address_inspector::check_clause,
255         c_omp_address_inspector::get_root_term,
256         c_omp_address_inspector::map_supported_p,
257         c_omp_address_inspector::get_origin,
258         c_omp_address_inspector::maybe_unconvert_ref,
259         c_omp_address_inspector::maybe_zero_length_array_section,
260         c_omp_address_inspector::expand_array_base,
261         c_omp_address_inspector::expand_component_selector,
262         c_omp_address_inspector::expand_map_clause): New methods.
263         (omp_expand_access_chain): New function.
265 2023-12-12  Richard Biener  <rguenther@suse.de>
267         PR ipa/92606
268         * c-attribs.cc (handle_noicf_attribute): Also allow the
269         attribute on global variables.
271 2023-12-10  Ken Matsui  <kmatsui@gcc.gnu.org>
272             Patrick Palka  <ppalka@redhat.com>
274         * c-common.cc (c_common_reswords): Remove all mappings of
275         built-in traits.
276         * c-common.h (enum rid): Remove all RID values for built-in
277         traits.
279 2023-12-07  Andrew Pinski  <pinskia@gmail.com>
280             Jakub Jelinek  <jakub@redhat.com>
282         PR preprocessor/111965
283         * c-opts.cc (c_common_handle_option) <case OPT_fdebug_cpp>: Set
284         cpp_opts->debug to value rather than 1.
286 2023-12-06  David Malcolm  <dmalcolm@redhat.com>
288         * c-opts.cc (c_diagnostic_finalizer): Make "diagnostic" param
289         const.
291 2023-12-06  Alexandre Oliva  <oliva@adacore.com>
293         * c-attribs.cc: Include ipa-strub.h.
294         (handle_strub_attribute): New.
295         (c_common_attribute_table): Add strub.
297 2023-12-05  Richard Sandiford  <richard.sandiford@arm.com>
299         * c-attribs.cc (c_common_gnu_attribute_table): Add extra
300         braces to work around PR 16333 in older compilers.
302 2023-12-05  Richard Biener  <rguenther@suse.de>
304         PR c/89270
305         * c-common.cc (c_common_type_for_size): Consider
306         registered_builtin_types.
308 2023-12-05  Marek Polacek  <polacek@redhat.com>
310         PR c++/107687
311         PR c++/110997
312         * c-cppbuiltin.cc (c_cpp_builtins): Update __cpp_consteval.
313         * c-opts.cc (c_common_post_options): Pre-C++20, unset
314         flag_immediate_escalation.
315         * c.opt (fimmediate-escalation): New option.
317 2023-12-02  Richard Sandiford  <richard.sandiford@arm.com>
319         * c-common.h (c_common_attribute_table): Replace with...
320         (c_common_gnu_attribute_table): ...this.
321         (c_common_format_attribute_table): Change type to
322         scoped_attribute_specs.
323         * c-attribs.cc (c_common_attribute_table): Replace with...
324         (c_common_gnu_attributes, c_common_gnu_attribute_table): ...these
325         new globals.
326         (c_common_format_attribute_table): Change type to
327         scoped_attribute_specs, using...
328         (c_common_format_attributes): ...this as the underlying array.
330 2023-12-01  Florian Weimer  <fweimer@redhat.com>
332         * c.opt (Wdeclaration-missing-parameter-type): New.
334 2023-11-30  Jakub Jelinek  <jakub@redhat.com>
336         PR c++/110349
337         * c-cppbuiltin.cc (c_cpp_builtins): Predefine
338         __cpp_placeholder_variables=202306L for C++26.
340 2023-11-29  Alexandre Oliva  <oliva@adacore.com>
342         * c-attribs.cc (c_common_attribute_table): Add hardbool.
343         (handle_hardbool_attribute): New.
344         (type_valid_for_vector_size): Reject hardbool.
345         * c-common.cc (convert_and_check): Skip warnings for convert
346         and check for hardbool.
347         (c_hardbool_type_attr_1): New.
348         * c-common.h (c_hardbool_type_attr): New.
350 2023-11-27  Alex Coplan  <alex.coplan@arm.com>
351             Iain Sandoe  <iain@sandoe.co.uk>
353         PR c++/60512
354         * c-common.cc (struct hf_feature_info): New.
355         (c_common_register_feature): New.
356         (init_has_feature): New.
357         (has_feature_p): New.
358         * c-common.h (c_common_has_feature): New.
359         (c_family_register_lang_features): New.
360         (c_common_register_feature): New.
361         (has_feature_p): New.
362         * c-lex.cc (init_c_lex): Plumb through has_feature callback.
363         (c_common_has_builtin): Generalize and move common part ...
364         (c_common_lex_availability_macro): ... here.
365         (c_common_has_feature): New.
366         * c-ppoutput.cc (init_pp_output): Plumb through has_feature.
368 2023-11-24  Lewis Hyatt  <lhyatt@gmail.com>
370         PR pch/112319
371         * c-ppoutput.cc (cb_read_pch): Reinitialize the frontend parser
372         after loading a PCH.
374 2023-11-24  Tobias Burnus  <tobias@codesourcery.com>
376         * c.opt (-Wopenmp): Add missing tailing '.'.
378 2023-11-24  Tobias Burnus  <tobias@codesourcery.com>
380         * c.opt (Wopenmp): Add, enable by default.
382 2023-11-23  Marek Polacek  <polacek@redhat.com>
384         * c-opts.cc: Include "target.h".
385         (c_finish_options): Maybe cpp_define _FORTIFY_SOURCE
386         and _GLIBCXX_ASSERTIONS.
388 2023-11-23  Jakub Jelinek  <jakub@redhat.com>
390         * c-common.h (enum rid): Add RID_BUILTIN_STDC: New.
391         * c-common.cc (c_common_reswords): Add __builtin_stdc_bit_ceil,
392         __builtin_stdc_bit_floor, __builtin_stdc_bit_width,
393         __builtin_stdc_count_ones, __builtin_stdc_count_zeros,
394         __builtin_stdc_first_leading_one, __builtin_stdc_first_leading_zero,
395         __builtin_stdc_first_trailing_one, __builtin_stdc_first_trailing_zero,
396         __builtin_stdc_has_single_bit, __builtin_stdc_leading_ones,
397         __builtin_stdc_leading_zeros, __builtin_stdc_trailing_ones and
398         __builtin_stdc_trailing_zeros.  Move __builtin_assoc_barrier
399         alphabetically earlier.
401 2023-11-23  Jakub Jelinek  <jakub@redhat.com>
403         PR c++/110348
404         * c.opt (Wc++26-extensions): New option.
405         * c-cppbuiltin.cc (c_cpp_builtins): For C++26 predefine
406         __cpp_static_assert to 202306L rather than 201411L.
408 2023-11-19  David Malcolm  <dmalcolm@redhat.com>
410         * c-lex.cc: Include "rich-location.h".
412 2023-11-18  Sebastian Huber  <sebastian.huber@embedded-brains.de>
414         * c-cppbuiltin.cc (c_cpp_builtins):  Define
415         __LIBGCC_HAVE_LIBATOMIC for libgcov.
417 2023-11-18  Sebastian Huber  <sebastian.huber@embedded-brains.de>
419         Revert:
420         2021-08-16  Sebastian Huber  <sebastian.huber@embedded-brains.de>
422         * c-cppbuiltin.c (c_cpp_builtins): Define
423         __LIBGCC_GCOV_TYPE_SIZE if flag_building_libgcc is true.
425 2023-11-17  Jakub Jelinek  <jakub@redhat.com>
427         PR c++/107571
428         * c-gimplify.cc (genericize_c_loop): For C++ mark IFN_FALLTHROUGH
429         call at the end of loop body as TREE_NOTHROW.
431 2023-11-14  Lewis Hyatt  <lhyatt@gmail.com>
433         PR pch/9471
434         PR pch/47857
435         * c-opts.cc (c_common_post_options): Set cpp_opts->main_search
436         so libcpp knows it is compiling a header file separately.
438 2023-11-14  David Malcolm  <dmalcolm@redhat.com>
440         * c-warn.cc (conversion_warning): Update call to
441         global_dc->m_option_enabled to use option_enabled_p.
443 2023-11-14  David Malcolm  <dmalcolm@redhat.com>
445         * c-common.cc (c_get_substring_location): Use global_dc's
446         file_cache.
447         * c-format.cc (get_corrected_substring): Likewise.
448         * c-indentation.cc (get_visual_column): Add file_cache param.
449         (get_first_nws_vis_column): Likewise.
450         (detect_intervening_unindent): Likewise.
451         (should_warn_for_misleading_indentation): Use global_dc's
452         file_cache.
453         (assert_get_visual_column_succeeds): Add file_cache param.
454         (ASSERT_GET_VISUAL_COLUMN_SUCCEEDS): Likewise.
455         (assert_get_visual_column_fails): Likewise.
456         (define ASSERT_GET_VISUAL_COLUMN_FAILS): Likewise.
457         (selftest::test_get_visual_column): Create and use a temporary
458         file_cache.
460 2023-11-14  Jakub Jelinek  <jakub@redhat.com>
462         PR c/111309
463         * c-common.cc (check_builtin_function_arguments): Handle
464         BUILT_IN_{CLZ,CTZ,CLRSB,FFS,PARITY,POPCOUNT}G.
465         * c-gimplify.cc (c_gimplify_expr): If __builtin_c[lt]zg second
466         argument hasn't been folded into constant yet, transform it to one
467         argument call inside of a COND_EXPR which for first argument 0
468         returns the second argument.
470 2023-11-11  Martin Uecker  <uecker@tugraz.at>
472         PR c/110815
473         PR c/112428
474         * c-attribs.cc (build_attr_access_from_parms): Synthesize
475         nonnull attribute for parameters declared with `static`.
477 2023-11-09  Florian Weimer  <fweimer@redhat.com>
479         * c.opt (Wreturn-mismatch): New.
481 2023-11-08  Florian Weimer  <fweimer@redhat.com>
483         * c.opt (fpermissive): Enable for C and ObjC.
484         * c-opts.cc (c_common_post_options): Enable -fpermissive.
486 2023-11-07  Joseph Myers  <joseph@codesourcery.com>
488         * c-format.h (T2X_UI): Rename to T23_UI.
489         (T2X_UL): Rename to T23_UL.
490         (T2X_ULL): Rename to T23_ULL.
491         (T2X_US): Rename to T23_US.
492         (T2X_UC): Rename to T23_UC.
493         (T2X_ST): Rename to T23_ST.
494         (T2X_UPD): Rename to T23_UPD.
495         (T2X_UIM): Rename to T23_UIM.
496         (T2X_D32): Rename to T23_D32.
497         (T2X_D64): Rename to T23_D64.
498         (T2X_D128): Rename to T23_D128.
499         (T2X_I8): Rename to T23_I8.
500         (T2X_I16): Rename to T23_I16.
501         (T2X_I32): Rename to T23_I32.
502         (T2X_I64): Rename to T23_I64.
503         (T2X_U8): Rename to T23_U8.
504         (T2X_U16): Rename to T23_U16.
505         (T2X_U32): Rename to T23_U32.
506         (T2X_U64): Rename to T23_U64.
507         (T2X_IF8): Rename to T23_IF8.
508         (T2X_IF16): Rename to T23_IF16.
509         (T2X_IF32): Rename to T23_IF32.
510         (T2X_IF64): Rename to T23_IF64.
511         (T2X_UF8): Rename to T23_UF8.
512         (T2X_UF16): Rename to T23_UF16.
513         (T2X_UF32): Rename to T23_UF32.
514         (T2X_UF64): Rename to T23_UF64.
515         * c-format.cc: Update all uses of T2X_* macros to use T23_*.
517 2023-11-07  Kwok Cheung Yeung  <kcy@codesourcery.com>
519         * c-attribs.cc (c_common_attribute_table): Add attribute for
520         indirect functions.
521         * c-pragma.h (enum parma_omp_clause): Add entry for indirect clause.
523 2023-11-07  Joseph Myers  <joseph@codesourcery.com>
525         * c-common.cc (flag_isoc2x): Rename to flag_isoc23.
526         (c_common_reswords): Use D_C23 instead of D_C2X.
527         * c-common.h: Refer throughout to C23 instead of C2X in comments.
528         (D_C2X): Rename to D_C23.
529         (flag_isoc2x): Rename to flag_isoc23.
530         * c-cppbuiltin.cc (builtin_define_float_constants): Use
531         flag_isoc23 instead of flag_isoc2x.  Refer to C23 instead of C2x
532         in comments.
533         * c-format.cc: Use STD_C23 instead of STD_C2X and flag_isoc23
534         instead of flag_isoc2x.  Refer to C23 instead of C2X in comments.
535         * c-format.h: Use STD_C23 instead of STD_C2X.
536         * c-lex.cc: Use warn_c11_c23_compat instead of warn_c11_c2x_compat
537         and flag_isoc23 instead of flag_isoc2x.  Refer to C23 instead of
538         C2X in diagnostics.
539         * c-opts.cc: Use flag_isoc23 instead of flag_isoc2x.  Refer to C23
540         instead of C2X in comments.
541         (set_std_c2x): Rename to set_std_c23.
542         * c.opt (Wc11-c23-compat): Use CPP(cpp_warn_c11_c23_compat)
543         CppReason(CPP_W_C11_C23_COMPAT) Var(warn_c11_c23_compat) instead
544         of CPP(cpp_warn_c11_c2x_compat) CppReason(CPP_W_C11_C2X_COMPAT)
545         Var(warn_c11_c2x_compat).
547 2023-11-06  Joseph Myers  <joseph@codesourcery.com>
549         PR c/107954
550         * c.opt (Wc11-c2x-compat): Rename to Wc11-c23-compat and make into
551         a deprecated alias of Wc11-c23-compat.
552         (std=c2x): Rename to std=c23 and make into a deprecated alias of
553         std=c23.
554         (std=gnu2x): Rename to std=gnu23 and make into a deprecated alias
555         of std=gnu23.
556         (std=iso9899:2024): New option.  Alias of std=c23.
557         * c-lex.cc (interpret_float): Use OPT_Wc11_c23_compat instead of
558         OPT_Wc11_c2x_compat.
559         * c-opts.cc (c_common_handle_option): Use OPT_std_c23 instead of
560         OPT_std_c2x and OPT_std_gnu23 instead of OPT_std_gnu2x.
562 2023-11-05  Jakub Jelinek  <jakub@redhat.com>
564         * c-lex.cc (c_common_has_attribute): Return 1 for omp::directive
565         and omp::sequence with -fopenmp or -fopenmp-simd also for C, not
566         just for C++.  Return 1 for omp::decl with -fopenmp or -fopenmp-simd
567         for both C and C++.
569 2023-11-04  David Malcolm  <dmalcolm@redhat.com>
571         * c-pragma.cc:: (handle_pragma_push_options): Fix missing "GCC" in
572         name of pragma in "junk" message.
573         (handle_pragma_pop_options): Likewise.
575 2023-11-04  David Malcolm  <dmalcolm@redhat.com>
577         * c-common.cc: Update for changes to diagnostic_context.
578         * c-indentation.cc: Likewise.
579         * c-opts.cc: Likewise.
580         * c-warn.cc: Likewise.
582 2023-11-01  Martin Uecker  <uecker@tugraz.at>
584         PR c/71219
585         * c.opt (Walloc-size): New option.
587 2023-10-31  David Malcolm  <dmalcolm@redhat.com>
589         * c-warn.cc (warn_for_multistatement_macros): Update for removal
590         of MACRO_MAP_EXPANSION_POINT_LOCATION.
592 2023-10-27  Lewis Hyatt  <lhyatt@gmail.com>
594         PR preprocessor/87299
595         * c-pragma.cc (init_pragma): Register `#pragma GCC target' and
596         related pragmas in preprocess-only mode, and enable early handling.
597         (c_reset_target_pragmas): New function refactoring code from...
598         (handle_pragma_reset_options): ...here.
599         * c-pragma.h (c_reset_target_pragmas): Declare.
601 2023-10-26  David Malcolm  <dmalcolm@redhat.com>
603         * c-attribs.cc (c_common_attribute_table): Add
604         "null_terminated_string_arg".
605         (handle_null_terminated_string_arg_attribute): New.
607 2023-10-23  Lewis Hyatt  <lhyatt@gmail.com>
609         PR preprocessor/36887
610         * c-opts.cc (c_common_init_options): Pass new extra hash map
611         argument to cpp_create_reader().
613 2023-10-20  Marek Polacek  <polacek@redhat.com>
615         PR c/111884
616         * c-common.cc (c_common_get_alias_set): Return -1 for char8_t only
617         in C++.
619 2023-10-20  Patrick Palka  <ppalka@redhat.com>
621         * c-warn.cc (check_address_or_pointer_of_packed_member): Handle
622         type-dependent callee of CALL_EXPR.
624 2023-10-20  Alexandre Oliva  <oliva@adacore.com>
626         * c-attribs.cc (handle_expected_throw_attribute): New.
627         (c_common_attribute_table): Add expected_throw.
629 2023-10-19  Lewis Hyatt  <lhyatt@gmail.com>
631         PR c++/89038
632         * c-pragma.cc (handle_pragma_diagnostic_impl):  Handle
633         -Wunknown-pragmas during early processing.
635 2023-10-15  Jakub Jelinek  <jakub@redhat.com>
637         PR tree-optimization/111800
638         * c-warn.cc (match_case_to_enum_1): Assert w.get_precision ()
639         is smaller or equal to WIDE_INT_MAX_INL_PRECISION rather than
640         w.get_len () is smaller or equal to WIDE_INT_MAX_INL_ELTS.
642 2023-10-12  Jakub Jelinek  <jakub@redhat.com>
644         PR c/102989
645         * c-warn.cc (match_case_to_enum_1): Use wi::to_wide just once instead
646         of 3 times, assert get_len () is smaller than WIDE_INT_MAX_INL_ELTS.
648 2023-10-02  David Malcolm  <dmalcolm@redhat.com>
650         * c-common.cc (maybe_add_include_fixit): Update for renaming of
651         diagnostic_context's show_caret to m_source_printing.enabled.
652         * c-opts.cc (c_common_init_options): Update for renaming of
653         diagnostic_context's colorize_source_p to
654         m_source_printing.colorize_source_p.
656 2023-09-20  Jakub Jelinek  <jakub@redhat.com>
658         PR c++/111392
659         * c-omp.cc (c_omp_directives): Add commented out groupprivate
660         directive entry.
662 2023-09-19  Ben Boeckel  <ben.boeckel@kitware.com>
664         * c-opts.cc (c_common_handle_option): Add fdeps_file variable and
665         -fdeps-format=, -fdeps-file=, and -fdeps-target= parsing.
666         * c.opt: Add -fdeps-format=, -fdeps-file=, and -fdeps-target=
667         flags.
669 2023-09-19  Javier Martinez  <javier.martinez.bugzilla@gmail.com>
671         * c-attribs.cc (handle_hot_attribute): remove warning on
672         RECORD_TYPE and UNION_TYPE when in c_dialect_xx.
673         (handle_cold_attribute): Likewise.
675 2023-09-19  Jakub Jelinek  <jakub@redhat.com>
677         * c-common.cc (c_common_signed_or_unsigned_type): Return INTEGER_TYPE
678         for signed variant of unsigned _BitInt(1).
680 2023-09-06  Jakub Jelinek  <jakub@redhat.com>
682         PR c/102989
683         * c-attribs.cc (type_valid_for_vector_size): Reject vector types
684         with BITINT_TYPE elements even if they have mode precision and
685         suitable size.
687 2023-09-06  Jakub Jelinek  <jakub@redhat.com>
689         PR c/102989
690         * c-common.cc (c_common_reswords): Add _BitInt as keyword.
691         (unsafe_conversion_p): Handle BITINT_TYPE like INTEGER_TYPE.
692         (c_common_signed_or_unsigned_type): Handle BITINT_TYPE.
693         (c_common_truthvalue_conversion, c_common_get_alias_set,
694         check_builtin_function_arguments): Handle BITINT_TYPE like
695         INTEGER_TYPE.
696         (sync_resolve_size): Add ORIG_FORMAT argument.  If
697         FETCH && !ORIG_FORMAT, type is BITINT_TYPE, return -1 if size isn't
698         one of 1, 2, 4, 8 or 16 or if it is 16 but TImode is not supported.
699         (atomic_bitint_fetch_using_cas_loop): New function.
700         (resolve_overloaded_builtin): Adjust sync_resolve_size caller.  If
701         -1 is returned, use atomic_bitint_fetch_using_cas_loop to lower it.
702         Formatting fix.
703         (keyword_begins_type_specifier): Handle RID_BITINT.
704         * c-common.h (enum rid): Add RID_BITINT enumerator.
705         * c-cppbuiltin.cc (c_cpp_builtins): For C call
706         targetm.c.bitint_type_info and predefine __BITINT_MAXWIDTH__
707         and for -fbuilding-libgcc also __LIBGCC_BITINT_LIMB_WIDTH__ and
708         __LIBGCC_BITINT_ORDER__ macros if _BitInt is supported.
709         * c-lex.cc (interpret_integer): Handle CPP_N_BITINT.
710         * c-pretty-print.cc (c_pretty_printer::simple_type_specifier,
711         c_pretty_printer::direct_abstract_declarator,
712         c_pretty_printer::direct_declarator, c_pretty_printer::declarator):
713         Handle BITINT_TYPE.
714         (pp_c_integer_constant): Handle printing of large precision wide_ints
715         which would buffer overflow digit_buffer.
716         * c-warn.cc (conversion_warning, warnings_for_convert_and_check,
717         warnings_for_convert_and_check): Handle BITINT_TYPE like
718         INTEGER_TYPE.
720 2023-09-06  Jakub Jelinek  <jakub@redhat.com>
722         PR c/102989
723         * c-ubsan.cc (ubsan_instrument_shift): Use UBSAN_PRINT_FORCE_INT
724         for type0 type descriptor.
726 2023-09-06  Jakub Jelinek  <jakub@redhat.com>
728         * c-lex.cc (interpret_float): For C diagnostics on FN and FNx suffixes
729         append " before C2X" to diagnostics text and follow behavior of
730         pedwarn_c11.
732 2023-09-01  Jakub Jelinek  <jakub@redhat.com>
734         PR c++/111069
735         * c-opts.cc (c_common_post_options): Change latest_abi_version to 19.
737 2023-08-31  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
739         * c.opt: Change spelling to macOS.
741 2023-08-31  Richard Biener  <rguenther@suse.de>
743         PR middle-end/111253
744         * c-pretty-print.cc (c_pretty_printer::primary_expression):
745         Only dump gimple_assign_single_p SSA def RHS.
747 2023-08-25  Sandra Loosemore  <sandra@codesourcery.com>
749         * c-common.h (c_omp_check_loop_binding_exprs): Declare.
750         * c-omp.cc: Include tree-iterator.h.
751         (find_binding_in_body): New.
752         (check_loop_binding_expr_r): New.
753         (LOCATION_OR): New.
754         (check_looop_binding_expr): New.
755         (c_omp_check_loop_binding_exprs): New.
757 2023-08-25  Uros Bizjak  <ubizjak@gmail.com>
759         * c-format.cc (read_any_format_width):
760         Rename TRUE/FALSE to true/false.
762 2023-08-20  Martin Uecker  <uecker@tugraz.at>
764         * c-format.cc: Fix identation.
766 2023-08-20  Tomas Kalibera  <tomas.kalibera@gmail.com>
768         PR c/95130
769         * c-format.cc: skip default format for printf symbol if
770         explicitly declared by prototype.
772 2023-08-17  Jose E. Marchesi  <jose.marchesi@oracle.com>
774         PR c/106537
775         * c.opt (Wcompare-distinct-pointer-types): New option.
777 2023-08-14  Jason Merrill  <jason@redhat.com>
779         * c-cppbuiltin.cc (c_cpp_builtins): Adjust __cpp_concepts.
781 2023-08-11  Jakub Jelinek  <jakub@redhat.com>
783         * c-common.cc (c_common_reswords): Add __typeof_unqual
784         and __typeof_unqual__ spellings of typeof_unqual.
786 2023-08-11  Martin Uecker  <uecker@tugraz.at>
788         PR c/84510
789         * c.opt: Enable warning for C and ObjC.
791 2023-08-05  Martin Uecker  <uecker@tugraz.at>
793         PR c/98536
794         * c-warn.cc (warn_parm_array_mismatch): Do not warn if more
795         bounds are specified.
797 2023-08-04  Tamar Christina  <tamar.christina@arm.com>
799         * c-pragma.h (enum pragma_kind): Add PRAGMA_NOVECTOR.
800         * c-pragma.cc (init_pragma): Use it.
802 2023-08-01  Lewis Hyatt  <lhyatt@gmail.com>
804         * c-common.h (c_init_preprocess): Declare new function.
805         * c-opts.cc (c_common_init): Call it.
806         * c-lex.cc (cb_def_pragma): Add a comment.
807         (get_token): New function wrapping cpp_get_token.
808         (c_lex_with_flags): Use the new wrapper function to support
809         obtaining tokens in preprocess_only mode.
810         (lex_string): Likewise.
811         * c-pragma.cc (pragma_diagnostic_lex_normal): Rename to...
812         (pragma_diagnostic_lex): ...this.
813         (pragma_diagnostic_lex_pp): Remove.
814         (handle_pragma_diagnostic_impl): Call pragma_diagnostic_lex () in
815         all modes.
816         (c_pp_invoke_early_pragma_handler): Adapt to support pragma_lex ()
817         usage.
818         * c-pragma.h (pragma_lex_discard_to_eol): Declare.
820 2023-07-31  Hamza Mahfooz  <someguy@effective-light.com>
822         PR c/65213
823         * c.opt (-Wmissing-variable-declarations): New option.
825 2023-07-20  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
827         PR middle-end/77928
828         * c-common.cc (check_builtin_function_arguments):
829         Handle BUILT_IN_ISEQSIG.
831 2023-07-05  Robin Dapp  <rdapp@ventanamicro.com>
832             Juzhe-Zhong  <juzhe.zhong@rivai.ai>
834         * c-common.cc (c_common_type_for_mode): Use GET_MODE_PRECISION.
836 2023-06-29  Qing Zhao  <qing.zhao@oracle.com>
838         PR c/77650
839         * c.opt: New option -Wflex-array-member-not-at-end.
841 2023-06-28  Jason Merrill  <jason@redhat.com>
843         PR c++/110344
844         * c-cppbuiltin.cc (c_cpp_builtins): Update __cpp_constexpr.
846 2023-06-26  Richard Biener  <rguenther@suse.de>
848         * c-common.cc (shorten_binary_op): Exit early for VECTOR_TYPE
849         operations.
851 2023-06-23  Marek Polacek  <polacek@redhat.com>
853         * c-common.h (cxx_dialect): Add cxx26 as a dialect.
854         * c-opts.cc (set_std_cxx26): New.
855         (c_common_handle_option): Set options when -std={c,gnu}++2{c,6} is
856         enabled.
857         (c_common_post_options): Adjust comments.
858         * c.opt: Add options for -std=c++26, std=c++2c, -std=gnu++26,
859         and -std=gnu++2c.
860         (std=c++2b): Mark as Undocumented.
861         (std=c++23): No longer Undocumented.
863 2023-06-21  Alexander Monakov  <amonakov@ispras.ru>
865         * c-gimplify.cc (fma_supported_p): New helper.
866         (c_gimplify_expr) [PLUS_EXPR, MINUS_EXPR]: Implement FMA
867         contraction.
869 2023-06-16  Alex Coplan  <alex.coplan@arm.com>
871         * c.opt (Welaborated-enum-base): New.
873 2023-06-13  David Malcolm  <dmalcolm@redhat.com>
875         PR c/84890
876         * known-headers.cc
877         (suggest_missing_header::~suggest_missing_header): Reword note to
878         avoid negative tone of "forgetting".
880 2023-06-07  Jason Merrill  <jason@redhat.com>
882         PR c++/58487
883         * c.opt: Add -Wnrvo.
885 2023-05-26  Martin Uecker  <uecker@tugraz.at>
887         * c-attribs.cc (build_attr_access_from_parms): Split loop to first
888         record all parameters.
890 2023-05-18  Bernhard Reutner-Fischer  <aldot@gcc.gnu.org>
892         * c-ada-spec.cc (has_static_fields): Use _P() defines from tree.h.
893         (dump_ada_declaration): Ditto.
894         (dump_ada_structure): Ditto.
895         * c-common.cc (unsafe_conversion_p): Ditto.
896         (shorten_compare): Ditto.
897         (pointer_int_sum): Ditto.
898         (c_common_truthvalue_conversion): Ditto.
899         (scalar_to_vector): Ditto.
900         * c-common.h (gnu_vector_type_p): Ditto.
901         * c-omp.cc (c_omp_depend_t_p): Ditto.
902         (c_omp_split_clauses): Ditto.
903         * c-ubsan.cc (ubsan_instrument_division): Ditto.
904         * c-warn.cc (conversion_warning): Ditto.
905         (warnings_for_convert_and_check): Ditto.
907 2023-05-18  Joseph Myers  <joseph@codesourcery.com>
909         * c-format.cc (print_char_table): Handle %B like %b.
911 2023-05-15  Joseph Myers  <joseph@codesourcery.com>
913         * c-lex.cc (c_common_has_attribute): Use 202311 as
914         __has_c_attribute return for all C2x attributes.
916 2023-05-15  Patrick Palka  <ppalka@redhat.com>
918         * c-cppbuiltin.cc (c_cpp_builtins): Predefine __cpp_auto_cast
919         for C++23.
921 2023-05-01  Marek Polacek  <polacek@redhat.com>
923         * c-ubsan.cc (ubsan_maybe_instrument_array_ref): Don't copy_node.
925 2023-03-28  David Malcolm  <dmalcolm@redhat.com>
927         PR c/107002
928         * c-common.h (check_for_xor_used_as_pow): Add "rhs_loc" param.
929         * c-warn.cc (check_for_xor_used_as_pow): Add "rhs_loc" param.
930         Reject cases where involving macro expansions.
932 2023-03-28  Jason Merrill  <jason@redhat.com>
934         PR c++/107163
935         * c-common.cc (verify_tree): Don't use sequenced handling
936         for COMPONENT_REF.
938 2023-03-17  Jakub Jelinek  <jakub@redhat.com>
940         PR c/109151
941         * c-ubsan.cc (ubsan_instrument_division): Handle all scalar integral
942         types rather than just INTEGER_TYPE.
944 2023-03-10  Marek Polacek  <polacek@redhat.com>
946         PR sanitizer/108060
947         PR sanitizer/109050
948         * c-gimplify.cc (ubsan_walk_array_refs_r): For a MODIFY_EXPR, instrument
949         the RHS before the LHS.
951 2023-03-04  Jakub Jelinek  <jakub@redhat.com>
953         PR c/107465
954         * c-warn.cc (warn_for_sign_compare): Don't warn for unset bits
955         above innermost zero extension of BIT_NOT_EXPR result.
957 2023-03-04  Jakub Jelinek  <jakub@redhat.com>
959         PR c/107465
960         * c-warn.cc (warn_for_sign_compare): If c_common_get_narrower
961         doesn't return a narrower result, use TYPE_UNSIGNED to set unsignedp0
962         and unsignedp1.  For the one BIT_NOT_EXPR case vs. one without,
963         only check for constant in the non-BIT_NOT_EXPR operand, use std::swap
964         to simplify the code, only warn if BIT_NOT_EXPR operand is extended
965         from narrower unsigned, fix up computation of mask for the constant
966         cases and for unsigned other operand case handle differently
967         BIT_NOT_EXPR result being sign vs. zero extended.
969 2023-03-04  Jakub Jelinek  <jakub@redhat.com>
971         PR c/107846
972         * c-warn.cc: Include langhooks.h.
973         (maybe_warn_shift_overflow): Set type0 to what TREE_TYPE (op0)
974         promotes to rather than TREE_TYPE (op0) itself, if TREE_TYPE (op0)
975         is narrower than type0 and unsigned, use wi::min_precision with
976         UNSIGNED and fold_convert op0 to type0 before emitting the warning.
978 2023-03-03  Alexandre Oliva  <oliva@adacore.com>
980         * c-common.cc (c_common_nodes_and_builtins): Take
981         wchar_type_node for wint_type_node when aliased.
982         (c_stddef_cpp_builtins): Define __WINT_TYPE__, when aliased to
983         wchar_t, to the underlying type rather than wchar_t in
984         non-C++.
985         * c-cppbuiltin.cc (type_suffix): Handle wchar_type_node.
987 2023-02-28  Marek Polacek  <polacek@redhat.com>
989         PR c++/107938
990         * c-warn.cc (check_address_or_pointer_of_packed_member): Check
991         POINTER_TYPE_P.
993 2023-02-28  Jakub Jelinek  <jakub@redhat.com>
995         PR sanitizer/108894
996         * c-common.h (c_strict_flex_array_level_of): Declare.
997         * c-common.cc (c_strict_flex_array_level_of): New function,
998         moved and renamed from c-decl.cc's strict_flex_array_level_of.
999         * c-ubsan.cc (ubsan_instrument_bounds): Fix comment typo.  For
1000         C check c_strict_flex_array_level_of whether a trailing array
1001         should be treated as flexible member like.  Handle C [0] arrays.
1002         Add 1 + index_off_by_one rather than index_off_by_one to bounds
1003         and use tree_int_cst_lt rather than tree_int_cst_le for idx vs.
1004         bounds comparison.
1006 2023-02-23  Jakub Jelinek  <jakub@redhat.com>
1008         PR translation/108890
1009         * c.opt (fcontracts): Fix description.
1011 2023-02-22  Marek Polacek  <polacek@redhat.com>
1013         PR c/108880
1014         * c-gimplify.cc (c_genericize_control_stmt) <case STATEMENT_LIST>: Pass
1015         pset to walk_tree_1.
1016         (c_genericize): Call walk_tree with an explicit pset.
1018 2023-02-18  Martin Uecker  <uecker@tugraz.at>
1020         PR c/105660
1021         * c-attribs.cc (append_access_attr): Use order of arguments when
1022         construction string.
1023         (append_access_attr_idxs): Rename and make static.
1024         * c-warn.cc (warn_parm_array_mismatch): Add assertion.
1026 2023-02-16  Patrick Palka  <ppalka@redhat.com>
1028         * c-common.h: Mechanically drop static from static inline
1029         functions via s/^static inline/inline/g.
1031 2023-02-01  Jason Merrill  <jason@redhat.com>
1033         * c.opt: Add -Wno-changes-meaning.
1035 2023-01-31  Marek Polacek  <polacek@redhat.com>
1037         PR c++/107593
1038         PR c++/108597
1039         * c-common.h (instantiation_dependent_expression_p): Declare.
1040         * c-warn.cc (warn_duplicated_cond_add_or_warn): If the condition
1041         is dependent, invalidate the chain.
1043 2023-01-26  Marek Polacek  <polacek@redhat.com>
1045         PR c++/105300
1046         * c-pragma.cc (handle_pragma_message): Warn for CPP_STRING_USERDEF.
1048 2023-01-18  Marek Polacek  <polacek@redhat.com>
1050         PR c/108424
1051         * c-common.cc (check_case_value): Check INTEGRAL_TYPE_P.
1053 2023-01-14  Jakub Jelinek  <jakub@redhat.com>
1055         PR c++/108365
1056         * c-common.h (may_shorten_divmod): New static inline function.
1058 2023-01-13  Eric Botcazou  <ebotcazou@adacore.com>
1060         * c-ada-spec.cc (is_float32): New function.
1061         (is_float64): Likewise.
1062         (is_float128): Tweak.
1063         (dump_ada_node) <REAL_TYPE>: Call them to recognize more types.
1065 2023-01-12  Lewis Hyatt  <lhyatt@gmail.com>
1067         PR preprocessor/108244
1068         * c-pragma.cc (c_register_pragma_1): Don't attempt to register any
1069         deferred pragmas if -fdirectives-only.
1070         (init_pragma): Likewise.
1072 2023-01-09  Martin Liska  <mliska@suse.cz>
1074         PR c/107993
1075         * c-attribs.cc (handle_target_clones_attribute): Check for
1076         string constant for all target_clone attribute values.
1078 2023-01-03  Florian Weimer  <fweimer@redhat.com>
1080         * c-cppbuiltin.cc (c_cpp_builtins): Define
1081         __LIBGCC_DWARF_CIE_DATA_ALIGNMENT__.
1083 2023-01-03  Florian Weimer  <fweimer@redhat.com>
1085         Revert:
1086         2023-01-03  Florian Weimer  <fweimer@redhat.com>
1088         * c-cppbuiltin.cc (__LIBGCC_DWARF_REG_SIZES_CONSTANT__):
1089         Define if constant is known.
1091 2023-01-03  Florian Weimer  <fweimer@redhat.com>
1093         Revert:
1094         2023-01-02  Florian Weimer  <fweimer@redhat.com>
1096         * c-cppbuiltin.cc (c_cpp_builtins): Define
1097         __LIBGCC_DWARF_CIE_DATA_ALIGNMENT__.
1099 2023-01-02  Florian Weimer  <fweimer@redhat.com>
1101         * c-cppbuiltin.cc (c_cpp_builtins): Define
1102         __LIBGCC_DWARF_CIE_DATA_ALIGNMENT__.
1104 2023-01-02  Florian Weimer  <fweimer@redhat.com>
1106         * c-cppbuiltin.cc (__LIBGCC_DWARF_REG_SIZES_CONSTANT__):
1107         Define if constant is known.
1109 2022-12-19  Marek Polacek  <polacek@redhat.com>
1111         PR c/98487
1112         * c-format.cc (check_function_format): Use get_attribute_name.
1114 2022-12-16  Qing Zhao  <qing.zhao@oracle.com>
1116         * c.opt (Wstrict-flex-arrays): New option.
1118 2022-12-02  Andrew MacLeod  <amacleod@redhat.com>
1120         * c-attribs.cc (handle_deprecated_attribute): Use type when
1121         using TYPE_NAME.
1123 2022-12-02  Jakub Jelinek  <jakub@redhat.com>
1125         PR c++/84469
1126         * c-omp.cc (c_omp_is_loop_iterator): For range for with structured
1127         binding return TREE_VEC_LENGTH (d->declv) even if decl is equal
1128         to any of the structured binding decls.
1130 2022-11-30  Iskander Shakirzyanov  <iskander@ispras.ru>
1131             Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
1133         PR driver/107787
1134         * c-common.cc (fold_offsetof,
1135         convert_vector_to_array_for_subscript): Use OPT_Warray_bounds_
1136         instead of OPT_Warray_bounds.
1138 2022-11-24  Jakub Jelinek  <jakub@redhat.com>
1140         * c.opt (fcontract-role=, fcontract-semantic=): Terminate descriptions
1141         with a dot.
1143 2022-11-23  Andrew Pinski  <apinski@marvell.com>
1144             Jakub Jelinek  <jakub@redhat.com>
1146         PR c/107127
1147         * c-gimplify.cc (c_genericize): Use walk_tree_without_duplicates
1148         instead of walk_tree for c_genericize_control_r.
1150 2022-11-23  Jakub Jelinek  <jakub@redhat.com>
1152         * c.opt (fcontract-assumption-mode=, fcontract-continuation-mode=,
1153         fcontract-role=, fcontract-semantic=): Add RejectNegative.
1154         (fcontract-build-level=): Terminate description with dot.
1156 2022-11-19  Jakub Jelinek  <jakub@redhat.com>
1158         * c-cppbuiltin.cc (c_cpp_builtins): Bump __cpp_constexpr
1159         value from 202207L to 202211L.
1161 2022-11-19  Jeff Chapman II  <jchapman@lock3software.com>
1162             Andrew Sutton   <asutton@lock3software.com>
1163             Andrew Marmaduke  <amarmaduke@lock3software.com>
1164             Michael Lopez  <mlopez@lock3software.com>
1165             Jason Merrill   <jason@redhat.com>
1167         * c.opt: Add contracts flags.
1168         * c-cppbuiltin.cc (c_cpp_builtins): Add contracts feature-test
1169         macros.
1171 2022-11-16  Marek Polacek  <polacek@redhat.com>
1173         PR c++/106649
1174         * c-cppbuiltin.cc (c_cpp_builtins): Update value of __cpp_constexpr for
1175         C++23.
1176         * c-opts.cc (c_common_post_options): Set warn_invalid_constexpr
1177         depending on cxx_dialect.
1178         * c.opt (Winvalid-constexpr): New option.
1180 2022-11-16  Jakub Jelinek  <jakub@redhat.com>
1182         * c-common.def (CONCEPT_DECL): New tree, moved here from
1183         cp-tree.def.
1184         * c-common.cc (c_common_init_ts): Handle CONCEPT_DECL.
1185         * c-attribs.cc (handle_deprecated_attribute): Allow deprecated
1186         attribute on CONCEPT_DECL.
1188 2022-11-15  Lewis Hyatt  <lhyatt@gmail.com>
1190         * c-opts.cc (c_finish_options): Use special_fname_builtin () rather
1191         than a hard-coded string.
1193 2022-11-15  Jakub Jelinek  <jakub@redhat.com>
1195         * c-cppbuiltin.cc (c_cpp_builtins): Bump C++23
1196         __cpp_multidimensional_subscript macro value to 202211L.
1198 2022-11-15  Patrick Palka  <ppalka@redhat.com>
1200         PR c++/107638
1201         * c-lex.cc (c_common_has_attribute): Return 1 for init_priority
1202         iff SUPPORTS_INIT_PRIORITY.
1204 2022-11-14  Martin Liska  <mliska@suse.cz>
1206         Revert:
1207         2022-11-09  Martin Liska  <mliska@suse.cz>
1209         * c-target.def: Port to RST.
1211 2022-11-12  Joseph Myers  <joseph@codesourcery.com>
1213         * c-common.cc (c_common_reswords): Use D_C2X instead of D_CXXONLY.
1215 2022-11-11  Jonathan Wakely  <jwakely@redhat.com>
1217         PR c/85487
1218         * c-pragma.cc (handle_pragma_ignore): New function.
1219         (init_pragma): Register region and endregion pragmas.
1221 2022-11-09  Martin Liska  <mliska@suse.cz>
1223         * c-target.def: Port to RST.
1225 2022-11-05  Lewis Hyatt  <lhyatt@gmail.com>
1227         PR preprocessor/55971
1228         * c-ppoutput.cc (adjust_for_newlines): Update comment.
1230 2022-11-03  Jason Merrill  <jason@redhat.com>
1232         * c-opts.cc (c_common_post_options): -fconcepts no longer implies
1233         -fconcepts-ts before C++20.
1235 2022-10-28  Joseph Myers  <joseph@codesourcery.com>
1237         * c-common.cc (def_fn_type): Call build_function_type for
1238         zero-argument variable-argument function.
1239         (c_common_nodes_and_builtins): Build default_function_type with
1240         build_function_type.
1241         * c.opt (fallow-parameterless-variadic-functions): Mark as ignored
1242         option.
1244 2022-10-28  Joseph Myers  <joseph@codesourcery.com>
1246         PR c/61469
1247         * c-common.h (ENUM_UNDERLYING_TYPE, ENUM_FIXED_UNDERLYING_TYPE_P):
1248         New.  Moved from cp/cp-tree.h.
1249         * c-warn.cc (warnings_for_convert_and_check): Do not consider
1250         conversions to enum with underlying type bool to overflow.
1252 2022-10-26  Marek Polacek  <polacek@redhat.com>
1254         PR c++/106393
1255         * c.opt (Wdangling-reference): New.
1257 2022-10-19  Joseph Myers  <joseph@codesourcery.com>
1259         * c-format.h (enum format_lengths): Add FMT_LEN_w8, FMT_LEN_w16,
1260         FMT_LEN_w32, FMT_LEN_w64, FMT_LEN_wf8, FMT_LEN_wf16, FMT_LEN_wf32
1261         and FMT_LEN_wf64.
1262         (NOARGUMENTS, NOLENGTHS): Update definitions.
1263         (T_I8, T2X_I8, T_I16, T2X_I16, T_I32, T2X_I32, T_I64, T2X_I64)
1264         (T_U8, T2X_U8, T_U16, T2X_U16, T_U32, T2X_U32, T_U64, T2X_U64)
1265         (T_IF8, T2X_IF8, T_IF16, T2X_IF16, T_IF32, T2X_IF32, T_IF64)
1266         (T2X_IF64, T_UF8, T2X_UF8, T_UF16, T2X_UF16, T_UF32, T2X_UF32)
1267         (T_UF64, T2X_UF64): New macros.
1268         * c-format.cc (printf_length_specs, scanf_length_specs): Add wN
1269         and wfN length modifiers.
1270         (print_char_table, scan_char_table): Add entries using wN and wfN
1271         length modifiers.
1273 2022-10-18  Joseph Myers  <joseph@codesourcery.com>
1275         PR c/36113
1276         * c-common.cc (c_common_type_for_size): Add fallback to
1277         widest_unsigned_literal_type_node or
1278         widest_integer_literal_type_node for precision that may not
1279         exactly match the precision of those types.
1281 2022-10-14  Jakub Jelinek  <jakub@redhat.com>
1283         * c-cppbuiltin.cc (c_cpp_builtins): If bfloat16_type_node,
1284         predefine __BFLT16_*__ macros and for C++23 also
1285         __STDCPP_BFLOAT16_T__.  Predefine bfloat16_type_node related
1286         macros for -fbuilding-libgcc.
1287         * c-lex.cc (interpret_float): Handle CPP_N_BFLOAT16.
1289 2022-10-14  Jakub Jelinek  <jakub@redhat.com>
1291         PR middle-end/323
1292         PR c++/107097
1293         * c-common.def (EXCESS_PRECISION_EXPR): Remove comment part about
1294         the tree being specific to C/ObjC.
1295         * c-opts.cc (c_common_post_options): Handle flag_excess_precision
1296         in C++ the same as in C.
1297         * c-lex.cc (interpret_float): Set const_type to excess_precision ()
1298         even for C++.
1300 2022-10-13  Joseph Myers  <joseph@codesourcery.com>
1302         * c-cppbuiltin.cc (builtin_define_float_constants): Do not use
1303         value 2 for *_IS_IEC_60559.
1305 2022-10-12  Lewis Hyatt  <lhyatt@gmail.com>
1307         PR preprocessor/60014
1308         PR preprocessor/60723
1309         * c-ppoutput.cc (class token_streamer): Remove member
1310         line_marker_emitted to...
1311         (token_streamer::stream): ...a local variable here. Set
1312         print.prev_was_system_token on all code paths.
1314 2022-10-10  Nathan Sidwell  <nathan@acm.org>
1316         * c-opts.cc (c_common_post_options): Bump abi to 18.
1318 2022-10-10  Marek Polacek  <polacek@redhat.com>
1320         PR c++/106937
1321         * c-pretty-print.cc (pp_c_specifier_qualifier_list): Print only GNU
1322         attributes here.
1323         (c_pretty_printer::direct_abstract_declarator): Print the standard [[]]
1324         attributes here.
1325         (pp_c_attributes): Remove.
1326         (pp_c_attributes_display): Print the [[]] form if appropriate.  Use
1327         get_attribute_name.  Don't print a trailing space when printing the
1328         [[]] form.
1329         * c-pretty-print.h (pp_c_attributes): Remove.
1331 2022-10-07  Qing Zhao  <qing.zhao@oracle.com>
1333         * c-attribs.cc (handle_strict_flex_array_attribute): New function.
1334         (c_common_attribute_table): New item for strict_flex_array.
1335         * c.opt: (fstrict-flex-arrays): New option.
1336         (fstrict-flex-arrays=): New option.
1338 2022-10-07  Martin Liska  <mliska@suse.cz>
1340         * name-hint.h: Use std::move.
1342 2022-10-07  Jakub Jelinek  <jakub@redhat.com>
1344         * c-common.cc (attribute_fallthrough_p): Lookup fallthrough attribute
1345         only in gnu namespace or as standard attribute, treat fallthrough
1346         attributes in other namespaces like any other unknown attribute.
1348 2022-10-06  Joseph Myers  <joseph@codesourcery.com>
1350         * c-common.cc (c_common_reswords): Mark typeof as D_EXT11.  Add
1351         typeof_unqual.
1352         * c-common.h (enum rid): Add RID_TYPEOF_UNQUAL.
1353         (D_EXT11): New macro.  Values of subsequent macros updated.
1355 2022-10-06  Jakub Jelinek  <jakub@redhat.com>
1357         PR c++/106654
1358         * c-attribs.cc (handle_assume_attribute): New function.
1359         (c_common_attribute_table): Add entry for assume attribute.
1360         * c-lex.cc (c_common_has_attribute): Handle
1361         __have_cpp_attribute (assume).
1363 2022-10-04  Jakub Jelinek  <jakub@redhat.com>
1365         * c-omp.cc (c_omp_directives): Uncomment begin declare target
1366         entry.
1368 2022-10-03  Patrick Palka  <ppalka@redhat.com>
1370         * c-common.cc (c_common_reswords): Use RID_IS_SAME instead of
1371         RID_IS_SAME_AS.
1373 2022-10-03  Joseph Myers  <joseph@codesourcery.com>
1375         * c-cppbuiltin.cc (builtin_define_float_constants): Do not
1376         special-case __*_EPSILON__ setting for IBM long double for C2x.
1378 2022-09-30  Patrick Palka  <ppalka@redhat.com>
1380         * c-common.cc (c_common_reswords): Use cp/cp-trait.def to handle
1381         C++ traits.
1382         * c-common.h (enum rid): Likewise.
1384 2022-09-29  Joseph Myers  <joseph@codesourcery.com>
1386         * c-lex.cc (c_common_has_attribute): Handle noreturn attribute for
1387         C.
1389 2022-09-29  Patrick Palka  <ppalka@redhat.com>
1391         * c-common.cc (c_common_reswords): Add __remove_cv,
1392         __remove_reference and __remove_cvref.
1393         * c-common.h (enum rid): Add RID_REMOVE_CV, RID_REMOVE_REFERENCE
1394         and RID_REMOVE_CVREF.
1396 2022-09-27  Marek Polacek  <polacek@redhat.com>
1398         PR c++/101165
1399         PR c++/106882
1400         * c-cppbuiltin.cc (c_cpp_builtins): Define __cpp_implicit_move.
1402 2022-09-27  Marek Polacek  <polacek@redhat.com>
1404         * c-format.cc (c_keywords): Drop nothrow.
1406 2022-09-27  Jakub Jelinek  <jakub@redhat.com>
1408         PR c++/106651
1409         * c-cppbuiltin.cc (c_cpp_builtins): Predefine
1410         __cpp_static_call_operator=202207L for C++23.
1412 2022-09-27  Jakub Jelinek  <jakub@redhat.com>
1414         * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_ASSUME,
1415         PRAGMA_OMP_ASSUMES and PRAGMA_OMP_BEGIN.  Rename
1416         PRAGMA_OMP_END_DECLARE_TARGET to PRAGMA_OMP_END.
1417         * c-pragma.cc (omp_pragmas): Add assumes and begin.
1418         For end rename PRAGMA_OMP_END_DECLARE_TARGET to PRAGMA_OMP_END.
1419         (omp_pragmas_simd): Add assume.
1420         * c-common.h (c_omp_directives): Declare.
1421         * c-omp.cc (omp_directives): Rename to ...
1422         (c_omp_directives): ... this.  No longer static.  Uncomment
1423         assume, assumes, begin assumes and end assumes entries.
1424         In end declare target entry rename PRAGMA_OMP_END_DECLARE_TARGET
1425         to PRAGMA_OMP_END.
1426         (c_omp_categorize_directive): Adjust for omp_directives to
1427         c_omp_directives renaming.
1429 2022-09-27  Jakub Jelinek  <jakub@redhat.com>
1431         PR c++/106652
1432         PR c++/85518
1433         * c-common.cc (c_common_reswords): Change _Float{16,32,64,128} and
1434         _Float{32,64,128}x flags from D_CONLY to 0.
1435         (shorten_binary_op): Punt if common_type returns error_mark_node.
1436         (shorten_compare): Likewise.
1437         (c_common_nodes_and_builtins): For C++ record _Float{16,32,64,128}
1438         and _Float{32,64,128}x builtin types if available.  For C++
1439         clear float128t_type_node.
1440         * c-cppbuiltin.cc (c_cpp_builtins): Predefine
1441         __STDCPP_FLOAT{16,32,64,128}_T__ for C++23 if supported.
1442         * c-lex.cc (interpret_float): For q/Q suffixes prefer
1443         float128t_type_node over float128_type_node.  Allow
1444         {f,F}{16,32,64,128} suffixes for C++ if supported with pedwarn
1445         for C++20 and older.  Allow {f,F}{32,64,128}x suffixes for C++
1446         with pedwarn.  Don't call excess_precision_type for C++.
1448 2022-09-26  Marek Polacek  <polacek@redhat.com>
1450         PR c++/106656
1451         * c-cppbuiltin.cc (c_cpp_builtins): Update value of __cpp_char8_t
1452         for C++20.
1454 2022-09-23  Marek Polacek  <polacek@redhat.com>
1456         PR c++/106784
1457         * c-common.cc (c_common_reswords): Add __is_convertible and
1458         __is_nothrow_convertible.
1459         * c-common.h (enum rid): Add RID_IS_CONVERTIBLE and
1460         RID_IS_NOTHROW_CONVERTIBLE.
1462 2022-09-22  David Malcolm  <dmalcolm@redhat.com>
1464         PR c/106830
1465         * c-warn.cc (check_for_xor_used_as_pow): Don't try checking
1466         values that don't fit in uhwi.
1468 2022-09-15  Richard Biener  <rguenther@suse.de>
1470         * c-common.h (build_void_list_node): Remove.
1471         * c-common.cc (c_common_nodes_and_builtins): Do not initialize
1472         void_list_node.
1474 2022-09-09  Jan-Benedict Glaw  <jbglaw@lug-owl.de>
1476         * c-format.cc (convert_format_name_to_system_name): Fix warning.
1478 2022-09-07  Joseph Myers  <joseph@codesourcery.com>
1480         * c-common.cc (c_common_reswords): Use D_C2X instead of D_CXXONLY
1481         for alignas, alignof, bool, false, static_assert, thread_local and
1482         true.
1484 2022-09-07  Jakub Jelinek  <jakub@redhat.com>
1486         * c.opt (Winvalid-utf8): Use ObjC instead of objC.  Remove
1487         " in comments" from description.
1488         (Wunicode): New option.
1490 2022-09-06  Jakub Jelinek  <jakub@redhat.com>
1492         PR c/106836
1493         * c-omp.cc (c_omp_split_clauses): Handle OMP_CLAUSE_DOACROSS.
1495 2022-09-03  Jakub Jelinek  <jakub@redhat.com>
1497         * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_DOACROSS.
1498         * c-omp.cc (c_finish_omp_depobj): Check also for OMP_CLAUSE_DOACROSS
1499         clause and diagnose it.  Don't handle OMP_CLAUSE_DEPEND_SOURCE and
1500         OMP_CLAUSE_DEPEND_SINK.  Assert kind is not OMP_CLAUSE_DEPEND_INVALID.
1502 2022-09-02  David Malcolm  <dmalcolm@redhat.com>
1504         PR c/90885
1505         * c-common.h (check_for_xor_used_as_pow): New decl.
1506         * c-lex.cc (c_lex_with_flags): Add DECIMAL_INT to flags as appropriate.
1507         * c-warn.cc (check_for_xor_used_as_pow): New.
1508         * c.opt (Wxor-used-as-pow): New.
1510 2022-09-01  Jason Merrill  <jason@redhat.com>
1512         * c-common.cc (c_common_nodes_and_builtins): Set TREE_STRING_FLAG on
1513         char8_t.
1514         (braced_list_to_string): Check for char-sized elements.
1516 2022-09-01  Jakub Jelinek  <jakub@redhat.com>
1518         PR c++/106655
1519         * c.opt (-Winvalid-utf8): New warning.
1520         * c-opts.cc (c_common_handle_option) <case OPT_finput_charset_>:
1521         Set cpp_opts->cpp_input_charset_explicit.
1522         (c_common_post_options): If -finput-charset=UTF-8 is explicit
1523         in C++23, enable -Winvalid-utf8 by default and if -pedantic
1524         or -pedantic-errors, make it a pedwarn.
1526 2022-08-31  Joseph Myers  <joseph@codesourcery.com>
1528         * c-attribs.cc (handle_deprecated_attribute): Check and pedwarn
1529         for LABEL_DECL.
1530         * c-common.cc (c_add_case_label): Add argument ATTRS.  Call
1531         decl_attributes.
1532         * c-common.h (do_case, c_add_case_label): Update declarations.
1533         * c-lex.cc (c_common_has_attribute): For C, produce a result of
1534         201910 for fallthrough and 202106 for maybe_unused.
1536 2022-08-26  Marek Polacek  <polacek@redhat.com>
1538         PR c++/81159
1539         * c.opt (Wself-move): New option.
1541 2022-08-26  Jakub Jelinek  <jakub@redhat.com>
1543         * c-common.cc (check_builtin_function_arguments): Handle
1544         BUILT_IN_ISSIGNALING.
1546 2022-08-26  Jakub Jelinek  <jakub@redhat.com>
1548         PR c++/106648
1549         * c-cppbuiltin.cc (c_cpp_builtins): Predefine
1550         __cpp_named_character_escapes to 202207L.
1552 2022-08-25  Marek Polacek  <polacek@redhat.com>
1554         * c-common.cc (c_common_reswords): Enable nullptr in C2X.
1555         (c_common_nodes_and_builtins): Create the built-in node for nullptr.
1556         * c-common.h (enum c_tree_index): Add CTI_NULLPTR, CTI_NULLPTR_TYPE.
1557         (struct c_common_resword): Resize the disable member.
1558         (D_C2X): Add.
1559         (nullptr_node): Define.
1560         (nullptr_type_node): Define.
1561         (NULLPTR_TYPE_P): Define.
1562         * c-pretty-print.cc (c_pretty_printer::simple_type_specifier): Handle
1563         NULLPTR_TYPE.
1564         (c_pretty_printer::direct_abstract_declarator): Likewise.
1565         (c_pretty_printer::constant): Likewise.
1567 2022-08-16  Tom Honermann  <tom@honermann.net>
1569         PR c++/106423
1570         * c-opts.cc (c_common_post_options): Disable -Wc++20-compat
1571         diagnostics in C++20 and later.
1572         * c.opt (Wc++20-compat): Enable hooks for the preprocessor.
1574 2022-08-11  Marek Polacek  <polacek@redhat.com>
1576         PR middle-end/102633
1577         * c-gimplify.cc (c_gimplify_expr) <case DECL_EXPR>: Don't call
1578         suppress_warning here.
1580 2022-08-08  Tom Honermann  <tom@honermann.net>
1582         PR preprocessor/106426
1583         * c-opts.cc (c_common_post_options): Assign cpp_opts->unsigned_utf8char
1584         subject to -fchar8_t, -fsigned-char, and/or -funsigned-char.
1586 2022-08-08  Tom Honermann  <tom@honermann.net>
1588         * c-lex.cc (lex_string, lex_charconst): Use char8_t as the type
1589         of CPP_UTF8CHAR and CPP_UTF8STRING when char8_t support is
1590         enabled.
1591         * c-opts.cc (c_common_post_options): Set flag_char8_t if
1592         targeting C2x.
1594 2022-07-31  Lewis Hyatt  <lhyatt@gmail.com>
1596         PR c++/66290
1597         * c-common.h: Rename global done_lexing to
1598         override_libcpp_locations.
1599         * c-common.cc (c_cpp_diagnostic): Likewise.
1600         * c-opts.cc (c_common_finish): Set override_libcpp_locations
1601         (formerly done_lexing) immediately prior to calling cpp_finish ().
1603 2022-07-27  Lewis Hyatt  <lhyatt@gmail.com>
1605         * c-ppoutput.cc (token_streamer::stream): Update input_location
1606         prior to streaming each token.
1608 2022-07-23  Immad Mir  <mirimmad@outlook.com>
1610         * c-attribs.cc: (c_common_attribute_table): add three new attributes
1611         namely: fd_arg, fd_arg_read and fd_arg_write.
1612         (handle_fd_arg_attribute): New.
1614 2022-07-15  Marek Polacek  <polacek@redhat.com>
1616         PR c++/104477
1617         * c-common.cc (c_common_reswords): Add
1618         __reference_constructs_from_temporary and
1619         __reference_converts_from_temporary.
1620         * c-common.h (enum rid): Add RID_REF_CONSTRUCTS_FROM_TEMPORARY and
1621         RID_REF_CONVERTS_FROM_TEMPORARY.
1623 2022-07-15  Jonathan Wakely  <jwakely@redhat.com>
1625         * c-format.cc (class range_label_for_format_type_mismatch):
1626         Adjust to new label_text API.
1628 2022-07-11  Lewis Hyatt  <lhyatt@gmail.com>
1630         PR preprocessor/106252
1631         * c-pragma.cc (handle_pragma_diagnostic_impl): Don't look up the
1632         option argument prior to verifying the option was found.
1634 2022-07-07  David Malcolm  <dmalcolm@redhat.com>
1636         * c-format.cc (range_label_for_format_type_mismatch::get_text):
1637         Update for removal of label_text::maybe_free in favor of automatic
1638         memory management.
1640 2022-07-06  Lewis Hyatt  <lhyatt@gmail.com>
1642         PR preprocessor/53920
1643         PR c++/53431
1644         * c-common.cc (c_option_is_from_cpp_diagnostics): New function.
1645         * c-common.h (c_option_is_from_cpp_diagnostics): Declare.
1646         (c_pp_stream_token): Declare.
1647         * c-ppoutput.cc (init_pp_output): Refactor logic about skipping
1648         pragmas to...
1649         (should_output_pragmas): ...here. New function.
1650         (token_streamer::stream): Support handling early pragmas.
1651         (do_line_change): Likewise.
1652         (c_pp_stream_token): New function.
1653         * c-pragma.cc (struct pragma_diagnostic_data): New helper class.
1654         (pragma_diagnostic_lex_normal): New function. Moved logic for
1655         interpreting GCC diagnostic pragmas here.
1656         (pragma_diagnostic_lex_pp): New function for parsing diagnostic pragmas
1657         directly from libcpp.
1658         (handle_pragma_diagnostic): Refactor into helper function...
1659         (handle_pragma_diagnostic_impl): ...here.  New function.
1660         (handle_pragma_diagnostic_early): New function.
1661         (handle_pragma_diagnostic_early_pp): New function.
1662         (struct pragma_ns_name): Renamed to...
1663         (struct pragma_pp_data): ...this.  Add new "early_handler" member.
1664         (c_register_pragma_1): Support early pragmas in the preprocessor.
1665         (c_register_pragma_with_early_handler): New function.
1666         (c_register_pragma): Support the new early handlers in struct
1667         internal_pragma_handler.
1668         (c_register_pragma_with_data): Likewise.
1669         (c_register_pragma_with_expansion): Likewise.
1670         (c_register_pragma_with_expansion_and_data): Likewise.
1671         (c_invoke_early_pragma_handler): New function.
1672         (c_pp_invoke_early_pragma_handler): New function.
1673         (init_pragma): Add early pragma support for diagnostic pragmas.
1674         * c-pragma.h (struct internal_pragma_handler): Add new early handler
1675         members.
1676         (c_register_pragma_with_early_handler): Declare.
1677         (c_invoke_early_pragma_handler): Declare.
1678         (c_pp_invoke_early_pragma_handler): Declare.
1680 2022-07-05  Marek Polacek  <polacek@redhat.com>
1682         PR c++/105626
1683         * c-format.cc (check_format_arg): Don't emit -Wformat warnings with
1684         u8 strings.
1686 2022-07-01  Marek Polacek  <polacek@redhat.com>
1688         PR c++/106111
1689         * c-common.h (enum rid): Update RID_LAST_CXX20.
1691 2022-06-30  Jonathan Wakely  <jwakely@redhat.com>
1693         * known-headers.cc (get_stdlib_header_for_name): Add <time.h>
1694         names.
1696 2022-06-24  Jason Merrill  <jason@redhat.com>
1698         PR c++/87729
1699         PR c++/20423
1700         * c.opt (Woverloaded-virtual): Add levels, include in -Wall.
1702 2022-06-18  Jakub Jelinek  <jakub@redhat.com>
1704         * c-ubsan.cc (ubsan_instrument_division, ubsan_instrument_shift):
1705         Use flag_sanitize_trap & SANITIZE_??? instead of
1706         flag_sanitize_undefined_trap_on_error.  If 2 sanitizers are involved
1707         and flag_sanitize_trap differs for them, emit __builtin_trap only
1708         for the comparison where trap is requested.
1709         (ubsan_instrument_vla, ubsan_instrument_return): Use
1710         lag_sanitize_trap & SANITIZE_??? instead of
1711         flag_sanitize_undefined_trap_on_error.
1713 2022-06-13  Jason Merrill  <jason@redhat.com>
1715         * c-ubsan.cc (ubsan_instrument_return): Use BUILTINS_LOCATION.
1717 2022-05-27  Marek Polacek  <polacek@redhat.com>
1719         PR c/90658
1720         * c-attribs.cc (get_priority): Check FUNCTION_DECL.
1722 2022-05-27  Jakub Jelinek  <jakub@redhat.com>
1724         * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ENTER.
1726 2022-05-20  David Malcolm  <dmalcolm@redhat.com>
1728         * c-format.cc: Replace uses of "FINAL" and "OVERRIDE" with "final"
1729         and "override".
1730         * c-pretty-print.h: Likewise.
1732 2022-05-18  Marek Polacek  <polacek@redhat.com>
1734         PR c/105131
1735         * c.opt (Wenum-int-mismatch): New.
1737 2022-05-18  Marek Polacek  <polacek@redhat.com>
1739         PR c++/105497
1740         * c-warn.cc (c_do_switch_warnings): Don't warn about unhandled
1741         enumerator when it was marked with attribute unused.
1743 2022-05-18  Eric Botcazou  <ebotcazou@adacore.com>
1745         * c-ada-spec.cc (dump_ada_node) <COMPLEX_TYPE>: Deal with usual
1746         floating-point complex types.
1747         <POINTER_TYPE>: Do not use limited_with clause if the designated
1748         type is a scalar type.
1750 2022-05-17  Jakub Jelinek  <jakub@redhat.com>
1752         * c-omp.cc (c_finish_omp_depobj): Handle
1753         OMP_CLAUSE_DEPEND_INOUTSET.
1755 2022-05-16  Jason Merrill  <jason@redhat.com>
1757         PR c/105492
1758         * c-attribs.cc (handle_mode_attribute): Don't fix broken typedefs
1759         here.
1761 2022-05-16  Martin Liska  <mliska@suse.cz>
1763         * c-common.cc (ARRAY_SIZE): Use ARRAY_SIZE.
1764         (c_common_nodes_and_builtins): Likewise.
1765         * c-format.cc (check_tokens): Likewise.
1766         (check_plain): Likewise.
1767         * c-pragma.cc (c_pp_lookup_pragma): Likewise.
1768         (init_pragma): Likewise.
1769         * known-headers.cc (get_string_macro_hint): Likewise.
1770         (get_stdlib_header_for_name): Likewise.
1771         * c-attribs.cc: Likewise.
1773 2022-05-13  Richard Biener  <rguenther@suse.de>
1775         * c-omp.cc: Remove gimple-fold.h include.
1777 2022-05-12  Jakub Jelinek  <jakub@redhat.com>
1779         * c-common.h (enum rid): Add RID_OMP_ALL_MEMORY.
1780         * c-omp.cc (c_finish_omp_depobj): Don't build_fold_addr_expr
1781         if null_pointer_node.
1783 2022-05-11  Martin Liska  <mliska@suse.cz>
1785         PR target/105355
1786         * c-opts.cc (c_common_handle_option): Change option name.
1787         * c.opt: Remove Joined and use Separate option.
1789 2022-05-09  Alex Coplan  <alex.coplan@arm.com>
1791         * c-common.h (get_dump_info): Delete.
1792         * c-gimplify.cc (c_genericize): Get TDI_original dump file info
1793         from the global dump_manager instead of the (now obsolete)
1794         get_dump_info.
1795         * c-opts.cc (original_dump_file): Delete.
1796         (original_dump_flags): Delete.
1797         (c_common_parse_file): Switch to using global dump_manager to
1798         manage the original dump file; fix leak of dump file.
1799         (get_dump_info): Delete.
1801 2022-05-07  Marek Polacek  <polacek@redhat.com>
1803         PR c++/101833
1804         PR c++/47634
1805         * c-attribs.cc (positional_argument): Pass POS by reference.  Deal
1806         with FN being either a function declaration or function type.  Use
1807         maybe_adjust_arg_pos_for_attribute.
1808         * c-common.cc (check_function_arguments): Maybe pass FNDECL down to
1809         check_function_format.
1810         * c-common.h (maybe_adjust_arg_pos_for_attribute): Declare.
1811         (positional_argument): Adjust.
1812         * c-format.cc (get_constant): Rename to ...
1813         (validate_constant): ... this.  Take EXPR by reference.  Return bool
1814         instead of tree.
1815         (handle_format_arg_attribute): Don't overwrite FORMAT_NUM_EXPR by the
1816         return value of validate_constant.
1817         (decode_format_attr): Don't overwrite FORMAT_NUM_EXPR and
1818         FIRST_ARG_NUM_EXPR by the return value of validate_constant.
1819         (check_function_format): Adjust a parameter name.
1820         (handle_format_attribute): Maybe pass FNDECL down to decode_format_attr.
1822 2022-05-04  Marek Polacek  <polacek@redhat.com>
1824         * c-warn.cc (warnings_for_convert_and_check): Convert constants of type
1825         char to int.
1827 2022-04-30  Jason Merrill  <jason@redhat.com>
1829         PR c/100545
1830         * c-attribs.cc (handle_mode_attribute): Copy attributes, aligned,
1831         and typedef.
1832         * c-common.cc (set_underlying_type): Add assert.
1834 2022-04-26  Patrick Palka  <ppalka@redhat.com>
1836         PR c++/105304
1837         * c-common.cc (verify_tree) [restart]: Move up to before the
1838         NULL test.
1840 2022-04-11  Jakub Jelinek  <jakub@redhat.com>
1842         PR c++/105186
1843         * c-common.cc (c_common_nodes_and_builtins): After registering __int%d
1844         and __int%d__ builtin types, initialize corresponding ridpointers
1845         entry.
1847 2022-03-30  Marek Polacek  <polacek@redhat.com>
1849         PR c++/101030
1850         * c-warn.cc (conversion_warning) <case COND_EXPR>: Don't call
1851         conversion_warning when OP1 is null.
1853 2022-03-30  Thomas Schwinge  <thomas@codesourcery.com>
1855         * c.opt (Wc++11-extensions, Wc++14-extensions, Wc++17-extensions)
1856         (Wc++20-extensions, Wc++23-extensions): Remove 'LangEnabledBy'
1857         option properties.
1859 2022-03-30  Thomas Schwinge  <thomas@codesourcery.com>
1861         * c.opt (Wuse-after-free): Remove.
1863 2022-03-30  Thomas Schwinge  <thomas@codesourcery.com>
1865         * c.opt (Warray-bounds): Remove.
1867 2022-03-26  Thomas Schwinge  <thomas@codesourcery.com>
1869         * c.opt: Properly quote comment.
1871 2022-03-25  Eric Botcazou  <ebotcazou@adacore.com>
1873         * c-ada-spec.cc (dump_ada_import): Deal with the "section" attribute
1874         (dump_ada_node) <POINTER_TYPE>: Do not modify and pass the name, but
1875         the referenced type instead.  Deal with the anonymous original type
1876         of a typedef'ed type.  In the actual access case, follow the chain
1877         of external subtypes.
1878         <TYPE_DECL>: Tidy up control flow.
1880 2022-03-21  Qian Jianhua  <qianjh@cn.fujitsu.com>
1882         * c-ada-spec.cc: Change array length
1884 2022-03-19  Arthur Cohen  <arthur.cohen@embecosm.com>
1886         * c-common.cc (c_family_tests): Call the new tests.
1887         * c-common.h (c_diagnostic_tests): Declare.
1888         (c_opt_problem_cc_tests): Likewise.
1890 2022-03-19  Jakub Jelinek  <jakub@redhat.com>
1892         PR c++/101515
1893         * c-pretty-print.cc (c_fold_indirect_ref_for_warn): For C++ don't
1894         return COMPONENT_REFs with FIELD_DECLs whose containing scope can't
1895         be printed.
1897 2022-03-16  Christophe Lyon  <christophe.lyon@arm.com>
1898             Roger Sayle  <roger@nextmovesoftware.com>
1900         PR c/98198
1901         * c-attribs.cc (decl_or_type_attrs): Add error_mark_node check.
1903 2022-03-16  Patrick Palka  <ppalka@redhat.com>
1905         PR c++/96780
1906         * c.opt: Add -ffold-simple-inlines.
1908 2022-03-13  Tobias Burnus  <tobias@codesourcery.com>
1910         * c-target.def (check_string_object_format_arg): Fix description typo.
1912 2022-03-12  Thomas Schwinge  <thomas@codesourcery.com>
1914         PR other/65095
1915         * c-common.h (c_omp_map_clause_name): Remove.
1916         * c-omp.cc (c_omp_map_clause_name): Remove.
1918 2022-03-09  Jakub Jelinek  <jakub@redhat.com>
1920         PR c/104711
1921         * c-opts.cc (c_common_post_options): Don't enable
1922         -Wshift-negative-value from -Wextra for C++20 or later.
1923         * c-ubsan.cc (ubsan_instrument_shift): Adjust comments.
1924         * c-warn.cc (maybe_warn_shift_overflow): Use TYPE_OVERFLOW_WRAPS
1925         instead of TYPE_UNSIGNED.
1927 2022-03-07  Jakub Jelinek  <jakub@redhat.com>
1929         * c-attribs.cc: Fix up duplicated word issue in a comment.
1931 2022-03-01  Martin Liska  <mliska@suse.cz>
1933         PR ipa/104533
1934         * c-attribs.cc (handle_target_clones_attribute): Use
1935         get_target_clone_attr_len and report warning soon.
1937 2022-02-17  Jonathan Wakely  <jwakely@redhat.com>
1939         * c-pragma.cc (handle_pragma_pack): Remove parameter name.
1940         (handle_pragma_weak): Likewise.
1941         (handle_pragma_scalar_storage_order): Likewise.
1942         (handle_pragma_redefine_extname): Likewise.
1943         (handle_pragma_visibility): Likewise.
1944         (handle_pragma_diagnostic): Likewise.
1945         (handle_pragma_target): Likewise.
1946         (handle_pragma_optimize): Likewise.
1947         (handle_pragma_push_options): Likewise.
1948         (handle_pragma_pop_options): Likewise.
1949         (handle_pragma_reset_options): Likewise.
1950         (handle_pragma_message): Likewise.
1951         (handle_pragma_float_const_decimal64): Likewise.
1953 2022-02-16  Jakub Jelinek  <jakub@redhat.com>
1955         PR c/104531
1956         * c-omp.cc (c_finish_omp_atomic): For MIN_EXPR/MAX_EXPR, try first
1957         build_binary_op with LT_EXPR and only if that doesn't return
1958         error_mark_node call build_modify_expr.
1960 2022-02-16  Jakub Jelinek  <jakub@redhat.com>
1962         PR c/104510
1963         * c-common.cc (shorten_compare): Convert original arguments to
1964         the original *restype_ptr when mixing binary and decimal float.
1966 2022-02-14  Richard Biener  <rguenther@suse.de>
1968         PR c/104505
1969         * c-pretty-print.cc (c_pretty_printer::postfix_expression): Handle
1970         internal function calls.
1972 2022-02-11  Richard Biener  <rguenther@suse.de>
1974         * c-attribs.cc (c_common_attribute_table): Add entry for
1975         vector_mask.
1976         (handle_vector_mask_attribute): New.
1978 2022-02-10  Marcel Vollweiler  <marcel@codesourcery.com>
1980         * c-omp.cc (c_omp_split_clauses): Added OMP_CLAUSE_HAS_DEVICE_ADDR case.
1981         * c-pragma.h (enum pragma_kind): Added 5.1 in comment.
1982         (enum pragma_omp_clause): Added PRAGMA_OMP_CLAUSE_HAS_DEVICE_ADDR.
1984 2022-02-09  Jason Merrill  <jason@redhat.com>
1986         * c-cppbuiltin.cc (c_cpp_builtins): Update values
1987         of __cpp_constexpr and __cpp_concepts for C++20.
1989 2022-01-24  Marek Polacek  <polacek@redhat.com>
1991         PR preprocessor/104030
1992         * c.opt (Wbidi-chars): Mark as EnumSet.  Also accept =ucn.
1994 2022-01-21  Jakub Jelinek  <jakub@redhat.com>
1996         PR c++/104148
1997         * c-common.h (check_function_arguments_recurse): Add for_format
1998         arg.
1999         * c-common.cc (check_function_nonnull): Pass false to
2000         check_function_arguments_recurse's last argument.
2001         (check_function_arguments_recurse): Add for_format argument,
2002         if true, don't stop on warning_suppressed_p.
2003         * c-format.cc (check_format_info): Pass true to
2004         check_function_arguments_recurse's last argument.
2006 2022-01-19  David Malcolm  <dmalcolm@redhat.com>
2008         * c-common.cc (c_common_c_tests): Rename to...
2009         (c_common_cc_tests): ...this.
2010         (c_family_tests): Update calls for .c to .cc renaming.
2011         * c-common.h (c_format_c_tests): Rename to...
2012         (c_format_cc_tests): ...this.
2013         (c_indentation_c_tests): Rename to...
2014         (c_indentation_cc_tests): ...this.
2015         (c_pretty_print_c_tests): Rename to...
2016         (c_pretty_print_cc_tests): ...this.
2017         * c-format.cc (c_format_c_tests): Rename to...
2018         (c_format_cc_tests): ...this.
2019         * c-indentation.cc (c_indentation_c_tests): Rename to...
2020         (c_indentation_cc_tests): ...this.
2021         * c-pretty-print.cc (c_pretty_print_c_tests): Rename to...
2022         (c_pretty_print_cc_tests): ...this.
2024 2022-01-17  Martin Liska  <mliska@suse.cz>
2026         * c-ada-spec.cc: Rename .c names to .cc.
2027         * c-ada-spec.h: Likewise.
2028         * c-common.cc (c_build_vec_convert): Likewise.
2029         (warning_candidate_p): Likewise.
2030         * c-common.h (enum rid): Likewise.
2031         (build_real_imag_expr): Likewise.
2032         (finish_label_address_expr): Likewise.
2033         (c_get_substring_location): Likewise.
2034         (c_build_bind_expr): Likewise.
2035         (conflict_marker_get_final_tok_kind): Likewise.
2036         (c_parse_error): Likewise.
2037         (check_missing_format_attribute): Likewise.
2038         (invalid_array_size_error): Likewise.
2039         (warn_for_multistatement_macros): Likewise.
2040         (build_attr_access_from_parms): Likewise.
2041         * c-cppbuiltin.cc (c_cpp_builtins): Likewise.
2042         * c-format.cc: Likewise.
2043         * c-gimplify.cc (c_gimplify_expr): Likewise.
2044         * c-indentation.h: Likewise.
2045         * c-objc.h (objc_prop_attr_kind_for_rid): Likewise.
2046         * c-omp.cc (c_omp_predetermined_mapping): Likewise.
2047         * c-opts.cc (c_common_post_options): Likewise.
2048         (set_std_cxx23): Likewise.
2049         * c-pragma.cc (handle_pragma_redefine_extname): Likewise.
2050         * c-pretty-print.h: Likewise.
2052 2022-01-17  Martin Liska  <mliska@suse.cz>
2054         * c-ada-spec.c: Moved to...
2055         * c-ada-spec.cc: ...here.
2056         * c-attribs.c: Moved to...
2057         * c-attribs.cc: ...here.
2058         * c-common.c: Moved to...
2059         * c-common.cc: ...here.
2060         * c-cppbuiltin.c: Moved to...
2061         * c-cppbuiltin.cc: ...here.
2062         * c-dump.c: Moved to...
2063         * c-dump.cc: ...here.
2064         * c-format.c: Moved to...
2065         * c-format.cc: ...here.
2066         * c-gimplify.c: Moved to...
2067         * c-gimplify.cc: ...here.
2068         * c-indentation.c: Moved to...
2069         * c-indentation.cc: ...here.
2070         * c-lex.c: Moved to...
2071         * c-lex.cc: ...here.
2072         * c-omp.c: Moved to...
2073         * c-omp.cc: ...here.
2074         * c-opts.c: Moved to...
2075         * c-opts.cc: ...here.
2076         * c-pch.c: Moved to...
2077         * c-pch.cc: ...here.
2078         * c-ppoutput.c: Moved to...
2079         * c-ppoutput.cc: ...here.
2080         * c-pragma.c: Moved to...
2081         * c-pragma.cc: ...here.
2082         * c-pretty-print.c: Moved to...
2083         * c-pretty-print.cc: ...here.
2084         * c-semantics.c: Moved to...
2085         * c-semantics.cc: ...here.
2086         * c-ubsan.c: Moved to...
2087         * c-ubsan.cc: ...here.
2088         * c-warn.c: Moved to...
2089         * c-warn.cc: ...here.
2090         * cppspec.c: Moved to...
2091         * cppspec.cc: ...here.
2092         * stub-objc.c: Moved to...
2093         * stub-objc.cc: ...here.
2095 2022-01-15  Martin Sebor  <msebor@redhat.com>
2097         PR c/63272
2098         * c.opt (-Wdangling-pointer): New option.
2100 2022-01-15  Martin Sebor  <msebor@redhat.com>
2102         PR tree-optimization/80532
2103         * c.opt (-Wuse-after-free): New options.
2105 2022-01-14  David Malcolm  <dmalcolm@redhat.com>
2107         * c-attribs.c (c_common_attribute_table): Add "tainted_args".
2108         (handle_tainted_args_attribute): New.
2110 2022-01-13  Anthony Sharp  <anthonysharp15@gmail.com>
2111             Jason Merrill  <jason@redhat.com>
2113         PR c++/70417
2114         * c.opt: Added -Wmissing-template-keyword.
2116 2022-01-13  Richard Biener  <rguenther@suse.de>
2118         PR c/104002
2119         * c-common.c (c_common_mark_addressable_vec): Handle TARGET_EXPR.
2121 2022-01-12  Martin Liska  <mliska@suse.cz>
2123         PR target/103804
2124         * c-attribs.c (handle_optimize_attribute): Do not call
2125         cl_optimization_compare if we seen an error.
2127 2022-01-11  Jakub Jelinek  <jakub@redhat.com>
2129         PR c/101537
2130         PR c/103881
2131         * c-warn.c (conversion_warning): Handle BIT_AND_EXPR, BIT_IOR_EXPR
2132         and BIT_XOR_EXPR.
2134 2022-01-10  Richard Biener  <rguenther@suse.de>
2136         PR middle-end/101530
2137         * c-common.c (c_build_shufflevector): Wrap the BIT_FIELD_REF
2138         in a TARGET_EXPR to force a temporary.
2140 2022-01-06  Marek Polacek  <polacek@redhat.com>
2142         PR c++/103758
2143         * c-pragma.c (handle_pragma_scalar_storage_order): Use %< %> in
2144         diagnostic messages.
2145         (handle_pragma_diagnostic): Likewise.
2147 2022-01-03  Marek Polacek  <polacek@redhat.com>
2149         PR c++/103758
2150         * c-format.c (check_tokens): Accept "decl-specifier*".
2152 2022-01-03  Jakub Jelinek  <jakub@redhat.com>
2154         PR c++/103600
2155         * c-attribs.c (handle_non_overlapping_attribute): New function.
2156         (c_common_attribute_table): Add "non overlapping" attribute.
2158 2021-12-30  Jakub Jelinek  <jakub@redhat.com>
2160         PR c++/103012
2161         * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Perform
2162         cpp_define_unused/cpp_undef calls with forced token locations
2163         BUILTINS_LOCATION.
2165 2021-12-27  Patrick Palka  <ppalka@redhat.com>
2167         PR c++/103700
2168         * c-common.c (pointer_int_sum): When quiet, return
2169         error_mark_node for an incomplete pointed-to type and don't
2170         call size_in_bytes_loc.
2172 2021-12-17  Jason Merrill  <jason@redhat.com>
2174         PR c++/103681
2175         * c-opts.c (c_common_post_options): Update defaults.
2177 2021-12-16  Martin Liska  <mliska@suse.cz>
2179         PR target/103709
2180         * c-pragma.c (handle_pragma_pop_options): Do not check
2181         global options modification when an error is seen in parsing
2182         of options (pragmas or attributes).
2184 2021-12-12  Jonathan Wakely  <jwakely@redhat.com>
2186         * known-headers.cc: Define INCLUDE_MEMORY instead of
2187         INCLUDE_UNIQUE_PTR.
2188         * name-hint.h: Likewise.
2189         (class name_hint): Use std::unique_ptr instead of gnu::unique_ptr.
2191 2021-12-09  Jakub Jelinek  <jakub@redhat.com>
2193         PR pch/71934
2194         * c-pch.c (c_common_no_more_pch): Pass a temporary void * var
2195         with NULL value instead of NULL to host_hooks.gt_pch_use_address.
2197 2021-12-03  Jakub Jelinek  <jakub@redhat.com>
2199         PR pch/71934
2200         * c-pch.c (struct c_pch_validity): Remove pch_init member.
2201         (pch_init): Don't initialize v.pch_init.
2202         (c_common_valid_pch): Don't warn and punt if .text addresses change.
2204 2021-12-01  Jason Merrill  <jason@redhat.com>
2206         PR c++/103310
2207         * c.opt: Add -fconstexpr-fp-except.
2209 2021-11-29  Richard Biener  <rguenther@suse.de>
2211         * c-format.c (check_format_string): Remove spurious
2212         gcc_unreachable.
2214 2021-11-29  Richard Biener  <rguenther@suse.de>
2216         * c-opts.c (c_common_post_options): Remove unreachable return.
2217         * c-pragma.c (handle_pragma_target): Likewise.
2218         (handle_pragma_optimize): Likewise.
2220 2021-11-25  Jakub Jelinek  <jakub@redhat.com>
2222         PR c++/102611
2223         * c-opts.c (c_common_post_options): Enable -Wcomma-subscript by
2224         default for C++23 regardless of warn_deprecated.
2225         * c-cppbuiltin.c (c_cpp_builtins): Predefine
2226         __cpp_multidimensional_subscript=202110L for C++23.
2228 2021-11-23  Martin Sebor  <msebor@redhat.com>
2230         PR middle-end/88232
2231         * c.opt: Add -Winfinite-recursion.
2233 2021-11-19  Martin Sebor  <msebor@redhat.com>
2235         PR c++/33925
2236         PR c/102867
2237         * c-common.c (decl_with_nonnull_addr_p): Call maybe_nonzero_address
2238         and improve handling tof defined symbols.
2240 2021-11-19  Martin Liska  <mliska@suse.cz>
2242         Revert:
2243         2021-11-18  Martin Liska  <mliska@suse.cz>
2245         * c-gimplify.c (genericize_c_loop): Use option directly.
2247 2021-11-18  Matthias Kretz  <m.kretz@gsi.de>
2249         * c-common.c (c_common_reswords): Add __builtin_assoc_barrier.
2250         * c-common.h (enum rid): Add RID_BUILTIN_ASSOC_BARRIER.
2252 2021-11-18  Martin Liska  <mliska@suse.cz>
2254         * c-gimplify.c (genericize_c_loop): Use option directly.
2256 2021-11-17  Martin Uecker  <uecker@gcc.gnu.org>
2258         PR c/91038
2259         PR c/29970
2260         * c-common.c (pointer_int_sum): Make sure pointer expressions
2261         are evaluated first when the size expression depends on for
2262         variably-modified types.
2264 2021-11-17  Marek Polacek  <polacek@redhat.com>
2266         PR preprocessor/103026
2267         * c.opt (Wbidi-chars, Wbidi-chars=): New option.
2269 2021-11-16  Jason Merrill  <jason@redhat.com>
2271         * c-common.c (release_tree_vector): Only cache vecs smaller than
2272         16 elements.
2274 2021-11-15  Jason Merrill  <jason@redhat.com>
2276         * c.opt: Add -fimplicit-constexpr.
2277         * c-cppbuiltin.c: Define __cpp_implicit_constexpr.
2278         * c-opts.c (c_common_post_options): Disable below C++14.
2280 2021-11-15  Jakub Jelinek  <jakub@redhat.com>
2282         * c-omp.c (c_omp_split_clauses) <case OMP_CLAUSE_THREAD_LIMIT>:
2283         Duplicate to both OMP_TARGET and OMP_TEAMS.
2285 2021-11-10  Marek Polacek  <polacek@redhat.com>
2287         PR c++/101940
2288         * c-pragma.c (handle_pragma_diagnostic): Handle #pragma GCC diagnostic
2289         ignored_attributes.
2291 2021-11-09  David Malcolm  <dmalcolm@redhat.com>
2293         * c-pragma.c (GCC_BAD_AT): New macro.
2294         (GCC_BAD2_AT): New macro.
2295         (handle_pragma_pack): Use the location of the pertinent token when
2296         issuing diagnostics about invalid constants/actions, and trailing
2297         junk.
2298         (handle_pragma_target): Likewise for non-string "GCC option".
2299         (handle_pragma_message): Likewise for trailing junk.
2301 2021-11-03  Joseph Myers  <joseph@codesourcery.com>
2303         PR c/103031
2304         * c-common.c (convert_and_check): Add argument init_const.  Call
2305         convert_init if init_const.
2306         * c-common.h (convert_and_check): Update prototype.
2307         (convert_init): New prototype.
2309 2021-11-01  David Malcolm  <dmalcolm@redhat.com>
2311         * c-lex.c (c_lex_with_flags): When complaining about non-printable
2312         CPP_OTHER tokens, set the "escape on output" flag.
2314 2021-10-27  Jakub Jelinek  <jakub@redhat.com>
2316         * c-omp.c (c_omp_check_loop_iv_r): Don't clear 3rd bit for
2317         POINTER_PLUS_EXPR.
2318         (c_omp_check_nonrect_loop_iv): Handle POINTER_PLUS_EXPR.
2319         (c_omp_check_loop_iv): Set kind even if the iterator is non-integral.
2321 2021-10-27  Jakub Jelinek  <jakub@redhat.com>
2323         PR c++/102854
2324         * c-common.h (c_omp_check_loop_iv_exprs): Add enum tree_code argument.
2325         * c-omp.c (c_omp_check_loop_iv_r): For trees other than decls,
2326         TREE_VEC, PLUS_EXPR, MINUS_EXPR, MULT_EXPR, POINTER_PLUS_EXPR or
2327         conversions temporarily clear the 3rd bit from d->kind while walking
2328         subtrees.
2329         (c_omp_check_loop_iv_exprs): Add CODE argument.  Or in 4 into data.kind
2330         if possibly non-rectangular.
2332 2021-10-21  Jakub Jelinek  <jakub@redhat.com>
2334         PR middle-end/64888
2335         * c-omp.c (c_omp_predefined_variable): Return true also for
2336         ubsan_create_data created artificial variables.
2338 2021-10-14  Joseph Myers  <joseph@codesourcery.com>
2340         * c-format.c (printf_length_specs, scanf_length_specs)
2341         (print_char_table, scan_char_table): Support DFP formats for C2X.
2342         * c-format.h (TEX_D32, TEX_D64, TEX_D128): Remove.
2343         (T2X_D32, T2X_D64, T2X_D128): New macros.
2345 2021-10-14  Kwok Cheung Yeung  <kcy@codesourcery.com>
2347         * c-omp.c (c_omp_check_context_selector): Rename to
2348         omp_check_context_selector and move to omp-general.c.
2349         (c_omp_mark_declare_variant): Rename to omp_mark_declare_variant and
2350         move to omp-general.c.
2352 2021-10-12  Joseph Myers  <joseph@codesourcery.com>
2354         * c-format.c (print_char_table): Add %b and %B formats.
2355         (scan_char_table): Add %b format.
2356         * c-format.h (T2X_UI, T2X_UL, T2X_ULL, T2X_US, T2X_UC, T2X_ST)
2357         (T2X_UPD, T2X_UIM): New macros.
2359 2021-10-12  Jakub Jelinek  <jakub@redhat.com>
2361         * c-omp.c (c_finish_omp_atomic): Use
2362         clear_padding_type_may_have_padding_p.
2364 2021-10-08  Martin Liska  <mliska@suse.cz>
2366         * c-opts.c (c_common_post_options): Use new macro
2367         OPTION_SET_P.
2369 2021-10-07  Martin Liska  <mliska@suse.cz>
2371         * c-common.c (parse_optimize_options): Make
2372         save_opt_decoded_options a pointer type.
2374 2021-10-06  Jakub Jelinek  <jakub@redhat.com>
2376         PR tree-optimization/102571
2377         * c-omp.c (c_finish_omp_atomic): Optimize the case where type has
2378         padding, but the non-padding bits are contiguous set of bytes
2379         by adjusting the memcmp call arguments instead of emitting
2380         __builtin_clear_padding and then comparing all the type's bytes.
2382 2021-10-06  Jakub Jelinek  <jakub@redhat.com>
2384         PR c++/102612
2385         * c-cppbuiltin.c (c_cpp_builtins): For -std=c++23 predefine
2386         __cpp_constexpr to 202110L rather than 201907L.
2388 2021-10-04  Marek Polacek  <polacek@redhat.com>
2390         PR c++/97573
2391         * c-common.h (do_warn_array_compare): Declare.
2392         * c-warn.c (do_warn_array_compare): New.
2393         * c.opt (Warray-compare): New option.
2395 2021-10-02  Iain Sandoe  <iain@sandoe.co.uk>
2397         * c-format.c: Remove a test of TARGET_FORMAT_TYPES with
2398         NULL, this is not needed.
2400 2021-10-01  Martin Sebor  <msebor@redhat.com>
2402         PR c/102103
2403         * c-common.c (decl_with_nonnull_addr_p): Handle members.
2404         Check and perform warning suppression.
2405         (c_common_truthvalue_conversion): Enhance warning suppression.
2407 2021-10-01  Martin Liska  <mliska@suse.cz>
2409         PR target/102552
2410         * c-common.c (parse_optimize_options): decoded_options[0] is
2411         used for program name, so merged_decoded_options should also
2412         respect that.
2414 2021-10-01  Jakub Jelinek  <jakub@redhat.com>
2415             Richard Biener  <rguenther@suse.de>
2417         PR sanitizer/102515
2418         * c-ubsan.c (ubsan_instrument_division): Check the right
2419         flag_sanitize_recover bit, depending on which sanitization
2420         is done.  Sanitize INT_MIN / -1 under SANITIZE_SI_OVERFLOW
2421         rather than SANITIZE_DIVIDE.  If both SANITIZE_SI_OVERFLOW
2422         and SANITIZE_DIVIDE is enabled, neither check is known
2423         to be false and flag_sanitize_recover bits for those two
2424         aren't the same, emit both __ubsan_handle_divrem_overflow
2425         and __ubsan_handle_divrem_overflow_abort calls.
2427 2021-10-01  Martin Liska  <mliska@suse.cz>
2429         * c-common.c (parse_optimize_options): Combine optimize
2430         options with what was provided on the command line.
2432 2021-10-01  Jakub Jelinek  <jakub@redhat.com>
2434         * c-omp.c (c_omp_split_clauses): Also copy
2435         OMP_CLAUSE_ORDER_REPRODUCIBLE.
2437 2021-09-27  Martin Liska  <mliska@suse.cz>
2439         * c-opts.c (c_common_init_options_struct): Set also
2440         x_flag_default_complex_method.
2442 2021-09-22  Jakub Jelinek  <jakub@redhat.com>
2444         * c-omp.c (c_omp_split_clauses): Copy over OMP_CLAUSE_ALLOCATE_ALIGN.
2446 2021-09-20  Matthias Kretz  <m.kretz@gsi.de>
2448         * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Define or
2449         undefine __RECIPROCAL_MATH__, __NO_SIGNED_ZEROS__,
2450         __NO_TRAPPING_MATH__, __ASSOCIATIVE_MATH__, and
2451         __ROUNDING_MATH__ according to the new optimization flags.
2453 2021-09-18  Jakub Jelinek  <jakub@redhat.com>
2455         * c-omp.c (c_omp_split_clauses): Split order clause also to
2456         distribute construct.  Copy over OMP_CLAUSE_ORDER_UNCONSTRAINED.
2458 2021-09-17  Jakub Jelinek  <jakub@redhat.com>
2460         * c-omp.c (c_finish_omp_atomic): Avoid creating
2461         TARGET_EXPR if test is true, use create_tmp_var_raw instead of
2462         create_tmp_var and add a zero initializer to TARGET_EXPRs that
2463         had NULL initializer.  When omitting operands after v = x,
2464         use type of v rather than type of x.  Fix type of vtmp
2465         TARGET_EXPR.
2467 2021-09-13  Jason Merrill  <jason@redhat.com>
2469         * c.opt: Add -Winterference-size.
2470         * c-cppbuiltin.c (cpp_atomic_builtins): Add __GCC_DESTRUCTIVE_SIZE
2471         and __GCC_CONSTRUCTIVE_SIZE.
2473 2021-09-10  Jakub Jelinek  <jakub@redhat.com>
2475         * c-common.h (c_finish_omp_atomic): Add r and weak arguments.
2476         * c-omp.c: Include gimple-fold.h.
2477         (c_finish_omp_atomic): Add r and weak arguments.  Add support for
2478         OpenMP 5.1 atomics.
2480 2021-09-09  qing zhao  <qing.zhao@oracle.com>
2482         * c-attribs.c (handle_uninitialized_attribute): New function.
2483         (c_common_attribute_table): Add "uninitialized" attribute.
2485 2021-09-08  liuhongt  <hongtao.liu@intel.com>
2487         * c-common.c (excess_precision_mode_join): Update below comments.
2488         (c_ts18661_flt_eval_method): Set excess_precision_type to
2489         EXCESS_PRECISION_TYPE_FLOAT16 when -fexcess-precision=16.
2490         * c-cppbuiltin.c (cpp_atomic_builtins): Update below comments.
2491         (c_cpp_flt_eval_method_iec_559): Set excess_precision_type to
2492         EXCESS_PRECISION_TYPE_FLOAT16 when -fexcess-precision=16.
2494 2021-09-07  Marcel Vollweiler  <marcel@codesourcery.com>
2496         * c-omp.c (c_finish_omp_flush): Handle MEMMODEL_SEQ_CST.
2498 2021-09-03  Eric Botcazou  <ebotcazou@adacore.com>
2500         * c-ada-spec.c (dump_ads): Generate pragmas to disable style checks
2501         and -gnatwu warning for the package specification.
2503 2021-09-01  Iain Sandoe  <iain@sandoe.co.uk>
2505         * c-attribs.c (handle_unavailable_attribute): New.
2507 2021-08-30  Jason Merrill  <jason@redhat.com>
2509         * c.opt: Add -Wmissing-requires.
2511 2021-08-25  Lewis Hyatt  <lhyatt@gmail.com>
2513         PR other/93067
2514         * c-opts.c (c_common_input_charset_cb): New function.
2515         (c_common_post_options): Call new function
2516         diagnostic_initialize_input_context().
2518 2021-08-20  Tobias Burnus  <tobias@codesourcery.com>
2520         * c-format.c (gcc_gfc_length_specs): Add 'll' and 'w'.
2521         (gcc_gfc_char_table): Add T9L_LL and T9L_ULL to
2522         "di" and "u", respecitively; fill with BADLEN to match
2523         size of 'types'.
2524         (get_init_dynamic_hwi): Split off from ...
2525         (init_dynamic_diag_info): ... here. Call it.
2526         (init_dynamic_gfc_info): Call it.
2528 2021-08-20  Jakub Jelinek  <jakub@redhat.com>
2530         * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_ERROR.
2531         * c-pragma.c (omp_pragmas): Add error directive.
2532         * c-omp.c (omp_directives): Uncomment error directive entry.
2534 2021-08-18  Jakub Jelinek  <jakub@redhat.com>
2536         * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_NOTHING.
2537         * c-pragma.c (omp_pragmas): Add nothing directive.
2538         * c-omp.c (omp_directives): Uncomment nothing directive entry.
2540 2021-08-17  Jakub Jelinek  <jakub@redhat.com>
2542         PR c++/101539
2543         * c-common.h (enum rid): Add RID_IS_LAYOUT_COMPATIBLE.
2544         * c-common.c (c_common_reswords): Add __is_layout_compatible.
2546 2021-08-17  Matt Jacobson  <mhjacobson@me.com>
2548         * c-opts.c (c_common_post_options): Default to
2549         flag_objc_sjlj_exceptions = 1 only when flag_objc_abi < 2.
2551 2021-08-17  Jakub Jelinek  <jakub@redhat.com>
2553         * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_SCOPE.
2554         * c-pragma.c (omp_pragmas): Add scope construct.
2555         * c-omp.c (omp_directives): Uncomment scope directive entry.
2557 2021-08-16  Sebastian Huber  <sebastian.huber@embedded-brains.de>
2559         * c-cppbuiltin.c (c_cpp_builtins): Define
2560         __LIBGCC_GCOV_TYPE_SIZE if flag_building_libgcc is true.
2562 2021-08-12  Jakub Jelinek  <jakub@redhat.com>
2564         * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_MASKED.
2565         (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_FILTER.
2566         * c-pragma.c (omp_pragmas_simd): Add masked construct.
2567         * c-common.h (enum c_omp_clause_split): Add C_OMP_CLAUSE_SPLIT_MASKED
2568         enumerator.
2569         (c_finish_omp_masked): Declare.
2570         * c-omp.c (c_finish_omp_masked): New function.
2571         (c_omp_split_clauses): Handle combined masked constructs.
2573 2021-07-30  Jakub Jelinek  <jakub@redhat.com>
2575         PR c++/101539
2576         * c-common.h (enum rid): Add RID_IS_POINTER_INTERCONVERTIBLE_BASE_OF.
2577         * c-common.c (c_common_reswords): Add
2578         __is_pointer_interconvertible_base_of.
2580 2021-07-29  Richard Biener  <rguenther@suse.de>
2582         PR c/101512
2583         * c-common.c (c_common_mark_addressable_vec): Look through
2584         C_MAYBE_CONST_EXPR even if not at the toplevel.
2586 2021-07-27  Martin Sebor  <msebor@redhat.com>
2588         PR c/101585
2589         * c-warn.c (warn_parm_ptrarray_mismatch): Use OEP_DECL_NAME.
2591 2021-07-23  Jakub Jelinek  <jakub@redhat.com>
2593         * c-lex.c (c_common_has_attribute): Call canonicalize_attr_name also
2594         on attr_id.  Return 1 for omp::directive or omp::sequence in C++11
2595         and later.
2597 2021-07-23  Jakub Jelinek  <jakub@redhat.com>
2599         * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP__START_ and
2600         PRAGMA_OMP__LAST_ enumerators.
2602 2021-07-21  Thomas Schwinge  <thomas@codesourcery.com>
2603             Joseph Myers  <joseph@codesourcery.com>
2604             Cesar Philippidis  <cesar@codesourcery.com>
2606         * c-pragma.h (pragma_omp_clause): Add 'PRAGMA_OACC_CLAUSE_NOHOST'.
2608 2021-07-20  Martin Sebor  <msebor@redhat.com>
2610         * c-common.c (c_build_shufflevector): Adjust by-value argument to
2611         by-const-reference.
2612         * c-common.h (c_build_shufflevector): Same.
2614 2021-07-16  Andrew Pinski  <apinski@marvell.com>
2616         PR c/101453
2617         * c-common.c (parse_optimize_options): Use the correct
2618         size for buffer.
2620 2021-07-15  Martin Sebor  <msebor@redhat.com>
2622         PR c/101289
2623         PR c/97548
2624         * c-warn.c (warn_parm_array_mismatch): Use OEP_DECL_NAME.
2626 2021-07-14  Jason Merrill  <jason@redhat.com>
2628         * c-opts.c (c_common_post_options): Set -fdelete-dead-exceptions.
2630 2021-07-06  Martin Sebor  <msebor@redhat.com>
2632         * c-format.c (gcc_tdiag_char_table): Remove support for %G and %K.
2633         (gcc_cdiag_char_table): Same.
2634         (gcc_cxxdiag_char_table): Same.
2636 2021-07-02  Jakub Jelinek  <jakub@redhat.com>
2638         * c-common.h (enum c_omp_directive_kind): New enum.
2639         (struct c_omp_directive): New type.
2640         (c_omp_categorize_directive): Declare.
2641         * c-omp.c (omp_directives): New variable.
2642         (c_omp_categorize_directive): New function.
2644 2021-07-01  Eric Botcazou  <ebotcazou@adacore.com>
2646         * c-ada-spec.c (packed_layout): New global variable.
2647         (dump_ada_declaration): Set it upon seeing a packed record type.
2648         Do not put the "aliased" keyword if it is set.
2649         (dump_ada_structure): Add Pack aspect if it is set and clear it.
2651 2021-07-01  Eric Botcazou  <ebotcazou@adacore.com>
2653         * c-ada-spec.c (check_name): Rename into...
2654         (check_type_name_conflict): ...this.  Minor tweak.
2655         (dump_ada_function_declaration): Adjust to above renaming.
2656         (dump_ada_array_domains): Fix oversight.
2657         (dump_ada_declaration): Call check_type_name_conflict for variables.
2659 2021-06-25  Martin Sebor  <msebor@redhat.com>
2661         * c-common.c (c_wrap_maybe_const): Remove TREE_NO_WARNING.
2662         (c_common_truthvalue_conversion): Replace direct uses of
2663         TREE_NO_WARNING with warning_suppressed_p, suppress_warning, and
2664         copy_no_warning.
2665         (check_function_arguments_recurse): Same.
2666         * c-gimplify.c (c_gimplify_expr): Same.
2667         * c-warn.c (overflow_warning): Same.
2668         (warn_logical_operator): Same.
2669         (warn_if_unused_value): Same.
2670         (do_warn_unused_parameter): Same.
2672 2021-06-24  Jakub Jelinek  <jakub@redhat.com>
2674         * c-common.h (enum c_omp_region_type): Add C_ORT_TARGET and
2675         C_ORT_OMP_TARGET.
2676         * c-omp.c (c_omp_split_clauses): For OMP_CLAUSE_IN_REDUCTION on
2677         combined target constructs also add map (always, tofrom:) clause.
2679 2021-06-15  Robin Dapp  <rdapp@linux.ibm.com>
2681         * c-attribs.c (common_handle_aligned_attribute): Remove short
2682         circuit and dead code.
2684 2021-06-14  Jonathan Wakely  <jwakely@redhat.com>
2686         PR c++/101052
2687         * known-headers.cc (get_stdlib_header_for_name): Add known
2688         headers for EXIT_FAILURE, EXIT_SUCCESS, abort, atexit, calloc,
2689         exit, and getenv.
2691 2021-06-12  Jason Merrill  <jason@redhat.com>
2693         * c-attribs.c (handle_unused_attribute): Handle FIELD_DECL.
2695 2021-06-11  Jakub Jelinek  <jakub@redhat.com>
2697         PR c++/100974
2698         * c-cppbuiltin.c (c_cpp_builtins): Predefine __cpp_if_consteval for
2699         -std=c++2b for P1938R3 consteval if support.
2701 2021-06-09  Jason Merrill  <jason@redhat.com>
2703         PR c++/100879
2704         * c-warn.c (warn_for_sign_compare): Remove C++ enum mismatch
2705         warning.
2707 2021-06-07  Martin Liska  <mliska@suse.cz>
2709         * c-target.def: Split long lines and replace them
2710         with '\n\'.
2712 2021-06-04  Martin Sebor  <msebor@redhat.com>
2714         PR c/100783
2715         * c-attribs.c (positional_argument): Bail on erroneous types.
2717 2021-06-04  Martin Sebor  <msebor@redhat.com>
2719         * c-warn.c (warn_parm_array_mismatch): Check TREE_PURPOSE to test
2720         for element presence.
2722 2021-06-03  Eric Botcazou  <ebotcazou@adacore.com>
2724         * c-ada-spec.c (dump_ada_macros): Minor tweaks.
2725         (dump_ada_decl_name): Likewise.
2726         (dump_anonymous_type_name): Remove parent parameter and adjust.
2727         (dump_sloc): Minor tweak.
2728         (dump_ada_array_type): Remove type parameter and adjust.
2729         (dump_ada_enum_type): Remove parent parameter and adjust.
2730         (dump_ada_node): Adjust calls to above functions.
2731         (dumped_anonymous_types): New global variable.
2732         (dump_nested_types_1): Rename into...
2733         (dump_nested_types): ...this.
2734         (dump_nested_type): Remove parent and dumped_types parameters.
2735         <ARRAY_TYPE>: Replace dumped_types with dumped_anonymous_types.
2736         Adjust calls to dump_anonymous_type_name and dump_ada_array_type.
2737         (dump_ada_specs): Initialize and free dumped_anonymous_types.
2739 2021-06-03  Eric Botcazou  <ebotcazou@adacore.com>
2741         * c-ada-spec.c (pp_ada_tree_identifier): Tidy up.
2742         (dump_ada_node) <POINTER_TYPE>: Deal specially with external subtypes.
2744 2021-06-03  Eric Botcazou  <ebotcazou@adacore.com>
2746         * c-ada-spec.c (dump_ada_enum_type): Dump a prefix for constants.
2747         (htable_t): New typedef.
2748         (overloaded_names): Use it.
2749         (add_name): New function.
2750         (init_overloaded_names): Use add_name to populate the table and add
2751         special cases for sigaction and stat.
2752         (overloaded_name_p): Rename into...
2753         (overloading_index): ...this.  Do not initialize overloaded_names table
2754         here.  Return the index or zero.
2755         (dump_ada_declaration): Minor tweaks.  Do not skip overloaded functions
2756         but add an overloading suffix instead.
2757         (dump_ada_specs): Initialize overloaded_names tables here.
2759 2021-06-01  Martin Liska  <mliska@suse.cz>
2761         PR other/100759
2762         * c-attribs.c (handle_optimize_attribute): Limit sanity check
2763         to a situation where we are not in processing of an optimize
2764         pragma.
2765         * c-pragma.c (handle_pragma_pop_options): Restore target
2766         options.
2768 2021-05-31  Indu Bhagat  <indu.bhagat@oracle.com>
2770         PR testsuite/100749
2771         * c-pch.c (c_common_valid_pch): Use xstrdup for debug format set names.
2773 2021-05-31  Richard Biener  <rguenther@suse.de>
2775         PR c++/88601
2776         * c-common.c: Include tree-vector-builder.h and
2777         vec-perm-indices.h.
2778         (c_common_reswords): Add __builtin_shufflevector.
2779         (c_build_shufflevector): New funtion.
2780         * c-common.h (enum rid): Add RID_BUILTIN_SHUFFLEVECTOR.
2781         (c_build_shufflevector): Declare.
2783 2021-05-28  Jakub Jelinek  <jakub@redhat.com>
2785         PR middle-end/99928
2786         * c-omp.c (c_omp_split_clauses): For reduction clause if combined with
2787         target add a map tofrom clause with OMP_CLAUSE_MAP_IMPLICIT.
2789 2021-05-28  Tobias Burnus  <tobias@codesourcery.com>
2791         * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_AFFINITY.
2793 2021-05-25  Martin Liska  <mliska@suse.cz>
2795         PR tree-optimization/92860
2796         PR target/99592
2797         * c-attribs.c (handle_optimize_attribute): Save target node
2798         before calling parse_optimize_options and save it in case
2799         it changes.
2800         * c-pragma.c (handle_pragma_target): Similarly for pragma.
2801         (handle_pragma_pop_options): Likewise here.
2803 2021-05-25  Martin Liska  <mliska@suse.cz>
2805         * c-attribs.c (handle_no_sanitize_coverage_attribute): New.
2807 2021-05-25  Jakub Jelinek  <jakub@redhat.com>
2809         PR middle-end/99928
2810         * c-omp.c (c_omp_split_clauses): Copy reduction to teams when teams is
2811         combined with simd and not with taskloop or for.
2813 2021-05-21  Jakub Jelinek  <jakub@redhat.com>
2815         PR middle-end/99928
2816         * c-omp.c (c_omp_split_clauses): Set OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT
2817         on firstprivate clause copy going to target construct, and for
2818         target simd set also OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT_TARGET bit.
2820 2021-05-20  Jonathan Wakely  <jwakely@redhat.com>
2822         * c.opt (Wc++11-extensions, Wc++14-extensions)
2823         (Wc++17-extensions, Wc++20-extensions, Wc++23-extensions): New
2824         options.
2826 2021-05-20  Indu Bhagat  <indu.bhagat@oracle.com>
2828         * c-lex.c (init_c_lex): Use dwarf_debuginfo_p.
2830 2021-05-20  Indu Bhagat  <indu.bhagat@oracle.com>
2832         * c-opts.c (c_common_post_options): Adjust access to debug_type_names.
2833         * c-pch.c (struct c_pch_validity): Use type uint32_t.
2834         (pch_init): Renamed member.
2835         (c_common_valid_pch): Adjust access to debug_type_names.
2837 2021-05-19  Martin Sebor  <msebor@redhat.com>
2839         PR c/100619
2840         * c-attribs.c (build_attr_access_from_parms): Handle arbitrarily many
2841         bounds.
2843 2021-05-18  Richard Biener  <rguenther@suse.de>
2845         PR c/100547
2846         * c-attribs.c (type_valid_for_vector_size): Reject too large nunits.
2847         Reword existing nunit diagnostic.
2849 2021-05-17  Joern Rennecke  <joern.rennecke@embecosm.com>
2851         * c-common.c (braced_list_to_string): Return CTOR unchanged
2852         if host and target character sizes don't match.
2854 2021-05-14  Martin Liska  <mliska@suse.cz>
2856         * c.opt: Add Warning keyword for 2 options.
2858 2021-05-13  Martin Liska  <mliska@suse.cz>
2860         PR middle-end/100504
2861         * c-attribs.c (handle_target_clones_attribute): Expect a string
2862         argument to target_clone argument.
2864 2021-05-11  Joseph Myers  <joseph@codesourcery.com>
2866         * c-lex.c (interpret_float): Handle digit separators for C2X.
2868 2021-05-10  Martin Liska  <mliska@suse.cz>
2870         * c-ada-spec.c (print_destructor): Use startswith
2871         function instead of strncmp.
2872         (dump_ada_declaration): Likewise.
2873         * c-common.c (disable_builtin_function): Likewise.
2874         (def_builtin_1): Likewise.
2875         * c-format.c (check_tokens): Likewise.
2876         (check_plain): Likewise.
2877         (convert_format_name_to_system_name): Likewise.
2879 2021-04-28  Patrick McGehearty  <patrick.mcgehearty@oracle.com>
2881         * c-cppbuiltin.c (c_cpp_builtins): Add supporting macros for new
2882         complex divide
2884 2021-04-26  Thomas Schwinge  <thomas@codesourcery.com>
2885             Nathan Sidwell  <nathan@codesourcery.com>
2886             Tom de Vries  <vries@codesourcery.com>
2887             Julian Brown  <julian@codesourcery.com>
2888             Kwok Cheung Yeung  <kcy@codesourcery.com>
2890         * c.opt (Wopenacc-parallelism): New.
2892 2021-04-19  Thomas Schwinge  <thomas@codesourcery.com>
2894         * c.opt (fopenacc-kernels=): Remove.
2896 2021-04-08  Jakub Jelinek  <jakub@redhat.com>
2898         * c-warn.c (do_warn_double_promotion): Fix comment typo,
2899         occured -> occurred.
2900         (check_alignment_of_packed_member): Fix a comment typo,
2901         memeber -> member.
2902         (warn_parm_ptrarray_mismatch): Fix comment typos, os -> of
2903         and onless -> unless.
2904         (warn_parm_array_mismatch): Fix comment typos, declaratation
2905         -> declaration and woud -> would.  Fix up comment indentation.
2907 2021-04-08  Martin Sebor  <msebor@redhat.com>
2909         PR middle-end/99883
2910         * c.opt (Wmismatched-new-delete): Correct spelling.
2912 2021-04-05  Eric Botcazou  <ebotcazou@adacore.com>
2914         * c-ada-spec.c (is_simple_enum): Minor tweaks.
2915         (dump_ada_enum_type): Add TYPE and PARENT parameters.  For non-simple
2916         enumeral types use again the type name for the enumeration constants.
2917         (dump_ada_node): Adjust call to dump_ada_enum_type.
2918         (dump_nested_type): Likewise.
2920 2021-04-01  Jason Merrill  <jason@redhat.com>
2922         PR c++/98481
2923         * c-opts.c (c_common_post_options): Bump latest_abi_version.
2925 2021-03-25  Jakub Jelinek  <jakub@redhat.com>
2927         PR c++/99565
2928         * c-warn.c (do_warn_duplicated_branches): Pass also
2929         OEP_ADDRESS_OF_SAME_FIELD to operand_equal_p.
2931 2021-03-20  Jakub Jelinek  <jakub@redhat.com>
2933         PR debug/99230
2934         * c-gimplify.c (c_genericize_control_stmt): Handle STATEMENT_LIST.
2936 2021-03-05  Eric Botcazou  <ebotcazou@adacore.com>
2938         * c-ada-spec.c (dump_ada_declaration) <TYPE_DECL>: Dump nested types
2939         after entering the separate class package, if any.
2941 2021-03-04  Richard Biener  <rguenther@suse.de>
2943         * c-pretty-print.c (c_pretty_printer::direct_abstract_declarator):
2944         Handle ERROR_MARK.
2946 2021-03-04  Jakub Jelinek  <jakub@redhat.com>
2948         PR c/99325
2949         * c-ppoutput.c (print): Change src_line type from int to unsigned.
2950         (token_streamer::stream) Likewise.
2951         (maybe_print_line_1): Likewise.  Don't strcmp src_file if src_loc is
2952         UNKNOWN_LOCATION.
2954 2021-03-03  Jakub Jelinek  <jakub@redhat.com>
2956         PR c/99324
2957         * c-common.c (build_va_arg): Call c_common_mark_addressable_vec
2958         instead of mark_addressable.  Fix a comment typo -
2959         neutrallly -> neutrally.
2961 2021-02-28  Jakub Jelinek  <jakub@redhat.com>
2963         PR c/99304
2964         * c-attribs.c (handle_malloc_attribute): Fix a typo in inform
2965         message - refernced -> referenced.  Remove superfluous space before
2966         closing paren of function calls.
2968 2021-02-25  Nathan Sidwell  <nathan@acm.org>
2970         PR c++/99166
2971         * c.opt (-flang-info-module-cmi): Renamed option.
2973 2021-02-19  Nathan Sidwell  <nathan@acm.org>
2975         * c.opt (flang-info-module-read, flang-info-module-read=): New.
2977 2021-02-18  H.J. Lu  <hjl.tools@gmail.com>
2979         PR target/99113
2980         * c-attribs.c (c_common_attribute_table): Add the "retain"
2981         attribute.
2982         (handle_retain_attribute): New function.
2984 2021-02-16  Marek Polacek  <polacek@redhat.com>
2986         PR c++/99062
2987         * c-attribs.c (handle_assume_aligned_attribute): Check that the
2988         alignment argument is non-negative.  Tweak a warning message.
2990 2021-02-12  Martin Sebor  <msebor@redhat.com>
2992         PR c/99055
2993         * c-warn.c (warn_parm_array_mismatch): Free strings returned from
2994         print_generic_expr_to_str.
2996 2021-02-10  Richard Biener  <rguenther@suse.de>
2998         * c-common.c (parse_optimize_options): Free decoded_options.
3000 2021-02-04  emsr  <3dw4rd@verizon.net>
3002         * c-cppbuiltin.c (c_cpp_builtins): __cpp_size_t_suffix=202011L.
3004 2021-02-03  Ed Smith-Rowland  <3dw4rd@verizon.net>
3006         * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_size_t_suffix.
3007         * c-lex.c (interpret_integer): Set node type for size literal.
3009 2021-01-28  Jakub Jelinek  <jakub@redhat.com>
3011         * c.opt (-std=c++2a, -std=c++20, -std=gnu++2a, -std=gnu++20): Remove
3012         draft from description.
3013         (-std=c++2b): Fix a pasto, 2020 -> 2023.
3015 2021-01-26  Paul Fee  <paul.f.fee@gmail.com>
3017         * c-common.h (cxx_dialect): Add cxx23 as a dialect.
3018         * c.opt: Add options for -std=c++23, std=c++2b, -std=gnu++23
3019         and -std=gnu++2b
3020         * c-opts.c (set_std_cxx23): New.
3021         (c_common_handle_option): Set options when -std=c++23 is enabled.
3022         (c_common_post_options): Adjust comments.
3023         (set_std_cxx20): Likewise.
3025 2021-01-25  Martin Sebor  <msebor@redhat.com>
3027         PR c++/98646
3028         * c-common.c (check_nonnull_arg): Adjust warning text.
3030 2021-01-17  Martin Sebor  <msebor@redhat.com>
3032         * c-pretty-print.c (c_pretty_printer::primary_expression): Don't
3033         assume SSA_NAME_IDENTIFIER evaluates to nonzero.
3035 2021-01-16  Kwok Cheung Yeung  <kcy@codesourcery.com>
3037         * c-pragma.h (pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_DETACH.
3038         Redefine PRAGMA_OACC_CLAUSE_DETACH.
3040 2021-01-15  Jakub Jelinek  <jakub@redhat.com>
3042         PR tree-optimization/98597
3043         * c-pretty-print.c: Include options.h.
3044         (c_fold_indirect_ref_for_warn): New function.
3045         (print_mem_ref): Use it.  If it returns something that has compatible
3046         type and is TBAA compatible with zero offset, print it and return,
3047         otherwise print it using offsetof syntax or array ref syntax.  Fix up
3048         printing if MEM_REFs first operand is ADDR_EXPR, or when the first
3049         argument has pointer to array type.  Print pointers using the standard
3050         formatting.
3052 2021-01-12  Martin Sebor  <msebor@redhat.com>
3054         PR c/98597
3055         PR c/98592
3056         * c-pretty-print.c (print_mem_ref): Avoid assuming MEM_REF operand
3057         has pointer type.  Remove redundant code.  Avoid calling
3058         gimple_canonical_types_compatible_p.
3060 2021-01-07  Martin Sebor  <msebor@redhat.com>
3062         PR middle-end/98578
3063         * c-pretty-print.c (print_mem_ref): Strip array from access type.
3064         Avoid assuming acces type's size is constant.  Correct condition
3065         guarding the printing of a parenthesis.
3067 2021-01-06  Martin Sebor  <msebor@redhat.com>
3069         PR c++/95768
3070         * c-pretty-print.c (c_pretty_printer::primary_expression): For
3071         SSA_NAMEs print VLA names and GIMPLE defining statements.
3072         (print_mem_ref): New function.
3073         (c_pretty_printer::unary_expression): Call it.
3075 2021-01-06  Richard Biener  <rguenther@suse.de>
3077         PR tree-optimization/95582
3078         * c-attribs.c (c_common_attribute_table): Add entry for
3079         signed_bool_precision.
3080         (handle_signed_bool_precision_attribute): New.
3082 2020-12-24  Iain Sandoe  <iain@sandoe.co.uk>
3084         * c.opt: Add -stdlib= option and enumerations for
3085         libstdc++ and libc++.
3087 2020-12-16  Martin Liska  <mliska@suse.cz>
3089         * c.opt: Remove usage of Report.
3091 2020-12-14  Martin Sebor  <msebor@redhat.com>
3093         PR middle-end/98166
3094         PR c++/57111
3095         PR middle-end/98160
3096         * c-attribs.c (maybe_add_noinline): New function.
3097         (handle_malloc_attribute): Call it.  Use ATTR_FLAG_INTERNAL.
3098         Implicitly add attribute noinline to functions not declared inline
3099         and warn on those.
3101 2020-12-09  Tobias Burnus  <tobias@codesourcery.com>
3103         * c-pragma.c (omp_pragmas): Add 'allocate'.
3104         * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_ALLOCATE.
3106 2020-12-08  Jakub Jelinek  <jakub@redhat.com>
3108         PR c++/98187
3109         * c-pragma.c (omp_pragmas): Remove "master".
3110         (omp_pragmas_simd): Add "master".
3112 2020-12-07  Marek Polacek  <polacek@redhat.com>
3114         PR c++/98126
3115         * c-common.c (verify_tree_lim_r): New function.
3116         (verify_sequence_points): Use it.  Use nullptr instead of 0.
3118 2020-12-03  Martin Sebor  <msebor@redhat.com>
3120         PR c++/90629
3121         PR middle-end/94527
3122         * c-attribs.c (handle_dealloc_attribute): New function.
3123         (handle_malloc_attribute): Handle argument forms of attribute.
3124         * c.opt (-Wmismatched-dealloc): New option.
3125         (-Wmismatched-new-delete): New option.
3127 2020-12-03  Jakub Jelinek  <jakub@redhat.com>
3129         PR libstdc++/93121
3130         * c-common.h (enum rid): Add RID_BUILTIN_BIT_CAST.
3131         * c-common.c (c_common_reswords): Add __builtin_bit_cast.
3133 2020-12-01  JeanHeyd Meneide  <phdofthehouse@gmail.com>
3135         * c-cppbuiltin.c (c_cpp_builtins): Add predefined
3136         {__GNUC_EXECUTION_CHARSET_NAME} and
3137         _WIDE_EXECUTION_CHARSET_NAME} macros.
3139 2020-12-01  Nathan Sidwell  <nathan@acm.org>
3141         * c-common.c (module, import, export): New internal tokens (with
3142         trailing space).
3143         * c-common.h (RID__MODULE, RID__IMPORT & RID__EXPORT): Enumerate
3144         them.
3145         (D_CXX_MODULES, D_CXX_MODULES_FLAGS): Enable them.
3146         * c-cppbuiltin.c (c_cpp_builtins): Feature macro.
3148 2020-12-01  Nathan Sidwell  <nathan@acm.org>
3150         * c-opts.c (c_common_init_options): Ask for module dependencies.
3151         (c_common_handle_option): Handle -Mmodules -Mno-modules.
3152         * c-pch.c (c_common_valid_pch): ... does not play with C++
3153         modules.
3154         * c.opt (Mmodules, Mno-modules): New preprocessor dependency
3155         options.
3156         (fmodules-ts, fmodule-header, fmodule-implicit-inline)
3157         (fmodule-only, fmodule-mapper, fmodule-lazy)
3158         (fmodule-version-ignore, Winvalid-imported-macros)
3159         (flang-info-include-translate, flang-info-include-translate-not):
3160         New options
3162 2020-11-28  Eric Botcazou  <ebotcazou@adacore.com>
3164         * c-ada-spec.c (dump_nested_type) <RECORD_TYPE>: Remove obsolete code.
3165         (dump_ada_structure): Also deal with convention, unchecked union and
3166         bit-field for nested types.  In the latter case, print an Alignment
3167         aspect along with the Pack aspect.
3169 2020-11-25  Martin Sebor  <msebor@redhat.com>
3171         PR bootstrap/94982
3172         * c-attribs.c (handle_patchable_function_entry_attribute): Avoid
3173         -Wformat-diag.
3175 2020-11-24  Martin Sebor  <msebor@redhat.com>
3177         * c-warn.c (warn_parm_array_mismatch): Avoid invalid redeclarations.
3179 2020-11-23  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
3181         * c-attribs.c (handle_special_var_sec_attribute): New.
3182         (handle_noinit_attribute): Remove.
3183         (attr_noinit_exclusions): Rename to...
3184         (attr_section_exclusions): ...this, and add "persistent" attribute
3185         exclusion.
3186         (c_common_attribute_table): Add "persistent" attribute.
3188 2020-11-21  Aaron Sawdey  <acsawdey@linux.ibm.com>
3190         * c-pretty-print.c (c_pretty_printer::simple_type_specifier):
3191         Treat opaque types like other types.
3192         (c_pretty_printer::direct_abstract_declarator): Opaque types are
3193         supported types.
3195 2020-11-20  Martin Sebor  <msebor@redhat.com>
3197         * c-warn.c (warn_parm_array_mismatch): Bail on invalid redeclarations
3198         with fewer arguments.
3200 2020-11-20  Martin Sebor  <msebor@redhat.com>
3202         PR middle-end/97879
3203         * c-attribs.c (handle_access_attribute): Handle ATTR_FLAG_INTERNAL.
3204         Error out on invalid modes.
3206 2020-11-20  Jakub Jelinek  <jakub@redhat.com>
3208         PR libstdc++/88101
3209         * c-common.c (check_builtin_function_arguments): Handle
3210         BUILT_IN_CLEAR_PADDING.
3212 2020-11-18  Nathan Sidwell  <nathan@acm.org>
3214         * c-lex.c (c_lex_with_flags): CPP_HEADER_NAMEs can now be seen.
3216 2020-11-17  Nathan Sidwell  <nathan@acm.org>
3218         * c-common.h (enum c_tree_index): Reorder to place lazy fields
3219         after newly-added CTI_MODULE_HWM.
3221 2020-11-17  Joseph Myers  <joseph@codesourcery.com>
3223         * c-cppbuiltin.c (builtin_define_float_constants): Define
3224         "*_IS_IEC_60559__" macros.
3226 2020-11-17  Nathan Sidwell  <nathan@acm.org>
3228         * c-lex.c: #include "langhooks.h".
3229         (cb_undef): Maybe call preprocess_undef lang hook.
3230         * c-opts.c (c_common_post_options): Maybe call preprocess_options
3231         lang hook.
3232         (push_command_line_include): Maybe call preprocess_main_file lang
3233         hook.
3234         (cb_file_change): Likewise.
3235         * c-ppoutput.c: #include "langhooks.h.
3236         (scan_translation_unit): Maybe call preprocess_token lang hook.
3237         (class do_streamer): New, derive from token_streamer.
3238         (directives_only_cb): Data pointer is do_streamer, call
3239         preprocess_token lang hook.
3240         (scan_translation_unit_directives_only): Use do_streamer.
3241         (print_line_1): Move src_line recording to after string output.
3242         (cb_undef): Maybe call preprocess_undef lang hook.
3244 2020-11-17  Nathan Sidwell  <nathan@acm.org>
3246         * c-ppoutput.c (scan_translation_unit): Use token_streamer, remove
3247         code duplicating that functionality.
3249 2020-11-17  Jakub Jelinek  <jakub@redhat.com>
3251         PR c/90628
3252         * c-common.c (check_builtin_function_arguments)
3253         <case BUILT_IN_ADD_OVERFLOW>: Diagnose when last argument is pointer
3254         to _Atomic.  For the TYPE_READONLY case, adjust message to be usable
3255         for more builtins and argument positions.
3257 2020-11-16  Iain Sandoe  <iain@sandoe.co.uk>
3259         PR objc/97854
3260         * stub-objc.c: Include c-common.h to declare enum rid.
3262 2020-11-13  Jakub Jelinek  <jakub@redhat.com>
3264         PR c++/63287
3265         * c-cppbuiltin.c: Include configargs.h.
3266         (c_cpp_builtins): For C++11 and later if THREAD_MODEL_SPEC is not
3267         defined, predefine __STDCPP_THREADS__ to 1 unless thread_model is
3268         "single".
3270 2020-11-13  Gergö Barany  <gergo@codesourcery.com>
3271             Thomas Schwinge  <thomas@codesourcery.com>
3273         * c.opt (fopenacc-kernels): Add.
3275 2020-11-13  Jason Merrill  <jason@redhat.com>
3277         * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_using_enum.
3279 2020-11-13  Piotr H. Dabrowski  <phd@phd.re>
3281         PR c++/91318
3282         * c-cppbuiltin.c: c_cpp_builtins_optimize_pragma(): use cpp_define_unused()
3284 2020-11-13  Martin Liska  <mliska@suse.cz>
3286         * c-attribs.c (build_attr_access_from_parms): Format properly.
3288 2020-11-13  Iain Sandoe  <iain@sandoe.co.uk>
3290         PR objc/90707
3291         * c-common.c (c_common_reswords): null_unspecified, nullable,
3292         nonnull, null_resettable: New keywords.
3293         * c-common.h (enum rid): RID_NULL_UNSPECIFIED, RID_NULLABLE,
3294         RID_NONNULL, RID_NULL_RESETTABLE: New.
3295         (OBJC_IS_PATTR_KEYWORD): Include nullability keywords in the
3296         ranges accepted for property attributes.
3297         * c-attribs.c (handle_objc_nullability_attribute): New.
3298         * c-objc.h (enum objc_property_attribute_group): Add
3299         OBJC_PROPATTR_GROUP_NULLABLE.
3300         (enum objc_property_attribute_kind):Add
3301         OBJC_PROPERTY_ATTR_NULL_UNSPECIFIED, OBJC_PROPERTY_ATTR_NULLABLE,
3302         OBJC_PROPERTY_ATTR_NONNULL, OBJC_PROPERTY_ATTR_NULL_RESETTABLE.
3304 2020-11-13  Iain Sandoe  <iain@sandoe.co.uk>
3306         PR objc/77404
3307         * c-attribs.c (handle_objc_root_class_attribute): New
3308         * c-objc.h (objc_start_class_interface): Add a location
3309         value for the position of the class name.
3310         * c.opt: Add Wobjc-root-class.
3311         * stub-objc.c (objc_start_class_interface): Add a location
3312         value for the position of the class name.
3314 2020-11-12  Joseph Myers  <joseph@codesourcery.com>
3316         * c-lex.c (c_common_has_attribute): Take argument std_syntax.
3317         Allow scope for C.  Handle standard attributes for C.  Do not
3318         accept unscoped attributes if std_syntax and not handled as
3319         standard attributes.
3320         * c-common.h (c_common_has_attribute): Update prototype.
3322 2020-11-12  Nicholas Guriev  <guriev-ns@ya.ru>
3324         PR pch/86674
3325         * c-pch.c (c_common_valid_pch): Use cpp_warning with CPP_W_INVALID_PCH
3326         reason to fix -Werror=invalid-pch and -Wno-error=invalid-pch switches.
3328 2020-11-11  Patrick Palka  <ppalka@redhat.com>
3330         PR c++/88115
3331         * c-opts.c (c_common_post_options): Update latest_abi_version.
3333 2020-11-10  Jakub Jelinek  <jakub@redhat.com>
3335         PR c/97748
3336         * c-common.h (warn_if_unused_value): Add quiet argument defaulted
3337         to false.
3338         * c-warn.c (warn_if_unused_value): Likewise.  Pass it down
3339         recursively and just return true instead of warning if it is true.
3340         Handle COMPLEX_EXPR.
3342 2020-11-10  Chung-Lin Tang  <cltang@codesourcery.com>
3344         * c-common.h (c_omp_adjust_map_clauses): New declaration.
3345         * c-omp.c (struct map_clause): Helper type for c_omp_adjust_map_clauses.
3346         (c_omp_adjust_map_clauses): New function.
3348 2020-11-09  Marek Polacek  <polacek@redhat.com>
3350         DR 1914
3351         * c-common.c (attribute_fallthrough_p): Tweak the warning
3352         message.
3354 2020-11-09  Patrick Palka  <ppalka@redhat.com>
3356         * c-pragma.c (handle_pragma_diagnostic): Split the
3357         unknown-option -Wpragmas diagnostic into a warning and a
3358         subsequent note containing a spelling suggestion.  Avoid
3359         computing the suggestion if -Wpragmas warnings are being
3360         suppressed.
3362 2020-11-09  Patrick Palka  <ppalka@redhat.com>
3364         PR testsuite/97117
3365         * c-indentation.c (get_visual_column): Remove location_t
3366         parameter.  Move the column-tracking diagnostic code from here
3367         to ...
3368         (should_warn_for_misleading_indentation): ... here, before the
3369         early exit for when the loci are not all distinct.  Don't pass a
3370         location_t argument to get_visual_column.
3371         (assert_get_visual_column_succeeds): Don't pass a location_t
3372         argument to get_visual_column.
3373         (assert_get_visual_column_fails): Likewise.
3375 2020-11-08  Iain Sandoe  <iain@sandoe.co.uk>
3377         * c-common.h (OBJC_IS_PATTR_KEYWORD): Add class to the list
3378         of keywords accepted in @property attribute contexts.
3379         * c-objc.h (enum objc_property_attribute_group): Add
3380         OBJC_PROPATTR_GROUP_CLASS.
3381         (enum objc_property_attribute_kind): Add
3382         OBJC_PROPERTY_ATTR_CLASS.
3384 2020-11-07  Iain Sandoe  <iain@sandoe.co.uk>
3386         * c-common.c (c_common_reswords): Add 'atomic' property
3387         attribute.
3388         * c-common.h (enum rid): Add RID_PROPATOMIC for atomic
3389         property attributes.
3391 2020-11-07  Iain Sandoe  <iain@sandoe.co.uk>
3393         * c-attribs.c (handle_nsobject_attribute): New.
3394         * c.opt: Add WNSObject-attribute.
3396 2020-11-06  Iain Sandoe  <iain@sandoe.co.uk>
3398         * c-objc.h (enum objc_property_attribute_group): New
3399         (enum objc_property_attribute_kind): New.
3400         (OBJC_PROPATTR_GROUP_MASK): New.
3401         (struct property_attribute_info): Small class encapsulating
3402         parser output from property attributes.
3403         (objc_prop_attr_kind_for_rid): New
3404         (objc_add_property_declaration): Simplify interface.
3405         * stub-objc.c (enum rid): Dummy type.
3406         (objc_add_property_declaration): Simplify interface.
3407         (objc_prop_attr_kind_for_rid): New.
3409 2020-11-06  Nathan Sidwell  <nathan@acm.org>
3411         * c-ada-spec.c (collect_ada_nodes): Rename
3412         DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
3413         (collect_ada_node): Likewise.
3414         (dump_forward_type): Likewise.
3415         * c-common.c (set_underlying_type): Rename
3416         DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
3417         (user_facing_original_type, c_common_finalize_early_debug): Likewise.
3419 2020-11-06  Jakub Jelinek  <jakub@redhat.com>
3421         * c-common.c (verify_sequence_points): Remove DEBUG_FUNCTION.
3423 2020-11-05  Marek Polacek  <polacek@redhat.com>
3425         PR c++/97675
3426         * c.opt (Wexceptions): New option.
3428 2020-11-05  Marek Polacek  <polacek@redhat.com>
3430         PR c++/25814
3431         * c.opt (Wvexing-parse): New option.
3433 2020-11-04  Jakub Jelinek  <jakub@redhat.com>
3435         PR c++/97670
3436         * c-omp.c (c_omp_split_clauses): Look through array reductions to find
3437         underlying decl to clear in the allocate_head bitmap.
3439 2020-11-04  Iain Sandoe  <iain@sandoe.co.uk>
3441         * c-objc.h (objc_non_constant_expr_p): New.
3442         * stub-objc.c (objc_non_constant_expr_p): New.
3444 2020-11-03  Nathan Sidwell  <nathan@acm.org>
3446         * c.opt (MQ,MT): Reword description to be make-agnostic.
3448 2020-11-02  Nathan Sidwell  <nathan@acm.org>
3450         * c-opts.c (c_common_post_options): Move var decl to its
3451         initialization point.
3453 2020-11-01  Iain Sandoe  <iain@sandoe.co.uk>
3455         * c-lex.c (c_lex_with_flags): When combining '@' with a
3456         keyword for Objective-C, combine the location ranges too.
3458 2020-10-30  Qing Zhao  <qing.zhao@oracle.com>
3459             H.J.Lu  <hjl.tools@gmail.com>
3461         * c-attribs.c (c_common_attribute_table): Add new attribute
3462         zero_call_used_regs.
3463         (handle_zero_call_used_regs_attribute): New function.
3465 2020-10-28  Marek Polacek  <polacek@redhat.com>
3467         PR c++/97573
3468         * c-opts.c (c_common_post_options): In C++20, turn on
3469         -Wdeprecated-enum-enum-conversion and
3470         -Wdeprecated-enum-float-conversion.
3471         * c.opt (Wdeprecated-enum-enum-conversion,
3472         Wdeprecated-enum-float-conversion): New options.
3473         (Wenum-conversion): Allow for C++ too.
3475 2020-10-28  Jakub Jelinek  <jakub@redhat.com>
3477         * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ALLOCATE.
3478         * c-omp.c: Include bitmap.h.
3479         (c_omp_split_clauses): Handle OMP_CLAUSE_ALLOCATE.
3481 2020-10-26  Ville Voutilainen  <ville.voutilainen@gmail.com>
3483         * c-common.c (__is_nothrow_assignable): New.
3484         (__is_nothrow_constructible): Likewise.
3485         * c-common.h (RID_IS_NOTHROW_ASSIGNABLE): New.
3486         (RID_IS_NOTHROW_CONSTRUCTIBLE): Likewise.
3488 2020-10-23  Jan Hubicka  <hubicka@ucw.cz>
3490         * c-common.c (c_common_finalize_early_debug): Update for new thunk api.
3492 2020-10-23  Marek Polacek  <polacek@redhat.com>
3494         PR c++/91741
3495         * c-common.c (verify_tree): Handle PAREN_SIZEOF_EXPR.
3496         (c_common_init_ts): Likewise.
3497         * c-common.def (PAREN_SIZEOF_EXPR): New tree code.
3498         * c-common.h (maybe_warn_sizeof_array_div): Declare.
3499         * c-warn.c (sizeof_pointer_memaccess_warning): Unwrap NOP_EXPRs.
3500         (maybe_warn_sizeof_array_div): New function.
3501         * c.opt (Wsizeof-array-div): New option.
3503 2020-10-23  Martin Sebor  <msebor@redhat.com>
3505         PR c/97463
3506         * c-warn.c (warn_parm_ptrarray_mismatch): Move null test earlier.
3508 2020-10-22  Martin Liska  <mliska@suse.cz>
3510         PR c/94722
3511         * c-attribs.c (handle_no_stack_protect_function_attribute): New.
3512         (handle_stack_protect_attribute): Add error message for a
3513         no_stack_protector function.
3515 2020-10-22  Martin Liska  <mliska@suse.cz>
3517         * c-cppbuiltin.c (c_cpp_builtins): Use the stack_protector enum.
3519 2020-10-22  Jan Hubicka  <hubicka@ucw.cz>
3521         * c-gimplify.c: Include tree-nested.h
3522         (c_genericize): Update for new nested function info.
3524 2020-10-14  Martin Sebor  <msebor@redhat.com>
3526         PR c/97413
3527         * c-attribs.c (build_attr_access_from_parms): Wrap chain of VLA
3528         bounds in an extra list.
3530 2020-10-05  Richard Biener  <rguenther@suse.de>
3531             Jakub Jelinek  <jakub@redhat.com>
3533         PR c++/97197
3534         * c-pretty-print.c: Include langhooks.h.
3535         (c_pretty_printer::postfix_expression): Handle TARGET_MEM_REF as
3536         expression.
3537         (c_pretty_printer::expression): Handle TARGET_MEM_REF as
3538         unary_expression.
3539         (c_pretty_printer::unary_expression): Handle TARGET_MEM_REF.
3541 2020-09-30  Martin Sebor  <msebor@redhat.com>
3543         PR middle-end/97189
3544         * c-attribs.c (append_access_attr): Use the function declaration
3545         location for a warning about an attribute access argument.
3547 2020-09-29  Marek Polacek  <polacek@redhat.com>
3549         PR c++/94695
3550         * c.opt (Wrange-loop-construct): New option.
3552 2020-09-23  Martin Sebor  <msebor@redhat.com>
3554         PR c/97131
3555         * c-warn.c (warn_parm_ptrarray_mismatch): Handle more invalid input.
3557 2020-09-23  Marek Polacek  <polacek@redhat.com>
3559         PR c/97125
3560         * c-gimplify.c (c_genericize): Only call do_warn_duplicated_branches_r
3561         after loops and other structured control constructs have been lowered.
3563 2020-09-22  Jakub Jelinek  <jakub@redhat.com>
3565         * c.opt (Wbuiltin-declaration-mismatch): Fix typo in variable name:
3566         warn_builtin_declaraion_mismatch -> warn_builtin_declaration_mismatch.
3568 2020-09-21  Marek Polacek  <polacek@redhat.com>
3570         * c.opt (Wctad-maybe-unsupported): New option.
3572 2020-09-19  Martin Sebor  <msebor@redhat.com>
3574         PR c/50584
3575         * c-common.h (warn_parm_array_mismatch): Declare new function.
3576         (has_attribute): Move declaration of an existing function.
3577         (build_attr_access_from_parms): Declare new function.
3578         * c-warn.c (parm_array_as_string): Define new function.
3579         (plus_one):  Define new function.
3580         (warn_parm_ptrarray_mismatch): Define new function.
3581         (warn_parm_array_mismatch):  Define new function.
3582         (vla_bound_parm_decl): New function.
3583         * c.opt (-Warray-parameter, -Wvla-parameter): New options.
3584         * c-pretty-print.c (pp_c_type_qualifier_list): Don't print array type
3585         qualifiers here...
3586         (c_pretty_printer::direct_abstract_declarator): ...but instead print
3587         them in brackets here.  Also print [static].  Strip extraneous
3588         expressions from VLA bounds.
3590 2020-09-19  Martin Sebor  <msebor@redhat.com>
3592         PR c/50584
3593         * c-attribs.c (c_common_attribute_table): Add "arg spec" attribute.
3594         (handle_argspec_attribute): New function.
3595         (get_argument, get_argument_type): New functions.
3596         (append_access_attrs): Add overload.  Handle internal attribute
3597         representation in addition to external.
3598         (handle_access_attribute): Handle internal attribute representation
3599         in addition to external.
3600         (build_attr_access_from_parms): New function.
3602 2020-09-19  Sandra Loosemore  <sandra@codesourcery.com>
3604         * c-gimplify.c (genericize_c_loop): Rewrite to match
3605         c_finish_loop in c-typeck.c.
3607 2020-09-19  Sandra Loosemore  <sandra@codesourcery.com>
3609         * c-common.c (c_block_may_fallthrough): New, split from
3610         cxx_block_may_fallthrough in the cp front end.
3611         (c_common_init_ts): Move handling of loop and switch-related
3612         statements here from the cp front end.
3613         * c-common.def (FOR_STMT, WHILE_STMT, DO_STMT): Move here from
3614         cp front end.
3615         (BREAK_STMT, CONTINUE_STMT, SWITCH_STMT): Likewise.
3616         * c-common.h (c_block_may_fallthru): Declare.
3617         (bc_state_t): Move here from cp front end.
3618         (save_bc_state, restore_bc_state): Declare.
3619         (c_genericize_control_stmt): Declare.
3620         (WHILE_COND, WHILE_BODY): Likewise.
3621         (DO_COND, DO_BODY): Likewise.
3622         (FOR_INIT_STMT, FOR_COND, FOR_EXPR, FOR_BODY, FOR_SCOPE): Likewise.
3623         (SWITCH_STMT_COND, SWITCH_STMT_BODY): Likewise.
3624         (SWITCH_STMT_TYPE, SWITCH_STMT_SCOPE): Likewise.
3625         (SWITCH_STMT_ALL_CASES_P, SWITCH_STMT_NO_BREAK_P): Likewise.
3626         (LABEL_DECL_BREAK, LABEL_DECL_CONTINUE): Likewise.
3627         * c-dump.c (dump_stmt): Copy from cp front end.
3628         (c_dump_tree): Move code to handle structured loop and switch
3629         tree nodes here from cp front end.
3630         * c-gimplify.c: Adjust includes.
3631         (enum bc_t, bc_label, begin_bc_block, finish_bc_block): Move from
3632         cp front end.
3633         (save_bc_state, restore_bc_state): New functions using old code
3634         from cp front end.
3635         (get_bc_label, expr_loc_or_loc): Move from cp front end.
3636         (genericize_c_loop): Move from cp front end.
3637         (genericize_for_stmt, genericize_while_stmt): Likewise.
3638         (genericize_do_stmt, genericize_switch_stmt): Likewise.
3639         (genericize_continue_stmt, genericize_break_stmt): Likewise.
3640         (genericize_omp_for_stmt): Likewise.
3641         (c_genericize_control_stmt): New function using code split from
3642         cp front end.
3643         (c_genericize_control_r): New.
3644         (c_genericize): Call walk_tree with c_genericize_control_r.
3645         * c-pretty-print.c (c_pretty_printer::statement): Move code to handle
3646         structured loop and switch tree nodes here from cp front end.
3648 2020-09-17  Patrick Palka  <ppalka@redhat.com>
3650         PR c/80076
3651         * c-indentation.c (should_warn_for_misleading_indentation): Move
3652         declarations of local variables closer to their first use.
3653         Handle virtual token locations by resolving them to their
3654         respective macro expansion points.  If all three tokens are
3655         produced from the same macro expansion, then instead use their
3656         loci within the macro definition.
3658 2020-09-16  Martin Sebor  <msebor@redhat.com>
3660         PR c/78666
3661         PR c/96126
3662         * c-attribs.c (validate_attr_args): New function.
3663         (validate_attr_arg): Same.
3664         (handle_section_attribute): Call it.  Introduce a local variable.
3665         (handle_alloc_size_attribute):  Same.
3666         (handle_alloc_align_attribute): Same.
3668 2020-09-14  Jakub Jelinek  <jakub@redhat.com>
3670         * c-attribs.c (handle_optimize_attribute): Adjust
3671         cl_optimization_save, cl_optimization_restore and
3672         build_optimization_node callers.
3673         * c-pragma.c (handle_pragma_optimize): Adjust
3674         build_optimization_node caller.
3675         (handle_pragma_push_options): Adjust
3676         build_optimization_node and build_target_option_node callers.
3677         (handle_pragma_pop_options, handle_pragma_reset_options):
3678         Adjust cl_optimization_restore callers.
3680 2020-08-28  Martin Sebor  <msebor@redhat.com>
3682         * c.opt (Wstringop-overread): New option.
3684 2020-08-11  Jakub Jelinek  <jakub@redhat.com>
3686         PR c/96545
3687         * c-common.c (get_atomic_generic_size): Require that first argument's
3688         type points to a complete type and use tree_fits_uhwi_p instead of
3689         just INTEGER_CST TREE_CODE check for the TYPE_SIZE_UNIT.
3691 2020-07-31  Martin Sebor  <msebor@redhat.com>
3693         PR c++/96003
3694         * c-common.c (check_function_arguments_recurse): Return early when
3695         no-warning bit is set.
3697 2020-07-31  Richard Biener  <rguenther@suse.de>
3699         PR debug/96383
3700         * c-common.h (c_common_finalize_early_debug): Declare.
3701         * c-common.c: Include debug.h.
3702         (c_common_finalize_early_debug): finalize_early_debug langhook
3703         implementation generating debug for extern declarations.
3705 2020-07-27  Nathan Sidwell  <nathan@acm.org>
3707         * c-common.c (try_to_locate_new_include_insertion_point): Use
3708         strcmp, not pointer equality.
3710 2020-07-25  Martin Sebor  <msebor@redhat.com>
3712         PR c++/96310
3713         * c-common.c (check_nonnull_arg): Print note only when warning was
3714         issued.
3716 2020-07-22  Tobias Burnus  <tobias@codesourcery.com>
3718         * c-omp.c (c_finish_omp_critical): Check for no name but
3719         nonzero hint provided.
3721 2020-07-20  Jason Merrill  <jason@redhat.com>
3723         * c-cppbuiltin.c (c_cpp_builtins): Update
3724         __cpp_nontype_template_args for C++20.
3726 2020-07-20  Martin Sebor  <msebor@redhat.com>
3728         PR c/96249
3729         * c.opt: Remove stray text.
3731 2020-07-14  Lewis Hyatt  <lhyatt@gmail.com>
3733         PR other/86904
3734         * c-indentation.c (should_warn_for_misleading_indentation): Get
3735         global tabstop from the new source.
3736         * c-opts.c (c_common_handle_option): Remove handling of -ftabstop, which
3737         is now a common option.
3738         * c.opt: Likewise.
3740 2020-07-08  Eric Botcazou  <ebotcazou@adacore.com>
3742         * c.opt (Wscalar-storage-order): Add explicit variable.
3744 2020-07-07  Nathan Sidwell  <nathan@acm.org>
3746         * c-opts.c (c_common_post_options): Add 'injecting' arg to
3747         cpp_read_main_file.
3748         (c_finish_options): Add linemap_line_start calls for builtin and cmd
3749         maps.  Force token position to line_table's highest line.
3750         * c-ppoutput.c (print_line_1): Refactor, print line zero.
3751         (cb_define): Always increment source line.
3753 2020-07-06  Martin Sebor  <msebor@redhat.com>
3755         PR c++/95984
3756         * c-common.c (check_function_nonnull): Avoid checking syntesized calls
3757         to stub lambda objects with null this pointer.
3758         (check_nonnull_arg): Handle C++ nullptr.
3760 2020-07-02  Jason Merrill  <jason@redhat.com>
3761             Jakub Jelinek  <jakub@redhat.com>
3763         * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_consteval.
3765 2020-06-30  Jakub Jelinek  <jakub@redhat.com>
3767         PR c++/95963
3768         * c-common.c (check_function_arguments_recurse): Don't crash on
3769         calls to internal functions.
3771 2020-06-28  Martin Sebor  <msebor@redhat.com>
3773         PR c++/86568
3774         * c-common.c (struct nonnull_arg_ctx): Add members.
3775         (check_function_nonnull): Use nonnull_arg_ctx as argument.  Handle
3776         C++ member functions specially.  Consider the this pointer implicitly
3777         nonnull.
3778         (check_nonnull_arg): Use location of argument when available.
3779         (check_function_arguments): Use nonnull_arg_ctx as argument.
3781 2020-06-27  Jakub Jelinek  <jakub@redhat.com>
3783         PR middle-end/95903
3784         * c-common.c (pointer_int_sum): Use TYPE_OVERFLOW_UNDEFINED instead of
3785         !TYPE_UNSIGNED check to see if we can apply distributive law and handle
3786         smaller precision intop operands separately.
3788 2020-06-26  Marek Polacek  <polacek@redhat.com>
3790         * c-opts.c (c_common_init_options): Default to gnu++17.
3792 2020-06-17  Jonathan Wakely  <jwakely@redhat.com>
3794         PR c/95378
3795         * c-common.c (get_atomic_generic_size): Check cv-qualifiers in
3796         pointer arguments.
3798 2020-06-16  Jakub Jelinek  <jakub@redhat.com>
3800         * c-common.h (c_omp_check_loop_iv_exprs): Add an int argument.
3801         * c-omp.c (struct c_omp_check_loop_iv_data): Add maybe_nonrect and
3802         idx members.
3803         (c_omp_is_loop_iterator): New function.
3804         (c_omp_check_loop_iv_r): Use it.  Add support for silent scanning
3805         if outer loop iterator is present.  Perform duplicate checking through
3806         hash_set in the function rather than expecting caller to do that.
3807         Pass NULL instead of d->ppset to walk_tree_1.
3808         (c_omp_check_nonrect_loop_iv): New function.
3809         (c_omp_check_loop_iv): Use it.  Fill in new members, allow
3810         non-rectangular loop forms, diagnose multiple associated loops with
3811         the same iterator.  Pass NULL instead of &pset to walk_tree_1.
3812         (c_omp_check_loop_iv_exprs): Likewise.
3814 2020-06-10  Martin Liska  <mliska@suse.cz>
3816         PR tree-optimization/92860
3817         * c-attribs.c (handle_optimize_attribute):
3818         Save global options and compare it after parsing of function
3819         attribute.
3820         * c-pragma.c (opt_stack::saved_global_options): New field.
3821         (handle_pragma_push_options): Save global_options.
3822         (handle_pragma_pop_options): Compare them after pop.
3824 2020-06-09  Jakub Jelinek  <jakub@redhat.com>
3826         PR c/95580
3827         * c-pretty-print.c (c_pretty_printer::unary_expression): Handle the
3828         case when MEM_REF's first argument has type pointer to incomplete type.
3830 2020-06-05  Jason Merrill  <jason@redhat.com>
3832         * c-pretty-print.c (pp_c_additive_expression): Handle negative
3833         operand to POINTER_PLUS_EXPR.
3835 2020-06-04  Martin Sebor  <msebor@redhat.com>
3837         PR middle-end/10138
3838         PR middle-end/95136
3839         * c-attribs.c (append_access_attrs): Handle attr_access::none.
3840         (handle_access_attribute): Same.
3842 2020-06-03  Mark Wielaard  <mark@klomp.org>
3844         * known-headers.cc (get_cp_stdlib_header_for_string_macro_name):
3845         New function.
3846         * known-headers.h (get_cp_stdlib_header_for_string_macro_name):
3847         New function declaration.
3849 2020-06-03  Mark Wielaard  <mark@klomp.org>
3851         * known-headers.cc (get_string_macro_hint): New function.
3852         (get_stdlib_header_for_name): Use get_string_macro_hint.
3853         (get_c_stdlib_header_for_string_macro_name): New function.
3854         * known-headers.h (get_c_stdlib_header_for_string_macro_name):
3855         New function declaration.
3857 2020-06-03  Tobias Burnus  <tobias@codesourcery.com>
3859         * c-common.h (c_omp_predetermined_mapping): Declare.
3860         * c-omp.c (c_omp_predetermined_mapping): New.
3862 2020-05-22  Mark Wielaard  <mark@klomp.org>
3864         * known-headers.cc (get_stdlib_header_for_name): Add a new
3865         stdlib_hint array for stdbool and stdint.
3867 2020-05-22  Mark Wielaard  <mark@klomp.org>
3869         * known-headers.cc (get_stdlib_header_for_name): Return
3870         "<stdbool.h>" for "bool", "true" or "false" when STDLIB_C and
3871         flag_isoc99.
3873 2020-05-20  Nathan Sidwell  <nathan@acm.org>
3875         * c-common.c (try_to_locate_new_include_insertion_point): Revert change.
3877         * c-common.c (try_to_locate_new_include_insertion_point): Use
3878         strcmp to compare filenames.
3879         * c-lex.c (init_c_lex): Move declaration to initialization.
3880         * c-opts.c (handle_deferred_opts): Move cpp_get_deps call into
3881         deferred count loop.
3883 2020-05-15  Jason Merrill  <jason@redhat.com>
3885         * c-opts.c (set_std_cxx20): Set flag_coroutines.
3887 2020-05-13  Jason Merrill  <jason@redhat.com>
3889         * c.opt (std=c++20): Make c++2a the alias.
3890         (std=gnu++20): Likewise.
3891         * c-common.h (cxx_dialect): Change cxx2a to cxx20.
3892         * c-opts.c: Adjust.
3893         * c-cppbuiltin.c: Adjust.
3894         * c-ubsan.c: Adjust.
3895         * c-warn.c: Adjust.
3897 2020-05-12  Eric Botcazou  <ebotcazou@adacore.com>
3899         * c-ada-spec.c (dump_ads): Output pragma Warnings ("U"); on entry.
3901 2020-05-08  Nathan Sidwell  <nathan@acm.org>
3903         Reimplement directives only processing.
3904         * c-ppoutput.c (token_streamer): Ne.
3905         (directives_only_cb): New.  Swallow ...
3906         (print_lines_directives_only): ... this.
3907         (scan_translation_unit_directives_only): Reimplment using the
3908         published interface.
3910 2020-05-07  Marek Polacek  <polacek@redhat.com>
3912         * c-format.c (badwords): Add "nonstatic".
3914 202-05-07  Jakub Jelinek  <jakub@redhat.com>
3916         PR c/94968
3917         * c-common.c (speculation_safe_value_resolve_params): Return false if
3918         error_operand_p (val2).
3919         (resolve_overloaded_builtin) <case BUILT_IN_SPECULATION_SAFE_VALUE_N>:
3920         Remove extraneous semicolon.
3922 2020-05-06  qing zhao  <qing.zhao@oracle.com>
3924         PR c/94230
3925         * c-indentation.c (get_visual_column): Add a hint to use the new
3926         -flarge-source-files option.
3928 2020-05-05  Stefan Schulze Frielinghaus  <stefansf@linux.ibm.com>
3930         * c-attribs.c (handle_vector_size_attribute): Add attribute
3931         nonnull for argument args in order to silence warning of
3932         uninitialized variable usage.  Since this is local to the
3933         compilation unit and thus cannot be checked at call sides by the
3934         compiler, added an assert statement in order to verify this.
3936 2020-05-01  H.J. Lu  <hongjiu.lu@intel.com>
3938         PR target/93492
3939         * c-attribs.c (handle_patchable_function_entry_attribute): Limit
3940         value to USHRT_MAX (65535).
3942 2020-04-29  Jakub Jelinek  <jakub@redhat.com>
3944         * c-format.c (PP_FORMAT_CHAR_TABLE): Add %{ and %}.
3946 2020-04-27  Jakub Jelinek  <jakub@redhat.com>
3948         PR c/94755
3949         * c-common.c (resolve_overloaded_builtin): Return error_mark_node for
3950         fncode == BUILT_IN_NONE before initialization of first_param.
3952 2020-04-23  Marek Polacek  <polacek@redhat.com>
3954         PR c++/94733
3955         * c-attribs.c (find_tm_attribute): Use get_attribute_name instead of
3956         TREE_PURPOSE.
3958 2020-04-14  Patrick Palka  <ppalka@redhat.com>
3960         PR c++/85278
3961         * c-pretty-print.c (pp_c_pointer) <case REFERENCE_TYPE>: Print a double
3962         ampersand if it's an rvalue reference type.
3964 2020-04-13  Martin Sebor  <msebor@redhat.com>
3966         PR c/92326
3967         * c-pretty-print.c (c_pretty_printer::direct_abstract_declarator): Avoid
3968         printing array bound for flexible array members.
3970 2020-04-13  Iain Sandoe  <iain@sandoe.co.uk>
3972         * c-cppbuiltin.c (c_cpp_builtins): Update coroutines builtin
3973         define, per n4861.
3975 2020-04-02  Richard Biener  <rguenther@suse.de>
3977         PR c/94392
3978         * c-opts.c (c_common_post_options): Enable -ffinite-loops
3979         for -O2 and C++11 or newer.
3981 2020-03-28  Patrick Palka  <ppalka@redhat.com>
3983         * c.opt: Add -fconcepts-diagnostics-depth.
3985 2020-03-27  Martin Sebor  <msebor@redhat.com>
3987         PR c++/94346
3988         * c-attribs.c (handle_copy_attribute): Avoid passing expressions
3989         to decl_attributes.  Make handling of different kinds of entities
3990         more robust.
3992 2020-03-27  Martin Sebor  <msebor@redhat.com>
3994         PR c++/94098
3995         * c-attribs.c (handle_access_attribute): Avoid setting TYPE_ATTRIBUTES
3996         here.
3998 2020-03-23  Jakub Jelinek  <jakub@redhat.com>
4000         PR c++/91993
4001         * c-warn.c (warnings_for_convert_and_check): For expr and/or
4002         result being COMPOUND_EXPRs, skip to ultimate rhs.
4004 2020-03-20  Richard Sandiford  <richard.sandiford@arm.com>
4006         PR middle-end/94072
4007         * c-common.c (c_common_type_for_mode): Before using a registered
4008         built-in type, check that the vectorness of the type matches
4009         the vectorness of the mode.
4011 2020-03-17  Jakub Jelinek  <jakub@redhat.com>
4013         * c-common.c (resolve_overloaded_builtin): Fix up duplicated word
4014         issue in a diagnostic message.
4016 2020-03-15  Lewis Hyatt  <lhyatt@gmail.com>
4018         * c.opt: Avoid redundancy in the help text.
4020 2020-03-02  Marek Polacek  <polacek@redhat.com>
4022         PR c++/93958 - add missing -std=gnu++20.
4023         * c.opt: Add -std=gnu++20.
4025 2020-03-01  Martin Sebor  <msebor@redhat.com>
4027         PR c++/92721
4028         * c-attribs.c (append_access_attrs): Correctly handle attribute.
4029         (handle_access_attribute): Same.
4031 2020-02-25  Jakub Jelinek  <jakub@redhat.com>
4033         PR c/93858
4034         * c-pragma.c (handle_pragma_diagnostic): Add missing ? after
4035         "did you mean" hint in diagnostics.
4037 2020-02-15  Jason Merrill  <jason@redhat.com>
4039         * c.opt: Add -std=c++20.
4041 2020-02-14  Eric Botcazou  <ebotcazou@adacore.com>
4043         * c-ada-spec.c: Include bitmap.h.
4044         (dump_ada_double_name): Rename into...
4045         (dump_anonymous_type_name): ...this.  Always use the TYPE_UID.
4046         (dump_ada_array_type): Adjust to above renaming.  Robustify.
4047         (dump_nested_types_1): New function copied from...  Add dumped_types
4048         parameter and pass it down to dump_nested_type.
4049         (dump_nested_types): ...this.  Remove parent parameter.  Just call
4050         dump_nested_types_1 on an automatic bitmap.
4051         (dump_nested_type): Add dumped_types parameter.
4052         <ARRAY_TYPE>: Do not dump it if already present in dumped_types.
4053         Adjust recursive calls and adjust to above renaming.
4054         (dump_ada_declaration): Adjust call to dump_nested_types.
4055         Tidy up and adjust to above renaming.
4056         (dump_ada_specs): Initialize and release bitmap obstack.
4058 2020-02-10  Martin Sebor  <msebor@redhat.com>
4060         PR c/93640
4061         * c-attribs.c (handle_access_attribute): Correct off-by-one mistakes.
4063 2020-02-10  Jakub Jelinek  <jakub@redhat.com>
4065         PR other/93641
4066         * c-format.c (check_plain): Fix up last argument of strncasecmp.
4067         Remove useless extra test.
4069 2020-02-03  Julian Brown  <julian@codesourcery.com>
4070             Tobias Burnus  <tobias@codesourcery.com>
4072         * c-cppbuiltin.c (c_cpp_builtins): Update _OPENACC define to 201711.
4074 2020-01-29  Jason Merrill  <jason@redhat.com>
4076         PR c++/89357
4077         * c-attribs.c (check_cxx_fundamental_alignment_constraints): Remove.
4079 2020-01-23  Jason Merrill  <jason@redhat.com>
4081         * c-warn.c (conversion_warning): Change -Wsign-conversion handling.
4083 2020-01-23  Martin Sebor  <msebor@redhat.com>
4085         PR c/84919
4086         * c-common.c (check_function_arguments): Avoid overlap checking
4087         of sprintf functions.
4089 2020-01-22  Jason Merrill  <jason@redhat.com>
4091         PR testsuite/93391 - PR 40752 test fails with unsigned plain char.
4092         PR c++/40752
4093         * c-warn.c (conversion_warning): Check operands only after checking
4094         the whole expression.  Don't check second operand of + for sign.
4096 2020-01-21  Jason Merrill  <jason@redhat.com>
4097             Manuel López-Ibáñez  <manu@gcc.gnu.org>
4099         PR c++/40752 - useless -Wconversion with short +=.
4100         * c.opt (-Warith-conversion): New.
4101         * c-warn.c (conversion_warning): Recurse for operands of
4102         operators.  Only warn about the whole expression with
4103         -Warith-conversion.
4105 2020-01-21  Jason Merrill  <jason@redhat.com>
4107         * c-common.c (unsafe_conversion_p): Don't warn, return UNSAFE_SIGN.
4108         * c-warn.c (conversion_warning): Warn about UNSAFE_SIGN.
4110 2020-01-20  Nathan Sidwell  <nathan@acm.org>
4112         PR preprocessor/80005
4113         * c-cppbuiltins.c (c_cpp_builtins): Don't define __has_include{,_next}.
4115 2020-01-18  Iain Sandoe  <iain@sandoe.co.uk>
4117         * c-common.c (co_await, co_yield, co_return): New.
4118         * c-common.h (RID_CO_AWAIT, RID_CO_YIELD,
4119         RID_CO_RETURN): New enumeration values.
4120         (D_CXX_COROUTINES): Bit to identify coroutines are active.
4121         (D_CXX_COROUTINES_FLAGS): Guard for coroutine keywords.
4122         * c-cppbuiltin.c (__cpp_coroutines): New cpp define.
4123         * c.opt (fcoroutines): New command-line switch.
4125 2020-01-10  David Malcolm  <dmalcolm@redhat.com>
4127         * c-format.c (local_event_ptr_node): New.
4128         (PP_FORMAT_CHAR_TABLE): Add entry for "%@".
4129         (init_dynamic_diag_info): Initialize local_event_ptr_node.
4130         * c-format.h (T_EVENT_PTR): New define.
4132 2020-01-10  Martin Sebor  <msebor@redhat.com>
4134         PR c/93132
4135         * c-attribs.c (append_access_attrs): Validate against the translated
4136         access string rather than the human-readable representation.
4138 2020-01-01  Jakub Jelinek  <jakub@redhat.com>
4140         Update copyright years.
4142 2019-12-20  Eric Botcazou  <ebotcazou@adacore.com>
4144         * c-ada-spec.h (decl_sloc): Delete.
4145         * c-ada-spec.c (decl_sloc): Make static.
4147 2019-12-19  Julian Brown  <julian@codesourcery.com>
4149         * c-common.h (c_omp_map_clause_name): Add prototype.
4150         * c-omp.c (c_omp_map_clause_name): New function.
4151         * c-pragma.h (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ATTACH and
4152         PRAGMA_OACC_CLAUSE_DETACH.
4154 2019-12-19  Julian Brown  <julian@codesourcery.com>
4155             Maciej W. Rozycki  <macro@codesourcery.com>
4156             Tobias Burnus  <tobias@codesourcery.com>
4157             Thomas Schwinge  <thomas@codesourcery.com>
4159         * c-pragma.h (pragma_omp_clause): Add
4160         PRAGMA_OACC_CLAUSE_NO_CREATE.
4162 2019-12-17  Martin Sebor  <msebor@redhat.com>
4164         PR c++/61339
4165         * c.opt (-Wmismatched-tags, -Wredundant-tags): New options.
4167 2019-12-11  David Malcolm  <dmalcolm@redhat.com>
4169         * c-pretty-print.c (c_pretty_printer::clone): New vfunc
4170         implementation.
4171         * c-pretty-print.h (c_pretty_printer::clone): New vfunc decl.
4173 2019-12-09  David Malcolm  <dmalcolm@redhat.com>
4175         * c-format.c (range_label_for_format_type_mismatch::get_text):
4176         Replace label_text ctor called with true with label_text::take.
4178 2019-12-09  David Malcolm  <dmalcolm@redhat.com>
4180         * c-format.c (selftest::test_type_mismatch_range_labels): Remove
4181         initial newline from expected outputs.
4182         * c-opts.c (c_diagnostic_finalizer): Add pp_newline call before
4183         call to diagnostic_show_locus.
4185 2019-12-06  Jakub Jelinek  <jakub@redhat.com>
4187         * c-cppbuiltin.c (c_cpp_builtins): Don't define __cpp_consteval for
4188         now.
4190 2019-12-05  Marek Polacek  <polacek@redhat.com>
4191             Jakub Jelinek  <jakub@redhat.com>
4193         PR c++/91353 - P1331R2: Allow trivial default init in constexpr contexts.
4194         * c-cppbuiltin.c (c_cpp_builtins): Adjust the value of __cpp_constexpr.
4196 2019-12-05  Marek Polacek  <polacek@redhat.com>
4198         PR c++/92271 - make __is_same alias for __is_same_as.
4199         * c-common.c: Add __is_same, an alias for __is_same_as.
4201 2019-12-03  Marek Polacek  <polacek@redhat.com>
4203         PR c++/91363 - P0960R3: Parenthesized initialization of aggregates.
4204         * c-cppbuiltin.c (c_cpp_builtins): Predefine
4205         __cpp_aggregate_paren_init=201902 for -std=c++2a.
4207 2019-11-30  Jan Hubicka  <hubicka@ucw.cz>
4209         * c-attribs.c (handle_symver_attribute): New function
4210         (c_common_attributes): Add symver.
4212 2019-11-30  Richard Sandiford  <richard.sandiford@arm.com>
4214         * c-common.c (pointer_int_sum): Use verify_type_context to check
4215         whether the target allows pointer arithmetic for the types involved.
4216         (c_sizeof_or_alignof_type, c_alignof_expr): Use verify_type_context
4217         to check whether the target allows sizeof and alignof operations
4218         for the types involved.
4220 2019-11-27  Jason Merrill  <jason@redhat.com>
4222         * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_deduction_guides.
4224 2019-11-26  Jakub Jelinek  <jakub@redhat.com>
4226         PR c++/61414
4227         * c-attribs.c (handle_mode_attribute): Add mode attribute to
4228         ENUMERAL_TYPEs.
4230 2019-11-25  Joseph Myers  <joseph@codesourcery.com>
4232         PR c/91985
4233         * c-common.c (c_common_type_for_mode): Handle decimal
4234         floating-point types being NULL_TREE.
4235         * c-format.c (get_format_for_type_1): Handle specified types being
4236         NULL_TREE.
4237         * c-lex.c (interpret_float): Give an error for decimal
4238         floating-point constants when decimal floating-point not
4239         supported.
4241 2019-11-23  Jakub Jelinek  <jakub@redhat.com>
4243         PR middle-end/83859
4244         * c-attribs.c (append_access_attrs): Avoid buffer overflow.  Avoid
4245         memory leak.  Use XNEWVEC macro.  Use auto_diagnostic_group to
4246         group warning with inform together.
4247         (handle_access_attribute): Formatting fix.
4249 2019-11-22  Jakub Jelinek  <jakub@redhat.com>
4251         PR c/90677
4252         * c-common.h (identifier_global_tag): Declare.
4253         * c-format.c (get_pointer_to_named_type): Renamed to ...
4254         (get_named_type): ... this.  Use identifier_global_tag instead of
4255         identifier_global_value, handle the return value being a TYPE_P.
4256         (init_dynamic_diag_info): Adjust get_pointer_to_named_type callers
4257         to call get_named_type instead.  Formatting fixes.
4259         Implement P1902R1, Missing feature-test macros 2017-2019.
4260         * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_init_captures
4261         and __cpp_generic_lambdas for -std=c++2a.  Define
4262         __cpp_designated_initializers, __cpp_constexpr_in_decltype and
4263         __cpp_consteval for -std=c++2a.  Remove a FIXME comment about
4264         __cpp_concepts for -std=c++2a.
4266 2019-11-22  Martin Sebor  <msebor@redhat.com>
4268         PR middle-end/83859
4269         * c-attribs.c (handle_access_attribute): New function.
4270         (c_common_attribute_table): Add new attribute.
4271         (get_argument_type): New function.
4272         (append_access_attrs): New function.
4273         (get_nonnull_operand): Rename...
4274         (get_attribute_operand): ...to this.
4275         * c-common.c (get_nonnull_operand): Rename...
4276         (get_attribute_operand): ...to this.
4278 2019-11-21  Joseph Myers  <joseph@codesourcery.com>
4280         * c-attribs.c (handle_fallthrough_attribute): Use pedwarn instead
4281         of warning.
4283 2019-11-19  Joseph Myers  <joseph@codesourcery.com>
4285         * c-common.c (attribute_fallthrough_p): In C, use pedwarn not
4286         warning for standard attributes mixed with fallthrough attributes.
4288 2019-11-15  Joseph Myers  <joseph@codesourcery.com>
4290         * c-attribs.c (handle_fallthrough_attribute): Remove static.
4291         * c-common.h (handle_fallthrough_attribute): Declare.
4293 2019-11-15  Joseph Myers  <joseph@codesourcery.com>
4295         * c-attribs.c (handle_deprecated_attribute): Remove static.
4296         * c-common.h (handle_deprecated_attribute): Declare.
4298 2019-11-14  Joseph Myers  <joseph@codesourcery.com>
4300         * c-lex.c (lex_charconst): Make CPP_UTF8CHAR constants unsigned
4301         char for C.
4303 2019-11-14  Jakub Jelinek  <jakub@redhat.com>
4305         * c-omp.c (c_omp_check_context_selector): Add nvidia to the list of
4306         valid vendors.
4308         * c-omp.c (c_omp_check_context_selector): Handle name lists
4309         containing string literals.  Don't diagnose atomic_default_mem_order
4310         with multiple props.
4312 2019-11-13  Joseph Myers  <joseph@codesourcery.com>
4314         * c-cppbuiltin.c (builtin_define_float_constants): Also define
4315         NORM_MAX constants.  Update call to get_max_float.
4316         (LAZY_HEX_FP_VALUES_CNT): Update value to include NORM_MAX
4317         constants.
4319 2019-11-13  Eric Botcazou  <ebotcazou@adacore.com>
4321         * c-ada-spec.c (get_underlying_decl): Do not look through typedefs.
4322         (dump_forward_type): Do not generate a declaration for function types.
4323         (dump_nested_type) <ARRAY_TYPE>: Do not generate a nested declaration
4324         of the component type if it is declared in another file.
4326 2019-11-12  Martin Liska  <mliska@suse.cz>
4328         * c-opts.c (c_common_post_options):
4329         Use SET_OPTION_IF_UNSET.
4331 2019-11-12  Maciej W. Rozycki  <macro@codesourcery.com>
4332             Frederik Harwath  <frederik@codesourcery.com>
4334         gcc/c-family/
4335         * c-pragma.h (pragma_kind): Add PRAGMA_OACC_SERIAL enumeration
4336         constant.
4337         * c-pragma.c (oacc_pragmas): Add "serial" entry.
4339 2019-11-08  Richard Sandiford  <richard.sandiford@arm.com>
4341         * c-common.h (gnu_vector_type_p): New function.
4342         * c-common.c (c_build_vec_perm_expr): Require __builtin_shuffle
4343         vectors to satisfy gnu_vector_type_p.
4344         (c_build_vec_convert): Likewise __builtin_convertvector.
4345         (convert_vector_to_array_for_subscript): Likewise when applying
4346         implicit vector to array conversion.
4347         (scalar_to_vector): Likewise when converting vector-scalar
4348         operations to vector-vector operations.
4350 2019-11-08  Joseph Myers  <joseph@codesourcery.com>
4352         * c.opt (Wold-style-definition): Initialize to -1.
4353         * c-opts.c (c_common_post_options): Set warn_old_style_definition
4354         to flag_isoc2x if not set explicitly.
4356 2019-11-07  Joseph Myers  <joseph@codesourcery.com>
4358         * c-attribs.c (parse_tm_stmt_attr): Handle scoped attributes.
4360 2019-11-05  Jason Merrill  <jason@redhat.com>
4362         * c-opts.c (c_common_post_options): -fconcepts-ts implies
4363         -fconcepts.
4365 2019-11-04  Kamlesh Kumar  <kamleshbhalui@gmail.com>
4367         * c-opts.c (c_common_post_options): Update
4368         latest_abi_version.
4370 2019-11-02  Jakub Jelinek  <jakub@redhat.com>
4372         * c-common.h (c_omp_get_context_selector): Remove.
4373         * c-omp.c (c_omp_get_context_selector): Moved to omp-general.c
4374         and renamed to omp_get_context_selector.
4376         * c-omp.c (c_omp_mark_declare_variant): Use
4377         omp_context_selector_set_compare.
4379         PR c++/88335 - Implement P1073R3: Immediate functions
4380         * c-common.h (enum rid): Add RID_CONSTEVAL.
4381         * c-common.c (c_common_reswords): Add consteval.
4383 2019-11-01  Martin Sebor  <msebor@redhat.com>
4385         PR middle-end/91679
4386         PR middle-end/91647
4387         PR middle-end/91463
4388         PR middle-end/92312
4389         * c-pretty-print.c (direct_abstract_declarator): Print
4390         bound in zero-length arrays.
4391         * c.opt (-Wzero-length-bounds): New option.
4393 2019-10-30  Nathan Sidwell  <nathan@acm.org>
4395         * c-cppbuiltin.c (c_cpp_builtins): Add 'L' suffix to feature
4396         macros.
4398 2019-10-28  Martin Sebor  <msebor@redhat.com>
4400         PR c/66970
4401         * c-common.c (c_common_nodes_and_builtins): Call c_define_builtins
4402         even when only preprocessing.
4403         * c-common.h (names_builtin_p): Declare new function.
4404         * c-lex.c (init_c_lex): Set has_builtin.
4405         (c_common_has_builtin): Define a new function.
4406         * c-ppoutput.c (init_pp_output): Set has_builtin.
4408 2019-10-24  Jakub Jelinek  <jakub@redhat.com>
4410         * c-common.h (c_omp_context_selector_matches): Remove.
4411         * c-omp.c (c_omp_context_selector_matches): Remove.
4412         * c-attribs.c (c_common_attribute_table): Add
4413         "omp declare target {host,nohost,block}" attributes.
4415 2019-10-17  JeanHeyd Meneide  <phdofthehouse@gmail.com>
4417         * c-lex.c (c_common_has_attribute): Update nodiscard value.
4419 2019-10-14  Richard Sandiford  <richard.sandiford@arm.com>
4421         * c-common.h (user_facing_original_type_p): Declare.
4422         * c-common.c: Include c-spellcheck.h.
4423         (user_facing_original_type_p): New function.
4425 2019-10-12  Jakub Jelinek  <jakub@redhat.com>
4427         * c-common.h (c_omp_mark_declare_variant,
4428         c_omp_context_selector_matches): Declare.
4429         * c-omp.c: Include attribs.h, gimplify.h, cgraph.h, symbol-summary.h
4430         and hsa-common.h.
4431         (c_omp_get_context_selector): Support second argument NULL.
4432         (c_omp_mark_declare_variant, c_omp_context_selector_matches): New
4433         functions.
4434         * c-attribs.c (c_common_attribute_table): Remove "omp declare variant"
4435         attribute, add "omp declare variant base" and
4436         "omp declare variant variant" attributes.
4438 2019-10-11  Joseph Myers  <joseph@codesourcery.com>
4440         * c.opt (Wc11-c2x-compat): Add CPP(cpp_warn_c11_c2x_compat)
4441         CppReason(CPP_W_C11_C2X_COMPAT).
4443 2019-10-11  Joseph Myers  <joseph@codesourcery.com>
4445         * c-common.c (c_common_reswords): Do not use D_EXT for _Decimal32,
4446         _Decimal64 and _Decimal128.
4448 2019-10-10  Joseph Myers  <joseph@codesourcery.com>
4450         * c-cppbuiltin.c (c_cpp_builtins): Do not define macros for DFP
4451         types if DFP not supported.
4453 2019-10-10  Jakub Jelinek  <jakub@redhat.com>
4455         * c-common.h (c_omp_check_context_selector,
4456         c_omp_get_context_selector): Declare.
4457         * c-omp.c (c_omp_declare_simd_clauses_to_numbers): Fix spelling
4458         in diagnostic message.
4459         (c_omp_check_context_selector, c_omp_get_context_selector): New
4460         functions.
4461         * c-attribs.c (c_common_attribute_table): Add "omp declare variant"
4462         attribute.
4463         (handle_omp_declare_variant_attribute): New function.
4465 2019-10-09  Martin Sebor  <msebor@redhat.com>
4467         PR tree-optimization/90879
4468         * c.opt (-Wstring-compare): New option.
4470 2019-10-08  Andrew Sutton  <asutton@lock3software.com>
4471             Jason Merrill  <jason@redhat.com>
4473         Update the concepts implementation to conform to the C++20
4474         specification, improve compile times, and generally clean up
4475         the implementation.
4477         * c-cppbuiltin.c (c_cpp_builtins): Use new feature test values for
4478         concepts when -std=c++2a. Bump __cpp_concepts to 201907.
4479         * c.opt: Add -Wconcepts-ts.
4480         * c-opts.c (c_common_post_options): Warn when -fconcepts is used
4481         with -std=c++2a. Disable warning for -fconcepts in C++20 mode.
4482         (set_std_cxx2a): Enable concepts by default.
4484 2019-10-08  Joseph Myers  <joseph@codesourcery.com>
4486         * c-opts.c (c_common_post_options): Set
4487         -fno-fp-int-builtin-inexact for C2X.
4489 2019-10-05  Jakub Jelinek  <jakub@redhat.com>
4491         PR c++/91369 - Implement P0784R7: constexpr new
4492         * c-cppbuiltin.c (c_cpp_builtins): Predefine
4493         __cpp_constexpr_dynamic_alloc=201907 for -std=c++2a.
4495 2019-10-04  Joseph Myers  <joseph@codesourcery.com>
4497         PR c/82752
4498         * c-format.c (C_STD_VER): Handle C2x.
4499         (C_STD_NAME): Likewise.
4500         (strftime_flag_specs): Add 'O' modifier with 'p' flag.
4501         (time_char_table): Use separate entry for 'B' and 'b', with 'O'
4502         modifier allowed and 'p' flag.
4503         * c-format.h (enum format_std_version): Add STD_C2X.
4504         (struct format_char_info): Mention 'p' in comment on flags2.
4506 2019-10-01  David Malcolm  <dmalcolm@redhat.com>
4508         * c-opts.c (c_diagnostic_finalizer): Temporarily clear prefix when
4509         calling diagnostic_show_locus, rather than destroying it afterwards.
4511 2019-10-01  Jakub Jelinek  <jakub@redhat.com>
4513         PR c++/91925
4514         * c-warn.c (check_alignment_of_packed_member): Ignore FIELD_DECLs
4515         with NULL DECL_FIELD_OFFSET.
4517 2019-10-01  Richard Sandiford  <richard.sandiford@arm.com>
4519         * c-pretty-print.c (pp_c_specifier_qualifier_list): If a vector type
4520         has a type name, use it in preference to the __vector syntax.
4522 2019-09-30  Richard Sandiford  <richard.sandiford@arm.com>
4524         * c-pretty-print.c (pp_c_parameter_type_list): Avoid printing
4525         two spaces between a comma and "...".
4527 2019-09-27  Jakub Jelinek  <jakub@redhat.com>
4529         PR c++/88203
4530         * c-common.h (c_omp_predefined_variable): Declare.
4531         * c-omp.c (c_omp_predefined_variable): New function.
4532         (c_omp_predetermined_sharing): Return OMP_CLAUSE_DEFAULT_SHARED
4533         for predefined variables.
4535 2019-09-27  Richard Sandiford  <richard.sandiford@arm.com>
4537         * c-common.h (build_function_call_vec): Take the original
4538         function decl as an optional final parameter.
4539         (check_builtin_function_arguments): Take the original function decl.
4540         * c-common.c (check_builtin_function_arguments): Likewise.
4541         Handle all built-in functions, not just BUILT_IN_NORMAL ones.
4542         Use targetm.check_builtin_call to check BUILT_IN_MD functions.
4544 2019-09-15  Jason Merrill  <jason@redhat.com>
4546         * c-warn.c (warn_logical_operator): Strip location wrappers.  Don't
4547         fold_for_warn in "|| mask" warning.
4549 2019-09-10  Martin Liska  <mliska@suse.cz>
4551         * c.opt: Use newly added WarnRemoved.
4553 2019-09-09  Martin Liska  <mliska@suse.cz>
4555         * c.opt: Update comment of removed
4556         options that are preserved only for backward
4557         compatibility.
4559 2019-09-06  Martin Liska  <mliska@suse.cz>
4561         PR c++/91125
4562         * c-common.c: Remove definition of flag_use_repository.
4563         * c-common.h: Likewise.
4564         * c-opts.c (c_common_handle_option):
4565         Do not handle OPT_frepo option.
4566         * c.opt: Mark the option with Deprecated.
4568 2019-09-04  Marek Polacek  <polacek@redhat.com>
4570         * c.opt (fdeduce-init-list): Ignored.
4572 2019-09-04  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
4574         PR c/78736
4575         * c.opt (Wenum-conversion): New option.
4577 2019-09-03  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
4579         * c-attribs.c (handle_section_attribute): Call the
4580         handle_generic_attribute target hook after performing target
4581         independent processing.
4582         (handle_noinit_attribute): Likewise.
4584 2019-09-03  Ian Lance Taylor  <iant@golang.org>
4586         * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Always expand
4587         when using -fgo-dump-spec.
4589 2019-09-02  Martin Liska  <mliska@suse.cz>
4591         PR c++/91155
4592         * c-common.c (fname_as_string): Use cxx_printable_name for
4593         __PRETTY_FUNCTION__ same as was used before r265711.
4595 2019-08-28  Marek Polacek  <polacek@redhat.com>
4597         Implement P1152R4: Deprecating some uses of volatile.
4598         PR c++/91361
4599         * c-opts.c (c_common_post_options): Enable -Wvolatile by
4600         default for C++2a, unless -Wno-deprecated.
4601         * c.opt (Wvolatile): New warning.
4603 2019-08-28  Marek Polacek  <polacek@redhat.com>
4605         PR c++/91360 - Implement C++20 P1143R2: constinit.
4606         * c-common.c (c_common_reswords): Add constinit and __constinit.
4607         (keyword_is_decl_specifier): Handle RID_CONSTINIT.
4608         * c-common.h (enum rid): Add RID_CONSTINIT, RID_FIRST_CXX20, and
4609         RID_LAST_CXX20.
4610         (D_CXX20): Define.
4611         * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_constinit.
4612         * c-format.c (cxx_keywords): Add "constinit".
4613         * c.opt (Wc++2a-compat, Wc++20-compat): New options.
4615 2019-08-27  Jakub Jelinek  <jakub@redhat.com>
4617         PR c++/91415
4618         * c-common.c (verify_tree): For LSHIFT_EXPR, RSHIFT_EXPR,
4619         COMPONENT_REF and ARRAY_REF in cxx_dialect >= cxx17 mode handle it
4620         like COMPOUND_EXPR rather than normal expression.
4622 2019-08-23  Iain Sandoe  <iain@sandoe.co.uk>
4624         PR pch/61250
4625         * c-lex.c (c_lex_with_flags):  Don't call
4626         c_common_no_more_pch () from here.
4628 2019-08-23  Jakub Jelinek  <jakub@redhat.com>
4630         PR middle-end/91283
4631         * c-common.c (c_ts18661_flt_eval_method): Use flag_excess_precision
4632         instead of flag_excess_precision_cmdline.
4633         * c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): Likewise.
4634         * c-opts.c (c_common_post_options): Likewise.
4636 2019-08-22  Martin Sebor  <msebor@redhat.com>
4638         PR middle-end/91490
4639         * c-common.c (braced_list_to_string): Add argument and overload.
4640         Handle flexible length arrays and unions.
4642 2019-08-21  Eric Botcazou  <ebotcazou@adacore.com>
4644         * c-ada-spec.c (dump_ada_function_declaration): Be prepared for broken
4645         function declarations where arguments are missing.  Rename variables.
4647 2019-08-15  Richard Biener  <rguenther@suse.de>
4649         * c-common.c (c_stddef_cpp_builtins): When the GIMPLE FE is
4650         enabled, define __SIZETYPE__.
4652 2019-08-14  Christophe Lyon  <christophe.lyon@linaro.org>
4654         * c-attribs.c (c_common_attribute_table): Add "noinit" entry. Add
4655         exclusion with "section" attribute.
4656         (attr_noinit_exclusions): New table.
4657         (handle_noinit_attribute): New function.
4659 2019-08-13  Richard Sandiford  <richard.sandiford@arm.com>
4661         PR middle-end/91421
4662         * c-common.c (resolve_overloaded_builtin): Use
4663         copy_decl_built_in_function.
4665 2019-08-13  Martin Sebor  <msebor@redhat.com>
4667         PR c/80619
4668         * c-format.c (printf_length_specs): Set FMT_LEN_w for "w".
4669         (asm_fprintf_length_spec): Same.
4670         * c-format.h (format_lengths): Add FMT_LEN_w.
4672 2019-08-10  Jakub Jelinek  <jakub@redhat.com>
4674         * c-pragma.h (enum pragma_omp_clause): Add
4675         PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
4677 2019-08-07  Jakub Jelinek  <jakub@redhat.com>
4679         * c-pragma.h (enum pragma_omp_clause): Add
4680         PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.  Set PRAGMA_OACC_CLAUSE_USE_DEVICE
4681         equal to PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR instead of being a separate
4682         enumeration value.
4684 2019-08-05  Marek Polacek  <polacek@redhat.com>
4686         PR c++/91338 - Implement P1161R3: Deprecate a[b,c].
4687         * c-opts.c (c_common_post_options): Enable -Wcomma-subscript by
4688         default for C++2a, unless -Wno-deprecated.
4689         * c.opt (Wcomma-subscript): New warning.
4691 2019-07-20  Jakub Jelinek  <jakub@redhat.com>
4693         * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_LOOP.
4694         (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_BIND.
4695         * c-pragma.c (omp_pragmas_simd): Add PRAGMA_OMP_LOOP entry.
4696         * c-common.h (enum c_omp_clause_split): Add C_OMP_CLAUSE_SPLIT_LOOP.
4697         * c-omp.c (c_omp_split_clauses): Add support for 4 new combined
4698         constructs with the loop construct.
4700 2019-07-13  Jakub Jelinek  <jakub@redhat.com>
4702         PR c/91149
4703         * c-omp.c (c_omp_split_clauses): Fix a pasto in
4704         OMP_CLAUSE_REDUCTION_TASK handling.
4706 2019-07-12  Jakub Jelinek  <jakub@redhat.com>
4708         * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ORDER.
4709         * c-omp.c (c_omp_split_clauses): Handle splitting of OMP_CLAUSE_ORDER.
4711 2019-07-09  Martin Sebor  <msebor@redhat.com>
4713         PR c++/61339
4714         * c-opts.c (handle_deferred_opts): Change class-key of PODs to struct
4715         and others to class.
4716         * c-pretty-print.h: Same.
4718 2019-07-09  Martin Sebor  <msebor@redhat.com>
4720         PR c++/61339
4721         * c-format.c (check_argument_type): Change class-key from class to
4722         struct and vice versa to match convention and avoid -Wclass-is-pod
4723         and -Wstruct-no-pod.
4724         * c-pretty-print.h: Same.
4726 2019-07-03  Martin Liska  <mliska@suse.cz>
4728         * c-common.c (try_to_locate_new_include_insertion_point): Remove
4729         dead assignemts.
4731 2019-07-03  Jakub Jelinek  <jakub@redhat.com>
4733         * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_REDUCTION_INSCAN
4734         clauses on OMP_FOR rather than OMP_PARALLEL when OMP_FOR is combined
4735         with OMP_PARALLEL.
4737 2019-07-02  qing zhao  <qing.zhao@oracle.com>
4739         PR preprocessor/90581
4740         * c-opts.c (c_common_handle_option): Handle -fmax-include-depth.
4741         * c.opt: Add new option -fmax-include-depth.
4743 2019-06-26  Jason Merrill  <jason@redhat.com>
4745         PR c++/55442 - memory-hog with highly recursive constexpr.
4746         * c.opt (fconstexpr-loop-limit): New.
4748 2019-06-25  Jakub Jelinek  <jakub@redhat.com>
4750         PR sanitizer/90954
4751         * c-omp.c (c_finish_omp_atomic): Allow tree_invariant_p in addition
4752         to SAVE_EXPR in first operand of a COMPOUND_EXPR.
4754 2019-06-25  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
4756         * c-common.c (c_common_nodes_and_builtins): Define
4757         alternate "__intN__" name for "__intN" types.
4759 2019-06-24  Jan Hubicka  <jh@suse.cz>
4761         * c-common.c (braced_lists_to_strings): Check that
4762         type is array or integer prior checking string flag.
4764 2019-06-21  Matthew Beliveau  <mbelivea@redhat.com>
4766         PR c++/90875 - added -Wswitch-outside-range option
4767         * c.opt (Wswitch-outside-range): Added new option.
4768         * c-warn.c (c_do_switch_warnings): Use OPT_Wswitch-outside-range.
4770 2019-06-21  Marek Polacek  <polacek@redhat.com>
4772         PR c++/90953 - ICE with -Wmissing-format-attribute.
4773         * c-common.c (check_function_arguments_recurse): Use
4774         get_attribute_name.
4775         (check_missing_format_attribute): Likewise.
4777 2019-06-19  Marek Polacek  <polacek@redhat.com>
4779         PR c++/60364 - noreturn after first decl not diagnosed.
4780         * c-attribs.c (handle_noreturn_attribute): No longer static.
4781         * c-common.h (handle_noreturn_attribute, attr_noreturn_exclusions):
4782         Declare.
4783         * c-format.c (check_function_format): Use get_attribute_name.
4785 2019-06-19  Martin Sebor  <msebor@redhat.com>
4787         PR translation/90156
4788         * c-format.c (function_format_info::format_type): Adjust type.
4789         (function_format_info::is_raw): New member.
4790         (decode_format_type): Adjust signature.  Handle "raw" diag attributes.
4791         (decode_format_attr): Adjust call to decode_format_type.
4792         Avoid a redundant call to convert_format_name_to_system_name.
4793         Avoid abbreviating the word "arguments" in a diagnostic.
4794         (format_warning_substr): New function.
4795         (avoid_dollar_number): Quote dollar sign in a diagnostic.
4796         (finish_dollar_format_checking): Same.
4797         (check_format_info): Same.
4798         (struct baltoks_t): New.
4799         (c_opers, c_keywords, cxx_keywords, badwords, contrs): New arrays.
4800         (maybe_diag_unbalanced_tokens, check_tokens, check_plain): New
4801         functions.
4802         (check_format_info_main): Call check_plain.  Use baltoks_t.  Call
4803         maybe_diag_unbalanced_tokens.
4804         (handle_format_attribute): Spell out the word "arguments" in
4805         a diagnostic.
4807 2019-06-11  Matthew Beliveau  <mbelivea@redhat.com>
4809         PR c++/90449 - add -Winaccessible-base option.
4810         * c.opt (Winaccessible-base): New option.
4812 2019-06-10  Jakub Jelinek  <jakub@redhat.com>
4814         * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_SCAN.
4815         * c-pragma.c (omp_pragmas_simd): Add #pragma omp scan.
4816         * c-omp.c (c_omp_split_clauses): Diagnose inscan reductions on
4817         combined/composite constructs where it is not allowed.  Copy over
4818         OMP_CLAUSE_REDUCTION_INSCAN.
4820 2019-06-05  Martin Sebor  <msebor@redhat.com>
4822         * c-attribs.c (handle_mode_attribute): Adjust quoting and hyphenation.
4823         (handle_alias_ifunc_attribute): Same.
4824         (handle_copy_attribute): Same.
4825         (handle_weakref_attribute): Same.
4826         (handle_nonnull_attribute): Same.
4827         * c-warn.c (warn_for_sign_compare): Same.
4828         (warn_for_restrict): Same.
4829         * c.opt: Same.
4831 2019-06-05  Martin Sebor  <msebor@redhat.com>
4833         * c-pragma.c (handle_pragma_weak): Adjust quoting in a diagnostic.
4834         * c.opt (-Wformat-diag): Remove a spurious period.
4836 2019-05-29  Jakub Jelinek  <jakub@redhat.com>
4838         PR c/90628
4839         * c-common.c (check_builtin_function_arguments)
4840         <case BUILTIN_*_OVERFLOW>: Diagnose pointer to const qualified integer
4841         as last argument.
4843 2019-05-23  Eric Botcazou  <ebotcazou@adacore.com>
4845         * c-ada-spec.c (compare_node): Compare the DECL_UIDs as a last resort.
4847 2019-05-22  Martin Liska  <mliska@suse.cz>
4849         PR lto/90500
4850         * c-attribs.c (handle_copy_attribute): Do not copy
4851         target_clones attribute.
4853 2019-05-21  Eric Botcazou  <ebotcazou@adacore.com>
4855         * c-ada-spec.h (enum cpp_operation): Add IS_ASSIGNMENT_OPERATOR.
4856         * c-ada-spec.c (print_assignment_operator): New function.
4857         (dump_ada_declaration) <FUNCTION_DECL>: Call it do dump explicit copy
4858         assignment operators declared as methods and filter out the others.
4860 2019-05-17  Thomas Schwinge  <thomas@codesourcery.com>
4862         PR c/89433
4863         * c-attribs.c (c_common_attribute_table): Set min_len to -1 for
4864         "omp declare target".
4866 2019-05-16  Martin Sebor  <msebor@redhat.com>
4868         * c-attribs.c (handle_no_sanitize_attribute): Quote identifiers,
4869         keywords, operators, and types in diagnostics.
4870         (handle_scalar_storage_order_attribute): Same.
4871         (handle_mode_attribute): Same.
4872         (handle_visibility_attribute): Same.
4873         (handle_assume_aligned_attribute): Same.
4874         (handle_no_split_stack_attribute): Same.
4875         * c-common.c (shorten_compare): Same.
4876         (c_common_truthvalue_conversion): Same.
4877         (cb_get_source_date_epoch): Same.
4878         * c-lex.c (cb_def_pragma): Quote keywords, operators, and types
4879         in diagnostics.
4880         (interpret_float): Same.
4881         * c-omp.c (c_finish_omp_for): Same.
4882         * c-opts.c (c_common_post_options): Same.
4883         * c-pch.c (c_common_pch_pragma): Same.
4884         * c-pragma.c (pop_alignment): Same.
4885         (handle_pragma_pack): Same.
4886         (apply_pragma_weak): Same.
4887         (handle_pragma_weak): Same.
4888         (handle_pragma_scalar_storage_order): Same.
4889         (handle_pragma_redefine_extname): Same.
4890         (add_to_renaming_pragma_list): Same.
4891         (maybe_apply_renaming_pragma): Same.
4892         (push_visibility): Same.
4893         (handle_pragma_visibility): Same.
4894         (handle_pragma_optimize): Same.
4895         (handle_pragma_message): Same.
4896         * c-warn.c (warn_for_omitted_condop): Same.
4897         (lvalue_error): Same.
4899 2019-05-15  Richard Biener  <rguenther@suse.de>
4901         PR c/90474
4902         * c-common.c (c_common_mark_addressable_vec): Also mark
4903         a COMPOUND_LITERAL_EXPR_DECL addressable similar to
4904         c_mark_addressable.
4906 2019-05-06  Nathan Sidwell  <nathan@acm.org>
4908         * c-opts.c (handle_defered_opts): Rename struct deps to struc mkdeps.
4910 2019-04-30  Nathan Sidwell  <nathan@acm.org>
4912         * c-common.c (c_common_init_ts): Use MARK_TS_EXP.  Mark SIZEOF_EXPR.
4914 2019-04-30  Martin Liska  <mliska@suse.cz>
4916         * c-pragma.c (handle_pragma_diagnostic): Provide hints
4917         for unknown options.
4919 2019-04-26  Richard Sandiford  <richard.sandiford@arm.com>
4921         * c-warn.c (strict_aliasing_warning): Apply COMPLETE_TYPE_P to
4922         the pointer target rather than the pointer itself.
4924 2019-04-19  Jakub Jelinek  <jakub@redhat.com>
4926         PR c/89888
4927         * c-common.h (c_add_case_label): Remove orig_type and outside_range_p
4928         arguments.
4929         (c_do_switch_warnings): Remove outside_range_p argument.
4930         * c-common.c (check_case_bounds): Removed.
4931         (c_add_case_label): Remove orig_type and outside_range_p arguments.
4932         Don't call check_case_bounds.  Fold low_value as well as high_value.
4933         * c-warn.c (c_do_switch_warnings): Remove outside_range_p argument.
4934         Check for case labels outside of range of original type here and
4935         adjust them.
4937 2019-04-12  Jakub Jelinek  <jakub@redhat.com>
4939         PR translation/90041
4940         * c.opt (-fhandle-exceptions): Use %< and %> around option names
4941         in the Warn diagnostics.
4943         PR c/89946
4944         * c-attribs.c (handle_patchable_function_entry_attribute): Add
4945         function comment.  Warn if arguments of the attribute are not positive
4946         integer constants.
4948 2019-04-09  Eric Botcazou  <ebotcazou@adacore.com>
4950         * c-ada-spec.c (print_destructor): Deal with deleting destructors.
4951         (dump_ada_declaration) <FUNCTION_DECL>: Likewise.
4953 2019-04-07  Eric Botcazou  <ebotcazou@adacore.com>
4955         * c-ada-spec.c (is_float128): New predicate extracted from...
4956         (dump_ada_node) <COMPLEX_TYPE>: Use it to recognize __cfloat128.
4957         <REAL_TYPE>: ...here.  Call it.
4959 2019-04-05  David Malcolm  <dmalcolm@redhat.com>
4961         PR c/89985
4962         * c-warn.c (check_address_or_pointer_of_packed_member): Add
4963         auto_diagnostic_group.  Guard inform calls by result of
4964         warning_at call.
4966 2019-04-05  Marek Polacek  <polacek@redhat.com>
4968         PR c++/89973 - -Waddress-of-packed-member ICE with invalid conversion.
4969         * c-warn.c (check_address_or_pointer_of_packed_member): Check the type
4970         of RHS.
4972 2019-04-03  Jason Merrill  <jason@redhat.com>
4974         PR c++/86586 - -fcompare-debug=-Wsign-compare.
4975         * c-warn.c (warn_for_sign_compare): Call fold_for_warn.
4977 2019-04-01  Martin Sebor  <msebor@redhat.com>
4979         PR c/89685
4980         * c-attribs.c (handle_copy_attribute): Handle references and
4981         non-constant expressions.
4983 2019-03-22  Jakub Jelinek  <jakub@redhat.com>
4985         PR c++/87481
4986         * c.opt (-fconstexpr-ops-limit=): New option.
4988 2019-03-21  Jakub Jelinek  <jakub@redhat.com>
4990         * c-common.c (per_file_includes_t): Use false as Lazy in hash_set
4991         template param.
4993 2019-03-19  Martin Sebor  <msebor@redhat.com>
4995         PR tree-optimization/89688
4996         * c-common.c (braced_list_to_string): Make static.
4997         (braced_lists_to_strings): Define new function.
4998         * c-common.h (braced_list_to_string): Remove.
4999         (braced_lists_to_strings): Declare.
5001 2019-03-12  Martin Liska  <mliska@suse.cz>
5003         * c-opts.c (c_common_handle_option): Wrap option with %< and %>.
5005 2019-03-11  Martin Liska  <mliska@suse.cz>
5007         * c-opts.c (c_common_post_options): Wrap apostrophes
5008         in gcc internal format with %'.
5010 2019-03-11  Martin Liska  <mliska@suse.cz>
5012         * c-attribs.c (handle_nocf_check_attribute): Wrap an option name
5013         in a string format message and fix GNU coding style.
5014         * c-common.c (vector_types_convertible_p): Likewise.
5015         (c_build_vec_perm_expr): Likewise.
5016         * c-indentation.c (get_visual_column): Likewise.
5017         * c-opts.c (c_common_handle_option): Likewise.
5018         (c_common_post_options): Likewise.
5019         (sanitize_cpp_opts): Likewise.
5020         * c-pch.c (c_common_pch_pragma): Likewise.
5021         * c-pragma.c (handle_pragma_pack): Likewise.
5023 2019-03-08  Jakub Jelinek  <jakub@redhat.com>
5025         PR tree-optimization/89550
5026         * c-common.c (c_common_truthvalue_conversion): Only set
5027         TREE_NO_WARNING if warning_at returned true.
5028         * c-warn.c (overflow_warning, warn_logical_operator): Likewise.
5030 2019-02-25  Sandra Loosemore  <sandra@codesourcery.com>
5031             Martin Sebor  <msebor@gmail.com>
5033         * c.opt (Wmissing-attributes): Clean up doc string.
5035 2019-02-25  Jakub Jelinek  <jakub@redhat.com>
5037         PR c/89495
5038         * c-format.c (maybe_read_dollar_number): Compute nargnum in
5039         HOST_WIDE_INT type to avoid overflows and change overflow_flag
5040         checking.
5042 2019-02-22  Richard Biener  <rguenther@suse.de>
5044         * c-pch.c (no_checksum): Remove.
5045         (pch_init): Remove assertion that executable_checksum is not
5046         all zero.
5047         (c_common_valid_pch): Likewise.
5049 2019-02-18  Martin Sebor  <msebor@redhat.com>
5051         PR middle-end/89294
5052         * c-common.c (invalid_array_size_error): Handle cst_size_not_constant.
5054 2019-02-16  David Malcolm  <dmalcolm@redhat.com>
5056         PR c++/88680
5057         * c-common.c (shorten_compare): Call fold_for_warn on op0 when
5058         implementing -Wtype-limits.
5060 2019-02-11  Martin Sebor  <msebor@redhat.com>
5062         PR c++/87996
5063         * c-common.c (invalid_array_size_error): New function.
5064         (valid_array_size_p): Call it.  Handle size as well as type.
5065         * c-common.h (valid_constant_size_p): New function.
5066         (enum cst_size_error): New type.
5068 2019-01-31  David Malcolm  <dmalcolm@redhat.com>
5070         PR c/89122
5071         * known-headers.cc (get_stdlib_header_for_name): Add
5072         {FLT|DBL|LDBL}_{MAX|MIN} to "hints" array.
5074 2019-01-31  Jakub Jelinek  <jakub@redhat.com>
5076         PR libstdc++/88170
5077         * c-pretty-print.c (pp_c_enumeration_constant): Print always as
5078         a C cast in pp_c_flag_gnu_v3 mode.
5080 2019-01-29  Jakub Jelinek  <jakub@redhat.com>
5082         PR c/86125
5083         * c-common.c (c_common_nodes_and_builtins): Build type variants for
5084         builtin_structptr_types types even for C.
5086 2019-01-28  Bernd Edlinger  <bernd.edlinger@hotmail.de>
5088         * c-warn.c (check_address_or_pointer_of_packed_member): Handle the case
5089         when rhs is of array type correctly.  Fix handling of nested structures.
5090         Fix handling of indirect_ref together with nop_expr and/or addr_expr.
5091         (check_and_warn_address_or_pointer_of_packed_member): Fix handling of
5092         type casts within nested compound expressions.
5094 2019-01-22  Jakub Jelinek  <jakub@redhat.com>
5096         PR middle-end/88968
5097         * c-omp.c (c_finish_omp_atomic): For bitfield atomics, update type
5098         variable after using BIT_FIELD_REF.
5100 2019-01-18  H.J. Lu  <hongjiu.lu@intel.com>
5102         PR c/51628
5103         PR c/88664
5104         * c-common.h (warn_for_address_or_pointer_of_packed_member):
5105         Remove the boolean argument.
5106         * c-warn.c (check_address_of_packed_member): Renamed to ...
5107         (check_address_or_pointer_of_packed_member): This.  Also
5108         warn pointer conversion.
5109         (check_and_warn_address_of_packed_member): Renamed to ...
5110         (check_and_warn_address_or_pointer_of_packed_member): This.
5111         Also warn pointer conversion.
5112         (warn_for_address_or_pointer_of_packed_member): Remove the
5113         boolean argument.  Don't check pointer conversion here.
5115 2019-01-15  Richard Sandiford  <richard.sandiford@arm.com>
5117         PR inline-asm/52813
5118         * c.opt (Wdeprecated): Move documentation and variable to common.opt.
5120 2019-01-14  Jakub Jelinek  <jakub@redhat.com>
5122         * c-cppbuiltin.c (c_cpp_builtin): Define __cpp_guaranteed_copy_elision
5123         and __cpp_nontype_template_parameter_auto.  Add a comment that
5124         __cpp_template_auto is deprecated.
5126 2019-01-14  Tom Honermann  <tom@honermann.net>
5128         Implement P0482R5, char8_t: A type for UTF-8 characters and strings
5129         * c-common.c (c_common_reswords): Add char8_t.
5130         (fix_string_type): Use char8_t for the type of u8 string literals.
5131         (c_common_get_alias_set): char8_t doesn't alias.
5132         (c_common_nodes_and_builtins): Define char8_t as a builtin type in
5133         C++.
5134         (c_stddef_cpp_builtins): Add __CHAR8_TYPE__.
5135         (keyword_begins_type_specifier): Add RID_CHAR8.
5136         * c-common.h (rid): Add RID_CHAR8.
5137         (c_tree_index): Add CTI_CHAR8_TYPE and CTI_CHAR8_ARRAY_TYPE.
5138         Define D_CXX_CHAR8_T and D_CXX_CHAR8_T_FLAGS.
5139         Define char8_type_node and char8_array_type_node.
5140         * c-cppbuiltin.c (cpp_atomic_builtins): Predefine
5141         __GCC_ATOMIC_CHAR8_T_LOCK_FREE.
5142         (c_cpp_builtins): Predefine __cpp_char8_t.
5143         * c-lex.c (lex_string): Use char8_array_type_node as the type of
5144         CPP_UTF8STRING.
5145         (lex_charconst): Use char8_type_node as the type of CPP_UTF8CHAR.
5146         * c-opts.c: If not otherwise specified, enable -fchar8_t when
5147         targeting C++2a.
5148         * c.opt: Add the -fchar8_t command line option.
5150 2019-01-14  Martin Sebor  <msebor@redhat.com>
5152         PR target/88638
5153         * c-attribs.c (positional_argument): Call valid_format_string_type_p
5154         and issue errors if it fails.
5155         * c-common.h (valid_format_string_type_p): Declare.
5156         * c-format.c (valid_stringptr_type_p): Rename...
5157         (valid_format_string_type_p): ...to this and make extern.
5158         (handle_format_arg_attribute): Adjust to new name.
5159         (check_format_string): Same.
5161 2019-01-13  H.J. Lu  <hongjiu.lu@intel.com>
5163         * c-warn.c (warn_for_address_or_pointer_of_packed_member):
5164         Replace "may may" with "may" in warning message.
5166 2019-01-07  Jakub Jelinek  <jakub@redhat.com>
5168         PR c++/85052
5169         * c-common.h (enum rid): Add RID_BUILTIN_CONVERTVECTOR.
5170         (c_build_vec_convert): Declare.
5171         * c-common.c (c_build_vec_convert): New function.
5173 2019-01-04  Martin Sebor  <msebor@redhat.com>
5175         PR c/88546
5176         * c-attribs.c (handle_copy_attribute): Avoid copying attribute leaf.
5177         Handle C++ empty throw specification and C11 _Noreturn.
5178         (has_attribute): Also handle C11 _Noreturn.
5180 2019-01-04  Martin Sebor  <msebor@redhat.com>
5182         PR c/88363
5183         * c-attribs.c (positional_argument): Also accept enumerated types.
5185 2019-01-01  Jakub Jelinek  <jakub@redhat.com>
5187         Update copyright years.
5189 2018-12-20  H.J. Lu  <hongjiu.lu@intel.com>
5191         PR c/51628
5192         * c-common.h (warn_for_address_or_pointer_of_packed_member): New.
5193         * c-warn.c (check_alignment_of_packed_member): New function.
5194         (check_address_of_packed_member): Likewise.
5195         (check_and_warn_address_of_packed_member): Likewise.
5196         (warn_for_address_or_pointer_of_packed_member): Likewise.
5197         * c.opt: Add -Wno-address-of-packed-member.
5199 2018-12-20  David Malcolm  <dmalcolm@redhat.com>
5201         PR c++/87504
5202         * c-warn.c (get_outermost_macro_expansion): New function.
5203         (spelled_the_same_p): Use it to unwind the macro expansions, and
5204         compare the outermost macro in each nested expansion, rather than
5205         the innermost.
5207 2018-12-19  David Malcolm  <dmalcolm@redhat.com>
5209         PR c++/87504
5210         * c-common.h (warn_tautological_cmp): Convert 1st param from
5211         location_t to const op_location_t &.
5212         * c-warn.c (find_array_ref_with_const_idx_r): Call fold_for_warn
5213         when testing for INTEGER_CST.
5214         (warn_tautological_bitwise_comparison): Convert 1st param from
5215         location_t to const op_location_t &; use it to build a
5216         binary_op_rich_location, and use this.
5217         (spelled_the_same_p): New function.
5218         (warn_tautological_cmp): Convert 1st param from location_t to
5219         const op_location_t &.  Warn for macro expansions if
5220         spelled_the_same_p.  Use binary_op_rich_location.
5222 2018-12-19  David Malcolm  <dmalcolm@redhat.com>
5224         PR c++/43064
5225         PR c++/43486
5226         * c-common.c (unsafe_conversion_p): Fold any location wrapper.
5227         (verify_tree): Handle location wrappers.
5228         (c_common_truthvalue_conversion): Strip any location wrapper.
5229         Handle CONST_DECL.
5230         (fold_offsetof): Strip any location wrapper.
5231         (complete_array_type): Likewise for initial_value.
5232         (convert_vector_to_array_for_subscript): Call fold_for_warn on the
5233         index before checking for INTEGER_CST.
5234         * c-pretty-print.c (c_pretty_printer::primary_expression): Don't
5235         print parentheses around location wrappers.
5236         * c-warn.c (warn_logical_operator): Call fold_for_warn on op_right
5237         before checking for INTEGER_CST.
5238         (warn_tautological_bitwise_comparison): Call
5239         tree_strip_any_location_wrapper on lhs, rhs, and bitop's operand
5240         before checking for INTEGER_CST.
5241         (readonly_error): Strip any location wrapper.
5242         (warn_array_subscript_with_type_char): Strip location wrappers
5243         before checking for INTEGER_CST.  Use the location of the index if
5244         available.
5246 2018-12-06  Jason Merrill  <jason@redhat.com>
5248         PR c++/88136 - -Wdeprecated-copy false positives
5249         * c.opt (Wdeprecated-copy-dtor): New.
5250         (Wdeprecated-copy): Move to -Wextra.
5252 2018-11-29  Martin Sebor  <msebor@redhat.com>
5254         PR c/88172
5255         PR testsuite/88208
5256         * c-attribs.c (common_handle_aligned_attribute): Silently avoid setting
5257         alignments to values less than the target requires.
5258         (has_attribute): For attribute aligned consider both the attribute
5259         and the alignment bits.
5260         * c-common.c (c_init_attributes): Optionally issue a warning for
5261         zero alignment.
5263 2018-11-28  Martin Sebor  <msebor@redhat.com>
5265         PR c/88065
5266         PR c/87297
5267         * c-warn.c (sizeof_pointer_memaccess_warning): Bail if source
5268         or destination is an error.
5270 2018-11-28  Jakub Jelinek  <jakub@redhat.com>
5272         PR c++/88215
5273         * c-ubsan.c: Include langhooks.h.
5274         (ubsan_instrument_division): Change gcc_assert that main variants
5275         of op0 and op1 types are equal to gcc_checking_assert that the
5276         main variants are compatible types.
5278 2018-11-27  Eric Botcazou  <ebotcazou@adacore.com>
5280         * c-ada-spec.c: Include stringpool.h.
5281         (has_static_fields): Return false for incomplete types.
5282         (is_tagged_type): Likewise.
5283         (has_nontrivial_methods): Likewise.
5284         (dump_ada_node) <INTEGER_TYPE>: Deal specifically with __int128.
5285         (struct overloaded_name_hash): New structure.
5286         (struct overloaded_name_hasher): Likewise.
5287         (overloaded_names): New global variable.
5288         (init_overloaded_names): New static function.
5289         (overloaded_name_p): New predicate.
5290         (dump_ada_declaration) <TYPE_DECL>: Tidy up and set TREE_VISITED
5291         on the TYPE_STUB_DECL of the original type of a typedef, if any.
5292         <FUNCTION_DECL>: Bail out for an unsupported overloaded name.
5293         Remove always-true condition and dump forward types.
5294         (dump_ada_specs): Delete overloaded_names.
5296 2018-11-20  Martin Sebor  <msebor@redhat.com>
5298         * c-attribs.c (type_for_vector_size): New function.
5299         (type_valid_for_vector_size): Same.
5300         (handle_vector_size_attribute): Move code to the functions above
5301         and call them.
5302         (validate_attribute, has_attribute): New functions.
5303         * c-common.h (has_attribute): Declare.
5304         (rid): Add RID_HAS_ATTRIBUTE_EXPRESSION.
5305         * c-common.c (c_common_resword): Same.
5307 2018-11-16  Jason Merrill  <jason@redhat.com>
5309         * c-lex.c (c_common_has_attribute): Handle likely/unlikely.
5310         * c-attribs.c (attr_cold_hot_exclusions): Make public.
5312 2018-11-16  Jakub Jelinek  <jakub@redhat.com>
5314         PR middle-end/87854
5315         * c-common.c (fix_string_type): Reject string literals larger than
5316         TYPE_MAX_VALUE (ssizetype) bytes.
5318 2018-11-15  Martin Sebor  <msebor@redhat.com>
5320         PR c++/87541
5321         PR c++/87542
5322         * c-attribs.c (positional_argument): New function.
5323         (handle_alloc_size_attribute): Use it and simplify.
5324         (handle_alloc_align_attribute): Same.
5325         (handle_assume_aligned_attribute): Same.
5326         (handle_nonnull_attribute): Same.
5327         * c-common.c (check_function_arguments): Pass fntype to
5328         check_function_format.
5329         * c-common.h (check_function_format): Add an argument.
5330         (PosArgFlags, positional_argument): Declare new type and function.
5331         * c-format.c (decode_format_attr): Add arguments.
5332         (check_format_string, get_constant): Same.
5333         (convert_format_name_to_system_name): Adjust.
5335 2018-11-15  David Malcolm  <dmalcolm@redhat.com>
5337         PR other/19165
5338         * c-opts.c (c_diagnostic_finalizer): Add diagnostic_t param.
5340 2018-11-14  Jakub Jelinek  <jakub@redhat.com>
5342         P1236R1 - Signed integers are two's complement
5343         * c-warn.c (maybe_warn_shift_overflow): Don't warn for c++2a.
5344         * c-ubsan.c (ubsan_instrument_shift): Make signed shifts
5345         with in-range second operand well defined for -std=c++2a.
5347         PR other/88007
5348         * c-common.c (parse_optimize_options): Allocate option string from
5349         opts_obstack rather than as GC memory.  Move the allocation after
5350         warning for invalid option.
5352 2018-11-13  David Malcolm  <dmalcolm@redhat.com>
5354         * c-common.c (c_get_substring_location): Update for renaming of
5355         get_source_location_for_substring to get_location_within_string.
5356         * c-lex.c: Replace "source_location" with "location_t".
5357         * c-opts.c: Likewise.
5358         * c-ppoutput.c: Likewise.
5360 2018-11-13  Martin Sebor  <msebor@redhat.com>
5362         PR middle-end/81824
5363         * c-attribs.c (handle_copy_attribute): Exclude inlining attributes.
5364         (handle_tls_model_attribute): Improve diagnostics.
5366 2018-11-12  Jason Merrill  <jason@redhat.com>
5368         * c-cppbuiltin.c (c_cpp_builtins): Define
5369         __cpp_impl_destroying_delete.
5371         * c-cppbuiltin.c (c_cpp_builtins): Change __cpp_explicit_bool to
5372         __cpp_conditional_explicit.
5374 2018-11-09  Martin Sebor  <msebor@redhat.com>
5376         PR middle-end/81824
5377         * c-attribs.c (handle_copy_attribute): New function.
5379 2018-11-09  Martin Sebor  <msebor@redhat.com>
5381         PR c/87795
5382         * c-common.c (check_user_alignment): Use MAX_OFILE_ALIGNMENT.
5384 2018-11-08  Jakub Jelinek  <jakub@redhat.com>
5386         * c-common.h (c_finish_omp_taskgroup): Add CLAUSES argument.
5387         (c_finish_omp_atomic): Replace bool SEQ_CST argument with
5388         enum omp_memory_order MEMORY_ORDER.
5389         (c_finish_omp_flush): Add MO argument.
5390         (c_omp_depend_t_p, c_finish_omp_depobj): Declare.
5391         (c_finish_omp_for): Add FINAL_P argument.
5392         * c-omp.c: Include memmodel.h.
5393         (c_finish_omp_taskgroup): Add CLAUSES argument.  Set
5394         OMP_TASKGROUP_CLAUSES to it.
5395         (c_finish_omp_atomic): Replace bool SEQ_CST argument with
5396         enum omp_memory_order MEMORY_ORDER.  Set OMP_ATOMIC_MEMORY_ORDER
5397         instead of OMP_ATOMIC_SEQ_CST.
5398         (c_omp_depend_t_p, c_finish_omp_depobj): New functions.
5399         (c_finish_omp_flush): Add MO argument, if not MEMMODEL_LAST, emit
5400         __atomic_thread_fence call with the given value.
5401         (check_omp_for_incr_expr): Formatting fixes.
5402         (c_finish_omp_for): Add FINAL_P argument.  Allow NE_EXPR
5403         even in OpenMP loops, diagnose if NE_EXPR and incr expression
5404         is not constant expression 1 or -1.  Transform NE_EXPR loops
5405         with iterators pointers to VLA into LT_EXPR or GT_EXPR loops.
5406         (c_omp_check_loop_iv_r): Look for orig decl of C++ range for
5407         loops too.
5408         (c_omp_split_clauses): Add support for combined
5409         #pragma omp parallel master and
5410         #pragma omp {,parallel }master taskloop{, simd} constructs.
5411         Handle OMP_CLAUSE_IN_REDUCTION.  Handle OMP_CLAUSE_REDUCTION_TASK.
5412         Handle OMP_CLAUSE_NONTEMPORAL.  Handle splitting OMP_CLAUSE_IF
5413         also to OMP_SIMD.  Copy OMP_CLAUSE_LASTPRIVATE_CONDITIONAL.
5414         (c_omp_predetermined_sharing): Don't return
5415         OMP_CLAUSE_DEFAULT_SHARED for const qualified decls.
5416         * c-pragma.c (omp_pragmas): Add PRAGMA_OMP_DEPOBJ and
5417         PRAGMA_OMP_REQUIRES.
5418         * c-pragma.h (enum pragma_kind): Likewise.
5419         (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_NONTEMPORAL
5420         and PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
5422 2018-11-08  David Malcolm  <dmalcolm@redhat.com>
5424         * c-format.c (gcc_dump_printf_char_table): Add entry for %f.
5426 2018-11-08  David Malcolm  <dmalcolm@redhat.com>
5428         * c-format.c (local_cgraph_node_ptr_node): New variable.
5429         (gcc_dump_printf_char_table): Add entry for %C.
5430         (get_pointer_to_named_type): New function, taken from the handling
5431         code for "gimple *" from...
5432         (init_dynamic_diag_info): ...here.  Add handling for
5433         "cgraph_node *".
5434         * c-format.h (T_CGRAPH_NODE): New.
5436 2018-10-19  Jason Merrill  <jason@redhat.com>
5438         * c-cppbuiltin.c (c_cpp_builtins): Add
5439         __cpp_nontype_template_parameter_class.
5441 2018-10-31  Nathan Sidwell  <nathan@acm.org>
5443         * c-opts.c (c_finish_options): Force command line macro
5444         location.  Refactor to avoid repeating main debug hook.
5445         (push_command_line_include): Clarify comment.
5447         * c-opts.c (c_finish_options): Adjust cpp_force_token_locations call.
5449 2018-10-30  Martin Sebor  <msebor@redhat.com>
5451         PR middle-end/87041
5452         * c-format.c (check_format_types): Avoid diagnosing null pointer
5453         arguments to printf-family of functions.
5455 2018-10-30  Marek Polacek  <polacek@redhat.com>
5457         Implement P0892R2, explicit(bool).
5458         * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_explicit_bool.
5460 2018-10-29  David Malcolm  <dmalcolm@redhat.com>
5462         * name-hint.h (name_hint::take_deferred): New member function.
5464 2018-10-29  David Malcolm  <dmalcolm@redhat.com>
5466         PR c++/56856
5467         * c-common.c (check_function_sentinel): Call fold_for_warn on the
5468         argument.
5469         (check_function_restrict): Rename param "argarray" to
5470         "unfolded_argarray", and make a copy named "argarray", calling
5471         fold_for_warn on each argument.
5472         (check_function_arguments): Add note about responsibility for
5473         folding the arguments.
5475 2018-10-17  Joseph Myers  <joseph@codesourcery.com>
5477         * c-common.c (flag_isoc2x): New variable.
5478         * c-common.h (clk_c): Update comment to reference C2X.
5479         (flag_isoc99, flag_isoc11): Update comments to reference future
5480         standard versions in general.
5481         (flag_isoc2x): Declare.
5482         * c-opts.c (set_std_c2x): New function.
5483         (c_common_handle_option): Handle -std=c2x and -std=gnu2x.
5484         (set_std_c89, set_std_c99, set_std_c11, set_std_c17): Set
5485         flag_isoc2x to 0.
5486         * c.opt (Wc11-c2x-compat, std=c2x, std=gnu2x): New options.
5488 2018-10-17  Joseph Myers  <joseph@codesourcery.com>
5490         * c.opt (std=c17, std=c18, std=gnu17, std=gnu18, std=iso9899:2017)
5491         (std=iso9899:2018): Document C17 as published in 2018.
5493 2018-10-12  Christophe Lyon  <christophe.lyon@linaro.org>
5495         PR c++/87364
5496         * c-pretty-print.c (c_pretty_printer::constant): Fix typo.
5498 2018-10-11  Will Wray  <wjwray@gmail.com>
5500         PR c++/87364
5501         * c-pretty-print.h (pp_c_type_cast): Prototype.
5502         (pp_c_integer_constant): Likewise.
5503         * c-pretty-print.c (pp_c_type_cast): No longer static.
5504         (pp_c_integer_constant): Likewise.
5505         (pp_c_enumeration_constant): Fix loop termination when finding
5506         name of constant.  No longer returns a value.  Call
5507         pp_c_integer_constant.
5508         (c_pretty_printer::constant): Update for changes to
5509         pp_c_enumeration_constant.
5511 2018-10-11  Jakub Jelinek  <jakub@redhat.com>
5513         * c-lex.c (c_common_has_attribute): Return 201803 instead of 20180312
5514         for no_unique_address.
5516 2018-10-09  David Malcolm  <dmalcolm@redhat.com>
5518         * c-common.c (c_option_controlling_cpp_error): Rename to...
5519         (c_option_controlling_cpp_diagnostic): ...this, and convert
5520         "reason" from int to enum.
5521         (c_cpp_error): Rename to...
5522         (c_cpp_diagnostic): ...this, converting level and reason to enums.
5523         * c-common.h (c_cpp_error): Rename to...
5524         (c_cpp_diagnostic): ...this, converting level and reason to enums.
5525         * c-opts.c (c_common_init_options): Update for renaming.
5527 2018-10-08  Richard Sandiford  <richard.sandiford@arm.com>
5529         PR c/87286
5530         * c-common.c (vector_types_compatible_elements_p): Use
5531         INTEGRAL_TYPE_P instead of checking only for INTEGER_TYPE.
5533 2018-10-04  Vinay Kumar  <vinay.kumar@blackfigtech.com>
5535         * c-attribs.c (get_priority): Add a warning flag warn_prio_ctor_dtor
5536         to generate constructor destructor priority warning.
5537         * c.opt (-Wprio-ctor-dtor): New option.
5539 2018-10-01  Jason Merrill  <jason@redhat.com>
5541         * c-lex.c (c_common_has_attribute): Add no_unique_address.
5543 2018-10-01  Eric Botcazou  <ebotcazou@adacore.com>
5545         * c-ada-spec.c (get_underlying_decl): Get to the main type variant.
5546         (dump_ada_node): Add const keyword.
5548 2018-09-25  Martin Liska  <mliska@suse.cz>
5550         * c-common.c (c_common_truthvalue_conversion):
5551         Remove Pascal from documentation.
5553 2018-09-21  Eric Botcazou  <ebotcazou@adacore.com>
5555         * c-ada-spec.c: Include diagnostic.h.
5556         (dump_ada_declaration) <RECORD_TYPE>: Issue a warning on packed layout.
5558 2018-09-19  Marek Polacek  <polacek@redhat.com>
5560         * c.opt (Wclass-conversion): New.
5562 2018-09-17  David Malcolm  <dmalcolm@redhat.com>
5564         * c-format.c (range_label_for_format_type_mismatch::get_text):
5565         Update for new param.
5567 2018-09-17  David Malcolm  <dmalcolm@redhat.com>
5569         * c-format.c (format_warning_at_char): Update for introduction of
5570         format_string_diagnostic_t.
5571         (format_type_warning): Likewise.
5573 2018-09-17  Martin Jambor  <mjambor@suse.cz>
5575         PR c/63886
5576         * c.opt (Wabsolute-value): New.
5578 2018-09-06  Bernd Edlinger  <bernd.edlinger@hotmail.de>
5580         * c-common.c (complete_flexible_array_elts): New helper function.
5581         * c-common.h (complete_flexible_array_elts): Declare.
5583 2018-09-02  Bernd Edlinger  <bernd.edlinger@hotmail.de>
5585         * c-common.c (braced_list_to_string): Remove eval parameter.
5586         Add some more checks.  Always create zero-terminated STRING_CST.
5587         * c-common.h (braced_list_to_string): Adjust prototype.
5589 2018-08-27  David Malcolm  <dmalcolm@redhat.com>
5591         PR 87091
5592         * c-common.c (c_cpp_error): Update for conversion of show_caret_p
5593         to a tri-state.
5594         (maybe_suggest_missing_token_insertion): Likewise.
5595         (maybe_add_include_fixit): Add param "override_location".  If set,
5596         and source-printing is enabled, then override the rich_location's
5597         primary location with that of the insertion point for the fix-it
5598         hint, marking it with SHOW_LINES_WITHOUT_RANGE.
5599         * c-common.h (extern void maybe_add_include_fixit): Add bool
5600         param.
5601         * c-format.c (selftest::test_type_mismatch_range_labels): Update
5602         for conversion of show_caret_p to a tri-state.
5603         * c-warn.c (warn_for_restrict): Likewise.
5604         * known-headers.cc
5605         (suggest_missing_header::~suggest_missing_header): Update call to
5606         maybe_add_include_fixit to suggest overriding the location, as it
5607         is for a note.
5609 2018-08-27  Martin Liska  <mliska@suse.cz>
5611         * c-common.c (check_function_restrict): Use new function
5612         fndecl_built_in_p and remove check for FUNCTION_DECL if
5613         possible.
5614         (check_builtin_function_arguments): Likewise.
5615         (reject_gcc_builtin): Likewise.
5616         * c-warn.c (sizeof_pointer_memaccess_warning): Likewise.
5618 2018-08-26  Marek Polacek  <polacek@redhat.com>
5620         PR c++/87029, Implement -Wredundant-move.
5621         * c.opt (Wredundant-move): New option.
5623 2018-08-21  Marek Polacek  <polacek@redhat.com>
5625         PR c++/86981, Implement -Wpessimizing-move.
5626         * c.opt (Wpessimizing-move): New option.
5628 2018-08-20  David Malcolm  <dmalcolm@redhat.com>
5630         PR other/84889
5631         * c-attribs.c (common_handle_aligned_attribute): Add
5632         auto_diagnostic_group instance.
5633         * c-indentation.c (warn_for_misleading_indentation): Likewise.
5634         * c-opts.c (c_common_post_options): Likewise.
5635         * c-warn.c (warn_logical_not_parentheses): Likewise.
5636         (warn_duplicated_cond_add_or_warn): Likewise.
5637         (warn_for_multistatement_macros): Likewise.
5639 2018-08-20  Nathan Sidwell  <nathan@acm.org>
5641         * c-ada-spec.c (macro_length, dump_ada_macros): Adjust macro parm
5642         access.
5644 2018-08-17  Nathan Sidwell  <nathan@acm.org>
5646         * c-cppbuiltin.c (struct lazy_hex_fp_value_struct): Remove macro
5647         field.
5648         (laxy_hex_fp_value_count): Make unsigned.
5649         (lazy_hex_fp_value): Provided with macro & lazy number.  Directly
5650         manipulate the macro.
5651         (builtin_defin_with_hex_fp_value): Adjust callback name, use
5652         cpp_define_lazily.
5654 2018-08-17  David Malcolm  <dmalcolm@redhat.com>
5656         * c-format.c (enum format_type): Add gcc_dump_printf_format_type.
5657         (gcc_dump_printf_length_specs): New.
5658         (gcc_dump_printf_flag_pairs): New.
5659         (gcc_dump_printf_flag_specs): New.
5660         (gcc_dump_printf_char_table): New.
5661         (format_types_orig): Add entry for "gcc_dump_printf".
5662         (init_dynamic_diag_info): Set up length_char_specs and
5663         conversion_specs for gcc_dump_printf_format_type.
5664         (handle_format_attribute): Handle gcc_dump_printf_format_type.
5666 2018-08-17  Nathan Sidwell  <nathan@acm.org>
5668         * c-ada-spec.c (macro_length, dump_ada_macros): Constify.
5670         * c-ada-spec.c: Don't #include "cpp-id-data.h"
5671         * c-cppbuiltin.c: Likewise.
5673 2018-08-17  Martin Liska  <mliska@suse.cz>
5675         * c.opt: Remove Warn, Init and Report for options with
5676         Ignore/Deprecated flag. Warning is done automatically for
5677         Deprecated flags.
5679 2018-08-16  David Malcolm  <dmalcolm@redhat.com>
5681         PR c++/70693
5682         * c-common.c (selftest::c_family_tests): Call
5683         selftest::c_indentation_c_tests.
5684         * c-common.h (selftest::c_indentation_c_tests): New decl.
5685         * c-indentation.c: Include "selftest.h".
5686         (next_tab_stop): Add "tab_width" param, rather than accessing
5687         cpp_opts.
5688         (get_visual_column): Likewise.  Clarify comment.  Bulletproof
5689         against reading past the end of the line.
5690         (get_first_nws_vis_column): Add "tab_width" param.
5691         (detect_intervening_unindent): Likewise.
5692         (should_warn_for_misleading_indentation): Read tab width from
5693         cpp_opts and pass around.
5694         (selftest::test_next_tab_stop): New test.
5695         (selftest::assert_get_visual_column_succeeds): New function.
5696         (ASSERT_GET_VISUAL_COLUMN_SUCCEEDS): New macro.
5697         (selftest::assert_get_visual_column_fails): New function.
5698         (ASSERT_GET_VISUAL_COLUMN_FAILS): New macro.
5699         (selftest::test_get_visual_column): New test.
5700         (selftest::c_indentation_c_tests): New function.
5702 2018-08-16  Nathan Sidwell  <nathan@acm.org>
5704         * c-ada-spec.c (count_ada_macro): Use cpp_user_macro_p.
5705         (store_ada_macro): Likewise.
5706         * c-ppoutput.c (cb_used_define, dump_macro): Likewise.
5707         * c-spellcheck.cc (should-suggest_as_macro_p): Likewise,
5709 2018-08-15  David Malcolm  <dmalcolm@redhat.com>
5711         * c-format.c: Include "selftest-diagnostic.h" and
5712         "gcc-rich-location.h".
5713         (format_warning_at_char): Pass NULL for new label params of
5714         format_warning_va.
5715         (class indirection_suffix): New class.
5716         (class range_label_for_format_type_mismatch): New class.
5717         (format_type_warning): Move logic for generating "*" suffix to
5718         class indirection_suffix.  Create "fmt_label" and "param_label"
5719         to show their types, and pass them to the
5720         format_warning_at_substring calls.
5721         (selftest::test_type_mismatch_range_labels): New test.
5722         (selftest::c_format_c_tests): Call it.
5724 2018-08-13  Martin Sebor  <msebor@redhat.com>
5726         PR tree-optimization/71625
5727         * c-common.c (braced_list_to_string): New function.
5728         * c-common.h (braced_list_to_string): Declare it.
5730 2018-08-08  Nathan Sidwell  <nathan@acm.org>
5732         * c-common.c (try_to_locate_new_include_inertion_point): Use
5733         linemap_included_from_linemap.
5734         * c-lex.c (fe_file_change): Use linemap_included_from.
5735         * c-ppoutput.c (pp_file_change): Likewise.
5737 2018-08-01  Martin Sebor  <msebor@redhat.com>
5739         PR tree-optimization/86650
5740         * c-format.c (gcc_tdiag_char_table): Update comment for "%G".
5741         (gcc_cdiag_char_table, gcc_cxxdiag_char_table): Same.
5742         (init_dynamic_diag_info): Update from "gcall *" to "gimple *".
5743         * c-format.h (T89_G): Update to be "gimple *" rather than
5744         "gcall *".
5745         (local_gcall_ptr_node): Rename...
5746         (local_gimple_ptr_node): ...to this.
5748 2018-07-31  David Malcolm  <dmalcolm@redhat.com>
5750         * c-format.c (PP_FORMAT_CHAR_TABLE): New macro, based on existing
5751         table entries for gcc_diag_char_table, and the 'Z' entry from
5752         gcc_tdiag_char_table, changing the "chain" entry for 'Z' from
5753         &gcc_tdiag_char_table[0] to &gcc_diag_char_table[0].
5754         (gcc_diag_char_table): Use PP_FORMAT_CHAR_TABLE, implicitly
5755         adding missing "Z" for this table.  Remove erroneous "G" and "K"
5756         entries.
5757         (gcc_tdiag_char_table): Use PP_FORMAT_CHAR_TABLE.  Remove "v".
5758         (gcc_cdiag_char_table): Use PP_FORMAT_CHAR_TABLE.
5759         (gcc_cxxdiag_char_table): Use PP_FORMAT_CHAR_TABLE.  Remove "v".
5761 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
5763         * c-common.c (speculation_safe_resolve_call): New function.
5764         (speculation_safe_resolve_params): New function.
5765         (speculation_safe_resolve_return): New function.
5766         (resolve_overloaded_builtin): Handle __builtin_speculation_safe_value.
5767         * c-cppbuiltin.c (c_cpp_builtins): Add pre-define for
5768         __HAVE_SPECULATION_SAFE_VALUE.
5770 2018-07-20  David Malcolm  <dmalcolm@redhat.com>
5772         * c-common.c (c_cpp_error): Remove redundant "line_table"
5773         parameter from call to rich_location::set_range.
5774         (maybe_suggest_missing_token_insertion): Likewise.
5776 2018-07-20  Martin Sebor  <msebor@redhat.com>
5778         PR middle-end/82063
5779         * c.opt (-Warray-bounds): Remove redundant -Wall.
5781 2018-07-20  Martin Sebor  <msebor@redhat.com>
5783         PR middle-end/82063
5784         * c-common.h (c_common_handle_option): Change function argument
5785         to HOST_WIDE_INT.
5786         * c-opts.c (c_common_init_options): Same.
5787         (c_common_handle_option): Same.  Remove special handling of
5788         OPT_Walloca_larger_than_ and OPT_Wvla_larger_than_.
5789         * c.opt (-Walloc-size-larger-than, -Walloca-larger-than): Change
5790         options to take a HOST_WIDE_INT argument and accept a byte-size
5791         suffix.  Initialize.
5792         (-Wvla-larger-than): Same.
5793         (-Wno-alloc-size-larger-than, -Wno-alloca-larger-than): New.
5794         (-Wno-vla-larger-than): Same.
5796 2018-07-12  Jakub Jelinek  <jakub@redhat.com>
5798         * c-attribs.c (c_common_attribute_table): Add
5799         "omp declare target implicit" attribute.
5801 2018-07-12  Richard Biener  <rguenther@suse.de>
5803         PR c/86453
5804         * c-attribs.c (handle_packed_attribute): Do not build a variant
5805         type with TYPE_PACKED, instead ignore the attribute if we may
5806         not apply to the original type.
5808 2018-07-10  Jakub Jelinek  <jakub@redhat.com>
5810         PR c++/86443
5811         * c-omp.c (c_omp_check_loop_iv_r, c_omp_check_loop_iv): Allow declv
5812         to contain TREE_LIST for both the original class iterator and the
5813         "last" helper var.
5815 2018-07-07  Eric Botcazou  <ebotcazou@adacore.com>
5817         * c-ada-spec.c (to_ada_name): Remove index parameter.
5818         (pp_ada_tree_identifier): Likewise.
5819         (dump_ada_macros): Adjust call to to_ada_name.
5820         (struct overloaded_name_hash): Delete.
5821         (struct overloaded_name_hasher): Likewise.
5822         (overloaded_names): Likewise.
5823         (compute_overloading_index): Likewise.
5824         (dump_ada_decl_name): Do not call compute_overloading_index and
5825         adjust calls to pp_ada_tree_identifier.
5826         (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
5827         (dump_ada_import): Add spc parameter and switch to aspect syntax.
5828         (dump_ada_function_declaration): Adjust call to pp_ada_tree_identifier.
5829         (dump_ada_enum_type): Remove type and display_convention parameters.
5830         Adjust calls to pp_ada_tree_identifier.
5831         (dump_ada_node): Likewise and for dump_ada_structure.
5832         (dump_nested_type) <ENUMERAL_TYPE>: Adjust call to dump_ada_enum_type
5833         and tidy up.
5834         <RECORD_TYPE>: Adjust call to dump_ada_structure and switch to aspect
5835         syntax.
5836         (print_constructor): Adjust call to pp_ada_tree_identifier.
5837         (print_destructor): Likewise.
5838         (dump_ada_declaration): Switch to aspect syntax.
5839         (dump_ada_structure): Likewise and tidy up.  Replace display_convention
5840         parameter with nested parameter.
5841         (dump_ads): Emit pragma Ada_2012 in lieu of pragma Ada_2005.
5842         (dump_ada_specs): Do not delete overloaded_names table.
5844 2018-07-06  Peter Bergner  <bergner@linux.ibm.com>
5846         PR target/86324
5847         * c-attribs.c (handle_mode_attribute): Call translate_mode_attribute
5848         target hook.
5850 2018-07-05  Nathan Sidwell  <nathan@acm.org>
5852         * c-lex.c (fe_file_change): Check SYSTEM_IMPLICIT_EXTERN_C not
5853         NO_IMPLICIT_EXTERN_C.
5855 2018-06-28  Martin Liska  <mliska@suse.cz>
5857         * cppspec.c: Include opt-suggestions.h.
5859 2018-06-20  Chung-Lin Tang  <cltang@codesourcery.com>
5860             Thomas Schwinge  <thomas@codesourcery.com>
5861             Cesar Philippidis  <cesar@codesourcery.com>
5863         * c-pragma.h (enum pragma_omp_clause): Add
5864         PRAGMA_OACC_CLAUSE_{FINALIZE,IF_PRESENT}. Remove
5865         PRAGMA_OACC_CLAUSE_PRESENT_OR_{COPY,COPYIN,COPYOUT,CREATE}.
5867 2018-06-20  Jakub Jelinek  <jakub@redhat.com>
5869         PR c++/86210
5870         * c-common.c (check_nonnull_arg): Use fold_for_warn.  Adjust obsolete
5871         comment.
5873 2018-06-18  Martin Sebor  <msebor@redhat.com>
5875         PR middle-end/85602
5876         * c-warn.c (sizeof_pointer_memaccess_warning): Check for attribute
5877         nonstring.
5879 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
5881         * c-common.c (c_common_truthvalue_conversion): Handle ABSU_EXPR.
5883 2018-06-13  Jason Merrill  <jason@redhat.com>
5885         * c-opts.c (c_common_post_options): Warn about useless -Wabi.
5886         (c_common_handle_option) [OPT_Wabi_]: Remove flag_abi_compat_version
5887         handling.
5889         PR c++/86094 - wrong code with defaulted move ctor.
5890         * c-opts.c (c_common_post_options): Bump the current ABI version to
5891         13.  Set warn_abi_version and flag_abi_compat_version to the current
5892         version rather than 0.  Fix defaulting flag_abi_compat_version from
5893         warn_abi_version.
5895 2018-06-12  Martin Sebor  <msebor@redhat.com>
5897         PR c/85931
5898         * c-warn.c (sizeof_pointer_memaccess_warning): Avoid warning when
5899         sizeof source and destination yields the same value.
5901 2018-06-12  Martin Liska  <mliska@suse.cz>
5903         * c.opt: Make MPX-related options as Deprecated.
5905 2018-06-08  David Malcolm  <dmalcolm@redhat.com>
5907         * c-pretty-print.c (c_pretty_printer::statement): Use TDF_NONE
5908         rather than 0.
5910 2018-06-08  Martin Liska  <mliska@suse.cz>
5912         * c-attribs.c (handle_bnd_variable_size_attribute): Remove support
5913         for MPX (macros, related functions, fields in cgraph_node, ...).
5914         (handle_bnd_legacy): Likewise.
5915         (handle_bnd_instrument): Likewise.
5916         * c.opt: Likewise.
5918 2018-06-06  Jakub Jelinek  <jakub@redhat.com>
5920         PR c++/86068
5921         * c-cppbuiltin.c (c_cpp_builtins): Fix a typo, set
5922         __cpp_transactional_memory to 201500 instead of 210500.
5924 2018-06-06  Jason Merrill  <jason@redhat.com>
5926         PR c++/85710 - ICE with -Wmemset-elt-size.
5927         * c-warn.c (warn_for_memset): Don't crash on incomplete element type.
5929 2018-06-01  Jason Merrill  <jason@redhat.com>
5931         * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_deduction_guides to
5932         201703.
5934 2018-06-01  Eric Botcazou  <ebotcazou@adacore.com>
5936         * c-ada-spec.c (dump_ada_declaration) <TYPE_DECL>: Generate a forward
5937         declaration for a typedef independently of whether the declaration of
5938         the subtype is generated.
5940 2018-05-31  Martin Sebor  <msebor@redhat.com>
5942         PR c/82063
5943         * c.opt (-Wno-alloc-size-larger-than): New option.
5945 2018-04-22  David Pagan  <dave.pagan@oracle.com>
5947         PR c/55976
5948         * c-opts.c (c_common_post_options): Set default for warn_return_type
5949         for C++/C++ with ObjC extensions only. For C, makes it possible to
5950         differentiate between default (no option), -Wreturn-type, and
5951         -Wno-return-type.
5953 2018-05-29  Jason Merrill  <jason@redhat.com>
5955         * c.opt (Winit-list-lifetime): New flag.
5957 2018-05-28  Bernd Edlinger  <bernd.edlinger@hotmail.de>
5959         * c-lex.c (get_fileinfo): Use splay_tree_compare_strings and
5960         splay_tree_delete_pointers.
5962 2018-05-26  Jakub Jelinek  <jakub@redhat.com>
5964         PR bootstrap/85921
5965         * c-warn.c (diagnose_mismatched_attributes): Remove unnecessary
5966         noinline variable to workaround broken kernel headers.
5968 2018-05-18  Jason Merrill  <jason@redhat.com>
5970         * c.opt (Wdeprecated-copy): New flag.
5972 2018-05-17  Martin Liska  <mliska@suse.cz>
5974         * c-warn.c (overflow_warning): Do not use
5975         space in between 'G_' and '('.
5977 2018-05-09  Jason Merrill  <jason@redhat.com>
5979         * c-common.c (valid_array_size_p): Add complain parameter.
5980         * c-common.h: ...which defaults to true.
5982 2018-05-11  Jakub Jelinek  <jakub@redhat.com>
5984         PR c/85696
5985         * c-omp.c (c_omp_predetermined_sharing): Return
5986         OMP_CLAUSE_DEFAULT_SHARED for artificial vars with integral type.
5988 2018-05-11  Martin Liska  <mliska@suse.cz>
5990         PR sanitizer/85556
5991         * c-attribs.c (handle_no_sanitize_attribute): Iterate all
5992         TREE_LIST values.
5994 2018-05-10  Jakub Jelinek  <jakub@redhat.com>
5996         PR c++/85662
5997         * c-common.h (fold_offsetof_1): Removed.
5998         (fold_offsetof): Add TYPE argument defaulted to size_type_node and
5999         CTX argument defaulted to ERROR_MARK.
6000         * c-common.c (fold_offsetof_1): Renamed to ...
6001         (fold_offsetof): ... this.  Remove wrapper function.  Add TYPE
6002         argument, convert the pointer constant to TYPE and use size_binop
6003         with PLUS_EXPR instead of fold_build_pointer_plus if type is not
6004         a pointer type.  Adjust recursive calls.
6006 2018-05-10  Eric Botcazou  <ebotcazou@adacore.com>
6008         PR c++/85400
6009         * c-attribs.c (handle_visibility_attribute): Do not set no_add_attrs.
6011 2018-05-07  Nathan Sidwell  <nathan@acm.org>
6013         * c.opt (ffor-scope): Remove functionality, issue warning.
6015 2018-05-03  Nathan Sidwell  <nathan@acm.org>
6017         * c.opt (ffriend-injection): Remove functionality, issue warning.
6019 2018-05-01  David Malcolm  <dmalcolm@redhat.com>
6021         PR c/84258
6022         * c-format.c (struct format_check_results): Add field
6023         "number_non_char".
6024         (check_format_info): Initialize it, and warn if encountered.
6025         (check_format_arg): Distinguish between wide char and
6026         everything else when detecting arrays of non-char.
6028 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
6030         * c-format.c (get_corrected_substring): Update for
6031         location_get_source_line returning a char_span.  Use a char_span
6032         when handling the prefix of the correction.
6033         * c-indentation.c (get_visual_column): Update for
6034         location_get_source_line returning a char_span.
6035         (get_first_nws_vis_column): Likewise.
6037 2018-03-29  David Malcolm  <dmalcolm@redhat.com>
6039         PR c++/84269
6040         * known-headers.cc (get_stdlib_header_for_name): Add various names
6041         from <assert.h>, <string.h>, and <memory.h>; add more names from
6042         <stdio.h>.
6044 2018-03-27  Jakub Jelinek  <jakub@redhat.com>
6046         PR c++/85061
6047         * c-common.c (fold_offsetof_1) <case COMPOUND_EXPR>: Assert that
6048         get_base_address of the second operand is a VAR_P, rather than the
6049         operand itself, and use gcc_checking_assert instead of gcc_assert.
6051 2018-03-23  Marek Polacek  <polacek@redhat.com>
6053         PR c++/85045
6054         * c-pretty-print.c (c_pretty_printer::multiplicative_expression)
6055         <case RDIV_EXPR>: Tweak condition.
6057 2018-03-20  Eric Botcazou  <ebotcazou@adacore.com>
6059         * c-ada-spec.c (pp_ada_tree_identifier): Deal specifically with _Bool.
6061 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
6063         PR c/84909
6064         * c-warn.c (conversion_warning): Replace "to to" with "to" in
6065         diagnostics.
6067         PR c/84910
6068         * c-warn.c (diagnose_mismatched_attributes): Remove trailing space from
6069         diagnostics.
6071 2018-03-16  Richard Biener  <rguenther@suse.de>
6073         PR c/84873
6074         * c-gimplify.c (c_gimplify_expr): Revert previous change.  Instead
6075         unshare the possibly folded expression.
6077 2018-03-15  Richard Biener  <rguenther@suse.de>
6079         PR c/84873
6080         * c-gimplify.c (c_gimplify_expr): Do not fold expressions.
6082 2018-03-13  Martin Sebor  <msebor@redhat.com>
6084         PR tree-optimization/84725
6085         * c-attribs.c (handle_nonstring_attribute): Allow attribute nonstring
6086         with all three narrow character types, including their qualified forms.
6088 2018-03-12  Martin Sebor  <msebor@redhat.com>
6090         PR tree-optimization/83456
6091         * c-common.c (check_function_restrict): Return bool.
6092         Restore checking of bounded built-in functions.
6093         (check_function_arguments): Also return the result
6094         of warn_for_restrict.
6095         * c-common.c (check_function_restrict): Return bool.
6096         * c-warn.c (warn_for_restrict): Return bool.
6098 2018-03-02  Marek Polacek  <polacek@redhat.com>
6100         PR c++/84171
6101         * c-warn.c (warn_for_sign_compare): Bail out if any of the operands
6102         is erroneous.
6104 2018-03-02  Thomas Schwinge  <thomas@codesourcery.com>
6106         * c-attribs.c (c_common_attribute_table): Remove "cilk simd
6107         function".
6109 2018-03-01  Marek Polacek  <polacek@redhat.com>
6111         PR c++/84639
6112         * c-attribs.c (common_handle_aligned_attribute): Don't use invalid
6113         alignment in computation.
6115 2018-02-28  Eric Botcazou  <ebotcazou@adacore.com>
6117         * c-ada-spec.c (dump_ada_node) <NULLPTR_TYPE>: New case.
6118         <REAL_TYPE>: Deal specifically with _Float128/__float128.
6120 2018-02-28  Eric Botcazou  <ebotcazou@adacore.com>
6122         * c-ada-spec.c (dump_ada_double_name) <ENUMERAL_TYPE>: New case.
6123         (is_char_array): Take a type instead of a declaration.
6124         (dump_ada_array_type): Likewise.
6125         (is_simple_enum): Minor tweak.
6126         (dump_ada_enum_type): New function extracted from...
6127         (dump_ada_node) <ENUMERAL_TYPE>: ...here.  Invoke it.
6128         <INTEGER_TYPE>: Remove unreachable code.
6129         <RECORD_TYPE>: Likewise.  Minor tweaks.
6130         (dump_nested_type) <ARRAY_TYPE>: Adjust to above changes.
6131         <ENUMERAL_TYPE>: New case.
6132         <RECORD_TYPE>: Factor out common code.
6133         (dump_ada_declaration) <ARRAY_TYPE>: Adjust to above changes.
6134         Minor tweaks.  Deal with enumeral types.
6135         (dump_ada_structure): Minor tweaks.
6137 2018-02-28  Eric Botcazou  <ebotcazou@adacore.com>
6139         * c-ada-spec.c (dump_ada_node) <POINTER_TYPE>: Do not use generic
6140         address for incomplete structures.
6141         (dump_forward_type): Do not bail out for incomplete structures.
6142         (dump_ada_declaration): Do not special-case incomplete structures
6143         for subtypes.  Dump them as null records for types.
6145 2018-02-28  Eric Botcazou  <ebotcazou@adacore.com>
6147         * c-ada-spec.c (dump_ada_import): Use boolean and fix formatting.
6148         (is_char_array): Fix formatting.
6149         (dump_template_types): Likewise.
6150         (dump_generic_ada_node): Rename into...
6151         (dump_ada_node): ...this.
6152         <POINTER_TYPE>: Remove superfluous space.  Use generic address for
6153         incomplete structures and not for empty structures.  Do not use it
6154         when forward declarations are needed.
6155         (dump_forward_type): New function.
6156         (dump_nested_types): Remove FORWARD parameter.  Do not consider
6157         TREE_VISITED and do not generate a forward declaration.  Only dump
6158         original nested types for nested declaration.
6159         (dump_nested_type) <POINTER_TYPE>: Call dump_forward_type.
6160         <ARRAY_TYPE>: Likewise if the component type is an anonymous pointer.
6161         <RECORD_TYPE>: Do not consider TREE_VISITED.
6162         (dump_ada_declaration): Use booleans and fix formatting throughout.
6163         <TYPE_DECL>: Skip incomplete structures and not empty structures.
6164         Call dump_forward_type instead of dump_nested_types for a typedef.
6165         Remove superfluous check and adjust call to dump_nested_types.
6166         <POINTER_TYPE>: Call dump_forward_type and fall through.
6167         (dump_ada_struct_decl): Rename into...
6168         (dump_ada_structure): ...this.  Do not special-case empty structures.
6170 2018-02-27  Martin Sebor  <msebor@redhat.com>
6172         PR c++/83871
6173         * c.opt (-Wmissing-attributes): New option.
6175 2018-02-21  Martin Liska  <mliska@suse.cz>
6177         * c.opt (Wcatch-value=): Add IntegerRange.
6179 2018-02-15  Jason Merrill  <jason@redhat.com>
6181         * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_deduction_guides.
6183 2018-02-09  Nathan Sidwell  <nathan@acm.org>
6185         PR c/84293
6186         * c-common.h (strict_aliasing_warning): Drop OTYPE arg, insert LOC
6187         arg.
6188         * c-warn.c (strict_aliasing_warning): Drop OTYPE arg, require LOC
6189         arg.  Adjust.
6191 2018-02-09  Martin Sebor  <msebor@redhat.com>
6193         PR lto/84212
6194         * c.opt (-Wstringop-overflow, -Warray-bounds): Add LTO.
6195         (-Walloc-size-larger-than, -Wformat-truncation=): Same.
6196         (-Wmaybe-uninitialized, -Wnonnull, -Wrestrict): Same.
6197         (-Wstrict-overflow, -Wsuggest-attribute): Same.
6198         (-Wuninitialized): Same.
6200 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
6202         * c-ada-spec.c (dump_ada_declaration): Do not generate the 'constant'
6203         keyword for components.
6205 2018-02-02  Paolo Carlini  <paolo.carlini@oracle.com>
6207         * c-common.h (DECL_UNNAMED_BIT_FIELD): New.
6209 2018-02-02  Julia Koval  <julia.koval@intel.com>
6211         * c-common.h (omp_clause_mask): Move to wide_int_bitmask.h.
6213 2018-01-29  Marek Polacek  <polacek@redhat.com>
6215         PR c/83966
6216         * c-format.c (check_function_format): Check current_function_decl.
6218 2018-01-27  Jakub Jelinek  <jakub@redhat.com>
6220         * c-cppbuiltin.c (c_cpp_builtins): Use ggc_strdup for the fp_suffix
6221         argument.
6222         (LAZY_HEX_FP_VALUES_CNT): Define.
6223         (lazy_hex_fp_values): Allow up to LAZY_HEX_FP_VALUES_CNT lazy hex fp
6224         values rather than just 12.
6225         (builtin_define_with_hex_fp_value): Likewise.
6227 2018-01-18  Boris Kolpackov  <boris@codesynthesis.com>
6229         PR other/70268
6230         * c.opt (-fmacro-prefix-map): New option.
6231         * c-opts.c (c_common_handle_option): Handle it.
6232         * c-lex.c (init_c_lex): Set remap_filename cpp callback.
6233         * c-ppoutput.c (init_pp_output): Likewise.
6235 2018-01-17  David Malcolm  <dmalcolm@redhat.com>
6237         PR c++/83814
6238         * c-common.c (fold_for_warn): Move to c/c-fold.c and cp/expr.c.
6240 2018-01-10  Eric Botcazou  <ebotcazou@adacore.com>
6242         * c-ada-spec.c (dump_number): Add FLOAT_P parameter.
6243         Skip 'f' and 'F' characters if it is true.
6244         (store_ada_macro): Minor tweak.
6245         (dump_ada_macros) <CPP_COMMENT>: Likewise.
6246         <CPP_WSTRING>: Likewise.
6247         <CPP_STRING>: Output '&' in the buffer if not the first string.
6248         <CPP_NUMBER>: Adjust calls to dump_number.
6250 2018-01-10  David Malcolm  <dmalcolm@redhat.com>
6252         PR c++/43486
6253         * c-common.c: Include "selftest.h".
6254         (get_atomic_generic_size): Perform the test for integral type
6255         before the range test for any integer constant, fixing indentation
6256         of braces.  Call fold_for_warn before testing for an INTEGER_CST.
6257         (reject_gcc_builtin): Strip any location wrapper from EXPR.
6258         (selftest::test_fold_for_warn): New function.
6259         (selftest::c_common_c_tests): New function.
6260         (selftest::c_family_tests): Call it, and
6261         selftest::c_pretty_print_c_tests.
6262         * c-common.h (selftest::c_pretty_print_c_tests): New decl.
6263         * c-format.c (check_format_arg): Convert VAR_P check to a
6264         fold_for_warn.
6265         * c-pretty-print.c: Include "selftest.h".
6266         (pp_c_cast_expression): Don't print casts for location wrappers.
6267         (selftest::assert_c_pretty_printer_output): New function.
6268         (ASSERT_C_PRETTY_PRINTER_OUTPUT): New macro.
6269         (selftest::test_location_wrappers): New function.
6270         (selftest::c_pretty_print_c_tests): New function.
6271         * c-warn.c (warn_for_memset): Call fold_for_warn on the arguments.
6273 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
6274             Alan Hayward  <alan.hayward@arm.com>
6275             David Sherwood  <david.sherwood@arm.com>
6277         * c-common.c (c_common_type_for_mode): Handle MODE_VECTOR_BOOL.
6279 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
6280             Alan Hayward  <alan.hayward@arm.com>
6281             David Sherwood  <david.sherwood@arm.com>
6283         * c-ubsan.c (ubsan_instrument_shift): Treat GET_MODE_BITSIZE
6284         as polynomial.
6286 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
6287             Alan Hayward  <alan.hayward@arm.com>
6288             David Sherwood  <david.sherwood@arm.com>
6290         * c-common.c (vector_types_convertible_p, c_build_vec_perm_expr)
6291         (convert_vector_to_array_for_subscript): Handle polynomial
6292         TYPE_VECTOR_SUBPARTS.
6293         (c_common_type_for_mode): Check valid_vector_subparts_p.
6294         * c-pretty-print.c (pp_c_initializer_list): Handle polynomial
6295         VECTOR_CST_NELTS.
6297 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
6299         Update copyright years.
6301 2017-12-22  Mike Stump  <mikestump@comcast.net>
6302             Eric Botcazou  <ebotcazou@adacore.com>
6304         * c-pragma.c (init_pragma): Register pragma GCC unroll.
6305         * c-pragma.h (enum pragma_kind): Add PRAGMA_UNROLL.
6307 2017-12-22  Alexandre Oliva  <aoliva@redhat.com>
6309         PR debug/83527
6310         PR debug/83419
6311         * c-semantics.c (only_debug_stmts_after_p): New.
6312         (pop_stmt_list): Clear side effects in debug-only stmt list.
6313         Check for single nondebug stmt followed by debug stmts only.
6315 2017-12-21  Alexandre Oliva  <aoliva@redhat.com>
6317         PR debug/83419
6318         * c-semantics.c (pop_stmt_list): Propagate side effects from
6319         single nondebug stmt to container list.
6321 2017-12-19  Jakub Jelinek  <jakub@redhat.com>
6323         * known-headers.cc (get_stdlib_header_for_name): Replace Yoda
6324         conditions with typical order conditions.
6326 2017-12-18  Marek Polacek  <polacek@redhat.com>
6328         * c-warn.c (warn_logical_operator): Return early if -Wlogical-op is
6329         not in effect.
6331 2017-12-17  Martin Sebor  <msebor@redhat.com>
6333         * c-attribs.c (common_handle_aligned_attribute): Avoid issuing
6334         an error for attribute warn_if_not_aligned.
6336 2017-12-16  Martin Sebor  <msebor@redhat.com>
6338         PR tree-optimization/78918
6339         * c-common.c (check_function_restrict): Avoid checking built-ins.
6340         * c.opt (-Wrestrict): Include in -Wall.
6342 2017-12-15  Jakub Jelinek  <jakub@redhat.com>
6344         * c-attribs.c (c_common_attribute_table,
6345         c_common_format_attribute_table): Swap affects_type_identity
6346         and handler fields, adjust comments.
6348 2017-12-14  Bernd Edlinger  <bernd.edlinger@hotmail.de>
6350         * c.opt (Wcast-function-type): New warning option.
6351         * c-lex.c (get_fileinfo): Avoid warning.
6352         * c-ppoutput.c (scan_translation_unit_directives_only): Remove cast.
6354 2017-12-14  Qing Zhao  <qing.zhao@oracle.com>
6356         PR middle_end/79538
6357         * c-cppbuiltin.c (builtin_define_with_hex_fp_value):
6358         Adjust the size of buf1 and buf2, add a new buf to avoid
6359         format-overflow warning.
6361 2017-12-12  Alexandre Oliva  <aoliva@redhat.com>
6363         * c-semantics.c (pop_stmt_list): Move begin stmt marker into
6364         subsequent statement list.
6366 2017-12-07  Martin Sebor  <msebor@redhat.com>
6368         PR c/81544
6369         PR c/81566
6370         * c-attribs.c (attr_aligned_exclusions): New array.
6371         (attr_alloc_exclusions, attr_cold_hot_exclusions): Same.
6372         (attr_common_exclusions, attr_const_pure_exclusions): Same.
6373         (attr_gnu_inline_exclusions, attr_inline_exclusions): Same.
6374         (attr_noreturn_exclusions, attr_returns_twice_exclusions): Same.
6375         (attr_warn_unused_result_exclusions): Same.
6376         (handle_hot_attribute, handle_cold_attribute): Simplify.
6377         (handle_const_attribute): Warn on function returning void.
6378         (handle_pure_attribute): Same.
6379         (handle_aligned_attribute): Diagnose conflicting attribute
6380         specifications.
6381         * c-warn.c (diagnose_mismatched_attributes): Simplify.
6383 2017-12-06  David Malcolm  <dmalcolm@redhat.com>
6385         PR c/83236
6386         * c-common.c (selftest::c_family_tests): Call
6387         selftest::c_spellcheck_cc_tests.
6388         * c-common.h (selftest::c_spellcheck_cc_tests): New decl.
6389         * c-spellcheck.cc: Include "selftest.h".
6390         (name_reserved_for_implementation_p): New function.
6391         (should_suggest_as_macro_p): New function.
6392         (find_closest_macro_cpp_cb): Move the check for NT_MACRO to
6393         should_suggest_as_macro_p and call it.
6394         (selftest::test_name_reserved_for_implementation_p): New function.
6395         (selftest::c_spellcheck_cc_tests): New function.
6396         * c-spellcheck.h (name_reserved_for_implementation_p): New decl.
6398 2017-12-06  David Malcolm  <dmalcolm@redhat.com>
6400         * c-spellcheck.cc: New file, taken from macro-handling code in
6401         spellcheck-tree.c.
6402         * c-spellcheck.h: New file, taken from macro-handling code in
6403         spellcheck-tree.h.
6405 2017-12-01  Jakub Jelinek  <jakub@redhat.com>
6407         * c-attribs.c (c_common_attribute_table): Remove "cilk simd function"
6408         attribute.
6409         (handle_simd_attribute): Don't check for "cilk simd function"
6410         attribute.  Reindent, formatting changes.
6412 2017-11-30  Julia Koval  <julia.koval@intel.com>
6414         * c-common.h (inv_list): Remove.
6416 2017-11-28  Jakub Jelinek  <jakub@redhat.com>
6418         PR sanitizer/81275
6419         * c-common.c (c_switch_covers_all_cases_p_1,
6420         c_switch_covers_all_cases_p): New functions.
6421         * c-common.h (c_switch_covers_all_cases_p): Declare.
6423 2017-11-28  Julia Koval  <julia.koval@intel.com>
6424             Sebastian Peryt  <sebastian.peryt@intel.com>
6426         * array-notation-common.c: Delete.
6427         * c-cilkplus.c: Ditto.
6428         * c-common.c (_Cilk_spawn, _Cilk_sync, _Cilk_for): Remove.
6429         * c-common.def (ARRAY_NOTATION_REF): Remove.
6430         * c-common.h (RID_CILK_SPAWN, build_array_notation_expr,
6431         build_array_notation_ref, C_ORT_CILK, c_check_cilk_loop,
6432         c_validate_cilk_plus_loop, cilkplus_an_parts,
6433         cilk_ignorable_spawn_rhs_op,
6434         cilk_recognize_spawn): Remove.
6435         * c-gimplify.c (CILK_SPAWN_STMT): Remove.
6436         * c-omp.c: Remove CILK_SIMD check.
6437         * c-pragma.c: Ditto.
6438         * c-pragma.h: Remove CILK related pragmas.
6439         * c-pretty-print.c (c_pretty_printer::postfix_expression): Remove
6440         ARRAY_NOTATION_REF condition.
6441         (c_pretty_printer::expression): Ditto.
6442         * c.opt (fcilkplus): Remove.
6443         * cilk.c: Delete.
6445 2017-11-21  Marc Glisse  <marc.glisse@inria.fr>
6447         * c-pretty-print.c (pp_c_additive_expression,
6448         c_pretty_printer::expression): Handle POINTER_DIFF_EXPR.
6450 2017-11-21  Jakub Jelinek  <jakub@redhat.com>
6452         * c-common.c (get_nonnull_operand): Use tree_to_uhwi.
6454         PR c++/83059
6455         * c-common.c (get_atomic_generic_size): Use TREE_INT_CST_LOW
6456         instead of tree_to_uhwi, formatting fix.
6458 2017-11-20  David Malcolm  <dmalcolm@redhat.com>
6460         PR c/81404
6461         * known-headers.cc: New file, based on material from c/c-decl.c.
6462         (suggest_missing_header): Copied as-is.
6463         (get_stdlib_header_for_name): New, based on get_c_name_hint but
6464         heavily edited to add C++ support.  Add some knowledge about
6465         <limits.h>, <stdint.h>, and <wchar.h>.
6466         * known-headers.h: Likewise.
6468 2017-11-20  David Malcolm  <dmalcolm@redhat.com>
6470         * c-common.h (enum lookup_name_fuzzy_kind): Move to name-hint.h.
6471         (lookup_name_fuzzy): Likewise.  Convert return type from
6472         const char * to name_hint.  Add location_t param.
6473         * name-hint.h: New header.
6475 2017-11-19  Jakub Jelinek  <jakub@redhat.com>
6477         PR c/66618
6478         PR c/69960
6479         * c-common.h (c_fully_fold): Add LVAL argument defaulted to false.
6481 2017-11-16  Joseph Myers  <joseph@codesourcery.com>
6483         * c.opt (-std=c17, std=gnu17, -std=iso9899:2017): Refer to 2018
6484         expected publication date of C17.
6485         (-std=c18, -std=gnu18, -std=iso9899:2018): New option aliases.
6487 2017-11-15  Joseph Myers  <joseph@codesourcery.com>
6489         PR c/81156
6490         * c-common.c (c_common_reswords): Add __builtin_tgmath.
6491         * c-common.h (enum rid): Add RID_BUILTIN_TGMATH.
6493 2017-11-10  Martin Sebor  <msebor@redhat.com>
6495         PR c/81117
6496         * c-common.c (catenate_strings): Use memcpy instead of strncpy.
6497         * c-warn.c (sizeof_pointer_memaccess_warning): Handle arrays.
6498         * c.opt (-Wstringop-truncation): New option.
6500 2017-11-06  Martin Liska  <mliska@suse.cz>
6502         PR middle-end/82404
6503         * c-opts.c (c_common_post_options): Set -Wreturn-type for C++
6504         FE.
6505         * c.opt: Set default value of warn_return_type.
6507 2017-10-31  David Malcolm  <dmalcolm@redhat.com>
6509         * c-common.c (binary_op_error): Update for renaming of
6510         error_at_rich_loc.
6511         (c_parse_error): Likewise.
6512         * c-warn.c (warn_logical_not_parentheses): Likewise for
6513         renaming of inform_at_rich_loc.
6514         (warn_for_restrict): Likewise for renaming of
6515         warning_at_rich_loc_n.
6517 2017-10-30  Joseph Myers  <joseph@codesourcery.com>
6519         * c.opt (std=c17, std=gnu17, std=iso9899:2017): New options.
6520         * c-opts.c (set_std_c17): New function.
6521         (c_common_init_options): Use gnu17 as default C version.
6522         (c_common_handle_option): Handle -std=c17 and -std=gnu17.
6524 2017-10-27  Michael Meissner  <meissner@linux.vnet.ibm.com>
6526         * c-cppbuiltin.c (mode_has_fma): Add support for PowerPC KFmode.
6527         (c_cpp_builtins): If a machine has a fast fma _Float<N> and
6528         _Float<N>X variant, define __FP_FAST_FMA<N> and/or
6529         __FP_FAST_FMA<N>X.
6531 2017-10-23  Marek Polacek  <polacek@redhat.com>
6533         PR c/82681
6534         * c-warn.c (warnings_for_convert_and_check): Fix typos.
6536 2017-10-19  Eric Botcazou  <ebotcazou@adacore.com>
6538         * c-common.c (check_builtin_function_arguments): Also check arguments
6539         of __builtin_alloca_with_align_and_max.
6541 2017-10-17  David Malcolm  <dmalcolm@redhat.com>
6543         * c-format.c (format_warning_at_char): Pass UNKNOWN_LOCATION
6544         rather than NULL to format_warning_va.
6545         (check_format_types): Likewise when calling format_type_warning.
6546         Remove code to extract source_ranges and source_range * in favor
6547         of just a location_t.
6548         (format_type_warning): Convert source_range * param to a
6549         location_t.
6551 2017-10-13  Jakub Jelinek  <jakub@redhat.com>
6553         * c-gimplify.c (c_gimplify_expr): Handle [LR]ROTATE_EXPR like
6554         [LR]SHIFT_EXPR.
6556 2017-10-12  David Malcolm  <dmalcolm@redhat.com>
6558         * c-common.c (enum missing_token_insertion_kind): New enum.
6559         (get_missing_token_insertion_kind): New function.
6560         (maybe_suggest_missing_token_insertion): New function.
6561         * c-common.h (maybe_suggest_missing_token_insertion): New decl.
6563 2017-10-11  Nathan Sidwell  <nathan@acm.org>
6565         * c-opts.c (add_prefixed_path): Change chain to incpath_kind.
6566         (c_common_handle_option): Update incpath_kind names.
6568 2017-10-11  Martin Liska  <mliska@suse.cz>
6570         PR sanitizer/82490
6571         * c-attribs.c (handle_no_sanitize_attribute): Report directly
6572         Wattributes warning.
6574 2017-10-10  Richard Sandiford  <richard.sandiford@linaro.org>
6576         * c-ada-spec.c (dump_generic_ada_node): Use wi::to_wide when
6577         operating on trees as wide_ints.
6578         * c-common.c (pointer_int_sum): Likewise.
6579         * c-pretty-print.c (pp_c_integer_constant): Likewise.
6580         * c-warn.c (match_case_to_enum_1): Likewise.
6581         (c_do_switch_warnings): Likewise.
6582         (maybe_warn_shift_overflow): Likewise.
6584 2017-10-10  Jakub Jelinek  <jakub@redhat.com>
6586         PR c/82437
6587         * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_wide
6588         instead of wide_int::from.
6590 2017-10-06  Jakub Jelinek  <jakub@redhat.com>
6592         PR c/82437
6593         * c-warn.c (warn_tautological_bitwise_comparison): Instead of
6594         using to_widest use wide_int with the larger of the two precisions.
6596 2017-10-05  Bernd Edlinger  <bernd.edlinger@hotmail.de>
6598         * c-pretty-print.c (pp_c_parameter_type_list): Print ... for variadic
6599         functions.
6601 2017-10-02  Richard Sandiford  <richard.sandiford@linaro.org>
6603         * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_widest
6604         when combining the original unconverted comparison operands.
6606 2017-09-29  Jakub Jelinek  <jakub@redhat.com>
6608         * c-attribs.c (handle_noipa_attribute): Don't add "stack_protect"
6609         attribute.
6611 2017-09-29  Eric Botcazou  <ebotcazou@adacore.com>
6613         * c-ada-spec.c (to_ada_name): Add index parameter.
6614         (pp_ada_tree_identifier): Likewise.
6615         (dump_ada_macros): Adjust call to to_ada_name.
6616         (struct overloaded_name_hash): New type.
6617         (struct overloaded_name_hasher): Likewise.
6618         (overloaded_names): New hash table.
6619         (compute_overloading_index): New function.
6620         (dump_ada_decl_name): Call it and pass the result to
6621         pp_ada_tree_identifier.
6622         (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
6623         (dump_ada_function_declaration): Likewise.
6624         (dump_generic_ada_node): Likewise.
6625         (print_constructor): Likewise.
6626         (print_destructor): Likewise.
6627         (dump_ada_specs): Delete overloaded_names table.
6629 2017-09-29  Eric Botcazou  <ebotcazou@adacore.com>
6631         * c-ada-spec.c (max_ada_macros): Move around.
6632         (store_ada_macro_index): Likewise.
6633         (source_file): Rename into...
6634         (macro_source_file): ...this.
6635         (count_ada_macro): Move around.
6636         (store_ada_macro): Likewise.
6637         (compare_macro): Likewise.
6638         (print_ada_macros): Merge in...
6639         (dump_ada_macros): ...this.
6640         (source_file_base): Rename into...
6641         (current_source_file): ...this.
6642         (print_comment): Move around.
6643         (dump_ada_nodes): Call dump_ada_declaration directly.
6644         (struct with): Change type of limited field to bool.
6645         (append_withs): Change type of limited_access parameter to bool.
6646         (pp_ada_tree_identifie): Likewise.
6647         (dump_ada_decl_nam): Likewise.
6648         (dump_generic_ada_node): Likewise.  Do not print the return type.
6649         (to_ada_name): Change type of space_found parameter to bool.
6650         (dump_ada_function_declaration): Return void and change type of
6651         parameters to bool.  Also print the return type for a function.
6652         (print_ada_methods): Rename into...
6653         (dump_ada_methods): ...this.
6654         (print_ada_declaration): Rename into ...
6655         (dump_ada_declaration): ...this.  Do not print the return type.
6656         (print_ada_struct_decl): Rename into...
6657         (dump_ada_struct_decl): ...this.
6659 2017-09-29  Jakub Jelinek  <jakub@redhat.com>
6661         * c-attribs.c (handle_packed_attribute): Test DECL_C_BIT_FIELD
6662         rather than DECL_INITIAL.
6663         (common_handle_aligned_attribute): Likewise.
6665 2017-09-20  Alexandre Oliva  <aoliva@redhat.com>
6667         * c.opt (gen-decls): Add RejectNegative.
6669 2017-09-15  Andrew Sutton  <andrew.n.sutton@gmail.com>
6670             Jakub Jelinek  <jakub@redhat.com>
6672         Add support for -std=c++2a.
6673         * c-common.h (cxx_dialect): Add cxx2a as a dialect.
6674         * opt.c: Add options for -std=c++2a and -std=gnu++2a.
6675         * c-opts.c (set_std_cxx2a): New.
6676         (c_common_handle_option): Set options when -std=c++2a is enabled.
6677         (c_common_post_options): Adjust comments.
6678         (set_std_cxx14, set_std_cxx17): Likewise.
6680 2017-09-15  Eric Botcazou  <ebotcazou@adacore.com>
6682         * c-pragma.c (handle_pragma_scalar_storage_order): Expand on error
6683         message for non-uniform endianness and issue a warning in C++.
6685 2017-09-15  Jakub Jelinek  <jakub@redhat.com>
6687         * c.opt (Wc++1z-compat): Change from option to undocumented alias.
6688         (Wc++17-compat): Change from undocumented alias to option.
6689         (Wnoexcept-type): Enable by Wc++17-compat instead of Wc++1z-compat,
6690         change C++1z to C++17 in description.
6691         (std=c++1z, std=gnu++1z): Change from option to undocumented
6692         deprecated alias.
6693         (std=c++17, std=gnu++17): Change from undocumented alias to option.
6694         Adjust description.
6695         * c-common.h (enum cxx_dialect): Rename cxx1z to cxx17.
6696         * c-opts.c (set_std_cxx1z): Rename to ...
6697         (set_std_cxx17): ... this.
6698         (c_common_handle_option): Rename OPT_std_c__1z to OPT_std_c__17
6699         and OPT_std_gnu__1z to OPT_std_gnu__17.  Adjust set_std_cxx1z
6700         caller.
6701         (c_common_post_options): Use cxx17 instead of cxx1z.  Adjust
6702         comments.
6704 2017-09-12  H.J. Lu  <hongjiu.lu@intel.com>
6706         * c-attribs.c (common_handle_aligned_attribute): Don't warn
6707         function alignment if warn_if_not_aligned_p is true.
6709 2017-09-12  Nathan Sidwell  <nathan@acm.org>
6711         * c-common.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
6712         resort_sorted_fields): Move to c/c-decl.c.
6713         * c-common.h (field_decl_cmp, resort_sorted_fields): Delete.
6714         (struct sorted_fields_type): Move to c/c-lang.h.
6716 2017-09-09  Jonathan Wakely  <jwakely@redhat.com>
6718         PR c++/81852
6719         * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_threadsafe_static_init.
6721 2017-09-04  Marek Polacek  <polacek@redhat.com>
6723         PR c/81783
6724         * c-warn.c (warn_tautological_bitwise_comparison): New function.
6725         (warn_tautological_cmp): Call it.
6727 2017-09-01  Boris Kolpackov  <boris@codesynthesis.com>
6729         * c-opts.c (c_common_finish): Write dependency information even if
6730         there are errors.
6732 2017-09-01  Jakub Jelinek  <jakub@redhat.com>
6734         PR c/81887
6735         * c-pragma.c (omp_pragmas): Move "ordered" entry from here to ...
6736         (omp_pragmas_simd): ... here.
6737         * c-omp.c (c_finish_omp_ordered): If clauses isn't simd clause alone,
6738         create new clauses list containing just simd clause.
6740 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
6741             Alan Hayward  <alan.hayward@arm.com>
6742             David Sherwood  <david.sherwood@arm.com>
6744         * c-attribs.c (vector_mode_valid_p) Fold GET_MODE_INNER call
6745         into scalar_mode_supported_p call.
6746         (handle_mode_attribute): Update call to scalar_mode_supported_p.
6748 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
6749             Alan Hayward  <alan.hayward@arm.com>
6750             David Sherwood  <david.sherwood@arm.com>
6752         * c-common.c (c_common_fixed_point_type_for_size): Use opt_scalar_mode
6753         for the mode iterator.
6755 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
6756             Alan Hayward  <alan.hayward@arm.com>
6757             David Sherwood  <david.sherwood@arm.com>
6759         * c-lex.c (interpret_fixed): Use SCALAR_TYPE_MODE.
6760         * c-common.c (c_build_vec_perm_expr): Likewise.
6762 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
6763             Alan Hayward  <alan.hayward@arm.com>
6764             David Sherwood  <david.sherwood@arm.com>
6766         * c-common.c (c_common_type_for_mode): Use as_a <scalar_int_mode>.
6768 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
6769             Alan Hayward  <alan.hayward@arm.com>
6770             David Sherwood  <david.sherwood@arm.com>
6772         * c-attribs.c (handle_mode_attribute): Check for a scalar_int_mode
6773         before calling targetm.addr_space.valid_pointer_mode.
6775 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
6776             Alan Hayward  <alan.hayward@arm.com>
6777             David Sherwood  <david.sherwood@arm.com>
6779         * c-cppbuiltin.c (c_cpp_builtins): Use opt_scalar_float_mode.
6781 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
6782             Alan Hayward  <alan.hayward@arm.com>
6783             David Sherwood  <david.sherwood@arm.com>
6785         * c-common.c (c_common_fixed_point_type_for_size): Use new mode
6786         iterators.
6787         * c-cppbuiltin.c (c_cpp_builtins): Likewise.
6789 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
6790             Alan Hayward  <alan.hayward@arm.com>
6791             David Sherwood  <david.sherwood@arm.com>
6793         * c-cppbuiltin.c (mode_has_fma): Prefix mode names with E_ in
6794         case statements.
6796 2017-08-29  Martin Liska  <mliska@suse.cz>
6798         PR other/39851
6799         * c-common.c (parse_optimize_options): Add argument to function
6800         call.
6801         * c-pragma.c (handle_pragma_diagnostic): Likewise.
6803 2017-08-24  David Malcolm  <dmalcolm@redhat.com>
6805         * c-lex.c (interpret_float): Use token location
6806         when building an EXCESS_PRECISION_EXPR.
6808 2017-08-21  David Malcolm  <dmalcolm@redhat.com>
6810         * c-common.c (check_function_arguments): Add "arglogs" param; pass
6811         it to check_function_format.
6812         * c-common.h (check_function_arguments): Add vec<location_t> *
6813         param.
6814         (check_function_format): Likewise.
6815         * c-format.c (struct format_check_context): Add field "arglocs".
6816         (check_function_format): Add param "arglocs"; pass it to
6817         check_format_info.
6818         (check_format_info): Add param "arglocs"; use it to initialize
6819         new field of format_ctx.
6820         (check_format_arg): Pass format_ctx->arglocs to new param of
6821         check_format_info_main.
6822         (class argument_parser): New field "arglocs".
6823         (argument_parser::argument_parser): Add "arglocs_" param and use
6824         it to initialize new field.
6825         (argument_parser::check_argument_type): Pass new arglocs field to
6826         check_format_types.
6827         (check_format_info_main): Add param "arglocs", and use it when
6828         constructing arg_parser.
6829         (check_format_types): Add param "arglocs"; use it if non-NULL when
6830         !EXPR_HAS_LOCATION (cur_param) to get at location information.
6832 2017-08-18  H.J. Lu  <hongjiu.lu@intel.com>
6834         PR c/53037
6835         * c-attribs.c (handle_warn_if_not_aligned_attribute): New.
6836         (c_common_attribute_table): Add warn_if_not_aligned.
6837         (handle_aligned_attribute): Renamed to ...
6838         (common_handle_aligned_attribute): Remove argument, name, and add
6839         argument, warn_if_not_aligned.  Handle warn_if_not_aligned.
6840         (handle_aligned_attribute): New.
6841         * c.opt: Add -Wif-not-aligned and -Wpacked-not-aligned.
6843 2017-08-14  Martin Sebor  <msebor@redhat.com>
6845         PR c/81117
6846         * c-attribs.c (c_common_attribute_table): Add nonstring entry.
6847         (handle_nonstring_attribute): New function.
6849 2017-08-14  Martin Sebor  <msebor@redhat.com>
6851         PR c/81117
6852         * c-format.h (T89_G): New macro.
6853         * c-format.c (local_gcall_ptr_node): New variable.
6854         (init_dynamic_diag_info): Initialize it.
6856 2017-08-11  Martin Liska  <mliska@suse.cz>
6858         * c-opts.c (c_common_post_options): Replace ASM_OUTPUT_DEF with
6859         TARGET_SUPPORTS_ALIASES.
6861 2017-08-10  David Malcolm  <dmalcolm@redhat.com>
6863         * c-common.c (c_parse_error): Add rich_location * param, using it
6864         rather implicitly using input_location.
6865         * c-common.h (c_parse_error): Add rich_location * param.
6867 2017-08-09  Marek Polacek  <polacek@redhat.com>
6869         * c-common.c (pointer_int_sum): Use true/false instead of 1/0.
6870         (c_common_truthvalue_conversion): Likewise.
6871         * c-omp.c (c_finish_omp_atomic): Likewise.
6872         * c-common.h (build_binary_op): Update declaration.
6874 2017-08-08  Martin Liska  <mliska@suse.cz>
6876         * c-ada-spec.c: Include header files.
6877         * c-ubsan.c: Likewise.
6878         * c-warn.c: Likewise.
6880 2017-08-07  Jakub Jelinek  <jakub@redhat.com>
6882         PR c/69389
6883         * c-omp.c (c_finish_omp_atomic): Handle atomics on bitfields.
6885 2017-08-07  Eric Botcazou  <ebotcazou@adacore.com>
6887         * c-ada-spec.c (has_nontrivial_methods): Test for FUNCTION_DECL.
6888         (print_ada_methods): Likewise.
6889         (print_ada_declaration): Likewise.
6891 2017-08-07  Martin Liska  <mliska@suse.cz>
6893         * array-notation-common.c: Add new includes.
6894         * c-format.c( handle_format_attribute): Canonicalize a format
6895         function name.
6896         * c-lex.c (c_common_has_attribute): Canonicalize name of an
6897         attribute.
6898         * c-pretty-print.c: Add new include.
6900 2017-08-05  Eric Botcazou  <ebotcazou@adacore.com>
6902         * c-ada-spec.c (has_static_fields): Look only into variables.
6903         (print_constructor): Add TYPE parameter and use it for the name.
6904         (print_destructor): Likewise.
6905         (print_ada_declaration): Adjust to new constructor/destructor names.
6906         Adjust calls to print_constructor and print_destructor.
6907         (print_ada_struct_decl): Do not test TREE_STATIC on FIELD_DECL.
6908         Look only into variables in the final loop.
6910 2017-08-01  Eric Botcazou  <ebotcazou@adacore.com>
6912         * c-ada-spec.c (has_static_fields): Look only into fields.
6913         (dump_generic_ada_node): Small tweak.
6914         (dump_nested_types): Look only into fields.
6915         (print_ada_declaration): Look only into methods.  Small tweak.
6916         (print_ada_struct_decl): Look only into fields.  Use DECL_VIRTUAL_P.
6918 2017-08-01  Eric Botcazou  <ebotcazou@adacore.com>
6920         * c-ada-spec.c (print_generic_ada_decl): Pass correctly-typed constant.
6921         (dump_ada_function_declaration): Likewise.
6922         (dump_generic_ada_node): Likewise.
6923         (print_ada_declaration): Add support for const-qualified variables.
6925 2017-07-31  Martin Liska  <mliska@suse.cz>
6927         PR sanitize/81530
6928         * c-ubsan.c (ubsan_maybe_instrument_array_ref):
6929         Guard condition with flag_sanitize_p also with current_function_decl
6930         non-null equality.
6931         (ubsan_maybe_instrument_reference_or_call): Likewise.
6933 2017-07-30  Uros Bizjak  <ubizjak@gmail.com>
6935         * c-format.c (asm_fprintf_char_table): Add 'z' to format_chars.
6937 2017-07-29  Eric Botcazou  <ebotcazou@adacore.com>
6939         * c-ada-spec.c (dump_generic_ada_node): Take into account signedness
6940         for enumeral types.
6941         (print_ada_declaration): Add missing guard for record types.
6943 2017-07-27  Jakub Jelinek  <jakub@redhat.com>
6945         PR c/45784
6946         * c-omp.c (c_finish_omp_for): If the condition is wrapped in
6947         rhs of COMPOUND_EXPR(s), skip them and readd their lhs into
6948         new COMPOUND_EXPRs around the rhs of the comparison.
6950 2017-07-27  Marek Polacek  <polacek@redhat.com>
6952         PR c/81417
6953         * c-warn.c (warn_for_sign_compare): Tweak the warning message.  Print
6954         the types.
6956 2017-07-27  Jakub Jelinek  <jakub@redhat.com>
6958         * c-attribs.c (c_common_attribute_table): Add noipa attribute.
6959         (handle_noipa_attribute): New function.
6961 2017-07-07  Torsten Duwe  <duwe@suse.de>
6963         * c-attribs.c (c_common_attribute_table): Add entry for
6964         "patchable_function_entry".
6966 2017-07-20  Nathan Sidwell  <nathan@acm.org>
6968         Remove TYPE_METHODS.
6969         * c-ada-spec.c (is_tagged_type, has_nontrivial_methods,
6970         dump_ada_template, print_ada_methods,
6971         print_ada_declaration): Member fns are on TYPE_FIELDS.
6973 2017-07-18  Nathan Sidwell  <nathan@acm.org>
6975         * c-warn.c (warn_for_memset): Use TYPE_{MIN,MAX}_VALUE.
6977 2017-07-14  David Malcolm  <dmalcolm@redhat.com>
6979         * c-common.c (try_to_locate_new_include_insertion_point): New
6980         function.
6981         (per_file_includes_t): New typedef.
6982         (added_includes_t): New typedef.
6983         (added_includes): New variable.
6984         (maybe_add_include_fixit): New function.
6985         * c-common.h (maybe_add_include_fixit): New decl.
6987 2017-07-10  Martin Sebor  <msebor@redhat.com>
6989         PR other/81345
6990         * c.opt (-Wstringop-overflow): Set defaults in LangEnabledBy.
6992 2017-07-06  David Malcolm  <dmalcolm@redhat.com>
6994         * c-common.c (selftest::c_family_tests): New.
6995         * c-common.h (selftest::run_c_tests): Move decl to c/c-lang.h.
6996         (selftest::c_family_tests): New decl.
6998 2017-07-04  Marek Polacek  <polacek@redhat.com>
7000         PR c/81231
7001         * c-common.c (sync_resolve_size): Give error for pointers to incomplete
7002         types.
7004 2017-07-04  Marek Polacek  <polacek@redhat.com>
7006         * c-warn.c (warn_if_unused_value): Remove WITH_CLEANUP_EXPR handling.
7008 2017-06-28  Martin Liska  <mliska@suse.cz>
7010         PR ipa/81128
7011         * c-attribs.c (handle_alias_ifunc_attribute): Append ifunc alias
7012         to a function declaration.
7014 2017-06-28  Martin Liska  <mliska@suse.cz>
7016         PR driver/79659
7017         * c.opt: Add IntegerRange to various options.
7019 2017-06-26  Marek Polacek  <polacek@redhat.com>
7021         PR c/80116
7022         * c-common.h (warn_for_multistatement_macros): Declare.
7023         * c-warn.c: Include "c-family/c-indentation.h".
7024         (warn_for_multistatement_macros): New function.
7025         * c.opt (Wmultistatement-macros): New option.
7026         * c-indentation.c (guard_tinfo_to_string): No longer static.
7027         Change the parameter type to "enum rid".  Handle RID_SWITCH.
7028         * c-indentation.h (guard_tinfo_to_string): Declare.
7030 2017-06-23  Marc Glisse  <marc.glisse@inria.fr>
7032         * c-common.c (c_common_nodes_and_builtins): Use builtin_structptr_types.
7034 2017-06-15  Martin Sebor  <msebor@redhat.com>
7036         PR c++/80560
7037         * c.opt (-Wclass-memaccess): New option.
7039 2017-06-14  Boris Kolpackov  <boris@codesynthesis.com>
7041         * c-opts.c (c_common_finish): Handle '-' special value to -MF.
7043 2017-06-13  Marek Polacek  <polacek@redhat.com>
7045         PR objc/80949
7046         * c-warn.c (do_warn_duplicated_branches): Return if any of the
7047         branches is null.
7049 2017-06-13  Martin Liska  <mliska@suse.cz>
7051         PR sanitize/78204
7052         * c-attribs.c (add_no_sanitize_value): New function.
7053         (handle_no_sanitize_attribute): Likewise.
7054         (handle_no_sanitize_address_attribute): Use the function.
7055         (handle_no_sanitize_thread_attribute): New function.
7056         (handle_no_address_safety_analysis_attribute): Use
7057         add_no_sanitize_value.
7058         (handle_no_sanitize_undefined_attribute): Likewise.
7059         * c-common.h: Declare new functions.
7060         * c-ubsan.c (ubsan_instrument_division): Use sanitize_flags_p.
7061         (ubsan_instrument_shift): Likewise.
7062         (ubsan_instrument_bounds): Likewise.
7063         (ubsan_maybe_instrument_array_ref): Likewise.
7064         (ubsan_maybe_instrument_reference_or_call): Likewise.
7066 2017-06-11  Jason Merrill  <jason@redhat.com>
7068         * c-ada-spec.c, c-pragma.c: Use id_equal.
7070 2017-06-04  Marek Polacek  <polacek@redhat.com>
7072         PR c/80919
7073         * c-format.c (matching_type_p): Return false if any of the types
7074         requires structural equality.
7076 2017-06-02  Martin Sebor  <msebor@redhat.com>
7078         PR c/80892
7079         * c-warn.c (conversion_warning): Use -Wconversion for integer
7080         conversion and -Wfloat-conversion for floating one.
7082 2017-06-02  Bernd Edlinger  <bernd.edlinger@hotmail.de>
7084         * c.opt (Wsizeof-pointer-div): New warning option.
7086 2017-06-01  Volker Reichelt  <v.reichelt@netcologne.de>
7088         * c.opt (Wcatch-value): New shortcut for Wcatch-value=1.
7089         (Wcatch-value=1): Enable by -Wall.
7091 2017-05-30  David Malcolm  <dmalcolm@redhat.com>
7093         * c-format.c (gcc_cxxdiag_char_table): Add 'H' and 'I' to
7094         format_chars.
7095         * c.opt (fdiagnostics-show-template-tree): New option.
7096         (felide-type): New option.
7098 2017-05-25  Volker Reichelt  <v.reichelt@netcologne.de>
7100         * c.opt (Wcatch-value=): New C++ warning flag.
7102 2017-05-24  Nathan Sidwell  <nathan@acm.org>
7104         * c=common.c (field_decl_cmp, resort_field_decl_cmp): Adjust T
7105         const casts to avoid warning.
7107 2017-05-24  Martin Sebor  <msebor@redhat.com>
7109         PR c/80731
7110         * c-common.h (unsafe_conversion_p): Add a function argument.
7111         * c-common.c (unsafe_conversion_p): Same.
7112         Add type names and values to diagnostics.
7113         (scalar_to_vector): Adjust.
7114         * c-warn.c (constant_expression_error): Add a function argument.
7115         Add type names and values to diagnostics.
7116         (conversion_warning): Add a function argument.
7117         Add type names and values to diagnostics.
7118         (warnings_for_convert_and_check): Same.
7120 2017-05-19  Jason Merrill  <jason@redhat.com>
7122         * c-warn.c (match_case_to_enum_1): Don't warn about enums with no
7123         enumerators.
7125 2017-05-19  Bernd Edlinger  <bernd.edlinger@hotmail.de>
7127         * c-format.c (locus): Move out of function scope,
7128         add GTY attribute.
7130 2017-05-19  Nathan Sidwell  <nathan@acm.org>
7132         * c-opts.c (class_dump_file, class_dump_flags): Delete.
7133         (c_common_parse_file): Remove class dump handling.
7134         (get_dump_info): Likewise.
7136 2017-05-19  Richard Biener  <rguenther@suse.de>
7138         PR c++/80593
7139         * c-warn.c (strict_aliasing_warning): Do not warn for accesses
7140         to alias-set zero memory.
7142 2017-05-18  Bernd Edlinger  <bernd.edlinger@hotmail.de>
7144         * c-format.c (local_tree_type_node): Add GTY attribute.
7146 2017-05-18  Marek Polacek  <polacek@redhat.com>
7148         * c-common.c (c_common_type_for_size): Use NULL_TREE instead of 0.
7149         (c_common_fixed_point_type_for_size): Likewise.
7150         (c_common_type_for_mode): Likewise.
7151         (shorten_compare): Likewise.
7152         (c_promoting_integer_type_p): Use false/true instead of 0/1.
7153         * c-pragma.c (maybe_apply_renaming_pragma): Use NULL_TREE instead of 0.
7155 2017-05-18  Marek Polacek  <polacek@redhat.com>
7157         * c-common.c (self_promoting_args_p): Change the return type to bool.
7158         Use false/true instead of 0/1.
7159         * c-common.h (self_promoting_args_p): Update.
7161 2017-05-17  Marek Polacek  <polacek@redhat.com>
7163         * c-common.c: Use NULL_TREE instead of 0 where appropriate.
7164         * c-warn.c: Likewise.
7166 2017-05-17  Ville Voutilainen  <ville.voutilainen@gmail.com>
7168         Implement new C++ intrinsics __is_assignable and __is_constructible.
7169         * c-common.c (__is_assignable, __is_constructible): New.
7170         * c-common.h (RID_IS_ASSIGNABLE, RID_IS_CONSTRUCTIBLE): Likewise.
7172 2017-05-17  Martin Liska  <mliska@suse.cz>
7174         * c-common.h: Introduce dump_flags_t type and
7175         use it instead of int type.
7176         * c-gimplify.c (c_genericize): Likewise.
7177         * c-opts.c: Likewise.
7179 2017-05-17  Marek Polacek  <polacek@redhat.com>
7181         * c-common.c (c_save_expr): Remove.
7182         (c_common_truthvalue_conversion): Remove a call to c_save_expr.
7183         * c-common.h (c_save_expr): Remove declaration.
7185 2017-05-09  Volker Reichelt  <v.reichelt@netcologne.de>
7187         PR c/35441
7188         * c-pretty-print.c (c_pretty_printer::expression): Handle MAX_EXPR,
7189         MIN_EXPR, EXACT_DIV_EXPR, RDIV_EXPR, LROTATE_EXPR, RROTATE_EXPR.
7190         (c_pretty_printer::postfix_expression): Handle MAX_EXPR, MIN_EXPR.
7191         (c_pretty_printer::multiplicative_expression): Handle EXACT_DIV_EXPR,
7192         RDIV_EXPR.
7193         (pp_c_shift_expression): Handle LROTATE_EXPR, RROTATE_EXPR.
7195 2017-05-09  Marek Polacek  <polacek@redhat.com>
7197         PR c/80525
7198         * c-warn.c (unwrap_c_maybe_const): New.
7199         (warn_logical_operator): Call it.
7201 2017-05-09  Nathan Sidwell  <nathan@acm.org>
7203         * c-common.c (c_register_builtin_type): Use pushdecl lang_hook.
7204         * c-common.h (pushdecl_top_level, pushdecl): Don't declare here.
7206 2017-05-08  Martin Sebor  <msebor@redhat.com>
7208         PR translation/80280
7209         * c-format.h (struct format_flag_spec): Add new member.
7210         (T89_T): New macro.
7211         * c-format.c (local_tree_type_node): New global.
7212         (printf_flag_specs, asm_fprintf_flag_spec): Initialize new data.
7213         (gcc_diag_flag_specs, scanf_flag_specs, strftime_flag_specs): Ditto.
7214         (strfmon_flag_specs): Likewise.
7215         (gcc_diag_char_table, gcc_cdiag_char_table): Split up specifiers
7216         with distinct quoting properties.
7217         (gcc_tdiag_char_table, gcc_cxxdiag_char_table): Same.
7218         (flag_chars_t::validate): Add argument and handle bad quoting.
7219         (check_format_info_main): Handle quoting problems.
7220         (init_dynamic_diag_info): Simplify.
7222 2017-05-08  Jason Merrill  <jason@redhat.com>
7224         * c-opts.c (c_common_post_options): Update defaults for
7225         flag_abi_version and flag_abi_compat_version.
7227 2017-05-05  David Malcolm  <dmalcolm@redhat.com>
7229         * c-common.c (c_cpp_error): Replace report_diagnostic
7230         with diagnostic_report_diagnostic.
7232 2017-05-04  Martin Sebor  <msebor@redhat.com>
7234         PR translation/80280
7235         * c-attribs.c (handle_alias_ifunc_attribute): Quote a %D directive.
7236         (handle_weakref_attribute): Same.
7238 2017-05-03  Nathan Sidwell  <nathan@acm.org>
7240         Canonicalize canonical type hashing
7241         * c-common.c (complete_array_type): Use type_hash_canon.
7243 2017-05-01  Xi Ruoyao  <ryxi@stu.xidian.edu.cn>
7245         PR c++/80038
7246         * c-common.h (cilk_gimplify_call_params_in_spawned_fn): Remove
7247         prototype.
7248         (cilk_install_body_pedigree_operations): Likewise.
7249         * cilk.c (cilk_set_spawn_marker): Mark functions that should be
7250         detatched.
7251         (cilk_gimplify_call_params_in_spawned_fn): Remove.
7252         (cilk_install_body_pedigree_operations): Likewise.
7253         (gimplify_cilk_spawn): Add EXPR_STMT and CLEANUP_POINT_EXPR
7254         unwrapping.
7256 2017-04-27  Jakub Jelinek  <jakub@redhat.com>
7258         PR c++/80534
7259         * c-common.c (complete_array_type): Only hash TYPE_TYPELESS_STORAGE
7260         flag on non-aggregate element types.
7262 2017-04-25  Bernd Edlinger  <bernd.edlinger@hotmail.de>
7264         * c-common.c (c_type_hasher, type_hash_table): Remove.
7265         (c_common_get_alias_set): Remove unreachable code.
7266         * c-opts.c (c_common_post_options): Make sure cc1 takes only one file.
7268 2017-04-20  Volker Reichelt  <v.reichelt@netcologne.de>
7270         * c.opt (Wextra-semi): New C++ warning flag.
7272 2017-04-20  Jakub Jelinek  <jakub@redhat.com>
7274         PR middle-end/80423
7275         * c-common.c (complete_array_type): Preserve TYPE_TYPELESS_STORAGE.
7277 2017-04-18  Jakub Jelinek  <jakub@redhat.com>
7279         PR middle-end/79788
7280         PR middle-end/80375
7281         * c-common.c (c_common_type_for_mode): Don't handle
7282         widest_*_literal_type_node here.
7283         c_common_signed_or_unsigned_type): Likewise.
7284         (c_common_nodes_and_builtins): Set widest_*_literal_type_node
7285         to *intTI_type_node or *intDI_type_node depending on whether
7286         TImode is supported by the target or not.
7288 2017-04-10  Martin Liska  <mliska@suse.cz>
7290         PR sanitizer/80350
7291         * c-ubsan.c (ubsan_instrument_shift): Evaluate RHS before
7292         doing an UBSAN check.
7294 2017-04-03  Jonathan Wakely  <jwakely@redhat.com>
7296         * c-warn.c (do_warn_double_promotion): Fix typo in comment.
7298 2017-03-31  Jakub Jelinek  <jakub@redhat.com>
7300         PR c++/79572
7301         * c-ubsan.h (ubsan_maybe_instrument_reference): Change argument to
7302         tree *.
7303         * c-ubsan.c (ubsan_maybe_instrument_reference): Likewise.  Handle
7304         not just NOP_EXPR to REFERENCE_TYPE, but also INTEGER_CST with
7305         REFERENCE_TYPE.
7307 2017-03-31  David Malcolm  <dmalcolm@redhat.com>
7309         PR documentation/78732
7310         * c.opt (Wendif-labels): Fix description to refer to
7311         #else rather than #elif.
7313 2017-03-31  Jakub Jelinek  <jakub@redhat.com>
7315         PR libstdc++/80251
7316         * c-common.h (enum rid): Add RID_IS_AGGREGATE.
7317         * c-common.c (c_common_reswords): Add __is_aggregate trait.
7319 2017-03-27  Jakub Jelinek  <jakub@redhat.com>
7321         PR middle-end/80162
7322         * c-common.c (c_common_mark_addressable_vec): Don't set
7323         TREE_ADDRESSABLE on DECL_HARD_REGISTER.
7325 2017-03-21  Martin Sebor  <msebor@redhat.com>
7327         PR c++/79548
7328         * c-common.c (set_underlying_type): Mark type used only when
7329         original del is declared unused.
7331 2017-03-10  David Malcolm  <dmalcolm@redhat.com>
7333         PR translation/79848
7334         * c-format.c (check_format_string): Simplify uses of "%<%s%>" to
7335         "%qs".
7337 2017-03-10  David Malcolm  <dmalcolm@redhat.com>
7339         PR c/79921
7340         * c-indentation.c (warn_for_misleading_indentation): Remove parens
7341         from inform's message, so that xgettext can locate it.
7343 2017-03-09  Marek Polacek  <polacek@redhat.com>
7345         PR c++/79962
7346         PR c++/79984
7347         * c-attribs.c (handle_nonnull_attribute): Save the result of default
7348         conversion to the attribute list.
7350 2017-03-09  Martin Liska  <mliska@suse.cz>
7352         * c-ada-spec.c (macro_length): Increment value instead of a pointer.
7354 2017-03-03  Jason Merrill  <jason@redhat.com>
7356         * c.opt (Wnoexcept-type): New.
7358 2017-03-02  Richard Biener  <rguenther@suse.de>
7360         PR c/79756
7361         * c-common.c (c_common_mark_addressable_vec): Look through
7362         C_MAYBE_CONST_EXPR.
7364 2017-02-28  Martin Liska  <mliska@suse.cz>
7366         * c.opt: Replace space with tabular for options of <number>
7367         type.
7369 2017-02-28  Martin Liska  <mliska@suse.cz>
7371         * c.opt: Fix --help=option -Q for options which are of
7372         an enum type.
7374 2017-02-24  Jakub Jelinek  <jakub@redhat.com>
7376         PR c++/79588
7377         * c-common.c (check_function_restrict): New function.
7378         (check_function_arguments): Add FNDECL argument.  Call
7379         check_function_restrict if -Wrestrict.
7380         * c-warn.c (warn_for_restrict): Remove ARGS argument, add ARGARRAY
7381         and NARGS.  Use auto_vec for ARG_POSITIONS, simplify.
7382         * c-common.h (check_function_arguments): Add FNDECL argument.
7383         (warn_for_restrict): Remove ARGS argument, add ARGARRAY and NARGS.
7385 2017-02-24  Eric Botcazou  <ebotcazou@adacore.com>
7387         * c-ada-spec.c (dump_ada_function_declaration): Add comment about the
7388         treatment of parameters with pointer-to-tagged type and tidy up.
7389         (print_ada_methods): Remove the special treatment of C++ static member
7390         functions.
7392 2017-02-22  Martin Liska  <mliska@suse.cz>
7394         * c.opt: Replace inequality signs with square brackets
7395         for -Wnornalized.
7397 2017-02-21  Jakub Jelinek  <jakub@redhat.com>
7399         PR c++/79641
7400         * c-attribs.c (handle_mode_attribute): Use build_qualified_type to
7401         preserve quals.
7403 2017-02-17  Joseph Myers  <joseph@codesourcery.com>
7405         * c-cppbuiltin.c (builtin_define_float_constants): Define
7406         __DECIMAL_DIG__ to the value for long double.
7408 2017-02-15  Marek Polacek  <polacek@redhat.com>
7410         PR c/79515
7411         * c-warn.c (do_warn_double_promotion): Don't warn if an invalid
7412         conversion has occured.
7414 2017-01-24  David Malcolm  <dmalcolm@redhat.com>
7416         * c-common.c (c_common_reswords): Add "__RTL".
7417         * c-common.h (enum rid): Add RID_RTL.
7419 2017-01-20  Marek Polacek  <polacek@redhat.com>
7421         PR c/64279
7422         * c-common.h (do_warn_duplicated_branches_r): Declare.
7423         * c-gimplify.c (c_genericize): Walk the function tree calling
7424         do_warn_duplicated_branches_r.
7425         * c-warn.c (expr_from_macro_expansion_r): New.
7426         (do_warn_duplicated_branches): New.
7427         (do_warn_duplicated_branches_r): New.
7428         * c.opt (Wduplicated-branches): New option.
7430 2017-01-17  David Malcolm  <dmalcolm@redhat.com>
7432         PR c++/71497
7433         * c-indentation.c (warn_for_misleading_indentation): Use the past
7434         subjunctive in the note.
7436 2017-01-17  Aldy Hernandez  <aldyh@redhat.com>
7438         PR c/79116
7439         * array-notation-common.c (cilkplus_extract_an_triplets): Convert
7440         start type to integer_type.
7442 2017-01-16  Jakub Jelinek  <jakub@redhat.com>
7444         PR driver/49726
7445         * c.opt (gen-decls): Add Driver flag.
7447 2017-01-16  Paolo Carlini  <paolo.carlini@oracle.com>
7449         Revert:
7450         2017-01-16  Paolo Carlini  <paolo.carlini@oracle.com>
7452         PR c++/71737
7453         * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
7455 2017-01-16  Paolo Carlini  <paolo.carlini@oracle.com>
7457         PR c++/71737
7458         * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
7460 2017-01-12  Martin Sebor  <msebor@redhat.com>
7462         (-Wformat-overflow): ...to this.
7464 2017-01-11  Martin Sebor  <msebor@redhat.com>
7466         PR c/78768
7467         * c.opt (-Walloca-larger-than, -Wformat-length, -Wformat-truncation):
7468         Also enable for LTO.
7470 2017-01-10  Jason Merrill  <jason@redhat.com>
7472         Implement P0195R2, C++17 variadic using.
7473         * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_variadic_using.
7475 2017-01-09  Jakub Jelinek  <jakub@redhat.com>
7477         PR translation/79019
7478         PR translation/79020
7479         * c.opt (Wnormalized=): Fix typo in description.
7481 2017-01-08  Martin Sebor  <msebor@redhat.com>
7483         PR middle-end/77708
7484         * c.opt (-Wformat-truncation): New option.
7486 2017-01-06  Alexandre Oliva  <aoliva@redhat.com>
7488         * c-pretty-print.c (pp_c_tree_decl_identifier): Convert 16-bit
7489         value to unsigned short to fit in 4 hex digits without
7490         warnings.
7492 2017-01-05  Eric Botcazou  <ebotcazou@adacore.com>
7494         * c.opt (fsso-struct): Add 'native' value.
7496 2017-01-05  Martin Liska  <mliska@suse.cz>
7498         PR pch/78970
7499         * c-opts.c (c_common_post_options): Reject '-' filename for a precompiled
7500         header.
7502 2017-01-04  Marek Polacek  <polacek@redhat.com>
7504         PR c++/64767
7505         * c.opt (Wpointer-compare): New option.
7507 2017-01-04  Jakub Jelinek  <jakub@redhat.com>
7509         PR driver/78957
7510         * c.opt (fsso-struct=): Add RejectNegative.
7512 2017-01-01  Jakub Jelinek  <jakub@redhat.com>
7514         Update copyright years.
7516 2016-12-29  Martin Liska  <mliska@suse.cz>
7518         PR c/78933
7519         * c.opt (strong-eval-order): Add RejectNegative keyword.
7521 2016-12-22  Jason Merrill  <jason@redhat.com>
7523         Implement P0522R0, matching of template template arguments.
7524         * c-cppbuiltin.c (c_cpp_builtins): Define
7525         __cpp_template_template_args.
7527 2016-12-21  Jakub Jelinek  <jakub@redhat.com>
7529         PR bootstrap/78817
7530         * c-common.c (struct nonnull_arg_ctx): New type.
7531         (check_function_nonnull): Return bool instead of void.  Use
7532         nonnull_arg_ctx as context rather than just location_t.
7533         (check_nonnull_arg): Adjust for the new context type, set
7534         warned_p to true if a warning has been diagnosed.
7535         (check_function_arguments): Return bool instead of void.
7536         * c-common.h (check_function_arguments): Adjust prototype.
7538 2016-12-21  Jason Merrill  <jason@redhat.com>
7540         * c.opt (-fnew-ttp-matching): New flag.
7541         * c-opts.c (c_common_post_options): Default on if -std=c++1z.
7543 2016-12-14  Martin Jambor  <mjambor@suse.cz>
7545         * c-omp.c: Include omp-general.h instead of omp-low.h.
7546         (c_finish_oacc_wait): Adjusted call to find_omp_clause to use its new
7547         name.
7549 2016-12-14  Martin Sebor  <msebor@redhat.com>
7551         PR c/17308
7552         * c-common.c (check_nonnull_arg): Disable when optimization
7553         is enabled.
7555 2016-12-12  Marek Polacek  <polacek@redhat.com>
7557         PR c++/78647
7558         * c-common.c (attribute_fallthrough_p): Return false for
7559         error_mark_node.
7561 2016-12-08  Martin Sebor  <msebor@redhat.com>
7563         PR c/78284
7564         * c.opt (-Walloc-zero, -Walloc-size-larger-than): New options.
7566 2016-12-08  Martin Sebor  <msebor@redhat.com>
7568         PR c/78165
7569         * c-pretty-print (pp_c_integer_constant): Avoid formatting type
7570         suffix.
7572 2016-12-07  Martin Sebor  <msebor@redhat.com>
7574         PR c/53562
7575         PR middle-end/77784
7576         PR middle-end/78149
7577         PR middle-end/78138
7578         * c.opt (-Wstringop-overflow): New option.
7580 2016-12-02  Maxim Ostapenko  <m.ostapenko@samsung.com>
7582         * c-attribs.c (asan odr indicator): New attribute.
7583         (handle_asan_odr_indicator_attribute): New function.
7585 2016-11-26  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
7587         * c-common.c (c_common_nodes_and_builtins): Remove initialization of
7588         ptrdiff_type_node;
7590 2016-11-23  James Greenhalgh  <james.greenhalgh@arm.com>
7592         * c-common.c (excess_precision_mode_join): New.
7593         (c_ts18661_flt_eval_method): New.
7594         (c_c11_flt_eval_method): Likewise.
7595         (c_flt_eval_method): Likewise.
7596         * c-common.h (excess_precision_mode_join): New.
7597         (c_flt_eval_method): Likewise.
7598         * c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): New.
7599         (cpp_iec_559_value): Call it.
7600         (c_cpp_builtins): Modify logic for __LIBGCC_*_EXCESS_PRECISION__,
7601         call c_flt_eval_method to set __FLT_EVAL_METHOD__ and
7602         __FLT_EVAL_METHOD_TS_18661_3__.
7604 2016-11-23  James Greenhalgh  <james.greenhalgh@arm.com>
7606         * c-opts.c (c_common_post_options): Add logic to handle the default
7607         case for -fpermitted-flt-eval-methods.
7609 2016-11-23  Paolo Bonzini  <bonzini@gnu.org>
7611         * c.opt (Wexpansion-to-defined): New.
7613 2016-11-23  Jakub Jelinek  <jakub@redhat.com>
7615         PR target/78451
7616         * c-pragma.c (handle_pragma_target): Don't replace
7617         current_target_pragma, but chainon the new args to the current one.
7619 2016-11-22  Nathan Sidwell  <nathan@acm.org>
7621         * array-notation-common.c (cilkplus_extract_an_trplets): Fix
7622         indentation and formatting.
7624 2016-11-21  Martin Sebor  <msebor@redhat.com>
7626         * c.opt (-fprintf-return-value): Enable by default.
7628 2016-11-21  Bernd Edlinger  <bernd.edlinger@hotmail.de>
7630         PR c++/71973
7631         * c.opt (-Wbuiltin-declaration-mismatch): New warning.
7632         * c-common.c (c_common_nodes_and_builtins): Initialize
7633         const_tm_ptr_type_node.
7635 2016-11-16  Marek Polacek  <polacek@redhat.com>
7637         PR c/78285
7638         * c-common.c (c_add_case_label): Turn error_at calls into inform.
7640 2016-11-14  Jakub Jelinek  <jakub@redhat.com>
7642         * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_structured_bindings.
7644 2016-11-14  Prasad Ghangal  <prasad.ghangal@gmail.com>
7645             Richard Biener  <rguenther@suse.de>
7647         * c-common.h (c_common_resword): Add RID_GIMPLE, RID_PHI types.
7648         * c-common.h (enum rid): Add RID_GIMPLE, RID_PHI.
7649         * c.opt (fgimple): New option.
7651 2016-11-13  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
7653         PR c/35503
7654         * c-common.h (warn_for_restrict): Declare.
7655         * c-warn.c: Include gcc-rich-location.h.
7656         (warn_for_restrict): New function.
7657         * c-format.c (gcc_tdiag_char_table): Add entry for "Z" specifier.
7658         (gcc_cdiag_char_table): Likewise.
7659         (gcc_cxxdiag_char_table): Likewise.
7660         * c.opt (Wrestrict): New option.
7662 2016-11-13  Eric Botcazou  <ebotcazou@adacore.com>
7664         * c-ada-spec.c (print_ada_declaration): For typedef declarations, look
7665         for nested types only if the type is a record or union and dump SLOC.
7667 2016-11-09  Jason Merrill  <jason@redhat.com>
7669         * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_template_auto.
7671 2016-11-09  Jakub Jelinek  <jakub@redhat.com>
7673         * c-ubsan.c (ubsan_instrument_shift): Handle split
7674         -fsanitize=shift-base and -fsanitize=shift-exponent.
7676 2016-11-07  Jason Merrill  <jason@redhat.com>
7678         * c.opt (Wc++1z-compat): New.
7679         * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_noexcept_function_type.
7681 2016-11-07  Martin Liska  <mliska@suse.cz>
7683         * c-warn.c (warn_for_unused_label): Save all labels used
7684         in goto or in &label.
7686 2016-11-03  Jason Merrill  <jason@redhat.com>
7688         * c-cppbuiltin.c (c_cpp_builtins): Correct
7689         __cpp_inheriting_constructors.
7691 2016-11-01  Jason Merrill  <jason@redhat.com>
7693         * c-cppbuiltin.c (c_cpp_builtins): Update
7694         __cpp_inheriting_constructors.
7696         * c.opt (-fnew-inheriting-ctors): New.
7697         * c-opts.c: Default to on for ABI 11+.
7699 2016-10-31  Jakub Jelinek  <jakub@redhat.com>
7701         PR c++/77948
7702         * c.opt (fext-numeric-literals): Add Var and Init.
7703         * c-opts.c (c_common_handle_option): Don't clear
7704         cpp_opts->ext_numeric_literals for -std=c++{11,14,1z}.
7705         (c_common_post_options): Clear it here if not set
7706         explicitly.
7708 2016-10-28  Aldy Hernandez  <aldyh@redhat.com>
7710         PR debug/77773
7711         * c-pretty-print.c (simple_type_specifier): Do not dereference `t'
7712         if NULL.
7714 2016-10-25  Jakub Jelinek  <jakub@redhat.com>
7716         * c-common.h (enum rid): Add RID_BUILTIN_LAUNDER.
7717         * c-common.c (c_common_reswords): Add __builtin_launder.
7719 2016-10-24  Bernd Edlinger  <bernd.edlinger@hotmail.de>
7721         * c-common.c (c_common_truthvalue_conversion): Warn for
7722         multiplications in boolean context.  Fix the quoting of '<<' and '<'
7723         in the shift warning.
7725 2016-10-20  Bernd Edlinger  <bernd.edlinger@hotmail.de>
7727         * c-common.c (c_common_truthvalue_conversion): Fix the comment.
7729 2016-10-20  Jason Merrill  <jason@redhat.com>
7731         * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_concepts value.
7733 2016-10-19  Bernd Edlinger  <bernd.edlinger@hotmail.de>
7735         * c-common.c (c_common_truthvalue_conversion): Warn only for signed
7736         integer shift ops in boolean context.
7738 2016-10-18  Aldy Hernandez  <aldyh@redhat.com>
7740         * c.opt (Walloca): New.
7741         (Walloca-larger-than=): New.
7742         (Wvla-larger-than=): New.
7744 2016-10-17  Marek Polacek  <polacek@redhat.com>
7746         * c-warn.c (find_array_ref_with_const_idx_r): Remove parameter names.
7747         Return immediately when finding a match.
7748         (warn_tautological_cmp): Remove a boolean variable that is no longer
7749         needed.
7751 2016-10-17  Marek Polacek  <polacek@redhat.com>
7753         * c-attribs.c: New file.
7754         * c-common.c: Move attributes handling to c-attribs.c.
7755         (get_nonnull_operand): No longer static.
7756         * c-common.h: Move the declarations from c-attribs.c to its own section.
7758 2016-10-14  Jason Merrill  <jason@redhat.com>
7760         * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_aggregate_bases
7761         and __cpp_deduction_guides.
7763 2016-10-13  Jason Merrill  <jason@redhat.com>
7765         * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_inline_variables.
7767 2016-10-13  Thomas Preud'homme  <thomas.preudhomme@arm.com>
7769         * c-cppbuiltin.c: Include memmodel.h.
7770         * c-opts.c: Likewise.
7771         * c-pragma.c: Likewise.
7772         * c-warn.c: Likewise.
7774 2016-10-12  Jakub Jelinek  <jakub@redhat.com>
7776         * c.opt (Wextra): Add as C/C++/ObjC/ObjC++ option.
7777         (Wimplicit-fallthrough=): Enable for these languages by -Wextra.
7778         * c-opts.c (sanitize_cpp_opts): Initialize
7779         cpp_opts->cpp_warn_implicit_fallthrough.
7781 2016-10-11  Marek Polacek  <polacek@redhat.com>
7783         * c-common.c (warning_candidate_p): Change the return type to bool
7784         and return true/false instead of 1/0.
7785         (vector_mode_valid_p): Likewise.
7787 2016-10-11  Marek Polacek  <polacek@redhat.com>
7789         * c-common.c (fold_for_warn): No longer static.
7790         (bool_promoted_to_int_p): Likewise.
7791         (c_common_get_narrower): Likewise.
7792         (constant_expression_warning): Move to c-warn.c.
7793         (constant_expression_error): Likewise.
7794         (overflow_warning): Likewise.
7795         (warn_logical_operator): Likewise.
7796         (find_array_ref_with_const_idx_r): Likewise.
7797         (warn_tautological_cmp): Likewise.
7798         (expr_has_boolean_operands_p): Likewise.
7799         (warn_logical_not_parentheses): Likewise.
7800         (warn_if_unused_value): Likewise.
7801         (strict_aliasing_warning): Likewise.
7802         (sizeof_pointer_memaccess_warning): Likewise.
7803         (check_main_parameter_types): Likewise.
7804         (conversion_warning): Likewise.
7805         (warnings_for_convert_and_check): Likewise.
7806         (match_case_to_enum_1): Likewise.
7807         (match_case_to_enum): Likewise.
7808         (c_do_switch_warnings): Likewise.
7809         (warn_for_omitted_condop): Likewise.
7810         (readonly_error): Likewise.
7811         (lvalue_error): Likewise.
7812         (invalid_indirection_error): Likewise.
7813         (warn_array_subscript_with_type_char): Likewise.
7814         (warn_about_parentheses): Likewise.
7815         (warn_for_unused_label): Likewise.
7816         (warn_for_div_by_zero): Likewise.
7817         (warn_for_memset): Likewise.
7818         (warn_for_sign_compare): Likewise.
7819         (do_warn_double_promotion): Likewise.
7820         (do_warn_unused_parameter): Likewise.
7821         (record_locally_defined_typedef): Likewise.
7822         (maybe_record_typedef_use): Likewise.
7823         (maybe_warn_unused_local_typedefs): Likewise.
7824         (maybe_warn_bool_compare): Likewise.
7825         (maybe_warn_shift_overflow): Likewise.
7826         (warn_duplicated_cond_add_or_warn): Likewise.
7827         (diagnose_mismatched_attributes): Likewise.
7828         * c-common.h: Move the declarations from c-warn.c to its own section.
7829         * c-warn.c: New file.
7831 2016-10-08  Jason Merrill  <jason@redhat.com>
7833         * c-common.c (c_common_truthvalue_conversion): Don't distribute
7834         into COND_EXPR in C++.
7836 2016-10-08  Jakub Jelinek  <jakub@redhat.com>
7838         * c-lex.c (c_lex_with_flags) <case CPP_COMMENT>: For CPP_COMMENT
7839         token with PREV_FALLTHROUGH, skip all following CPP_PADDING and
7840         CPP_COMMENT tokens and set add_flags to PREV_FALLTHROUGH afterwards.
7842 2016-10-07  Jakub Jelinek  <jakub@redhat.com>
7844         Implement LWG2296 helper intrinsic
7845         * c-common.h (enum rid): Add RID_ADDRESSOF.
7846         * c-common.c (c_common_reswords): Add __builtin_addressof.
7848 2016-10-07  Bernd Edlinger  <bernd.edlinger@hotmail.de>
7850         PR c++/77700
7851         * c-common.c (c_common_truthvalue_conversion): Warn also for
7852         suspicious enum values in boolean context.
7854 2016-10-06  Jakub Jelinek  <jakub@redhat.com>
7856         Implement P0258R2 - helper for C++17
7857         std::has_unique_object_representations trait
7858         * c-common.h (enum rid): Add RID_HAS_UNIQUE_OBJ_REPRESENTATIONS.
7859         * c-common.c (c_common_reswords): Add
7860         __has_unique_object_representations.
7862 2016-10-05  Jakub Jelinek  <jakub@redhat.com>
7864         PR sanitizer/66343
7865         * c-ubsan.c (ubsan_instrument_return): Don't call
7866         initialize_sanitizer_builtins here.
7868 2016-10-05  Bernd Edlinger  <bernd.edlinger@hotmail.de>
7870         * c-common.c (c_common_truthvalue_conversion): Warn also for suspicious
7871         conditional expression in boolean context when only one arm is
7872         non-boolean.
7874 2016-10-05  Jakub Jelinek  <jakub@redhat.com>
7876         PR sanitizer/77823
7877         * c-ubsan.c (ubsan_instrument_shift): Return NULL_TREE if type0
7878         is not integral.
7880         * c-common.c (c_common_reswords): Update comment for C++11.
7882 2016-10-04  Jason Merrill  <jason@redhat.com>
7884         * c-common.c (make_tree_vector_from_ctor): New.
7885         * c-common.h: Declare it.
7887 2016-10-04  Jakub Jelinek  <jakub@redhat.com>
7889         * c-cppbuiltin.c (c_cpp_builtins): Don't define
7890         __LIBGCC_JCR_SECTION_NAME__.
7892 2016-10-03  Bernd Edlinger  <bernd.edlinger@hotmail.de>
7894         * c-common.c (c_common_truthvalue_conversion): Warn for suspicious
7895         left shift in boolean context.
7897 2016-09-29  Jakub Jelinek  <jakub@redhat.com>
7899         Implement P0001R1 - C++17 removal of register storage class specifier
7900         * c.opt (Wregister): New warning.
7901         * c-opts.c (c_common_post_options): Enable -Wregister by
7902         default for C++17.
7904 2016-09-29  James Greenhalgh  <james.greenhalgh@arm.com>
7906         * c-opts.c (c_common_post_options): Remove special case for
7907         TARGET_FLT_EVAL_METHOD_NON_DEFAULT with -fexcess-precision=standard
7908         in C++.
7910 2016-09-27  Jakub Jelinek  <jakub@redhat.com>
7912         * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_capture_star_this for
7913         -std=c++1z.
7915         * c-ada-spec.c (print_ada_declaration): Remove break after return.
7917 2016-09-26  Thomas Preud'homme  <thomas.preudhomme@arm.com>
7919         * c-common.c: Include memmodel.h.
7921 2016-09-26  Marek Polacek  <polacek@redhat.com>
7923         * c-lex.c (c_common_has_attribute): Handle attribute fallthrough.
7925 2016-09-26  Marek Polacek  <polacek@redhat.com>
7927         PR c/7652
7928         * c-common.c (c_common_attribute_table): Add fallthrough attribute.
7929         (handle_fallthrough_attribute): New function.
7930         (attribute_fallthrough_p): New function.
7931         * c-common.h (attribute_fallthrough_p): Declare.
7933 2016-09-24  Marek Polacek  <polacek@redhat.com>
7935         PR c/77490
7936         * c.opt (Wbool-operation): New.
7938 2016-09-21  Bernd Edlinger  <bernd.edlinger@hotmail.de>
7940         * c-common.c (c_common_truthvalue_conversion): Inhibit
7941         Wint-in-bool-context warning with from_macro_definition_at.
7942         Mention the expression will always evaluate to true.
7944 2016-09-21  Martin Sebor  <msebor@redhat.com>
7946         PR bootstrap/77676
7947         * c.opt (fprintf-return-value): Temporarily initialize to zero
7948         to unblock bootstrap failures.
7950 2016-09-21  Jakub Jelinek  <jakub@redhat.com>
7952         PR c++/77651
7953         * c.opt (Waligned-new=): Add RejectNegative.
7954         (faligned-new=): Likewise.  Spelling fix - change
7955         aligned_new_threshhold to aligned_new_threshold.
7956         * c-cppbuiltin.c (c_cpp_builtins): Change aligned_new_threshhold
7957         to aligned_new_threshold.
7959 2016-09-20  Martin Sebor  <msebor@redhat.com>
7961         PR middle-end/49905
7962         * c.opt: Add -Wformat-length and -fprintf-return-value.
7964 2016-09-19  Bernd Edlinger  <bernd.edlinger@hotmail.de>
7966         PR c++/77434
7967         * c.opt (Wint-in-bool-context): New warning.
7968         * c-common.c (c_common_truthvalue_conversion): Warn on integer
7969         constants in boolean context.
7971 2016-09-19  Joseph Myers  <joseph@codesourcery.com>
7973         * c-common.c (max_align_t_align): Also consider alignment of
7974         float128_type_node.
7976 2016-09-15  Jason Merrill  <jason@redhat.com>
7978         * c-common.c (check_cxx_fundamental_alignment_constraints): Check
7979         DECL_EXTERNAL.
7981 2016-09-14  Jason Merrill  <jason@redhat.com>
7983         * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
7984         limit FIELD_DECL, either.
7986 2016-09-14  Marek Polacek  <polacek@redhat.com>
7988         * c-common.c (c_common_truthvalue_conversion): Use false instead of 0.
7989         * c-common.h (build_unary_op): Change nonconvert parameter type to bool.
7990         * c-omp.c (c_finish_omp_atomic): Use false instead of 0.
7992 2016-09-13  David Malcolm  <dmalcolm@redhat.com>
7994         * c-common.c (warn_logical_not_parentheses): Replace
7995         rich_location::add_fixit_insert calls with add_fixit_insert_before
7996         and add_fixit_insert_after, eliminating the "next_loc" calculation.
7998 2016-09-13  Jason Merrill  <jason@redhat.com>
7999             Tom de Vries  <tom@codesourcery.com>
8001         PR c++/77427
8002         * c-common.c (set_underlying_type): Don't treat array as builtin type.
8004 2016-09-13  Jason Merrill  <jason@redhat.com>
8006         * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
8007         limit types at all.
8009 2016-09-12  Jason Merrill  <jason@redhat.com>
8011         * c-common.c (check_cxx_fundamental_alignment_constraints): Fix
8012         bit/byte confusion, allow large alignment for types.
8014 2016-09-12  Bernd Edlinger  <bernd.edlinger@hotmail.de>
8016         PR c++/77496
8017         * c-common.c (warn_for_omitted_condop): Also warn for boolean data.
8019 2016-09-12  David Malcolm  <dmalcolm@redhat.com>
8021         PR c/72858
8022         * c-format.c (argument_parser::check_argument_type): Add params
8023         "type_start" and "conversion_char".  Use the former to generate
8024         offset_to_type_start and pass it and conversion_char to
8025         check_format_types.
8026         (check_format_info_main): Capture the start of the type
8027         information as "type_start", and pass it an format_char
8028         to arg_parser.check_argument_type.
8029         (check_format_types): Provide an example in the leading comment.
8030         Add params "offset_to_type_start" and "conversion_char"; pass
8031         them to format_type_warning calls.
8032         (test_get_modifier_for_format_len): Likewise.
8033         (matching_type_p): New function.
8034         (get_format_for_type): Add param "conversion_char" and move
8035         implementation into...
8036         (get_format_for_type_1): ...new function, called twice.
8037         Use new function matching_type_p rather than checking for
8038         TYPE_CANONICAL equality.
8039         (get_corrected_substring): New function.
8040         (format_type_warning): Provide an example in the leading comment.
8041         Add params "offset_to_type_start" and "conversion_char".  Replace
8042         call to get_format_for_type with call to get_corrected_substring
8043         and move rejection of hints for widths/precisions there.
8044         (assert_format_for_type_streq): Add param "conversion_char".
8045         (ASSERT_FORMAT_FOR_TYPE_STREQ): Add param CONVERSION_CHAR.
8046         (test_get_format_for_type_printf): Add conversion chars to the
8047         tests, adding coverage for various combinations of integer
8048         vs double conversions, and for preserving octal and hexadecimal
8049         conversions.
8050         (test_get_format_for_type_scanf): Add conversion chars to the
8051         tests.
8053 2016-09-10  Tom de Vries  <tom@codesourcery.com>
8055         PR C/71602
8056         * c-common.c (build_va_arg): Handle more strict
8057         targetm.canonical_va_list_type.  Replace first argument type error with
8058         assert.
8060 2016-09-09  Martin Sebor  <msebor@redhat.com>
8062         PR c/77520
8063         PR c/77521
8064         * c-format.c (argument_parser::find_format_char_info): Use %qc
8065         format directive unconditionally.
8067 2016-09-09  Jason Merrill  <jason@redhat.com>
8069         Implement C++17 new of over-aligned types.
8070         * c.opt: Add -faligned-new and -Waligned-new.
8071         * c-common.c (max_align_t_align): Split out from...
8072         (cxx_fundamental_alignment_p): ...here.
8073         * c-common.h: Declare it.
8074         * c-cppbuiltin.c (c_cpp_builtins): Handle aligned new.
8076 2016-09-09  Joseph Myers  <joseph@codesourcery.com>
8078         * c-cppbuiltin.c (builtin_define_type_width): New function.
8079         (builtin_define_stdint_macros, c_cpp_builtins): Define type width
8080         macros.
8082 2016-09-07  David Malcolm  <dmalcolm@redhat.com>
8084         * c-common.c (get_cpp_ttype_from_string_type): Handle being passed
8085         a POINTER_TYPE.
8086         (substring_loc::get_location): Move to substring-locations.c,
8087         keeping implementation as...
8088         (c_get_substring_location): New function, from the above, reworked
8089         to use accessors rather than member lookup.
8090         * c-common.h (class substring_loc): Move to substring-locations.h,
8091         replacing with a forward decl.
8092         (c_get_substring_location): New decl.
8093         * c-format.c: Include "substring-locations.h".
8094         (format_warning_va): Move to substring-locations.c.
8095         (format_warning_at_substring): Likewise.
8097 2016-09-06  Martin Sebor  <msebor@redhat.com>
8099         PR c/77336
8100         * c-format.c (check_function_format): Avoid issuing warnings for
8101         functions unless they call format functions with non-constant
8102         format strings.
8104 2016-09-06  Richard Biener  <rguenther@suse.de>
8106         PR c/77450
8107         * c-common.c (c_common_mark_addressable_vec): Handle
8108         COMPOUND_LITERAL_EXPR.
8110 2016-09-05  Marek Polacek  <polacek@redhat.com>
8112         PR c/77423
8113         * c-common.c (bool_promoted_to_int_p): New function.
8114         (expr_has_boolean_operands_p): New function.
8115         (warn_logical_not_parentheses): Return if expr_has_boolean_operands_p.
8116         (maybe_warn_bool_compare): Use bool_promoted_to_int_p.
8118 2016-09-04  Tom de Vries  <tom@codesourcery.com>
8120         revert:
8121         2016-08-29  Tom de Vries  <tom@codesourcery.com>
8123         * c-common.c (build_va_arg): Replace first argument type error
8124         with assert.
8126 2016-09-02  Jakub Jelinek  <jakub@redhat.com>
8128         PR c/65467
8129         * c-omp.c (c_finish_omp_atomic): Reject _Atomic qualified expressions.
8130         (c_finish_omp_for): Reject _Atomic qualified iterators.
8132 2016-09-01  Martin Sebor  <msebor@redhat.com>
8134         * c-ada-spec.c (dump_ada_function_declaration): Increase buffer
8135         size to guarantee it fits the output of the formatted function
8136         regardless of its arguments.
8138 2016-09-01  Marek Polacek  <polacek@redhat.com>
8140         PR c/7652
8141         * c-common.c (resolve_overloaded_builtin): Fix formatting.  Add
8142         FALLTHRU comments.
8144 2016-08-29  Marek Polacek  <polacek@redhat.com>
8146         PR c/77292
8147         * c-common.c (warn_logical_not_parentheses): Don't warn for
8148         a comparison or a logical operator.
8150 2016-08-29  Tom de Vries  <tom@codesourcery.com>
8152         * c-common.c (build_va_arg): Fix type comparison assert.
8154 2016-08-29  Tom de Vries  <tom@codesourcery.com>
8156         * c-common.c (build_va_arg): Replace first argument type error
8157         with assert.
8159 2016-08-29  Tom de Vries  <tom@codesourcery.com>
8161         PR c/77398
8162         * c-common.c (build_va_arg): Add first argument error.  Build va_arg
8163         with error_mark_node as va_list instead of with illegal va_list.
8165 2016-08-25  Marek Polacek  <polacek@redhat.com>
8166             David Malcolm  <dmalcolm@redhat.com>
8168         * c-common.c (warn_logical_not_parentheses): Print fixit hints.
8169         * c-common.h (warn_logical_not_parentheses): Update declaration.
8171 2016-08-22  Marek Polacek  <polacek@redhat.com>
8173         PR c++/77321
8174         * c-common.c (warn_for_memset): Check type for null.
8176 2016-08-22  Joseph Myers  <joseph@codesourcery.com>
8178         * c-cppbuiltin.c (c_cpp_builtins): Check _FloatN and
8179         _FloatNx types for suffixes for built-in functions.
8181 2016-08-19  Joseph Myers  <joseph@codesourcery.com>
8183         PR c/32187
8184         * c-common.h (RID_FLOAT16, RID_FLOATN_NX_FIRST, RID_FLOAT32)
8185         (RID_FLOAT64, RID_FLOAT128, RID_FLOAT32X, RID_FLOAT64X)
8186         (RID_FLOAT128X): New enum rid values.
8187         (CASE_RID_FLOATN_NX): New macro.
8188         * c-common.c (c_common_reswords): Add _FloatN and _FloatNx
8189         keywords.
8190         (c_common_type_for_mode): Check for _FloatN and _FloatNx and
8191         corresponding complex types.
8192         (c_common_nodes_and_builtins): For non-C++, register _FloatN and
8193         _FloatNx and corresponding complex types.
8194         (keyword_begins_type_specifier): Use CASE_RID_FLOATN_NX.
8195         * c-cppbuiltin.c (builtin_define_float_constants): Check _FloatN
8196         and _FloatNx types for the widest type for determining
8197         DECIMAL_DIG.  Define __LDBL_DECIMAL_DIG__ as well as
8198         __DECIMAL_DIG__ for long double.  Handle FMA_SUFFIX being NULL.
8199         (c_cpp_builtins): Call builtin_define_float_constants for _FloatN
8200         and _FloatNx types.
8201         * c-lex.c (interpret_float): Handle _FloatN and _FloatNx
8202         constants.
8203         * c-pretty-print.c (pp_c_floating_constant): Handle _FloatN and
8204         _FloatNx types.
8206 2016-08-18  David Malcolm  <dmalcolm@redhat.com>
8208         * c-opts.c (c_diagnostic_finalizer): Update for change to
8209         diagnostic_show_locus.
8211 2016-08-18  David Malcolm  <dmalcolm@redhat.com>
8213         * c-common.c: Include "spellcheck.h".
8214         (cb_get_suggestion): New function.
8215         * c-common.h (cb_get_suggestion): New decl.
8216         * c-lex.c (init_c_lex): Initialize cb->get_suggestion to
8217         cb_get_suggestion.
8219 2016-08-18  Marek Polacek  <polacek@redhat.com>
8221         PR c/71514
8222         * c-common.c (get_atomic_generic_size): Disallow pointer-to-function
8223         and pointer-to-VLA.
8225 2016-08-16  David Malcolm  <dmalcolm@redhat.com>
8227         PR c/72857
8228         * c-common.c (substring_loc::get_range): Rename to...
8229         (substring_loc::get_location): ...this, converting param from a
8230         source_range * to a location_t *.  Call
8231         get_source_location_for_substring rather than
8232         get_source_range_for_substring, and pass in m_caret_idx.
8233         * c-common.h (substring_loc::substring_loc): Add param "caret_idx".
8234         (substring_loc::get_range): Replace with...
8235         (substring_loc::get_location): ...this.
8236         (substring_loc::set_caret_index): New method.
8237         (substring_loc): Add field m_caret_idx.
8238         * c-format.c (format_warning_va): Update for above changes.
8239         Rename local "substring_loc" to "fmt_substring_loc" to avoid
8240         clashing with type name.
8241         (format_warning_at_char): Add caret_idx param to substring_loc ctor.
8242         (check_argument_type): Likewise.
8243         (format_type_warning): Rename param "fmt_loc" to "whole_fmt_loc"
8244         Use a copy when emitting warnings, setting the caret index from TYPE.
8246 2016-08-16  Eric Botcazou  <ebotcazou@adacore.com>
8247             Arnaud Charlet  <charlet@adacore.com>
8249         * c-ada-spec.c (dump_number): New function.
8250         (handle_escape_character): Likewise.
8251         (print_ada_macros): Add handling of constant integers and strings.
8253 2016-08-12  Marek Polacek  <polacek@redhat.com>
8255         PR c/7652
8256         * c-common.c (scalar_to_vector): Adjust fall through comment.
8257         * c-opts.c (c_common_handle_option): Likewise.
8258         * c-pragma.c (handle_pragma_pack): Add FALLTHRU.
8259         * c-pretty-print.c (c_pretty_printer::postfix_expression): Adjust
8260         fall through comment.
8261         * cilk.c (extract_free_variables): Add FALLTHRU.
8263 2016-08-10  Jason Merrill  <jason@redhat.com>
8265         * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_if_constexpr.
8267 2016-08-09  Jason Merrill  <jason@redhat.com>
8269         * c-common.c (c_common_attribute_table): vector_size affects type
8270         identity.
8272 2016-08-09  Marek Polacek  <polacek@redhat.com>
8274         PR c/7652
8275         * c-ada-spec.c (dump_generic_ada_node): Add return.
8277 2016-08-09  Jason Merrill  <jason@redhat.com>
8279         * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_constexpr for
8280         C++17 constexpr lambdas.
8282 2016-08-08  David Malcolm  <dmalcolm@redhat.com>
8284         PR c/64955
8285         * c-common.h (selftest::c_format_c_tests): New declaration.
8286         (selftest::run_c_tests): New declaration.
8287         * c-format.c: Include "selftest.h.
8288         (format_warning_va): Add param "corrected_substring" and use
8289         it to add a replacement fix-it hint.
8290         (format_warning_at_substring): Likewise.
8291         (format_warning_at_char): Update for new param of
8292         format_warning_va.
8293         (argument_parser::check_argument_type): Pass "fki" to
8294         check_format_types.
8295         (check_format_types): Add param "fki" and pass it to
8296         format_type_warning.
8297         (deref_n_times): New function.
8298         (get_modifier_for_format_len): New function.
8299         (selftest::test_get_modifier_for_format_len): New function.
8300         (get_format_for_type): New function.
8301         (format_type_warning): Add param "fki" and use it to attempt
8302         to provide hints for argument types when calling
8303         format_warning_at_substring.
8304         (selftest::get_info): New function.
8305         (selftest::assert_format_for_type_streq): New function.
8306         (ASSERT_FORMAT_FOR_TYPE_STREQ): New macro.
8307         (selftest::test_get_format_for_type_printf): New function.
8308         (selftest::test_get_format_for_type_scanf): New function.
8309         (selftest::c_format_c_tests): New function.
8311 2016-08-08  David Malcolm  <dmalcolm@redhat.com>
8313         PR c/52952
8314         * c-format.c: Include "diagnostic.h".
8315         (location_column_from_byte_offset): Delete.
8316         (location_from_offset): Delete.
8317         (format_warning_va): New function.
8318         (format_warning_at_substring): New function.
8319         (format_warning_at_char): New function.
8320         (check_format_arg): Capture location of format_tree and pass to
8321         check_format_info_main.
8322         (argument_parser): Add fields "start_of_this_format" and
8323         "format_string_cst".
8324         (flag_chars_t::validate): Add param "format_string_cst".  Convert
8325         warning_at call using location_from_offset to call to
8326         format_warning_at_char.
8327         (argument_parser::argument_parser): Add param "format_string_cst_"
8328         and use use it to initialize field "format_string_cst".
8329         Initialize new field "start_of_this_format".
8330         (argument_parser::read_format_flags): Convert warning_at call
8331         using location_from_offset to a call to format_warning_at_char.
8332         (argument_parser::read_any_format_left_precision): Likewise.
8333         (argument_parser::read_any_format_precision): Likewise.
8334         (argument_parser::read_any_other_modifier): Likewise.
8335         (argument_parser::find_format_char_info): Likewise, in three places.
8336         (argument_parser::parse_any_scan_set): Likewise, in one place.
8337         (argument_parser::handle_conversions): Likewise, in two places.
8338         (argument_parser::check_argument_type): Add param "fmt_param_loc"
8339         and use it to make a substring_loc.  Pass the latter to
8340         check_format_types.
8341         (check_format_info_main): Add params "fmt_param_loc" and
8342         "format_string_cst".  Convert warning_at calls using
8343         location_from_offset to calls to format_warning_at_char.  Pass the
8344         new params to the arg_parser ctor.  Pass "format_string_cst" to
8345         flag_chars.validate.  Pass "fmt_param_loc" to
8346         arg_parser.check_argument_type.
8347         (check_format_types): Convert first param from a location_t
8348         to a const substring_loc & and rename to "fmt_loc".  Attempt
8349         to extract the range of the relevant parameter and pass it
8350         to format_type_warning.
8351         (format_type_warning): Convert first param from a location_t
8352         to a const substring_loc & and rename to "fmt_loc".  Add
8353         params "param_range" and "type".  Replace calls to warning_at
8354         with calls to format_warning_at_substring.
8356 2016-08-08  David Malcolm  <dmalcolm@redhat.com>
8358         * c-format.c (class flag_chars_t): New class.
8359         (struct length_modifier): New struct.
8360         (class argument_parser): New class.
8361         (flag_chars_t::flag_chars_t): New ctor.
8362         (flag_chars_t::has_char_p): New method.
8363         (flag_chars_t::add_char): New method.
8364         (flag_chars_t::validate): New method.
8365         (flag_chars_t::get_alloc_flag): New method.
8366         (flag_chars_t::assignment_suppression_p): New method.
8367         (argument_parser::argument_parser): New ctor.
8368         (argument_parser::read_any_dollar): New method.
8369         (argument_parser::read_format_flags): New method.
8370         (argument_parser::read_any_format_width): New method.
8371         (argument_parser::read_any_format_left_precision): New method.
8372         (argument_parser::read_any_format_precision): New method.
8373         (argument_parser::handle_alloc_chars): New method.
8374         (argument_parser::read_any_length_modifier): New method.
8375         (argument_parser::read_any_other_modifier): New method.
8376         (argument_parser::find_format_char_info): New method.
8377         (argument_parser::validate_flag_pairs): New method.
8378         (argument_parser::give_y2k_warnings): New method.
8379         (argument_parser::parse_any_scan_set): New method.
8380         (argument_parser::handle_conversions): New method.
8381         (argument_parser::check_argument_type): New method.
8382         (check_format_info_main): Introduce classes argument_parser
8383         and flag_chars_t, moving the code within the loop into methods
8384         of these classes.  Make various locals "const".
8386 2016-08-05  David Malcolm  <dmalcolm@redhat.com>
8388         * c-common.c: Include "substring-locations.h".
8389         (get_cpp_ttype_from_string_type): New function.
8390         (g_string_concat_db): New global.
8391         (substring_loc::get_range): New method.
8392         * c-common.h (g_string_concat_db): New declaration.
8393         (class substring_loc): New class.
8394         * c-lex.c (lex_string): When concatenating strings, capture the
8395         locations of all tokens using a new obstack, and record the
8396         concatenation locations within g_string_concat_db.
8397         * c-opts.c (c_common_init_options): Construct g_string_concat_db
8398         on the ggc-heap.
8400 2016-07-29  Marek Polacek  <polacek@redhat.com>
8402         PR c/71926
8403         * c-common.c (c_common_truthvalue_conversion): Use LOCATION for the
8404         parentheses warning.
8406         PR c/71574
8407         * c-common.c (handle_alloc_align_attribute): Also check FUNCTION_DECL.
8409 2016-07-28  Martin Liska  <mliska@suse.cz>
8411         PR gcov-profile/68025
8412         * c-common.c (handle_no_profile_instrument_function_attribute):
8414 2016-07-27  Bernd Edlinger  <bernd.edlinger@hotmail.de>
8416         * c-common.c (check_user_alignment): Use LOG2_BITS_PER_UNIT instead of
8417         BITS_PER_UNIT_LOG.
8419 2016-07-25  Jason Merrill  <jason@redhat.com>
8421         PR c++/65970
8422         * c.opt (fconstexpr-loop-limit): New.
8424 2016-07-22  Martin Sebor  <msebor@redhat.com>
8426         PR c++/71675
8427         * c-common.c (resolve_overloaded_builtin): Avoid converting
8428         __atomic_compare_exchange_n return type to that of what its
8429         first argument points to.
8431 2016-07-22  Uros Bizjak  <ubizjak@gmail.com>
8433         * c-common.c: Use HOST_WIDE_INT_M1U instead of
8434         ~(unsigned HOST_WIDE_INT) 0.
8436 2016-07-22  Martin Liska  <mliska@suse.cz>
8438         PR gcov-profile/69028
8439         PR gcov-profile/62047
8440         * cilk.c (create_cilk_helper_decl): Set location of a new decl
8441         to the current_function_decl.
8443 2016-07-21  Jason Merrill  <jason@redhat.com>
8445         PR c++/65168
8446         * c-common.c (c_common_truthvalue_conversion): Check
8447         c_inhibit_evaluation_warnings for warning about address of
8448         reference.
8450 2016-07-20  David Malcolm  <dmalcolm@redhat.com>
8452         * c-common.h (lookup_name_fuzzy): Convert return type from tree to
8453         const char *.
8455 2016-07-15  Jason Merrill  <jason@redhat.com>
8457         * c-opts.c (c_common_post_options): Update -fabi-version default to 11.
8459 2016-07-15  Jakub Jelinek  <jakub@redhat.com>
8461         PR c/71858
8462         * c-common.h (enum lookup_name_fuzzy_kind): Add
8463         FUZZY_LOOKUP_FUNCTION_NAME.
8465 2016-07-08  Jason Merrill  <jason@redhat.com>
8467         P0145: Refining Expression Order for C++.
8468         * c.opts (-fargs-in-order): Rename to -fstrong-eval-order.
8469         * c-opts.c: Adjust.
8471 2016-07-05  Markus Trippelsdorf  <markus@trippelsdorf.de>
8473         PR c++/71214
8474         * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_rvalue_references.
8476 2016-06-29  Thomas Schwinge  <thomas@codesourcery.com>
8478         * c-pragma.h (enum pragma_kind): Rename
8479         PRAGMA_OMP_DECLARE_REDUCTION to PRAGMA_OMP_DECLARE.  Adjust all
8480         users.
8482 2016-06-29  Richard Biener  <rguenther@suse.de>
8484         PR middle-end/71002
8485         * c-common.c (c_common_get_alias_set): Remove union type punning case.
8487 2016-06-24  Jason Merrill  <jason@redhat.com>
8489         P0145R2: Refining Expression Order for C++.
8490         * c-common.c (verify_tree) [COMPOUND_EXPR]: Fix handling on LHS of
8491         MODIFY_EXPR.
8493 2016-06-24  Jakub Jelinek  <jakub@redhat.com>
8495         * c-common.c (check_builtin_function_arguments): Require last
8496         argument of BUILT_IN_*_OVERFLOW_P to have INTEGER_TYPE type.
8497         Adjust wording of diagnostics for BUILT_IN_*_OVERLFLOW
8498         if the last argument is pointer to enumerated or boolean type.
8500 2016-06-22  David Malcolm  <dmalcolm@redhat.com>
8502         PR c/70339
8503         * c-common.h (enum lookup_name_fuzzy_kind): New enum.
8504         (lookup_name_fuzzy): New prototype.
8506 2016-06-21  John David Anglin  <danglin@gcc.gnu.org>
8508         * c-common.c (get_source_date_epoch): Use int64_t instead of long long.
8510 2016-06-14  Jason Merrill  <jason@redhat.com>
8512         P0145R2: Refining Expression Order for C++.
8513         * c.opt (fargs-in-order): New.
8514         * c-opts.c (c_common_post_options): Adjust flag_args_in_order.
8516 2016-06-13  Jakub Jelinek  <jakub@redhat.com>
8518         PR sanitizer/71498
8519         * c-gimplify.c (ubsan_walk_array_refs_r): Set *walk_subtrees = 0 on
8520         all BIND_EXPRs, and on all BIND_EXPRs recurse also on BIND_EXPR_BODY.
8522         PR preprocessor/71183
8523         * c-ppoutput.c (init_pp_output): Set cb->get_source_date_epoch
8524         to cb_get_source_date_epoch.
8526 2016-06-10  Jakub Jelinek  <jakub@redhat.com>
8528         PR c/68657
8529         * c.opt (Wpsabi): Add Warning flag.
8531 2016-06-10  Martin Sebor  <msebor@redhat.com>
8533         PR c/71392
8534         * c-common.c (handle_nonnull_attribute): Accept
8535         the nonnull attribute in type-generic builtins.
8537 2016-06-09  Martin Sebor  <msebor@redhat.com>
8539         PR c/70883
8540         * c-common.c (builtin_function_validate_nargs): Make text of error
8541         message consistent with others like it.
8543 2016-06-08  Martin Sebor  <msebor@redhat.com>
8544             Jakub Jelinek  <jakub@redhat.com>
8546         PR c++/70507
8547         PR c/68120
8548         * c-common.c (check_builtin_function_arguments): Handle
8549         BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
8551 2016-06-08  Richard Biener  <rguenther@suse.de>
8553         * c-common.c (parse_optimize_options): Improve diagnostic messages.
8555 2016-06-07  Richard Biener  <rguenther@suse.de>
8557         PR c/61564
8558         * c-common.c (parse_optimize_options): Only apply CL_OPTIMIZATION
8559         options and warn about others.
8561 2016-06-01  Eduard Sanou  <dhole@openmailbox.org>
8563         * c-common.c (get_source_date_epoch): Rename to
8564         cb_get_source_date_epoch.
8565         * c-common.c (cb_get_source_date_epoch): Use a single generic erorr
8566         message when the parsing fails.  Use error_at instead of fatal_error.
8567         * c-common.h (get_source_date_epoch): Rename to
8568         cb_get_source_date_epoch.
8569         * c-common.h (cb_get_source_date_epoch): Prototype.
8570         * c-common.h (MAX_SOURCE_DATE_EPOCH): Define.
8571         * c-common.h (c_omp_region_type): Remove trailing comma.
8572         * c-lex.c (init_c_lex): Set cb->get_source_date_epoch callback.
8573         * c-lex.c (c_lex_with_flags): Remove initialization of
8574         pfile->source_date_epoch.
8576 2016-05-30  Jakub Jelinek  <jakub@redhat.com>
8578         PR c++/71349
8579         * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_DEPEND to
8580         C_OMP_CLAUSE_SPLIT_TARGET.  Put OMP_CLAUSE_NOWAIT to
8581         C_OMP_CLAUSE_SPLIT_TARGET if combined with target construct,
8582         instead of C_OMP_CLAUSE_SPLIT_FOR.
8584 2016-05-24  Richard Biener  <rguenther@suse.de>
8586         PR middle-end/70434
8587         PR c/69504
8588         * c-common.h (convert_vector_to_pointer_for_subscript): Rename to ...
8589         (convert_vector_to_array_for_subscript): ... this.
8590         * c-common.c (convert_vector_to_pointer_for_subscript): Use a
8591         VIEW_CONVERT_EXPR to an array type.  Rename to ...
8592         (convert_vector_to_array_for_subscript): ... this.
8594 2016-05-12  Marek Polacek  <polacek@redhat.com>
8596         PR c/70756
8597         * c-common.c (pointer_int_sum): Call size_in_bytes_loc instead of
8598         size_in_bytes and pass LOC to it.
8600 2016-05-11  Mikhail Maltsev  <maltsevm@gmail.com>
8602         PR c/43651
8603         * c.opt (Wduplicate-decl-specifier): New option.
8605 2016-05-11  Marek Polacek  <polacek@redhat.com>
8607         PR c++/71024
8608         * c-common.c (diagnose_mismatched_attributes): New function.
8609         * c-common.h (diagnose_mismatched_attributes): Declare.
8611 2016-05-04  Marek Polacek  <polacek@redhat.com>
8613         * c.opt (Wdangling-else): New option.
8615 2016-05-03  Marek Polacek  <polacek@redhat.com>
8617         PR c/70859
8618         * c-common.c (builtin_function_validate_nargs): Add location
8619         parameter.  Use it.
8620         (check_builtin_function_arguments): Add location and arguments
8621         parameters.  Use them.
8622         * c-common.h (check_builtin_function_arguments): Update declaration.
8624 2016-05-03  Richard Biener  <rguenther@suse.de>
8626         * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Do not
8627         allow call args to gimplify to SSA names.
8629 2016-05-03  Marek Polacek  <polacek@redhat.com>
8631         * c-common.h (enum c_omp_region_type): Remove stray comma.
8633 2016-05-02  Cesar Philippidis  <cesar@codesourcery.com>
8635         * c-common.h (enum c_omp_region_type): Define.
8637 2016-05-02  Richard Sandiford  <richard.sandiford@arm.com>
8639         * c-common.c (shorten_compare): Use wi::to_wide.
8641 2016-04-29  Cesar Philippidis  <cesar@codesourcery.com>
8643         PR middle-end/70626
8644         * c-common.h (c_oacc_split_loop_clauses): Add boolean argument.
8645         * c-omp.c (c_oacc_split_loop_clauses): Use it to duplicate
8646         reduction clauses in acc parallel loops.
8648 2016-04-29  Marek Polacek  <polacek@redhat.com>
8650         PR c/70852
8651         * c-common.c (warn_for_memset): Check domain before accessing it.
8653 2016-04-29  Dominik Vogt  <vogt@linux.vnet.ibm.com>
8655         PR/69089
8656         * c-common.c (handle_aligned_attribute): Allow 0 as an argument to the
8657         "aligned" attribute.
8659 2016-04-28  Jason Merrill  <jason@redhat.com>
8661         * c-lex.c (c_common_has_attribute): Handle nodiscard.
8663 2016-04-28  Eduard Sanou  <dhole@openmailbox.org>
8664             Matthias Klose  <doko@debian.org>
8666         * c-common.c (get_source_date_epoch): New function, gets the environment
8667         variable SOURCE_DATE_EPOCH and parses it as long long with error
8668         handling.
8669         * c-common.h (get_source_date_epoch): Prototype.
8670         * c-lex.c (c_lex_with_flags): set parse_in->source_date_epoch.
8672 2015-04-27  Ryan Burn  <contact@rnburn.com>
8674         PR c++/69024
8675         PR c++/68997
8676         * cilk.c (cilk_ignorable_spawn_rhs_op): Change to external linkage.
8677         (cilk_recognize_spawn): Renamed from recognize_spawn and change to
8678         external linkage.
8679         (cilk_detect_and_unwrap): Corresponding changes.
8680         (extract_free_variables): Don't extract free variables from
8681         AGGR_INIT_EXPR slot.
8682         * c-common.h (cilk_ignorable_spawn_rhs_op): Prototype.
8683         (cilk_recognize_spawn): Likewise.
8685 2016-04-27  Bernd Schmidt  <bschmidt@redhat.com>
8687         * c.opt (Wmemset-elt-size): New option.
8688         * c-common.c (warn_for_memset): New function.
8689         * c-common.h (warn_for_memset): Declare.
8691 2016-04-25  Jason Merrill  <jason@redhat.com>
8693         * c-common.c (handle_unused_attribute): Accept CONST_DECL.
8694         No longer static.
8695         * c-common.h: Declare it.
8696         * c-lex.c (c_common_has_attribute): Add maybe_unused.
8698 2016-04-22  Jason Merrill  <jason@redhat.com>
8700         * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_range_based_for.
8702 2016-04-20  Ilya Verbin  <ilya.verbin@intel.com>
8704         PR c++/69363
8705         * c-cilkplus.c (c_finish_cilk_clauses): Remove function.
8706         * c-common.h (c_finish_cilk_clauses): Remove declaration.
8708 2016-04-18  Michael Matz  <matz@suse.de>
8710         * c-common.c (handle_aligned_attribute): Use SET_TYPE_ALIGN
8711         and SET_DECL_ALIGN.
8713 2016-04-17  Eric Botcazou  <ebotcazou@adacore.com>
8715         * c-ada-spec.c (get_underlying_decl): Return the typedef, if any.
8716         (dump_generic_ada_node) <POINTER_TYPE>: Clean up handling of access
8717         to incomplete types.
8718         (dump_nested_type): Remove redundant tests and tidy up.
8719         (print_ada_declaration): Also set TREE_VISITED on the declaration of
8720         a type which is the typedef of an original type.
8722 2016-04-15  Marek Polacek  <polacek@redhat.com>
8724         PR c/70651
8725         * c-common.c (build_va_arg): Change two asserts into errors and return
8726         error_mark_node.
8728 2016-04-13  Marek Polacek  <polacek@redhat.com>
8730         PR c++/70639
8731         * c-indentation.c (should_warn_for_misleading_indentation): Bail out
8732         for switch statements, too.
8734 2016-03-28  Jason Merrill  <jason@redhat.com>
8736         * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_range_based_for.
8738 2016-03-23  Marek Polacek  <polacek@redhat.com>
8740         PR c++/69884
8741         * c.opt (Wignored-attributes): New option.
8743 2016-03-22  David Malcolm  <dmalcolm@redhat.com>
8745         PR c/69993
8746         * c-indentation.c (warn_for_misleading_indentation): Rewrite the
8747         diagnostic text, reversing the order of the warning and note so
8748         that they appear in source order.
8750 2016-03-17  Marek Polacek  <polacek@redhat.com>
8752         PR c/69407
8753         * c-common.c (resolve_overloaded_builtin): Set TREE_USED for the fetch
8754         operations.
8756 2016-03-14  Jason Merrill  <jason@redhat.com>
8758         * c-cppbuiltin.c (c_cpp_builtins): Set __cpp_hex_float.
8760         * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_range_based_for.
8762 2016-03-09  Richard Biener  <rguenther@suse.de>
8764         PR c/70143
8765         * c-common.c (strict_aliasing_warning): Add back
8766         alias_sets_conflict_p check.
8768 2016-03-08  Jason Merrill  <jason@redhat.com>
8770         * c-opts.c (set_std_cxx1z): Don't enable concepts.
8772 2016-03-04  David Malcolm  <dmalcolm@redhat.com>
8774         PR c/68187
8775         * c-indentation.c (get_visual_column): Move code to determine next
8776         tab stop to...
8777         (next_tab_stop): ...this new function.
8778         (line_contains_hash_if): Delete function.
8779         (detect_preprocessor_logic): Delete function.
8780         (get_first_nws_vis_column): New function.
8781         (detect_intervening_unindent): New function.
8782         (should_warn_for_misleading_indentation): Replace call to
8783         detect_preprocessor_logic with a call to
8784         detect_intervening_unindent.
8786 2016-03-04  David Malcolm  <dmalcolm@redhat.com>
8788         PR c/68187
8789         * c-indentation.c (should_warn_for_misleading_indentation): When
8790         suppressing warnings about cases where the guard and body are on
8791         the same column, only use the first non-whitespace column in place
8792         of the guard token column when dealing with "else" clauses.
8793         When rejecting aligned BODY and NEXT, loosen the requirement
8794         from equality with the first non-whitespace of guard to simply
8795         that they not be indented relative to it.
8797 2016-03-04  Richard Biener  <rguenther@suse.de>
8799         PR c++/70054
8800         * c-common.c (strict_aliasing_warning): Use alias_set_subset_of
8801         instead of alias_sets_conflict_p.
8803 2016-03-01  Marek Polacek  <polacek@redhat.com>
8805         PR c++/69795
8806         * c-common.c (reject_gcc_builtin): Check for FUNCTION_DECL rather than
8807         any DECL.
8809 2016-02-22  Martin Sebor  <msebor@redhat.com>
8811         PR middle-end/69780
8812         * c-common.c (check_builtin_function_arguments): Validate and
8813         reject invalid arguments to __builtin_alloca_with_align.
8815 2016-02-20  Mark Wielaard  <mjw@redhat.com>
8817         PR c/28901
8818         * c.opt (Wunused-const-variable): Turn into Alias for...
8819         (Wunused-const-variable=): New option.
8821 2016-02-19  Bernd Edlinger  <bernd.edlinger@hotmail.de>
8823         PR c++/69865
8824         * c-opts.c (c_common_post_options): Move call to set_std_cxx14 from
8825         here...
8826         (c_common_init_options): ...to here.
8827         (set_std_cxx98): Initialize flag_isoc94 and flag_isoc99.
8829 2016-02-19  Jakub Jelinek  <jakub@redhat.com>
8831         PR c++/69826
8832         * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_GRAINSIZE.
8833         (init_pragma): Register PRAGMA_CILK_GRAINSIZE even for
8834         flag_preprocess_only.
8836 2016-02-16  Jakub Jelinek  <jakub@redhat.com>
8838         PR c/69835
8839         * c.opt (Wnonnull-compare): Enable for -Wall.
8841 2016-02-15  Jakub Jelinek  <jakub@redhat.com>
8843         PR c++/69797
8844         * c-common.c (sync_resolve_size): Diagnose too few arguments
8845         even when params is non-NULL empty vector.
8847 2016-02-08  Bernd Schmidt  <bschmidt@redhat.com>
8849         PR target/60410
8850         * c.opt (fshort-double): Remove.
8852 2016-02-05  Martin Sebor  <msebor@redhat.com>
8854         PR c++/69662
8855         * c.opt (Warning options): Update -Wplacement-new to take
8856         an optional argument.
8858 2016-02-01  Jakub Jelinek  <jakub@redhat.com>
8860         PR preprocessor/69543
8861         PR c/69558
8862         * c-pragma.c (handle_pragma_diagnostic): Pass input_location
8863         instead of loc to control_warning_option.
8865 2016-02-01  Nathan Sidwell  <nathan@codesourcery.com>
8867         * c.opt (fopenacc-dim=): New option.
8869 2016-01-27  Ryan Burn  <contact@rnburn.com>
8871         PR cilkplus/69267
8872         * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Change to use
8873         gimplify_arg. Removed superfluous post_p argument.
8874         * c-family.h (cilk_gimplify_call_params_in_spawned_fn): Removed
8875         superfluous post_p argument.
8876         * c-gimplify.c (c_gimplify_expr): Likewise.
8878 2016-01-26  David Malcolm  <dmalcolm@redhat.com>
8880         PR other/69006
8881         * c-opts.c (c_diagnostic_finalizer): Replace invocation of
8882         pp_newline_and_flush with pp_flush.
8884 2016-01-20  Martin Sebor  <msebor@redhat.com>
8886         PR c/69405
8887         * c-common.c (sync_resolve_size): Avoid printing diagnostic about
8888         an incompatible argument when the argument isn't a valid tree node.
8890 2016-01-18  Jason Merrill  <jason@redhat.com>
8892         PR c++/68767
8893         * c-common.c (check_function_arguments_recurse): Fold the whole
8894         COND_EXPR, not just the condition.
8896 2016-01-18  Tom de Vries  <tom@codesourcery.com>
8898         * c-omp.c (c_oacc_split_loop_clauses): Don't copy OMP_CLAUSE_REDUCTION,
8899         classify as loop clause.
8901 2016-01-15  Jakub Jelinek  <jakub@redhat.com>
8903         PR bootstrap/68271
8904         * c-pragma.c (c_register_pragma_1): Adjust comment to note that
8905         C++ FE no longer has limit on number of pragmas.
8907 2015-01-14  Ryan Burn  <contact@rnburn.com>
8909         PR c++/69048
8910         * cilk.c (create_cilk_wrapper_body): Call fold_build_cleanup_point_expr
8911         to add missing cleanup point.
8913 2016-01-14  David Malcolm  <dmalcolm@redhat.com>
8915         PR c++/68819
8916         * c-indentation.c (get_visual_column): Add location_t param.
8917         Handle the column number being zero by effectively disabling the
8918         warning, with an "inform".
8919         (should_warn_for_misleading_indentation): Add location_t argument
8920         for all uses of get_visual_column.
8922 2016-01-10  Patrick Palka  <ppalka@gcc.gnu.org>
8924         PR c++/69029
8925         * c-indentation.c (should_warn_for_misleading_indentation):
8926         Don't warn about do-while statements.
8928 2016-01-07  Martin Sebor  <msebor@redhat.com>
8930         PR c/68966
8931         * c-common.c (sync_resolve_size): Reject first argument when it's
8932         a pointer to _Bool.
8934 2016-01-05  David Malcolm  <dmalcolm@redhat.com>
8936         PR c/69122
8937         * c-indentation.c (get_visual_column): Remove default argument.
8938         (should_warn_for_misleading_indentation): For the multiline case,
8939         update call to get_visual_column for next_stmt_exploc so that it
8940         captures the location of the first non-whitespace character in the
8941         relevant line.  Don't issue warnings if there is non-whitespace
8942         before the next statement.
8944 2016-01-04  Jakub Jelinek  <jakub@redhat.com>
8946         Update copyright years.
8948 2015-12-21  David Malcolm  <dmalcolm@redhat.com>
8950         * c-common.c (binary_op_error): Convert first param from
8951         location_t to rich_location * and use it when emitting an error.
8952         * c-common.h (binary_op_error): Convert first param from
8953         location_t to rich_location *.
8955 2015-12-16  David Malcolm  <dmalcolm@redhat.com>
8957         * c-common.h (conflict_marker_get_final_tok_kind): New prototype.
8958         * c-lex.c (conflict_marker_get_final_tok_kind): New function.
8960 2015-12-15  Ilya Verbin  <ilya.verbin@intel.com>
8962         * c-common.c (c_common_attribute_table): Handle "omp declare target
8963         link" attribute.
8965 2015-12-14  Jakub Jelinek  <jakub@redhat.com>
8967         PR c/68833
8968         * c.opt (Wmissing-format-attribute, Wnormalized): Add Warning option.
8970 2014-12-12  Tobias Burnus  <burnus@net-b.de>
8972         PR fortran/68815
8973         * c-format.c (gcc_gfc_char_table): Add 'q' flag to remaining
8974         specifiers (%d, %i,%u and %c).
8976 2015-12-10  David Malcolm  <dmalcolm@redhat.com>
8978         * c.opt (Wmisleading-indentation): Add to -Wall for C and C++.
8980 2015-12-08  Jakub Jelinek  <jakub@redhat.com>
8982         PR c/48088
8983         PR c/68657
8984         * c.opt (Wfloat-conversion, Wsign-conversion): Add Warning.
8985         * c-pragma.c (handle_pragma_diagnostic): Adjust
8986         control_warning_option caller.
8988 2015-12-07  David Malcolm  <dmalcolm@redhat.com>
8990         * c-common.c (c_cpp_error): Update for change to
8991         rich_location::set_range.
8993 2015-12-04  Paolo Bonzini  <bonzini@gnu.org>
8995         * c-common.c (maybe_warn_shift_overflow): Warn on all overflows if
8996         shifting 1 out of the sign bit.
8998 2015-12-04  Kirill Yukhin  <kirill.yukhin@intel.com>
9000         * c-common.c (c_common_attribute_table[]): Update max arguments
9001         count for "simd" attribute.
9002         (handle_simd_attribute): Parse "notinbranch" and "inbranch" arguments.
9004 2015-12-03  Jakub Jelinek  <jakub@redhat.com>
9006         PR preprocessor/57580
9007         * c-ppoutput.c (print): Change printed field to bool.
9008         Move src_file last for smaller padding.
9009         (init_pp_output): Set print.printed to false instead of 0.
9010         (scan_translation_unit): Fix up formatting.  Set print.printed
9011         to true after printing something other than newline.
9012         (scan_translation_unit_trad): Set print.printed to true instead of 1.
9013         (maybe_print_line_1): Set print.printed to false instead of 0.
9014         (print_line_1): Likewise.
9015         (do_line_change): Set print.printed to true instead of 1.
9016         (cb_define, dump_queued_macros, cb_include, cb_def_pragma,
9017         dump_macro): Set print.printed to false after printing newline.
9019 2015-12-02  Jason Merrill  <jason@redhat.com>
9021         * c-common.c (fold_for_warn): New.
9022         (warn_logical_operator, warn_tautological_cmp)
9023         (check_function_arguments_recurse, maybe_warn_bool_compare): Use it.
9025         * c-common.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
9026         (c_fully_fold_internal, decl_constant_value_for_optimization):
9027         Move to c/c-fold.c.
9028         * c-common.h: Don't declare decl_constant_value_for_optimization.
9030 2015-12-02  Joseph Myers  <joseph@codesourcery.com>
9032         PR c/68162
9033         * c-common.h (c_build_qualified_type): Add extra default
9034         arguments.
9036 2015-12-01  Julian Brown  <julian@codesourcery.com>
9037             Cesar Philippidis  <cesar@codesourcery.com>
9038             James Norris  <James_Norris@mentor.com>
9040         * c-pragma.c (oacc_pragmas): Add PRAGMA_OACC_HOST_DATA.
9041         * c-pragma.h (pragma_kind): Add PRAGMA_OACC_HOST_DATA.
9042         (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_USE_DEVICE.
9044 2015-11-30  Eric Botcazou  <ebotcazou@adacore.com>
9046         * c-ada-spec.c (print_ada_macros): Remove redundant blank line.
9047         (decl_sloc_common): Delete and move bulk of processing to...
9048         (decl_sloc): ...here.
9049         (pp_ada_tree_identifier): Remove reference to QUAL_UNION_TYPE.
9050         (dump_ada_double_name): Remove S parameter and compute the suffix.
9051         (dump_ada_array_type): Add PARENT parameter.  Simplify computation of
9052         element type and deal with an anonymous one.
9053         (dump_ada_template): Use RECORD_OR_UNION_TYPE_P macro.
9054         (dump_generic_ada_node): Tweak.  Adjust call to dump_ada_array_type
9055         and remove reference to QUAL_UNION_TYPE.
9056         (dump_nested_types): Make 2 passes on the fields and move bulk to...
9057         (dump_nested_type): ...here.  New function extracted from above.
9058         Generate a full declaration for anonymous element type of arrays.
9059         (print_ada_declaration): Really skip anonymous declarations.  Remove
9060         references to QUAL_UNION_TYPE.  Adjust call to dump_ada_array_type.
9061         Clean up processing of declarations of array types and objects.
9062         (print_ada_struct_decl): Remove reference to QUAL_UNION_TYPE.
9063         Remove obsolete code and tidy up.
9065 2015-11-29  Jan Hubicka  <hubicka@ucw.cz>
9067         PR c/67581
9068         * c-common.c (handle_transparent_union_attribute): Update
9069         also type variants.
9071 2015-11-27  Martin Liska  <mliska@suse.cz>
9073         PR c++/68312
9074         * array-notation-common.c (cilkplus_extract_an_triplets):
9075         Release vector of vectors.
9076         * cilk.c (gimplify_cilk_spawn): Free allocated memory.
9078 2015-11-26  Eric Botcazou  <ebotcazou@adacore.com>
9080         PR c++/68527
9081         * c-ada-spec.c (dump_nested_types): Add guard for error_mark_node.
9082         (print_ada_struct_decl): Likewise.
9084 2015-11-23  Igor Zamyatin  <igor.zamyatin@intel.com>
9086         PR c++/68001
9087         * c-gimplify.c (c_gimplify_expr): Stop the process if see an error.
9088         * cilk.c (recognize_spawn): Determine location in a more precise
9089         way.
9091 2015-11-19  Jason Merrill  <jason@redhat.com>
9093         * c-common.c (shorten_compare): But look through macros from
9094         system headers.
9096 2015-11-18  Jason Merrill  <jason@redhat.com>
9098         * c-common.c (shorten_compare): Don't -Wtype-limits if the
9099         non-constant operand comes from a macro.
9101 2015-11-17  Jason Merrill  <jason@redhat.com>
9103         PR bootstrap/68346
9104         * c-common.c (warn_tautological_cmp): Fold before checking for
9105         constants.
9107 2015-11-16  Marek Polacek  <polacek@redhat.com>
9109         PR c++/68362
9110         * c-common.c (check_case_bounds): Fold low and high cases.
9112 2015-11-16  Marek Polacek  <polacek@redhat.com>
9114         * c-ada-spec.c (dump_ada_template): Use RECORD_OR_UNION_TYPE_P.
9115         * c-common.c (c_common_get_alias_set): Likewise.
9116         (handle_visibility_attribute): Likewise.
9118 2015-11-16  Kirill Yukhin  <kirill.yukhin@intel.com>
9120         * c-common.c (handle_simd_attribute): New.
9121         (struct attribute_spec): Add entry for "simd".
9122         (handle_simd_attribute): New.
9124 2015-11-13  Kai Tietz  <ktietz70@googlemail.com>
9126         * c-lex.c (interpret_float): Use fold_convert.
9128 2015-11-13  David Malcolm  <dmalcolm@redhat.com>
9130         * c-common.c (c_fully_fold_internal): Capture existing souce_range,
9131         and store it on the result.
9132         * c-opts.c (c_common_init_options): Set
9133         global_dc->colorize_source_p.
9135 2015-11-12  James Norris  <jnorris@codesourcery.com>
9136             Joseph Myers  <joseph@codesourcery.com>
9138         * c-pragma.c (oacc_pragmas): Add entry for declare directive.
9139         * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_DECLARE.
9140         (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT and
9141         PRAGMA_OACC_CLAUSE_LINK.
9143 2015-11-11  Marek Polacek  <polacek@redhat.com>
9145         PR c/68107
9146         PR c++/68266
9147         * c-common.c (valid_array_size_p): New function.
9148         * c-common.h (valid_array_size_p): Declare.
9150 2015-11-11  Dominique d'Humieres  <dominiq@lps.ens.fr>
9152         PR bootstrap/68271
9153         * c-pragma.c (c_register_pragma_1): Update the gcc_assert to 256.
9155 2015-11-11  Andrew MacLeod  <amacleod@redhat.com>
9157         * array-notation-common.c: Remove unused header files.
9158         * c-ada-spec.c: Likewise.
9159         * c-cilkplus.c: Likewise.
9160         * c-common.c: Likewise.
9161         * c-cppbuiltin.c: Likewise.
9162         * c-dump.c: Likewise.
9163         * c-format.c: Likewise.
9164         * c-gimplify.c: Likewise.
9165         * c-indentation.c: Likewise.
9166         * c-lex.c: Likewise.
9167         * c-omp.c: Likewise.
9168         * c-opts.c: Likewise.
9169         * c-pch.c: Likewise.
9170         * c-ppoutput.c: Likewise.
9171         * c-pragma.c: Likewise.
9172         * c-pretty-print.c: Likewise.
9173         * c-semantics.c: Likewise.
9174         * c-ubsan.c: Likewise.
9175         * cilk.c: Likewise.
9176         * stub-objc.c: Likewise.
9178 2015-11-09  Thomas Schwinge  <thomas@codesourcery.com>
9179             Cesar Philippidis  <cesar@codesourcery.com>
9180             James Norris  <jnorris@codesourcery.com>
9181             Julian Brown  <julian@codesourcery.com>
9182             Nathan Sidwell  <nathan@codesourcery.com>
9184         * c-pragma.c (oacc_pragmas): Add "routine".
9185         * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ROUTINE.
9187 2015-11-08  Eric Botcazou  <ebotcazou@adacore.com>
9189         * c-common.c (c_common_attributes): Add scalar_storage_order.
9190         (handle_scalar_storage_order_attribute): New function.
9191         * c-pragma.c (global_sso): New variable.
9192         (maybe_apply_pragma_scalar_storage_order): New function.
9193         (handle_pragma_scalar_storage_order): Likewise.
9194         (init_pragma): Register scalar_storage_order.
9195         * c-pragma.h (maybe_apply_pragma_scalar_storage_order): Declare.
9196         * c.opt (Wscalar-storage-order): New warning.
9197         (fsso-struct=): New option.
9199 2015-11-08  Martin Sebor  <msebor@redhat.com>
9201         * c.opt (Wplacement-new): Add a period to the end of a sentence.
9203 2015-11-07  Richard Sandiford  <richard.sandiford@arm.com>
9205         * c-common.c: Don't undef DEF_BUILTIN.
9207 2015-11-06  David Malcolm  <dmalcolm@redhat.com>
9209         * c-common.c (c_cpp_error): Convert parameter from location_t to
9210         rich_location *.  Eliminate the "column_override" parameter and
9211         the call to diagnostic_override_column.
9212         Update the "done_lexing" clause to set range 0
9213         on the rich_location, rather than overwriting a location_t.
9214         * c-common.h (c_cpp_error): Convert parameter from location_t to
9215         rich_location *.  Eliminate the "column_override" parameter.
9217 2015-11-05  Cesar Philippidis  <cesar@codesourcery.com>
9218             Thomas Schwinge  <thomas@codesourcery.com>
9219             James Norris  <jnorris@codesourcery.com>
9221         * c-omp.c (c_oacc_split_loop_clauses): Make TILE, GANG, WORKER, VECTOR,
9222         AUTO, SEQ, INDEPENDENT and PRIVATE loop clauses.  Associate REDUCTION
9223         clauses with parallel and kernels and loops.
9224         * c-pragma.h (enum pragma_omp_clause): Add entries for
9225         PRAGMA_OACC_CLAUSE_{INDEPENDENT,TILE,DEFAULT}.
9226         * pt.c (tsubst_omp_clauses): Add support for OMP_CLAUSE_{NUM_GANGS,
9227         NUM_WORKERS,VECTOR_LENGTH,GANG,WORKER,VECTOR,ASYNC,WAIT,TILE,AUTO,
9228         INDEPENDENT,SEQ}.
9229         (tsubst_expr): Add support for OMP_CLAUSE_{KERNELS,PARALLEL,LOOP}.
9231 2015-11-05  Martin Sebor  <msebor@redhat.com>
9233         PR c++/67942
9234         * c.opt (-Wplacement-new): New option.
9236 2015-11-05  Jakub Jelinek  <jakub@redhat.com>
9238         * c-common.h (c_finish_omp_atomic): Add TEST argument.
9239         (c_omp_check_loop_iv, c_omp_check_loop_iv_exprs): New prototypes.
9240         * c-omp.c (c_finish_omp_atomic): Add TEST argument.  Don't call
9241         save_expr or create_tmp_var* if TEST is true.
9242         (c_finish_omp_for): Store OMP_FOR_ORIG_DECLS always.
9243         Don't call add_stmt here.
9244         (struct c_omp_check_loop_iv_data): New type.
9245         (c_omp_check_loop_iv_r, c_omp_check_loop_iv,
9246         c_omp_check_loop_iv_exprs): New functions.
9247         (c_omp_split_clauses): Adjust for lastprivate being allowed on
9248         distribute.
9249         (c_omp_declare_simd_clauses_to_numbers): Change
9250         OMP_CLAUSE_LINEAR_VARIABLE_STRIDE OMP_CLAUSE_LINEAR_STEP into numbers.
9251         (c_omp_declare_simd_clauses_to_decls): Similarly change those
9252         from numbers to PARM_DECLs.
9254 2015-11-04  Mikhail Maltsev  <maltsevm@gmail.com>
9256         * c-omp.c (c_omp_split_clauses): Remove conditional compilation. Use
9257         flag_checking.
9259 2015-11-03  Bernd Schmidt  <bschmidt@redhat.com>
9261         PR c++-common/67882
9262         * c-common.h (fold_offsetof_1): Add argument.
9263         * c-common.c (fold_offsetof_1): Diagnose more invalid
9264         offsetof expressions that reference elements past the end of
9265         an array.
9267 2015-11-03  Thomas Schwinge  <thomas@codesourcery.com>
9268             Chung-Lin Tang  <cltang@codesourcery.com>
9270         * c-pragma.c (oacc_pragmas): Add "atomic".
9271         * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ATOMIC.
9273 2015-10-30  Evgeny Stupachenko  <evstupac@gmail.com>
9275         * c-common.c (handle_target_clones_attribute): New.
9276         (c_common_attribute_table): Add handle_target_clones_attribute.
9277         (handle_always_inline_attribute): Add check on target_clones attribute.
9278         (handle_target_attribute): Ditto.
9280 2015-10-29  Andrew MacLeod  <amacleod@redhat.com>
9282         * array-notation-common.c: Reorder #include's and remove duplicates.
9283         * c-ada-spec.c: Likewise.
9284         * c-cilkplus.c: Likewise.
9285         * c-common.c: Likewise.
9286         * c-cppbuiltin.c: Likewise.
9287         * c-dump.c: Likewise.
9288         * c-format.c: Likewise.
9289         * c-gimplify.c: Likewise.
9290         * c-indentation.c: Likewise.
9291         * c-lex.c: Likewise.
9292         * c-omp.c: Likewise.
9293         * c-opts.c: Likewise.
9294         * c-pch.c: Likewise.
9295         * c-ppoutput.c: Likewise.
9296         * c-pragma.c: Likewise.
9297         * c-pretty-print.c: Likewise.
9298         * c-semantics.c: Likewise.
9299         * c-ubsan.c: Likewise.
9300         * cilk.c: Likewise.
9301         * stub-objc.c: Likewise.
9303 2015-10-28  Jason Merrill  <jason@redhat.com>
9305         * c-common.c (pointer_int_sum): Fold the MULT_EXPR.
9307 2015-10-27  Thomas Schwinge  <thomas@codesourcery.com>
9308             James Norris  <jnorris@codesourcery.com>
9309             Cesar Philippidis  <cesar@codesourcery.com>
9311         PR c/64765
9312         PR c/64880
9313         * c-common.h (c_oacc_split_loop_clauses): Declare function.
9314         * c-omp.c (c_oacc_split_loop_clauses): New function.
9316 2015-10-21  Martin Sebor  <msebor@redhat.com>
9318         PR driver/68043
9319         * c.opt: End each sentence that describes an option with a period.
9321 2015-10-20  Marek Polacek  <polacek@redhat.com>
9323         * array-notation-common.c (is_cilkplus_vector_p): Define.
9324         * c-common.h (is_cilkplus_vector_p): Declare.
9326 2015-10-20  Marek Polacek  <polacek@redhat.com>
9328         * c.opt (std=gnu++11): Do not describe as experimental.
9329         (std=gnu++14): Likewise.
9331 2015-10-19  Jason Merrill  <jason@redhat.com>
9333         * c-cppbuiltin.c (c_cpp_builtins): Define
9334         __cpp_nontype_template_args.
9336 2015-10-19  Jason Merrill  <jason@redhat.com>
9338         * c-cppbuiltin.c (c_cpp_builtins): Define
9339         __cpp_enumerator_attributes, __cpp_fold_expressions,
9340         __cpp_unicode_characters.
9342 2015-10-13  Jakub Jelinek  <jakub@redhat.com>
9343             Aldy Hernandez  <aldyh@redhat.com>
9345         * c-common.c (enum c_builtin_type): Define DEF_FUNCTION_TYPE_9,
9346         DEF_FUNCTION_TYPE_10 and DEF_FUNCTION_TYPE_11.
9347         (c_define_builtins): Likewise.
9348         * c-common.h (enum c_omp_clause_split): Add
9349         C_OMP_CLAUSE_SPLIT_TASKLOOP.
9350         (c_finish_omp_critical, c_finish_omp_ordered): Add CLAUSES argument.
9351         (c_finish_omp_for): Add ORIG_DECLV argument.
9352         * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP as
9353         201511 instead of 201307.
9354         * c-omp.c (c_finish_omp_critical): Add CLAUSES argument, set
9355         OMP_CRITICAL_CLAUSES to it.
9356         (c_finish_omp_ordered): Add CLAUSES argument, set
9357         OMP_ORDERED_CLAUSES to it.
9358         (c_finish_omp_for): Add ORIG_DECLV argument, set OMP_FOR_ORIG_DECLS
9359         to it if OMP_FOR.  Clear DECL_INITIAL on the IVs.
9360         (c_omp_split_clauses): Handle OpenMP 4.5 combined/composite
9361         constructs and new OpenMP 4.5 clauses.  Clear
9362         OMP_CLAUSE_SCHEDULE_SIMD if not combined with OMP_SIMD.  Add
9363         verification code.
9364         * c-pragma.c (omp_pragmas_simd): Add taskloop.
9365         * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKLOOP.
9366         (enum pragma_omp_clause): Add
9367         PRAGMA_OMP_CLAUSE_{DEFAULTMAP,GRAINSIZE,HINT,{IS,USE}_DEVICE_PTR}
9368         and PRAGMA_OMP_CLAUSE_{LINK,NOGROUP,NUM_TASKS,PRIORITY,SIMD,THREADS}.
9370 2015-10-05  Richard Sandiford  <richard.sandiford@arm.com>
9372         * c-lex.c (interpret_float): Use real_equal instead of
9373         REAL_VALUES_EQUAL.
9375 2015-10-04  Jason Merrill  <jason@redhat.com>
9377         Implement N4514, C++ Extensions for Transactional Memory.
9378         * c-common.c (c_common_reswords): Add C++ TM TS keywords.
9379         (c_common_attribute_table): Add transaction_safe_dynamic.
9380         transaction_safe now affects type identity.
9381         (handle_tm_attribute): Handle transaction_safe_dynamic.
9382         * c-common.h (enum rid): Add RID_ATOMIC_NOEXCEPT,
9383         RID_ATOMIC_CANCEL, RID_SYNCHRONIZED.
9384         (OBJC_IS_CXX_KEYWORD): Add RID_SYNCHRONIZED.
9385         (D_TRANSMEM): New.
9386         * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_transactional_memory.
9387         * c-pretty-print.c (pp_c_attributes_display): Don't print
9388         transaction_safe in C++.
9390 2015-10-02  Marek Polacek  <polacek@redhat.com>
9392         * c.opt (Wduplicated-cond): Don't enable by -Wall anymore.
9394 2015-10-02  Marek Polacek  <polacek@redhat.com>
9396         PR c/64249
9397         * c-common.c (warn_duplicated_cond_add_or_warn): New function.
9398         * c-common.h (warn_duplicated_cond_add_or_warn): Declare.
9399         * c.opt (Wduplicated-cond): New option.
9401 2015-10-01  Joseph Myers  <joseph@codesourcery.com>
9403         * c.opt (std=c11): Do not describe as experimental.
9404         (std=gnu11): Likewise.
9405         (std=iso9899:2011): Likewise.
9407 2015-09-28  Nathan Sidwell  <nathan@codesourcery.com>
9409         * c-common.c (DEF_FUNCTION_TYPE_VAR_6): New.
9410         (DEF_FUNCTION_TYPE_VAR_11): Delete.
9412 2015-09-25  Marek Polacek  <polacek@redhat.com>
9414         * c-ubsan.c (ubsan_instrument_division): Remove unnecessary code.
9415         (ubsan_instrument_shift): Likewise.
9417 2015-09-25  Marek Polacek  <polacek@redhat.com>
9419         PR sanitizer/64906
9420         * c-ubsan.c (ubsan_instrument_division): Also pre-evaluate OP1.
9422 2015-09-24  Patrick Palka  <ppalka@gcc.gnu.org>
9424         * c-indentation.c (should_warn_for_misleading_indentation):
9425         Compare next_stmt_vis_column with guard_line_first_nws instead
9426         of with guard_line_vis_column.
9428 2015-09-23  Manuel López-Ibáñez  <manu@gcc.gnu.org>
9430         PR c/49654
9431         PR c/49655
9432         * c-pragma.c (handle_pragma_diagnostic): Detect non-warning
9433         options and options not valid for the current language.
9435 2015-09-22  Patrick Palka  <ppalka@gcc.gnu.org>
9437         * c-indentation.c (should_warn_for_misleading_indentation):
9438         Float out and consolidate the calls to get_visual_column that
9439         are passed guard_exploc as an argument.  Compare
9440         next_stmt_vis_column with guard_line_first_nws instead of with
9441         body_line_first_nws.
9443 2015-09-22  Nathan Sidwell  <nathan@codesourcery.com>
9445         * c.opt (Wmultiple-inheritance, Wvirtual-inheritance, Wtemplates,
9446         Wnamespaces): New C++ warnings.
9448 2015-09-22  Jason Merrill  <jason@redhat.com>
9450         * c-common.h (abi_compat_version_crosses): New.
9451         (warn_abi_version): Declare.
9452         * c-common.c: Define it.
9453         * c-opts.c (c_common_post_options): Handle it.
9454         flag_abi_compat_version defaults to 8.
9456 2015-09-21  Ville Voutilainen  <ville.voutilainen@gmail.com>
9458         Complete the implementation of N4230, Nested namespace definition.
9459         * c-cppbuiltin.c: Add __cpp_namespace_attributes and
9460         __cpp_nested_namespace_definitions.
9462 2015-09-18  Manuel López-Ibáñez  <manu@gcc.gnu.org>
9464         * c-pragma.c (handle_pragma_diagnostic): Fix wrong return.
9466 2015-09-18  Manuel López-Ibáñez  <manu@gcc.gnu.org>
9468         * c-pragma.c (handle_pragma_diagnostic): Use explicit location
9469         when warning.
9470         * c-pragma.h (pragma_lex): Add optional loc argument.
9472 2015-09-16  Mikhail Maltsev  <maltsevm@gmail.com>
9474         * c-format.c (check_format_arg): Adjust to use common block size in all
9475         object pools.
9477 2015-09-15  David Malcolm  <dmalcolm@redhat.com>
9479         * c-format.c (location_from_offset): Update for change in
9480         signature of location_get_source_line.
9481         * c-indentation.c (get_visual_column): Likewise.
9482         (line_contains_hash_if): Likewise.
9484 2015-09-14  Marek Polacek  <polacek@redhat.com>
9486         * c-opts.c (c_common_post_options): Set C++ standard earlier, before
9487         setting various warnings.
9489 2015-09-14  Marek Polacek  <polacek@redhat.com>
9491         * c-common.c (warn_for_sign_compare): Cast to unsigned when shifting
9492         a negative value.
9494 2015-09-11  Mark Wielaard  <mjw@redhat.com>
9496         PR c/28901
9497         * c.opt (Wunused-variable): Option from common.opt.
9498         (Wunused-const-variable): New option.
9500 2015-09-09  Paolo Carlini  <paolo.carlini@oracle.com>
9502         PR c++/53184
9503         * c.opt ([Wsubobject-linkage]): Add.
9505 2015-09-03  Martin Sebor  <msebor@redhat.com>
9507         PR c/66516
9508         * c-common.h (c_decl_implicit, reject_gcc_builtin): Declare new
9509         functions.
9510         * c-common.c (reject_gcc_builtin): Define.
9512 2015-09-02  Balaji V. Iyer  <balaji.v.iyer@intel.com>
9514         PR middle-end/60586
9515         * c-common.h (cilk_gimplify_call_params_in_spawned_fn): New
9516         prototype.
9517         * c-gimplify.c (c_gimplify_expr): Added a call to the function
9518         cilk_gimplify_call_params_in_spawned_fn.
9519         * cilk.c (cilk_gimplify_call_params_in_spawned_fn): New function.
9520         (gimplify_cilk_spawn): Removed EXPR_STMT and CLEANUP_POINT_EXPR
9521         unwrapping.
9523 2015-08-25  Marek Polacek  <polacek@redhat.com>
9525         PR middle-end/67330
9526         * c-common.c (handle_weak_attribute): Don't check whether the
9527         visibility can be changed here.
9529 2015-08-22  Manuel López-Ibáñez  <manu@gcc.gnu.org>
9531         * c-lex.c (c_lex_with_flags): Use explicit locations.
9533 2015-08-18  Trevor Saunders  <tbsaunde@tbsaunde.org>
9535         * c-ada-spec.h, c-common.c, c-common.h, c-format.c, c-format.h,
9536         c-objc.h, c-ppoutput.c, c-pragma.c, c-pragma.h: Remove useless
9538 2015-08-18  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
9540         PR middle-end/36757
9541         * c-common.c (check_builtin_function_arguments): Add check
9542         for BUILT_IN_SIGNBIT argument.
9544 2015-08-18  Paolo Carlini  <paolo.carlini@oracle.com>
9546         PR c++/67160
9547         * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_static_assert value
9548         in c++1z mode.
9550 2015-08-17  Marek Polacek  <polacek@redhat.com>
9552         * c-pretty-print.c (pp_c_cv_qualifiers): Remove code dealing
9553         with whitespaces before qualifier names.
9555 2015-08-12  Marek Polacek  <polacek@redhat.com>
9557         PR c++/55095
9558         * c-common.c (maybe_warn_shift_overflow): Properly handle
9559         left-shifting 1 into the sign bit.
9561 2015-08-09  Manuel López-Ibáñez  <manu@gcc.gnu.org>
9563         * c.opt (Wchkp): Use LangEnabledBy instead of EnabledBy.
9565 2015-08-06  Andrew Sutton  <andrew.n.sutton@gmail.com>
9566             Braden Obrzut  <admin@maniacsvault.net>
9567             Jason Merrill  <jason@redhat.com>
9569         Add C++ Concepts TS support.
9570         * c-common.c (c_common_reswords): Add __is_same_as, concept, requires.
9571         * c-common.h (enum rid): Add RID_IS_SAME_AS, RID_CONCEPT, RID_REQUIRES.
9572         (D_CXX_CONCEPTS, D_CXX_CONCEPTS_FLAGS): New.
9573         * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_concepts.
9574         * c-opts.c (set_std_cxx1z): Set flag_concepts.
9575         * c.opt (fconcepts): New.
9577 2015-08-02  Martin Sebor  <msebor@redhat.com>
9579         * c.opt (-Wframe-address): New warning option.
9581 2015-08-02  Patrick Palka  <ppalka@gcc.gnu.org>
9583         * c-indentation.c (should_warn_for_misleading_indentation):
9584         Improve heuristics.
9586 2015-08-02  Patrick Palka  <ppalka@gcc.gnu.org>
9588         * c-indentation.c (get_visual_column): Add parameter first_nws,
9589         use it.  Update comment documenting the function.
9590         (is_first_nonwhitespace_on_line): Remove.
9591         (should_warn_for_misleading_indentation): Replace usage of
9592         of is_first_nonwhitespace_on_line with get_visual_column.
9594 2015-08-02  Patrick Palka  <ppalka@gcc.gnu.org>
9596         * c-indentation.h (struct token_indent_info): Define.
9597         (get_token_indent_info): Define.
9598         (warn_for_misleading_information): Declare.
9599         * c-common.h (warn_for_misleading_information): Remove.
9600         * c-identation.c (warn_for_misleading_indentation):
9601         Change declaration to take three token_indent_infos.  Adjust
9602         accordingly.
9603         * c-identation.c (should_warn_for_misleading_indentation):
9604         Likewise.  Bail out early if the body is a compound statement.
9605         (guard_tinfo_to_string): Define.
9607 2015-07-30  Jason Merrill  <jason@redhat.com>
9609         * c-pretty-print.c (unary_expression) [INDIRECT_REF]: Don't print
9610         '*' for reference decay.
9612 2015-07-30  Marek Polacek  <polacek@redhat.com>
9614         * c-common.c (warn_tautological_cmp): Bail for float types.
9616 2015-07-27  Marek Polacek  <polacek@redhat.com>
9618         PR bootstrap/67030
9619         * c-common.c (warn_tautological_cmp): Don't warn for macro expansion.
9621 2015-07-27  Marek Polacek  <polacek@redhat.com>
9623         PR c++/66555
9624         PR c/54979
9625         * c-common.c (find_array_ref_with_const_idx_r): New function.
9626         (warn_tautological_cmp): New function.
9627         * c-common.h (warn_tautological_cmp): Declare.
9628         * c.opt (Wtautological-compare): New option.
9630 2015-07-23  Marek Polacek  <polacek@redhat.com>
9632         * c-ubsan.c (ubsan_instrument_division): Use unshare_expr throughout.
9633         (ubsan_instrument_shift): Likewise.
9635 2015-07-23  Marek Polacek  <polacek@redhat.com>
9637         PR sanitizer/66908
9638         * c-ubsan.c: Include gimplify.h.
9639         (ubsan_instrument_division): Unshare OP0 and OP1.
9640         (ubsan_instrument_shift): Likewise.
9642 2015-07-20  Marek Polacek  <polacek@redhat.com>
9643             Richard Sandiford  <richard.sandiford@arm.com>
9645         PR c++/55095
9646         * c-common.c (c_fully_fold_internal): Warn about left shift overflows.
9647         Use EXPR_LOC_OR_LOC.
9648         (maybe_warn_shift_overflow): New function.
9649         * c-common.h (maybe_warn_shift_overflow): Declare.
9650         * c-opts.c (c_common_post_options): Set warn_shift_overflow.
9651         * c.opt (Wshift-overflow): New option.
9653 2015-07-16  Martin Liska  <mliska@suse.cz>
9655         * c-format.c (static void check_format_info_main): Use
9656         object_allocator instead of pool_allocator.
9657         (check_format_arg): Likewise.
9658         (check_format_info_main): Likewise.
9660 2015-07-15  Andrew MacLeod  <amacleod@redhat.com>
9662         * c-opts.c: Remove multiline #include comment.
9664 2015-07-12  Aldy Hernandez  <aldyh@redhat.com>
9666         * c-common.c: Fix double word typos.
9668 2015-07-10  Eric Botcazou  <ebotcazou@adacore.com>
9670         * c-ada-spec.h (cpp_operation): Revert latest change.
9671         * c-ada-spec.c (print_ada_declaration): Likewise.  Skip implicit
9672         constructors and destructors.
9674 2015-07-09  Andrew MacLeod  <amacleod@redhat.com>
9676         * c-common.h: Adjust includes for flags.h changes.
9677         * stub-objc.c: Likewise.
9679 2015-07-08  Eric Botcazou  <ebotcazou@adacore.com>
9681         * c-ada-spec.h (cpp_operation): Add IS_CONSTEXPR.
9682         * c-ada-spec.c (print_ada_declaration): Skip constexpr constructors.
9684 2015-07-08  Jakub Jelinek  <jakub@redhat.com>
9686         * c-omp.c (c_omp_declare_simd_clauses_to_numbers): If all clauses
9687         are to be removed, return NULL rather than original clauses list.
9689 2015-07-07  Andrew MacLeod  <amacleod@redhat.com>
9691         * array-notation-common.c: Adjust includes.
9692         * c-ada-spec.c: Likewise.
9693         * c-cilkplus.c: Likewise.
9694         * c-common.h: Likewise.
9695         * c-cppbuiltin.c: Likewise.
9696         * c-dump.c: Likewise.
9697         * c-format.c: Likewise.
9698         * c-gimplify.c: Likewise.
9699         * c-indentation.c: Likewise.
9700         * c-lex.c: Likewise.
9701         * c-omp.c: Likewise.
9702         * c-opts.c: Likewise.
9703         * c-pch.c: Likewise.
9704         * c-ppoutput.c: Likewise.
9705         * c-pragma.c: Likewise.
9706         * c-pretty-print.c: Likewise.
9707         * c-semantics.c: Likewise.
9708         * c-ubsan.c: Likewise.
9709         * cilk.c: Likewise.
9710         * stub-objc.c: Likewise.
9712 2015-07-07  Eric Botcazou  <ebotcazou@adacore.com>
9714         * c-ada-spec.h (cpp_operation): Add IS_MOVE_CONSTRUCTOR.
9715         * c-ada-spec.c (print_ada_declaration): Skip move constructors.
9717 2015-07-01  Jason Merrill  <jason@redhat.com>
9719         * c-common.h (D_CXX11): Rename from D_CXX0X.
9720         (RID_FIRST_CXX11, RID_LAST_CXX11): Rename from *_CXX0X.
9721         * c-common.c: Adjust.
9723         * c-opts.c (c_common_post_options): Default to C++14.
9725         * c-opts.c (c_common_post_options): Highest ABI level is now 10.
9727 2015-06-30  Edward Smith-Rowland  <3dw4rd@verizon.net>
9729         Implement N4197 - Adding u8 character literals
9730         * c-ada-spec.c (print_ada_macros): Treat CPP_UTF8CHAR like
9731         CPP_CHAR.
9732         * c-common.c (c_parse_error): Print CPP_UTF8CHAR and
9733         CPP_UTF8CHAR_USERDEF tokens.
9734         * c-lex.c (c_lex_with_flags): Treat CPP_UTF8CHAR_USERDEF
9735         and CPP_UTF8CHAR tokens.
9736         (lex_charconst): Treat CPP_UTF8CHAR token.
9738 2015-06-29  Manuel López-Ibáñez  <manu@gcc.gnu.org>
9740         PR fortran/66605
9741         * c-common.c (do_warn_unused_parameter): Move here.
9742         * c-common.h (do_warn_unused_parameter): Declare.
9744 2015-06-29  Marek Polacek  <polacek@redhat.com>
9746         PR c/66322
9747         * c-common.c (check_case_bounds): Add bool * parameter.  Set
9748         OUTSIDE_RANGE_P.
9749         (c_add_case_label): Add bool * parameter.  Pass it down to
9750         check_case_bounds.
9751         (c_do_switch_warnings): Add bool parameters.  Implement -Wswitch-bool
9752         warning here.
9753         * c-common.h (c_add_case_label, c_do_switch_warnings): Update
9754         declarations.
9756 2015-06-27  Marek Polacek  <polacek@redhat.com>
9758         * c-common.c (check_main_parameter_types): Use VECTOR_TYPE_P
9759         or VECTOR_INTEGER_TYPE_P throughout.
9760         * c-gimplify.c: Likewise.
9762 2015-06-26  Marek Polacek  <polacek@redhat.com>
9764         * array-notation-common.c (find_rank): Use INDIRECT_REF_P.
9765         * c-common.c (c_fully_fold_internal): Likewise.
9766         (c_alignof_expr): Likewise.
9767         * c-pretty-print.c (c_pretty_printer::postfix_expression): Likewise.
9768         * c-ubsan.c (ubsan_instrument_bounds): Likewise.
9769         * cilk.c (create_parm_list): Likewise.
9771 2015-06-26  Marek Polacek  <polacek@redhat.com>
9773         * c-common.c (handle_unused_attribute): Use VAR_OR_FUNCTION_DECL_P.
9775 2015-06-25  Andrew MacLeod  <amacleod@redhat.com>
9777         * c-common.c: Remove ipa-ref.h and plugin-api.h from include list.
9778         * c-gimplify.c: Likewise.
9779         * c-pragma.c: Likewise.
9780         * c-ubsan.c: Likewise.
9781         * cilk.c: Likewise.
9783 2015-06-25  Richard Sandiford  <richard.sandiford@arm.com>
9785         * c-common.c (c_type_hasher): Inherit from ggc_ptr_hash rather than
9786         ggc_hasher.
9788 2015-06-25  Andrew MacLeod  <amacleod@redhat.com>
9790         * cilk.c: Move calls.h after tm.h in the include chain.
9792 2015-06-25  Marek Polacek  <polacek@redhat.com>
9794         * array-notation-common.c: Use VAR_P throughout.
9795         * c-ada-spec.c: Likewise.
9796         * c-common.c: Likewise.
9797         * c-format.c: Likewise.
9798         * c-gimplify.c: Likewise.
9799         * c-omp.c: Likewise.
9800         * c-pragma.c: Likewise.
9801         * c-pretty-print.c: Likewise.
9802         * cilk.c: Likewise.
9804 2015-06-25  Marek Polacek  <polacek@redhat.com>
9806         * cilk.c (extract_free_variables): Use is_global_var.
9808 2015-06-23  Richard Sandiford  <richard.sandiford@arm.com>
9810         * c-common.c: Don't include target-def.h.
9812 2015-06-23  Marek Polacek  <polacek@redhat.com>
9814         * c-common.c (warn_logical_operator): Use tree_int_cst_equal
9815         when comparing INTEGER_CSTs.
9817 2015-06-22  Pierre-Marie de Rodat  <derodat@adacore.com>
9819         * c-ada-spec.h (cpp_operation): Add HAS_DEPENDENT_TEMPLATE_ARGS.
9820         * c-ada-spec.c (collect_ada_nodes): Skip NAMESPACE_DECL
9821         (dump_ada_template): Skip partially specialized types.
9823 2015-06-22  Mikhail Maltsev  <maltsevm@gmail.com>
9825         * c-common.c (scalar_to_vector): Use std::swap instead of manually
9826         swapping.
9828 2015-06-17  Andrew MacLeod  <amacleod@redhat.com>
9830         * array-notation-common.c: Do not include input.h, line-map.h or is-a.h.
9831         * c-ada-spec.c: Likewise.
9832         * c-cilkplus.c: Likewise.
9833         * c-common.c: Likewise.
9834         * c-common.h: Likewise.
9835         * c-cppbuiltin.c: Likewise.
9836         * c-dump.c: Likewise.
9837         * c-format.c: Likewise.
9838         * c-gimplify.c: Likewise.
9839         * c-indentation.c: Likewise.
9840         * c-lex.c: Likewise.
9841         * c-omp.c: Likewise.
9842         * c-opts.c: Likewise.
9843         * c-pch.c: Likewise.
9844         * c-ppoutput.c: Likewise.
9845         * c-pragma.c: Likewise.
9846         * c-pretty-print.c: Likewise.
9847         * c-semantics.c: Likewise.
9848         * c-ubsan.c: Likewise.
9849         * cilk.c: Likewise.
9850         * stub-objc.c: Likewise.
9852 2015-06-13  Patrick Palka  <ppalka@gcc.gnu.org>
9854         PR c++/65168
9855         * c-common.c (c_common_truthvalue_conversion): Warn when
9856         converting an address of a reference to a truth value.
9858 2015-06-08  Andrew MacLeod  <amacleod@redhat.com>
9860         * array-notation-common.c : Adjust include files.
9861         * c-ada-spec.c : Likewise.
9862         * c-cilkplus.c : Likewise.
9863         * c-common.c : Likewise.
9864         * c-common.h : Likewise.
9865         * c-cppbuiltin.c : Likewise.
9866         * c-dump.c : Likewise.
9867         * c-format.c : Likewise.
9868         * c-gimplify.c : Likewise.
9869         * c-indentation.c : Likewise.
9870         * c-lex.c : Likewise.
9871         * c-omp.c : Likewise.
9872         * c-opts.c : Likewise.
9873         * c-pch.c : Likewise.
9874         * c-ppoutput.c : Likewise.
9875         * c-pragma.c : Likewise.
9876         * c-pretty-print.c : Likewise.
9877         * c-semantics.c : Likewise.
9878         * c-ubsan.c : Likewise.
9879         * cilk.c : Likewise.
9880         * stub-objc.c : Likewise.
9882 2015-06-08  Marek Polacek  <polacek@redhat.com>
9884         PR c/66415
9885         * c-format.c (location_from_offset): Return LOC if LINE is null.
9887 2015-06-05  Aldy Hernandez  <aldyh@redhat.com>
9889         * c-common.h (c_parse_final_cleanups): New prototype.
9890         * c-opts.c (c_common_parse_file): Call c_parse_final_cleanups.
9892 2015-06-04  Sriraman Tallam  <tmsriram@google.com>
9894         * c-common.c (noplt): New attribute.
9895         (handle_noplt_attribute): New handler.
9897 2015-06-04  Andrew MacLeod  <amacleod@redhat.com>
9899         * array-notation-common.c: Adjust includes for restructured coretypes.h.
9900         * c-ada-spec.c: Likewise.
9901         * c-cilkplus.c: Likewise.
9902         * c-common.c: Likewise.
9903         * c-common.h: Likewise.
9904         * c-cppbuiltin.c: Likewise.
9905         * c-dump.c: Likewise.
9906         * c-format.c: Likewise.
9907         * c-gimplify.c: Likewise.
9908         * c-indentation.c: Likewise.
9909         * c-lex.c: Likewise.
9910         * c-omp.c: Likewise.
9911         * c-opts.c: Likewise.
9912         * c-pch.c: Likewise.
9913         * c-ppoutput.c: Likewise.
9914         * c-pragma.c: Likewise.
9915         * c-pretty-print.c: Likewise.
9916         * c-semantics.c: Likewise.
9917         * c-ubsan.c: Likewise.
9918         * cilk.c: Likewise.
9919         * stub-objc.c: Likewise.
9921 2015-06-02  David Malcolm  <dmalcolm@redhat.com>
9923         PR c/66220:
9924         * c-indentation.c (should_warn_for_misleading_indentation): Use
9925         expand_location rather than expand_location_to_spelling_point.
9926         Don't warn if the guarding statement is more indented than the
9927         next/body stmts.
9929 2015-06-02  David Malcolm  <dmalcolm@redhat.com>
9931         * c-indentation.c (warn_for_misleading_indentation): Bail out
9932         immediately if -Wmisleading-indentation isn't enabled.
9934 2015-06-01  Martin Liska  <mliska@suse.cz>
9936         * c-format.c (check_format_arg):Use new type-based pool allocator.
9937         (check_format_info_main) Likewise.
9939 2015-05-31  Eric Botcazou  <ebotcazou@adacore.com>
9941         * c-ada-spec.c (is_tagged_type): Test for TYPE_METHODS on main variant.
9942         (has_nontrivial_methods): Likewise.
9944 2015-05-25  Marek Polacek  <polacek@redhat.com>
9946         * c-ubsan.c (ubsan_instrument_shift): Use type0.
9948 2015-05-22  Marek Polacek  <polacek@redhat.com>
9950         PR c/47043
9951         * c-common.c (handle_deprecated_attribute): Allow CONST_DECL.
9953 2015-05-21  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
9955         * c-cppbuiltin.c (c_cpp_builtins): Use if instead of #if with
9956         STACK_GROWS_DOWNWARD.
9958 2015-05-21  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
9960         * c-cppbuiltin.c (c_cpp_builtins): Check the value of
9961         STACK_GROWS_DOWNWARD rather than if it is defined.
9963 2015-05-21  Manuel López-Ibáñez  <manu@gcc.gnu.org>
9965         PR c/52952
9966         * c-format.c (location_column_from_byte_offset): New.
9967         (location_from_offset): New.
9968         (struct format_wanted_type): Add offset_loc field.
9969         (check_format_info): Move handling of location for extra arguments
9970         closer to the point of warning.
9971         (check_format_info_main): Pass the result of location_from_offset
9972         to warning_at.
9973         (format_type_warning): Pass the result of location_from_offset
9974         to warning_at.
9976 2015-05-20  Marek Polacek  <polacek@redhat.com>
9978         * c-omp.c (check_omp_for_incr_expr): Use BINARY_CLASS_P.
9980 2015-05-20  Marek Polacek  <polacek@redhat.com>
9982         * c-ada-spec.c (dump_sloc): Use DECL_P.
9984 2015-05-20  Marek Polacek  <polacek@redhat.com>
9986         * c-pragma.c: Use VAR_OR_FUNCTION_DECL_P throughout.
9987         * c-common.c: Likewise.
9989 2015-05-19  David Malcolm  <dmalcolm@redhat.com>
9991         * c-common.h (fe_file_change): Strengthen param from
9992         const line_map * to const line_map_ordinary *.
9993         (pp_file_change): Likewise.
9994         * c-lex.c (fe_file_change): Likewise.
9995         (cb_define): Use linemap_check_ordinary when invoking
9996         SOURCE_LINE.
9997         (cb_undef): Likewise.
9998         * c-opts.c (c_finish_options): Use linemap_check_ordinary when
9999         invoking cb_file_change.
10000         (c_finish_options): Likewise.
10001         (push_command_line_include): Likewise.
10002         (cb_file_change): Strengthen param "new_map" from
10003         const line_map * to const line_map_ordinary *.
10004         * c-ppoutput.c (cb_define): Likewise for local "map".
10005         (pp_file_change): Likewise for param "map" and local "from".
10007 2015-05-19  Mikhail Maltsev  <maltsevm@gmail.com>
10009         * c-common.c (shorten_compare): Use std::swap instead of explicit swaps.
10011 2015-05-18  Tom de Vries  <tom@codesourcery.com>
10013         * c-common.c (build_va_arg_1): New function.
10014         (build_va_arg): Add address operator to va_list operand if necessary.
10016 2015-05-15  Mikhail Maltsev  <maltsevm@gmail.com>
10018         PR c/48956
10019         * c-common.c (int_safely_convertible_to_real_p): Define.
10020         (unsafe_conversion_p): Check conversions involving complex types.
10021         (conversion_warning): Add new warning message for conversions which
10022         discard imaginary component.
10023         * c-common.h: (enum conversion_safety): Add new enumerator for such
10024         conversions.
10026 2015-05-14  Marek Polacek  <polacek@redhat.com>
10028         PR c/66066
10029         PR c/66127
10030         * c-common.c (c_fully_fold): Pass false down to c_fully_fold_internal.
10031         (c_fully_fold_internal): Fold C_MAYBE_CONST_EXPRs with
10032         C_MAYBE_CONST_EXPR_INT_OPERANDS set.  Add FOR_INT_CONST argument and
10033         use it.  If FOR_INT_CONST, require that all evaluated operands be
10034         INTEGER_CSTs.
10036 2015-05-12  David Malcolm  <dmalcolm@redhat.com>
10038         * c-common.h (warn_for_misleading_indentation): New prototype.
10039         * c-indentation.c: New file.
10040         * c.opt (Wmisleading-indentation): New option.
10042 2015-05-12  Tom de Vries  <tom@codesourcery.com>
10044         PR tree-optimization/66010
10045         * c-common.c (build_va_arg): Don't mark ap addressable unless necessary.
10047 2015-05-09  Jason Merrill  <jason@redhat.com>
10049         * c-opts.c (c_common_post_options): Also clear
10050         cpp_opts->cpp_warn_cxx11_compat.
10052         * c-common.h (enum cxx_dialect): Add cxx_unset.
10053         * c-common.c (cxx_dialect): Initialize to cxx_unset.
10054         * c-opts.c (c_common_post_options): Set C++ dialect to C++98 if unset.
10056         * c.opt (std=c++14): Remove Undocumented flag and experimental warning.
10057         (std=gnu++0x): Mark as Undocumented.
10058         (std=gnu++1y): Add deprecated message.
10060 2015-05-08  Jason Merrill  <jason@redhat.com>
10062         * c.opt (Wc++11-compat): Make primary.  Rename var warn_cxx11_compat.
10063         * c-opts.c: Adjust.
10065         * c.opt (Wc++0x-compat): Also set cpp_warn_cxx11_compat.
10067 2015-05-08  Marek Polacek  <polacek@redhat.com>
10069         PR c/64918
10070         * c.opt (Woverride-init-side-effects): New option.
10072 2015-05-07  Marek Polacek  <polacek@redhat.com>
10074         PR c/65179
10075         * c-common.c (c_fully_fold_internal): Warn when left shifting a
10076         negative value.
10077         * c.opt (Wshift-negative-value): New option.
10078         * c-opts.c (c_common_post_options): Set warn_shift_negative_value
10079         when -Wextra and C99/C++11 mode.
10081 2015-05-07  Marek Polacek  <polacek@redhat.com>
10082             Martin Uecker  <uecker@eecs.berkeley.edu>
10084         * c-ubsan.c (ubsan_instrument_bounds): Don't skip instrumenting
10085         flexible member array-like members if SANITIZE_BOUNDS_STRICT.
10087 2015-05-05  Jason Merrill  <jason@redhat.com>
10089         * c.opt (Wterminate): New.
10091 2015-04-30  Marek Polacek  <polacek@redhat.com>
10093         * c-common.c (maybe_warn_bool_compare): When comparing with 0/1,
10094         require that the non-constant be of a boolean type.
10096 2015-04-29  Josh Triplett  <josh@joshtriplett.org>
10098         * c-common.c (handle_section_attribute): Refactor to reduce
10099         nesting and distinguish between error cases.
10101 2015-04-29  Marek Polacek  <polacek@redhat.com>
10103         PR c/64610
10104         * c-common.c (maybe_warn_bool_compare): Warn when comparing a boolean
10105         with 0/1.
10107 2015-04-29  Jakub Jelinek  <jakub@redhat.com>
10109         * c-common.h (omp_clause_mask): Unconditionally define as a class.
10110         Use uint64_t instead of unsigned HOST_WIDE_INT and 64 instead of
10111         HOST_BITS_PER_WIDE_INT.
10113 2015-04-28  Tom de Vries  <tom@codesourcery.com>
10115         PR tree-optimization/65887
10116         * c-common.c (build_va_arg): Mark va_arg ap argument as addressable.
10118 2015-04-28  Eric Botcazou  <ebotcazou@adacore.com>
10119             Pierre-Marie de Rodat  <derodat@adacore.com>
10121         * c-ada-spec.c (in_function): Delete.
10122         (dump_generic_ada_node): Do not change in_function and remove the
10123         redundant code dealing with it.
10124         (print_ada_declaration): Do not change in_function.  Use INDENT_INCR.
10125         (print_ada_methods): Output the static member functions in a nested
10126         package after the regular methods as well as associated renamings.
10128 2015-04-24  Marek Polacek  <polacek@redhat.com>
10130         PR c/65830
10131         * c-common.c (c_fully_fold_internal): Use OPT_Wshift_count_negative
10132         and OPT_Wshift_count_overflow.
10134         PR c/63357
10135         * c-common.c (warn_logical_operator): Warn if the operands have the
10136         same expressions.
10138 2015-04-24  Marek Polacek  <polacek@redhat.com>
10140         PR c/61534
10141         * c-common.c (warn_logical_operator): Bail if either operand comes
10142         from a macro expansion.
10144 2015-04-10  Bernhard Reutner-Fischer  <aldot@gcc.gnu.org>
10146         PR target/55143
10147         * c-common.c (c_default_pointer_mode): Add definition.
10148         * c-common.h (c_default_pointer_mode): Add declaration.
10150 2015-03-11  Jakub Jelinek  <jakub@redhat.com>
10152         * c-common.c (c_common_nodes_and_builtins): Don't call xstrdup
10153         on record_builtin_type argument.
10155 2015-03-10  Jakub Jelinek  <jakub@redhat.com>
10157         PR c/65120
10158         * c-common.c (warn_logical_not_parentheses): Don't warn for
10159         !x == 0 or !x != 0.
10161 2015-03-07  Marek Polacek  <polacek@redhat.com>
10163         PR sanitizer/65280
10164         * c-ubsan.c (ubsan_instrument_bounds): Check for COMPONENT_REF
10165         before trying to figure out whether we have a flexible array member.
10167 2015-03-06  Eric Botcazou  <ebotcazou@adacore.com>
10168             Jonathan Wakely  <jwakely.gcc@gmail.com>
10170         * c-ada-spec.c (dump_ada_double_name): Fix pasto.
10172 2015-03-05  Eric Botcazou  <ebotcazou@adacore.com>
10174         PR ada/65319
10175         * c-ada-spec.c (print_destructor): Remove obsolete code.
10177 2015-03-01  Eric Botcazou  <ebotcazou@adacore.com>
10179         * c-ada-spec.c (is_tagged_type): Add guard for DECL_VINDEX.
10180         (dump_template_types): Adjust DECL_TEMPLATE_INSTANTIATIONS and
10181         DECL_TEMPLATE_RESULT emulations.
10182         (dump_ada_template)): Add guard for TYPE_METHODS.
10184 2015-02-27  Marek Polacek  <polacek@redhat.com>
10186         PR c/65040
10187         * c.opt (Wformat-signedness): Don't enable by -Wformat=2.
10189 2015-02-27  Kai Tietz  <ktietz@redhat.com>
10191         PR c/35330
10192         * c-pragma.c (handle_pragma_weak): Do not try to create
10193         weak/alias of declarations not being function, or variable
10194         declarations.
10196 2015-02-24  Thomas Schwinge  <thomas@codesourcery.com>
10198         PR libgomp/64625
10199         * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
10200         Remove macros.
10201         (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
10203 2015-02-16  Marek Polacek  <polacek@redhat.com>
10205         PR c/65066
10206         * c-format.c (check_format_types): Handle null param.
10208 2015-02-13  Marek Polacek  <polacek@redhat.com>
10210         PR c/65040
10211         * c-format.c (check_format_types): Don't warn about different
10212         signedness if the original value is in the range of WANTED_TYPE.
10214 2015-02-12  Jason Merrill  <jason@redhat.com>
10216         PR c++/64956
10217         * c-opts.c (c_common_post_options): Change flag_abi_version from 0
10218         to the current highest version.
10219         * c-cppbuiltin.c (c_cpp_builtins): Assert that it isn't 0.
10221 2015-02-04  Jakub Jelinek  <jakub@redhat.com>
10223         PR c/64824
10224         PR c/64868
10225         * c-omp.c (c_finish_omp_atomic): Use TRUNC_DIV_EXPR
10226         instead of RDIV_EXPR.  Use build_binary_op instead of
10227         build2_loc.
10229 2015-01-30  Joseph Myers  <joseph@codesourcery.com>
10231         * c-opts.c, c-pch.c, cppspec.c: All callers of fatal_error changed
10232         to pass input_location as first argument.
10234 2015-01-23  Tom de Vries  <tom@codesourcery.com>
10236         PR libgomp/64672
10237         * c.opt (fopenacc): Mark as LTO option.
10239 2015-01-23  Tom de Vries  <tom@codesourcery.com>
10241         PR libgomp/64707
10242         * c.opt (fopenmp): Mark as LTO option.
10244 2015-01-21  Jakub Jelinek  <jakub@redhat.com>
10246         PR c/63307
10247         * cilk.c (fill_decls_vec): Only put decls into vector v.
10248         (compare_decls): Fix up formatting.
10250 2015-01-21  Igor Zamyatin  <igor.zamyatin@intel.com>
10252         PR c/63307
10253         * cilk.c: Include vec.h.
10254         (struct cilk_decls): New structure.
10255         (wrapper_parm_cb): Split this function to...
10256         (fill_decls_vec): ...this...
10257         (create_parm_list): ...and this.
10258         (compare_decls): New function.
10259         (for_local_cb): Remove.
10260         (wrapper_local_cb): Ditto.
10261         (build_wrapper_type): For now first traverse and fill vector of
10262         declarations then sort it and then deal with sorted vector.
10263         (cilk_outline): Ditto.
10264         (declare_one_free_variable): Ditto.
10266 2015-01-21  Jason Merrill  <jason@redhat.com>
10268         PR c++/64629
10269         * c-format.c (check_format_arg): Call decl_constant_value.
10271 2015-01-19  Martin Liska  <mliska@suse.cz>
10273         * c-common.c (handle_noicf_attribute): New function.
10275 2015-01-15  Thomas Schwinge  <thomas@codesourcery.com>
10276             Bernd Schmidt  <bernds@codesourcery.com>
10277             James Norris  <jnorris@codesourcery.com>
10278             Cesar Philippidis  <cesar@codesourcery.com>
10279             Ilmir Usmanov  <i.usmanov@samsung.com>
10280             Jakub Jelinek  <jakub@redhat.com>
10282         * c.opt (fopenacc): New option.
10283         * c-cppbuiltin.c (c_cpp_builtins): Conditionally define _OPENACC.
10284         * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
10285         New macros.
10286         * c-common.h (c_finish_oacc_wait): New prototype.
10287         * c-omp.c: Include "omp-low.h" and "gomp-constants.h".
10288         (c_finish_oacc_wait): New function.
10289         * c-pragma.c (oacc_pragmas): New variable.
10290         (c_pp_lookup_pragma, init_pragma): Handle it.
10291         * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_CACHE,
10292         PRAGMA_OACC_DATA, PRAGMA_OACC_ENTER_DATA, PRAGMA_OACC_EXIT_DATA,
10293         PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP, PRAGMA_OACC_PARALLEL,
10294         PRAGMA_OACC_UPDATE, PRAGMA_OACC_WAIT.
10295         (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ASYNC,
10296         PRAGMA_OACC_CLAUSE_AUTO, PRAGMA_OACC_CLAUSE_COLLAPSE,
10297         PRAGMA_OACC_CLAUSE_COPY, PRAGMA_OACC_CLAUSE_COPYIN,
10298         PRAGMA_OACC_CLAUSE_COPYOUT, PRAGMA_OACC_CLAUSE_CREATE,
10299         PRAGMA_OACC_CLAUSE_DELETE, PRAGMA_OACC_CLAUSE_DEVICE,
10300         PRAGMA_OACC_CLAUSE_DEVICEPTR, PRAGMA_OACC_CLAUSE_FIRSTPRIVATE,
10301         PRAGMA_OACC_CLAUSE_GANG, PRAGMA_OACC_CLAUSE_HOST,
10302         PRAGMA_OACC_CLAUSE_IF, PRAGMA_OACC_CLAUSE_NUM_GANGS,
10303         PRAGMA_OACC_CLAUSE_NUM_WORKERS, PRAGMA_OACC_CLAUSE_PRESENT,
10304         PRAGMA_OACC_CLAUSE_PRESENT_OR_COPY,
10305         PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYIN,
10306         PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYOUT,
10307         PRAGMA_OACC_CLAUSE_PRESENT_OR_CREATE, PRAGMA_OACC_CLAUSE_PRIVATE,
10308         PRAGMA_OACC_CLAUSE_REDUCTION, PRAGMA_OACC_CLAUSE_SELF,
10309         PRAGMA_OACC_CLAUSE_SEQ, PRAGMA_OACC_CLAUSE_VECTOR,
10310         PRAGMA_OACC_CLAUSE_VECTOR_LENGTH, PRAGMA_OACC_CLAUSE_WAIT,
10311         PRAGMA_OACC_CLAUSE_WORKER.
10313 2015-01-14  Marcos Diaz  <marcos.diaz@tallertechnologies.com>
10315         * c-cppbuiltin.c (c_cpp_builtins): New cpp define __SSP_EXPLICIT__
10316         for the new option fstack-protector_explicit.
10317         * c-common.c (c_common_attribute_table): Add stack_protect attribute.
10318         (handle_stack_protect_attribute): New function.
10320 2015-01-13  Martin Uecker  <uecker@eecs.berkeley.edu>
10322         * c.opt: New option -Warray-bounds=.
10324 2015-01-09  Michael Collison  <michael.collison@linaro.org>
10326         * array-notation-common.c: Include hash-set.h, machmode.h,
10327         vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
10328         fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
10329         * c-ada-spec.c: Ditto.
10330         * c-cilkplus.c: Ditto.
10331         * c-common.c: Include input.h due to flattening of tree.h.
10332         Define macro GCC_C_COMMON_C.
10333         * c-common.h: Flatten tree.h header files into c-common.h.
10334         Remove include of tree-core.h.
10335         * c-cppbuiltin.c: Include hash-set.h, machmode.h,
10336         vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
10337         fold-const.h, wide-int.h, and inchash.h due to
10338         flattening of tree.h.
10339         * c-dump.c: Ditto.
10340         * c-format.c: Flatten tree.h header files into c-common.h.
10341         * c-cppbuiltin.c: Include hash-set.h, machmode.h,
10342         vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
10343         fold-const.h, wide-int.h, and inchash.h due to
10344         flattening of tree.h.
10345         * c-dump.c: Include hash-set.h, machmode.h,
10346         vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
10347         fold-const.h, wide-int.h, and inchash.h due to
10348         flattening of tree.h.
10349         * c-format.c: Include hash-set.h, machmode.h,
10350         vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
10351         fold-const.h, wide-int.h, inchash.h and real.h due to
10352         flattening of tree.h.
10353         * c-gimplify.c: Include hash-set.h, machmode.h,
10354         vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
10355         fold-const.h, wide-int.h, and inchash.h due to
10356         flattening of tree.h.
10357         * cilk.c: Ditto.
10358         * c-lex.c: Ditto.
10359         * c-omp.c: Ditto.
10360         * c-opts.c: Ditto.
10361         * c-pch.c: Ditto.
10362         * c-ppoutput.c: Ditto.
10363         * c-pragma.c: Ditto.
10364         * c-pretty-print.c: Ditto.
10365         * c-semantics.c: Ditto.
10366         * c-ubsan.c: Ditto.
10367         * stub-objc.c: Ditto.
10369 2015-01-08  Jason Merrill  <jason@redhat.com>
10371         * c-ubsan.c (ubsan_maybe_instrument_array_ref): Use
10372         do_ubsan_in_current_function.
10373         (ubsan_maybe_instrument_reference_or_call): Likewise.
10374         * c-ubsan.h: Declare it.
10376 2015-01-08  Mike Stump  <mikestump@comcast.net>
10378         * c-common.c (c_common_attribute_table): Add no_sanitize_thread.
10380 2015-01-07  Marek Polacek  <polacek@redhat.com>
10382         PR c/64440
10383         * c-common.c (c_fully_fold_internal): Warn for division and modulo
10384         if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST and is zero.
10386 2015-01-05  Trevor Saunders  <tsaunders@mozilla.com>
10388         PR c++/31397
10389         * c.opt (Wsuggest-override): New option.
10391 2015-01-05  Jakub Jelinek  <jakub@redhat.com>
10393         Update copyright years.
10395 2015-01-05  Marek Polacek  <polacek@redhat.com>
10397         PR c/64423
10398         * c-common.c (warn_array_subscript_with_type_char): Add location_t
10399         parameter.  Use it.
10400         * c-common.h (warn_array_subscript_with_type_char): Update
10401         declaration.
10403 2014-12-20  Edward Smith-Rowland  <3dw4rd@verizon.net>
10405         * c-cppbuiltin.c (__cpp_sized_deallocation): Uncomment and move macro.
10406         Control macro with flag_sized_deallocation.
10408 2014-12-20  Martin Uecker  <uecker@eecs.berkeley.edu>
10410         * c.opt (Wdiscarded-array-qualifiers): New option.
10412 2014-12-19  Jakub Jelinek  <jakub@redhat.com>
10414         PR preprocessor/63831
10415         * c-cppbuiltin.c (c_cpp_builtins): Don't define __has_attribute
10416         and __has_cpp_attribute here.
10417         * c-ppoutput.c (init_pp_output): Set cb->has_attribute to
10418         c_common_has_attribute.
10419         * c-common.h (c_common_has_attribute): New prototype.
10420         * c-lex.c (init_c_lex): Set cb->has_attribute to
10421         c_common_has_attribute instead of cb_has_attribute.
10422         (get_token_no_padding): New function.
10423         (cb_has_attribute): Renamed to ...
10424         (c_common_has_attribute): ... this.  No longer static.  Use
10425         get_token_no_padding, require ()s, don't build TREE_LIST
10426         unnecessarily, fix up formatting, adjust diagnostics, call
10427         init_attributes.
10429 2014-12-15  Jason Merrill  <jason@redhat.com>
10431         * c.opt (-fsized-deallocation, -Wc++14-compat): New.
10432         (-Wsized-deallocation): New.
10433         * c-opts.c (c_common_post_options): -fsized-deallocation defaults
10434         to on in C++14 and up.
10436 2014-12-11  Jason Merrill  <jason@redhat.com>
10438         * c-cppbuiltin.c (c_cpp_builtins): Enable C++14 __cpp_constexpr.
10440         * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_runtime_arrays if
10441         we aren't complaining about VLAs.
10443 2014-12-06  Marek Polacek  <polacek@redhat.com>
10445         PR tree-optimization/64183
10446         * c-gimplify.c (c_gimplify_expr): Don't convert the RHS of a
10447         shift-expression if it is integer_type_node.  Use types_compatible_p.
10449 2014-11-29  Jakub Jelinek  <jakub@redhat.com>
10451         * c-common.c (convert_vector_to_pointer_for_subscript): Remove NULL
10452         last argument from create_tmp_var_raw and create_tmp_var calls.
10453         * cilk.c (gimplify_cilk_spawn): Likewise.
10454         * c-omp.c (c_finish_omp_atomic): Likewise.
10456 2014-11-28  Marek Polacek  <polacek@redhat.com>
10458         * c-ubsan.c (ubsan_instrument_shift): Use op1_utype for MINUS_EXPR
10459         instead of unsigned_type_node.
10461 2014-11-28  Marek Polacek  <polacek@redhat.com>
10463         PR c/63862
10464         * c-ubsan.c (ubsan_instrument_shift): Change the type of a MINUS_EXPR
10465         to op1_utype.
10466         * c-gimplify.c (c_gimplify_expr): Convert right operand of a shift
10467         expression to unsigned_type_node.
10469 2014-11-20  Mark Wielaard  <mjw@redhat.com>
10471         PR debug/38757
10472         * c-opts.c (set_std_c89): Set lang_hooks.name.
10473         (set_std_c99): Likewise.
10474         (set_std_c11): Likewise.
10475         (set_std_cxx98): Likewise.
10476         (set_std_cxx11): Likewise.
10477         (set_std_cxx14): Likewise.
10478         (set_std_cxx1z): Likewise.
10480 2014-11-21  Jakub Jelinek  <jakub@redhat.com>
10482         PR target/63764
10483         * c-common.h (convert_vector_to_pointer_for_subscript): Change
10484         return type to bool.
10485         * c-common.c: Include gimple-expr.h.
10486         (convert_vector_to_pointer_for_subscript): Change return type to
10487         bool.  If *vecp is not lvalue_p and has VECTOR_TYPE, return true
10488         and copy it into a TARGET_EXPR and use that instead of *vecp
10489         directly.
10491 2014-11-19  David Malcolm  <dmalcolm@redhat.com>
10493         Merger of git branch "gimple-classes-v2-option-3".
10494         * ChangeLog.gimple-classes: New.
10495         * c-gimplify.c (add_block_to_enclosing): Strengthen local "stack"
10496         from being just a vec<gimple> to a vec<gbind *>.
10498 2014-11-18  Jakub Jelinek  <jakub@redhat.com>
10500         PR sanitizer/63813
10501         * c-ubsan.c (ubsan_maybe_instrument_reference_or_call): Change type
10502         argument to ptype, set type to TREE_TYPE (ptype).  Don't call
10503         get_pointer_alignment for non-pointers.  Use ptype, or if it is
10504         reference type, corresponding pointer type, as type of kind
10505         argument.
10506         (ubsan_maybe_instrument_reference,
10507         ubsan_maybe_instrument_member_call): Adjust callers.
10509 2014-11-15  Marek Polacek  <polacek@redhat.com>
10511         PR middle-end/63884
10512         * array-notation-common.c (is_sec_implicit_index_fn): Return false
10513         for NULL fndecl.
10514         (extract_array_notation_exprs): Return for NULL node.
10516 2014-11-12  Joseph Myers  <joseph@codesourcery.com>
10518         * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Define and
10519         undefine __NO_MATH_ERRNO__ based on changes to -fmath-errno state.
10521 2014-11-12  Jakub Jelinek  <jakub@redhat.com>
10523         PR c/59708
10524         * c-common.c (check_builtin_function_arguments): Handle
10525         BUILT_IN_{ADD,SUB,MUL}_OVERFLOW.
10527 2014-11-10  Andi Kleen  <ak@linux.intel.com>
10529         PR c/60804
10530         * c-common.h (check_no_cilk): Declare.
10531         * cilk.c (get_error_location): New function.
10532         (check_no_cilk): Dito.
10534 2014-11-10  Andi Kleen  <ak@linux.intel.com>
10536         * cilk.c (recognize_spawn): Use expression location
10537         for error message.
10539 2014-11-10  Paolo Carlini  <paolo.carlini@oracle.com>
10541         * c.opt ([Wshift-count-negative, Wshift-count-overflow]): Add.
10543 2014-11-10  Edward Smith-Rowland  <3dw4rd@verizon.net>
10545         * c-cppbuiltin.c (__has_attribute, __has_cpp_attribute): New macros;
10546         (__cpp_rtti, __cpp_exceptions): New macros for C++98;
10547         (__cpp_range_based_for, __cpp_initializer_lists,
10548         __cpp_delegating_constructors, __cpp_nsdmi,
10549         __cpp_inheriting_constructors, __cpp_ref_qualifiers): New macros
10550         for C++11; (__cpp_attribute_deprecated): Remove in favor of
10551         __has_cpp_attribute.
10552         * c-lex.c (cb_has_attribute): New callback CPP function;
10553         (init_c_lex): Set has_attribute callback.
10555 2014-11-04  Richard Biener  <rguenther@suse.de>
10557         * c-common.c (shorten_compare): Do not shorten mixed
10558         DFP and non-DFP compares.
10560 2014-11-01  Edward Smith-Rowland  <3dw4rd@verizon.net>
10562         * g++.dg/cpp1y/feat-cxx11.C: Commentary and rearrangement of tests.
10563         * g++.dg/cpp1y/feat-cxx11-neg.C: Add aggregate NSDMI test.
10564         Commentary and rearrangement of tests.
10565         * g++.dg/cpp1y/feat-cxx14.C: Enable aggregate NSDMI test.
10566         Commentary and rearrangement of tests.
10567         * g++.dg/cpp1y/feat-cxx98-neg.C: Ditto.
10568         * g++.dg/cpp1y/feat-cxx98.C: Commentary.
10570 2014-10-29  Richard Sandiford  <richard.sandiford@arm.com>
10572         * c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant
10573         enum from machine_mode.
10575 2014-10-28  Andrew MacLeod  <amacleod@redhat.com>
10577         * c-common.c: Adjust include files.
10578         * c-gimplify.c: Ditto.
10579         * cilk.c: Ditto.
10580         * c-pragma.c: Ditto.
10581         * c-ubsan.c: Ditto.
10583 2014-10-27  Andrew MacLeod  <amacleod@redhat.com>
10585         * c-gimplify.c: Adjust include files.
10587 2014-10-26  Manuel López-Ibáñez  <manu@gcc.gnu.org>
10589         PR c++/53061
10590         * c-opts.c (c_common_diagnostics_set_defaults): Renamed from
10591         c_common_initialize_diagnostics.
10592         * c-common.h: Likewise.
10594 2014-10-24  Marek Polacek  <polacek@redhat.com>
10596         PR c/56980
10597         * c-pretty-print.c (c_pretty_printer::simple_type_specifier): Don't
10598         print "struct"/"union"/"enum" for typedefed names.
10600 2014-10-23  Marek Polacek  <polacek@redhat.com>
10602         * c-ubsan.c (ubsan_instrument_shift): Perform the MINUS_EXPR
10603         in unsigned type.
10605 2014-10-22  Jakub Jelinek  <jakub@redhat.com>
10606             Yury Gribov  <y.gribov@samsung.com>
10608         * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
10609         ubsan_instrument_vla): Check bits in flag_sanitize_recover bitmask
10610         instead of flag_sanitize_recover as bool flag.
10612 2014-10-21  Kirill Yukhin  <kirill.yukhin@intel.com>
10614         * cilk.c: Revert previous change.
10616 2014-10-20  Igor Zamyatin  <igor.zamyatin@intel.com>
10618         PR c/63307
10619         * cilk.c: Include vec.h.
10620         (struct cilk_decls): New structure.
10621         (wrapper_parm_cb): Split this function to...
10622         (fill_decls_vec): ...this...
10623         (create_parm_list): ...and this.
10624         (compare_decls): New function.
10625         (for_local_cb): Remove.
10626         (wrapper_local_cb): Ditto.
10627         (build_wrapper_type): For now first traverse and fill vector of
10628         declarations then sort it and then deal with sorted vector.
10629         (cilk_outline): Ditto.
10630         (declare_one_free_variable): Ditto.
10632 2014-10-17  Marek Polacek  <polacek@redhat.com>
10634         * c-opts.c (c_common_post_options): Set warn_implicit_int.
10635         * c.opt (Wimplicit-int): Initialize to -1.
10637 2014-10-16  Andrew MacLeod  <amacleod@redhat.com>
10639         * c-pragma.c: Adjust include files.
10640         * c-semantics.c: Likewise.
10642 2014-10-16  DJ Delorie  <dj@redhat.com>
10644         * c-cppbuiltin.c (cpp_atomic_builtins): Don't assume pointers are
10645         multiples of bytes.
10647 2014-10-14  Jason Merrill  <jason@redhat.com>
10649         PR c++/63455
10650         * c-common.h (CPP_PREPARSED_EXPR): New.
10651         (N_CP_TTYPES): Adjust.
10653 2014-10-15  Marek Polacek  <polacek@redhat.com>
10655         * c-opts.c (c_common_init_options): Make -std=gnu11 the default for C.
10657 2014-10-14  DJ Delorie  <dj@redhat.com>
10659         * c-pretty-print.c (pp_c_integer_constant): Check for all __intN
10660         types, not just __int128.
10661         * c-cppbuiltin.c (c_cpp_builtins): Add builtins for all __intN
10662         types, not just __int128.
10663         (cpp_atomic_builtins): Round pointer sizes up.
10664         (type_suffix): Use type precision, not specific types.
10665         * c-common.c (c_common_reswords): Remove __int128 special case.
10666         (c_common_type_for_size): Check for all __intN types, not just
10667         __int128.
10668         (c_common_type_for_mode): Likewise.
10669         (c_common_signed_or_unsigned_type): Likewise.
10670         (c_build_bitfield_integer_type): Likewise.
10671         (c_common_nodes_and_builtins): Likewise.
10672         (keyword_begins_type_specifier): Likewise.
10673         * c-common.h (rid): Remove RID_INT128 and add RID_INT_N_* for all
10674         __intN variants.
10676 2014-10-12  Trevor Saunders  <tsaunders@mozilla.com>
10678         * c-common.c: Use hash_table instead of hashtab.
10680 2014-10-06  Edward Smith-Rowland  <3dw4rd@verizon.net>
10682         * c-cppbuiltin.c: Move __cpp_attribute_deprecated to the
10683         C++11 section.
10685 2014-10-03  Marc Glisse  <marc.glisse@inria.fr>
10687         PR c++/54427
10688         PR c++/57198
10689         PR c++/58845
10690         * c-common.c (warn_logical_operator): Punt for vectors.
10692 2014-10-01  Edward Smith-Rowland  <3dw4rd@verizon.net>
10694         Implement SD-6: SG10 Feature Test Recommendations
10695         * c-cppbuiltin.c (c_cpp_builtins()): Define language feature
10696         macros and the __has_header macro.
10698 2014-09-30  Jason Merrill  <jason@redhat.com>
10700         * c-common.h (enum rid): Add RID_IS_TRIVIALLY_ASSIGNABLE and
10701         RID_IS_TRIVIALLY_CONSTRUCTIBLE.
10702         * c-common.c (c_common_reswords): Add __is_trivially_copyable.
10704         * c-common.h (enum rid): Add RID_IS_TRIVIALLY_COPYABLE.
10705         * c-common.c (c_common_reswords): Add __is_trivially_copyable.
10707         * c-common.h (enum rid): Remove RID_IS_CONVERTIBLE_TO.
10708         * c-common.c (c_common_reswords): Remove __is_convertible_to.
10710 2014-09-24  Marek Polacek  <polacek@redhat.com>
10712         PR c/61405
10713         PR c/53874
10714         * c-common.h (struct c_common_resword): Don't define CPP_KEYWORD.
10716 2014-09-23  Andi Kleen  <ak@linux.intel.com>
10718         * c-common.c (handle_no_reorder_attribute): New function.
10719         (c_common_attribute_table): Add no_reorder attribute.
10721 2014-09-22  Joseph Myers  <joseph@codesourcery.com>
10723         * c-cppbuiltin.c (c_cpp_builtins): Define
10724         __LIBGCC_*_EXCESS_PRECISION__ macros for supported floating-point
10725         modes.
10727 2014-09-18  Joseph Myers  <joseph@codesourcery.com>
10729         * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_*_FUNC_EXT__
10730         for supported floating-point modes.
10732 2014-09-15  Manuel López-Ibáñez  <manu@gcc.gnu.org>
10734         * c.opt (Wpsabi): Use LangEnabledBy.
10735         * c-opts.c (c_common_handle_option): Do not handle here.
10737 2014-09-12  Joseph Myers  <joseph@codesourcery.com>
10739         * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_HAS_%s_MODE__
10740         macros for floating-point modes.
10742 2014-09-11  Marc Glisse  <marc.glisse@inria.fr>
10744         PR target/58757
10745         * c-cppbuiltin.c (builtin_define_float_constants): Correct
10746         __*_DENORM_MIN__ without denormals.
10748 2014-09-10  Jakub Jelinek  <jakub@redhat.com>
10750         * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
10751         ubsan_instrument_vla, ubsan_instrument_return): Adjust
10752         ubsan_create_data callers.
10753         (ubsan_instrument_bounds): Don't emit UBSAN_BOUNDS at all if
10754         index is constant or BIT_AND_EXPR with constant mask and is
10755         small enough for the bound.
10756         * c-gimplify.c (ubsan_walk_array_refs_r): For ADDR_EXPR of
10757         ARRAY_REF, make sure the inner ARRAY_REF is not walked again.
10759 2014-09-09  Manuel López-Ibáñez  <manu@gcc.gnu.org>
10761         * c.opt: Add CppReason to various flags.
10762         (Wdate-time): Re-sort.
10763         * c-common.c: Include c-common.h earlier.
10764         (struct reason_option_codes_t): Delete.
10765         (c_option_controlling_cpp_error): Prefix global type and struct
10766         with cpp_.
10768 2014-09-09  Manuel López-Ibáñez  <manu@gcc.gnu.org>
10770         * c.opt (Wnormalized): New.
10771         (Wnormalized=): Use Enum and Reject Negative.
10772         * c-opts.c (c_common_handle_option): Do not handle Wnormalized here.
10774 2014-09-08  Joseph Myers  <joseph@codesourcery.com>
10776         * c-cppbuiltin.c (c_cpp_builtins): Define macros for mantissa
10777         digits of floating-point modes if -fbuilding-libgcc.
10779 2014-09-05  Joseph Myers  <joseph@codesourcery.com>
10781         * c-cppbuiltin.c (c_cpp_builtins): Also define
10782         __LIBGCC_EH_TABLES_CAN_BE_READ_ONLY__,
10783         __LIBGCC_EH_FRAME_SECTION_NAME__, __LIBGCC_JCR_SECTION_NAME__,
10784         __LIBGCC_CTORS_SECTION_ASM_OP__, __LIBGCC_DTORS_SECTION_ASM_OP__,
10785         __LIBGCC_TEXT_SECTION_ASM_OP__, __LIBGCC_INIT_SECTION_ASM_OP__,
10786         __LIBGCC_INIT_ARRAY_SECTION_ASM_OP__,
10787         __LIBGCC_STACK_GROWS_DOWNWARD__,
10788         __LIBGCC_DONT_USE_BUILTIN_SETJMP__,
10789         __LIBGCC_DWARF_ALT_FRAME_RETURN_COLUMN__,
10790         __LIBGCC_DWARF_FRAME_REGISTERS__,
10791         __LIBGCC_EH_RETURN_STACKADJ_RTX__, __LIBGCC_JMP_BUF_SIZE__,
10792         __LIBGCC_STACK_POINTER_REGNUM__ and
10793         __LIBGCC_VTABLE_USES_DESCRIPTORS__ for -fbuilding-libgcc.
10794         (builtin_define_with_value): Handle backslash-escaping in string
10795         macro values.
10797 2014-09-05  Richard Biener  <rguenther@suse.de>
10799         PR middle-end/63148
10800         * c-format.c (check_format_arg): Properly handle
10801         effectively signed POINTER_PLUS_EXPR offset.
10803 2014-09-04  Manuel López-Ibáñez  <manu@gcc.gnu.org>
10805         * c.opt (Wc90-c99-compat,Wc++-compat,Wcomment,Wendif-labels,
10806         Winvalid-pch,Wlong-long,Wmissing-include-dirs,Wmultichar,Wpedantic,
10807         (Wdate-time,Wtraditional,Wundef,Wvariadic-macros): Add CPP, Var
10808         and Init.
10809         * c-opts.c (c_common_handle_option): Do not handle here.
10810         (sanitize_cpp_opts): Likewise.
10811         * c-common.c (struct reason_option_codes_t): Handle
10812         CPP_W_C90_C99_COMPAT and CPP_W_PEDANTIC.
10814 2014-09-03  Marek Polacek  <polacek@redhat.com>
10816         * c.opt (Wlogical-not-parentheses): Enable by -Wall.
10818 2014-09-02  Jakub Jelinek  <jakub@redhat.com>
10819             Balaji V. Iyer  <balaji.v.iyer@intel.com>
10820             Igor Zamyatin  <igor.zamyatin@intel.com>
10822         * c-cilkplus.c (cilk_for_number_of_iterations): New function.
10823         * c-common.c (c_common_reswords): Added _Cilk_for.
10824         * c-common.h (enum rid): Added RID_CILK_FOR.
10825         (cilk_for_number_of_iterations): Add declaration.
10826         * c-omp.c (c_finish_omp_for): Added checks for CILK_SIMD and
10827         CILK_FOR.
10828         * c-pragma.c (init_pragma): Register "grainsize" pragma.
10829         * c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_GRAINSIZE.
10831 2014-08-29  Manuel López-Ibáñez  <manu@gcc.gnu.org>
10833         * c.opt (Wbuiltin-macro-redefined,Wdeprecated,Wendif-labels,
10834         Winvalid-pch,Wliteral-suffix,Wmissing-include-dirs,Wtrigraphs,
10835         Wundef): Use CPP, Var and Init.
10836         * c-opts.c (c_common_handle_option): Do not handle the above flags here.
10838 2014-08-29  Manuel López-Ibáñez  <manu@gcc.gnu.org>
10840         * c.opt (Wbuiltin-macro-redefined): Use CPP, Var and Init.
10841         * c-opts.c (c_common_handle_option): Do not handle here.
10843 2014-08-25  Jason Merrill  <jason@redhat.com>
10845         * c.opt: Change -std=c++1y and -std=gnu++1y to be aliases for
10846         -std=c++14 and -std=gnu++14, rather than the reverse.
10847         * c-opts.c (c_common_handle_option): Change OPT_std_c__1y and
10848         OPT_std_gnu__1y to OPT_std_c__14 and OPT_std_gnu__14.
10849         * c-common.h (cxx_dialect): Remove cxx1y.
10851 2014-08-23  Edward Smith-Rowland  <3dw4rd@verizon.net>
10853         * c-common.h (enum cxx_dialect): Add cxx14.
10854         * c-opts.c (set_std_cxx1y): Rename to set_std_cxx14; Use cxx14.
10855         * c-ubsan.c (ubsan_instrument_shift): Change comment and logic from
10856         cxx_dialect == cxx11 || cxx_dialect == cxx1y to cxx_dialect >= cxx11.
10858 2014-08-22  Jason Merrill  <jason@redhat.com>
10860         * c.opt (std=gnu++17): Fix alias.
10862 2014-08-22  Marek Polacek  <polacek@redhat.com>
10864         PR c++/62199
10865         * c-common.c (warn_logical_not_parentheses): Don't check LHS.  Don't
10866         check for vector types.  Drop LHS argument.
10867         * c-common.h (warn_logical_not_parentheses): Adjust.
10869 2014-08-22  Manuel López-Ibáñez  <manu@gcc.gnu.org>
10871         * c.opt (Wcomment): Use CPP, Var and LangEnabledBy.
10872         (Wmultichar): Likewise.
10873         (Wdate-time): Use C-family languages instead of Common. Use CPP
10874         and Var.
10875         * c-opts.c (c_common_handle_option): Do not handle the above
10876         options here.
10877         (sanitize_cpp_opts): Likewise.
10879 2014-08-21  Manuel López-Ibáñez  <manu@gcc.gnu.org>
10881         PR fortran/44054
10882         * c-opts.c: Include tree-diagnostics.h.
10883         (c_diagnostic_finalizer): New.
10884         (c_common_initialize_diagnostics): Use it.
10886 2014-08-20  Manuel López-Ibáñez  <manu@gcc.gnu.org>
10888         PR preprocessor/51303
10889         * c-common.c (struct reason_option_codes_t option_codes):
10890         Add CPP_W_MISSING_INCLUDE_DIRS. Sort alphabetically.
10892 2014-08-20  Manuel López-Ibáñez  <manu@gcc.gnu.org>
10894         PR c/60975
10895         PR c/53063
10896         * c.opt (Wvariadic-macros): Use CPP and LangEnabledBy.
10897         * c-opts.c (c_common_handle_option): Call cpp_handle_option_auto.
10898         (c_common_post_options): Call init_global_opts_from_cpp.
10899         (sanitize_cpp_opts): Do not handle Wvariadic-macros here.
10901 2014-08-19  Marek Polacek  <polacek@redhat.com>
10903         PR c++/62153
10904         * c-common.c (maybe_warn_bool_compare): New function.
10905         * c-common.h (maybe_warn_bool_compare): Declare.
10906         * c.opt (Wbool-compare): New option.
10908 2014-08-19  Marek Polacek  <polacek@redhat.com>
10910         * c.opt (Wc99-c11-compat): New option.
10912 2014-08-19  Marek Polacek  <polacek@redhat.com>
10914         * c-opts.c (sanitize_cpp_opts): Make warn_long_long be set according
10915         to warn_c90_c99_compat.
10916         * c.opt (Wc90-c99-compat, Wdeclaration-after-statement): Initialize
10917         to -1.
10919 2014-08-19  Manuel López-Ibáñez  <manu@gcc.gnu.org>
10920             Steven Bosscher  <steven@gcc.gnu.org>
10922         PR c/52952
10923         * c-format.c: Add extra_arg_loc and format_string_loc to struct
10924         format_check_results.
10925         (check_function_format): Use true and add comment for boolean
10926         argument.
10927         (finish_dollar_format_checking): Use explicit location when warning.
10928         (check_format_info): Likewise.
10929         (check_format_arg): Set extra_arg_loc and format_string_loc.
10930         (check_format_info_main): Use explicit location when warning.
10931         (check_format_types): Pass explicit location.
10932         (format_type_warning): Likewise.
10934 2014-08-15  Manuel López-Ibáñez  <manu@gcc.gnu.org>
10936         PR fortran/44054
10937         * c-format.c: Handle Fortran flags.
10939 2014-08-12  Igor Zamyatin  <igor.zamyatin@intel.com>
10941         PR other/61962
10942         * array-notation-common.c (find_rank): Added handling for other
10943         types of references.
10945 2014-08-10  Marek Polacek  <polacek@redhat.com>
10947         PR c/51849
10948         * c-opts.c (sanitize_cpp_opts): Pass warn_c90_c99_compat to libcpp.
10949         * c.opt (Wc90-c99-compat): Add option.
10951 2014-08-07  Trevor Saunders  <tsaunders@mozilla.com>
10953         * c-gimplify.c, cilk.c: Remove includes of pointer-set.h.
10955 2014-08-03  Marek Polacek  <polacek@redhat.com>
10957         * c-common.c (check_case_value): Add location_t parameter.  Use it.
10958         (c_add_case_label): Pass loc to check_case_value.
10960 2014-08-02  Trevor Saunders  <tsaunders@mozilla.com>
10962         * cilk.c: Use hash_map instead of pointer_map.
10964 2014-08-02  Trevor Saunders  <tsaunders@mozilla.com>
10966         * c-gimplify.c: Use hash_set instead of pointer_set.
10968 2014-08-01  Igor Zamyatin  <igor.zamyatin@intel.com>
10970         PR middle-end/61455
10971         * array-notation-common.c (extract_array_notation_exprs): Handling
10972         of DECL_EXPR added.
10974 2014-08-01  Jakub Jelinek  <jakub@redhat.com>
10976         * c-common.h (min_align_of_type): Removed prototype.
10977         * c-common.c (min_align_of_type): Removed.
10978         * c-ubsan.h (ubsan_maybe_instrument_reference,
10979         ubsan_maybe_instrument_member_call): New prototypes.
10980         * c-ubsan.c: Include stor-layout.h and builtins.h.
10981         (ubsan_maybe_instrument_reference_or_call,
10982         ubsan_maybe_instrument_reference, ubsan_maybe_instrument_call): New
10983         functions.
10985 2014-07-31  Marc Glisse  <marc.glisse@inria.fr>
10987         PR c++/60517
10988         * c.opt (-Wreturn-local-addr): Move to common.opt.
10990 2014-07-30  Jason Merrill  <jason@redhat.com>
10992         PR c++/61659
10993         PR c++/61687
10994         Revert:
10995         * c.opt (-fuse-all-virtuals): New.
10997 2014-07-30  Tom Tromey  <tromey@redhat.com>
10999         PR c/59855
11000         * c.opt (Wdesignated-init): New option.
11001         * c-common.c (c_common_attribute_table): Add "designated_init".
11002         (handle_designated_init): New function.
11004 2014-07-24  Marek Polacek  <polacek@redhat.com>
11006         PR c/57653
11007         * c-opts.c (c_finish_options): If -imacros is in effect, return.
11009 2014-07-16  Dodji Seketeli  <dodji@redhat.com>
11011         PR preprocessor/60723 - missing system-ness marks for macro tokens
11012         * c-ppoutput.c (struct print::prev_was_system_token): New data
11013         member.
11014         (init_pp_output): Initialize it.
11015         (maybe_print_line_1, maybe_print_line, print_line_1, print_line)
11016         (do_line_change): Return a flag saying if a line marker was
11017         emitted or not.
11018         (scan_translation_unit): Detect if the system-ness of the token we
11019         are about to emit is different from the one of the previously
11020         emitted token.  If so, emit a line marker.  Avoid emitting useless
11021         adjacent line markers.  Avoid emitting line markers for tokens
11022         originating from the expansion of built-in macros.
11023         (scan_translation_unit_directives_only): Adjust.
11025 2014-07-15  Marek Polacek  <polacek@redhat.com>
11027         * c-ubsan.c (ubsan_instrument_bounds): Don't instrument if
11028         TYPE_MAX_VALUE is NULL.
11030 2014-07-14  Jakub Jelinek  <jakub@redhat.com>
11032         PR middle-end/61294
11033         * c.opt (Wmemset-transposed-args): New warning.
11035 2014-07-10  Jason Merrill  <jason@redhat.com>
11037         PR c++/61659
11038         PR c++/61687
11039         * c.opt (-fuse-all-virtuals): New.
11041 2014-07-09  Richard Biener  <rguenther@suse.de>
11043         PR c-family/61741
11044         * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
11045         using unsigned arithmetic if overflow does not wrap instead of
11046         if overflow is undefined.
11048 2014-07-06  Marek Polacek  <polacek@redhat.com>
11050         PR c/6940
11051         * c.opt (Wsizeof-array-argument): New option.
11053 2014-07-03  Jakub Jelinek  <jakub@redhat.com>
11055         * c-ada-spec.c (dump_ada_nodes): Don't call qsort if
11056         comments->count <= 1, as comments->entries might be NULL.
11058 2014-07-01  Marek Polacek  <polacek@redhat.com>
11060         * c.opt (Wint-conversion): New option.
11062 2014-07-01  Marek Polacek  <polacek@redhat.com>
11064         PR c/58286
11065         * c.opt (Wincompatible-pointer-types): New option.
11067 2014-06-30  Paolo Carlini  <paolo.carlini@oracle.com>
11069         PR c++/51400
11070         * c-common.c (handle_noreturn_attribute, handle_const_attribute):
11071         Do not discard TYPE_QUALS of type.
11073 2014-06-26  Jason Merrill  <jason@redhat.com>
11075         * c-common.h (enum cxx_dialect): Add cxx1z.
11076         * c.opt (std=c++1z, std=c++17, std=gnu++1z, std=gnu++17): New.
11077         * c-opts.c (c_common_handle_option, set_std_cxx1z): Handle it.
11079 2014-06-26  Teresa Johnson  <tejohnson@google.com>
11081         * c-common.h (get_dump_info): Declare.
11082         * c-gimplify.c (c_genericize): Use saved dump files.
11083         * c-opts.c (c_common_parse_file): Begin and end dumps
11084         once around parsing invocation.
11085         (get_dump_info): New function.
11087 2014-06-23  Marek Polacek  <polacek@redhat.com>
11088             Andrew MacLeod  <amacleod@redhat.com>
11090         PR c/61553
11091         * c-common.c (get_atomic_generic_size): Don't segfault if the
11092         type doesn't have a size.
11094 2014-06-20  Marek Polacek  <polacek@redhat.com>
11096         * c-gimplify.c: Include "c-ubsan.h" and "pointer-set.h".
11097         (ubsan_walk_array_refs_r): New function.
11098         (c_genericize): Instrument array bounds.
11099         * c-ubsan.c: Include "internal-fn.h".
11100         (ubsan_instrument_division): Mark instrumented arrays as having
11101         side effects.  Adjust ubsan_type_descriptor call.
11102         (ubsan_instrument_shift): Likewise.
11103         (ubsan_instrument_vla): Adjust ubsan_type_descriptor call.
11104         (ubsan_instrument_bounds): New function.
11105         (ubsan_array_ref_instrumented_p): New function.
11106         (ubsan_maybe_instrument_array_ref): New function.
11107         * c-ubsan.h (ubsan_instrument_bounds): Declare.
11108         (ubsan_array_ref_instrumented_p): Declare.
11109         (ubsan_maybe_instrument_array_ref): Declare.
11111 2014-06-20  Hale Wang  <hale.wang@arm.com>
11113         PR lto/61123
11114         * c.opt (fshort-enums): Add to LTO.
11115         * c.opt (fshort-wchar): Likewise.
11117 2014-06-16  Marek Polacek  <polacek@redhat.com>
11119         PR c/60439
11120         * c.opt (Wswitch-bool): Add Var.
11122 2014-06-12  Jakub Jelinek  <jakub@redhat.com>
11124         PR middle-end/61486
11125         * c-omp.c (c_omp_split_clauses): Don't crash on firstprivate in
11126         #pragma omp target teams or
11127         #pragma omp {,target }teams distribute simd.
11129 2014-06-12  Jason Merrill  <jason@redhat.com>
11131         * c.opt (Wabi=, fabi-compat-version): New.
11132         * c-opts.c (c_common_handle_option): Handle -Wabi=.
11133         (c_common_post_options): Handle flag_abi_compat_version default.
11134         Disallow -fabi-compat-version=1.
11135         * c-common.h (abi_version_crosses): New.
11137 2014-06-11  Jan Hubicka  <hubicka@ucw.cz>
11139         * c-common.c (handle_section_attribute): Update handling for
11140         section names that are no longer trees.
11142 2014-06-10  Jakub Jelinek  <jakub@redhat.com>
11144         PR fortran/60928
11145         * c-pragma.c (omp_pragmas_simd): Move PRAGMA_OMP_TASK...
11146         (omp_pragmas): ... back here.
11148 2014-06-05  Marek Polacek  <polacek@redhat.com>
11150         PR c/49706
11151         * c-common.c (warn_logical_not_parentheses): New function.
11152         * c-common.h (warn_logical_not_parentheses): Declare.
11153         * c.opt (Wlogical-not-parentheses): New option.
11155 2014-06-04  Marek Polacek  <polacek@redhat.com>
11157         PR c/30020
11158         * c-common.c (check_case_bounds): Add location parameter.
11159         Use it.
11160         (c_add_case_label): Pass loc to check_case_bounds.
11162 2014-06-03  Marek Polacek  <polacek@redhat.com>
11164         PR c/60439
11165         * c.opt (Wswitch-bool): New option.
11167 2014-05-22  Thomas Schwinge  <thomas@codesourcery.com>
11169         * c-common.h (c_omp_sharing_predetermined, c_omp_remap_decl):
11170         Remove prototypes.
11171         (record_types_used_by_current_var_decl): Move prototype to where
11172         it belongs.
11174         * c-common.c (DEF_FUNCTION_TYPE_0, DEF_FUNCTION_TYPE_6)
11175         (DEF_FUNCTION_TYPE_7, DEF_FUNCTION_TYPE_8)
11176         (DEF_FUNCTION_TYPE_VAR_5): Cosmetic fixes.
11178 2014-05-21  Richard Sandiford  <rsandifo@linux.vnet.ibm.com>
11180         * c-common.h (CTI_VOID_ZERO, void_zero_node): Delete.
11181         * c-common.c (c_common_nodes_and_builtins): Don't initialize
11182         void_zero_node.
11183         * c-pretty-print.c (pp_c_void_constant): New function.
11184         (c_pretty_printer::constant, c_pretty_printer::primary_expression)
11185         (c_pretty_printer::expression): Handle VOID_CST.
11186         * cilk.c (extract_free_variables): Likewise.
11187         * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift)
11188         (ubsan_instrument_vla): Use void_node instead of void_zero_node.
11190 2014-05-17  Trevor Saunders  <tsaunders@mozilla.com>
11192         * c-common.h (sorted_fields_type): Remove variable_size GTY attribute.
11193         * c-pragma.c (push_alignment): Adjust.
11194         (handle_pragma_push_options): Likewise.
11196 2014-05-09  Marek Polacek  <polacek@redhat.com>
11198         PR c/50459
11199         * c-common.c (check_user_alignment): Return -1 if alignment is error
11200         node.
11201         (handle_aligned_attribute): Don't call default_conversion on
11202         FUNCTION_DECLs.
11203         (handle_vector_size_attribute): Likewise.
11204         (handle_tm_wrap_attribute): Handle case when wrap_decl is error node.
11205         (handle_sentinel_attribute): Call default_conversion and allow even
11206         integral types as an argument.
11208 2014-05-08  Marek Polacek  <polacek@redhat.com>
11210         PR c/61053
11211         * c-common.c (min_align_of_type): New function factored out from...
11212         (c_sizeof_or_alignof_type): ...here.
11213         * c-common.h (min_align_of_type): Declare.
11215 2014-05-08  Marek Polacek  <polacek@redhat.com>
11217         PR c/61077
11218         * c-common.c (check_main_parameter_types): Warn for _Atomic-qualified
11219         parameter type of main.
11221 2014-05-07  DJ Delorie  <dj@redhat.com>
11223         * c-cppbuiltin.c (print_bits_of_hex): New.
11224         (builtin_define_type_minmax): Print values using hex so as not to
11225         require a pre-computed list of string values.
11227 2014-05-06  Kenneth Zadeck  <zadeck@naturalbridge.com>
11228             Mike Stump  <mikestump@comcast.net>
11229             Richard Sandiford  <rdsandiford@googlemail.com>
11231         * c-ada-spec.c: Include wide-int.h.
11232         (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Remove.
11233         (dump_generic_ada_node): Use wide-int interfaces.
11234         * c-common.c: Include wide-int-print.h.
11235         (shorten_compare): Use wide-int interfaces and tree_int_cst_lt.
11236         (pointer_int_sum): Use wide-int interfaces.
11237         (c_common_nodes_and_builtins): Use make_int_cst.
11238         (match_case_to_enum_1): Use tree_fits_uhwi_p and tree_fits_shwi_p.
11239         (handle_alloc_size_attribute): Use wide-int interfaces.
11240         (get_nonnull_operand): Likewise.
11241         * c-format.c (get_constant): Use tree_fits_uhwi_p.
11242         * c-lex.c: Include wide-int.h.
11243         (narrowest_unsigned_type): Take a widest_int rather than two
11244         HOST_WIDE_INTs.
11245         (narrowest_signed_type): Likewise.
11246         (interpret_integer): Update accordingly.  Use wide-int interfaces.
11247         (lex_charconst): Use wide-int interfaces.
11248         * c-pretty-print.c: Include wide-int.h.
11249         (pp_c_integer_constant): Use wide-int interfaces.
11250         * cilk.c (declare_one_free_variable): Use tree_int_cst_lt instead of
11251         INT_CST_LT_UNSIGNED.
11253 2014-05-06  Richard Biener  <rguenther@suse.de>
11255         * c-opts.c (c_common_post_options): For -freestanding,
11256         -fno-hosted and -fno-builtin disable pattern recognition
11257         if not enabled explicitely.
11259 2014-05-02  Marek Polacek  <polacek@redhat.com>
11261         * c.opt (Wsizeof-pointer-memaccess): Describe option.
11263 2014-05-01  Marek Polacek  <polacek@redhat.com>
11265         PR c/43245
11266         * c.opt (Wdiscarded-qualifiers): Add.
11268 2014-04-30  Marek Polacek  <polacek@redhat.com>
11270         * c-ubsan.c (ubsan_instrument_division): Handle REAL_TYPEs.  Perform
11271         INT_MIN / -1 sanitization only for integer types.
11273 2014-04-25  Marek Polacek  <polacek@redhat.com>
11275         PR c/18079
11276         * c-common.c (handle_noinline_attribute): Warn if the attribute
11277         conflicts with always_inline attribute.
11278         (handle_always_inline_attribute): Warn if the attribute conflicts
11279         with noinline attribute.
11281 2014-04-25  Marek Polacek  <polacek@redhat.com>
11283         PR c/60156
11284         * c-common.c (check_main_parameter_types): Warn about variadic main.
11286 2014-04-24  Mike Stump  <mikestump@comcast.net>
11288         * c.opt (Wshadow-ivar): Default to on.
11290 2014-04-24  Dimitris Papavasiliou  <dpapavas@gmail.com>
11292         * c.opt (Wshadow-ivar, flocal-ivars, fivar-visibility): Add.
11294 2014-04-23  Marek Polacek  <polacek@redhat.com>
11296         * c-common.c (handle_tm_wrap_attribute): Tweak error message.
11298 2014-04-22  Jakub Jelinek  <jakub@redhat.com>
11300         PR sanitizer/60275
11301         * c-ubsan.c (ubsan_instrument_return): Return __builtin_trap ()
11302         if flag_sanitize_undefined_trap_on_error.
11303         (ubsan_instrument_division, ubsan_instrument_shift,
11304         ubsan_instrument_vla): Likewise.  Use __ubsan_handle_*_abort ()
11305         if !flag_sanitize_recover.
11307 2014-04-22  Marc Glisse  <marc.glisse@inria.fr>
11309         PR libstdc++/43622
11310         * c-common.c (registered_builtin_types): Make non-static.
11311         * c-common.h (registered_builtin_types): Declare.
11313 2014-04-14  Richard Biener  <rguenther@suse.de>
11314             Marc Glisse  <marc.glisse@inria.fr>
11316         PR c/60819
11317         * c-common.c (convert_vector_to_pointer_for_subscript): Properly
11318         apply may-alias the scalar pointer type when applicable.
11320 2014-04-12  Igor Zamyatin  <igor.zamyatin@intel.com>
11322         PR middle-end/60467
11323         * cilk.c (cilk_set_spawn_marker): Remove FUNCTION_DECL
11324         as possible argument for Cilk_spawn.
11326 2014-04-11  Tobias Burnus  <burnus@net-b.de>
11328         PR c/60194
11329         * c.opt (Wformat-signedness): Add
11330         * c-format.c(check_format_types): Use it.
11332 2014-04-11  Jason Merrill  <jason@redhat.com>
11334         PR c++/57926
11335         * c-common.c (sync_resolve_size, get_atomic_generic_size): Call
11336         default_conversion for an array argument.
11338 2014-04-08  Marek Polacek  <polacek@redhat.com>
11340         PR sanitizer/60745
11341         * c-ubsan.c: Include asan.h.
11342         (ubsan_instrument_return): Call initialize_sanitizer_builtins.
11344 2014-04-03  Nathan Sidwell  <nathan@codesourcery.com>
11346         * c.opt (Wnon-virtual-dtor): Auto set when Weffc++.
11348 2014-04-02  Marek Polacek  <polacek@redhat.com>
11350         * c-common.h (c_expand_expr): Remove declaration.
11352 2014-03-28  Jakub Jelinek  <jakub@redhat.com>
11354         PR c++/60689
11355         * c-common.c (add_atomic_size_parameter): When creating new
11356         params vector, push the size argument first.
11358 2014-03-26  Jakub Jelinek  <jakub@redhat.com>
11360         * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
11361         ubsan_instrument_vla, ubsan_instrument_return): Adjust
11362         ubsan_create_data callers.
11364 2014-03-22  Jakub Jelinek  <jakub@redhat.com>
11366         PR debug/60603
11367         * c-opts.c (c_finish_options): Restore cb_file_change call to
11368         <built-in>.
11370 2014-03-13  Jakub Jelinek  <jakub@redhat.com>
11372         PR middle-end/36282
11373         * c-pragma.c (apply_pragma_weak): Only look at
11374         TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl)) if
11375         DECL_ASSEMBLER_NAME_SET_P (decl).
11376         (maybe_apply_pending_pragma_weaks): Exit early if
11377         vec_safe_is_empty (pending_weaks) rather than only when
11378         !pending_weaks.
11379         (maybe_apply_pragma_weak): Likewise.  If !DECL_ASSEMBLER_NAME_SET_P,
11380         set assembler name back to NULL afterwards.
11382 2014-03-11  Jason Merrill  <jason@redhat.com>
11384         * c.opt: Add -std=gnu++14.
11386 2014-03-11  Ian Bolton  <ian.bolton@arm.com>
11388         * c-opts.c (c_common_post_options): Don't override
11389         -ffp-contract=fast if unsafe-math-optimizations is on.
11391 2014-03-08  Paulo Matos  <paulo@matos-sorge.com>
11393         * c.opt: Enable LTO FE for fshort-double.
11395 2014-03-07  Jason Merrill  <jason@redhat.com>
11397         * c.opt: Add -std=c++14.
11399 2014-03-06  Marek Polacek  <polacek@redhat.com>
11401         PR c/60197
11402         * cilk.c (contains_cilk_spawn_stmt): New function.
11403         (contains_cilk_spawn_stmt_walker): Likewise.
11404         (recognize_spawn): Give error on invalid use of _Cilk_spawn.
11405         * c-common.h (contains_cilk_spawn_stmt): Add declaration.
11407 2014-03-03  Jakub Jelinek  <jakub@redhat.com>
11409         * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_SIMD.
11410         (init_pragma): Call cpp_register_deferred_pragma for PRAGMA_CILK_SIMD
11411         even when flag_preprocess_only.
11413 2014-02-26  Jason Merrill  <jason@redhat.com>
11415         PR c++/59231
11416         PR c++/11586
11417         * c-common.c (shorten_compare): Don't check
11418         c_inhibit_evaluation_warnings.
11420 2014-02-19  Jakub Jelinek  <jakub@redhat.com>
11422         PR c/37743
11423         * c-common.c (c_common_nodes_and_builtins): When initializing
11424         c_uint{16,32,64}_type_node, also set corresponding
11425         uint{16,32,64}_type_node to the same value.
11427         PR c++/60267
11428         * c-pragma.c (init_pragma): Don't call cpp_register_deferred_pragma
11429         for PRAGMA_IVDEP if flag_preprocess_only.
11431 2014-02-12  Jakub Jelinek  <jakub@redhat.com>
11433         PR c/60101
11434         * c-common.c (merge_tlist): If copy is true, call new_tlist,
11435         if false, add ADD itself, rather than vice versa.
11436         (verify_tree): For COND_EXPR, don't call merge_tlist with non-zero
11437         copy.  For SAVE_EXPR, only call merge_tlist once.
11439 2014-02-08  Jakub Jelinek  <jakub@redhat.com>
11441         PR middle-end/60092
11442         * c-common.c (handle_alloc_size_attribute): Use tree_fits_uhwi_p
11443         and tree_to_uhwi.
11444         (handle_alloc_align_attribute, handle_assume_aligned_attribute): New
11445         functions.
11446         (c_common_attribute_table): Add alloc_align and assume_aligned
11447         attributes.
11449 2014-02-06  Marek Polacek  <polacek@redhat.com>
11451         PR c/60087
11452         * c-common.c (warn_for_sign_compare): Call warning_at with location
11453         instead of warning.
11455 2014-02-05  Marek Polacek  <polacek@redhat.com>
11457         PR c/53123
11458         * c-omp.c (c_finish_omp_atomic): Remove unreachable return
11459         statement.
11461 2014-02-04  Marek Polacek  <polacek@redhat.com>
11463         PR c/60036
11464         * c-common.c (conversion_warning): Unwrap C_MAYBE_CONST_EXPR and/or
11465         SAVE_EXPR.
11467 2014-02-03  Marc Glisse  <marc.glisse@inria.fr>
11469         PR c++/53017
11470         PR c++/59211
11471         * c-common.c (handle_aligned_attribute, handle_alloc_size_attribute,
11472         handle_vector_size_attribute, handle_nonnull_attribute): Call
11473         default_conversion on the attribute argument.
11474         (handle_nonnull_attribute): Increment the argument number.
11476 2014-01-31  Marek Polacek  <polacek@redhat.com>
11478         PR c/59963
11479         * c-common.c (add_atomic_size_parameter): Pass vNULL to
11480         build_function_call_vec.
11481         (resolve_overloaded_builtin): Likewise.
11482         * c-common.h (build_function_call_vec): Adjust declaration.
11484 2014-01-30  Marek Polacek  <polacek@redhat.com>
11486         PR c/59940
11487         * c-common.h (unsafe_conversion_p): Adjust declaration.
11488         (warnings_for_convert_and_check): Likewise.
11489         (convert_and_check): Likewise.
11490         * c-common.c (unsafe_conversion_p): Add location parameter.  Call
11491         expansion_point_location_if_in_system_header on it.
11492         (warnings_for_convert_and_check): Add location parameter.  Call
11493         expansion_point_location_if_in_system_header on it.  Use it.
11494         (convert_and_check): Add location parameter.  Use it.
11495         (conversion_warning): Likewise.
11496         (c_add_case_label): Adjust convert_and_check calls.
11497         (scalar_to_vector): Adjust unsafe_conversion_p calls.
11499 2014-01-24  Balaji V. Iyer  <balaji.v.iyer@intel.com>
11501         * c-common.c (c_define_builtins): Replaced flag_enable_cilkplus with
11502         flag_cilkplus.
11503         * c-pragma.c (init_pragma): Likewise.
11504         * c.opt: Likewise.
11506 2014-01-23  Marek Polacek  <polacek@redhat.com>
11508         PR c/59846
11509         * c-common.c (shorten_compare): Add location_t parameter.
11510         * c-common.h (shorten_binary_op): Adjust declaration.
11512 2014-01-23  Marek Polacek  <polacek@redhat.com>
11514         PR c/58346
11515         * c-common.c (pointer_to_zero_sized_aggr_p): New function.
11516         * c-common.h: Declare it.
11518 2014-01-20  Eric Botcazou  <ebotcazou@adacore.com>
11520         * c-ada-spec.h (dump_ada_specs): Revert prototype change.
11521         * c-ada-spec.c (dump_ads): Likewise.
11522         (cpp_check): Likewise.
11523         (dump_ada_specs): Likewise.
11525 2014-01-15  Laurent Alfonsi  <laurent.alfonsi@st.com>
11527         PR c++/49718
11528         * c-common.c (handle_no_instrument_function_attribute): Allow
11529         no_instrument_function attribute in class member
11530         definition/declaration.
11532 2014-01-15  Jakub Jelinek  <jakub@redhat.com>
11534         PR c/58943
11535         * c-omp.c (c_finish_omp_atomic): Set in_late_binary_op around
11536         build_modify_expr with non-NOP_EXPR opcode.  Handle return from it
11537         being COMPOUND_EXPR.
11538         (c_finish_omp_for): Handle incr being COMPOUND_EXPR with first
11539         operand a SAVE_EXPR and second MODIFY_EXPR.
11541 2014-01-09  Jakub Jelinek  <jakub@redhat.com>
11543         PR target/58115
11544         * c-pch.c (c_common_write_pch): Call
11545         prepare_target_option_nodes_for_pch.
11547 2014-01-02  Richard Sandiford  <rdsandiford@googlemail.com>
11549         Update copyright years
11551 2014-01-02  Richard Sandiford  <rdsandiford@googlemail.com>
11553         * array-notation-common.c, c-cilkplus.c: Use the standard form for
11554         the copyright notice.
11556 2013-12-28  Eric Botcazou  <ebotcazou@adacore.com>
11558         * c-ada-spec.c (print_constructor): New function.
11559         (print_destructor): Retrieve the origin of the destructor.
11560         (print_ada_declaration): Revamp handling of constructors/destructors.
11562 2013-12-23  Stuart Hastings  <stuart@apple.com>
11563             Bill Maddox  <maddox@google.com>
11564             Jason Merrill  <jason@redhat.com>
11566         * c.opt: Add -fdeclone-ctor-dtor.
11567         * c-opts.c (c_common_post_options): Default to on iff -Os.
11569 2013-12-18  Balaji V. Iyer  <balaji.v.iyer@intel.com>
11571         * c-common.c (c_common_attribute_table): Added "cilk simd function"
11572         attribute.
11573         * c-pragma.h (enum pragma_cilk_clause): Remove.
11574         (enum pragma_omp_clause): Added the following fields:
11575         PRAGMA_CILK_CLAUSE_NOMASK, PRAGMA_CILK_CLAUSE_MASK,
11576         PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_NONE,
11577         PRAGMA_CILK_CLAUSE_LINEAR, PRAGMA_CILK_CLAUSE_PRIVATE,
11578         PRAGMA_CILK_CLAUSE_FIRSTPRIVATE, PRAGMA_CILK_CLAUSE_LASTPRIVATE,
11579         PRAGMA_CILK_CLAUSE_UNIFORM.
11582 2013-12-11  Balaji V. Iyer  <balaji.v.iyer@intel.com>
11584         * cilk.c (cilk_outline): Made this function non-static.
11585         (gimplify_cilk_spawn): Removed pre_p and post_p arguments.
11586         (create_cilk_wrapper): Added a new parameter: a function pointer.
11587         (c_install_body_w_frame_cleanup): Remove
11588         (extract_free_variables): Added VEC_INIT_EXPR and CONSTRUCTOR case.
11589         * c-common.h (cilk_outline): New prototype.
11590         (gimplify_cilk_spawn): Removed two parameters.
11591         (cilk_install_body_with_frame_cleanup): New prototype.
11592         * c-gimplify.c (c_gimplify_expr): Added MODIFY_EXPR, CALL_EXPR and
11593         CILK_SPAWN_STMT case.
11595 2013-12-11  Bernd Schmidt  <bernds@codesourcery.com>
11597         * c-common.c (c_fully_fold_internal): Handle ADDR_SPACE_CONVERT_EXPR.
11599         * c-common.h (enum c_tree_index): Remove CTI_INT_ARRAY_TYPE.
11600         (int_array_type_node): Remove.
11601         * c-common.c (c_common_nodes_and_builtins): Don't build it.
11603 2013-12-05  Marek Polacek  <polacek@redhat.com>
11605         PR c/52023
11606         * c-common.c (c_sizeof_or_alignof_type): Move a declaration into
11607         [ADJUST_FIELD_ALIGN].
11609 2013-12-04  Joseph Myers  <joseph@codesourcery.com>
11611         PR c/52023
11612         * c-common.c (c_sizeof_or_alignof_type): Add parameter min_alignof
11613         and check field alignment if set.
11614         * c-common.h (c_sizeof_or_alignof_type): Update prototype.
11615         (c_sizeof, c_alignof): Update calls to c_sizeof_or_alignof_type.
11617 2013-12-04  Jakub Jelinek  <jakub@redhat.com>
11618             Marek Polacek  <polacek@redhat.com>
11620         * c-gimplify.c (c_gimplify_expr): If doing the integer-overflow
11621         sanitization, call unsigned_type_for only when !TYPE_OVERFLOW_WRAPS.
11623 2013-11-29   H.J. Lu  <hongjiu.lu@intel.com>
11625         PR c/59309
11626         * cilk.c (gimplify_cilk_spawn): Properly handle function without
11627         arguments.
11629 2013-11-29  Jakub Jelinek  <jakub@redhat.com>
11631         PR c/59280
11632         * c-common.c (get_priority): If TREE_VALUE (args) is IDENTIFIER_NODE,
11633         goto invalid.  If it is error_mark_node, don't issue further
11634         diagnostics.
11636 2013-11-28  Sergey Ostanevich  <sergos.gnu@gmail.com>
11638         * c.opt (Wopenmp-simd): New.
11640 2013-11-22  Jakub Jelinek  <jakub@redhat.com>
11642         * c-ubsan.h (ubsan_instrument_return): New prototype.
11643         * c-ubsan.c (ubsan_instrument_return): New function.
11645 2013-11-22  Andrew MacLeod  <amacleod@redhat.com>
11647         * c-common.c: Add required include files from gimple.h.
11648         * c-gimplify.c: Likewise.
11649         * cilk.c: Likewise.
11651 2013-11-22  David Malcolm  <dmalcolm@redhat.com>
11653         * c-common.c (unsafe_conversion_p): Remove use of
11654         EXPR_LOC_OR_HERE macro.
11655         (conversion_warning): Likewise.
11656         (warnings_for_convert_and_check): Likewise.
11657         (warn_for_collisions_1): Likewise.
11658         (shorten_compare): Likewise, and remove use of in_system_header
11659         macro, using the location from the former.
11660         * c-lex.c (dump_one_header): Remove use of input_filename macro.
11661         (cb_def_pragma): Remove use of in_system_header macro.
11662         (lex_string): Likewise.
11663         * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
11665 2013-11-20  Kenneth Zadeck  <zadeck@naturalbridge.com>
11666             Mike Stump  <mikestump@comcast.net>
11667             Richard Sandiford  <rdsandiford@googlemail.com>
11669         * c-ada-spec.c (is_simple_enum): Use tree_to_shwi and tree_to_uhwi
11670         instead of TREE_INT_CST_LOW, in cases where there is a protecting
11671         tree_fits_shwi_p or tree_fits_uhwi_p.
11672         (dump_generic_ada_node): Likewise.
11673         * c-format.c (check_format_arg): Likewise.
11674         * c-pretty-print.c (pp_c_integer_constant): Likewise.
11676 2013-11-20  Kenneth Zadeck  <zadeck@naturalbridge.com>
11678         * c-common.c (check_function_arguments_recurse): Use tree_to_uhwi.
11680 2013-11-19  Joshua J Cogliati  <jrincayc@yahoo.com>
11682         PR c/53001
11683         * c-common.c (unsafe_conversion_p): Make this function
11684         return an enumeration with more detail.
11685         (conversion_warning): Use the new return type of
11686         unsafe_conversion_p to separately warn either about conversions
11687         that lower floating point number precision or about the other
11688         kinds of conversions.
11689         * c-common.h (enum conversion_safety): New enumeration.
11690         (unsafe_conversion_p): switching return type to
11691         conversion_safety enumeration.
11692         * c.opt: Adding new warning -Wfloat-conversion and
11693         enabling it with -Wconversion.
11695 2013-11-19  Basile Starynkevitch  <basile@starynkevitch.net>
11697         * c-opts.c: Include plugin.h.
11698         (cb_file_change): Invoke plugin event PLUGIN_INCLUDE_FILE.
11700 2013-11-19  Marek Polacek  <polacek@redhat.com>
11702         * c-ubsan.c (ubsan_instrument_division): Adjust ubsan_create_data
11703         call.
11704         (ubsan_instrument_shift): Likewise.
11705         (ubsan_instrument_vla): Likewise.
11707 2013-11-18  Richard Sandiford  <rdsandiford@googlemail.com>
11709         * c-common.c (convert_vector_to_pointer_for_subscript): Remove
11710         cast to unsigned type.
11712 2013-11-18  Richard Sandiford  <rdsandiford@googlemail.com>
11714         * c-common.c (fold_offsetof_1): Use tree_to_uhwi rather than
11715         tree_low_cst.
11716         (complete_array_type): Update comment to refer to tree_to_[su]hwi
11717         rather than tree_low_cst.
11719 2013-11-18  Richard Sandiford  <rdsandiford@googlemail.com>
11721         * c-common.c, c-cppbuiltin.c: Replace tree_low_cst (..., 1) with
11722         tree_to_uhwi throughout.
11724 2013-11-18  Richard Sandiford  <rdsandiford@googlemail.com>
11726         * c-common.c, c-format.c, c-omp.c, c-pretty-print.c: Replace
11727         tree_low_cst (..., 0) with tree_to_shwi throughout.
11729 2013-11-18  Richard Sandiford  <rdsandiford@googlemail.com>
11731         * c-ada-spec.c, c-common.c, c-pretty-print.c: Replace
11732         host_integerp (..., 1) with tree_fits_uhwi_p throughout.
11734 2013-11-18  Richard Sandiford  <rdsandiford@googlemail.com>
11736         * c-ada-spec.c, c-common.c, c-format.c, c-pretty-print.c: Replace
11737         host_integerp (..., 0) with tree_fits_shwi_p throughout.
11739 2013-11-15  Aldy Hernandez  <aldyh@redhat.com>
11741         * c-cilkplus.c: New file.
11742         * c-common.c (readonly_error): Add location argument.
11743         * c-common.h (readonly_error): Same.
11744         (c_finish_cilk_clauses): Protoize.
11745         (c_check_cilk_loop): Same.
11746         c-omp.c (c_finish_omp_for): Handle CILK_SIMD nodes.
11747         Do not fail on error_mark_node.
11748         Abstract increment canonicalization to here...
11749         (c_omp_for_incr_canonicalize_ptr): New.
11750         c-pragma.c (init_pragma): Register "simd" pragma.
11751         c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_SIMD.
11752         (enum pragma_cilk_clause): New.
11754 2013-11-15  Richard Sandiford  <rdsandiford@googlemail.com>
11756         * c-pretty-print.c (pp_c_character_constant): Remove unnecessary
11757         wchar_type and host_integerp checks.
11759 2013-11-14  Andrew MacLeod  <amacleod@redhat.com>
11761         * c-common.c: Likewise.
11762         * c-gimplify.c: Likewise.
11763         * cilk.c: Likewise.
11765 2013-11-14  Diego Novillo  <dnovillo@google.com>
11767         * c-common.c: Include fold-const.h.
11768         Include stor-layout.h.
11769         Include calls.h.
11770         Include stringpool.h.
11771         Include attribs.h.
11772         Include varasm.h.
11773         Include trans-mem.h.
11774         * c-cppbuiltin.c: Include stor-layout.h.
11775         Include stringpool.h.
11776         * c-format.c: Include stringpool.h.
11777         * c-lex.c: Include stringpool.h.
11778         Include stor-layout.h.
11779         * c-pragma.c: Include stringpool.h.
11780         Include attribs.h.
11781         Include varasm.h.
11782         Include gcc-symtab.h.
11783         * c-pretty-print.c: Include stor-layout.h.
11784         Include attribs.h.
11785         * cilk.c: Include stringpool.h.
11786         Include calls.h.
11788 2013-11-13  Joseph Myers  <joseph@codesourcery.com>
11790         * c-common.h (enum rid): Add RID_AUTO_TYPE.
11791         * c-common.c (c_common_reswords): Add __auto_type.
11792         (keyword_begins_type_specifier): Handle RID_AUTO_TYPE.
11794 2013-11-12  Andrew MacLeod  <amacleod@redhat.com>
11796         * c-common.c: Include gimplify.h.
11797         * c-gimplify.c: Likewise.
11798         * cilk.c: Likewise.
11799         * c-omp.c: Include gimple-expr.h instead of gimple.h.
11800         * c-ubsan.c: Don't include gimple.h.
11802 2013-11-12  Joseph Myers  <joseph@codesourcery.com>
11804         * c-common.c (c_common_reswords): Add _Thread_local.
11806 2013-11-09  Joseph Myers  <joseph@codesourcery.com>
11808         * c-common.c (atomic_size_supported_p): New function.
11809         (resolve_overloaded_atomic_exchange)
11810         (resolve_overloaded_atomic_compare_exchange)
11811         (resolve_overloaded_atomic_load, resolve_overloaded_atomic_store):
11812         Use it instead of comparing size with a local list of sizes.
11814 2013-11-07  Andrew MacLeod  <amacleod@redhat.com>
11815             Joseph Myers  <joseph@codesourcery.com>
11817         * c-common.h (enum rid): Add RID_ATOMIC.
11818         * c-common.c (c_common_reswords): Add _Atomic.
11819         (sync_resolve_params): Use TYPE_MAIN_VARIANT on pointer argument.
11820         (keyword_is_type_qualifier): Accept RID_ATOMIC.
11821         * c-format.c (check_format_types): Check for extra _Atomic
11822         qualifiers in format argument.
11823         * c-pretty-print.c (pp_c_cv_qualifiers): Handle atomic qualifier.
11824         (pp_c_type_qualifier_list): Mention _Atomic in comment.
11826 2013-11-06  Tobias Burnus  <burnus@net-b.de>
11828         * c-common.c (reason_option_codes_t): Add CPP_W_DATE_TIME.
11830 2013-11-06  Joseph Myers  <joseph@codesourcery.com>
11832         * c-opts.c (c_common_post_options): Set -ffp-contract=off in C
11833         standards modes.
11834         * c-cppbuiltin.c (cpp_iec_559_value): Consider -ffp-contract=fast
11835         to mean lack of IEEE 754 support.
11837 2013-11-05  Tobias Burnus  <burnus@net-b.de>
11839         * c.opt (-Wdate-time): New option
11840         * c-opts.c (sanitize_cpp_opts): Pass on to libcpp.
11842 2013-11-05  Joseph Myers  <joseph@codesourcery.com>
11844         * c-cppbuiltin.c (cpp_iec_559_value): Test
11845         flag_excess_precision_cmdline not flag_excess_precision.
11847 2013-11-05  Tobias Burnus  <burnus@net-b.de>
11849         * c.opt (fopenmp-simd): New option.
11850         * c-pragma.c (omp_pragmas): Move pragmas which can contain simd to ...
11851         (omp_pragmas): ... this new struct.
11852         (c_pp_lookup_pragma): Also walk omp_pragmas.
11853         (init_pragma): Init pragmas for -fopenmp-simd.
11855 2013-11-04  Marek Polacek  <polacek@redhat.com>
11857         PR c++/58979
11858         * c-common.c (invalid_indirection_error): Handle RO_ARROW_STAR case.
11860 2013-11-04  Joseph Myers  <joseph@codesourcery.com>
11862         * c-cppbuiltin.c (cpp_iec_559_value, cpp_iec_559_complex_value):
11863         New functions.
11864         (c_cpp_builtins): Define __GCC_IEC_559 and __GCC_IEC_559_COMPLEX.
11866 2013-11-04  Eric Botcazou  <ebotcazou@adacore.com>
11868         * c-ada-spec.h (cpp_operation): Add IS_TRIVIAL.
11869         (dump_ada_specs): Adjust prototype of second callback.
11870         * c-ada-spec.c (cpp_check): New global variable.
11871         (dump_ada_nodes): Remove cpp_check parameter and do not pass it down.
11872         (print_generic_ada_decl): Likewise.
11873         (has_static_fields): Change return type to bool and add guard.
11874         (has_nontrivial_methods): New predicate.
11875         (is_tagged_type): Change return type to bool.
11876         (separate_class_package): Call has_nontrivial_methods.
11877         (pp_ada_tree_identifier): Minor tweaks.
11878         (dump_ada_function_declaration): Adjust calls to dump_generic_ada_node.
11879         (dump_ada_array_domains): Likewise.
11880         (dump_ada_array_type): Likewise.
11881         (dump_template_types): Remove cpp_check parameter and do not pass it to
11882         dump_generic_ada_node.
11883         (dump_ada_template): Likewise.
11884         (dump_generic_ada_node): Remove cpp_check parameter and do not pass it
11885         recursively.
11886         (print_ada_methods): Change return type to integer.  Remove cpp_check
11887         parameter and do not pass it down.
11888         (dump_nested_types): Remove cpp_check parameter and do not pass it to
11889         dump_generic_ada_node.
11890         (print_ada_declaration): Likewise.  Test RECORD_OR_UNION_TYPE_P before
11891         accessing methods.
11892         (print_ada_struct_decl): Remove cpp_check parameter and do not pass it
11893         down.  Use has_nontrivial_methods to recognize C++ classes.  Use return
11894         value of print_ada_methods.
11895         (dump_ads): Rename cpp_check parameter to check and adjust prototype.
11896         Set cpp_check to it before invoking dump_ada_nodes.
11897         (dump_ada_specs): Likewise.
11899 2013-11-03  Marek Polacek  <polacek@redhat.com>
11901         * c-ubsan.c: Don't include hash-table.h.
11902         (ubsan_instrument_vla): New function.
11903         * c-ubsan.h: Declare it.
11905 2013-10-31  David Malcolm  <dmalcolm@redhat.com>
11907         Automated part of renaming of symtab_node_base to symtab_node.
11909         Patch autogenerated by rename_symtab.py from
11910         https://github.com/davidmalcolm/gcc-refactoring-scripts
11911         revision 58bb219cc090b2f4516a9297d868c245495ee622
11913         * c-pragma.c (maybe_apply_pending_pragma_weaks): Rename
11914         symtab_node_base to symtab_node.
11916 2013-10-31  Edward Smith-Rowland  <3dw4rd@verizon.net>
11918         Implement C++14 digit separators.
11919         * c-lex.c (interpret_float): Remove digit separators from scratch string
11920         before building real literal.
11922 2013-10-30  Jakub Jelinek  <jakub@redhat.com>
11924         * cilk.c (create_cilk_helper_decl): Use HOST_WIDE_INT_PRINT_DEC.
11926 2013-10-29  Balaji V. Iyer  <balaji.v.iyer@intel.com>
11928         * c-common.c (c_common_reswords[]): Added _Cilk_spawn and _Cilk_sync
11929         fields.
11930         (c_define_builtins): Called cilk_init_builtins if Cilk Plus is
11931         enabled.
11932         * c-common.h (enum rid): Added RID_CILK_SPAWN and RID_CILK_SYNC.
11933         (insert_cilk_frame): New prototype.
11934         (cilk_init_builtins): Likewise.
11935         (gimplify_cilk_spawn): Likewise.
11936         (c_cilk_install_body_w_frame_cleanup): Likewise.
11937         (cilk_detect_spawn_and_unwrap): Likewise.
11938         (cilk_set_spawn_marker): Likewise.
11939         (build_cilk_sync): Likewise.
11940         (build_cilk_spawn): Likewise.
11941         * cilk.c: New file.
11943 2013-10-29  David Malcolm  <dmalcolm@redhat.com>
11945         Patch autogenerated by refactor_symtab.py from
11946         https://github.com/davidmalcolm/gcc-refactoring-scripts
11947         revision 58bb219cc090b2f4516a9297d868c245495ee622
11949         * c-gimplify.c (c_genericize): Update for conversion of symtab types
11950         to a true class hierarchy.
11951         * c-pragma.c (maybe_apply_pending_pragma_weaks): Likewise.
11953 2013-10-27  Richard Sandiford  <rdsandiford@googlemail.com>
11955         * c-lex.c (interpret_integer): Remove call to cpp_num_sign_extend.
11957 2013-10-26  Jeff Law  <law@redhat.com>
11959         * c-common.c (c_define_builtins): Remove mudflap support.
11960         * c.opt: Ignore and warn for mudflap options.
11962 2013-10-24  Tobias Burnus  <burnus@net-b.de>
11964         PR other/33426
11965         * c-pragma.c (init_pragma) Add #pragma ivdep handling.
11966         * c-pragma.h (pragma_kind): Add PRAGMA_IVDEP.
11968 2013-10-23  Jason Merrill  <jason@redhat.com>
11970         * c-format.c (gcc_cxxdiag_char_table): Add %X.
11972 2013-10-11  Jakub Jelinek  <jakub@redhat.com>
11974         * c-common.h (omp_clause_mask::operator !=): New method.
11975         * c-omp.c (c_omp_split_clauses): Use if ((mask & something) != 0)
11976         instead of if (mask & something) tests everywhere.
11978         * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP to
11979         201307 instead of 201107.
11980         * c-common.c (DEF_FUNCTION_TYPE_8): Define.
11981         (c_common_attribute_table): Add "omp declare target" and
11982         "omp declare simd" attributes.
11983         (handle_omp_declare_target_attribute,
11984         handle_omp_declare_simd_attribute): New functions.
11985         * c-omp.c: Include c-pragma.h.
11986         (c_finish_omp_taskgroup): New function.
11987         (c_finish_omp_atomic): Add swapped argument, if true,
11988         build the operation first with rhs, lhs arguments and use NOP_EXPR
11989         build_modify_expr.
11990         (c_finish_omp_for): Add code argument, pass it down to make_code.
11991         (c_omp_split_clauses): New function.
11992         (c_split_parallel_clauses): Removed.
11993         (c_omp_declare_simd_clause_cmp, c_omp_declare_simd_clauses_to_numbers,
11994         c_omp_declare_simd_clauses_to_decls): New functions.
11995         * c-common.h (omp_clause_mask): New type.
11996         (OMP_CLAUSE_MASK_1): Define.
11997         (omp_clause_mask::omp_clause_mask, omp_clause_mask::operator &=,
11998         omp_clause_mask::operator |=, omp_clause_mask::operator ~,
11999         omp_clause_mask::operator |, omp_clause_mask::operator &,
12000         omp_clause_mask::operator <<, omp_clause_mask::operator >>,
12001         omp_clause_mask::operator ==): New methods.
12002         (enum c_omp_clause_split): New.
12003         (c_finish_omp_taskgroup): New prototype.
12004         (c_finish_omp_atomic): Add swapped argument.
12005         (c_finish_omp_for): Add code argument.
12006         (c_omp_split_clauses): New prototype.
12007         (c_split_parallel_clauses): Removed.
12008         (c_omp_declare_simd_clauses_to_numbers,
12009         c_omp_declare_simd_clauses_to_decls): New prototypes.
12010         * c-pragma.c (omp_pragmas): Add new OpenMP 4.0 constructs.
12011         * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_CANCEL,
12012         PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_DECLARE_REDUCTION,
12013         PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_SIMD,
12014         PRAGMA_OMP_TARGET, PRAGMA_OMP_TASKGROUP and PRAGMA_OMP_TEAMS.
12015         Remove PRAGMA_OMP_PARALLEL_FOR and PRAGMA_OMP_PARALLEL_SECTIONS.
12016         (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ALIGNED,
12017         PRAGMA_OMP_CLAUSE_DEPEND, PRAGMA_OMP_CLAUSE_DEVICE,
12018         PRAGMA_OMP_CLAUSE_DIST_SCHEDULE, PRAGMA_OMP_CLAUSE_FOR,
12019         PRAGMA_OMP_CLAUSE_FROM, PRAGMA_OMP_CLAUSE_INBRANCH,
12020         PRAGMA_OMP_CLAUSE_LINEAR, PRAGMA_OMP_CLAUSE_MAP,
12021         PRAGMA_OMP_CLAUSE_NOTINBRANCH, PRAGMA_OMP_CLAUSE_NUM_TEAMS,
12022         PRAGMA_OMP_CLAUSE_PARALLEL, PRAGMA_OMP_CLAUSE_PROC_BIND,
12023         PRAGMA_OMP_CLAUSE_SAFELEN, PRAGMA_OMP_CLAUSE_SECTIONS,
12024         PRAGMA_OMP_CLAUSE_SIMDLEN, PRAGMA_OMP_CLAUSE_TASKGROUP,
12025         PRAGMA_OMP_CLAUSE_THREAD_LIMIT, PRAGMA_OMP_CLAUSE_TO and
12026         PRAGMA_OMP_CLAUSE_UNIFORM.
12028 2013-10-09  Marc Glisse  <marc.glisse@inria.fr>
12030         PR tree-optimization/20318
12031         * c-common.c (handle_returns_nonnull_attribute): New function.
12032         (c_common_attribute_table): Add returns_nonnull.
12034 2013-10-03  Marc Glisse  <marc.glisse@inria.fr>
12036         PR c++/19476
12037         * c.opt (fcheck-new): Move to common.opt.
12039 2013-09-25  Marek Polacek  <polacek@redhat.com>
12040             Jakub Jelinek  <jakub@redhat.com>
12042         PR sanitizer/58413
12043         * c-ubsan.c (ubsan_instrument_shift): Don't instrument
12044         an expression if we can prove it is correct.
12045         (ubsan_instrument_division): Likewise.  Remove unnecessary
12046         check.
12048 2013-09-18  Marek Polacek  <polacek@redhat.com>
12050         PR sanitizer/58411
12051         * c-common.c (handle_no_sanitize_undefined_attribute): New function.
12052         Declare it.
12053         (struct attribute_spec c_common_att): Add no_sanitize_undefined.
12055 2013-09-14  Iain Sandoe  <iain@codesourcery.com>
12057         PR target/48094
12058         * c.opt (fgnu-runtime, fnext-runtime, fobjc-abi-version,
12059         fobjc-gc, freplace-objc-classes): Accept for LTO.
12061 2013-09-13  Jacek Caban  <jacek@codeweavers.com>
12063         * c-target.def: New hook
12065 2013-09-09  Paolo Carlini  <paolo.carlini@oracle.com>
12067         PR c++/43452
12068         * c.opt (Wdelete-incomplete): Add.
12070 2013-09-08  Joern Rennecke  <joern.rennecke@embecosm.com>
12072         * c-common.c (same_scalar_type_ignoring_signedness): Delete.
12073         (vector_types_compatible_elements_p): New function.
12074         * c-common.h: (same_scalar_type_ignoring_signedness): Delete
12075         declaration.
12076         (vector_types_compatible_elements_p): Declare.
12078 2013-09-04  Gabriel Dos Reis  <gdr@integrable-solutions.net>
12080         * c-pretty-print.h (c_pretty_printer::simple_type_specifier): Now
12081         a virtual member function.
12082         (pp_simple_type_specifier): Remove.
12083         (pp_c_type_specifier): Likewise.
12084         * c-pretty-print.c (c_pretty_printer::simple_type_specifier):
12085         Rename from pp_c_type_specifier.  Adjust.
12086         (c_pretty_printer::c_pretty_printer): Do not assign to
12087         simple_type_specifier.
12089 2013-09-03  Gabriel Dos Reis  <gdr@integrable-solutions.net>
12091         * c-pretty-print.h (c_pretty_printer::type_id): Now a virtual
12092         member function.
12093         (c_pretty_printer::storage_class_specifier): Likewise.
12094         (c_pretty_printer::initializer): Likewise.
12095         (pp_declaration): Remove.
12096         (pp_declaration_specifiers): Likewise.
12097         (pp_abstract_declarator): Likewise.
12098         (pp_declarator): Likewise.
12099         (pp_type_id): Likewise.
12100         (pp_statement): Likewise.
12101         (pp_constant): Likewise.
12102         (pp_id_expression): Likewise.
12103         (pp_primary_expression): Likewise.
12104         (pp_unary_expression): Likewise.
12105         (pp_multiplicative_expression): Likewise.
12106         (pp_conditional_expression): Likewise.
12107         (pp_assignment_expression): Likewise.
12108         (pp_expression): Likewise.
12109         (pp_c_type_id): Likewise.
12110         (pp_c_storage_class_specifier): Likewise.
12111         * c-pretty-print.c (pp_c_type_cast): Tidy.
12112         (pp_c_pointer): Likewise.
12113         (pp_c_type_specifier): Likewise.
12114         (pp_c_parameter_type_list): Likewise.
12115         (pp_c_function_definition): Likewise.
12116         (pp_c_init_declarator): Likewise.
12117         (pp_c_initializer_list): Likewise.
12118         (pp_c_constructor_elts): Likewise.
12119         (c_pretty_printer::direct_abstract_declarator): Likewise.
12120         (c_pretty_printer::declaration_specifiers): Likewise.
12121         (c_pretty_printer::primary_expression): Likewise.
12122         (c_pretty_printer::postfix_expression): Likewise.
12123         (c_pretty_printer::type_id): Rename from pp_c_type_id.
12124         (c_pretty_printer::storage_class_specifier): Rename from
12125         pp_c_storage_class_specifier.
12126         (c_pretty_printer::initializer): Rename from pp_c_initializer.
12127         (c_pretty_printer::c_pretty_printer): Do not assign to type_id,
12128         storage_class_specifier, initializer, offset_list, flags.
12130 2013-08-30  Marek Polacek  <polacek@redhat.com>
12132         * c-ubsan.c: New file.
12133         * c-ubsan.h: New file.
12135 2013-08-30  Gabriel Dos Reis  <gdr@integrable-solutions.net>
12137         * c-pretty-print.h (c_pretty_printer::declaration): Now a virtual
12138         member function.
12139         (c_pretty_printer::declaration_specifiers): Likewise.
12140         (c_pretty_printer::declarator): Likewise.
12141         (c_pretty_printer::abstract_declarator): Likewise.
12142         (c_pretty_printer::direct_abstract_declarator): Likewise.
12143         (c_pretty_printer::direct_declarator): Likewise.
12144         (c_pretty_printer::function_specifier): Likewise.
12145         (pp_declaration): Adjust.
12146         (pp_declaration_specifiers): Likewise.
12147         (pp_abstract_declarator): Likewise.
12148         (pp_direct_declarator): Likewise.
12149         (pp_function_specifier): Likewise.
12150         (pp_direct_abstract_declarator): Remove as unused.
12151         (pp_c_declaration): Remove.
12152         (pp_c_declaration_specifiers): Likewise.
12153         (pp_c_declarator): Likewise.
12154         (pp_c_direct_declarator): Likewise.
12155         (pp_c_function_specifier): Likewise.
12156         (pp_c_direct_abstract_declarator): Likewise.
12157         * c-pretty-print.c (c_pretty_printer::abstract_declarator): Rename
12158         from pp_c_abstract_declarator.  Adjust.
12159         (c_pretty_printer::direct_abstract_declarator): Rename from
12160         pp_c_direct_abstract_declarator.  Adjust.
12161         (c_pretty_printer::function_specifier): Rename from
12162         pp_c_function_specifier.  Adjust.
12163         (c_pretty_printer::declaration_specifiers): Rename from
12164         pp_c_declaration_specifiers.  Adjust.
12165         (c_pretty_printer::direct_declarator): Rename from
12166         pp_c_direct_declarator.  Adjust.
12167         (c_pretty_printer::declarator): Rename from pp_c_declarator.  Adjust.
12168         (c_pretty_printer::declaration): Rename from pp_c_declaration.  Adjust.
12169         (c_pretty_printer::c_pretty_printer): Do not assign to
12170         declaration, declaration_specifiers, declarator,
12171         direct_declarator, direct_abstract_declarator, function_specifier.
12173 2013-08-26  Gabriel Dos Reis  <gdre@integrable-solutions.net>
12175         * c-pretty-print.h (c_pretty_printer::unary_expression): Now a
12176         virtual member function.
12177         (c_pretty_printer::multiplicative_expression): Likewise.
12178         (c_pretty_printer::conditional_expression): Likewise.
12179         (c_pretty_printer::assignment_expression): Likewise.
12180         (c_pretty_printer::expression): Likewise.
12181         (pp_unary_expression): Adjust.
12182         (pp_multiplicative_expression): Likewise.
12183         (pp_assignment_expression): Likewise.
12184         (pp_conditional_expression): Likewise.
12185         (pp_expression): Likewise.
12186         * c-pretty-print.c (c_pretty_printer::unary_expression): Rename
12187         from pp_c_unary_expression.  Adjust.
12188         (c_pretty_printer::multiplicative_expression): Rename from
12189         pp_c_multiplicative_expression.  Adjust.
12190         (c_pretty_printer::conditional_expression): Rename from
12191         pp_c_conditional_expression.  Adjust.
12192         (c_pretty_printer::assignment_expression): Rename from
12193         pp_c_assignment_expression.  Adjust.
12194         (c_pretty_printer::expression): Rename from pp_c_expression.  Adjust.
12195         (c_pretty_printer::c_pretty_printer): Do not assign to
12196         unary_expression, multiplicative_expression,
12197         conditional_expression, expression.
12199 2013-08-25  Gabriel Dos Reis  <gdr@integrable-solutions.net>
12201         * c-pretty-print.h (c_pretty_printer::postfix_expression): Now a
12202         virtual member function.
12203         (pp_postfix_expression): Adjust.
12204         (pp_c_postfix_expression): Remove.
12205         * c-pretty-print.c (c_pretty_printer::postfix_expression): Rename
12206         from pp_c_postfix_expression.  Adjust.
12207         (c_pretty_printer::c_pretty_printer): Do not assign to
12208         postfix_expression.
12210 2013-08-25  Gabriel Dos Reis  <gdr@integrable-solutions.net>
12212         * c-pretty-print.h (c_pretty_printer::primary_expression): Now a
12213         virtua member function.
12214         (pp_primary_expression): Adjust.
12215         (pp_c_primary_expression): Remove.
12216         * c-pretty-print.c (c_pretty_printer::primary_expression): Rename
12217         from pp_c_primary_expression.  Adjust.
12218         (pp_c_initializer_list): Use pp_primary_expression.
12219         (c_pretty_printer::c_pretty_printer): Do not assign to
12220         primary_expression.
12222 2013-08-25  Gabriel Dos Reis  <gdr@integrable-solutions.net>
12224         * c-pretty-print.h (c_pretty_printer::translate_string): Declare.
12225         * c-pretty-print.c (M_): Remove.
12226         (c_pretty_printer::translate_string): Define.
12227         (pp_c_type_specifier): Use it.
12228         (pp_c_primary_expression): Likewise.
12229         (pp_c_expression): Likewise.
12231 2013-08-24  Gabriel Dos Reis  <gdr@integrable-solutions.net>
12233         * c-pretty-print.h (c_pretty_printer::id_expression): Now a
12234         virtual function.
12235         (pp_c_id_expression): Remove.
12236         (pp_id_expression): Adjust.
12237         * c-pretty-print.c (c_pretty_printer::id_expression): Rename from
12238         pp_c_id_expression.  Adjust.
12239         (pp_c_postfix_expression): Use pp_id_expression.
12240         (c_pretty_printer::c_pretty_printer): Do not assign to id_expression.
12242 2013-08-24  Gabriel Dos Reis  <gdr@integrable-solutions.net>
12244         * c-pretty-print.h (c_pretty_printer::constant): Now a virtual
12245         member function.
12246         (pp_constant): Adjust.
12247         (pp_c_constant): Remove.
12248         * c-pretty-print.c (c_pretty_printer::constant): Rename from
12249         pp_c_constant.  Adjust.
12250         (pp_c_constant)
12251         (pp_c_primary_expression): Call pp_constant in lieu of pp_c_constant.
12252         (c_pretty_printer::c_pretty_printer): Remove assignment to constant.
12254 2013-08-22  Gabriel Dos Reis  <gdr@integrable-solutions.net>
12256         * c-pretty-print.h (pp_c_pretty_printer_init): Remove.
12257         (c_pretty_printer::c_pretty_printer): Declare.
12258         * c-pretty-print.c (pretty_printer::c_pretty_printer): Rename from
12259         c_pretty_printer_init.  Adjust.
12260         (print_c_tree): Do not call c_pretty_printer_init.
12261         * c-ada-spec.c (dump_ads): Remove call to pp_construct.
12263 2013-08-09  Arnaud Charlet  <charlet@adacore.com>
12265         * c-ada-spec.c (print_ada_declaration): Prevent accessing null asm name
12267 2013-08-05  Paolo Carlini  <paolo.carlini@oracle.com>
12269         PR c++/58080
12270         * c-common.c (pointer_int_sum): Add bool parameter.
12271         * c-common.h (pointer_int_sum): Adjust declaration.
12273 2013-08-05  Gabriel Dos Reis  <gdr@integrable-solutions.net>
12275         * c-pretty-print.c (print_c_tree): Simplify.  Use non-static local
12276         c_pretty_printer variable.
12278 2013-08-04  Gabriel Dos Reis  <gdr@integrable-solutions.net>
12280         * c-pretty-print.h (c_pretty_printer): Derive from pretty_printer.
12281         (pp_base): Remove.
12282         (pp_c_base): Likewise.  Adjust users.
12283         * c-pretty-print.c (pp_c_maybe_whitespace): Adjust.
12284         (pp_c_whitespace): Do not call pp_base.
12285         (pp_c_left_paren): Likewise.
12286         (pp_c_right_paren): Likewise.
12287         (pp_c_left_brace): Likewise.
12288         (pp_c_right_brace): Likewise.
12289         (pp_c_left_bracket): Likewise.
12290         (pp_c_right_bracket): Likewise.
12291         (pp_c_dot): Likewise.
12292         (pp_c_ampersand): Likewise.
12293         (pp_c_star): Likewise.
12294         (pp_c_arrow): Likewise.
12295         (pp_c_semicolon): Likewise.
12296         (pp_c_complement): Likewise.
12297         (pp_c_exclamation): Likewise.
12298         (pp_c_direct_declarator): Likewise.
12299         (pp_c_ws_string): Likewise.
12300         (pp_c_identifier): Likewise.
12301         (pp_c_statement): Likewise.
12302         (print_c_tree): Likewise.
12304 2013-08-04  Ed Smith-Rowland  <3dw4rd@verizon.net>
12306         PR c++/58072
12307         * c-common.c (c_parse_error): Catch user-defined literal tokens and
12308         provide useful error strings.
12310 2013-08-03  Gabriel Dos Reis  <gdr@integrable-solutions.net>
12312         * c-ada-spec.c (pp_ada_tree_identifier): Use specialized pretty
12313         printer functions instead of pp_string or operators and punctuators.
12314         (dump_generic_ada_node): Likewise.
12315         * c-pretty-print.c (pp_c_type_specifier): Likewise.
12316         (pp_c_relational_expression): Likewise.
12317         (pp_c_logical_or_expression): Likewise.
12319 2013-08-03  Gabriel Dos Reis  <gdr@integrable-solutions.net>
12321         * c-ada-spec.c (print_ada_macros): Use specialized pretty printer
12322         functions instead of pp_character.
12323         (pp_ada_tree_identifier): Likewise.
12324         (dump_ada_double_name): Likewise.
12325         (dump_ada_function_declaration): Likewise.
12326         (dump_ada_array_domains): Likewise.
12327         (dump_template_types): Likewise.
12328         (dump_generic_ada_node): Likewise.
12329         (print_ada_declaration): Likewise.
12330         (print_ada_struct_decl): Likewise.
12331         * c-pretty-print.c (pp_c_integer_constant): Likewise.
12333 2013-07-23  Tom Tromey  <tromey@redhat.com>
12335         * c-common.h (enum rid) <RID_GENERIC>: New constant.
12336         * c-common.c (c_common_reswords): Add _Generic.
12338 2013-07-21   Ondřej Bílka  <neleai@seznam.cz>
12340         * c-common.c: Fix typos.
12341         * c-common.h: Likewise.
12343 2013-07-13  Lubos Lunak  <l.lunak@suse.cz>
12345         PR c++/55203
12346         * c-common.c (c_common_attribute_table): Add warn_unused.
12347         (handle_warn_unused_attribute): New.
12349 2013-07-10  Jakub Jelinek  <jakub@redhat.com>
12351         * c-ppoutput.c (scan_translation_unit): Call account_for_newlines
12352         for all CPP_TOKEN_FLD_STR tokens, not just CPP_COMMENT.
12354 2013-07-10  Paolo Carlini  <paolo.carlini@oracle.com>
12356         PR c++/57869
12357         * c.opt: Add Wconditionally-supported.
12359 2013-07-08  Graham Stott  <graham.stott@btinternet.com>
12361         * array-notation-common.c (length_mismatch_in_expr_p): Delete
12362         unused variables l_length and l_node.
12364 2013-07-04  Joern Rennecke  <joern.rennecke@embecosm.com>
12366         PR c/57821
12367         * c-common.c (complete_array_type): Delay folding first index
12368         like other indices.  When folding, check for index overflow.
12370 2013-06-27  Marc Glisse  <marc.glisse@inria.fr>
12372         PR c++/57509
12373         * c-common.h (c_build_vec_perm_expr): New complain argument.
12374         * c-common.c (c_build_vec_perm_expr): Likewise.
12375         Use save_expr also in C++.
12377 2013-06-22  Gabriel Dos Reis  <gdr@integrable-solutions.net>
12379         * c-common.c (c_common_nodes_and_builtins): Use cxx11 in lieu of cxx0x.
12380         * c-cppbuiltin.c (c_cpp_builtins): Likewise.
12381         * c-opts.c (c_common_post_options): Likewise.
12383 2013-06-21  Balaji V. Iyer  <balaji.v.iyer@intel.com>
12385         * array-notation-common.c (length_mismatch_in_expr): Changed the
12386         parameter type's from a dynamic array to a vec_tree.  Also removed
12387         the size parameters.
12388         * c-common.h (length_mismatch_in_expr_p): Fixed prototype's as per
12389         the change above.
12391 2013-06-21  Balaji V. Iyer  <balaji.v.iyer@intel.com>
12393         * c-common.h (struct cilkplus_an_parts): New structure.
12394         (struct cilkplus_an_loop_parts): Likewise.
12395         (cilkplus_extract_an_triplets): New prototype.
12396         (fix_sec_implicit_args): Likewise.
12397         * array-notation-common.c (cilkplus_extract_an_triplets): New function.
12398         (fix_sec_implicit_args): Likewise.
12400 2013-06-20  Balaji V. Iyer  <balaji.v.iyer@intel.com>
12402         * array-notation-common.c (find_inv_trees): Removed an unwanted
12403         typecasting.
12404         * c-common.h (struct inv_list::additional_tcodes): Changed type from
12405         enum rid to enum tree_code.
12407 2013-06-11  Jan Hubicka  <jh@suse.cz>
12409         * c-common.c (handle_alias_ifunc_attribute): Do not set
12410         DECL_EXTERNAL for weakref variables.
12411         * c-pragma.c (handle_pragma_weak): Make sure aliases
12412         are not declared as external.
12414 2013-06-07  Balaji V. Iyer  <balaji.v.iyer@intel.com>
12416         * array-notation-common.c (length_mismatch_in_expr_p): Moved this
12417         function from c/c-array-notation.c.
12418         (is_cilkplus_reduce_builtin): Likewise.
12419         (find_rank): Likewise.
12420         (extract_array_notation_exprs): Likewise.
12421         (replace_array_notations): Likewise.
12422         (find_inv_trees): Likewise.
12423         (replace_inv_trees): Likewise.
12424         (contains_array_notation_expr): Likewise.
12425         (find_correct_array_notation_type): Likewise.
12426         * c-common.h (struct inv_list): Moved this struct from the file
12427         c/c-array-notation.c and added a new field called additional tcodes.
12428         (length_mismatch_in_expr_p): New prototype.
12429         (is_cilkplus_reduce_builtin): Likewise.
12430         (find_rank): Likewise.
12431         (extract_array_notation_exprs): Likewise.
12432         (replace_array_notation): Likewise.
12433         (find_inv_trees): Likewise.
12434         (replace_inv_trees): Likewise.
12435         (find_correct_array_notation_type): Likewise.
12437 2013-05-28  Balaji V. Iyer  <balaji.v.iyer@intel.com>
12439         * c-common.c (c_define_builtins): When cilkplus is enabled, the
12440         function array_notation_init_builtins is called.
12441         (c_common_init_ts): Added ARRAY_NOTATION_REF as typed.
12442         * c-common.def (ARRAY_NOTATION_REF): New tree.
12443         * c-common.h (build_array_notation_expr): New function declaration.
12444         (build_array_notation_ref): Likewise.
12445         (extract_sec_implicit_index_arg): New extern declaration.
12446         (is_sec_implicit_index_fn): Likewise.
12447         (ARRAY_NOTATION_CHECK): New define.
12448         (ARRAY_NOTATION_ARRAY): Likewise.
12449         (ARRAY_NOTATION_START): Likewise.
12450         (ARRAY_NOTATION_LENGTH): Likewise.
12451         (ARRAY_NOTATION_STRIDE): Likewise.
12452         * c-pretty-print.c (pp_c_postifix_expression): Added a new case for
12453         ARRAY_NOTATION_REF.
12454         (pp_c_expression): Likewise.
12455         * c.opt (flag_enable_cilkplus): New flag.
12456         * array-notation-common.c: New file.
12458 2013-05-14  Jakub Jelinek  <jakub@redhat.com>
12460         PR c++/57274
12461         * c-common.c (verify_tree): Don't recurse into SIZEOF_EXPR.
12463 2013-05-10  Marc Glisse  <marc.glisse@inria.fr>
12465         * c-common.c (vector_types_convertible_p): No TYPE_PRECISION for
12466         vectors.
12468 2013-05-07  Han Shen  <shenhan@google.com>
12470         * c-cppbuiltin.c (c_cpp_builtins): Added "__SSP_STRONG__=3".
12472 2013-04-29  Senthil Kumar Selvaraj  <senthil_kumar.selvaraj@atmel.com>
12474         * c-common.c (check_user_alignment): Emit error for negative values.
12476 2013-04-24  Paolo Carlini  <paolo.carlini@oracle.com>
12478         * c-opts.c (set_std_cxx11): Use CLK_CXX1Y and CLK_GNUCXX1Y.
12480 2013-04-24  Paolo Carlini  <paolo.carlini@oracle.com>
12482         * c-cppbuiltin.c (c_cpp_builtins): Do not define
12483         __GXX_EXPERIMENTAL_CXX1Y__.
12485 2013-04-24  Paolo Carlini  <paolo.carlini@oracle.com>
12486             Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
12488         * c.opt ([Wpointer-arith]): Enabled by -Wpedantic, as documented.
12489         * c-common.c (pointer_int_sum): Change -Wpointer-arith pedwarns
12490         to simply use OPT_Wpointer_arith.
12491         (c_sizeof_or_alignof_type): Likewise.
12493 2013-04-24  Paolo Carlini  <paolo.carlini@oracle.com>
12495         * c-cppbuiltin.c (c_cpp_builtins): Define __GXX_EXPERIMENTAL_CXX1Y__.
12497 2013-04-12  Jakub Jelinek  <jakub@redhat.com>
12499         * c-format.c (gcc_diag_char_table, gcc_tdiag_char_table,
12500         gcc_cdiag_char_table, gcc_cxxdiag_char_table): Add %r and %R format
12501         specifiers.
12503 2013-04-07  Steven Bosscher  <steven@gcc.gnu.org>
12505         * c-pragma.c (add_to_renaming_pragma_list): Fix leading comment.
12507 2013-04-03  Paolo Carlini  <paolo.carlini@oracle.com>
12509         * c-common.c (pointer_int_sum): Remove dead code.
12511 2013-03-09  Richard Sandiford  <rdsandiford@googlemail.com>
12513         PR middle-end/56524
12514         * c-common.c (handle_optimize_attribute): Don't call
12515         save_optabs_if_changed.
12517 2013-03-05  Jakub Jelinek  <jakub@redhat.com>
12519         PR middle-end/56461
12520         * c-pch.c (pch_init): Free target_validity at the end.
12522 2013-03-04  Jakub Jelinek  <jakub@redhat.com>
12524         * c-pretty-print.c (pp_c_pretty_printer_init): Clear pp->flags.
12526 2013-02-28  Konstantin Serebryany  <konstantin.s.serebryany@gmail.com>
12527             Jakub Jelinek  <jakub@redhat.com>
12529         PR sanitizer/56454
12530         * c-common.c (handle_no_sanitize_address_attribute): New function.
12531         (c_common_attribute_table): Add no_sanitize_address attribute.
12532         (handle_no_address_safety_analysis_attribute): Add
12533         no_sanitize_address attribute, not no_address_safety_analysis
12534         attribute.
12536 2013-02-18  Aldy Hernandez  <aldyh@redhat.com>
12538         PR target/52555
12539         * c-common.c (handle_optimize_attribute): Call
12540         save_optabs_if_changed.
12542 2013-02-18  Jakub Jelinek  <jakub@redhat.com>
12543             Steven Bosscher  <steven@gcc.gnu.org>
12545         PR pch/54117
12546         * c-opts.c (c_common_post_options): If debug info is enabled
12547         and non-dwarf*, refuse to load PCH files and when writing PCH
12548         file warn.
12550 2013-02-05  Jakub Jelinek  <jakub@redhat.com>
12552         PR middle-end/56167
12553         * c-common.c (handle_error_attribute): Fix condition.
12555 2013-01-30  Jakub Jelinek  <jakub@redhat.com>
12557         PR c++/55742
12558         * c-common.c (handle_target_attribute): Revert 2012-12-26 change.
12560 2013-01-18  Jason Merrill  <jason@redhat.com>
12562         PR target/54908
12563         * c.opt (-fextern-tls-init): New.
12564         * c-opts.c (c_common_post_options): Handle it.
12566 2013-01-09  Jakub Jelinek  <jakub@redhat.com>
12568         PR c/48418
12569         * c-common.c (c_fully_fold_internal): Warn for LSHIFT_EXPR and
12570         RSHIFT_EXPR, if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST
12571         and is either negative or bigger or equal to type precision
12572         of the first operand.
12574 2012-12-03  Marek Polacek  <polacek@redhat.com>
12576         PR c/55570
12577         * c-common.c (check_user_alignment): Swap order of tests,
12578         check TREE_CODE first.
12580 2012-11-29  Ed Smith-Rowland  <3dw4rd@verizon.net>
12582         PR c++/52654
12583         * c-common.h (overflow_type): New enum.
12584         (build_userdef_literal): Add overflow_type argument.
12585         (tree_userdef_literal): Add overflow_type.
12586         (USERDEF_LITERAL_OVERFLOW): New access macro.
12587         * c-common.c (build_userdef_literal): Add overflow_type
12588         argument.
12589         * c-lex.c (c_lex_with_flags): Add overflow_type to
12590         build_userdef_literal calls.
12591         (interpret_integer, interpret_float): Add overflow_type argument.
12593 2012-11-28  Richard Biener  <rguenther@suse.de>
12595         PR c/35634
12596         * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
12597         here and use a type with proper overflow behavior for types that would
12598         need to be promoted for the arithmetic.
12600 2012-11-23  Jakub Jelinek  <jakub@redhat.com>
12602         PR sanitizer/55435
12603         * c-common.c (handle_no_address_safety_analysis_attribute): New
12604         function.
12605         (c_common_attribute_table): Add no_address_safety_analysis.
12607 2012-11-16  Simon Baldwin  <simonb@google.com>
12609         * c.opt: Add f[no-]canonical-system-headers.
12610         * c-opts.c (c_common_handle_option): Handle
12611         OPT_fcanonical_system_headers.
12613 2012-11-09  Ed Smith-Rowland  <3dw4rd@verizon.net>
12615         PR c++/54413
12616         * c-opts.c (c_common_handle_option): Set new flags.
12617         * c.opt: Describe new flags.
12619 2012-11-09  Jason Merrill  <jason@redhat.com>
12621         * c.opt (Wabi-tag): New.
12623 2012-11-09  Andi Kleen  <ak@linux.intel.com>
12625         PR 55139
12626         * c-common.c (get_atomic_generic_size): Mask with
12627         MEMMODEL_MASK
12629 2012-11-07  Manuel López-Ibáñez  <manu@gcc.gnu.org>
12631         PR c/53063
12632         * c.opt (Wformat): Make it Alias Wformat=1.
12633         (Wformat-contains-nul,Wformat-extra-args,Wformat-nonliteral,
12634         Wformat-security,Wformat-y2k,Wformat-zero-length): Use
12635         LangEnabledBy.
12636         (Wformat=): RejectNegative. Use LangEnabledBy.
12637         (Wnonnull): Use LangEnabledBy.
12638         * c-opts.c (c_common_handle_option): Do not handle Wformat here.
12639         * c-format.c (set_Wformat): Delete.
12640         (decode_format_attr): Replace OPT_Wformat with OPT_Wformat_.
12641         (maybe_read_dollar_number): Likewise.
12642         (avoid_dollar_number): Likewise.
12643         (finish_dollar_format_checking): Likewise.
12644         (check_format_info): Likewise.
12645         (check_format_info_main): Likewise.
12646         (check_format_types): Likewise.
12647         (format_type_warning): Likewise.
12648         * c-common.c (int): Likewise.
12649         (check_function_sentinel): Likewise.
12650         * c-common.h (warn_format,set_Wformat): Do not declare here.
12652 2012-11-07  Manuel López-Ibáñez  <manu@gcc.gnu.org>
12654         PR c/53063
12655         * c.opt(Warray-bounds,Wdelete-non-virtual-dtor,Wenum-compare,
12656         Wmain,Woverlength-strings, Wunknown-pragmas,Wunused-macros):
12657         Use LangEnabledBy.
12658         (Wswitch,Wswitch-default,Wswitch-enum): Likewise. Move here from
12659         common.opt.
12660         (Wvariadic-macros): Init(1).
12661         * c-opts.c (c_common_handle_option): Do not handle them
12662         explicitly.
12663         (c_common_post_options): Likewise.
12664         (sanitize_cpp_opts): warn_unused_macros is now
12665         cpp_warn_unused_macros.
12666         (push_command_line_include): Likewise.
12667         * c-common.c (warn_unknown_pragmas): Do not define.
12668         * c-common.h (warn_unknown_pragmas): Do not declare.
12670 2012-11-07  Manuel López-Ibáñez  <manu@gcc.gnu.org>
12672         PR c/51294
12673         * c-common.c (conversion_warning): Handle conditional expressions.
12675 2012-10-29  Jonathan Wakely  <jwakely.gcc@gmail.com>
12677         PR c++/54930
12678         * c.opt (Wreturn_local_addr): Define new option.
12680 2012-10-25  Jason Merrill  <jason@redhat.com>
12682         * c.opt (Wvirtual-move-assign): New.
12684         * c.opt (Winherited-variadic-ctor): New.
12686 2012-10-25  Marc Glisse  <marc.glisse@inria.fr>
12688         PR c++/54427
12689         * c-common.c (scalar_to_vector): Handle VEC_COND_EXPR.
12691 2012-10-23  Joseph Myers  <joseph@codesourcery.com>
12693         * c-common.h (pch_cpp_save_state): Declare.
12694         * c-target.def (c_preinclude): New hook.
12695         * c-opts.c (done_preinclude): New.
12696         (push_command_line_include): Handle default preincluded header.
12697         (cb_file_change): Call pch_cpp_save_state when calling
12698         push_command_line_include.
12699         * c-pch.c (pch_ready_to_save_cpp_state, pch_cpp_state_saved)
12700         (pch_cpp_save_state): New.
12701         (pch_init): Call pch_cpp_save_state conditionally, instead of
12702         calling cpp_save_state.
12704 2012-10-20  Manuel López-Ibáñez  <manu@gcc.gnu.org>
12706         PR c/53063
12707         PR c/40989
12708         * c.opt (Waddress,Wchar-subscripts,Wsign-conversion,Wimplicit,
12709         Wimplicit-function-declaration,Wimplicit-int,Wsizeof-pointer-memaccess,
12710         Wnarrowing,Wparentheses,Wpointer-sign,Wreturn-type,Wsequence-point,
12711         Wsign-compare,Wuninitialized,Wmaybe-uninitialized,Wunused,
12712         Wvolatile-register-var): Add LangEnabledBy or EnabledBy.
12713         * c-opts.c (c_common_handle_option): Remove explicit handling from
12714         here.
12715         (c_common_post_options): Likewise.
12717 2012-10-18  Eric Botcazou  <ebotcazou@adacore.com>
12719         * c-ada-spec.c (LOCATION_COL): Delete.
12720         (compare_location): New function.
12721         (compare_node): Use it.
12722         (compare_comment): Likewise.
12724 2012-10-16  Manuel López-Ibáñez  <manu@gcc.gnu.org>
12726         PR c/53063
12727         PR c/40989
12728         * c.opt (Wstrict-aliasing=,Wstrict-overflow=): Use LangEnabledBy.
12729         * c-opts.c (c_common_handle_option): Do not set them here. Add
12730         comment.
12731         (c_common_post_options): Likewise.
12733 2012-10-16  Eric Botcazou  <ebotcazou@adacore.com>
12735         * c-ada-spec.c (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Define.
12736         (dump_generic_ada_node) <INTEGER_CST>: Deal with sizetype specially.
12737         Remove POINTER_TYPE handling, add large unsigned handling and use
12738         ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX for big numbers.
12740 2012-10-12  Jakub Jelinek  <jakub@redhat.com>
12742         PR c/54381
12743         * c-common.h (sizeof_pointer_memaccess_warning): Adjust prototype.
12744         * c-common.c (sizeof_pointer_memaccess_warning): Take array of 3
12745         locs and array of 3 trees instead of just single loc and single
12746         sizeof_arg tree.  Handle __builtin___*_chk builtins too, and
12747         also stpncpy, bcopy, bcmp, bzero, snprintf and vsnprintf builtins.
12748         For *cmp* builtins that take two sources strings report warnings
12749         about first and second source, not about destination and source.
12751 2012-10-12  Marc Glisse  <marc.glisse@inria.fr>
12753         PR c++/53055
12754         * c-common.h (enum ref_operator) [RO_ARROW_STAR]: New.
12756 2012-10-11  Eric Botcazou  <ebotcazou@adacore.com>
12758         * c-ada-spec.c (dump_ada_template): Bail out for template declarations
12759         declaring something coming from another file.
12761 2012-10-10  Arnaud Charlet  <charlet@adacore.com>
12763         PR ada/54845
12764         * c-ada-spec.c (print_ada_struct_decl): Increase buf size.
12766 2012-10-09  Paolo Carlini  <paolo.carlini@oracle.com>
12768         PR c++/54194
12769         * c-common.c (warn_about_parentheses): Add location_t parameter;
12770         use EXPR_LOC_OR_LOC.
12771         * c-common.h: Update declaration.
12773 2012-10-09  Marc Glisse  <marc.glisse@inria.fr>
12775         PR c++/54427
12776         * c-common.c (scalar_to_vector): Moved from c-typeck.c. Support
12777         more operations. Make error messages optional.
12778         * c-common.h (enum stv_conv): Moved from c-typeck.c.
12779         (scalar_to_vector): Declare.
12781 2012-10-08  Jason Merrill  <jason@redhat.com>
12783         * c-common.c (c_common_reswords): Add thread_local.
12785 2012-10-08  Dodji Seketeli  <dodji@redhat.com>
12787         PR c++/53528 C++11 attribute support
12788         * c-common.h (bitfield_p, cxx_fundamental_alignment_p): Declare
12789         new functions.
12790         * c-common.c (check_cxx_fundamental_alignment_constraints): New
12791         static function.
12792         (handle_aligned_attribute): In choose strictest alignment
12793         among many.  Use new check_cxx_fundamental_alignment_constraints.
12794         (handle_transparent_union_attribute): In c++11 attribute syntax,
12795         don't look through typedefs.
12797 2012-10-04  Arnaud Charlet  <charlet@adacore.com>
12799         * c-ada-spec.c (print_ada_declaration): Remove handling of TDF_RAW.
12800         * c.opt (-fdump-ada-spec, -fdump-ada-spec-slim): Move switch definition
12801         out of dumpfile.h.
12803 2012-09-25  Dehao Chen  <dehao@google.com>
12805         PR middle-end/54645
12806         * c-pch.c (c_common_read_pch): Rebuild the location_adhoc_data
12807         map when read in the pch.
12809 2012-09-18  Arnaud Charlet  <charlet@adacore.com>
12811         * c-ada-spec.c: Style fixes.
12813 2012-09-18  Thomas Quinot  <quinot@adacore.com>
12815         * c.opt (-fada-spec-parent): Define new command line switch.
12816         * c-ada-spec.c (get_ada_package): When -fada-spec-parent
12817         is specified, generate binding spec as a child of the specified unit.
12819 2012-09-13  Paolo Carlini  <paolo.carlini@oracle.com>
12820             Manuel López-Ibáñez  <manu@gcc.gnu.org>
12822         PR c++/53210
12823         * c.opt ([Winit-self]): Enabled by -Wall in C++.
12825 2012-08-23  Arnaud Charlet  <charlet@adacore.com>
12827         * c-ada-spec.c (dump_generic_ada_node): Fix handling of name_only
12828         for pointers, and add missing Convention C pragma.
12829         (print_ada_struct_decl): Add missing aliased keyword.
12830         (dump_ads): Add pragma Ada_2005 and Style_Checks (Off).
12832 2012-08-17  Jakub Jelinek  <jakub@redhat.com>
12834         * c-common.c (sizeof_pointer_memaccess_warning): New function.
12835         * c.opt (-Wsizeof-pointer-memaccess): Add new option.
12836         * c-opts.c (c_common_handle_option): Enable it for -Wall.
12837         * c-common.h (sizeof_pointer_memaccess_warning): Add prototype.
12838         * c-common.def (SIZEOF_EXPR): Moved here from cp-tree.def.
12840 2012-08-10  Richard Guenther  <rguenther@suse.de>
12842         * c-pretty-print.c (pp_c_expression): Handle anonymous SSA names.
12844 2012-08-07  Steven Bosscher  <steven@gcc.gnu.org>
12846         * c-pretty-print.c (pp_c_function_definition): Use pp_newline_and_flush
12847         instead of separate pp_newline and pp_flush.
12848         (print_c_tree): Likewise.
12850 2012-07-26  Richard Henderson  <rth@redhat.com>
12852         * c-common.c (handle_hot_attribute): Allow labels.
12853         (handle_cold_attribute): Likewise.
12855 2012-07-20  Jakub Jelinek  <jakub@redhat.com>
12857         PR c++/28656
12858         * c-common.c (check_function_nonnull): Handle multiple nonnull
12859         attributes properly.
12861 2012-07-16  Steven Bosscher  <steven@gcc.gnu.org>
12863         * c-gimplify.c: Include dumpfile.h instead of tree-dump.h.
12864         * c-ada-spec.c: Likewise.
12865         * c-dump.c (dump_stmt): Move to cp/dump.c, the only user.
12867 2012-07-14  Steven Bosscher  <steven@gcc.gnu.org>
12869         * c-pch.c (CHECK_NO_ASM_OUT_DURING_PCH): Do not define.
12870         Remove code conditional on it.
12872 2012-07-11  Steven Bosscher  <steven@gcc.gnu.org>
12874         * c-gimplify.c: Do not include basic-block.h.
12875         * c-common.c: Do not include linfuncs.h.
12877 2012-07-08  Steven Bosscher  <steven@gcc.gnu.org>
12879         * c-common.h: Include tree.h.
12881 2012-07-02  Jason Merrill  <jason@redhat.com>
12883         PR c++/53524
12884         * c-common.c (get_priority): Call default_conversion.
12886 2012-07-01  Uros Bizjak  <ubizjak@gmail.com>
12888         * c-pch.c (c_common_write_pch): Remove unused variables.
12890 2012-06-29  Steven Bosscher  <steven@gcc.gnu.org>
12892         * cppspec.c: Moved from gcc/ to here.
12894 2012-06-27  Kai Tietz  <ktietz@redhat.com>
12896         PR preprocessor/37215
12897         * c-ppoutput.c (preprocess_file): Check for nonempty buffer.
12899 2012-06-21  Steven Bosscher  <steven@gcc.gnu.org>
12901         * c-common.h (c_common_print_pch_checksum): Remove.
12902         * c-pch.c: Do not include output.h.
12903         (CHECK_NO_ASM_OUT_DURING_PCH): Define and add FIXME.
12904         (asm_out_file): Define iff CHECK_NO_ASM_OUT_DURING_PCH isdefined.
12905         (asm_file_startpos): Define iff CHECK_NO_ASM_OUT_DURING_PCH is defined.
12906         (struct c_pch_header): Remove.
12907         (get_ident): Update gpch version.
12908         (pch_init): Do not print executable_checksum to asm_out_file.
12909         Do not fail if there is no asm_out_file to read back from.  Set
12910         asm_file_startpos only if CHECK_NO_ASM_OUT_DURING_PCH is defined.
12911         (c_common_write_pch): Verify that nothing was written to asm_out_file
12912         since pch_init was called.  Do not write a c_pch_header, and do not
12913         copy from asm_out_file to the PCH.
12914         (c_common_read_pch): Do not read a c_pch_header, and do not restore
12915         the content of asm_out_file from the PCH.
12916         (c_common_print_pch_checksum): Remove.
12917         * c-opts.c (c_common_init): Print out executable_checksum directly.
12919 2012-06-19  Steven Bosscher  <steven@gcc.gnu.org>
12921         * c-target.def (objc_declare_unresolved_class_reference,
12922         objc_declare_class_definition): Add new hooks.
12924 2012-06-19  Steven Bosscher  <steven@gcc.gnu.org>
12926         * c-lex.c: Do not include output.h.
12927         (cb_ident): Try to put out .ident with targetm.asm_out.output_ident.
12928         Remove uses of ASM_OUTPUT_IDENT.
12930 2012-06-15  Marc Glisse  <marc.glisse@inria.fr>
12932         PR c++/51033
12933         * c-common.h (c_build_vec_perm_expr): Move decl here.
12934         * c-common.c (c_build_vec_perm_expr): Move definition
12935         here.
12937 2012-06-06  Steven Bosscher  <steven@gcc.gnu.org>
12939         * c.opt (fconserve-space): Turn into a no-op.
12941 2012-06-04  Sterling Augustine  <saugustine@google.com>
12943         * c-pretty-print.h (pp_c_flag_gnu_v3): New enumerator.
12944         * c-pretty-print.c (pp_c_specifier_qualifier_list): Check it at
12945         both the start and end of the function.
12947 2012-06-04  Steven Bosscher  <steven@gcc.gnu.org>
12949         * c-common.c: Do not include output.h.
12950         * c-pragma.c: Likewise.
12952 2012-06-04  Steven Bosscher  <steven@gcc.gnu.org>
12954         * error.c (dump_decl): Check pp_c_flag_gnu_v3.
12955         (decl_as_dwarf_string, lang_decl_dwarf_name): New functions.
12956         (lang_decl_name): Handle namespace decls.
12958 2012-05-31  Steven Bosscher  <steven@gcc.gnu.org>
12960         * c-ada-spec.c: Do not include output.h.
12961         * c-semantics.c: Likewise.
12963 2012-05-29  Joseph Myers  <joseph@codesourcery.com>
12965         * c-common.c: Fix typo.
12967 2012-05-29  Michael Matz  <matz@suse.de>
12969         * c-common.h (c_expand_decl): Remove prototype.
12971 2012-05-29  Manuel López-Ibáñez  <manu@gcc.gnu.org>
12973         * c.opt (Wmissing-braces): Use LangEnabledBy(C ObjC,Wall).
12974         * c-opts.c (c_common_handle_option): Remove code handling
12975         warn_missing_braces.
12977 2012-05-28  Paolo Carlini  <paolo.carlini@oracle.com>
12979         PR c++/25137
12980         * c-opts.c (c_common_handle_option): For C++ -Wall doesn't enable
12981         -Wmissing_braces.
12983 2012-05-22  Dodji Seketeli  <dodji@redhat.com>
12985         PR c++/53322
12986         * c.opt (Wunused-local-typedefs): Use EnabledBy(Wunused).
12988 2012-05-17  Manuel López-Ibáñez  <manu@gcc.gnu.org>
12990         * c.opt (--pedantic-errors,-pedantic-errors): Do not handle here.
12991         * c-opts.c (c_common_handle_option): Do not handle explicitly
12992         Wreturn-type, Wwrite-strings, warn_ecpp, and -pedantic-errors.
12994 2012-05-16  Dodji Seketeli  <dodji@redhat.com>
12996         PR preprocessor/7263
12997         * c-lex.c (c_lex_with_flags): Pass a virtual location to the call
12998         to cpp_classify_number.  For diagnostics, use the precise location
12999         instead of the global input_location.
13001 2012-05-15  Paolo Carlini  <paolo.carlini@oracle.com>
13003         PR c++/11856
13004         * c-common.c (shorten_compare): Check c_inhibit_evaluation_warnings.
13006 2012-05-14  Bernd Schmidt  <bernds@codesourcery.com>
13008         * c-common.c (DEF_ATTR_STRING): Define and undefine as necessary.
13010 2012-05-14  Manuel López-Ibáñez  <manu@gcc.gnu.org>
13012         PR 53063
13013         * c.opt (Wc++0X-compat,Wdelete-non-virtual-dtor,Wjump-misses-init,
13014         Wreorder): Use LangEnabledBy.
13015         * c-opts.c (c_common_handle_option): Do not enable them
13016         explicitly. Call lang-specific generated functions.
13017         (c_common_post_options): Do not set them here.
13019 2012-05-13  Manuel López-Ibáñez  <manu@gcc.gnu.org>
13021         * c.opt (Wclobbered,Wempty-body,Wignored-qualifiers,
13022         Wmissing-field-initializers,Wmissing-parameter-type,
13023         Wold-style-declaration,Woverride-init): Use EnabledBy.
13024         * c-opts.c (c_common_post_options): Do not set here explicitly.
13026 2012-05-11  Manuel López-Ibáñez  <manu@gcc.gnu.org>
13028         PR 53063
13029         * c-opts.c (c_common_handle_option): Use handle_generated_option
13030         to enable sub-options.
13032 2012-05-10  Paolo Carlini  <paolo.carlini@oracle.com>
13034         PR c++/53158
13035         * c-common.c (warnings_for_convert_and_check): Use warning_at.
13037 2012-05-10  Richard Guenther  <rguenther@suse.de>
13039         * c-common.c (c_sizeof_or_alignof_type): Remove assert and
13040         adjust commentary about TYPE_IS_SIZETYPE types.
13042 2012-05-09  Manuel López-Ibáñez  <manu@gcc.gnu.org>
13044         PR c++/53261
13045         * c-common.c (warn_logical_operator): Check that argument of
13046         integer_zerop is not NULL.
13048 2012-05-05  Manuel López-Ibáñez  <manu@gcc.gnu.org>
13050         PR c/43772
13051         * c-common.c (warn_logical_operator): Do not warn if either side
13052         is already true or false.
13054 2012-05-04  Manuel López-Ibáñez  <manu@gcc.gnu.org>
13056         PR c/51712
13057         * c-common.c (expr_original_type): New.
13058         (shorten_compare): Do not warn for enumeration types.
13060 2012-05-03  Manuel López-Ibáñez  <manu@gcc.gnu.org>
13062         * c.opt (fpermissive): Add Var(flag_permissive).
13064 2012-04-30  Marc Glisse  <marc.glisse@inria.fr>
13066         PR c++/51033
13067         * c-common.c (convert_vector_to_pointer_for_subscript): New function.
13068         * c-common.h (convert_vector_to_pointer_for_subscript): Declare it.
13070 2012-04-30  Dodji Seketeli  <dodji@redhat.com>
13072         Add -Wvarargs option
13073         * c.opt (Wvarargs): Define new option.
13075 2012-04-30  Manuel López-Ibáñez  <manu@gcc.gnu.org>
13077         * c-common.c (check_function_arguments): Replace
13078         Wmissing-format-attribute with Wsuggest-attribute=format.
13080 2012-04-30  Manuel López-Ibáñez  <manu@gcc.gnu.org>
13082         * c.opt (Wsuggest-attribute=format): New. Alias of
13083         Wmissing-format-attribute.
13084         * c-format.c (decode_format_type): Replace
13085         Wmissing-format-attribute with Wsuggest-attribute=format.
13086         (check_function_format): Likewise.
13088 2012-04-27  Ollie Wild  <aaw@google.com>
13090         * c-common.c: Add CPP_W_LITERAL_SUFFIX mapping.
13091         * c-opts.c (c_common_handle_option): Handle OPT_Wliteral_suffix.
13092         * c.opt: Add Wliteral-suffix.
13094 2012-04-22  Manuel López-Ibáñez  <manu@gcc.gnu.org>
13096         PR c/44774
13097         * c.opt (Wpedantic): New.
13098         (pedantic): Alias Wpedantic.
13099         * c-opts.c (c_common_handle_option): Replace -pedantic with -Wpedantic.
13100         (c_common_post_options): Likewise.
13101         (sanitize_cpp_opts): Likewise.
13102         * c-lex.c (interpret_float): Likewise.
13103         * c-format.c (check_format_types): Likewise.
13104         * c-common.c (pointer_int_sum): Likewise.
13105         (c_sizeof_or_alignof_type): Likewise.
13106         (c_add_case_label): Likewise.
13107         (c_do_switch_warnings): Likewise.
13108         * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
13110 2012-04-15  Jason Merrill  <jason@redhat.com>
13112         PR c++/52818
13113         * c-format.c (CPLUSPLUS_STD_VER): C++11 inherits from C99.
13114         (C_STD_NAME): Distinguish between C++98 and C++11.
13116 2012-04-11  Eric Botcazou  <ebotcazou@adacore.com>
13118         PR target/52624
13119         * c-common.h (uint16_type_node): Rename into...
13120         (c_uint16_type_node): ...this.
13121         * c-common.c (c_common_nodes_and_builtins): Adjust for above renaming.
13122         * c-cppbuiltin.c (builtin_define_stdint_macros): Likewise.
13124 2012-04-10  Manuel López-Ibáñez  <manu@gcc.gnu.org>
13126         * c-common.c (warn_if_unused_value): Move definition to here.
13127         * c-common.h (warn_if_unused_value): Move declaration to here.
13129 2012-03-23  William Bader  <williambader@hotmail.com>
13131         * c-lex.c (c_lex_with_flags): Avoid declarations after stmts.
13133 2012-03-20  Jason Merrill  <jason@redhat.com>
13135         * c-common.h (enum cxx_dialect): Add cxx1y.
13136         * c-common.c (c_common_nodes_and_builtins): Use >= for cxx_dialect
13137         test.
13138         * c-cppbuiltin.c (c_cpp_builtins): Likewise.
13139         * c-opts.c (c_common_post_options): Likewise.
13140         (set_std_cxx1y): New.
13141         (c_common_handle_option): Call it.
13142         * c.opt (-std=c++1y, -std=gnu++1y): New flags.
13144 2012-03-19  Paolo Carlini  <paolo.carlini@oracle.com>
13146         PR c++/14710
13147         * c.opt ([Wuseless-cast]): Add.
13149 2012-03-16  Richard Guenther  <rguenther@suse.de>
13151         * c-pretty-print.c (pp_c_initializer_list): Adjust.
13153 2012-03-15  Manuel López-Ibáñez  <manu@gcc.gnu.org>
13155         PR c++/44783
13156         * c.opt (ftemplate-backtrace-limit) Add.
13158 2012-03-12  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
13160         * c-cppbuiltin.c (c_cpp_builtins): Remove #pragma extern_prefix
13161         handling.
13162         * c-pragma.c (handle_pragma_extern_prefix): Remove.
13163         (init_pragma): Don't register extern_prefix.
13165 2012-03-12  Richard Guenther  <rguenther@suse.de>
13167         * c-common.c (c_common_get_narrower): Use c_common_type_for_size.
13168         (builtin_type_for_size): Likewise.
13170 2012-02-13  Jakub Jelinek  <jakub@redhat.com>
13172         PR c++/52215
13173         * c-common.c (sync_resolve_params): Don't decide whether to convert
13174         or not based on TYPE_SIZE comparison, convert whenever arg_type
13175         is unsigned INTEGER_TYPE.
13177 2012-02-06  Paolo Carlini  <paolo.carlini@oracle.com>
13179         PR c/52118
13180         * c.opt ([Wunused-local-typedefs]): Fix description.
13182 2012-01-24  Mike Stump  <mikestump@comcast.net>
13184         * c-common.c (c_common_type_for_mode): Match signed/unsigned types
13185         exactly.
13187 2012-01-18  Richard Guenther  <rguenther@suse.de>
13189         * c-opts.c (c_common_post_options): Reset LTO flags if
13190         we are about to generate a PCH.
13192 2012-01-17  Paolo Carlini  <paolo.carlini@oracle.com>
13194         PR c++/51777
13195         * c-pretty-print.c (pp_c_integer_constant): For unsigned constants
13196         use pp_unsigned_wide_integer.
13198 2012-01-10  Richard Guenther  <rguenther@suse.de>
13200         PR middle-end/51806
13201         * c-opts.c (c_common_handle_option): Move -Werror handling
13202         to language independent code.
13204 2012-01-05  Richard Guenther  <rguenther@suse.de>
13206         PR middle-end/51764
13207         * c.opt (Wmudflap, fmudflap, fmudflapth, fmudflapir): Move here
13208         from common.opt.
13210 2011-12-30  Paolo Carlini  <paolo.carlini@oracle.com>
13212         PR c++/51316
13213         * c-common.c (c_sizeof_or_alignof_type): In C++ allow for alignof
13214         of array types with an unknown bound.
13216 2011-12-20  Joseph Myers  <joseph@codesourcery.com>
13218         * c-common.c (flag_isoc99): Update comment to refer to C11.
13219         (flag_isoc1x): Change to flag_isoc11.
13220         * c-common.h (flag_isoc99): Update comment to refer to C11.
13221         (flag_isoc1x): Change to flag_isoc11.
13222         * c-cppbuiltin.c (cpp_atomic_builtins): Change comment to refer to
13223         C11.
13224         * c-opts.c (set_std_c1x): Change to set_std_c11.
13225         (c_common_handle_option): Handle OPT_std_c11 and OPT_std_gnu11.
13226         Call set_std_c11.
13227         (set_std_c89, set_std_c99, set_std_c11): Use flag_isoc11.
13228         (set_std_c1): Use CLK_STDC11 and CLK_GNUC11.
13229         * c.opt (std=c1x): Change to std=c11.  Document as non-draft
13230         standard.
13231         (std=c1x, std=iso9899:2011): Add as aliases of std=c11.
13232         (std=gnu1x): Change to std=gnu11.  Refer to non-draft standard.
13233         (std=gnu1x): Make alias of std=gnu11.
13235 2011-12-19  Jason Merrill  <jason@redhat.com>
13237         PR c++/51228
13238         * c-common.c (handle_transparent_union_attribute): Check the first
13239         field if the type is complete.
13241 2011-12-15  Jonathan Wakely  <jwakely.gcc@gmail.com>
13243         PR libstdc++/51365
13244         * c-common.c (RID_IS_FINAL): Add.
13245         * c-common.h (RID_IS_FINAL): Add.
13247 2011-11-30  Iain Sandoe  <iains@gcc.gnu.org>
13249         * c.opt (fgnu-runtime): Provide full description.
13250         (fnext-runtime): Likewise.
13251         * c-opts.c (OPT_fgnu_runtime, OPT_fnext_runtime) Remove.
13253 2011-11-28  Andrew MacLeod  <amacleod@redhat.com>
13255         * c-cpp-builtin.c (cpp_atomic_builtins):New.  Emit all atomic
13256         predefines in one place.  Add LOCK_FREE predefines.
13257         (c_cpp_builtins): Move Legacy HAVE_SYNC predefines to
13258         new func.
13260 2011-11-24  Andrew MacLeod  <amacleod@redhat.com>
13262         PR c/51256
13263         * c-common.c (get_atomic_generic_size): Check for various error
13264         conditions
13265         (resolve_overloaded_atomic_exchange,
13266         resolve_overloaded_atomic_compare_exchange,
13267         resolve_overloaded_atomic_load, resolve_overloaded_atomic_store): Return
13268         error_mark_node for error conditions.
13270 2011-11-08  Richard Guenther  <rguenther@suse.de>
13272         PR middle-end/51010
13273         * c-pretty-print.c (pp_c_expression): Handle SSA_NAMEs.
13275 2011-11-07  Richard Henderson  <rth@redhat.com>
13276             Aldy Hernandez  <aldyh@redhat.com>
13277             Torvald Riegel  <triegel@redhat.com>
13279         Merged from transactional-memory.
13281         * c-common.c (handle_tm_wrap_attribute,
13282         handle_tm_attribute, ignore_attribute, parse_tm_stmt_attr): New.
13283         (struct c_common_reswords): Added __transaction* keywords.
13284         (struct c_common_attribute_table): Added transaction* and tm_regparm
13285         attributes.
13286         * c-common.h: Added RID_TRANSACTION*. Added TM_ATTR* and TM_STMT*
13287         masks.
13288         (parse_tm_stmt_attr, tm_attr_to_mask, tm_mask_to_attr,
13289         find_tm_attribute): Declare.
13291 2011-11-07  Jason Merrill  <jason@redhat.com>
13293         PR c++/35688
13294         * c-common.c, c-common.h: Revert yesterday's changes.
13296 2011-11-06  Jason Merrill  <jason@redhat.com>
13298         PR c++/35688
13299         * c-common.c (decl_has_visibility_attr): Split out from...
13300         (c_determine_visibility): ...here.
13301         * c-common.h: Declare it.
13303 2011-11-06  Joseph Myers  <joseph@codesourcery.com>
13305         * c-common.c (c_common_reswords): Add _Alignas and _Alignof.
13306         (c_sizeof_or_alignof_type): Diagnose alignof applied to a function
13307         type.
13308         (check_user_alignment): New.  Split out of
13309         handle_aligned_attribute.  Disallow integer constants with
13310         noninteger types.  Conditionally allow zero.
13311         (handle_aligned_attribute): Use check_user_alignment.
13312         * c-common.h (RID_ALIGNAS, check_user_alignment): New.
13314 2011-11-06  Andrew MacLeod  <amacleod@redhat.com>
13315             Richard Henderson  <rth@redhat.com>
13317         Merged from cxx-mem-model.
13319         * c-cppbuiltin.c (c_cpp_builtins): Test both atomic and sync patterns.
13320         * c-common.c (sync_resolve_params, sync_resolve_return): Only tweak
13321         parameters that are the same type size.
13322         (get_atomic_generic_size): New.  Find size of generic
13323         atomic function parameters and do typechecking.
13324         (add_atomic_size_parameter): New.  Insert size into parameter list.
13325         (resolve_overloaded_atomic_exchange): Restructure __atomic_exchange to
13326         either __atomic_exchange_n or external library call.
13327         (resolve_overloaded_atomic_compare_exchange): Restructure
13328         __atomic_compare_exchange to either _n variant or external library call.
13329         (resolve_overloaded_atomic_load): Restructure __atomic_load to either
13330         __atomic_load_n or an external library call.
13331         (resolve_overloaded_atomic_store): Restructure __atomic_store to either
13332         __atomic_store_n or an external library call.
13333         (resolve_overloaded_builtin): Handle new __atomic builtins.
13335 2011-11-04  Eric Botcazou  <ebotcazou@adacore.com>
13337         PR c++/50608
13338         * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Call fold_offsetof_1.
13339         (fold_offsetof_1): Make global.  Remove STOP_REF argument and adjust.
13340         <INDIRECT_REF>: Return the argument.
13341         <ARRAY_REF>: Remove special code for negative offset.
13342         Call fold_build_pointer_plus instead of size_binop.
13343         (fold_offsetof): Remove STOP_REF argument and adjust.
13344         * c-common.h (fold_offsetof_1): Declare.
13345         (fold_offsetof): Remove STOP_REF argument.
13347 2011-11-02  Paolo Carlini  <paolo.carlini@oracle.com>
13349         PR c++/50810
13350         * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
13351         of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
13352         Wnarrowing for C++0x and C++98.
13353         * c.opt ([Wnarrowing]): Update.
13355 2011-11-01  Paolo Carlini  <paolo.carlini@oracle.com>
13357         PR c++/44277
13358         * c.opt: Add Wzero-as-null-pointer-constant.
13360 2011-10-31  Jason Merrill  <jason@redhat.com>
13362         * c.opt (-fdeduce-init-list): Off by default.
13364         PR c++/50920
13365         * c-common.h (cxx_dialect): Add cxx11 and cxx03.
13366         * c.opt: Add -std=c++11, -std=gnu++11, -std=gnu++03,
13367         and -Wc++11-compat.
13368         * c-opts.c (set_std_cxx11): Rename from set_std_cxx0x.
13370 2011-10-27  Roberto Agostino Vitillo  <ravitillo@lbl.gov>
13372         PR c++/30066
13373         * c.opt (fvisibility-inlines-hidden): Description change.
13375 2011-10-26  Ed Smith-Rowland  <3dw4rd@verizon.net>
13377         Implement C++11 user-defined literals.
13378         * c-common.c (build_userdef_literal): New.
13379         * c-common.def: New tree code.
13380         * c-common.h (tree_userdef_literal): New tree struct and accessors.
13381         * c-lex.c (interpret_float): Add suffix parm.
13382         (c_lex_with_flags): Build literal tokens.
13384 2011-10-23  Paolo Carlini  <paolo.carlini@oracle.com>
13386         PR c++/50841
13387         Revert:
13388         2011-10-23  Paolo Carlini  <paolo.carlini@oracle.com>
13390         PR c++/50810
13391         * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
13392         of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
13393         Wnarrowing for C++0x and C++98.
13394         * c.opt ([Wnarrowing]): Update.
13396 2011-10-23  Paolo Carlini  <paolo.carlini@oracle.com>
13398         PR c++/50810
13399         * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
13400         of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
13401         Wnarrowing for C++0x and C++98.
13402         * c.opt ([Wnarrowing]): Update.
13404 2011-10-21  Paolo Carlini  <paolo.carlini@oracle.com>
13406         PR c++/45385
13407         * c-common.c (conversion_warning): Remove code looking for
13408         artificial operands.
13410 2011-10-18  Dodji Seketeli  <dodji@redhat.com>
13412         PR bootstrap/50760
13413         * c-lex.c (fe_file_change): Use LINEMAP_SYSP when
13414         !NO_IMPLICIT_EXTERN_C.
13416 2011-10-17  Michael Spertus  <mike_spertus@symantec.com>
13418         * c-common.c (c_common_reswords): Add __bases,
13419         __direct_bases.
13420         * c-common.h: Add RID_BASES and RID_DIRECT_BASES.
13422 2011-10-17  Paolo Carlini  <paolo.carlini@oracle.com>
13424         PR c++/50757
13425         * c.opt ([Wnonnull]): Add C++ and Objective-C++.
13427 2011-10-15  Tom Tromey  <tromey@redhat.com>
13428             Dodji Seketeli  <dodji@redhat.com>
13430         * c.opt (fdebug-cpp): New option.
13431         * c-opts.c (c_common_handle_option): Handle the option.
13432         * c-ppoutput.c (maybe_print_line_1): New static function. Takes an
13433         output stream in parameter. Factorized from ...
13434         (maybe_print_line): ... this. Dump location debug information when
13435         -fdebug-cpp is in effect.
13436         (print_line_1): New static function. Takes an output stream in
13437         parameter. Factorized from ...
13438         (print_line): ... here. Dump location information when -fdebug-cpp
13439         is in effect.
13440         (scan_translation_unit): Dump location information when
13441         -fdebug-cpp is in effect.
13443 2011-10-15  Tom Tromey  <tromey@redhat.com>
13444             Dodji Seketeli  <dodji@redhat.com>
13446         * c.opt (ftrack-macro-expansion): New option. Handle it with and
13447         without argument.
13448         * c-opts.c (c_common_handle_option)<case
13449         OPT_ftrack_macro_expansion_, case OPT_ftrack_macro_expansion>: New
13450         cases. Handle -ftrack-macro-expansion with and without argument.
13452 2011-10-15  Tom Tromey  <tromey@redhat.com>
13453             Dodji Seketeli  <dodji@redhat.com>
13455         * c-ppoutput.c (scan_translation_unit, maybe_print_line)
13456         (print_line, cb_define, do_line_change): Adjust to avoid touching
13457         the internals of struct line_map.  Use the public API instead.
13458         * c-pch.c (c_common_read_pch): Likewise.
13459         * c-lex.c (fe_file_change): Likewise.
13461 2011-10-14  Paolo Carlini  <paolo.carlini@oracle.com>
13463         PR c++/17212
13464         * c.opt ([Wformat-zero-length]): Add C++ and Objective-C++.
13466 2011-10-11  Paolo Carlini  <paolo.carlini@oracle.com>
13468         PR c++/33067
13469         * c-pretty-print.c (pp_c_floating_constant): Output
13470         max_digits10 (in the ISO C++ WG N1822 sense) decimal digits.
13472 2011-10-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
13474         * c-common.c (def_builtin_1): Delete old interface with two
13475         parallel arrays to hold standard builtin declarations, and replace
13476         it with a function based interface that can support creating
13477         builtins on the fly in the future.  Change all uses, and poison
13478         the old names.  Make sure 0 is not a legitimate builtin index.
13479         * c-omp.c (c_finish_omp_barrier): Ditto.
13480         (c_finish_omp_taskwait): Ditto.
13481         (c_finish_omp_flush): Ditto.
13483 2011-10-11  Tristan Gingold  <gingold@adacore.com>
13485         * c.opt: (fallow-parameterless-variadic-functions): New.
13487 2011-09-08  Dodji Seketeli  <dodji@redhat.com>
13489         PR c++/33255 - Support -Wunused-local-typedefs warning
13490         * c-common.h (struct c_language_function::local_typedefs): New
13491         field.
13492         (record_locally_defined_typedef, maybe_record_typedef_use)
13493         (maybe_warn_unused_local_typedefs): Declare new functions.
13494         * c-common.c (record_locally_defined_typedef)
13495         (maybe_record_typedef_use)
13496         (maybe_warn_unused_local_typedefs): Define new functions.
13497         * c.opt: Declare new -Wunused-local-typedefs flag.
13499 2011-09-06  Eric Botcazou  <ebotcazou@adacore.com>
13501         PR middle-end/50266
13502         * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Fold offsetof-like
13503         computations.
13505 2011-09-05  Richard Guenther  <rguenther@suse.de>
13507         * c-common.c (complete_array_type): Use ssize_int (-1) instead
13508         of integer_minus_one_node for empty array upper bounds.
13510 2011-08-28  Dodji Seketeli  <dodji@redhat.com>
13512         * c-pch.c (c_common_read_pch): Call linemap_add with LC_ENTER as
13513         it's the first time it's being called on this main TU.
13515 2011-08-24  Richard Guenther  <rguenther@suse.de>
13517         PR c/49396
13518         * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Fix conditional.
13520 2011-08-22  Gabriel Charette  <gchare@google.com>
13522         * c-opts.c (c_finish_options): Force BUILTINS_LOCATION for tokens
13523         defined in cpp_init_builtins and c_cpp_builtins.
13525 2011-08-19  Joseph Myers  <joseph@codesourcery.com>
13527         * c-common.c (c_common_reswords): Add __builtin_complex.
13528         * c-common.h (RID_BUILTIN_COMPLEX): New.
13530 2011-08-18  Joseph Myers  <joseph@codesourcery.com>
13532         * c-common.c (c_common_reswords): Add _Noreturn.
13533         (keyword_is_function_specifier): Handle RID_NORETURN.
13534         * c-common.h (RID_NORETURN): New.
13536 2011-08-10  Artjoms Sinkarovs  <artyom.shinakroff@gmail.com>
13538         * c-common.c (unsafe_conversion_p): New function. Check if it is
13539         unsafe to convert an expression to the type.
13540         (conversion_warning): Adjust, use unsafe_conversion_p.
13541         * c-common.h (unsafe_conversion_p): New function declaration.
13543 2011-08-02  Jakub Jelinek  <jakub@redhat.com>
13545         * c-common.h (c_finish_omp_atomic): Adjust prototype.
13546         (c_finish_omp_taskyield): New prototype.
13547         * c-omp.c (c_finish_omp_atomic): Add OPCODE, V, LHS1 and RHS1
13548         arguments. Handle OMP_ATOMIC_READ, OMP_ATOMIC_CAPTURE_OLD and
13549         OMP_ATOMIC_CAPTURE_NEW in addition to OMP_ATOMIC.  If LHS1
13550         or RHS1 have side-effects, evaluate those too in the right spot,
13551         if it is a decl and LHS is also a decl, error out if they
13552         aren't the same.
13553         (c_finish_omp_taskyield): New function.
13554         * c-cppbuiltin.c (c_cpp_builtins): Change _OPENMP to 201107.
13555         * c-pragma.c (omp_pragmas): Add taskyield.
13556         * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKYIELD.
13557         (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_FINAL and
13558         PRAGMA_OMP_CLAUSE_MERGEABLE.
13560 2011-07-25  Dodji Seketeli  <dodji@redhat.com>
13562         * c-common.h (set_underlying_type): Remove parm name from
13563         declaration.
13565 2011-07-25  Romain Geissler  <romain.geissler@gmail.com>
13567         * c-pretty-print.h: Search c-common.h in c-family.
13569 2011-07-22  Jason Merrill  <jason@redhat.com>
13571         PR c++/49793
13572         * c.opt (Wnarrowing): New.
13574         PR c++/30112
13575         * c-common.h: Declare c_linkage_bindings.
13576         * c-pragma.c (handle_pragma_redefine_extname): Use it.
13578         PR c++/49813
13579         * c-opts.c (set_std_cxx0x): Set flag_isoc94 and flag_isoc99.
13580         * c-pretty-print.c (pp_c_cv_qualifiers): Check c_dialect_cxx as well
13581         as flag_isoc99 for 'restrict'.
13582         (pp_c_specifier_qualifier_list): Likewise for _Complex.
13584 2011-07-21  Ian Lance Taylor  <iant@google.com>
13586         PR middle-end/49705
13587         * c-common.c (c_disable_warnings): New static function.
13588         (c_enable_warnings): New static function.
13589         (c_fully_fold_internal): Change local unused_p to bool.  Call
13590         c_disable_warnings and c_enable_warnings rather than change
13591         c_inhibit_evaluation_warnings.
13593 2011-07-20  Jason Merrill  <jason@redhat.com>
13595         PR c++/6709 (DR 743)
13596         PR c++/42603 (DR 950)
13597         * c-common.h (CPP_KEYWORD, CPP_TEMPLATE_ID): Move from cp/parser.h.
13598         (CPP_NESTED_NAME_SPECIFIER, N_CP_TTYPES): Likewise.
13599         (CPP_DECLTYPE): New.
13600         * c-common.c (c_parse_error): Handle CPP_DECLTYPE.
13602 2011-07-19  Richard Guenther  <rguenther@suse.de>
13604         * c-common.c (pointer_int_sum): Use fold_build_pointer_plus.
13605         * c-omp.c (c_finish_omp_for): Likewise.
13607 2011-07-12  Eric Botcazou  <ebotcazou@adacore.com>
13609         * c-ada-spec.c (dump_nested_types): Put semi-colon after empty loop
13610         body on the next line.
13612 2011-07-08  Jason Merrill  <jason@redhat.com>
13614         PR c++/45437
13615         * c-omp.c (check_omp_for_incr_expr): Handle preevaluation.
13617         PR c++/49673
13618         * c-common.c (c_apply_type_quals_to_decl): Don't check
13619         TYPE_NEEDS_CONSTRUCTING.
13621 2011-07-06  Richard Guenther  <rguenther@suse.de>
13623         * c-common.c (c_common_nodes_and_builtins):
13624         Merge calls to build_common_tree_nodes and build_common_tree_nodes_2.
13626 2011-07-05  Richard Guenther  <rguenther@suse.de>
13628         * c-common.c (c_common_nodes_and_builtins): Build all common
13629         tree nodes first.
13631 2011-06-27  Jakub Jelinek  <jakub@redhat.com>
13633         * c-common.h (c_tree_chain_next): New static inline function.
13635         * c-common.c (check_builtin_function_arguments): Handle
13636         BUILT_IN_ASSUME_ALIGNED.
13638 2011-06-21  Andrew MacLeod  <amacleod@redhat.com>
13640         * c-common.c: Add sync_ or SYNC__ to builtin names.
13641         * c-omp.c: Add sync_ or SYNC__ to builtin names.
13643 2011-06-20  Pierre Vittet  <piervit@pvittet.com>
13645         * c-pragma.h (pragma_handler_1arg, pragma_handler_2arg): New
13646         handler.
13647         (gen_pragma_handler): New union.
13648         (internal_pragma_handler): New type.
13649         (c_register_pragma_with_data)
13650         (c_register_pragma_with_expansion_and_data): New functions.
13652         * c-pragma.c (registered_pragmas, c_register_pragma_1)
13653         (c_register_pragma, c_register_pragma_with_expansion)
13654         (c_invoke_pragma_handler): Changed to work with
13655         internal_pragma_handler.
13656         (c_register_pragma_with_data)
13657         (c_register_pragma_with_expansion_and_data): New functions.
13659 2011-06-14  Joseph Myers  <joseph@codesourcery.com>
13661         * c-common.c: Include common/common-target.h.
13662         (handle_section_attribute): Use
13663         targetm_common.have_named_sections.
13664         * c-cppbuiltin.c: Include common/common-target.h.
13665         (c_cpp_builtins): Use targetm_common.except_unwind_info.
13667 2011-06-10  Richard Guenther  <rguenther@suse.de>
13669         * c-pretty-print.c (pp_c_type_specifier): Use pp_c_identifier
13670         to print a IDENTIFIER_NODE.
13672 2011-06-09  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
13673             Joseph Myers  <joseph@codesourcery.com>
13675         * c.opt (fbuilding-libgcc): New option.
13676         * c-cppbuiltin.c (c_cpp_builtins): Define
13677         __LIBGCC_TRAMPOLINE_SIZE__ if flag_building_libgcc.
13679 2011-06-07  Jason Merrill  <jason@redhat.com>
13681         * c-common.c (max_tinst_depth): Lower default to 900.
13683         * c-format.c (gcc_cxxdiag_char_table): Add 'S' format.
13685 2011-06-07  Richard Guenther  <rguenther@suse.de>
13687         * c-common.c (c_common_nodes_and_builtins): Do not set
13688         size_type_node or call set_sizetype.
13690 2011-06-07  Dodji Seketeli  <dodji@redhat.com>
13692         PR debug/49130
13693         * c-pretty-print.c (pp_c_integer_constant): Consider the canonical
13694         type when using pointer comparison to compare types.
13696 2011-06-02  Jonathan Wakely  <jwakely.gcc@gmail.com>
13698         * c.opt: Add -Wdelete-non-virtual-dtor.
13699         * c-opts.c (c_common_handle_option): Include it in -Wall.
13701 2011-05-30  Nathan Froyd  <froydnj@gcc.gnu.org>
13703         PR bootstrap/49190
13705         Revert:
13706         2011-05-26  Nathan Froyd  <froydnj@codesourcery.com>
13708         * c-common.h (struct c_common_identifier): Inherit from tree_typed,
13709         not tree_common.
13711 2011-05-27  Jakub Jelinek  <jakub@redhat.com>
13713         PR c++/49165
13714         * c-common.c (c_common_truthvalue_conversion) <case COND_EXPR>: For
13715         C++ don't call c_common_truthvalue_conversion on void type arms.
13717 2011-05-27  Nathan Froyd  <froydnj@codesourcery.com>
13719         * c-common.h (struct stmt_tree_s) [x_cur_stmt_list]: Change to a VEC.
13720         (stmt_list_stack): Define.
13721         (cur_stmt_list): Adjust for new type of x_cur_stmt_list.
13722         * c-semantics.c (push_stmt_list, pop_stmt_list): Likewise.
13724 2011-05-26  Nathan Froyd  <froydnj@codesourcery.com>
13726         * c-common.c (warning_candidate_p): Check for BLOCKs.
13728 2011-05-26  Nathan Froyd  <froydnj@codesourcery.com>
13730         * c-common.h (struct c_common_identifier): Inherit from tree_typed,
13731         not tree_common.
13733 2011-05-25  Jakub Jelinek  <jakub@redhat.com>
13735         * c-common.c (def_fn_type): Remove extra va_end.
13737 2011-05-23  Jason Merrill  <jason@redhat.com>
13739         PR c++/48106
13740         * c-common.c (c_common_get_narrower): New.
13741         (shorten_binary_op, shorten_compare, warn_for_sign_compare): Use it.
13743 2011-05-23  Nathan Froyd  <froydnj@codesourcery.com>
13745         * c-common.h (check_function_arguments): Tweak prototype of
13746         check_function_arguments.
13747         * c-common.c (check_function_arguments): Likewise.  Adjust
13748         calls to check_function_nonnull, check_function_format, and
13749         check_function_sentinel.
13750         (check_function_sentinel): Take a FUNCTION_TYPE rather than
13751         separate attributes and typelist arguments.  Use
13752         FOREACH_FUNCTION_ARGS to iterate over argument types.
13754 2011-05-15  Paolo Carlini  <paolo.carlini@oracle.com>
13756         * c-common.c (c_common_reswords): Reorder.
13757         * c-common.h (rid): Likewise.
13759 2011-05-10  Nathan Froyd  <froydnj@codesourcery.com>
13761         * c-common.c (def_fn_type): Don't call build_function_type, call
13762         build_function_type_array or build_varargs_function_type_array
13763         instead.
13764         (c_common_nodes_and_builtins): Likewise.
13766 2011-05-05  Nathan Froyd  <froydnj@codesourcery.com>
13768         * c-common.c (c_add_case_label): Omit the loc argument to
13769         build_case_label.
13770         * c-common.h (build_case_label): Remove.
13771         * c-semantics.c (build_case_label): Remove.
13773 2011-05-05  Joseph Myers  <joseph@codesourcery.com>
13775         * c-objc.h (objc_start_method_definition): Update prototype.
13776         * stub-objc.c (objc_start_method_definition): Add extra parameter.
13778 2011-05-04  Nathan Froyd  <froydnj@codesourcery.com>
13780         * c-common.c (check_main_parameter_types): Reindent.  Don't use
13781         TYPE_ARG_TYPES directly.
13782         (handle_nonnull_attribute): Likewise.
13783         (sync_resolve_params): Likewise.
13784         * c-format.c (handle_format_arg_attribute): Likewise.  Adjust call
13785         to check_format_string.
13786         (handle_format_attribute): Likewise.
13787         (check_format_string): Take a function type to examine instead of
13788         a type list.  Use a function_arg_iterator to step through argument
13789         types.
13791 2011-05-04  Richard Guenther  <rguenther@suse.de>
13793         * c-common.c (fix_string_type): Use size_int for index type bounds.
13794         (start_fname_decls): Do not pass NULL to build_int_cst.
13795         (c_init_attributes): Likewise.
13796         * c-lex.c (c_lex_with_flags): Likewise.
13798 2011-04-27  Jason Merrill  <jason@redhat.com>
13800         * c-common.c (make_tree_vector_from_list): New.
13801         * c-common.h: Declare it.
13803 2011-04-26  Richard Guenther  <rguenther@suse.de>
13805         PR preprocessor/48248
13806         * c-ppoutput.c (maybe_print_line): Always optimize newlines
13807         for output size with -P.
13809 2011-04-25  Paolo Carlini  <paolo.carlini@oracle.com>
13811         * c-common.c (struct c_common_resword): Add __underlying_type.
13812         * c-common.h (enum rid): Add RID_UNDERLYING_TYPE.
13814 2011-04-20  Jim Meyering  <meyering@redhat.com>
13816         * c-format.c (init_dollar_format_checking): Remove useless
13817         if-before-free.
13819 2011-04-15  Nicola Pero  <nicola.pero@meta-innovation.com>
13821         * c-objc.h (objc_get_interface_ivars): Removed.
13822         (objc_detect_field_duplicates): New.
13823         * stub-objc.c: Likewise.
13825 2011-04-14  Nicola Pero  <nicola.pero@meta-innovation.com>
13827         * stub-objc.c (objc_declare_protocols): Renamed to
13828         objc_declare_protocol.
13829         * c-objc.h: Likewise.
13831 2011-04-14  Nicola Pero  <nicola.pero@meta-innovation.com>
13833         * stub-objc.c (objc_declare_class): Updated argument name.
13835 2011-04-12  Nathan Froyd  <froydnj@codesourcery.com>
13837         * c-common.h (c_common_init_ts): Declare.
13838         * c-common.c (c_common_init_ts): Define.
13840 2011-04-12  Nicola Pero  <nicola.pero@meta-innovation.com>
13842         * c-objc.h (objc_build_message_expr): Updated prototype.
13843         * stub-objc.c (objc_build_message_expr): Likewise.
13845 2011-04-12  Martin Jambor  <mjambor@suse.cz>
13847         * c-gimplify.c (c_genericize): Call cgraph_get_create_node instead
13848         of cgraph_node.
13850 2011-04-11  Richard Guenther  <rguenther@suse.de>
13852         * c-common.c (complete_array_type): Build a range type of
13853         proper type.
13855 2011-04-08  Nathan Froyd  <froydnj@codesourcery.com>
13857         * c-common.c (handle_sentinel_attribute): Don't use TYPE_ARG_TYPES.
13858         (handle_type_generic_attribute): Likewise.
13860 2011-04-07  Jason Merrill  <jason@redhat.com>
13862         PR c++/48450
13863         * c-common.c (c_common_truthvalue_conversion): Don't ignore
13864         conversion from C++0x scoped enum.
13866 2011-04-06  Joseph Myers  <joseph@codesourcery.com>
13868         * c-target-def.h: New file.
13869         * c-target.def: New file.
13870         * c-target.h: New file.
13871         * c-common.c (targetcm): Don't define here.
13872         * c-common.h (default_handle_c_option): Declare.
13873         * c-format.c: Include c-target.h instead of target.h.
13874         * c-opts.c: Include c-target.h instead of target.h.  Explicitly
13875         include tm.h.
13876         (default_handle_c_option): Move from targhooks.c.
13878 2011-03-29  Jakub Jelinek  <jakub@redhat.com>
13880         PR preprocessor/48248
13881         * c-ppoutput.c (print): Add src_file field.
13882         (init_pp_output): Initialize it.
13883         (maybe_print_line): Don't optimize by adding up to 8 newlines
13884         if map->to_file and print.src_file are different file.
13885         (print_line): Update print.src_file.
13887 2011-03-25  Kai Tietz  <ktietz@redhat.com>
13889         * c-ada-spec.c (compare_comment): Use filename_cmp
13890         instead of strcmp for filename.
13892 2011-03-25  Jeff Law  <law@redhat.com>
13894         * c-common.c (def_fn_type): Add missing va_end.
13896 2011-03-25  Jason Merrill  <jason@redhat.com>
13898         * c.opt: Add -std=c++03.
13900 2011-03-22  Eric Botcazou  <ebotcazou@adacore.com>
13902         * c-ada-spec.c (dump_ada_template): Skip non-class instances.
13904 2011-03-17  Kai Tietz  <ktietz@redhat.com>
13906         PR target/12171
13907         * c-pretty-print.c (pp_c_specifier_qualifier_list):
13908         Display allowed attributes for function pointer types.
13909         (pp_c_attributes_display): New function to display
13910         attributes having affects_type_identity flag set to true.
13911         * c-pretty-print.h (pp_c_attributes_display): New prototype.
13913         * c-common.c (c_common_attribute_table):
13914         Add new element.
13915         (c_common_format_attribute_table): Likewise.
13917 2011-03-18  Jason Merrill  <jason@redhat.com>
13919         * c.opt (fconstexpr-depth): Add Var(max_constexpr_depth).
13920         * c-common.h: Don't declare it here.
13921         * c-common.c: Or define it here.
13922         * c-opts.c (c_common_handle_option): Or set it here.
13924         PR c++/35315
13925         * c-common.c (handle_transparent_union_attribute): Don't
13926         make a duplicate type in C++.
13928 2011-03-15  Jason Merrill  <jason@redhat.com>
13930         * c-common.c (max_constexpr_depth): New.
13931         * c-common.h: Declare it.
13932         * c-opts.c (c_common_handle_option): Set it.
13933         * c.opt (fconstexpr-depth): New option.
13935 2011-03-11  Jason Merrill  <jason@redhat.com>
13937         * c-common.c (attribute_takes_identifier_p): Add missing const.
13939         PR c++/46803
13940         * c-common.c (attribute_takes_identifier_p): Assume that an
13941         unknown attribute takes an identifier.
13943 2011-03-07  Nathan Froyd  <froydnj@codesourcery.com>
13945         PR c/47786
13946         * c-common.c (c_type_hash): Call list_length instead of iterating
13947         through DECL_CHAIN.  Rename 'i' to 'n_elements'.
13949 2011-02-19  Jakub Jelinek  <jakub@redhat.com>
13951         PR c/47809
13952         * c-common.c (c_fully_fold_internal): Handle VIEW_CONVERT_EXPR.
13954 2011-02-17  Iain Sandoe  <iains@gcc.gnu.org>
13956         * c.opt (fobjc-abi-version=) New.
13957         (fobjc-nilcheck): New.
13959 2011-02-03  Nathan Froyd  <froydnj@codesourcery.com>
13961         PR c++/46890
13962         * c-common.h (keyword_is_decl_specifier): Declare.
13963         * c-common.c (keyword_is_decl_specifier): Define.
13964         (keyword_is_function_specifier): New function.
13966 2011-01-26  Jakub Jelinek  <jakub@redhat.com>
13968         PR c/47473
13969         * c-lex.c (interpret_float): If CPP_N_IMAGINARY, ensure
13970         EXCESS_PRECISION_EXPR is created with COMPLEX_TYPE instead of
13971         REAL_TYPE.
13973 2011-01-26  Arnaud Charlet  <charlet@adacore.com>
13975         * c-ada-spec.c (dump_generic_ada_node): Avoid dereferencing null type.
13977 2011-01-26  Jakub Jelinek  <jakub@redhat.com>
13979         PR pch/47430
13980         * c-opts.c (c_common_post_options): Call c_common_no_more_pch
13981         after init_c_lex if pch_file is set.
13983 2011-01-26  Dave Korn  <dave.korn.cygwin@gmail.com>
13985         PR c++/43601
13986         * c.opt (-fkeep-inline-dllexport): New switch.
13988 2011-01-12  Richard Guenther  <rguenther@suse.de>
13990         PR middle-end/32511
13991         * c-common.c (handle_weak_attribute): Warn instead of error
13992         on declaring an inline function weak.
13994 2011-01-05  Tom Tromey  <tromey@redhat.com>
13996         * c-common.h (lvalue_error): Update.
13997         * c-common.c (lvalue_error): Add 'loc' argument.  Call error_at,
13998         not error.
14000 2010-12-29  Nicola Pero  <nicola.pero@meta-innovation.com>
14002         PR objc/47075
14003         * c-objc.h (objc_finish_message_expr): Added argument to
14004         prototype.
14006 2010-12-22  Nathan Froyd  <froydnj@codesourcery.com>
14008         * c-common.c (handle_nonnull_attribute, handle_sentinel_attribute):
14009         Use prototype_p.
14011 2010-12-18  Nicola Pero  <nicola.pero@meta-innovation.com>
14013         * c-objc.h (objc_maybe_warn_exceptions): New.
14014         * stub-objc.c (objc_maybe_warn_exceptions): New.
14016 2010-12-10  Nathan Froyd  <froydnj@codesourcery.com>
14018         * c-common.h (readonly_error): Declare.
14019         * c-common.c (readonly_error): Define.
14021 2010-12-09  Nathan Froyd  <froydnj@codesourcery.com>
14023         * c-common.h (invalid_indirection_error): Declare.
14024         * c-common.c (invalid_indirection_error): Define.
14026 2010-12-03  Richard Guenther  <rguenther@suse.de>
14028         PR c/46745
14029         * c-pretty-print.c (pp_c_postfix_expression): Handle MEM_REF.
14030         (pp_c_unary_expression): Likewise.
14031         (pp_c_expression): Likewise.
14033 2010-11-30  Nicola Pero  <nicola.pero@meta-innovation.com>
14035         * c-common.h (objc_finish_function): New.
14036         (objc_non_volatilized_type): Removed.
14037         (objc_type_quals_match): Removed.
14038         * stub-objc.c (objc_finish_function): New.
14039         (objc_non_volatilized_type): Removed.
14040         (objc_type_quals_match): Removed.
14042 2010-11-30  Joseph Myers  <joseph@codesourcery.com>
14044         * c-common.h (parse_optimize_options): Declare.
14045         * c-cppbuiltin.c, c-format.c, c-gimplify.c, c-lex.c, c-omp.c,
14046         c-pch.c, c-pragma.c, c-semantics.c: Don't include toplev.h.
14048 2010-11-29  Joseph Myers  <joseph@codesourcery.com>
14050         * c-opts.c (check_deps_environment_vars): Use getenv instead of
14051         GET_ENVIRONMENT.
14052         * c-pch.c (O_BINARY): Don't define here.
14053         * c-pragma.h: Include "cpplib.h" instead of <cpplib.h>.
14055 2010-11-25  Joseph Myers  <joseph@codesourcery.com>
14057         * c-cppbuiltin.c (c_cpp_builtins): Pass &global_options to
14058         targetm.except_unwind_info.
14060 2010-11-23  Joseph Myers  <joseph@codesourcery.com>
14062         * c-opts.c (c_common_handle_option): Pass location to
14063         set_struct_debug_option.
14065 2010-11-23  Joseph Myers  <joseph@codesourcery.com>
14067         * c-common.c (visibility_options): Move from ../opts.c.
14068         * c-common.h (struct visibility_flags, visibility_options):
14069         Declare here.
14070         * c-opts.c (finish_options): Rename to c_finish_options.
14071         (c_common_init): Update call to finish_options.
14073 2010-11-22  Nicola Pero  <nicola.pero@meta-innovation.com>
14075         PR objc/34033
14076         * c-lex.c (lex_string): Check that each string in an Objective-C
14077         string concat sequence starts with either one or zero '@', and
14078         that there are no spurious '@' signs at the end.
14080 2010-11-20  Joseph Myers  <joseph@codesourcery.com>
14082         * c-pragma.c: Remove conditionals on HANDLE_PRAGMA_PACK,
14083         HANDLE_PRAGMA_PACK_PUSH_POP, HANDLE_PRAGMA_WEAK and
14084         HANDLE_PRAGMA_VISIBILITY.
14085         * c-pragma.h (HANDLE_PRAGMA_WEAK, HANDLE_PRAGMA_PACK,
14086         HANDLE_PRAGMA_VISIBILITY): Don't define.
14087         (HANDLE_SYSV_PRAGMA, HANDLE_PRAGMA_PACK_PUSH_POP): Don't test.
14089 2010-11-20  Nathan Froyd  <froydnj@codesourcery.com>
14091         PR c++/16189
14092         PR c++/36888
14093         PR c++/45331
14094         * c-common.h (keyword_begins_type_specifier): Declare.
14095         (keyword_is_storage_class_specifier): Declare.
14096         (keyword_is_type_qualifier): Declare.
14097         * c-common.c (keyword_begins_type_specifier): New function.
14098         (keyword_is_storage_class_specifier): New function.
14099         (keyword_is_type_qualifier): Declare.
14101 2010-11-19  Joseph Myers  <joseph@codesourcery.com>
14103         PR c/46547
14104         * c-common.c (in_late_binary_op): Define.
14105         (c_common_truthvalue_conversion): Check in_late_binary_op before
14106         calling c_save_expr.
14107         * c-common.h (in_late_binary_op): Declare.
14109 2010-11-19  Joseph Myers  <joseph@codesourcery.com>
14111         * c-opts.c (c_common_handle_option): Update calls to
14112         set_struct_debug_option.
14114 2010-11-19  Nicola Pero  <nicola.pero@meta-innovation.com>
14116         * c-common.h (objc_declare_protocols): Added additional argument.
14117         * stub-objc.c (objc_declare_protocol): Same change.
14119 2010-11-18  Nathan Froyd  <froydnj@codesourcery.com>
14121         PR c/33193
14122         * c-common.h (build_real_imag_expr): Declare.
14123         * c-semantics.c (build_real_imag_expr): Define.
14125 2010-11-17  Joseph Myers  <joseph@codesourcery.com>
14127         * c-opts.c (c_common_parse_file): Take no arguments.
14128         * c-common.h (c_common_parse_file): Update prototype.
14130 2010-11-16  Jakub Jelinek  <jakub@redhat.com>
14132         PR c++/46401
14133         * c-common.c (warning_candidate_p): Don't track non-const calls
14134         or STRING_CSTs.
14136 2010-11-15  Ian Lance Taylor  <iant@google.com>
14138         * c-lex.c (init_c_lex): Set macro debug callbacks if
14139         flag_dump_go_spec is set.
14141 2010-11-15  Nicola Pero  <nicola.pero@meta-innovation.com>
14143         * c-common.h (objc_build_incr_expr_for_property_ref): New.
14144         * stub-objc.c (objc_build_incr_expr_for_property_ref): New.
14146 2010-11-15  Nathan Froyd  <froydnj@codesourcery.com>
14148         PR preprocessor/45038
14149         * c-cppbuiltin.c (c_cpp_builtins): Use different format for C++
14150         dialects.
14152 2010-11-12  Joseph Myers  <joseph@codesourcery.com>
14154         * c-common.h (c_family_lang_mask): Declare.
14155         * c-opts.c (c_family_lang_mask): Make extern.
14156         * c-pragma.c (handle_pragma_diagnostic): Use
14157         control_warning_option.
14159 2010-11-12  Joseph Myers  <joseph@codesourcery.com>
14161         * c-common.c (parse_optimize_options): Update call to
14162         decode_options.
14163         * c-common.h (c_common_handle_option): Update prototype.
14164         * c-opts.c (c_common_handle_option): Take location_t parameter and
14165         pass it to other functions.
14167 2010-11-11  Joseph Myers  <joseph@codesourcery.com>
14169         * c-opts.c (warning_as_error_callback): Remove.
14170         (c_common_initialize_diagnostics): Don't call
14171         register_warning_as_error_callback.
14172         (c_common_handle_option): Handle -Werror=normalized= here.
14174 2010-11-10  Joseph Myers  <joseph@codesourcery.com>
14176         * c-common.c (handle_mode_attribute): Use %' and word "signedness"
14177         in diagnostic.
14178         * c-opts.c (c_common_parse_file): Start diagnostics with lowercase
14179         letter.
14180         * c-pragma.c (handle_pragma_target, handle_pragma_optimize):
14181         Remove trailing '.' from diagnostics.
14182         * c.opt (Wwrite-strings_: Avoid '`' in help text.
14184 2010-11-10  Joseph Myers  <joseph@codesourcery.com>
14186         * c-common.c (parse_optimize_options): Pass global_dc to
14187         decode_options.
14188         * c-opts.c (c_common_handle_option): Pass &global_options to
14189         set_Wstrict_aliasing.
14190         * c.opt (v): Don't mark Common or document here.
14192 2010-11-06  Iain Sandoe  <iains@gcc.gnu.org>
14194         PR target/44981
14195         * c-format.c (format_type): New type gcc_objc_string_format_type.
14196         (valid_stringptr_type_p): New.
14197         (handle_format_arg_attribute): Use valid_stringptr_type_p ().
14198         (check_format_string): Pass expected type, use
14199         valid_stringptr_type_p (), check that the format string types are
14200         consistent with the format specification.
14201         (decode_format_attr): Warn if NSString is used outside objective-c.
14202         (format_types_orig): Add NSString.
14203         (format_name): New.
14204         (format_flags): New.
14205         (check_format_arg): Handle format strings requiring an external parser.
14206         first_target_format_type: New variable.
14207         (handle_format_attribute): Set up first_target_format_type, pass the
14208         expected format arg string type to check_format_string().
14209         * c-common.h (FMT_FLAG_PARSE_ARG_CONVERT_EXTERNAL): New flag.
14210         * stub-objc.c (objc_string_ref_type_p): New.
14211         (objc_check_format_arg): New.
14213 2010-11-04  Nicola Pero  <nicola.pero@meta-innovation.com>
14215         Fixed using the Objective-C 2.0 dot-syntax with class names.
14216         * c-common.h (objc_build_class_component_ref): New.
14217         * stub-objc.c (objc_build_class_component_ref): New.
14219 2010-11-03  Nicola Pero  <nicola.pero@meta-innovation.com>
14221         * c.opt (Wproperty-assign-default): New option.
14223 2010-11-03  Nicola Pero  <nicola.pero@meta-innovation.com>
14225         Implemented -fobjc-std=objc1 flag.
14226         * c.opt (fobjc-std=objc1): New option.
14228 2010-11-01  Nicola Pero  <nicola.pero@meta-innovation.com>
14230         Implemented format and noreturn attributes for Objective-C methods.
14231         * c-common.c (handle_noreturn_attribute): Recognize 'noreturn'
14232         attribute for Objective-C methods.
14234 2010-10-31  Jason Merrill  <jason@redhat.com>
14236         * c-common.c (conversion_warning, warn_for_collisions_1): Use
14237         EXPR_LOC_OR_HERE.
14239 2010-10-30  Nicola Pero  <nicola.pero@meta-innovation.com>
14241         Implemented Objective-C 2.0 @property, @synthesize and @dynamic.
14242         * c-common.h (enum rid): Removed RID_COPIES and RID_IVAR.
14243         (objc_add_property_declaration): Removed arguments for copies and
14244         ivar.
14245         (objc_build_getter_call): Renamed to
14246         objc_maybe_build_component_ref.
14247         (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
14248         (objc_is_property_ref): New.
14249         * c-common.c (c_common_reswords): Removed copies and ivar.
14250         * stub-objc.c (objc_add_property_declaration): Removed arguments
14251         for copies and ivar.
14252         (objc_build_getter_call): Renamed to
14253         objc_maybe_build_component_ref.
14254         (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
14255         (objc_is_property_ref): New.
14257 2010-10-29  Arnaud Charlet  <charlet@adacore.com>
14258             Matthew Gingell  <gingell@adacore.com>
14260         * c-ada-spec.c (separate_class_package): New function.
14261         (pp_ada_tree_identifier): Prefix references to C++ classes with the
14262         name of their enclosing package.
14263         (print_ada_declaration): Use separate_class_package.
14265 2010-10-27  Jason Merrill  <jason@redhat.com>
14267         * c-common.c (c_common_reswords): Add __is_literal_type.
14268         * c-common.h (enum rid): Add RID_IS_LITERAL_TYPE.
14270         * c-common.c (check_case_value): Remove special C++ code.
14272 2010-10-27  Nicola Pero  <nicola.pero@meta-innovation.com>
14274         * c-common.h (enum rid): Added RID_READWRITE, RID_ASSIGN,
14275         RID_RETAIN, RID_COPY and RID_NONATOMIC.  Updated RID_FIRST_PATTR
14276         and RID_LAST_PATTR.
14277         (objc_add_property_declaration): Added additional arguments.
14278         (objc_property_attribute_kind): Removed.
14279         (objc_set_property_attr): Removed.
14280         * c-common.c (c_common_reswords): Added readwrite, assign, retain,
14281         copy and nonatomic.
14282         * stub-objc.c (objc_add_property_declaration): Added additional
14283         arguments.
14284         (objc_set_property_attr): Removed.
14286 2010-10-27  Nicola Pero  <nicola.pero@meta-innovation.com>
14288         * c-common.h (objc_add_property_variable): Renamed to
14289         objc_add_property_declaration.  Added location argument.
14290         * stub-objc.c (objc_add_property_variable): Same change.
14292 2010-10-23  Nicola Pero  <nicola.pero@meta-innovation.com>
14294         * c-common.h (objc_maybe_printable_name): New.
14295         * stub-objc.c (objc_maybe_printable_name): New.
14297 2010-10-22  Artjoms Sinkarovs  <artyom.shinakroff@gmail.com>
14298             Andrew Pinski  <pinskia@gmail.com>
14300         * c-common.h (c_common_mark_addressable_vec): Declare.
14301         * c-common.c (c_common_mark_addressable_vec): New function.
14303 2010-10-20  Nicola Pero  <nicola.pero@meta-innovation.com>
14305         * c-common.h (objc_set_method_type): Removed.
14306         (objc_add_method_declaration): Added boolean argument.
14307         (objc_start_method_definition): Same change.
14308         (objc_build_method_signature): Same change.
14309         * stub-objc.c (objc_set_method_type): Removed.
14310         (objc_add_method_declaration): Added boolean argument.
14311         (objc_start_method_definition): Same change.
14312         (objc_build_method_signature): Same change.
14314 2010-10-20  Nicola Pero  <nicola.pero@meta-innovation.com>
14316         * c-common.h (finish_file): Removed.
14317         (objc_write_global_declarations): New.
14318         * c-opts.c (c_common_parse_file): Do not call finish_file.
14319         * stub-objc.c (objc_write_global_declarations): New.
14321 2010-10-18  Nicola Pero  <nicola.pero@meta-innovation.com>
14323         Implemented parsing @synthesize and @dynamic for
14324         Objective-C/Objective-C++.
14325         * c-common.h (enum rid): Add RID_AT_SYNTHESIZE and RID_AT_DYNAMIC.
14326         (objc_add_synthesize_declaration): New.
14327         (objc_add_dynamic_declaration): New.
14328         * c-common.c (c_common_reswords): Add synthesize and dynamic.
14329         * stub-objc.c (objc_add_synthesize_declaration): New.
14330         (objc_add_dynamic_declaration): New.
14332 2010-10-18  Michael Meissner  <meissner@linux.vnet.ibm.com>
14334         PR target/46041
14335         * c-cppbuiltin.c (mode_has_fma): Move function here from
14336         builtins.c.  Don't use the fma optab, instead just use the
14337         HAVE_fma* macros, so that __FP_FAST_FMA* will be defined when
14338         using -save-temps.
14340 2010-10-18  Nicola Pero  <nicola.pero@meta-innovation.com>
14342         Merge from 'apple/trunk' branch on FSF servers.
14344         2005-11-08  Fariborz Jahanian  <fjahanian@apple.com>
14346         Radar 4330422
14347         * c-common.h (objc_non_volatilized_type): New declaration
14348         * stub-objc.c (objc_non_volatilized_type): New stub.
14350 2010-10-17  Nicola Pero  <nicola.pero@meta-innovation.com>
14352         Merge from 'apple/trunk' branch on FSF servers.
14354         2006-03-27  Fariborz Jahanian  <fjahanian@apple.com>
14356         Radar 4133425
14357         * c-common.h (objc_diagnose_private_ivar): New decl.
14358         * stub-objc.c (objc_diagnose_private_ivar): New stub.
14360 2010-10-17  Iain Sandoe  <iains@gcc.gnu.org>
14362         * c-common.c (c_common_reswords): Add package, RID_AT_PACKAGE.
14363         * c-common.h (enum rid): Add RID_AT_PACKAGE.
14364         (objc_ivar_visibility_kind): New enum.
14365         (objc_set_visibility): Adjust prototype to use visibility enum.
14366         * stub-objc.c (objc_set_visibility): Adjust stub to use
14367         visibility enum.
14369 2010-10-14  Michael Meissner  <meissner@linux.vnet.ibm.com>
14371         * c-cppbuiltin.c (builtin_define_float_constants): Emit
14372         __FP_FAST_FMA, __FP_FAST_FMAF, and __FP_FAST_FMAL if the machine
14373         has the appropriate fma builtins.
14374         (c_cpp_builtins): Adjust call to builtin_define_float_constants.
14376 2010-10-14  Iain Sandoe  <iains@gcc.gnu.org>
14378         merge from FSF apple 'trunk' branch.
14379         2006 Fariborz Jahanian  <fjahanian@apple.com>
14381         Radars 4436866, 4505126, 4506903, 4517826
14382         * c-common.c (c_common_resword): Define @property and its attributes.
14383         * c-common.h: Define property attribute enum entries.
14384         (OBJC_IS_PATTR_KEYWORD): New.
14385         (objc_property_attribute_kind): New enum.
14386         Declare objc_set_property_attr (), objc_add_property_variable (),
14387         objc_build_getter_call () and objc_build_setter_call ().
14388         * stub-objc.c (objc_set_property_attr): New stub.
14389         (objc_add_property_variable): Likewise.
14390         (objc_build_getter_call): Likewise.
14391         (objc_build_setter_call) Likewise.
14393 2010-10-13  Iain Sandoe  <iains@gcc.gnu.org>
14395         merge from FSF apple 'trunk' branch.
14396         2006-04-26  Fariborz Jahanian  <fjahanian@apple.com>
14398         Radar 3803157 (method attributes)
14399         * c-common.c (handle_deprecated_attribute): Recognize
14400         objc methods as valid declarations.
14401         * c-common.h: Declare objc_method_decl ().
14402         * stub-objc.c (objc_method_decl): New stub.
14404 2010-10-08  Joseph Myers  <joseph@codesourcery.com>
14406         * c-common.c (parse_optimize_options): Call
14407         decode_cmdline_options_to_array_default_mask before
14408         decode_options.  Update arguments to decode_options.
14409         * c-common.h (c_common_init_options_struct): Declare.
14410         * c-opts.c (c_common_init_options_struct): New.  Split out from
14411         c_common_init_options.
14413 2010-10-06  Nicola Pero  <nicola.pero@meta-innovation.com>
14415         Implemented fast enumeration for Objective-C.
14416         * c-common.h (objc_finish_foreach_loop): New.
14417         * stub-objc.c (objc_finish_foreach_loop): New.
14419 2010-10-05  Joseph Myers  <joseph@codesourcery.com>
14421         * c-common.h (struct diagnostic_context): Don't declare here.
14422         (c_common_initialize_diagnostics): Declare using
14423         diagnostic_context typedef.
14424         * c-opts.c (c_common_handle_option): Pass global_dc to
14425         handle_generated_option.
14427 2010-10-04  Joseph Myers  <joseph@codesourcery.com>
14429         * c-opts.c (c_common_handle_option): Pass &global_options_set to
14430         handle_generated_option.
14432 2010-10-03  Ian Lance Taylor  <iant@google.com>
14434         * c.opt (-fplan9-extensions): New option.
14436 2010-10-03  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
14438         * c-cppbuiltin.c (define__GNUC__, builtin_define_type_precision):
14439         Remove.
14440         (c_cpp_builtins): Call functions from cppbuiltin.c instead
14441         of duplicating code.
14443 2010-09-30  Iain Sandoe  <iains@gcc.gnu.org>
14445         * c-common.c: Add two new entries for @optional
14446         and @required keywords.
14448         merge from FSF 'apple/trunk' branch.
14449         2006-01-30  Fariborz Jahanian  <fjahanian@apple.com>
14451         Radar 4386773
14452         * c-common.h (RID_AT_OPTIONAL, RID_AT_REQUIRED): Two new
14453         objective-c keywords.
14454         (objc_set_method_opt): New declaration.
14455         * stub-objc.c (objc_set_method_opt): New stub.
14457 2010-09-30  Joseph Myers  <joseph@codesourcery.com>
14459         * c-common.c (handle_optimize_attribute): Pass &global_options to
14460         cl_optimization_save and cl_optimization_restore.
14461         * c-opts.c (c_common_handle_option): Pass &global_options to
14462         handle_generated_option.
14463         * c-pragma.c (handle_pragma_diagnostic): Use option_flag_var.
14464         (handle_pragma_pop_options, handle_pragma_reset_options): Pass
14465         &global_options to cl_optimization_restore.
14467 2010-09-30  Nicola Pero  <nicola.pero@meta-innovation.com>
14469         * c-lex.c (c_lex_with_flags): Updated comments for CPP_AT_NAME
14470         Objective-C/Objective-C++ keywords.
14472 2010-09-29  Nicola Pero  <nicola.pero@meta-innovation.com>
14474         Merge from 'apple/trunk' branch on FSF servers.
14476         2005-10-04  Fariborz Jahanian  <fjahanian@apple.com>
14478         Radar 4281748
14479         * c-common.h (objc_check_global_decl): New declaration.
14480         * stub-objc.c (objc_check_global_decl): New stub.
14482 2010-09-29  Joseph Myers  <joseph@codesourcery.com>
14484         * c.opt: Don't use VarExists.
14486 2010-09-29  Joseph Myers  <joseph@codesourcery.com>
14488         * c-common.c (c_cpp_error): Update names of diagnostic_context
14489         members.
14490         * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Update names of
14491         cl_optimization members.
14492         * c-opts.c (warning_as_error_callback, c_common_handle_option,
14493         sanitize_cpp_opts, finish_options): Update names of cpp_options
14494         members.
14496 2010-09-29  Nicola Pero  <nicola.pero@meta-innovation.com>
14498         * c-common.h (OBJC_IS_CXX_KEYWORD): New macro.  Updated comments.
14499         (objc_is_reserved_word): Removed.
14500         * c-common.c: Updated comments.
14501         * c-lex.c (c_lex_with_flags): Use OBJC_IS_CXX_KEYWORD instead of
14502         objc_is_reserved_word.
14503         * stub-objc.c (objc_is_reserved_word): Removed.
14505 2010-09-28  Iain Sandoe  <iains@gcc.gnu.org>
14507         * c-common.h (objc_add_method_declaration): Adjust prototype to
14508         include attributes.
14509         (objc_start_method_definition): Likewise.
14510         (objc_build_keyword_decl): Likewise.
14511         * stub-objc.c:(objc_add_method_declaration): Handle attributes.
14512         (objc_start_method_definition): Likewise.
14513         (objc_build_keyword_decl): Likewise.
14515 2010-09-28  Iain Sandoe  <iains@gcc.gnu.org>
14517         * c-common.h (objc_start_class_interface): Adjust prototype.
14518         (objc_start_category_interface): Likewise.
14519         (objc_start_protocol): Likewise.
14520         * stub-objc.c (objc_start_protocol): Adjust for extra argument.
14521         (objc_start_class_interface): Likewise.
14522         (objc_start_category_interface): Likewise.
14524 2010-09-27  Ian Lance Taylor  <iant@google.com>
14526         * c-common.c (c_common_attribute_table): Add no_split_stack.
14527         (handle_no_split_stack_attribute): New static function.
14529 2010-09-27  Nicola Pero  <nicola.pero@meta-innovation.com>
14531         Merge from 'apple/trunk' branch on FSF servers.
14533         2005-12-15  Fariborz Jahanian  <fjahanian@apple.com>
14535         Radar 4229905
14536         * c-common.h (objc_have_common_type): New declaration.
14537         * stub-objc.c (objc_have_common_type): New stub.
14539         2005-06-22  Ziemowit Laski  <zlaski@apple.com>
14541         Radar 4154928
14542         * c-common.h (objc_common_type): New prototype.
14543         * stub-objc.c (objc_common_type): New stub.
14545 2010-09-24  Jan Hubicka  <jh@suse.cz>
14547         * c-common.c (handle_leaf_attribute): New function.
14548         (struct attribute_spec c_common_att): Add leaf.
14550 2010-09-22  Joseph Myers  <joseph@codesourcery.com>
14552         * c.opt (-all-warnings, -ansi, -assert, -assert=, -comments,
14553         -comments-in-macros, -define-macro, -define-macro=, -dependencies,
14554         -dump, -dump=, -imacros, -imacros=, -include, -include=,
14555         -include-barrier, -include-directory, -include-directory=,
14556         -include-directory-after, -include-directory-after=,
14557         -include-prefix, -include-prefix=, -include-with-prefix,
14558         -include-with-prefix=, -include-with-prefix-after,
14559         -include-with-prefix-after=, -include-with-prefix-before,
14560         -include-with-prefix-before=, -no-integrated-cpp,
14561         -no-line-commands, -no-standard-includes, -no-warnings, -output,
14562         -output=, -pedantic, -pedantic-errors, -preprocess,
14563         -print-missing-file-dependencies, -trace-includes, -traditional,
14564         -traditional-cpp, -trigraphs, -undefine-macro, -undefine-macro=,
14565         -user-dependencies, -verbose, -write-dependencies,
14566         -write-user-dependencies, no-integrated-cpp, traditional): New.
14568 2010-09-21  Nicola Pero  <nicola.pero@meta-innovation.com>
14570         PR objc/23710
14571         * c-common.h (objc_start_method_definition): Return bool instead
14572         of void.
14573         * stub-objc.c (objc_start_method_definition): Return bool instead
14574         of void.
14576 2010-09-21  Nicola Pero  <nicola.pero@meta-innovation.com>
14578         PR objc/25965
14579         * c-common.h (objc_get_interface_ivars): New declaration.
14580         * stub-objc.c (objc_get_interface_ivars): New stub.
14582 2010-09-15  Ian Lance Taylor  <iant@google.com>
14584         * c-common.c (parse_optimize_options): Do not capitalize warning
14585         messages.  Remove period at end of warning message.
14587 2010-09-09  Nathan Sidwell  <nathan@codesourcery.com>
14589         * c-common.c (handle_alias_ifunc_attribute): New, broken out of ...
14590         (handle_alias_attribute): ... here.
14591         (handle_ifunc_attribute): New.
14593 2010-09-06  Mark Mitchell  <mark@codesourcery.com>
14595         * c-common.h (do_warn_double_promotion): Declare.
14596         * c-common.c (do_warn_double_promotion): Define.
14598 2010-09-05  Mark Mitchell  <mark@codesourcery.com>
14600         * c.opt (Wdouble-promotion): New.
14602 2010-09-02  Joseph Myers  <joseph@codesourcery.com>
14604         * c.opt (falt-external-templates, fhuge-objects, fvtable-gc,
14605         fvtable-thunks, fxref): Mark no longer supported in help text.
14607 2010-09-02  Joseph Myers  <joseph@codesourcery.com>
14609         * c.opt (Wimport, fall-virtual, falt-external-templates,
14610         fdefault-inline, fenum-int-equiv, fexternal-templates,
14611         fguiding-decls, fhonor-std, fhuge-objects, flabels-ok,
14612         fname-mangling-version-, fnew-abi, fnonnull-objects,
14613         foptional-diags, fsquangle, fstrict-prototype, fthis-is-variable,
14614         fvtable-gc, fvtable-thunks, fxref): Mark with Ignore and Warn as
14615         applicable.
14616         (fhandle-exceptions): Mark with Alias and Warn.
14617         * c-opts.c (c_common_handle_option): Don't handle options marked
14618         as ignored.
14620 2010-09-02  Joseph Myers  <joseph@codesourcery.com>
14622         * c.opt (Wcomments, Werror-implicit-function-declaration,
14623         ftemplate-depth-, std=c89, std=c9x, std=gnu89, std=gnu9x,
14624         std=iso9899:1990, std=iso9899:1999, std=iso9899:199x): Mark as
14625         aliases.
14626         * c-common.c (option_codes): Use OPT_Wcomment instead of
14627         OPT_Wcomments.
14628         * c-opts.c (warning_as_error_callback, c_common_handle_option):
14629         Don't handle options marked as aliases.
14631 2010-08-25  Richard Guenther  <rguenther@suse.de>
14633         * c-common.c (c_common_get_alias_set): Remove special
14634         handling for pointers.
14636 2010-08-20  Nathan Froyd  <froydnj@codesourcery.com>
14638         * c-common.c: Use FOR_EACH_VEC_ELT.
14639         * c-gimplify.c: Likewise.
14640         * c-pragma.c: Likewise.
14642 2010-08-16  Joseph Myers  <joseph@codesourcery.com>
14644         * c.opt (MDX): Change back to MD.  Mark NoDriverArg instead of
14645         RejectDriver.
14646         (MMDX): Change back to MMD.  Mark NoDriverArg instead of
14647         RejectDriver.
14648         * c-opts.c (c_common_handle_option): Use OPT_MD and OPT_MMD
14649         instead of OPT_MDX and OPT_MMDX.
14651 2010-08-16  Joseph Myers  <joseph@codesourcery.com>
14653         * c.opt (MDX, MMDX, lang-asm): Mark RejectDriver.
14655 2010-08-12  Joseph Myers  <joseph@codesourcery.com>
14657         * c.opt (MD, MMD): Change to MDX and MMDX.
14658         * c-opts.c (c_common_handle_option): Use OPT_MMD and OPT_MMDX.
14660 2010-08-11  Joseph Myers  <joseph@codesourcery.com>
14662         * c-opts.c (c_common_handle_option): Call handle_generated_option
14663         instead of handle_option.
14665 2010-08-08  Nathan Froyd  <froydnj@codesourcery.com>
14667         * c-pragma.c (add_to_renaming_pragma_list): Fix call to VEC_safe_push.
14668         (maybe_apply_renaming_pragma): Delete unneeded declarations.
14670 2010-08-08  Nathan Froyd  <froydnj@codesourcery.com>
14672         * c-pragma.c (pending_redefinition): Declare.  Declare a VEC of it.
14673         (pending_redefine_extname): Change type to a VEC.
14674         (add_to_renaming_pragma_list): Update for new type of
14675         pending_redefine_extname.
14676         (maybe_apply_renaming_pragma): Likewise.
14678 2010-08-04  Arnaud Charlet  <charlet@adacore.com>
14680         * c-ada-spec.c (dump_ada_template): Mark underlying instance type as
14681         visited.
14682         (dump_generic_ada_node): Code clean up. Use TREE_VISITED flag to
14683         decide whether a type has already been declared/seen.
14684         Do not go to the original type.
14685         (dump_nested_types): New parameter forward.
14686         Generate forward declaration if needed and mark type as visited.
14687         (print_ada_declaration): Call dump_nested_types if not already done.
14688         Mark types as visited.
14690 2010-08-03  Joseph Myers  <joseph@codesourcery.com>
14692         * c.opt (-print-pch-checksum): Remove option.
14693         * c-opts.c (c_common_handle_option): Don't handle
14694         OPT_print_pch_checksum.
14696 2010-07-27  Joseph Myers  <joseph@codesourcery.com>
14698         * c-common.h (c_common_handle_option): Update prototype and return
14699         value type.
14700         * c-opts.c (c_common_handle_option): Update prototype and return
14701         value type.  Update calls to handle_option and
14702         enable_warning_as_error.
14704 2010-07-27  Jakub Jelinek  <jakub@redhat.com>
14706         PR c/45079
14707         * c-pretty-print.c (pp_c_expression): Handle C_MAYBE_CONST_EXPR.
14709 2010-07-27  Joseph Myers  <joseph@codesourcery.com>
14711         * c-common.h (c_common_missing_argument): Remove.
14712         * c-opts.c (c_common_missing_argument): Remove.
14713         * c.opt (A, D, F, I, MD, MMD, MQ, MT, U, fconstant-string-class=,
14714         idirafter, imacros, include, isysroot, isystem, iquote): Add
14715         MissingArgError.
14716         * c-objc-common.h (LANG_HOOKS_MISSING_ARGUMENT): Remove.
14718 2010-07-27  Joseph Myers  <joseph@codesourcery.com>
14720         * c-common.h (c_common_option_lang_mask,
14721         c_common_initialize_diagnostics, c_common_complain_wrong_lang_p):
14722         New.
14723         (c_common_init_options): Update prototype.
14724         * c-opts.c (c_common_option_lang_mask): New.
14725         (c_common_initialize_diagnostics): Split out of
14726         c_common_init_options.
14727         (accept_all_c_family_options, c_common_complain_wrong_lang_p):
14728         New.
14729         (c_common_init_options): Update prototype.  Use decoded options in
14730         search for -lang-asm.
14732 2010-07-15  Nathan Froyd  <froydnj@codesourcery.com>
14734         * c-common.c: Carefully replace TREE_CHAIN with DECL_CHAIN.
14735         * c-format.c: Likewise.
14737 2010-07-08  Manuel López-Ibáñez  <manu@gcc.gnu.org>
14739         * c-common.h: Include diagnostic-core.h. Error if already
14740         included.
14741         * c-semantics.c: Do not define GCC_DIAG_STYLE here.
14743 2010-07-03  Manuel López-Ibáñez  <manu@gcc.gnu.org>
14745         * c-common.c (IN_GCC_FRONTEND): Do not undef.
14746         Do not include expr.h
14747         (vector_mode_valid_p): Move here.
14749 2010-06-21  DJ Delorie  <dj@redhat.com>
14751         * c-pragma.c (handle_pragma_diagnostic): Add push/pop,
14752         allow these pragmas anywhere.
14754 2010-06-14  Jakub Jelinek  <jakub@redhat.com>
14756         PR bootstrap/44509
14757         * c-cppbuiltin.c: Include gt-c-family-c-cppbuiltin.h.
14758         (lazy_hex_fp_values, lazy_hex_fp_value_count): Add GTY(()) markers.
14759         (lazy_hex_fp_value, builtin_define_with_hex_fp_value): Use
14760         ggc_strdup instead of xstrdup.
14762 2010-06-10  Jakub Jelinek  <jakub@redhat.com>
14764         * c-cppbuiltin.c: Include cpp-id-data.h.
14765         (lazy_hex_fp_values, lazy_hex_fp_value_count): New variables.
14766         (lazy_hex_fp_value): New function.
14767         (builtin_define_with_hex_fp_value): Provide definitions lazily.
14769 2010-06-30  Manuel López-Ibáñez  <manu@gcc.gnu.org>
14771         * c-gimplify.c: Do not include tree-flow.h
14773 2010-06-29  Joern Rennecke  <joern.rennecke@embecosm.com>
14775         PR other/44034
14776         * c-common.c: Rename targetm member:
14777         targetm.enum_va_list -> targetm.enum_va_list_p
14779 2010-06-28  Anatoly Sokolov  <aesok@post.ru>
14781         * c-common.c (shorten_compare): Adjust call to force_fit_type_double.
14783 2010-06-28  Steven Bosscher  <steven@gcc.gnu.org>
14785         * c-cppbuiltin.c: Do not include except.h.
14787 2010-06-24  Andi Kleen  <ak@linux.intel.com>
14789         * c-common.c (warn_for_omitted_condop): New.
14790         * c-common.h (warn_for_omitted_condop): Add prototype.
14792 2010-06-21  Joseph Myers  <joseph@codesourcery.com>
14794         * c.opt (lang-objc): Remove.
14795         * c-opts.c (c_common_handle_option): Don't handle OPT_lang_objc.
14797 2010-06-21  Joern Rennecke  <joern.rennecke@embecosm.com>
14799         * c-opts.c: Include "tm_p.h".
14801 2010-06-20  Joseph Myers  <joseph@codesourcery.com>
14803         * c-common.c (parse_optimize_options): Update call to
14804         decode_options.
14806 2010-06-18  Nathan Froyd  <froydnj@codesourcery.com>
14808         * c-common.c (record_types_used_by_current_var_decl): Adjust for
14809         new type of types_used_by_cur_var_decl.
14811 2010-06-17  Joern Rennecke  <joern.rennecke@embecosm.com>
14813         PR bootstrap/44512
14814         * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Add cast
14815         for C++ standard compliance.
14817 2010-06-16  Jason Merrill  <jason@redhat.com>
14819         * c.opt: Add -Wnoexcept.
14821 2010-06-16  Richard Guenther  <rguenther@suse.de>
14823         PR c/44555
14824         * c-common.c (c_common_truthvalue_conversion): Remove
14825         premature and wrong optimization concering ADDR_EXPRs.
14827 2010-06-15  Arnaud Charlet  <charlet@adacore.com>
14829         * c-ada-spec.c (dump_sloc): Remove column info.
14830         (is_simple_enum): New function.
14831         (dump_generic_ada_node, print_ada_declaration): Map C enum types to Ada
14832         enum types when relevant.
14834 2010-06-11  Manuel López-Ibáñez  <manu@gcc.gnu.org>
14836         * c-common.c (conversion_warning): Warn at expression
14837         location.
14839 2010-06-10  Joseph Myers  <joseph@codesourcery.com>
14841         * c-opts.c (c_common_handle_option): Don't handle
14842         OPT_fshow_column.
14844 2010-06-08  Laurynas Biveinis  <laurynas.biveinis@gmail.com>
14846         * c-pragma.c (push_alignment): Use typed GC allocation.
14847         (handle_pragma_push_options): Likewise.
14849         * c-common.c (parse_optimize_options): Likewise.
14851         * c-common.h (struct sorted_fields_type): Add variable_size GTY
14852         option.
14854 2010-06-07  Joseph Myers  <joseph@codesourcery.com>
14856         * c-common.c (flag_preprocess_only, flag_undef, flag_no_builtin,
14857         flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
14858         flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
14859         flag_signed_bitfields, warn_strict_null_sentinel,
14860         flag_nil_receivers, flag_zero_link, flag_replace_objc_classes,
14861         flag_gen_declaration, flag_no_gnu_keywords,
14862         flag_implement_inlines, flag_implicit_templates,
14863         flag_implicit_inline_templates, flag_optional_diags,
14864         flag_elide_constructors, flag_default_inline, flag_rtti,
14865         flag_conserve_space, flag_access_control, flag_check_new,
14866         flag_new_for_scope, flag_weak, flag_working_directory,
14867         flag_use_cxa_atexit, flag_use_cxa_get_exception_ptr,
14868         flag_enforce_eh_specs, flag_threadsafe_statics,
14869         flag_pretty_templates): Remove.
14870         * c-common.h (flag_preprocess_only, flag_nil_receivers,
14871         flag_objc_exceptions, flag_objc_sjlj_exceptions, flag_zero_link,
14872         flag_replace_objc_classes, flag_undef, flag_no_builtin,
14873         flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
14874         flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
14875         flag_const_strings, flag_signed_bitfields, flag_gen_declaration,
14876         flag_no_gnu_keywords, flag_implement_inlines,
14877         flag_implicit_templates, flag_implicit_inline_templates,
14878         flag_optional_diags, flag_elide_constructors, flag_default_inline,
14879         flag_rtti, flag_conserve_space, flag_access_control,
14880         flag_check_new, flag_new_for_scope, flag_weak,
14881         flag_working_directory, flag_use_cxa_atexit,
14882         flag_use_cxa_get_exception_ptr, flag_enforce_eh_specs,
14883         flag_threadsafe_statics, flag_pretty_templates,
14884         warn_strict_null_sentinel): Remove.
14885         * c.opt (E, Wstrict-null-sentinel, faccess-control, fasm,
14886         fbuiltin, fcheck-new, fconserve-space, felide-constructors,
14887         fenforce-eh-specs, ffor-scope, fgnu-keywords, fimplement-inlines,
14888         fimplicit-inline-templates, fimplicit-templates,
14889         flax-vector-conversions, fms-extensions, fnil-receivers,
14890         fnonansi-builtins, fpretty-templates, freplace-objc-classes,
14891         frtti, fshort-double, fshort-enums, fshort-wchar,
14892         fsigned-bitfields, fsigned-char, fstats, fthreadsafe-statics,
14893         funsigned-bitfields, funsigned-char, fuse-cxa-atexit,
14894         fuse-cxa-get-exception-ptr, fweak, fworking-directory, fzero-link,
14895         gen-decls, undef): Use Var.
14896         (fdefault-inline, foptional-diags): Document as doing nothing.
14897         * c-opts.c (c_common_handle_option): Remove cases for options now
14898         using Var.  Mark ignored options as such.
14900 2010-06-05  Steven Bosscher  <steven@gcc.gnu.org>
14902         * c-common.c: Moved to here from parent directory.
14903         * c-common.def: Likewise.
14904         * c-common.h: Likewise.
14905         * c-cppbuiltin.c: Likewise.
14906         * c-dump.c: Likewise.
14907         * c-format.c: Likewise.
14908         * c-format.h : Likewise.
14909         * c-gimplify.c: Likewise.
14910         * c-lex.c: Likewise.
14911         * c-omp.c: Likewise.
14912         * c.opt: Likewise.
14913         * c-opts.c: Likewise.
14914         * c-pch.c: Likewise.
14915         * c-ppoutput.c: Likewise.
14916         * c-pragma.c: Likewise.
14917         * c-pragma.h: Likewise.
14918         * c-pretty-print.c: Likewise.
14919         * c-pretty-print.h: Likewise.
14920         * c-semantics.c: Likewise.
14921         * stub-objc.c: Likewise.
14923         * c-common.c: Include gt-c-family-c-common.h.
14924         * c-pragma.c: Include gt-c-family-c-pragma.h.
14926 Copyright (C) 2010-2024 Free Software Foundation, Inc.
14928 Copying and distribution of this file, with or without modification,
14929 are permitted in any medium without royalty provided the copyright
14930 notice and this notice are preserved.