]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c-family/ChangeLog
analyzer: detect -Wanalyzer-allocation-size at call stmts [PR106203]
[thirdparty/gcc.git] / gcc / c-family / ChangeLog
CommitLineData
3c75a4c0
GA
12024-05-31 Qing Zhao <qing.zhao@oracle.com>
2
3 * c-ubsan.cc (get_bound_from_access_with_size): New function.
4 (ubsan_instrument_bounds): Handle call to .ACCESS_WITH_SIZE.
5
62024-05-31 Qing Zhao <qing.zhao@oracle.com>
7
8 * c-attribs.cc (handle_counted_by_attribute): New function.
9 (attribute_takes_identifier_p): Add counted_by attribute to the list.
10 * c-common.cc (c_flexible_array_member_type_p): ...To this.
11 * c-common.h (c_flexible_array_member_type_p): New prototype.
12
132024-05-31 Martin Uecker <uecker@tugraz.at>
14
15 PR tree-optimization/115157
16 PR tree-optimization/115177
17 * c-attribs.cc (handle_hardbool_attribute): Set TYPE_CANONICAL
18 for hardbools.
19
d815d9ad
GA
202024-05-29 Jason Merrill <jason@redhat.com>
21
22 PR c++/109753
23 * c-attribs.cc (handle_optimize_attribute): Set
24 cgraph_node::semantic_interposition.
25
262024-05-29 Oskari Pirhonen <xxc3ncoredxx@gmail.com>
27
28 * known-headers.cc (get_stdlib_header_for_name): Add strerror.
29
2b841697
GA
302024-05-28 David Malcolm <dmalcolm@redhat.com>
31
32 PR bootstrap/115167
33 * c-format.cc: Replace include of "gcc-rich-location.h" with
34 "c-family/c-type-mismatch.h".
35 * c-type-mismatch.cc: New file, taking material from
36 gcc-rich-location.cc.
37 * c-type-mismatch.h: New file, taking material from
38 gcc-rich-location.h.
39 * c-warn.cc: Replace include of "gcc-rich-location.h" with
40 "c-family/c-type-mismatch.h".
41
6c0b7e12
GA
422024-05-24 Eric Botcazou <ebotcazou@adacore.com>
43
44 * c-ada-spec.cc (is_cpp_float): New predicate.
45 (dump_number): Deal with more preprocessing floating constants.
46 (dump_ada_macros) <CPP_NUMBER>: Use is_cpp_float.
47
ee492101
GA
482024-05-23 Eric Botcazou <ebotcazou@adacore.com>
49
50 * c-ada-spec.cc (check_type_name_conflict): Add guard.
51 (is_char_array): Simplify.
52 (dump_ada_array_type): Use strip_array_types.
53 (dump_ada_node) <POINTER_TYPE>: Deal with anonymous array types.
54 (dump_nested_type): Use strip_array_types.
55
8713d5ee
GA
562024-05-17 Eric Botcazou <ebotcazou@adacore.com>
57
58 * c-ada-spec.cc (bitfield_used): Move around.
59 (packed_layout): Likewise.
60 (dump_ada_array_type): Do not put "aliased" for a packed layout.
61
25456c0e
GA
622024-05-15 Marek Polacek <polacek@redhat.com>
63
64 DR 1693
65 PR c++/113760
66 DR 569
67 * c.opt (Wextra-semi): Initialize to -1.
68
d508d708
GA
692024-05-08 Marek Polacek <polacek@redhat.com>
70
71 PR c++/113582
72 * c-warn.cc (warn_for_unused_label): Don't warn if -Wunused-label has
73 been suppressed for the label.
74
752024-05-07 Andrew Pinski <quic_apinski@quicinc.com>
76
77 PR c++/89224
78 * c-common.cc (convert_vector_to_array_for_subscript): Call build_qualified_type
79 for the inner type.
80
812024-05-07 Jakub Jelinek <jakub@redhat.com>
82
83 PR c++/114459
84 * c-cppbuiltin.cc (c_cpp_builtins): Predefine
85 __cpp_variadic_friend=202403L for C++26.
86
872024-05-07 Richard Biener <rguenther@suse.de>
88
89 PR middle-end/114931
90 * c-common.cc (complete_array_type): Set TYPE_STRUCTURAL_EQUALITY_P
91 before probing with type_hash_canon.
92
f2d01160
GA
932024-05-02 Jakub Jelinek <jakub@redhat.com>
94
95 PR c++/114458
96 * c-cppbuiltin.cc (c_cpp_builtins): Predefine
97 __cpp_deleted_function=202403L for C++26.
98
610415bb
GA
992024-04-30 Jakub Jelinek <jakub@redhat.com>
100
101 PR c++/114456
102 * c-cppbuiltin.cc (c_cpp_builtins): Predefine
103 __cpp_structured_bindings for C++26 to 202403L rather than
104 201606L.
105
3091f1df
GA
1062024-04-23 Jakub Jelinek <jakub@redhat.com>
107
108 * c-attribs.cc (handle_objc_nullability_attribute): Spelling fix:
109 recognised -> recognized.
110
1112024-04-23 Jakub Jelinek <jakub@redhat.com>
112
113 * c.opt (Wstrict-flex-arrays): Spelling fix: inproper -> improper.
114
90ded751
GA
1152024-04-19 Jakub Jelinek <jakub@redhat.com>
116
117 PR c/114780
118 * c-common.cc (check_function_sentinel): Allow as sentinel any
119 argument of NULLPTR_TYPE.
120
3319d1a4
GA
1212024-04-13 Mark Wielaard <mark@klomp.org>
122
123 * c.opt.urls: Regenerate.
124
1667962a
GA
1252024-04-12 Jason Merrill <jason@redhat.com>
126 Patrick Palka <ppalka@redhat.com>
127
128 PR c++/113141
129 * c.opt: Add -Wcast-user-defined.
130
1a96eb0a
GA
1312024-04-05 Marek Polacek <polacek@redhat.com>
132
133 * c-warn.cc (warn_about_parentheses): Remove an #undef.
134
feafff04
GA
1352024-03-27 Jakub Jelinek <jakub@redhat.com>
136
137 PR tree-optimization/114469
138 * c-common.cc (resolve_overloaded_builtin): For _BitInt result
139 on !extended targets convert result to the _BitInt type before
140 using VIEW_CONVERT_EXPR.
141
4b8e7b57
GA
1422024-03-26 Jakub Jelinek <jakub@redhat.com>
143
144 PR c++/112724
145 * c-pretty-print.cc (pp_c_cast_expression,
146 c_pretty_printer::expression): Handle EXCESS_PRECISION_EXPR like
147 NOP_EXPR.
148
cc606a91
GA
1492024-03-19 Jakub Jelinek <jakub@redhat.com>
150
151 PR c/114364
152 * c-omp.cc (enum check_loop_binding_expr_ctx): New type.
153 (check_loop_binding_expr): Remove context argument, add ctx
154 argument with check_loop_binding_expr_ctx type at the end. Don't
155 create diagnostic message from multiple pieces.
156 (c_omp_check_loop_binding_exprs): Adjust callers.
157
c775a030
GA
1582024-03-08 Jakub Jelinek <jakub@redhat.com>
159
160 * c-common.cc (resolve_overloaded_atomic_exchange): Instead of setting
161 p1 to VIEW_CONVERT_EXPR<I_type> (*p1), set it to MEM_REF with p1 and
162 (typeof (p1)) 0 operands and I_type type.
163 (resolve_overloaded_atomic_compare_exchange): Similarly for p2.
164
214dadf3
GA
1652024-03-05 Mark Wielaard <mark@klomp.org>
166
167 * c.opt.urls: Regenerate.
168
1692024-03-05 Patrick Palka <ppalka@redhat.com>
170
171 * c.opt (Wglobal-module): New warning.
172
264e3ad4
GA
1732024-03-04 Mark Wielaard <mark@klomp.org>
174
175 * c.opt.urls: Regenerate.
176
77de8b72
GA
1772024-02-22 Jakub Jelinek <jakub@redhat.com>
178
179 PR c/114007
180 * c-lex.cc (c_common_has_attribute): Parse 2 CPP_COLONs with
181 the first one with COLON_SCOPE flag the same as CPP_SCOPE.
182
67d5b10e
GA
1832024-02-10 Marek Polacek <polacek@redhat.com>
184
185 DR 2237
186 PR c++/107126
187 PR c++/97202
188 * c-opts.cc (c_common_post_options): In C++20 or with -Wc++20-compat,
189 turn on -Wtemplate-id-cdtor.
190 * c.opt (Wtemplate-id-cdtor): New.
191
1922024-02-10 Jakub Jelinek <jakub@redhat.com>
193
194 * c-format.cc (gcc_diag_length_specs): Add t and z modifiers.
195 (PP_FORMAT_CHAR_TABLE, gcc_gfc_char_table): Add entries for t and
196 z modifiers.
197
1982024-02-10 Jakub Jelinek <jakub@redhat.com>
199
200 * c-ada-spec.cc (dump_template_types): Use HOST_SIZE_T_PRINT_UNSIGNED
201 and casts to fmt_size_t instead of "%lu" and casts to unsigned long.
202
e2554540
GA
2032024-02-01 Lewis Hyatt <lhyatt@gmail.com>
204
205 PR preprocessor/105608
206 * c-pch.cc (c_common_read_pch): Adjust line map so that libcpp
207 assigns a location to restored macros which is the same location
208 that triggered the PCH include.
209
dd3455f6
GA
2102024-01-31 Marek Polacek <polacek@redhat.com>
211
212 * c-opts.cc (c_common_post_options): Add an inform saying that
213 -fconcepts-ts is deprecated and will be removed in GCC 15.
214
3979171d
GA
2152024-01-27 Lewis Hyatt <lhyatt@gmail.com>
216
217 PR preprocessor/105608
218 * c-pch.cc (c_common_read_pch): Start a new line map before asking
219 libcpp to restore macros defined prior to reading the PCH, instead
220 of afterward.
221
3128786c
GA
2222024-01-23 Jakub Jelinek <jakub@redhat.com>
223
224 PR c/113518
225 * c-common.cc (atomic_bitint_fetch_using_cas_loop): Call c_fully_fold
226 on lhs_addr, val and model for C.
227
2282024-01-23 Sandra Loosemore <sandra@codesourcery.com>
229
230 * c.opt: Improve sorting of warning options.
231
1a177974
GA
2322024-01-16 Eric Botcazou <ebotcazou@adacore.com>
233
234 PR ada/113397
235 * c-ada-spec.cc (check_type_name_conflict): Add guard for the
236 presence of DECL_NAME on a TYPE_DECL.
237
1a80e955
GA
2382024-01-11 Julian Brown <julian@codesourcery.com>
239
240 * c-pretty-print.cc (c_pretty_printer::postfix_expression,
241 c_pretty_printer::expression): Add OMP_ARRAY_SECTION support.
242
73ce73fc
GA
2432024-01-09 waffl3x <waffl3x@protonmail.com>
244
245 PR c++/102609
246 PR c++/102609
247 C++23 P0847R7 (deducing this) - diagnostics.
248 * c-cppbuiltin.cc (c_cpp_builtins): Define
249 __cpp_explicit_this_parameter=202110L feature test macro.
250
2512024-01-09 Jakub Jelinek <jakub@redhat.com>
252
253 PR c/113262
254 * c-attribs.cc (handle_copy_attribute): Don't use
255 DECL_SOURCE_LOCATION (decl) if decl is not DECL_P, use input_location
256 instead. Formatting fixes.
257
2582024-01-09 Julian Brown <julian@codesourcery.com>
259
260 * c-common.h (c_omp_address_inspector): Remove static from get_origin
261 and maybe_unconvert_ref methods.
262 * c-omp.cc (c_omp_split_clauses): Support OMP_ARRAY_SECTION.
263 (c_omp_address_inspector::map_supported_p): Handle OMP_ARRAY_SECTION.
264 (c_omp_address_inspector::get_origin): Avoid dereferencing possibly
265 NULL type when processing template decls.
266 (c_omp_address_inspector::maybe_unconvert_ref): Likewise.
267
81d1a6e9
GA
2682024-01-04 David Malcolm <dmalcolm@redhat.com>
269
270 * c.opt.urls: New file, autogenerated by regenerate-opt-urls.py.
271
cdfaa4aa
GA
2722023-12-21 Jakub Jelinek <jakub@redhat.com>
273
274 * c.opt (Walloc-size): Enable also for C++ and ObjC++.
275
2762023-12-21 Jakub Jelinek <jakub@redhat.com>
277
278 PR sanitizer/113092
279 * c-ubsan.cc (ubsan_instrument_shift): Workaround for missing
280 ubsan _BitInt support for the shift count.
281
7ad9058c
GA
2822023-12-20 Florian Weimer <fweimer@redhat.com>
283
284 PR c/113050
285 * c-common.cc (get_atomic_generic_size): Use
286 OPT_Wdiscarded_qualifiers instead of
287 OPT_Wincompatible_pointer_types.
288
2892023-12-20 Jakub Jelinek <jakub@redhat.com>
290
291 * c.opt (Wcalloc-transposed-args): New warning.
292 * c-common.h (warn_for_calloc, warn_for_alloc_size): Declare.
293 * c-warn.cc (warn_for_calloc, warn_for_alloc_size): New functions.
294
7e6f0faa
GA
2952023-12-16 Andrew Carlotti <andrew.carlotti@arm.com>
296
297 * c-attribs.cc (attr_target_exclusions): Make
298 target/target_clones exclusion target-dependent.
299 (attr_target_clones_exclusions): Ditto, and add target_version.
300 (attr_target_version_exclusions): New.
301 (c_common_attribute_table): Add target_version.
302 (handle_target_version_attribute): New.
303 (handle_target_attribute): Amend comment.
304 (handle_target_clones_attribute): Ditto.
305
3062023-12-16 Andrew Carlotti <andrew.carlotti@arm.com>
307
308 * c-attribs.cc (attr_always_inline_exclusions): New.
309 (attr_target_exclusions): Ditto.
310 (attr_target_clones_exclusions): Ditto.
311 (c_common_attribute_table): Add new exclusion lists.
312 (handle_noinline_attribute): Remove custom exclusion handling.
313 (handle_always_inline_attribute): Ditto.
314 (handle_target_attribute): Ditto.
315 (handle_target_clones_attribute): Ditto.
316
e8018ccf
GA
3172023-12-13 Patrick Palka <ppalka@redhat.com>
318
319 * c.opt: Add -fdiagnostics-all-candidates.
320
3212023-12-13 Jason Merrill <jason@redhat.com>
322
323 * c-warn.cc (check_address_or_pointer_of_packed_member):
324 Rename to check_address_of_packed_member.
325 (check_and_warn_address_or_pointer_of_packed_member):
326 Rename to check_and_warn_address_of_packed_member.
327 (warn_for_address_or_pointer_of_packed_member):
328 Rename to warn_for_address_of_packed_member.
329 * c-common.h: Adjust.
330
3312023-12-13 Jason Merrill <jason@redhat.com>
332
333 * c-warn.cc (check_address_or_pointer_of_packed_member):
334 Remove warning based on TYPE_PACKED.
335
3362023-12-13 Julian Brown <julian@codesourcery.com>
337
338 * c-common.h (c_omp_region_type): Add C_ORT_EXIT_DATA,
339 C_ORT_OMP_EXIT_DATA and C_ORT_ACC_TARGET.
340 (omp_addr_token): Add forward declaration.
341 (c_omp_address_inspector): New class.
342 * c-omp.cc (c_omp_adjust_map_clauses): Mark decls addressable here, but
343 do not change any mapping node types.
344 (c_omp_address_inspector::unconverted_ref_origin,
345 c_omp_address_inspector::component_access_p,
346 c_omp_address_inspector::check_clause,
347 c_omp_address_inspector::get_root_term,
348 c_omp_address_inspector::map_supported_p,
349 c_omp_address_inspector::get_origin,
350 c_omp_address_inspector::maybe_unconvert_ref,
351 c_omp_address_inspector::maybe_zero_length_array_section,
352 c_omp_address_inspector::expand_array_base,
353 c_omp_address_inspector::expand_component_selector,
354 c_omp_address_inspector::expand_map_clause): New methods.
355 (omp_expand_access_chain): New function.
356
8a5d6ce0
GA
3572023-12-12 Richard Biener <rguenther@suse.de>
358
359 PR ipa/92606
360 * c-attribs.cc (handle_noicf_attribute): Also allow the
361 attribute on global variables.
362
4a6613e2
GA
3632023-12-10 Ken Matsui <kmatsui@gcc.gnu.org>
364 Patrick Palka <ppalka@redhat.com>
365
366 * c-common.cc (c_common_reswords): Remove all mappings of
367 built-in traits.
368 * c-common.h (enum rid): Remove all RID values for built-in
369 traits.
370
08f89e5e
GA
3712023-12-07 Andrew Pinski <pinskia@gmail.com>
372 Jakub Jelinek <jakub@redhat.com>
373
374 PR preprocessor/111965
375 * c-opts.cc (c_common_handle_option) <case OPT_fdebug_cpp>: Set
376 cpp_opts->debug to value rather than 1.
377
ae9e48e5
GA
3782023-12-06 David Malcolm <dmalcolm@redhat.com>
379
380 * c-opts.cc (c_diagnostic_finalizer): Make "diagnostic" param
381 const.
382
3dd09cd9
GA
3832023-12-06 Alexandre Oliva <oliva@adacore.com>
384
385 * c-attribs.cc: Include ipa-strub.h.
386 (handle_strub_attribute): New.
387 (c_common_attribute_table): Add strub.
388
3892023-12-05 Richard Sandiford <richard.sandiford@arm.com>
390
391 * c-attribs.cc (c_common_gnu_attribute_table): Add extra
392 braces to work around PR 16333 in older compilers.
393
3942023-12-05 Richard Biener <rguenther@suse.de>
395
396 PR c/89270
397 * c-common.cc (c_common_type_for_size): Consider
398 registered_builtin_types.
399
4002023-12-05 Marek Polacek <polacek@redhat.com>
401
402 PR c++/107687
403 PR c++/110997
404 * c-cppbuiltin.cc (c_cpp_builtins): Update __cpp_consteval.
405 * c-opts.cc (c_common_post_options): Pre-C++20, unset
406 flag_immediate_escalation.
407 * c.opt (fimmediate-escalation): New option.
408
04d4a494
GA
4092023-12-02 Richard Sandiford <richard.sandiford@arm.com>
410
411 * c-common.h (c_common_attribute_table): Replace with...
412 (c_common_gnu_attribute_table): ...this.
413 (c_common_format_attribute_table): Change type to
414 scoped_attribute_specs.
415 * c-attribs.cc (c_common_attribute_table): Replace with...
416 (c_common_gnu_attributes, c_common_gnu_attribute_table): ...these
417 new globals.
418 (c_common_format_attribute_table): Change type to
419 scoped_attribute_specs, using...
420 (c_common_format_attributes): ...this as the underlying array.
421
2e0f3f97
GA
4222023-12-01 Florian Weimer <fweimer@redhat.com>
423
424 * c.opt (Wdeclaration-missing-parameter-type): New.
425
8428bcd7
GA
4262023-11-30 Jakub Jelinek <jakub@redhat.com>
427
428 PR c++/110349
429 * c-cppbuiltin.cc (c_cpp_builtins): Predefine
430 __cpp_placeholder_variables=202306L for C++26.
431
31d8cf17
GA
4322023-11-29 Alexandre Oliva <oliva@adacore.com>
433
434 * c-attribs.cc (c_common_attribute_table): Add hardbool.
435 (handle_hardbool_attribute): New.
436 (type_valid_for_vector_size): Reject hardbool.
437 * c-common.cc (convert_and_check): Skip warnings for convert
438 and check for hardbool.
439 (c_hardbool_type_attr_1): New.
440 * c-common.h (c_hardbool_type_attr): New.
441
ad3e759c
GA
4422023-11-27 Alex Coplan <alex.coplan@arm.com>
443 Iain Sandoe <iain@sandoe.co.uk>
444
445 PR c++/60512
446 * c-common.cc (struct hf_feature_info): New.
447 (c_common_register_feature): New.
448 (init_has_feature): New.
449 (has_feature_p): New.
450 * c-common.h (c_common_has_feature): New.
451 (c_family_register_lang_features): New.
452 (c_common_register_feature): New.
453 (has_feature_p): New.
454 * c-lex.cc (init_c_lex): Plumb through has_feature callback.
455 (c_common_has_builtin): Generalize and move common part ...
456 (c_common_lex_availability_macro): ... here.
457 (c_common_has_feature): New.
458 * c-ppoutput.cc (init_pp_output): Plumb through has_feature.
459
77cf1dba
GA
4602023-11-24 Lewis Hyatt <lhyatt@gmail.com>
461
462 PR pch/112319
463 * c-ppoutput.cc (cb_read_pch): Reinitialize the frontend parser
464 after loading a PCH.
465
4662023-11-24 Tobias Burnus <tobias@codesourcery.com>
467
468 * c.opt (-Wopenmp): Add missing tailing '.'.
469
4702023-11-24 Tobias Burnus <tobias@codesourcery.com>
471
472 * c.opt (Wopenmp): Add, enable by default.
473
6fb55db0
GA
4742023-11-23 Marek Polacek <polacek@redhat.com>
475
476 * c-opts.cc: Include "target.h".
477 (c_finish_options): Maybe cpp_define _FORTIFY_SOURCE
478 and _GLIBCXX_ASSERTIONS.
479
4802023-11-23 Jakub Jelinek <jakub@redhat.com>
481
482 * c-common.h (enum rid): Add RID_BUILTIN_STDC: New.
483 * c-common.cc (c_common_reswords): Add __builtin_stdc_bit_ceil,
484 __builtin_stdc_bit_floor, __builtin_stdc_bit_width,
485 __builtin_stdc_count_ones, __builtin_stdc_count_zeros,
486 __builtin_stdc_first_leading_one, __builtin_stdc_first_leading_zero,
487 __builtin_stdc_first_trailing_one, __builtin_stdc_first_trailing_zero,
488 __builtin_stdc_has_single_bit, __builtin_stdc_leading_ones,
489 __builtin_stdc_leading_zeros, __builtin_stdc_trailing_ones and
490 __builtin_stdc_trailing_zeros. Move __builtin_assoc_barrier
491 alphabetically earlier.
492
4932023-11-23 Jakub Jelinek <jakub@redhat.com>
494
495 PR c++/110348
496 * c.opt (Wc++26-extensions): New option.
497 * c-cppbuiltin.cc (c_cpp_builtins): For C++26 predefine
498 __cpp_static_assert to 202306L rather than 201411L.
499
b54b3800
GA
5002023-11-19 David Malcolm <dmalcolm@redhat.com>
501
502 * c-lex.cc: Include "rich-location.h".
503
9d58d2d8
GA
5042023-11-18 Sebastian Huber <sebastian.huber@embedded-brains.de>
505
506 * c-cppbuiltin.cc (c_cpp_builtins): Define
507 __LIBGCC_HAVE_LIBATOMIC for libgcov.
508
5092023-11-18 Sebastian Huber <sebastian.huber@embedded-brains.de>
510
511 Revert:
512 2021-08-16 Sebastian Huber <sebastian.huber@embedded-brains.de>
513
514 * c-cppbuiltin.c (c_cpp_builtins): Define
515 __LIBGCC_GCOV_TYPE_SIZE if flag_building_libgcc is true.
516
c63a0bbc
GA
5172023-11-17 Jakub Jelinek <jakub@redhat.com>
518
519 PR c++/107571
520 * c-gimplify.cc (genericize_c_loop): For C++ mark IFN_FALLTHROUGH
521 call at the end of loop body as TREE_NOTHROW.
522
eaedb56a
GA
5232023-11-14 Lewis Hyatt <lhyatt@gmail.com>
524
525 PR pch/9471
526 PR pch/47857
527 * c-opts.cc (c_common_post_options): Set cpp_opts->main_search
528 so libcpp knows it is compiling a header file separately.
529
5302023-11-14 David Malcolm <dmalcolm@redhat.com>
531
532 * c-warn.cc (conversion_warning): Update call to
533 global_dc->m_option_enabled to use option_enabled_p.
534
5352023-11-14 David Malcolm <dmalcolm@redhat.com>
536
537 * c-common.cc (c_get_substring_location): Use global_dc's
538 file_cache.
539 * c-format.cc (get_corrected_substring): Likewise.
540 * c-indentation.cc (get_visual_column): Add file_cache param.
541 (get_first_nws_vis_column): Likewise.
542 (detect_intervening_unindent): Likewise.
543 (should_warn_for_misleading_indentation): Use global_dc's
544 file_cache.
545 (assert_get_visual_column_succeeds): Add file_cache param.
546 (ASSERT_GET_VISUAL_COLUMN_SUCCEEDS): Likewise.
547 (assert_get_visual_column_fails): Likewise.
548 (define ASSERT_GET_VISUAL_COLUMN_FAILS): Likewise.
549 (selftest::test_get_visual_column): Create and use a temporary
550 file_cache.
551
b9fd8399
GA
5522023-11-14 Jakub Jelinek <jakub@redhat.com>
553
554 PR c/111309
555 * c-common.cc (check_builtin_function_arguments): Handle
556 BUILT_IN_{CLZ,CTZ,CLRSB,FFS,PARITY,POPCOUNT}G.
557 * c-gimplify.cc (c_gimplify_expr): If __builtin_c[lt]zg second
558 argument hasn't been folded into constant yet, transform it to one
559 argument call inside of a COND_EXPR which for first argument 0
560 returns the second argument.
561
5622023-11-11 Martin Uecker <uecker@tugraz.at>
563
564 PR c/110815
565 PR c/112428
566 * c-attribs.cc (build_attr_access_from_parms): Synthesize
567 nonnull attribute for parameters declared with `static`.
568
5692023-11-09 Florian Weimer <fweimer@redhat.com>
570
571 * c.opt (Wreturn-mismatch): New.
572
3e9461a3
GA
5732023-11-08 Florian Weimer <fweimer@redhat.com>
574
575 * c.opt (fpermissive): Enable for C and ObjC.
576 * c-opts.cc (c_common_post_options): Enable -fpermissive.
577
c48f1056
GA
5782023-11-07 Joseph Myers <joseph@codesourcery.com>
579
580 * c-format.h (T2X_UI): Rename to T23_UI.
581 (T2X_UL): Rename to T23_UL.
582 (T2X_ULL): Rename to T23_ULL.
583 (T2X_US): Rename to T23_US.
584 (T2X_UC): Rename to T23_UC.
585 (T2X_ST): Rename to T23_ST.
586 (T2X_UPD): Rename to T23_UPD.
587 (T2X_UIM): Rename to T23_UIM.
588 (T2X_D32): Rename to T23_D32.
589 (T2X_D64): Rename to T23_D64.
590 (T2X_D128): Rename to T23_D128.
591 (T2X_I8): Rename to T23_I8.
592 (T2X_I16): Rename to T23_I16.
593 (T2X_I32): Rename to T23_I32.
594 (T2X_I64): Rename to T23_I64.
595 (T2X_U8): Rename to T23_U8.
596 (T2X_U16): Rename to T23_U16.
597 (T2X_U32): Rename to T23_U32.
598 (T2X_U64): Rename to T23_U64.
599 (T2X_IF8): Rename to T23_IF8.
600 (T2X_IF16): Rename to T23_IF16.
601 (T2X_IF32): Rename to T23_IF32.
602 (T2X_IF64): Rename to T23_IF64.
603 (T2X_UF8): Rename to T23_UF8.
604 (T2X_UF16): Rename to T23_UF16.
605 (T2X_UF32): Rename to T23_UF32.
606 (T2X_UF64): Rename to T23_UF64.
607 * c-format.cc: Update all uses of T2X_* macros to use T23_*.
608
6092023-11-07 Kwok Cheung Yeung <kcy@codesourcery.com>
610
611 * c-attribs.cc (c_common_attribute_table): Add attribute for
612 indirect functions.
613 * c-pragma.h (enum parma_omp_clause): Add entry for indirect clause.
614
6152023-11-07 Joseph Myers <joseph@codesourcery.com>
616
617 * c-common.cc (flag_isoc2x): Rename to flag_isoc23.
618 (c_common_reswords): Use D_C23 instead of D_C2X.
619 * c-common.h: Refer throughout to C23 instead of C2X in comments.
620 (D_C2X): Rename to D_C23.
621 (flag_isoc2x): Rename to flag_isoc23.
622 * c-cppbuiltin.cc (builtin_define_float_constants): Use
623 flag_isoc23 instead of flag_isoc2x. Refer to C23 instead of C2x
624 in comments.
625 * c-format.cc: Use STD_C23 instead of STD_C2X and flag_isoc23
626 instead of flag_isoc2x. Refer to C23 instead of C2X in comments.
627 * c-format.h: Use STD_C23 instead of STD_C2X.
628 * c-lex.cc: Use warn_c11_c23_compat instead of warn_c11_c2x_compat
629 and flag_isoc23 instead of flag_isoc2x. Refer to C23 instead of
630 C2X in diagnostics.
631 * c-opts.cc: Use flag_isoc23 instead of flag_isoc2x. Refer to C23
632 instead of C2X in comments.
633 (set_std_c2x): Rename to set_std_c23.
634 * c.opt (Wc11-c23-compat): Use CPP(cpp_warn_c11_c23_compat)
635 CppReason(CPP_W_C11_C23_COMPAT) Var(warn_c11_c23_compat) instead
636 of CPP(cpp_warn_c11_c2x_compat) CppReason(CPP_W_C11_C2X_COMPAT)
637 Var(warn_c11_c2x_compat).
638
2cca6ae6
GA
6392023-11-06 Joseph Myers <joseph@codesourcery.com>
640
641 PR c/107954
642 * c.opt (Wc11-c2x-compat): Rename to Wc11-c23-compat and make into
643 a deprecated alias of Wc11-c23-compat.
644 (std=c2x): Rename to std=c23 and make into a deprecated alias of
645 std=c23.
646 (std=gnu2x): Rename to std=gnu23 and make into a deprecated alias
647 of std=gnu23.
648 (std=iso9899:2024): New option. Alias of std=c23.
649 * c-lex.cc (interpret_float): Use OPT_Wc11_c23_compat instead of
650 OPT_Wc11_c2x_compat.
651 * c-opts.cc (c_common_handle_option): Use OPT_std_c23 instead of
652 OPT_std_c2x and OPT_std_gnu23 instead of OPT_std_gnu2x.
653
459866ea
GA
6542023-11-05 Jakub Jelinek <jakub@redhat.com>
655
656 * c-lex.cc (c_common_has_attribute): Return 1 for omp::directive
657 and omp::sequence with -fopenmp or -fopenmp-simd also for C, not
658 just for C++. Return 1 for omp::decl with -fopenmp or -fopenmp-simd
659 for both C and C++.
660
eb4e1b62
GA
6612023-11-04 David Malcolm <dmalcolm@redhat.com>
662
663 * c-pragma.cc:: (handle_pragma_push_options): Fix missing "GCC" in
664 name of pragma in "junk" message.
665 (handle_pragma_pop_options): Likewise.
666
6672023-11-04 David Malcolm <dmalcolm@redhat.com>
668
669 * c-common.cc: Update for changes to diagnostic_context.
670 * c-indentation.cc: Likewise.
671 * c-opts.cc: Likewise.
672 * c-warn.cc: Likewise.
673
c73d2d49
GA
6742023-11-01 Martin Uecker <uecker@tugraz.at>
675
676 PR c/71219
677 * c.opt (Walloc-size): New option.
678
eac0917b
GA
6792023-10-31 David Malcolm <dmalcolm@redhat.com>
680
681 * c-warn.cc (warn_for_multistatement_macros): Update for removal
682 of MACRO_MAP_EXPANSION_POINT_LOCATION.
683
7f974c5f
GA
6842023-10-27 Lewis Hyatt <lhyatt@gmail.com>
685
686 PR preprocessor/87299
687 * c-pragma.cc (init_pragma): Register `#pragma GCC target' and
688 related pragmas in preprocess-only mode, and enable early handling.
689 (c_reset_target_pragmas): New function refactoring code from...
690 (handle_pragma_reset_options): ...here.
691 * c-pragma.h (c_reset_target_pragmas): Declare.
692
ecca503b
GA
6932023-10-26 David Malcolm <dmalcolm@redhat.com>
694
695 * c-attribs.cc (c_common_attribute_table): Add
696 "null_terminated_string_arg".
697 (handle_null_terminated_string_arg_attribute): New.
698
9cf2e744
GA
6992023-10-23 Lewis Hyatt <lhyatt@gmail.com>
700
701 PR preprocessor/36887
702 * c-opts.cc (c_common_init_options): Pass new extra hash map
703 argument to cpp_create_reader().
704
6f684dd2
GA
7052023-10-20 Marek Polacek <polacek@redhat.com>
706
707 PR c/111884
708 * c-common.cc (c_common_get_alias_set): Return -1 for char8_t only
709 in C++.
710
7112023-10-20 Patrick Palka <ppalka@redhat.com>
712
713 * c-warn.cc (check_address_or_pointer_of_packed_member): Handle
714 type-dependent callee of CALL_EXPR.
715
7162023-10-20 Alexandre Oliva <oliva@adacore.com>
717
718 * c-attribs.cc (handle_expected_throw_attribute): New.
719 (c_common_attribute_table): Add expected_throw.
720
c85f7481
GA
7212023-10-19 Lewis Hyatt <lhyatt@gmail.com>
722
723 PR c++/89038
724 * c-pragma.cc (handle_pragma_diagnostic_impl): Handle
725 -Wunknown-pragmas during early processing.
726
d5cfabc6
GA
7272023-10-15 Jakub Jelinek <jakub@redhat.com>
728
729 PR tree-optimization/111800
730 * c-warn.cc (match_case_to_enum_1): Assert w.get_precision ()
731 is smaller or equal to WIDE_INT_MAX_INL_PRECISION rather than
732 w.get_len () is smaller or equal to WIDE_INT_MAX_INL_ELTS.
733
f9ef2e6d
GA
7342023-10-12 Jakub Jelinek <jakub@redhat.com>
735
736 PR c/102989
737 * c-warn.cc (match_case_to_enum_1): Use wi::to_wide just once instead
738 of 3 times, assert get_len () is smaller than WIDE_INT_MAX_INL_ELTS.
739
41d1c9a9
GA
7402023-10-02 David Malcolm <dmalcolm@redhat.com>
741
742 * c-common.cc (maybe_add_include_fixit): Update for renaming of
743 diagnostic_context's show_caret to m_source_printing.enabled.
744 * c-opts.cc (c_common_init_options): Update for renaming of
745 diagnostic_context's colorize_source_p to
746 m_source_printing.colorize_source_p.
747
4907d220
GA
7482023-09-20 Jakub Jelinek <jakub@redhat.com>
749
750 PR c++/111392
751 * c-omp.cc (c_omp_directives): Add commented out groupprivate
752 directive entry.
753
590a8bec
GA
7542023-09-19 Ben Boeckel <ben.boeckel@kitware.com>
755
756 * c-opts.cc (c_common_handle_option): Add fdeps_file variable and
757 -fdeps-format=, -fdeps-file=, and -fdeps-target= parsing.
758 * c.opt: Add -fdeps-format=, -fdeps-file=, and -fdeps-target=
759 flags.
760
7612023-09-19 Javier Martinez <javier.martinez.bugzilla@gmail.com>
762
763 * c-attribs.cc (handle_hot_attribute): remove warning on
764 RECORD_TYPE and UNION_TYPE when in c_dialect_xx.
765 (handle_cold_attribute): Likewise.
766
7672023-09-19 Jakub Jelinek <jakub@redhat.com>
768
769 * c-common.cc (c_common_signed_or_unsigned_type): Return INTEGER_TYPE
770 for signed variant of unsigned _BitInt(1).
771
a134b6ce
GA
7722023-09-06 Jakub Jelinek <jakub@redhat.com>
773
774 PR c/102989
775 * c-attribs.cc (type_valid_for_vector_size): Reject vector types
776 with BITINT_TYPE elements even if they have mode precision and
777 suitable size.
778
7792023-09-06 Jakub Jelinek <jakub@redhat.com>
780
781 PR c/102989
782 * c-common.cc (c_common_reswords): Add _BitInt as keyword.
783 (unsafe_conversion_p): Handle BITINT_TYPE like INTEGER_TYPE.
784 (c_common_signed_or_unsigned_type): Handle BITINT_TYPE.
785 (c_common_truthvalue_conversion, c_common_get_alias_set,
786 check_builtin_function_arguments): Handle BITINT_TYPE like
787 INTEGER_TYPE.
788 (sync_resolve_size): Add ORIG_FORMAT argument. If
789 FETCH && !ORIG_FORMAT, type is BITINT_TYPE, return -1 if size isn't
790 one of 1, 2, 4, 8 or 16 or if it is 16 but TImode is not supported.
791 (atomic_bitint_fetch_using_cas_loop): New function.
792 (resolve_overloaded_builtin): Adjust sync_resolve_size caller. If
793 -1 is returned, use atomic_bitint_fetch_using_cas_loop to lower it.
794 Formatting fix.
795 (keyword_begins_type_specifier): Handle RID_BITINT.
796 * c-common.h (enum rid): Add RID_BITINT enumerator.
797 * c-cppbuiltin.cc (c_cpp_builtins): For C call
798 targetm.c.bitint_type_info and predefine __BITINT_MAXWIDTH__
799 and for -fbuilding-libgcc also __LIBGCC_BITINT_LIMB_WIDTH__ and
800 __LIBGCC_BITINT_ORDER__ macros if _BitInt is supported.
801 * c-lex.cc (interpret_integer): Handle CPP_N_BITINT.
802 * c-pretty-print.cc (c_pretty_printer::simple_type_specifier,
803 c_pretty_printer::direct_abstract_declarator,
804 c_pretty_printer::direct_declarator, c_pretty_printer::declarator):
805 Handle BITINT_TYPE.
806 (pp_c_integer_constant): Handle printing of large precision wide_ints
807 which would buffer overflow digit_buffer.
808 * c-warn.cc (conversion_warning, warnings_for_convert_and_check,
809 warnings_for_convert_and_check): Handle BITINT_TYPE like
810 INTEGER_TYPE.
811
8122023-09-06 Jakub Jelinek <jakub@redhat.com>
813
814 PR c/102989
815 * c-ubsan.cc (ubsan_instrument_shift): Use UBSAN_PRINT_FORCE_INT
816 for type0 type descriptor.
817
8182023-09-06 Jakub Jelinek <jakub@redhat.com>
819
820 * c-lex.cc (interpret_float): For C diagnostics on FN and FNx suffixes
821 append " before C2X" to diagnostics text and follow behavior of
822 pedwarn_c11.
823
80907b03
GA
8242023-09-01 Jakub Jelinek <jakub@redhat.com>
825
826 PR c++/111069
827 * c-opts.cc (c_common_post_options): Change latest_abi_version to 19.
828
65c36ecc
GA
8292023-08-31 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
830
831 * c.opt: Change spelling to macOS.
832
8332023-08-31 Richard Biener <rguenther@suse.de>
834
835 PR middle-end/111253
836 * c-pretty-print.cc (c_pretty_printer::primary_expression):
837 Only dump gimple_assign_single_p SSA def RHS.
838
b8863640
GA
8392023-08-25 Sandra Loosemore <sandra@codesourcery.com>
840
841 * c-common.h (c_omp_check_loop_binding_exprs): Declare.
842 * c-omp.cc: Include tree-iterator.h.
843 (find_binding_in_body): New.
844 (check_loop_binding_expr_r): New.
845 (LOCATION_OR): New.
846 (check_looop_binding_expr): New.
847 (c_omp_check_loop_binding_exprs): New.
848
8492023-08-25 Uros Bizjak <ubizjak@gmail.com>
850
851 * c-format.cc (read_any_format_width):
852 Rename TRUE/FALSE to true/false.
853
a7593210
GA
8542023-08-20 Martin Uecker <uecker@tugraz.at>
855
856 * c-format.cc: Fix identation.
857
8582023-08-20 Tomas Kalibera <tomas.kalibera@gmail.com>
859
860 PR c/95130
861 * c-format.cc: skip default format for printf symbol if
862 explicitly declared by prototype.
863
1eb2433f
GA
8642023-08-17 Jose E. Marchesi <jose.marchesi@oracle.com>
865
866 PR c/106537
867 * c.opt (Wcompare-distinct-pointer-types): New option.
868
3cc78cf2
GA
8692023-08-14 Jason Merrill <jason@redhat.com>
870
871 * c-cppbuiltin.cc (c_cpp_builtins): Adjust __cpp_concepts.
872
886afed6
GA
8732023-08-11 Jakub Jelinek <jakub@redhat.com>
874
875 * c-common.cc (c_common_reswords): Add __typeof_unqual
876 and __typeof_unqual__ spellings of typeof_unqual.
877
8782023-08-11 Martin Uecker <uecker@tugraz.at>
879
880 PR c/84510
881 * c.opt: Enable warning for C and ObjC.
882
87b0749c
GA
8832023-08-05 Martin Uecker <uecker@tugraz.at>
884
885 PR c/98536
886 * c-warn.cc (warn_parm_array_mismatch): Do not warn if more
887 bounds are specified.
888
5b42ee2c
GA
8892023-08-04 Tamar Christina <tamar.christina@arm.com>
890
891 * c-pragma.h (enum pragma_kind): Add PRAGMA_NOVECTOR.
892 * c-pragma.cc (init_pragma): Use it.
893
cf58b896
GA
8942023-08-01 Lewis Hyatt <lhyatt@gmail.com>
895
896 * c-common.h (c_init_preprocess): Declare new function.
897 * c-opts.cc (c_common_init): Call it.
898 * c-lex.cc (cb_def_pragma): Add a comment.
899 (get_token): New function wrapping cpp_get_token.
900 (c_lex_with_flags): Use the new wrapper function to support
901 obtaining tokens in preprocess_only mode.
902 (lex_string): Likewise.
903 * c-pragma.cc (pragma_diagnostic_lex_normal): Rename to...
904 (pragma_diagnostic_lex): ...this.
905 (pragma_diagnostic_lex_pp): Remove.
906 (handle_pragma_diagnostic_impl): Call pragma_diagnostic_lex () in
907 all modes.
908 (c_pp_invoke_early_pragma_handler): Adapt to support pragma_lex ()
909 usage.
910 * c-pragma.h (pragma_lex_discard_to_eol): Declare.
911
a2f31d79
GA
9122023-07-31 Hamza Mahfooz <someguy@effective-light.com>
913
914 PR c/65213
915 * c.opt (-Wmissing-variable-declarations): New option.
916
e2bf82d5
GA
9172023-07-20 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
918
919 PR middle-end/77928
920 * c-common.cc (check_builtin_function_arguments):
921 Handle BUILT_IN_ISEQSIG.
922
5158918a
GA
9232023-07-05 Robin Dapp <rdapp@ventanamicro.com>
924 Juzhe-Zhong <juzhe.zhong@rivai.ai>
925
926 * c-common.cc (c_common_type_for_mode): Use GET_MODE_PRECISION.
927
14bfda60
GA
9282023-06-29 Qing Zhao <qing.zhao@oracle.com>
929
930 PR c/77650
931 * c.opt: New option -Wflex-array-member-not-at-end.
932
5f590ee3
GA
9332023-06-28 Jason Merrill <jason@redhat.com>
934
935 PR c++/110344
936 * c-cppbuiltin.cc (c_cpp_builtins): Update __cpp_constexpr.
937
267e1fea
GA
9382023-06-26 Richard Biener <rguenther@suse.de>
939
940 * c-common.cc (shorten_binary_op): Exit early for VECTOR_TYPE
941 operations.
942
6f78df4c
GA
9432023-06-23 Marek Polacek <polacek@redhat.com>
944
945 * c-common.h (cxx_dialect): Add cxx26 as a dialect.
946 * c-opts.cc (set_std_cxx26): New.
947 (c_common_handle_option): Set options when -std={c,gnu}++2{c,6} is
948 enabled.
949 (c_common_post_options): Adjust comments.
950 * c.opt: Add options for -std=c++26, std=c++2c, -std=gnu++26,
951 and -std=gnu++2c.
952 (std=c++2b): Mark as Undocumented.
953 (std=c++23): No longer Undocumented.
954
80e9ca0e
GA
9552023-06-21 Alexander Monakov <amonakov@ispras.ru>
956
957 * c-gimplify.cc (fma_supported_p): New helper.
958 (c_gimplify_expr) [PLUS_EXPR, MINUS_EXPR]: Implement FMA
959 contraction.
960
f10a4ce0
GA
9612023-06-16 Alex Coplan <alex.coplan@arm.com>
962
963 * c.opt (Welaborated-enum-base): New.
964
532fb120
GA
9652023-06-13 David Malcolm <dmalcolm@redhat.com>
966
967 PR c/84890
968 * known-headers.cc
969 (suggest_missing_header::~suggest_missing_header): Reword note to
970 avoid negative tone of "forgetting".
971
8c5b1365
GA
9722023-06-07 Jason Merrill <jason@redhat.com>
973
974 PR c++/58487
975 * c.opt: Add -Wnrvo.
976
6e6bb373
GA
9772023-05-26 Martin Uecker <uecker@tugraz.at>
978
979 * c-attribs.cc (build_attr_access_from_parms): Split loop to first
980 record all parameters.
981
b2776076
GA
9822023-05-18 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
983
984 * c-ada-spec.cc (has_static_fields): Use _P() defines from tree.h.
985 (dump_ada_declaration): Ditto.
986 (dump_ada_structure): Ditto.
987 * c-common.cc (unsafe_conversion_p): Ditto.
988 (shorten_compare): Ditto.
989 (pointer_int_sum): Ditto.
990 (c_common_truthvalue_conversion): Ditto.
991 (scalar_to_vector): Ditto.
992 * c-common.h (gnu_vector_type_p): Ditto.
993 * c-omp.cc (c_omp_depend_t_p): Ditto.
994 (c_omp_split_clauses): Ditto.
995 * c-ubsan.cc (ubsan_instrument_division): Ditto.
996 * c-warn.cc (conversion_warning): Ditto.
997 (warnings_for_convert_and_check): Ditto.
998
ff2dcddf
GA
9992023-05-18 Joseph Myers <joseph@codesourcery.com>
1000
1001 * c-format.cc (print_char_table): Handle %B like %b.
1002
3427b51b
GA
10032023-05-15 Joseph Myers <joseph@codesourcery.com>
1004
1005 * c-lex.cc (c_common_has_attribute): Use 202311 as
1006 __has_c_attribute return for all C2x attributes.
1007
10082023-05-15 Patrick Palka <ppalka@redhat.com>
1009
1010 * c-cppbuiltin.cc (c_cpp_builtins): Predefine __cpp_auto_cast
1011 for C++23.
1012
1fc8da95
GA
10132023-05-01 Marek Polacek <polacek@redhat.com>
1014
1015 * c-ubsan.cc (ubsan_maybe_instrument_array_ref): Don't copy_node.
1016
579cdc1e
GA
10172023-03-28 David Malcolm <dmalcolm@redhat.com>
1018
1019 PR c/107002
1020 * c-common.h (check_for_xor_used_as_pow): Add "rhs_loc" param.
1021 * c-warn.cc (check_for_xor_used_as_pow): Add "rhs_loc" param.
1022 Reject cases where involving macro expansions.
1023
10242023-03-28 Jason Merrill <jason@redhat.com>
1025
1026 PR c++/107163
1027 * c-common.cc (verify_tree): Don't use sequenced handling
1028 for COMPONENT_REF.
1029
454a4d50
GA
10302023-03-17 Jakub Jelinek <jakub@redhat.com>
1031
1032 PR c/109151
1033 * c-ubsan.cc (ubsan_instrument_division): Handle all scalar integral
1034 types rather than just INTEGER_TYPE.
1035
c8065441
GA
10362023-03-10 Marek Polacek <polacek@redhat.com>
1037
1038 PR sanitizer/108060
1039 PR sanitizer/109050
1040 * c-gimplify.cc (ubsan_walk_array_refs_r): For a MODIFY_EXPR, instrument
1041 the RHS before the LHS.
1042
2858bf16
GA
10432023-03-04 Jakub Jelinek <jakub@redhat.com>
1044
1045 PR c/107465
1046 * c-warn.cc (warn_for_sign_compare): Don't warn for unset bits
1047 above innermost zero extension of BIT_NOT_EXPR result.
1048
10492023-03-04 Jakub Jelinek <jakub@redhat.com>
1050
1051 PR c/107465
1052 * c-warn.cc (warn_for_sign_compare): If c_common_get_narrower
1053 doesn't return a narrower result, use TYPE_UNSIGNED to set unsignedp0
1054 and unsignedp1. For the one BIT_NOT_EXPR case vs. one without,
1055 only check for constant in the non-BIT_NOT_EXPR operand, use std::swap
1056 to simplify the code, only warn if BIT_NOT_EXPR operand is extended
1057 from narrower unsigned, fix up computation of mask for the constant
1058 cases and for unsigned other operand case handle differently
1059 BIT_NOT_EXPR result being sign vs. zero extended.
1060
10612023-03-04 Jakub Jelinek <jakub@redhat.com>
1062
1063 PR c/107846
1064 * c-warn.cc: Include langhooks.h.
1065 (maybe_warn_shift_overflow): Set type0 to what TREE_TYPE (op0)
1066 promotes to rather than TREE_TYPE (op0) itself, if TREE_TYPE (op0)
1067 is narrower than type0 and unsigned, use wi::min_precision with
1068 UNSIGNED and fold_convert op0 to type0 before emitting the warning.
1069
2aa6673e
GA
10702023-03-03 Alexandre Oliva <oliva@adacore.com>
1071
1072 * c-common.cc (c_common_nodes_and_builtins): Take
1073 wchar_type_node for wint_type_node when aliased.
1074 (c_stddef_cpp_builtins): Define __WINT_TYPE__, when aliased to
1075 wchar_t, to the underlying type rather than wchar_t in
1076 non-C++.
1077 * c-cppbuiltin.cc (type_suffix): Handle wchar_type_node.
1078
6f9e2f14
GA
10792023-02-28 Marek Polacek <polacek@redhat.com>
1080
1081 PR c++/107938
1082 * c-warn.cc (check_address_or_pointer_of_packed_member): Check
1083 POINTER_TYPE_P.
1084
10852023-02-28 Jakub Jelinek <jakub@redhat.com>
1086
1087 PR sanitizer/108894
1088 * c-common.h (c_strict_flex_array_level_of): Declare.
1089 * c-common.cc (c_strict_flex_array_level_of): New function,
1090 moved and renamed from c-decl.cc's strict_flex_array_level_of.
1091 * c-ubsan.cc (ubsan_instrument_bounds): Fix comment typo. For
1092 C check c_strict_flex_array_level_of whether a trailing array
1093 should be treated as flexible member like. Handle C [0] arrays.
1094 Add 1 + index_off_by_one rather than index_off_by_one to bounds
1095 and use tree_int_cst_lt rather than tree_int_cst_le for idx vs.
1096 bounds comparison.
1097
e2b20ed3
GA
10982023-02-23 Jakub Jelinek <jakub@redhat.com>
1099
1100 PR translation/108890
1101 * c.opt (fcontracts): Fix description.
1102
b6f98991
GA
11032023-02-22 Marek Polacek <polacek@redhat.com>
1104
1105 PR c/108880
1106 * c-gimplify.cc (c_genericize_control_stmt) <case STATEMENT_LIST>: Pass
1107 pset to walk_tree_1.
1108 (c_genericize): Call walk_tree with an explicit pset.
1109
0263e9d5
GA
11102023-02-18 Martin Uecker <uecker@tugraz.at>
1111
1112 PR c/105660
1113 * c-attribs.cc (append_access_attr): Use order of arguments when
1114 construction string.
1115 (append_access_attr_idxs): Rename and make static.
1116 * c-warn.cc (warn_parm_array_mismatch): Add assertion.
1117
88cc4495
GA
11182023-02-16 Patrick Palka <ppalka@redhat.com>
1119
1120 * c-common.h: Mechanically drop static from static inline
1121 functions via s/^static inline/inline/g.
1122
0a251e74
GA
11232023-02-01 Jason Merrill <jason@redhat.com>
1124
1125 * c.opt: Add -Wno-changes-meaning.
1126
317525b0
GA
11272023-01-31 Marek Polacek <polacek@redhat.com>
1128
1129 PR c++/107593
1130 PR c++/108597
1131 * c-common.h (instantiation_dependent_expression_p): Declare.
1132 * c-warn.cc (warn_duplicated_cond_add_or_warn): If the condition
1133 is dependent, invalidate the chain.
1134
2371d100
GA
11352023-01-26 Marek Polacek <polacek@redhat.com>
1136
1137 PR c++/105300
1138 * c-pragma.cc (handle_pragma_message): Warn for CPP_STRING_USERDEF.
1139
9f98cfa5
GA
11402023-01-18 Marek Polacek <polacek@redhat.com>
1141
1142 PR c/108424
1143 * c-common.cc (check_case_value): Check INTEGRAL_TYPE_P.
1144
5013c3bb
GA
11452023-01-14 Jakub Jelinek <jakub@redhat.com>
1146
1147 PR c++/108365
1148 * c-common.h (may_shorten_divmod): New static inline function.
1149
11502023-01-13 Eric Botcazou <ebotcazou@adacore.com>
1151
1152 * c-ada-spec.cc (is_float32): New function.
1153 (is_float64): Likewise.
1154 (is_float128): Tweak.
1155 (dump_ada_node) <REAL_TYPE>: Call them to recognize more types.
1156
81ed98bc
GA
11572023-01-12 Lewis Hyatt <lhyatt@gmail.com>
1158
1159 PR preprocessor/108244
1160 * c-pragma.cc (c_register_pragma_1): Don't attempt to register any
1161 deferred pragmas if -fdirectives-only.
1162 (init_pragma): Likewise.
1163
84723aca
GA
11642023-01-09 Martin Liska <mliska@suse.cz>
1165
1166 PR c/107993
1167 * c-attribs.cc (handle_target_clones_attribute): Check for
1168 string constant for all target_clone attribute values.
1169
0f8fbb57
GA
11702023-01-03 Florian Weimer <fweimer@redhat.com>
1171
1172 * c-cppbuiltin.cc (c_cpp_builtins): Define
1173 __LIBGCC_DWARF_CIE_DATA_ALIGNMENT__.
1174
11752023-01-03 Florian Weimer <fweimer@redhat.com>
1176
1177 Revert:
1178 2023-01-03 Florian Weimer <fweimer@redhat.com>
1179
1180 * c-cppbuiltin.cc (__LIBGCC_DWARF_REG_SIZES_CONSTANT__):
1181 Define if constant is known.
1182
11832023-01-03 Florian Weimer <fweimer@redhat.com>
1184
1185 Revert:
1186 2023-01-02 Florian Weimer <fweimer@redhat.com>
1187
1188 * c-cppbuiltin.cc (c_cpp_builtins): Define
1189 __LIBGCC_DWARF_CIE_DATA_ALIGNMENT__.
1190
fee53a31
GA
11912023-01-02 Florian Weimer <fweimer@redhat.com>
1192
1193 * c-cppbuiltin.cc (c_cpp_builtins): Define
1194 __LIBGCC_DWARF_CIE_DATA_ALIGNMENT__.
1195
11962023-01-02 Florian Weimer <fweimer@redhat.com>
1197
1198 * c-cppbuiltin.cc (__LIBGCC_DWARF_REG_SIZES_CONSTANT__):
1199 Define if constant is known.
1200
d2ef2327
GA
12012022-12-19 Marek Polacek <polacek@redhat.com>
1202
1203 PR c/98487
1204 * c-format.cc (check_function_format): Use get_attribute_name.
1205
5fb1e674
GA
12062022-12-16 Qing Zhao <qing.zhao@oracle.com>
1207
1208 * c.opt (Wstrict-flex-arrays): New option.
1209
596dbfff
GA
12102022-12-02 Andrew MacLeod <amacleod@redhat.com>
1211
1212 * c-attribs.cc (handle_deprecated_attribute): Use type when
1213 using TYPE_NAME.
1214
b35680ec
GA
12152022-12-02 Jakub Jelinek <jakub@redhat.com>
1216
1217 PR c++/84469
1218 * c-omp.cc (c_omp_is_loop_iterator): For range for with structured
1219 binding return TREE_VEC_LENGTH (d->declv) even if decl is equal
1220 to any of the structured binding decls.
1221
6eea85a9
GA
12222022-11-30 Iskander Shakirzyanov <iskander@ispras.ru>
1223 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
1224
1225 PR driver/107787
1226 * c-common.cc (fold_offsetof,
1227 convert_vector_to_array_for_subscript): Use OPT_Warray_bounds_
1228 instead of OPT_Warray_bounds.
1229
9a1b4f1d
GA
12302022-11-24 Jakub Jelinek <jakub@redhat.com>
1231
1232 * c.opt (fcontract-role=, fcontract-semantic=): Terminate descriptions
1233 with a dot.
1234
8761284f
GA
12352022-11-23 Andrew Pinski <apinski@marvell.com>
1236 Jakub Jelinek <jakub@redhat.com>
1237
1238 PR c/107127
1239 * c-gimplify.cc (c_genericize): Use walk_tree_without_duplicates
1240 instead of walk_tree for c_genericize_control_r.
1241
12422022-11-23 Jakub Jelinek <jakub@redhat.com>
1243
1244 * c.opt (fcontract-assumption-mode=, fcontract-continuation-mode=,
1245 fcontract-role=, fcontract-semantic=): Add RejectNegative.
1246 (fcontract-build-level=): Terminate description with dot.
1247
fb98ede8
GA
12482022-11-19 Jakub Jelinek <jakub@redhat.com>
1249
1250 * c-cppbuiltin.cc (c_cpp_builtins): Bump __cpp_constexpr
1251 value from 202207L to 202211L.
1252
12532022-11-19 Jeff Chapman II <jchapman@lock3software.com>
1254 Andrew Sutton <asutton@lock3software.com>
1255 Andrew Marmaduke <amarmaduke@lock3software.com>
1256 Michael Lopez <mlopez@lock3software.com>
1257 Jason Merrill <jason@redhat.com>
1258
1259 * c.opt: Add contracts flags.
1260 * c-cppbuiltin.cc (c_cpp_builtins): Add contracts feature-test
1261 macros.
1262
80909529
GA
12632022-11-16 Marek Polacek <polacek@redhat.com>
1264
1265 PR c++/106649
1266 * c-cppbuiltin.cc (c_cpp_builtins): Update value of __cpp_constexpr for
1267 C++23.
1268 * c-opts.cc (c_common_post_options): Set warn_invalid_constexpr
1269 depending on cxx_dialect.
1270 * c.opt (Winvalid-constexpr): New option.
1271
12722022-11-16 Jakub Jelinek <jakub@redhat.com>
1273
1274 * c-common.def (CONCEPT_DECL): New tree, moved here from
1275 cp-tree.def.
1276 * c-common.cc (c_common_init_ts): Handle CONCEPT_DECL.
1277 * c-attribs.cc (handle_deprecated_attribute): Allow deprecated
1278 attribute on CONCEPT_DECL.
1279
cdc34229
GA
12802022-11-15 Lewis Hyatt <lhyatt@gmail.com>
1281
1282 * c-opts.cc (c_finish_options): Use special_fname_builtin () rather
1283 than a hard-coded string.
1284
83d400bd
GA
12852022-11-15 Jakub Jelinek <jakub@redhat.com>
1286
1287 * c-cppbuiltin.cc (c_cpp_builtins): Bump C++23
1288 __cpp_multidimensional_subscript macro value to 202211L.
1289
12902022-11-15 Patrick Palka <ppalka@redhat.com>
1291
1292 PR c++/107638
1293 * c-lex.cc (c_common_has_attribute): Return 1 for init_priority
1294 iff SUPPORTS_INIT_PRIORITY.
1295
12962022-11-14 Martin Liska <mliska@suse.cz>
1297
1298 Revert:
1299 2022-11-09 Martin Liska <mliska@suse.cz>
1300
1301 * c-target.def: Port to RST.
1302
30d77d49
GA
13032022-11-12 Joseph Myers <joseph@codesourcery.com>
1304
1305 * c-common.cc (c_common_reswords): Use D_C2X instead of D_CXXONLY.
1306
5b6ce16a
GA
13072022-11-11 Jonathan Wakely <jwakely@redhat.com>
1308
1309 PR c/85487
1310 * c-pragma.cc (handle_pragma_ignore): New function.
1311 (init_pragma): Register region and endregion pragmas.
1312
1cdfd0e5
GA
13132022-11-09 Martin Liska <mliska@suse.cz>
1314
1315 * c-target.def: Port to RST.
1316
05788e9b
GA
13172022-11-05 Lewis Hyatt <lhyatt@gmail.com>
1318
1319 PR preprocessor/55971
1320 * c-ppoutput.cc (adjust_for_newlines): Update comment.
1321
d29260ce
GA
13222022-11-03 Jason Merrill <jason@redhat.com>
1323
1324 * c-opts.cc (c_common_post_options): -fconcepts no longer implies
1325 -fconcepts-ts before C++20.
1326
3055829a
GA
13272022-10-28 Joseph Myers <joseph@codesourcery.com>
1328
1329 * c-common.cc (def_fn_type): Call build_function_type for
1330 zero-argument variable-argument function.
1331 (c_common_nodes_and_builtins): Build default_function_type with
1332 build_function_type.
1333 * c.opt (fallow-parameterless-variadic-functions): Mark as ignored
1334 option.
1335
13362022-10-28 Joseph Myers <joseph@codesourcery.com>
1337
1338 PR c/61469
1339 * c-common.h (ENUM_UNDERLYING_TYPE, ENUM_FIXED_UNDERLYING_TYPE_P):
1340 New. Moved from cp/cp-tree.h.
1341 * c-warn.cc (warnings_for_convert_and_check): Do not consider
1342 conversions to enum with underlying type bool to overflow.
1343
486a5037
GA
13442022-10-26 Marek Polacek <polacek@redhat.com>
1345
1346 PR c++/106393
1347 * c.opt (Wdangling-reference): New.
1348
87f9c4a4
GA
13492022-10-19 Joseph Myers <joseph@codesourcery.com>
1350
1351 * c-format.h (enum format_lengths): Add FMT_LEN_w8, FMT_LEN_w16,
1352 FMT_LEN_w32, FMT_LEN_w64, FMT_LEN_wf8, FMT_LEN_wf16, FMT_LEN_wf32
1353 and FMT_LEN_wf64.
1354 (NOARGUMENTS, NOLENGTHS): Update definitions.
1355 (T_I8, T2X_I8, T_I16, T2X_I16, T_I32, T2X_I32, T_I64, T2X_I64)
1356 (T_U8, T2X_U8, T_U16, T2X_U16, T_U32, T2X_U32, T_U64, T2X_U64)
1357 (T_IF8, T2X_IF8, T_IF16, T2X_IF16, T_IF32, T2X_IF32, T_IF64)
1358 (T2X_IF64, T_UF8, T2X_UF8, T_UF16, T2X_UF16, T_UF32, T2X_UF32)
1359 (T_UF64, T2X_UF64): New macros.
1360 * c-format.cc (printf_length_specs, scanf_length_specs): Add wN
1361 and wfN length modifiers.
1362 (print_char_table, scan_char_table): Add entries using wN and wfN
1363 length modifiers.
1364
21de009f
GA
13652022-10-18 Joseph Myers <joseph@codesourcery.com>
1366
1367 PR c/36113
1368 * c-common.cc (c_common_type_for_size): Add fallback to
1369 widest_unsigned_literal_type_node or
1370 widest_integer_literal_type_node for precision that may not
1371 exactly match the precision of those types.
1372
baeec7cc
GA
13732022-10-14 Jakub Jelinek <jakub@redhat.com>
1374
1375 * c-cppbuiltin.cc (c_cpp_builtins): If bfloat16_type_node,
1376 predefine __BFLT16_*__ macros and for C++23 also
1377 __STDCPP_BFLOAT16_T__. Predefine bfloat16_type_node related
1378 macros for -fbuilding-libgcc.
1379 * c-lex.cc (interpret_float): Handle CPP_N_BFLOAT16.
1380
13812022-10-14 Jakub Jelinek <jakub@redhat.com>
1382
1383 PR middle-end/323
1384 PR c++/107097
1385 * c-common.def (EXCESS_PRECISION_EXPR): Remove comment part about
1386 the tree being specific to C/ObjC.
1387 * c-opts.cc (c_common_post_options): Handle flag_excess_precision
1388 in C++ the same as in C.
1389 * c-lex.cc (interpret_float): Set const_type to excess_precision ()
1390 even for C++.
1391
621a911d
GA
13922022-10-13 Joseph Myers <joseph@codesourcery.com>
1393
1394 * c-cppbuiltin.cc (builtin_define_float_constants): Do not use
1395 value 2 for *_IS_IEC_60559.
1396
781f477a
GA
13972022-10-12 Lewis Hyatt <lhyatt@gmail.com>
1398
1399 PR preprocessor/60014
1400 PR preprocessor/60723
1401 * c-ppoutput.cc (class token_streamer): Remove member
1402 line_marker_emitted to...
1403 (token_streamer::stream): ...a local variable here. Set
1404 print.prev_was_system_token on all code paths.
1405
27bfe54e
GA
14062022-10-10 Nathan Sidwell <nathan@acm.org>
1407
1408 * c-opts.cc (c_common_post_options): Bump abi to 18.
1409
14102022-10-10 Marek Polacek <polacek@redhat.com>
1411
1412 PR c++/106937
1413 * c-pretty-print.cc (pp_c_specifier_qualifier_list): Print only GNU
1414 attributes here.
1415 (c_pretty_printer::direct_abstract_declarator): Print the standard [[]]
1416 attributes here.
1417 (pp_c_attributes): Remove.
1418 (pp_c_attributes_display): Print the [[]] form if appropriate. Use
1419 get_attribute_name. Don't print a trailing space when printing the
1420 [[]] form.
1421 * c-pretty-print.h (pp_c_attributes): Remove.
1422
9ff6c33e
GA
14232022-10-07 Qing Zhao <qing.zhao@oracle.com>
1424
1425 * c-attribs.cc (handle_strict_flex_array_attribute): New function.
1426 (c_common_attribute_table): New item for strict_flex_array.
1427 * c.opt: (fstrict-flex-arrays): New option.
1428 (fstrict-flex-arrays=): New option.
1429
14302022-10-07 Martin Liska <mliska@suse.cz>
1431
1432 * name-hint.h: Use std::move.
1433
14342022-10-07 Jakub Jelinek <jakub@redhat.com>
1435
1436 * c-common.cc (attribute_fallthrough_p): Lookup fallthrough attribute
1437 only in gnu namespace or as standard attribute, treat fallthrough
1438 attributes in other namespaces like any other unknown attribute.
1439
629d04d3
GA
14402022-10-06 Joseph Myers <joseph@codesourcery.com>
1441
1442 * c-common.cc (c_common_reswords): Mark typeof as D_EXT11. Add
1443 typeof_unqual.
1444 * c-common.h (enum rid): Add RID_TYPEOF_UNQUAL.
1445 (D_EXT11): New macro. Values of subsequent macros updated.
1446
14472022-10-06 Jakub Jelinek <jakub@redhat.com>
1448
1449 PR c++/106654
1450 * c-attribs.cc (handle_assume_attribute): New function.
1451 (c_common_attribute_table): Add entry for assume attribute.
1452 * c-lex.cc (c_common_has_attribute): Handle
1453 __have_cpp_attribute (assume).
1454
85872a69
GA
14552022-10-04 Jakub Jelinek <jakub@redhat.com>
1456
1457 * c-omp.cc (c_omp_directives): Uncomment begin declare target
1458 entry.
1459
69fd6dcc
GA
14602022-10-03 Patrick Palka <ppalka@redhat.com>
1461
1462 * c-common.cc (c_common_reswords): Use RID_IS_SAME instead of
1463 RID_IS_SAME_AS.
1464
14652022-10-03 Joseph Myers <joseph@codesourcery.com>
1466
1467 * c-cppbuiltin.cc (builtin_define_float_constants): Do not
1468 special-case __*_EPSILON__ setting for IBM long double for C2x.
1469
3a221b73
GA
14702022-09-30 Patrick Palka <ppalka@redhat.com>
1471
1472 * c-common.cc (c_common_reswords): Use cp/cp-trait.def to handle
1473 C++ traits.
1474 * c-common.h (enum rid): Likewise.
1475
bbdcdf5c
GA
14762022-09-29 Joseph Myers <joseph@codesourcery.com>
1477
1478 * c-lex.cc (c_common_has_attribute): Handle noreturn attribute for
1479 C.
1480
14812022-09-29 Patrick Palka <ppalka@redhat.com>
1482
1483 * c-common.cc (c_common_reswords): Add __remove_cv,
1484 __remove_reference and __remove_cvref.
1485 * c-common.h (enum rid): Add RID_REMOVE_CV, RID_REMOVE_REFERENCE
1486 and RID_REMOVE_CVREF.
1487
1f16a020
GA
14882022-09-27 Marek Polacek <polacek@redhat.com>
1489
1490 PR c++/101165
1491 PR c++/106882
1492 * c-cppbuiltin.cc (c_cpp_builtins): Define __cpp_implicit_move.
1493
14942022-09-27 Marek Polacek <polacek@redhat.com>
1495
1496 * c-format.cc (c_keywords): Drop nothrow.
1497
14982022-09-27 Jakub Jelinek <jakub@redhat.com>
1499
1500 PR c++/106651
1501 * c-cppbuiltin.cc (c_cpp_builtins): Predefine
1502 __cpp_static_call_operator=202207L for C++23.
1503
15042022-09-27 Jakub Jelinek <jakub@redhat.com>
1505
1506 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_ASSUME,
1507 PRAGMA_OMP_ASSUMES and PRAGMA_OMP_BEGIN. Rename
1508 PRAGMA_OMP_END_DECLARE_TARGET to PRAGMA_OMP_END.
1509 * c-pragma.cc (omp_pragmas): Add assumes and begin.
1510 For end rename PRAGMA_OMP_END_DECLARE_TARGET to PRAGMA_OMP_END.
1511 (omp_pragmas_simd): Add assume.
1512 * c-common.h (c_omp_directives): Declare.
1513 * c-omp.cc (omp_directives): Rename to ...
1514 (c_omp_directives): ... this. No longer static. Uncomment
1515 assume, assumes, begin assumes and end assumes entries.
1516 In end declare target entry rename PRAGMA_OMP_END_DECLARE_TARGET
1517 to PRAGMA_OMP_END.
1518 (c_omp_categorize_directive): Adjust for omp_directives to
1519 c_omp_directives renaming.
1520
15212022-09-27 Jakub Jelinek <jakub@redhat.com>
1522
1523 PR c++/106652
1524 PR c++/85518
1525 * c-common.cc (c_common_reswords): Change _Float{16,32,64,128} and
1526 _Float{32,64,128}x flags from D_CONLY to 0.
1527 (shorten_binary_op): Punt if common_type returns error_mark_node.
1528 (shorten_compare): Likewise.
1529 (c_common_nodes_and_builtins): For C++ record _Float{16,32,64,128}
1530 and _Float{32,64,128}x builtin types if available. For C++
1531 clear float128t_type_node.
1532 * c-cppbuiltin.cc (c_cpp_builtins): Predefine
1533 __STDCPP_FLOAT{16,32,64,128}_T__ for C++23 if supported.
1534 * c-lex.cc (interpret_float): For q/Q suffixes prefer
1535 float128t_type_node over float128_type_node. Allow
1536 {f,F}{16,32,64,128} suffixes for C++ if supported with pedwarn
1537 for C++20 and older. Allow {f,F}{32,64,128}x suffixes for C++
1538 with pedwarn. Don't call excess_precision_type for C++.
1539
220c4d8e
GA
15402022-09-26 Marek Polacek <polacek@redhat.com>
1541
1542 PR c++/106656
1543 * c-cppbuiltin.cc (c_cpp_builtins): Update value of __cpp_char8_t
1544 for C++20.
1545
4afaeaab
GA
15462022-09-23 Marek Polacek <polacek@redhat.com>
1547
1548 PR c++/106784
1549 * c-common.cc (c_common_reswords): Add __is_convertible and
1550 __is_nothrow_convertible.
1551 * c-common.h (enum rid): Add RID_IS_CONVERTIBLE and
1552 RID_IS_NOTHROW_CONVERTIBLE.
1553
279c6715
GA
15542022-09-22 David Malcolm <dmalcolm@redhat.com>
1555
1556 PR c/106830
1557 * c-warn.cc (check_for_xor_used_as_pow): Don't try checking
1558 values that don't fit in uhwi.
1559
d0fc05e8
GA
15602022-09-15 Richard Biener <rguenther@suse.de>
1561
1562 * c-common.h (build_void_list_node): Remove.
1563 * c-common.cc (c_common_nodes_and_builtins): Do not initialize
1564 void_list_node.
1565
861d1a11
GA
15662022-09-09 Jan-Benedict Glaw <jbglaw@lug-owl.de>
1567
1568 * c-format.cc (convert_format_name_to_system_name): Fix warning.
1569
fe2a8ce9
GA
15702022-09-07 Joseph Myers <joseph@codesourcery.com>
1571
1572 * c-common.cc (c_common_reswords): Use D_C2X instead of D_CXXONLY
1573 for alignas, alignof, bool, false, static_assert, thread_local and
1574 true.
1575
15762022-09-07 Jakub Jelinek <jakub@redhat.com>
1577
1578 * c.opt (Winvalid-utf8): Use ObjC instead of objC. Remove
1579 " in comments" from description.
1580 (Wunicode): New option.
1581
25aeb922
GA
15822022-09-06 Jakub Jelinek <jakub@redhat.com>
1583
1584 PR c/106836
1585 * c-omp.cc (c_omp_split_clauses): Handle OMP_CLAUSE_DOACROSS.
1586
83f2f228
GA
15872022-09-03 Jakub Jelinek <jakub@redhat.com>
1588
1589 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_DOACROSS.
1590 * c-omp.cc (c_finish_omp_depobj): Check also for OMP_CLAUSE_DOACROSS
1591 clause and diagnose it. Don't handle OMP_CLAUSE_DEPEND_SOURCE and
1592 OMP_CLAUSE_DEPEND_SINK. Assert kind is not OMP_CLAUSE_DEPEND_INVALID.
1593
c64b0947
GA
15942022-09-02 David Malcolm <dmalcolm@redhat.com>
1595
1596 PR c/90885
1597 * c-common.h (check_for_xor_used_as_pow): New decl.
1598 * c-lex.cc (c_lex_with_flags): Add DECIMAL_INT to flags as appropriate.
1599 * c-warn.cc (check_for_xor_used_as_pow): New.
1600 * c.opt (Wxor-used-as-pow): New.
1601
bb0a1556
GA
16022022-09-01 Jason Merrill <jason@redhat.com>
1603
1604 * c-common.cc (c_common_nodes_and_builtins): Set TREE_STRING_FLAG on
1605 char8_t.
1606 (braced_list_to_string): Check for char-sized elements.
1607
16082022-09-01 Jakub Jelinek <jakub@redhat.com>
1609
1610 PR c++/106655
1611 * c.opt (-Winvalid-utf8): New warning.
1612 * c-opts.cc (c_common_handle_option) <case OPT_finput_charset_>:
1613 Set cpp_opts->cpp_input_charset_explicit.
1614 (c_common_post_options): If -finput-charset=UTF-8 is explicit
1615 in C++23, enable -Winvalid-utf8 by default and if -pedantic
1616 or -pedantic-errors, make it a pedwarn.
1617
542c60c4
GA
16182022-08-31 Joseph Myers <joseph@codesourcery.com>
1619
1620 * c-attribs.cc (handle_deprecated_attribute): Check and pedwarn
1621 for LABEL_DECL.
1622 * c-common.cc (c_add_case_label): Add argument ATTRS. Call
1623 decl_attributes.
1624 * c-common.h (do_case, c_add_case_label): Update declarations.
1625 * c-lex.cc (c_common_has_attribute): For C, produce a result of
1626 201910 for fallthrough and 202106 for maybe_unused.
1627
16f542d6
GA
16282022-08-26 Marek Polacek <polacek@redhat.com>
1629
1630 PR c++/81159
1631 * c.opt (Wself-move): New option.
1632
16332022-08-26 Jakub Jelinek <jakub@redhat.com>
1634
1635 * c-common.cc (check_builtin_function_arguments): Handle
1636 BUILT_IN_ISSIGNALING.
1637
16382022-08-26 Jakub Jelinek <jakub@redhat.com>
1639
1640 PR c++/106648
1641 * c-cppbuiltin.cc (c_cpp_builtins): Predefine
1642 __cpp_named_character_escapes to 202207L.
1643
5d4389dc
GA
16442022-08-25 Marek Polacek <polacek@redhat.com>
1645
1646 * c-common.cc (c_common_reswords): Enable nullptr in C2X.
1647 (c_common_nodes_and_builtins): Create the built-in node for nullptr.
1648 * c-common.h (enum c_tree_index): Add CTI_NULLPTR, CTI_NULLPTR_TYPE.
1649 (struct c_common_resword): Resize the disable member.
1650 (D_C2X): Add.
1651 (nullptr_node): Define.
1652 (nullptr_type_node): Define.
1653 (NULLPTR_TYPE_P): Define.
1654 * c-pretty-print.cc (c_pretty_printer::simple_type_specifier): Handle
1655 NULLPTR_TYPE.
1656 (c_pretty_printer::direct_abstract_declarator): Likewise.
1657 (c_pretty_printer::constant): Likewise.
1658
47a61e65
GA
16592022-08-16 Tom Honermann <tom@honermann.net>
1660
1661 PR c++/106423
1662 * c-opts.cc (c_common_post_options): Disable -Wc++20-compat
1663 diagnostics in C++20 and later.
1664 * c.opt (Wc++20-compat): Enable hooks for the preprocessor.
1665
5cd525f0
GA
16662022-08-11 Marek Polacek <polacek@redhat.com>
1667
1668 PR middle-end/102633
1669 * c-gimplify.cc (c_gimplify_expr) <case DECL_EXPR>: Don't call
1670 suppress_warning here.
1671
5f17badb
GA
16722022-08-08 Tom Honermann <tom@honermann.net>
1673
1674 PR preprocessor/106426
1675 * c-opts.cc (c_common_post_options): Assign cpp_opts->unsigned_utf8char
1676 subject to -fchar8_t, -fsigned-char, and/or -funsigned-char.
1677
16782022-08-08 Tom Honermann <tom@honermann.net>
1679
1680 * c-lex.cc (lex_string, lex_charconst): Use char8_t as the type
1681 of CPP_UTF8CHAR and CPP_UTF8STRING when char8_t support is
1682 enabled.
1683 * c-opts.cc (c_common_post_options): Set flag_char8_t if
1684 targeting C2x.
1685
4a7274dd
GA
16862022-07-31 Lewis Hyatt <lhyatt@gmail.com>
1687
1688 PR c++/66290
1689 * c-common.h: Rename global done_lexing to
1690 override_libcpp_locations.
1691 * c-common.cc (c_cpp_diagnostic): Likewise.
1692 * c-opts.cc (c_common_finish): Set override_libcpp_locations
1693 (formerly done_lexing) immediately prior to calling cpp_finish ().
1694
1e2c5f4c
GA
16952022-07-27 Lewis Hyatt <lhyatt@gmail.com>
1696
1697 * c-ppoutput.cc (token_streamer::stream): Update input_location
1698 prior to streaming each token.
1699
0e6fa997
GA
17002022-07-23 Immad Mir <mirimmad@outlook.com>
1701
1702 * c-attribs.cc: (c_common_attribute_table): add three new attributes
1703 namely: fd_arg, fd_arg_read and fd_arg_write.
1704 (handle_fd_arg_attribute): New.
1705
bdc7b765
GA
17062022-07-15 Marek Polacek <polacek@redhat.com>
1707
1708 PR c++/104477
1709 * c-common.cc (c_common_reswords): Add
1710 __reference_constructs_from_temporary and
1711 __reference_converts_from_temporary.
1712 * c-common.h (enum rid): Add RID_REF_CONSTRUCTS_FROM_TEMPORARY and
1713 RID_REF_CONVERTS_FROM_TEMPORARY.
1714
17152022-07-15 Jonathan Wakely <jwakely@redhat.com>
1716
1717 * c-format.cc (class range_label_for_format_type_mismatch):
1718 Adjust to new label_text API.
1719
c72d4714
GA
17202022-07-11 Lewis Hyatt <lhyatt@gmail.com>
1721
1722 PR preprocessor/106252
1723 * c-pragma.cc (handle_pragma_diagnostic_impl): Don't look up the
1724 option argument prior to verifying the option was found.
1725
6345c414
GA
17262022-07-07 David Malcolm <dmalcolm@redhat.com>
1727
1728 * c-format.cc (range_label_for_format_type_mismatch::get_text):
1729 Update for removal of label_text::maybe_free in favor of automatic
1730 memory management.
1731
4bc92c3b
GA
17322022-07-06 Lewis Hyatt <lhyatt@gmail.com>
1733
1734 PR preprocessor/53920
1735 PR c++/53431
1736 * c-common.cc (c_option_is_from_cpp_diagnostics): New function.
1737 * c-common.h (c_option_is_from_cpp_diagnostics): Declare.
1738 (c_pp_stream_token): Declare.
1739 * c-ppoutput.cc (init_pp_output): Refactor logic about skipping
1740 pragmas to...
1741 (should_output_pragmas): ...here. New function.
1742 (token_streamer::stream): Support handling early pragmas.
1743 (do_line_change): Likewise.
1744 (c_pp_stream_token): New function.
1745 * c-pragma.cc (struct pragma_diagnostic_data): New helper class.
1746 (pragma_diagnostic_lex_normal): New function. Moved logic for
1747 interpreting GCC diagnostic pragmas here.
1748 (pragma_diagnostic_lex_pp): New function for parsing diagnostic pragmas
1749 directly from libcpp.
1750 (handle_pragma_diagnostic): Refactor into helper function...
1751 (handle_pragma_diagnostic_impl): ...here. New function.
1752 (handle_pragma_diagnostic_early): New function.
1753 (handle_pragma_diagnostic_early_pp): New function.
1754 (struct pragma_ns_name): Renamed to...
1755 (struct pragma_pp_data): ...this. Add new "early_handler" member.
1756 (c_register_pragma_1): Support early pragmas in the preprocessor.
1757 (c_register_pragma_with_early_handler): New function.
1758 (c_register_pragma): Support the new early handlers in struct
1759 internal_pragma_handler.
1760 (c_register_pragma_with_data): Likewise.
1761 (c_register_pragma_with_expansion): Likewise.
1762 (c_register_pragma_with_expansion_and_data): Likewise.
1763 (c_invoke_early_pragma_handler): New function.
1764 (c_pp_invoke_early_pragma_handler): New function.
1765 (init_pragma): Add early pragma support for diagnostic pragmas.
1766 * c-pragma.h (struct internal_pragma_handler): Add new early handler
1767 members.
1768 (c_register_pragma_with_early_handler): Declare.
1769 (c_invoke_early_pragma_handler): Declare.
1770 (c_pp_invoke_early_pragma_handler): Declare.
1771
d1f3a3ff
GA
17722022-07-05 Marek Polacek <polacek@redhat.com>
1773
1774 PR c++/105626
1775 * c-format.cc (check_format_arg): Don't emit -Wformat warnings with
1776 u8 strings.
1777
ed974488
GA
17782022-07-01 Marek Polacek <polacek@redhat.com>
1779
1780 PR c++/106111
1781 * c-common.h (enum rid): Update RID_LAST_CXX20.
1782
976196b3
GA
17832022-06-30 Jonathan Wakely <jwakely@redhat.com>
1784
1785 * known-headers.cc (get_stdlib_header_for_name): Add <time.h>
1786 names.
1787
84c2131d
GA
17882022-06-24 Jason Merrill <jason@redhat.com>
1789
1790 PR c++/87729
1791 PR c++/20423
1792 * c.opt (Woverloaded-virtual): Add levels, include in -Wall.
1793
4390e7bf
GA
17942022-06-18 Jakub Jelinek <jakub@redhat.com>
1795
1796 * c-ubsan.cc (ubsan_instrument_division, ubsan_instrument_shift):
1797 Use flag_sanitize_trap & SANITIZE_??? instead of
1798 flag_sanitize_undefined_trap_on_error. If 2 sanitizers are involved
1799 and flag_sanitize_trap differs for them, emit __builtin_trap only
1800 for the comparison where trap is requested.
1801 (ubsan_instrument_vla, ubsan_instrument_return): Use
1802 lag_sanitize_trap & SANITIZE_??? instead of
1803 flag_sanitize_undefined_trap_on_error.
1804
c3642271
GA
18052022-06-13 Jason Merrill <jason@redhat.com>
1806
1807 * c-ubsan.cc (ubsan_instrument_return): Use BUILTINS_LOCATION.
1808
d9176e64
GA
18092022-05-27 Marek Polacek <polacek@redhat.com>
1810
1811 PR c/90658
1812 * c-attribs.cc (get_priority): Check FUNCTION_DECL.
1813
18142022-05-27 Jakub Jelinek <jakub@redhat.com>
1815
1816 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ENTER.
1817
57f2ce6a
GA
18182022-05-20 David Malcolm <dmalcolm@redhat.com>
1819
1820 * c-format.cc: Replace uses of "FINAL" and "OVERRIDE" with "final"
1821 and "override".
1822 * c-pretty-print.h: Likewise.
1823
1cda629f
GA
18242022-05-18 Marek Polacek <polacek@redhat.com>
1825
1826 PR c/105131
1827 * c.opt (Wenum-int-mismatch): New.
1828
18292022-05-18 Marek Polacek <polacek@redhat.com>
1830
1831 PR c++/105497
1832 * c-warn.cc (c_do_switch_warnings): Don't warn about unhandled
1833 enumerator when it was marked with attribute unused.
1834
18352022-05-18 Eric Botcazou <ebotcazou@adacore.com>
1836
1837 * c-ada-spec.cc (dump_ada_node) <COMPLEX_TYPE>: Deal with usual
1838 floating-point complex types.
1839 <POINTER_TYPE>: Do not use limited_with clause if the designated
1840 type is a scalar type.
1841
3d9439b1
GA
18422022-05-17 Jakub Jelinek <jakub@redhat.com>
1843
1844 * c-omp.cc (c_finish_omp_depobj): Handle
1845 OMP_CLAUSE_DEPEND_INOUTSET.
1846
702bd11f
GA
18472022-05-16 Jason Merrill <jason@redhat.com>
1848
1849 PR c/105492
1850 * c-attribs.cc (handle_mode_attribute): Don't fix broken typedefs
1851 here.
1852
18532022-05-16 Martin Liska <mliska@suse.cz>
1854
1855 * c-common.cc (ARRAY_SIZE): Use ARRAY_SIZE.
1856 (c_common_nodes_and_builtins): Likewise.
1857 * c-format.cc (check_tokens): Likewise.
1858 (check_plain): Likewise.
1859 * c-pragma.cc (c_pp_lookup_pragma): Likewise.
1860 (init_pragma): Likewise.
1861 * known-headers.cc (get_string_macro_hint): Likewise.
1862 (get_stdlib_header_for_name): Likewise.
1863 * c-attribs.cc: Likewise.
1864
9df4ffe4
GA
18652022-05-13 Richard Biener <rguenther@suse.de>
1866
1867 * c-omp.cc: Remove gimple-fold.h include.
1868
49ace834
GA
18692022-05-12 Jakub Jelinek <jakub@redhat.com>
1870
1871 * c-common.h (enum rid): Add RID_OMP_ALL_MEMORY.
1872 * c-omp.cc (c_finish_omp_depobj): Don't build_fold_addr_expr
1873 if null_pointer_node.
1874
d0d513b5
GA
18752022-05-11 Martin Liska <mliska@suse.cz>
1876
1877 PR target/105355
1878 * c-opts.cc (c_common_handle_option): Change option name.
1879 * c.opt: Remove Joined and use Separate option.
1880
bd022ff9
GA
18812022-05-09 Alex Coplan <alex.coplan@arm.com>
1882
1883 * c-common.h (get_dump_info): Delete.
1884 * c-gimplify.cc (c_genericize): Get TDI_original dump file info
1885 from the global dump_manager instead of the (now obsolete)
1886 get_dump_info.
1887 * c-opts.cc (original_dump_file): Delete.
1888 (original_dump_flags): Delete.
1889 (c_common_parse_file): Switch to using global dump_manager to
1890 manage the original dump file; fix leak of dump file.
1891 (get_dump_info): Delete.
1892
a1947c92
GA
18932022-05-07 Marek Polacek <polacek@redhat.com>
1894
1895 PR c++/101833
1896 PR c++/47634
1897 * c-attribs.cc (positional_argument): Pass POS by reference. Deal
1898 with FN being either a function declaration or function type. Use
1899 maybe_adjust_arg_pos_for_attribute.
1900 * c-common.cc (check_function_arguments): Maybe pass FNDECL down to
1901 check_function_format.
1902 * c-common.h (maybe_adjust_arg_pos_for_attribute): Declare.
1903 (positional_argument): Adjust.
1904 * c-format.cc (get_constant): Rename to ...
1905 (validate_constant): ... this. Take EXPR by reference. Return bool
1906 instead of tree.
1907 (handle_format_arg_attribute): Don't overwrite FORMAT_NUM_EXPR by the
1908 return value of validate_constant.
1909 (decode_format_attr): Don't overwrite FORMAT_NUM_EXPR and
1910 FIRST_ARG_NUM_EXPR by the return value of validate_constant.
1911 (check_function_format): Adjust a parameter name.
1912 (handle_format_attribute): Maybe pass FNDECL down to decode_format_attr.
1913
3e7db517
GA
19142022-05-04 Marek Polacek <polacek@redhat.com>
1915
1916 * c-warn.cc (warnings_for_convert_and_check): Convert constants of type
1917 char to int.
1918
95874f95
GA
19192022-04-30 Jason Merrill <jason@redhat.com>
1920
1921 PR c/100545
1922 * c-attribs.cc (handle_mode_attribute): Copy attributes, aligned,
1923 and typedef.
1924 * c-common.cc (set_underlying_type): Add assert.
1925
01ad093b
GA
19262022-04-26 Patrick Palka <ppalka@redhat.com>
1927
1928 PR c++/105304
1929 * c-common.cc (verify_tree) [restart]: Move up to before the
1930 NULL test.
1931
da066c42
GA
19322022-04-11 Jakub Jelinek <jakub@redhat.com>
1933
1934 PR c++/105186
1935 * c-common.cc (c_common_nodes_and_builtins): After registering __int%d
1936 and __int%d__ builtin types, initialize corresponding ridpointers
1937 entry.
1938
150ab50f
GA
19392022-03-30 Marek Polacek <polacek@redhat.com>
1940
1941 PR c++/101030
1942 * c-warn.cc (conversion_warning) <case COND_EXPR>: Don't call
1943 conversion_warning when OP1 is null.
1944
19452022-03-30 Thomas Schwinge <thomas@codesourcery.com>
1946
1947 * c.opt (Wc++11-extensions, Wc++14-extensions, Wc++17-extensions)
1948 (Wc++20-extensions, Wc++23-extensions): Remove 'LangEnabledBy'
1949 option properties.
1950
19512022-03-30 Thomas Schwinge <thomas@codesourcery.com>
1952
1953 * c.opt (Wuse-after-free): Remove.
1954
19552022-03-30 Thomas Schwinge <thomas@codesourcery.com>
1956
1957 * c.opt (Warray-bounds): Remove.
1958
d2906412
GA
19592022-03-26 Thomas Schwinge <thomas@codesourcery.com>
1960
1961 * c.opt: Properly quote comment.
1962
31e989a2
GA
19632022-03-25 Eric Botcazou <ebotcazou@adacore.com>
1964
1965 * c-ada-spec.cc (dump_ada_import): Deal with the "section" attribute
1966 (dump_ada_node) <POINTER_TYPE>: Do not modify and pass the name, but
1967 the referenced type instead. Deal with the anonymous original type
1968 of a typedef'ed type. In the actual access case, follow the chain
1969 of external subtypes.
1970 <TYPE_DECL>: Tidy up control flow.
1971
d156bb87
GA
19722022-03-21 Qian Jianhua <qianjh@cn.fujitsu.com>
1973
1974 * c-ada-spec.cc: Change array length
1975
d7f00da1
GA
19762022-03-19 Arthur Cohen <arthur.cohen@embecosm.com>
1977
1978 * c-common.cc (c_family_tests): Call the new tests.
1979 * c-common.h (c_diagnostic_tests): Declare.
1980 (c_opt_problem_cc_tests): Likewise.
1981
19822022-03-19 Jakub Jelinek <jakub@redhat.com>
1983
1984 PR c++/101515
1985 * c-pretty-print.cc (c_fold_indirect_ref_for_warn): For C++ don't
1986 return COMPONENT_REFs with FIELD_DECLs whose containing scope can't
1987 be printed.
1988
9fc8f278
GA
19892022-03-16 Christophe Lyon <christophe.lyon@arm.com>
1990 Roger Sayle <roger@nextmovesoftware.com>
1991
1992 PR c/98198
1993 * c-attribs.cc (decl_or_type_attrs): Add error_mark_node check.
1994
19952022-03-16 Patrick Palka <ppalka@redhat.com>
1996
1997 PR c++/96780
1998 * c.opt: Add -ffold-simple-inlines.
1999
b9756c08
GA
20002022-03-13 Tobias Burnus <tobias@codesourcery.com>
2001
2002 * c-target.def (check_string_object_format_arg): Fix description typo.
2003
57eeedda
GA
20042022-03-12 Thomas Schwinge <thomas@codesourcery.com>
2005
2006 PR other/65095
2007 * c-common.h (c_omp_map_clause_name): Remove.
2008 * c-omp.cc (c_omp_map_clause_name): Remove.
2009
8cc4f9cd
GA
20102022-03-09 Jakub Jelinek <jakub@redhat.com>
2011
2012 PR c/104711
2013 * c-opts.cc (c_common_post_options): Don't enable
2014 -Wshift-negative-value from -Wextra for C++20 or later.
2015 * c-ubsan.cc (ubsan_instrument_shift): Adjust comments.
2016 * c-warn.cc (maybe_warn_shift_overflow): Use TYPE_OVERFLOW_WRAPS
2017 instead of TYPE_UNSIGNED.
2018
e6533e2e
GA
20192022-03-07 Jakub Jelinek <jakub@redhat.com>
2020
2021 * c-attribs.cc: Fix up duplicated word issue in a comment.
2022
12d4552e
GA
20232022-03-01 Martin Liska <mliska@suse.cz>
2024
2025 PR ipa/104533
2026 * c-attribs.cc (handle_target_clones_attribute): Use
2027 get_target_clone_attr_len and report warning soon.
2028
0bdb0498
GA
20292022-02-17 Jonathan Wakely <jwakely@redhat.com>
2030
2031 * c-pragma.cc (handle_pragma_pack): Remove parameter name.
2032 (handle_pragma_weak): Likewise.
2033 (handle_pragma_scalar_storage_order): Likewise.
2034 (handle_pragma_redefine_extname): Likewise.
2035 (handle_pragma_visibility): Likewise.
2036 (handle_pragma_diagnostic): Likewise.
2037 (handle_pragma_target): Likewise.
2038 (handle_pragma_optimize): Likewise.
2039 (handle_pragma_push_options): Likewise.
2040 (handle_pragma_pop_options): Likewise.
2041 (handle_pragma_reset_options): Likewise.
2042 (handle_pragma_message): Likewise.
2043 (handle_pragma_float_const_decimal64): Likewise.
2044
cb3afcd2
GA
20452022-02-16 Jakub Jelinek <jakub@redhat.com>
2046
2047 PR c/104531
2048 * c-omp.cc (c_finish_omp_atomic): For MIN_EXPR/MAX_EXPR, try first
2049 build_binary_op with LT_EXPR and only if that doesn't return
2050 error_mark_node call build_modify_expr.
2051
20522022-02-16 Jakub Jelinek <jakub@redhat.com>
2053
2054 PR c/104510
2055 * c-common.cc (shorten_compare): Convert original arguments to
2056 the original *restype_ptr when mixing binary and decimal float.
2057
1f8a09d2
GA
20582022-02-14 Richard Biener <rguenther@suse.de>
2059
2060 PR c/104505
2061 * c-pretty-print.cc (c_pretty_printer::postfix_expression): Handle
2062 internal function calls.
2063
e8d68f0a
GA
20642022-02-11 Richard Biener <rguenther@suse.de>
2065
2066 * c-attribs.cc (c_common_attribute_table): Add entry for
2067 vector_mask.
2068 (handle_vector_mask_attribute): New.
2069
a645583d
GA
20702022-02-10 Marcel Vollweiler <marcel@codesourcery.com>
2071
2072 * c-omp.cc (c_omp_split_clauses): Added OMP_CLAUSE_HAS_DEVICE_ADDR case.
2073 * c-pragma.h (enum pragma_kind): Added 5.1 in comment.
2074 (enum pragma_omp_clause): Added PRAGMA_OMP_CLAUSE_HAS_DEVICE_ADDR.
2075
3adf509f
GA
20762022-02-09 Jason Merrill <jason@redhat.com>
2077
2078 * c-cppbuiltin.cc (c_cpp_builtins): Update values
2079 of __cpp_constexpr and __cpp_concepts for C++20.
2080
bb99171b
GA
20812022-01-24 Marek Polacek <polacek@redhat.com>
2082
2083 PR preprocessor/104030
2084 * c.opt (Wbidi-chars): Mark as EnumSet. Also accept =ucn.
2085
9dd44357
GA
20862022-01-21 Jakub Jelinek <jakub@redhat.com>
2087
2088 PR c++/104148
2089 * c-common.h (check_function_arguments_recurse): Add for_format
2090 arg.
2091 * c-common.cc (check_function_nonnull): Pass false to
2092 check_function_arguments_recurse's last argument.
2093 (check_function_arguments_recurse): Add for_format argument,
2094 if true, don't stop on warning_suppressed_p.
2095 * c-format.cc (check_format_info): Pass true to
2096 check_function_arguments_recurse's last argument.
2097
fe1ad141
GA
20982022-01-19 David Malcolm <dmalcolm@redhat.com>
2099
2100 * c-common.cc (c_common_c_tests): Rename to...
2101 (c_common_cc_tests): ...this.
2102 (c_family_tests): Update calls for .c to .cc renaming.
2103 * c-common.h (c_format_c_tests): Rename to...
2104 (c_format_cc_tests): ...this.
2105 (c_indentation_c_tests): Rename to...
2106 (c_indentation_cc_tests): ...this.
2107 (c_pretty_print_c_tests): Rename to...
2108 (c_pretty_print_cc_tests): ...this.
2109 * c-format.cc (c_format_c_tests): Rename to...
2110 (c_format_cc_tests): ...this.
2111 * c-indentation.cc (c_indentation_c_tests): Rename to...
2112 (c_indentation_cc_tests): ...this.
2113 * c-pretty-print.cc (c_pretty_print_c_tests): Rename to...
2114 (c_pretty_print_cc_tests): ...this.
2115
fc829782
GA
21162022-01-17 Martin Liska <mliska@suse.cz>
2117
2118 * c-ada-spec.cc: Rename .c names to .cc.
2119 * c-ada-spec.h: Likewise.
2120 * c-common.cc (c_build_vec_convert): Likewise.
2121 (warning_candidate_p): Likewise.
2122 * c-common.h (enum rid): Likewise.
2123 (build_real_imag_expr): Likewise.
2124 (finish_label_address_expr): Likewise.
2125 (c_get_substring_location): Likewise.
2126 (c_build_bind_expr): Likewise.
2127 (conflict_marker_get_final_tok_kind): Likewise.
2128 (c_parse_error): Likewise.
2129 (check_missing_format_attribute): Likewise.
2130 (invalid_array_size_error): Likewise.
2131 (warn_for_multistatement_macros): Likewise.
2132 (build_attr_access_from_parms): Likewise.
2133 * c-cppbuiltin.cc (c_cpp_builtins): Likewise.
2134 * c-format.cc: Likewise.
2135 * c-gimplify.cc (c_gimplify_expr): Likewise.
2136 * c-indentation.h: Likewise.
2137 * c-objc.h (objc_prop_attr_kind_for_rid): Likewise.
2138 * c-omp.cc (c_omp_predetermined_mapping): Likewise.
2139 * c-opts.cc (c_common_post_options): Likewise.
2140 (set_std_cxx23): Likewise.
2141 * c-pragma.cc (handle_pragma_redefine_extname): Likewise.
2142 * c-pretty-print.h: Likewise.
2143
21442022-01-17 Martin Liska <mliska@suse.cz>
2145
2146 * c-ada-spec.c: Moved to...
2147 * c-ada-spec.cc: ...here.
2148 * c-attribs.c: Moved to...
2149 * c-attribs.cc: ...here.
2150 * c-common.c: Moved to...
2151 * c-common.cc: ...here.
2152 * c-cppbuiltin.c: Moved to...
2153 * c-cppbuiltin.cc: ...here.
2154 * c-dump.c: Moved to...
2155 * c-dump.cc: ...here.
2156 * c-format.c: Moved to...
2157 * c-format.cc: ...here.
2158 * c-gimplify.c: Moved to...
2159 * c-gimplify.cc: ...here.
2160 * c-indentation.c: Moved to...
2161 * c-indentation.cc: ...here.
2162 * c-lex.c: Moved to...
2163 * c-lex.cc: ...here.
2164 * c-omp.c: Moved to...
2165 * c-omp.cc: ...here.
2166 * c-opts.c: Moved to...
2167 * c-opts.cc: ...here.
2168 * c-pch.c: Moved to...
2169 * c-pch.cc: ...here.
2170 * c-ppoutput.c: Moved to...
2171 * c-ppoutput.cc: ...here.
2172 * c-pragma.c: Moved to...
2173 * c-pragma.cc: ...here.
2174 * c-pretty-print.c: Moved to...
2175 * c-pretty-print.cc: ...here.
2176 * c-semantics.c: Moved to...
2177 * c-semantics.cc: ...here.
2178 * c-ubsan.c: Moved to...
2179 * c-ubsan.cc: ...here.
2180 * c-warn.c: Moved to...
2181 * c-warn.cc: ...here.
2182 * cppspec.c: Moved to...
2183 * cppspec.cc: ...here.
2184 * stub-objc.c: Moved to...
2185 * stub-objc.cc: ...here.
2186
9248ee41
GA
21872022-01-15 Martin Sebor <msebor@redhat.com>
2188
2189 PR c/63272
2190 * c.opt (-Wdangling-pointer): New option.
2191
21922022-01-15 Martin Sebor <msebor@redhat.com>
2193
2194 PR tree-optimization/80532
2195 * c.opt (-Wuse-after-free): New options.
2196
617db51d
GA
21972022-01-14 David Malcolm <dmalcolm@redhat.com>
2198
2199 * c-attribs.c (c_common_attribute_table): Add "tainted_args".
2200 (handle_tainted_args_attribute): New.
2201
ad3f0d08
GA
22022022-01-13 Anthony Sharp <anthonysharp15@gmail.com>
2203 Jason Merrill <jason@redhat.com>
2204
2205 PR c++/70417
2206 * c.opt: Added -Wmissing-template-keyword.
2207
22082022-01-13 Richard Biener <rguenther@suse.de>
2209
2210 PR c/104002
2211 * c-common.c (c_common_mark_addressable_vec): Handle TARGET_EXPR.
2212
02a8a01b
GA
22132022-01-12 Martin Liska <mliska@suse.cz>
2214
2215 PR target/103804
2216 * c-attribs.c (handle_optimize_attribute): Do not call
2217 cl_optimization_compare if we seen an error.
2218
01a254e3
GA
22192022-01-11 Jakub Jelinek <jakub@redhat.com>
2220
2221 PR c/101537
2222 PR c/103881
2223 * c-warn.c (conversion_warning): Handle BIT_AND_EXPR, BIT_IOR_EXPR
2224 and BIT_XOR_EXPR.
2225
d9450aa0
GA
22262022-01-10 Richard Biener <rguenther@suse.de>
2227
2228 PR middle-end/101530
2229 * c-common.c (c_build_shufflevector): Wrap the BIT_FIELD_REF
2230 in a TARGET_EXPR to force a temporary.
2231
11ce8d04
GA
22322022-01-06 Marek Polacek <polacek@redhat.com>
2233
2234 PR c++/103758
2235 * c-pragma.c (handle_pragma_scalar_storage_order): Use %< %> in
2236 diagnostic messages.
2237 (handle_pragma_diagnostic): Likewise.
2238
a4ae8c37
GA
22392022-01-03 Marek Polacek <polacek@redhat.com>
2240
2241 PR c++/103758
2242 * c-format.c (check_tokens): Accept "decl-specifier*".
2243
22442022-01-03 Jakub Jelinek <jakub@redhat.com>
2245
2246 PR c++/103600
2247 * c-attribs.c (handle_non_overlapping_attribute): New function.
2248 (c_common_attribute_table): Add "non overlapping" attribute.
2249
84790a9d
GA
22502021-12-30 Jakub Jelinek <jakub@redhat.com>
2251
2252 PR c++/103012
2253 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Perform
2254 cpp_define_unused/cpp_undef calls with forced token locations
2255 BUILTINS_LOCATION.
2256
d1e111da
GA
22572021-12-27 Patrick Palka <ppalka@redhat.com>
2258
2259 PR c++/103700
2260 * c-common.c (pointer_int_sum): When quiet, return
2261 error_mark_node for an incomplete pointed-to type and don't
2262 call size_in_bytes_loc.
2263
2554e2da
GA
22642021-12-17 Jason Merrill <jason@redhat.com>
2265
2266 PR c++/103681
2267 * c-opts.c (c_common_post_options): Update defaults.
2268
774269aa
GA
22692021-12-16 Martin Liska <mliska@suse.cz>
2270
2271 PR target/103709
2272 * c-pragma.c (handle_pragma_pop_options): Do not check
2273 global options modification when an error is seen in parsing
2274 of options (pragmas or attributes).
2275
c8dcf64b
GA
22762021-12-12 Jonathan Wakely <jwakely@redhat.com>
2277
2278 * known-headers.cc: Define INCLUDE_MEMORY instead of
2279 INCLUDE_UNIQUE_PTR.
2280 * name-hint.h: Likewise.
2281 (class name_hint): Use std::unique_ptr instead of gnu::unique_ptr.
2282
4b4839e3
GA
22832021-12-09 Jakub Jelinek <jakub@redhat.com>
2284
2285 PR pch/71934
2286 * c-pch.c (c_common_no_more_pch): Pass a temporary void * var
2287 with NULL value instead of NULL to host_hooks.gt_pch_use_address.
2288
03a9bd05
GA
22892021-12-03 Jakub Jelinek <jakub@redhat.com>
2290
2291 PR pch/71934
2292 * c-pch.c (struct c_pch_validity): Remove pch_init member.
2293 (pch_init): Don't initialize v.pch_init.
2294 (c_common_valid_pch): Don't warn and punt if .text addresses change.
2295
40fa651e
GA
22962021-12-01 Jason Merrill <jason@redhat.com>
2297
2298 PR c++/103310
2299 * c.opt: Add -fconstexpr-fp-except.
2300
87cd82c8
GA
23012021-11-29 Richard Biener <rguenther@suse.de>
2302
2303 * c-format.c (check_format_string): Remove spurious
2304 gcc_unreachable.
2305
23062021-11-29 Richard Biener <rguenther@suse.de>
2307
2308 * c-opts.c (c_common_post_options): Remove unreachable return.
2309 * c-pragma.c (handle_pragma_target): Likewise.
2310 (handle_pragma_optimize): Likewise.
2311
091ccc06
GA
23122021-11-25 Jakub Jelinek <jakub@redhat.com>
2313
2314 PR c++/102611
2315 * c-opts.c (c_common_post_options): Enable -Wcomma-subscript by
2316 default for C++23 regardless of warn_deprecated.
2317 * c-cppbuiltin.c (c_cpp_builtins): Predefine
2318 __cpp_multidimensional_subscript=202110L for C++23.
2319
e1d43592
GA
23202021-11-23 Martin Sebor <msebor@redhat.com>
2321
2322 PR middle-end/88232
2323 * c.opt: Add -Winfinite-recursion.
2324
9c077398
GA
23252021-11-19 Martin Sebor <msebor@redhat.com>
2326
2327 PR c++/33925
2328 PR c/102867
2329 * c-common.c (decl_with_nonnull_addr_p): Call maybe_nonzero_address
2330 and improve handling tof defined symbols.
2331
23322021-11-19 Martin Liska <mliska@suse.cz>
2333
2334 Revert:
2335 2021-11-18 Martin Liska <mliska@suse.cz>
2336
2337 * c-gimplify.c (genericize_c_loop): Use option directly.
2338
483092d3
GA
23392021-11-18 Matthias Kretz <m.kretz@gsi.de>
2340
2341 * c-common.c (c_common_reswords): Add __builtin_assoc_barrier.
2342 * c-common.h (enum rid): Add RID_BUILTIN_ASSOC_BARRIER.
2343
23442021-11-18 Martin Liska <mliska@suse.cz>
2345
2346 * c-gimplify.c (genericize_c_loop): Use option directly.
2347
280d2838
GA
23482021-11-17 Martin Uecker <uecker@gcc.gnu.org>
2349
2350 PR c/91038
2351 PR c/29970
2352 * c-common.c (pointer_int_sum): Make sure pointer expressions
2353 are evaluated first when the size expression depends on for
2354 variably-modified types.
2355
23562021-11-17 Marek Polacek <polacek@redhat.com>
2357
2358 PR preprocessor/103026
2359 * c.opt (Wbidi-chars, Wbidi-chars=): New option.
2360
6b1695f4
GA
23612021-11-16 Jason Merrill <jason@redhat.com>
2362
2363 * c-common.c (release_tree_vector): Only cache vecs smaller than
2364 16 elements.
2365
e2b57363
GA
23662021-11-15 Jason Merrill <jason@redhat.com>
2367
2368 * c.opt: Add -fimplicit-constexpr.
2369 * c-cppbuiltin.c: Define __cpp_implicit_constexpr.
2370 * c-opts.c (c_common_post_options): Disable below C++14.
2371
23722021-11-15 Jakub Jelinek <jakub@redhat.com>
2373
2374 * c-omp.c (c_omp_split_clauses) <case OMP_CLAUSE_THREAD_LIMIT>:
2375 Duplicate to both OMP_TARGET and OMP_TEAMS.
2376
8d36a0d2
GA
23772021-11-10 Marek Polacek <polacek@redhat.com>
2378
2379 PR c++/101940
2380 * c-pragma.c (handle_pragma_diagnostic): Handle #pragma GCC diagnostic
2381 ignored_attributes.
2382
c9b1334e
GA
23832021-11-09 David Malcolm <dmalcolm@redhat.com>
2384
2385 * c-pragma.c (GCC_BAD_AT): New macro.
2386 (GCC_BAD2_AT): New macro.
2387 (handle_pragma_pack): Use the location of the pertinent token when
2388 issuing diagnostics about invalid constants/actions, and trailing
2389 junk.
2390 (handle_pragma_target): Likewise for non-string "GCC option".
2391 (handle_pragma_message): Likewise for trailing junk.
2392
18ae471f
GA
23932021-11-03 Joseph Myers <joseph@codesourcery.com>
2394
2395 PR c/103031
2396 * c-common.c (convert_and_check): Add argument init_const. Call
2397 convert_init if init_const.
2398 * c-common.h (convert_and_check): Update prototype.
2399 (convert_init): New prototype.
2400
cf82e8d9
GA
24012021-11-01 David Malcolm <dmalcolm@redhat.com>
2402
2403 * c-lex.c (c_lex_with_flags): When complaining about non-printable
2404 CPP_OTHER tokens, set the "escape on output" flag.
2405
04a2cf3f
GA
24062021-10-27 Jakub Jelinek <jakub@redhat.com>
2407
2408 * c-omp.c (c_omp_check_loop_iv_r): Don't clear 3rd bit for
2409 POINTER_PLUS_EXPR.
2410 (c_omp_check_nonrect_loop_iv): Handle POINTER_PLUS_EXPR.
2411 (c_omp_check_loop_iv): Set kind even if the iterator is non-integral.
2412
24132021-10-27 Jakub Jelinek <jakub@redhat.com>
2414
2415 PR c++/102854
2416 * c-common.h (c_omp_check_loop_iv_exprs): Add enum tree_code argument.
2417 * c-omp.c (c_omp_check_loop_iv_r): For trees other than decls,
2418 TREE_VEC, PLUS_EXPR, MINUS_EXPR, MULT_EXPR, POINTER_PLUS_EXPR or
2419 conversions temporarily clear the 3rd bit from d->kind while walking
2420 subtrees.
2421 (c_omp_check_loop_iv_exprs): Add CODE argument. Or in 4 into data.kind
2422 if possibly non-rectangular.
2423
ae5c5406
GA
24242021-10-21 Jakub Jelinek <jakub@redhat.com>
2425
2426 PR middle-end/64888
2427 * c-omp.c (c_omp_predefined_variable): Return true also for
2428 ubsan_create_data created artificial variables.
2429
5d5885c9
GA
24302021-10-14 Joseph Myers <joseph@codesourcery.com>
2431
2432 * c-format.c (printf_length_specs, scanf_length_specs)
2433 (print_char_table, scan_char_table): Support DFP formats for C2X.
2434 * c-format.h (TEX_D32, TEX_D64, TEX_D128): Remove.
2435 (T2X_D32, T2X_D64, T2X_D128): New macros.
2436
24372021-10-14 Kwok Cheung Yeung <kcy@codesourcery.com>
2438
2439 * c-omp.c (c_omp_check_context_selector): Rename to
2440 omp_check_context_selector and move to omp-general.c.
2441 (c_omp_mark_declare_variant): Rename to omp_mark_declare_variant and
2442 move to omp-general.c.
2443
52055987
GA
24442021-10-12 Joseph Myers <joseph@codesourcery.com>
2445
2446 * c-format.c (print_char_table): Add %b and %B formats.
2447 (scan_char_table): Add %b format.
2448 * c-format.h (T2X_UI, T2X_UL, T2X_ULL, T2X_US, T2X_UC, T2X_ST)
2449 (T2X_UPD, T2X_UIM): New macros.
2450
24512021-10-12 Jakub Jelinek <jakub@redhat.com>
2452
2453 * c-omp.c (c_finish_omp_atomic): Use
2454 clear_padding_type_may_have_padding_p.
2455
ce6eec39
GA
24562021-10-08 Martin Liska <mliska@suse.cz>
2457
2458 * c-opts.c (c_common_post_options): Use new macro
2459 OPTION_SET_P.
2460
50e20ee6
GA
24612021-10-07 Martin Liska <mliska@suse.cz>
2462
2463 * c-common.c (parse_optimize_options): Make
2464 save_opt_decoded_options a pointer type.
2465
57c7ec62
GA
24662021-10-06 Jakub Jelinek <jakub@redhat.com>
2467
2468 PR tree-optimization/102571
2469 * c-omp.c (c_finish_omp_atomic): Optimize the case where type has
2470 padding, but the non-padding bits are contiguous set of bytes
2471 by adjusting the memcmp call arguments instead of emitting
2472 __builtin_clear_padding and then comparing all the type's bytes.
2473
24742021-10-06 Jakub Jelinek <jakub@redhat.com>
2475
2476 PR c++/102612
2477 * c-cppbuiltin.c (c_cpp_builtins): For -std=c++23 predefine
2478 __cpp_constexpr to 202110L rather than 201907L.
2479
da9c5f78
GA
24802021-10-04 Marek Polacek <polacek@redhat.com>
2481
2482 PR c++/97573
2483 * c-common.h (do_warn_array_compare): Declare.
2484 * c-warn.c (do_warn_array_compare): New.
2485 * c.opt (Warray-compare): New option.
2486
e3e07b89
GA
24872021-10-02 Iain Sandoe <iain@sandoe.co.uk>
2488
2489 * c-format.c: Remove a test of TARGET_FORMAT_TYPES with
2490 NULL, this is not needed.
2491
9d116bcc
GA
24922021-10-01 Martin Sebor <msebor@redhat.com>
2493
2494 PR c/102103
2495 * c-common.c (decl_with_nonnull_addr_p): Handle members.
2496 Check and perform warning suppression.
2497 (c_common_truthvalue_conversion): Enhance warning suppression.
2498
24992021-10-01 Martin Liska <mliska@suse.cz>
2500
2501 PR target/102552
2502 * c-common.c (parse_optimize_options): decoded_options[0] is
3d3b561f
ML
2503 used for program name, so merged_decoded_options should also
2504 respect that.
9d116bcc
GA
2505
25062021-10-01 Jakub Jelinek <jakub@redhat.com>
2507 Richard Biener <rguenther@suse.de>
2508
2509 PR sanitizer/102515
2510 * c-ubsan.c (ubsan_instrument_division): Check the right
2511 flag_sanitize_recover bit, depending on which sanitization
2512 is done. Sanitize INT_MIN / -1 under SANITIZE_SI_OVERFLOW
2513 rather than SANITIZE_DIVIDE. If both SANITIZE_SI_OVERFLOW
2514 and SANITIZE_DIVIDE is enabled, neither check is known
2515 to be false and flag_sanitize_recover bits for those two
2516 aren't the same, emit both __ubsan_handle_divrem_overflow
2517 and __ubsan_handle_divrem_overflow_abort calls.
2518
25192021-10-01 Martin Liska <mliska@suse.cz>
2520
2521 * c-common.c (parse_optimize_options): Combine optimize
2522 options with what was provided on the command line.
2523
25242021-10-01 Jakub Jelinek <jakub@redhat.com>
2525
2526 * c-omp.c (c_omp_split_clauses): Also copy
2527 OMP_CLAUSE_ORDER_REPRODUCIBLE.
2528
cf966403
GA
25292021-09-27 Martin Liska <mliska@suse.cz>
2530
2531 * c-opts.c (c_common_init_options_struct): Set also
3d3b561f 2532 x_flag_default_complex_method.
cf966403 2533
e4777439
GA
25342021-09-22 Jakub Jelinek <jakub@redhat.com>
2535
2536 * c-omp.c (c_omp_split_clauses): Copy over OMP_CLAUSE_ALLOCATE_ALIGN.
2537
62498024
GA
25382021-09-20 Matthias Kretz <m.kretz@gsi.de>
2539
2540 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Define or
2541 undefine __RECIPROCAL_MATH__, __NO_SIGNED_ZEROS__,
2542 __NO_TRAPPING_MATH__, __ASSOCIATIVE_MATH__, and
2543 __ROUNDING_MATH__ according to the new optimization flags.
2544
cf74e7b5
GA
25452021-09-18 Jakub Jelinek <jakub@redhat.com>
2546
2547 * c-omp.c (c_omp_split_clauses): Split order clause also to
2548 distribute construct. Copy over OMP_CLAUSE_ORDER_UNCONSTRAINED.
2549
0a4cb439
GA
25502021-09-17 Jakub Jelinek <jakub@redhat.com>
2551
2552 * c-omp.c (c_finish_omp_atomic): Avoid creating
2553 TARGET_EXPR if test is true, use create_tmp_var_raw instead of
2554 create_tmp_var and add a zero initializer to TARGET_EXPRs that
2555 had NULL initializer. When omitting operands after v = x,
2556 use type of v rather than type of x. Fix type of vtmp
2557 TARGET_EXPR.
2558
07985c47
GA
25592021-09-13 Jason Merrill <jason@redhat.com>
2560
2561 * c.opt: Add -Winterference-size.
2562 * c-cppbuiltin.c (cpp_atomic_builtins): Add __GCC_DESTRUCTIVE_SIZE
2563 and __GCC_CONSTRUCTIVE_SIZE.
2564
a26206ec
GA
25652021-09-10 Jakub Jelinek <jakub@redhat.com>
2566
2567 * c-common.h (c_finish_omp_atomic): Add r and weak arguments.
2568 * c-omp.c: Include gimple-fold.h.
2569 (c_finish_omp_atomic): Add r and weak arguments. Add support for
2570 OpenMP 5.1 atomics.
2571
f84e2f0b
GA
25722021-09-09 qing zhao <qing.zhao@oracle.com>
2573
2574 * c-attribs.c (handle_uninitialized_attribute): New function.
2575 (c_common_attribute_table): Add "uninitialized" attribute.
2576
b6db7cd4
GA
25772021-09-08 liuhongt <hongtao.liu@intel.com>
2578
2579 * c-common.c (excess_precision_mode_join): Update below comments.
2580 (c_ts18661_flt_eval_method): Set excess_precision_type to
2581 EXCESS_PRECISION_TYPE_FLOAT16 when -fexcess-precision=16.
2582 * c-cppbuiltin.c (cpp_atomic_builtins): Update below comments.
2583 (c_cpp_flt_eval_method_iec_559): Set excess_precision_type to
2584 EXCESS_PRECISION_TYPE_FLOAT16 when -fexcess-precision=16.
2585
b2748138
GA
25862021-09-07 Marcel Vollweiler <marcel@codesourcery.com>
2587
2588 * c-omp.c (c_finish_omp_flush): Handle MEMMODEL_SEQ_CST.
2589
7b739540
GA
25902021-09-03 Eric Botcazou <ebotcazou@adacore.com>
2591
2592 * c-ada-spec.c (dump_ads): Generate pragmas to disable style checks
2593 and -gnatwu warning for the package specification.
2594
e11c6046
GA
25952021-09-01 Iain Sandoe <iain@sandoe.co.uk>
2596
2597 * c-attribs.c (handle_unavailable_attribute): New.
2598
1e2f030b
GA
25992021-08-30 Jason Merrill <jason@redhat.com>
2600
2601 * c.opt: Add -Wmissing-requires.
2602
85d77ac4
GA
26032021-08-25 Lewis Hyatt <lhyatt@gmail.com>
2604
2605 PR other/93067
2606 * c-opts.c (c_common_input_charset_cb): New function.
2607 (c_common_post_options): Call new function
2608 diagnostic_initialize_input_context().
2609
7c9e1645
GA
26102021-08-20 Tobias Burnus <tobias@codesourcery.com>
2611
2612 * c-format.c (gcc_gfc_length_specs): Add 'll' and 'w'.
2613 (gcc_gfc_char_table): Add T9L_LL and T9L_ULL to
2614 "di" and "u", respecitively; fill with BADLEN to match
2615 size of 'types'.
2616 (get_init_dynamic_hwi): Split off from ...
2617 (init_dynamic_diag_info): ... here. Call it.
2618 (init_dynamic_gfc_info): Call it.
2619
26202021-08-20 Jakub Jelinek <jakub@redhat.com>
2621
2622 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_ERROR.
2623 * c-pragma.c (omp_pragmas): Add error directive.
2624 * c-omp.c (omp_directives): Uncomment error directive entry.
2625
6e529985
GA
26262021-08-18 Jakub Jelinek <jakub@redhat.com>
2627
2628 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_NOTHING.
2629 * c-pragma.c (omp_pragmas): Add nothing directive.
2630 * c-omp.c (omp_directives): Uncomment nothing directive entry.
2631
2d14d64b
GA
26322021-08-17 Jakub Jelinek <jakub@redhat.com>
2633
2634 PR c++/101539
2635 * c-common.h (enum rid): Add RID_IS_LAYOUT_COMPATIBLE.
2636 * c-common.c (c_common_reswords): Add __is_layout_compatible.
2637
26382021-08-17 Matt Jacobson <mhjacobson@me.com>
2639
2640 * c-opts.c (c_common_post_options): Default to
2641 flag_objc_sjlj_exceptions = 1 only when flag_objc_abi < 2.
2642
26432021-08-17 Jakub Jelinek <jakub@redhat.com>
2644
2645 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_SCOPE.
2646 * c-pragma.c (omp_pragmas): Add scope construct.
2647 * c-omp.c (omp_directives): Uncomment scope directive entry.
2648
9d1d9fc8
GA
26492021-08-16 Sebastian Huber <sebastian.huber@embedded-brains.de>
2650
2651 * c-cppbuiltin.c (c_cpp_builtins): Define
2652 __LIBGCC_GCOV_TYPE_SIZE if flag_building_libgcc is true.
2653
72be20e2
GA
26542021-08-12 Jakub Jelinek <jakub@redhat.com>
2655
2656 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_MASKED.
2657 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_FILTER.
2658 * c-pragma.c (omp_pragmas_simd): Add masked construct.
2659 * c-common.h (enum c_omp_clause_split): Add C_OMP_CLAUSE_SPLIT_MASKED
2660 enumerator.
2661 (c_finish_omp_masked): Declare.
2662 * c-omp.c (c_finish_omp_masked): New function.
2663 (c_omp_split_clauses): Handle combined masked constructs.
2664
4d17ca1b
GA
26652021-07-30 Jakub Jelinek <jakub@redhat.com>
2666
2667 PR c++/101539
2668 * c-common.h (enum rid): Add RID_IS_POINTER_INTERCONVERTIBLE_BASE_OF.
2669 * c-common.c (c_common_reswords): Add
2670 __is_pointer_interconvertible_base_of.
2671
26722021-07-29 Richard Biener <rguenther@suse.de>
2673
2674 PR c/101512
2675 * c-common.c (c_common_mark_addressable_vec): Look through
2676 C_MAYBE_CONST_EXPR even if not at the toplevel.
2677
af3f12e6
GA
26782021-07-27 Martin Sebor <msebor@redhat.com>
2679
2680 PR c/101585
2681 * c-warn.c (warn_parm_ptrarray_mismatch): Use OEP_DECL_NAME.
2682
ead235f6
GA
26832021-07-23 Jakub Jelinek <jakub@redhat.com>
2684
2685 * c-lex.c (c_common_has_attribute): Call canonicalize_attr_name also
2686 on attr_id. Return 1 for omp::directive or omp::sequence in C++11
2687 and later.
2688
26892021-07-23 Jakub Jelinek <jakub@redhat.com>
2690
2691 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP__START_ and
2692 PRAGMA_OMP__LAST_ enumerators.
2693
419c6c68
GA
26942021-07-21 Thomas Schwinge <thomas@codesourcery.com>
2695 Joseph Myers <joseph@codesourcery.com>
2696 Cesar Philippidis <cesar@codesourcery.com>
2697
2698 * c-pragma.h (pragma_omp_clause): Add 'PRAGMA_OACC_CLAUSE_NOHOST'.
2699
92d45509
GA
27002021-07-20 Martin Sebor <msebor@redhat.com>
2701
2702 * c-common.c (c_build_shufflevector): Adjust by-value argument to
2703 by-const-reference.
2704 * c-common.h (c_build_shufflevector): Same.
2705
87277b6a
GA
27062021-07-16 Andrew Pinski <apinski@marvell.com>
2707
2708 PR c/101453
2709 * c-common.c (parse_optimize_options): Use the correct
2710 size for buffer.
2711
d97d71a1
GA
27122021-07-15 Martin Sebor <msebor@redhat.com>
2713
2714 PR c/101289
2715 PR c/97548
2716 * c-warn.c (warn_parm_array_mismatch): Use OEP_DECL_NAME.
2717
c4fee1c6
GA
27182021-07-14 Jason Merrill <jason@redhat.com>
2719
2720 * c-opts.c (c_common_post_options): Set -fdelete-dead-exceptions.
2721
6fba0eea
GA
27222021-07-06 Martin Sebor <msebor@redhat.com>
2723
2724 * c-format.c (gcc_tdiag_char_table): Remove support for %G and %K.
3d3b561f
ML
2725 (gcc_cdiag_char_table): Same.
2726 (gcc_cxxdiag_char_table): Same.
6fba0eea 2727
7a60a6e8
GA
27282021-07-02 Jakub Jelinek <jakub@redhat.com>
2729
2730 * c-common.h (enum c_omp_directive_kind): New enum.
2731 (struct c_omp_directive): New type.
2732 (c_omp_categorize_directive): Declare.
2733 * c-omp.c (omp_directives): New variable.
2734 (c_omp_categorize_directive): New function.
2735
bea7c16a
GA
27362021-07-01 Eric Botcazou <ebotcazou@adacore.com>
2737
2738 * c-ada-spec.c (packed_layout): New global variable.
2739 (dump_ada_declaration): Set it upon seeing a packed record type.
2740 Do not put the "aliased" keyword if it is set.
2741 (dump_ada_structure): Add Pack aspect if it is set and clear it.
2742
27432021-07-01 Eric Botcazou <ebotcazou@adacore.com>
2744
2745 * c-ada-spec.c (check_name): Rename into...
2746 (check_type_name_conflict): ...this. Minor tweak.
2747 (dump_ada_function_declaration): Adjust to above renaming.
2748 (dump_ada_array_domains): Fix oversight.
2749 (dump_ada_declaration): Call check_type_name_conflict for variables.
2750
90708f87
GA
27512021-06-25 Martin Sebor <msebor@redhat.com>
2752
2753 * c-common.c (c_wrap_maybe_const): Remove TREE_NO_WARNING.
2754 (c_common_truthvalue_conversion): Replace direct uses of
2755 TREE_NO_WARNING with warning_suppressed_p, suppress_warning, and
2756 copy_no_warning.
2757 (check_function_arguments_recurse): Same.
2758 * c-gimplify.c (c_gimplify_expr): Same.
2759 * c-warn.c (overflow_warning): Same.
2760 (warn_logical_operator): Same.
2761 (warn_if_unused_value): Same.
2762 (do_warn_unused_parameter): Same.
2763
9aa8327e
GA
27642021-06-24 Jakub Jelinek <jakub@redhat.com>
2765
2766 * c-common.h (enum c_omp_region_type): Add C_ORT_TARGET and
2767 C_ORT_OMP_TARGET.
2768 * c-omp.c (c_omp_split_clauses): For OMP_CLAUSE_IN_REDUCTION on
2769 combined target constructs also add map (always, tofrom:) clause.
2770
ede6c356
GA
27712021-06-15 Robin Dapp <rdapp@linux.ibm.com>
2772
2773 * c-attribs.c (common_handle_aligned_attribute): Remove short
2774 circuit and dead code.
2775
8dc48181
GA
27762021-06-14 Jonathan Wakely <jwakely@redhat.com>
2777
2778 PR c++/101052
2779 * known-headers.cc (get_stdlib_header_for_name): Add known
2780 headers for EXIT_FAILURE, EXIT_SUCCESS, abort, atexit, calloc,
2781 exit, and getenv.
2782
8b8c3912
GA
27832021-06-12 Jason Merrill <jason@redhat.com>
2784
2785 * c-attribs.c (handle_unused_attribute): Handle FIELD_DECL.
2786
f16f65f8
GA
27872021-06-11 Jakub Jelinek <jakub@redhat.com>
2788
2789 PR c++/100974
2790 * c-cppbuiltin.c (c_cpp_builtins): Predefine __cpp_if_consteval for
2791 -std=c++2b for P1938R3 consteval if support.
2792
4f625f47
GA
27932021-06-09 Jason Merrill <jason@redhat.com>
2794
2795 PR c++/100879
2796 * c-warn.c (warn_for_sign_compare): Remove C++ enum mismatch
2797 warning.
2798
438aac59
GA
27992021-06-07 Martin Liska <mliska@suse.cz>
2800
2801 * c-target.def: Split long lines and replace them
2802 with '\n\'.
2803
600f90cb
GA
28042021-06-04 Martin Sebor <msebor@redhat.com>
2805
2806 PR c/100783
2807 * c-attribs.c (positional_argument): Bail on erroneous types.
2808
28092021-06-04 Martin Sebor <msebor@redhat.com>
2810
2811 * c-warn.c (warn_parm_array_mismatch): Check TREE_PURPOSE to test
2812 for element presence.
2813
440c8a0a
GA
28142021-06-03 Eric Botcazou <ebotcazou@adacore.com>
2815
2816 * c-ada-spec.c (dump_ada_macros): Minor tweaks.
2817 (dump_ada_decl_name): Likewise.
2818 (dump_anonymous_type_name): Remove parent parameter and adjust.
2819 (dump_sloc): Minor tweak.
2820 (dump_ada_array_type): Remove type parameter and adjust.
2821 (dump_ada_enum_type): Remove parent parameter and adjust.
2822 (dump_ada_node): Adjust calls to above functions.
2823 (dumped_anonymous_types): New global variable.
2824 (dump_nested_types_1): Rename into...
2825 (dump_nested_types): ...this.
2826 (dump_nested_type): Remove parent and dumped_types parameters.
2827 <ARRAY_TYPE>: Replace dumped_types with dumped_anonymous_types.
2828 Adjust calls to dump_anonymous_type_name and dump_ada_array_type.
2829 (dump_ada_specs): Initialize and free dumped_anonymous_types.
2830
28312021-06-03 Eric Botcazou <ebotcazou@adacore.com>
2832
2833 * c-ada-spec.c (pp_ada_tree_identifier): Tidy up.
2834 (dump_ada_node) <POINTER_TYPE>: Deal specially with external subtypes.
2835
28362021-06-03 Eric Botcazou <ebotcazou@adacore.com>
2837
2838 * c-ada-spec.c (dump_ada_enum_type): Dump a prefix for constants.
2839 (htable_t): New typedef.
2840 (overloaded_names): Use it.
2841 (add_name): New function.
2842 (init_overloaded_names): Use add_name to populate the table and add
2843 special cases for sigaction and stat.
2844 (overloaded_name_p): Rename into...
2845 (overloading_index): ...this. Do not initialize overloaded_names table
2846 here. Return the index or zero.
2847 (dump_ada_declaration): Minor tweaks. Do not skip overloaded functions
2848 but add an overloading suffix instead.
2849 (dump_ada_specs): Initialize overloaded_names tables here.
2850
b75978d1
GA
28512021-06-01 Martin Liska <mliska@suse.cz>
2852
2853 PR other/100759
2854 * c-attribs.c (handle_optimize_attribute): Limit sanity check
2855 to a situation where we are not in processing of an optimize
2856 pragma.
2857 * c-pragma.c (handle_pragma_pop_options): Restore target
2858 options.
2859
ee682192
GA
28602021-05-31 Indu Bhagat <indu.bhagat@oracle.com>
2861
2862 PR testsuite/100749
2863 * c-pch.c (c_common_valid_pch): Use xstrdup for debug format set names.
2864
28652021-05-31 Richard Biener <rguenther@suse.de>
2866
2867 PR c++/88601
2868 * c-common.c: Include tree-vector-builder.h and
2869 vec-perm-indices.h.
2870 (c_common_reswords): Add __builtin_shufflevector.
2871 (c_build_shufflevector): New funtion.
2872 * c-common.h (enum rid): Add RID_BUILTIN_SHUFFLEVECTOR.
2873 (c_build_shufflevector): Declare.
2874
48166757
GA
28752021-05-28 Jakub Jelinek <jakub@redhat.com>
2876
2877 PR middle-end/99928
2878 * c-omp.c (c_omp_split_clauses): For reduction clause if combined with
2879 target add a map tofrom clause with OMP_CLAUSE_MAP_IMPLICIT.
2880
28812021-05-28 Tobias Burnus <tobias@codesourcery.com>
2882
2883 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_AFFINITY.
2884
2bc6dace
GA
28852021-05-25 Martin Liska <mliska@suse.cz>
2886
2887 PR tree-optimization/92860
2888 PR target/99592
2889 * c-attribs.c (handle_optimize_attribute): Save target node
2890 before calling parse_optimize_options and save it in case
2891 it changes.
2892 * c-pragma.c (handle_pragma_target): Similarly for pragma.
2893 (handle_pragma_pop_options): Likewise here.
2894
28952021-05-25 Martin Liska <mliska@suse.cz>
2896
2897 * c-attribs.c (handle_no_sanitize_coverage_attribute): New.
2898
28992021-05-25 Jakub Jelinek <jakub@redhat.com>
2900
2901 PR middle-end/99928
2902 * c-omp.c (c_omp_split_clauses): Copy reduction to teams when teams is
2903 combined with simd and not with taskloop or for.
2904
2832d51b
GA
29052021-05-21 Jakub Jelinek <jakub@redhat.com>
2906
2907 PR middle-end/99928
2908 * c-omp.c (c_omp_split_clauses): Set OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT
2909 on firstprivate clause copy going to target construct, and for
2910 target simd set also OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT_TARGET bit.
2911
ea34e2ed
GA
29122021-05-20 Jonathan Wakely <jwakely@redhat.com>
2913
2914 * c.opt (Wc++11-extensions, Wc++14-extensions)
2915 (Wc++17-extensions, Wc++20-extensions, Wc++23-extensions): New
2916 options.
2917
29182021-05-20 Indu Bhagat <indu.bhagat@oracle.com>
2919
2920 * c-lex.c (init_c_lex): Use dwarf_debuginfo_p.
2921
29222021-05-20 Indu Bhagat <indu.bhagat@oracle.com>
2923
2924 * c-opts.c (c_common_post_options): Adjust access to debug_type_names.
2925 * c-pch.c (struct c_pch_validity): Use type uint32_t.
2926 (pch_init): Renamed member.
2927 (c_common_valid_pch): Adjust access to debug_type_names.
2928
65f32e5d
GA
29292021-05-19 Martin Sebor <msebor@redhat.com>
2930
2931 PR c/100619
2932 * c-attribs.c (build_attr_access_from_parms): Handle arbitrarily many
2933 bounds.
2934
a8daf9a1
GA
29352021-05-18 Richard Biener <rguenther@suse.de>
2936
2937 PR c/100547
2938 * c-attribs.c (type_valid_for_vector_size): Reject too large nunits.
2939 Reword existing nunit diagnostic.
2940
a7ffc1ef
GA
29412021-05-17 Joern Rennecke <joern.rennecke@embecosm.com>
2942
2943 * c-common.c (braced_list_to_string): Return CTOR unchanged
2944 if host and target character sizes don't match.
2945
87a7d10c
GA
29462021-05-14 Martin Liska <mliska@suse.cz>
2947
2948 * c.opt: Add Warning keyword for 2 options.
2949
f9af11c7
GA
29502021-05-13 Martin Liska <mliska@suse.cz>
2951
2952 PR middle-end/100504
2953 * c-attribs.c (handle_target_clones_attribute): Expect a string
2954 argument to target_clone argument.
2955
037e3661
GA
29562021-05-11 Joseph Myers <joseph@codesourcery.com>
2957
2958 * c-lex.c (interpret_float): Handle digit separators for C2X.
2959
aa891c56
GA
29602021-05-10 Martin Liska <mliska@suse.cz>
2961
2962 * c-ada-spec.c (print_destructor): Use startswith
2963 function instead of strncmp.
2964 (dump_ada_declaration): Likewise.
2965 * c-common.c (disable_builtin_function): Likewise.
2966 (def_builtin_1): Likewise.
2967 * c-format.c (check_tokens): Likewise.
2968 (check_plain): Likewise.
2969 (convert_format_name_to_system_name): Likewise.
2970
e4ff4ffb
GA
29712021-04-28 Patrick McGehearty <patrick.mcgehearty@oracle.com>
2972
2973 * c-cppbuiltin.c (c_cpp_builtins): Add supporting macros for new
2974 complex divide
2975
c0fa3f2f
GA
29762021-04-26 Thomas Schwinge <thomas@codesourcery.com>
2977 Nathan Sidwell <nathan@codesourcery.com>
2978 Tom de Vries <vries@codesourcery.com>
2979 Julian Brown <julian@codesourcery.com>
2980 Kwok Cheung Yeung <kcy@codesourcery.com>
2981
2982 * c.opt (Wopenacc-parallelism): New.
2983
6e81e015
GA
29842021-04-19 Thomas Schwinge <thomas@codesourcery.com>
2985
2986 * c.opt (fopenacc-kernels=): Remove.
2987
019a9220
GA
29882021-04-08 Jakub Jelinek <jakub@redhat.com>
2989
2990 * c-warn.c (do_warn_double_promotion): Fix comment typo,
2991 occured -> occurred.
2992 (check_alignment_of_packed_member): Fix a comment typo,
2993 memeber -> member.
2994 (warn_parm_ptrarray_mismatch): Fix comment typos, os -> of
2995 and onless -> unless.
2996 (warn_parm_array_mismatch): Fix comment typos, declaratation
2997 -> declaration and woud -> would. Fix up comment indentation.
2998
29992021-04-08 Martin Sebor <msebor@redhat.com>
3000
3001 PR middle-end/99883
3002 * c.opt (Wmismatched-new-delete): Correct spelling.
3003
b1da9916
GA
30042021-04-05 Eric Botcazou <ebotcazou@adacore.com>
3005
3006 * c-ada-spec.c (is_simple_enum): Minor tweaks.
3007 (dump_ada_enum_type): Add TYPE and PARENT parameters. For non-simple
3008 enumeral types use again the type name for the enumeration constants.
3009 (dump_ada_node): Adjust call to dump_ada_enum_type.
3010 (dump_nested_type): Likewise.
3011
f1607029
GA
30122021-04-01 Jason Merrill <jason@redhat.com>
3013
3014 PR c++/98481
3015 * c-opts.c (c_common_post_options): Bump latest_abi_version.
3016
4493b1c1
GA
30172021-03-25 Jakub Jelinek <jakub@redhat.com>
3018
3019 PR c++/99565
3020 * c-warn.c (do_warn_duplicated_branches): Pass also
3021 OEP_ADDRESS_OF_SAME_FIELD to operand_equal_p.
3022
6af7b307
GA
30232021-03-20 Jakub Jelinek <jakub@redhat.com>
3024
3025 PR debug/99230
3026 * c-gimplify.c (c_genericize_control_stmt): Handle STATEMENT_LIST.
3027
ceae9533
GA
30282021-03-05 Eric Botcazou <ebotcazou@adacore.com>
3029
3030 * c-ada-spec.c (dump_ada_declaration) <TYPE_DECL>: Dump nested types
3031 after entering the separate class package, if any.
3032
67f10d28
GA
30332021-03-04 Richard Biener <rguenther@suse.de>
3034
3035 * c-pretty-print.c (c_pretty_printer::direct_abstract_declarator):
3036 Handle ERROR_MARK.
3037
30382021-03-04 Jakub Jelinek <jakub@redhat.com>
3039
3040 PR c/99325
3041 * c-ppoutput.c (print): Change src_line type from int to unsigned.
3042 (token_streamer::stream) Likewise.
3043 (maybe_print_line_1): Likewise. Don't strcmp src_file if src_loc is
3044 UNKNOWN_LOCATION.
3045
f3641ac7
GA
30462021-03-03 Jakub Jelinek <jakub@redhat.com>
3047
3048 PR c/99324
3049 * c-common.c (build_va_arg): Call c_common_mark_addressable_vec
3050 instead of mark_addressable. Fix a comment typo -
3051 neutrallly -> neutrally.
3052
2c83c3fb
GA
30532021-02-28 Jakub Jelinek <jakub@redhat.com>
3054
3055 PR c/99304
3056 * c-attribs.c (handle_malloc_attribute): Fix a typo in inform
3057 message - refernced -> referenced. Remove superfluous space before
3058 closing paren of function calls.
3059
daa68844
GA
30602021-02-25 Nathan Sidwell <nathan@acm.org>
3061
3062 PR c++/99166
3063 * c.opt (-flang-info-module-cmi): Renamed option.
3064
50352c6c
GA
30652021-02-19 Nathan Sidwell <nathan@acm.org>
3066
3067 * c.opt (flang-info-module-read, flang-info-module-read=): New.
3068
bf81237e
GA
30692021-02-18 H.J. Lu <hjl.tools@gmail.com>
3070
3071 PR target/99113
3072 * c-attribs.c (c_common_attribute_table): Add the "retain"
3073 attribute.
3074 (handle_retain_attribute): New function.
3075
0e804ce3
GA
30762021-02-16 Marek Polacek <polacek@redhat.com>
3077
3078 PR c++/99062
3079 * c-attribs.c (handle_assume_aligned_attribute): Check that the
3080 alignment argument is non-negative. Tweak a warning message.
3081
fab095da
GA
30822021-02-12 Martin Sebor <msebor@redhat.com>
3083
3084 PR c/99055
3085 * c-warn.c (warn_parm_array_mismatch): Free strings returned from
3086 print_generic_expr_to_str.
3087
4b37c3ea
GA
30882021-02-10 Richard Biener <rguenther@suse.de>
3089
3090 * c-common.c (parse_optimize_options): Free decoded_options.
3091
a19dd5e6
GA
30922021-02-04 emsr <3dw4rd@verizon.net>
3093
3094 * c-cppbuiltin.c (c_cpp_builtins): __cpp_size_t_suffix=202011L.
3095
9faaa807
GA
30962021-02-03 Ed Smith-Rowland <3dw4rd@verizon.net>
3097
3098 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_size_t_suffix.
3099 * c-lex.c (interpret_integer): Set node type for size literal.
3100
85d04a2e
GA
31012021-01-28 Jakub Jelinek <jakub@redhat.com>
3102
3103 * c.opt (-std=c++2a, -std=c++20, -std=gnu++2a, -std=gnu++20): Remove
3104 draft from description.
3105 (-std=c++2b): Fix a pasto, 2020 -> 2023.
3106
e62bb7f0
GA
31072021-01-26 Paul Fee <paul.f.fee@gmail.com>
3108
3109 * c-common.h (cxx_dialect): Add cxx23 as a dialect.
3110 * c.opt: Add options for -std=c++23, std=c++2b, -std=gnu++23
3111 and -std=gnu++2b
3112 * c-opts.c (set_std_cxx23): New.
3113 (c_common_handle_option): Set options when -std=c++23 is enabled.
3114 (c_common_post_options): Adjust comments.
3115 (set_std_cxx20): Likewise.
3116
161e4c08
GA
31172021-01-25 Martin Sebor <msebor@redhat.com>
3118
3119 PR c++/98646
3120 * c-common.c (check_nonnull_arg): Adjust warning text.
3121
4c9bcd5c
GA
31222021-01-17 Martin Sebor <msebor@redhat.com>
3123
3124 * c-pretty-print.c (c_pretty_printer::primary_expression): Don't
3125 assume SSA_NAME_IDENTIFIER evaluates to nonzero.
3126
59cf67d1
GA
31272021-01-16 Kwok Cheung Yeung <kcy@codesourcery.com>
3128
3129 * c-pragma.h (pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_DETACH.
3130 Redefine PRAGMA_OACC_CLAUSE_DETACH.
3131
2f7f0d32
GA
31322021-01-15 Jakub Jelinek <jakub@redhat.com>
3133
3134 PR tree-optimization/98597
3135 * c-pretty-print.c: Include options.h.
3136 (c_fold_indirect_ref_for_warn): New function.
3137 (print_mem_ref): Use it. If it returns something that has compatible
3138 type and is TBAA compatible with zero offset, print it and return,
3139 otherwise print it using offsetof syntax or array ref syntax. Fix up
3140 printing if MEM_REFs first operand is ADDR_EXPR, or when the first
3141 argument has pointer to array type. Print pointers using the standard
3142 formatting.
3143
6851dda2
GA
31442021-01-12 Martin Sebor <msebor@redhat.com>
3145
3146 PR c/98597
3147 PR c/98592
3148 * c-pretty-print.c (print_mem_ref): Avoid assuming MEM_REF operand
3149 has pointer type. Remove redundant code. Avoid calling
3150 gimple_canonical_types_compatible_p.
3151
7d187e4f
GA
31522021-01-07 Martin Sebor <msebor@redhat.com>
3153
3154 PR middle-end/98578
3155 * c-pretty-print.c (print_mem_ref): Strip array from access type.
3156 Avoid assuming acces type's size is constant. Correct condition
3157 guarding the printing of a parenthesis.
3158
942ae5be
GA
31592021-01-06 Martin Sebor <msebor@redhat.com>
3160
3161 PR c++/95768
3162 * c-pretty-print.c (c_pretty_printer::primary_expression): For
3163 SSA_NAMEs print VLA names and GIMPLE defining statements.
3164 (print_mem_ref): New function.
3165 (c_pretty_printer::unary_expression): Call it.
3166
31672021-01-06 Richard Biener <rguenther@suse.de>
3168
3169 PR tree-optimization/95582
3170 * c-attribs.c (c_common_attribute_table): Add entry for
3171 signed_bool_precision.
3172 (handle_signed_bool_precision_attribute): New.
3173
8daa719b
GA
31742020-12-24 Iain Sandoe <iain@sandoe.co.uk>
3175
3176 * c.opt: Add -stdlib= option and enumerations for
3177 libstdc++ and libc++.
3178
eefe499f
GA
31792020-12-16 Martin Liska <mliska@suse.cz>
3180
3181 * c.opt: Remove usage of Report.
3182
d52945ce
GA
31832020-12-14 Martin Sebor <msebor@redhat.com>
3184
3185 PR middle-end/98166
3186 PR c++/57111
3187 PR middle-end/98160
3188 * c-attribs.c (maybe_add_noinline): New function.
3189 (handle_malloc_attribute): Call it. Use ATTR_FLAG_INTERNAL.
3190 Implicitly add attribute noinline to functions not declared inline
3191 and warn on those.
3192
ca2bd949
GA
31932020-12-09 Tobias Burnus <tobias@codesourcery.com>
3194
3195 * c-pragma.c (omp_pragmas): Add 'allocate'.
3196 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_ALLOCATE.
3197
f6e8e279
GA
31982020-12-08 Jakub Jelinek <jakub@redhat.com>
3199
3200 PR c++/98187
3201 * c-pragma.c (omp_pragmas): Remove "master".
3202 (omp_pragmas_simd): Add "master".
3203
bc8a7013
GA
32042020-12-07 Marek Polacek <polacek@redhat.com>
3205
3206 PR c++/98126
3207 * c-common.c (verify_tree_lim_r): New function.
3208 (verify_sequence_points): Use it. Use nullptr instead of 0.
3209
b8dd0ef7
GA
32102020-12-03 Martin Sebor <msebor@redhat.com>
3211
3212 PR c++/90629
3213 PR middle-end/94527
3214 * c-attribs.c (handle_dealloc_attribute): New function.
3215 (handle_malloc_attribute): Handle argument forms of attribute.
3216 * c.opt (-Wmismatched-dealloc): New option.
3217 (-Wmismatched-new-delete): New option.
3218
32192020-12-03 Jakub Jelinek <jakub@redhat.com>
3220
3221 PR libstdc++/93121
3222 * c-common.h (enum rid): Add RID_BUILTIN_BIT_CAST.
3223 * c-common.c (c_common_reswords): Add __builtin_bit_cast.
3224
e0f5e792
GA
32252020-12-01 JeanHeyd Meneide <phdofthehouse@gmail.com>
3226
3227 * c-cppbuiltin.c (c_cpp_builtins): Add predefined
3228 {__GNUC_EXECUTION_CHARSET_NAME} and
3229 _WIDE_EXECUTION_CHARSET_NAME} macros.
3230
32312020-12-01 Nathan Sidwell <nathan@acm.org>
3232
3233 * c-common.c (module, import, export): New internal tokens (with
3234 trailing space).
3235 * c-common.h (RID__MODULE, RID__IMPORT & RID__EXPORT): Enumerate
3236 them.
3237 (D_CXX_MODULES, D_CXX_MODULES_FLAGS): Enable them.
3238 * c-cppbuiltin.c (c_cpp_builtins): Feature macro.
3239
32402020-12-01 Nathan Sidwell <nathan@acm.org>
3241
3242 * c-opts.c (c_common_init_options): Ask for module dependencies.
3243 (c_common_handle_option): Handle -Mmodules -Mno-modules.
3244 * c-pch.c (c_common_valid_pch): ... does not play with C++
3245 modules.
3246 * c.opt (Mmodules, Mno-modules): New preprocessor dependency
3247 options.
3248 (fmodules-ts, fmodule-header, fmodule-implicit-inline)
3249 (fmodule-only, fmodule-mapper, fmodule-lazy)
3250 (fmodule-version-ignore, Winvalid-imported-macros)
3251 (flang-info-include-translate, flang-info-include-translate-not):
3252 New options
3253
5fbf0ecb
GA
32542020-11-28 Eric Botcazou <ebotcazou@adacore.com>
3255
3256 * c-ada-spec.c (dump_nested_type) <RECORD_TYPE>: Remove obsolete code.
3257 (dump_ada_structure): Also deal with convention, unchecked union and
3258 bit-field for nested types. In the latter case, print an Alignment
3259 aspect along with the Pack aspect.
3260
360258da
GA
32612020-11-25 Martin Sebor <msebor@redhat.com>
3262
3263 PR bootstrap/94982
3264 * c-attribs.c (handle_patchable_function_entry_attribute): Avoid
3265 -Wformat-diag.
3266
1e2c9a27
GA
32672020-11-24 Martin Sebor <msebor@redhat.com>
3268
3269 * c-warn.c (warn_parm_array_mismatch): Avoid invalid redeclarations.
3270
8e6198d0
GA
32712020-11-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
3272
3273 * c-attribs.c (handle_special_var_sec_attribute): New.
3274 (handle_noinit_attribute): Remove.
3275 (attr_noinit_exclusions): Rename to...
3276 (attr_section_exclusions): ...this, and add "persistent" attribute
3277 exclusion.
3278 (c_common_attribute_table): Add "persistent" attribute.
3279
7a97e2fc
GA
32802020-11-21 Aaron Sawdey <acsawdey@linux.ibm.com>
3281
3282 * c-pretty-print.c (c_pretty_printer::simple_type_specifier):
3283 Treat opaque types like other types.
3284 (c_pretty_printer::direct_abstract_declarator): Opaque types are
3285 supported types.
3286
82e5048e
GA
32872020-11-20 Martin Sebor <msebor@redhat.com>
3288
3289 * c-warn.c (warn_parm_array_mismatch): Bail on invalid redeclarations
3290 with fewer arguments.
3291
32922020-11-20 Martin Sebor <msebor@redhat.com>
3293
3294 PR middle-end/97879
3295 * c-attribs.c (handle_access_attribute): Handle ATTR_FLAG_INTERNAL.
3296 Error out on invalid modes.
3297
32982020-11-20 Jakub Jelinek <jakub@redhat.com>
3299
3300 PR libstdc++/88101
3301 * c-common.c (check_builtin_function_arguments): Handle
3302 BUILT_IN_CLEAR_PADDING.
3303
25bb75f8
GA
33042020-11-18 Nathan Sidwell <nathan@acm.org>
3305
3306 * c-lex.c (c_lex_with_flags): CPP_HEADER_NAMEs can now be seen.
3307
4dabb037
GA
33082020-11-17 Nathan Sidwell <nathan@acm.org>
3309
3310 * c-common.h (enum c_tree_index): Reorder to place lazy fields
3311 after newly-added CTI_MODULE_HWM.
3312
33132020-11-17 Joseph Myers <joseph@codesourcery.com>
3314
3315 * c-cppbuiltin.c (builtin_define_float_constants): Define
3316 "*_IS_IEC_60559__" macros.
3317
33182020-11-17 Nathan Sidwell <nathan@acm.org>
3319
3320 * c-lex.c: #include "langhooks.h".
3321 (cb_undef): Maybe call preprocess_undef lang hook.
3322 * c-opts.c (c_common_post_options): Maybe call preprocess_options
3323 lang hook.
3324 (push_command_line_include): Maybe call preprocess_main_file lang
3325 hook.
3326 (cb_file_change): Likewise.
3327 * c-ppoutput.c: #include "langhooks.h.
3328 (scan_translation_unit): Maybe call preprocess_token lang hook.
3329 (class do_streamer): New, derive from token_streamer.
3330 (directives_only_cb): Data pointer is do_streamer, call
3331 preprocess_token lang hook.
3332 (scan_translation_unit_directives_only): Use do_streamer.
3333 (print_line_1): Move src_line recording to after string output.
3334 (cb_undef): Maybe call preprocess_undef lang hook.
3335
33362020-11-17 Nathan Sidwell <nathan@acm.org>
3337
3338 * c-ppoutput.c (scan_translation_unit): Use token_streamer, remove
3339 code duplicating that functionality.
3340
33412020-11-17 Jakub Jelinek <jakub@redhat.com>
3342
3343 PR c/90628
3344 * c-common.c (check_builtin_function_arguments)
3345 <case BUILT_IN_ADD_OVERFLOW>: Diagnose when last argument is pointer
3346 to _Atomic. For the TYPE_READONLY case, adjust message to be usable
3347 for more builtins and argument positions.
3348
29c5d9ce
GA
33492020-11-16 Iain Sandoe <iain@sandoe.co.uk>
3350
3351 PR objc/97854
3352 * stub-objc.c: Include c-common.h to declare enum rid.
3353
77f67db2
GA
33542020-11-13 Jakub Jelinek <jakub@redhat.com>
3355
3356 PR c++/63287
3357 * c-cppbuiltin.c: Include configargs.h.
3358 (c_cpp_builtins): For C++11 and later if THREAD_MODEL_SPEC is not
3359 defined, predefine __STDCPP_THREADS__ to 1 unless thread_model is
3360 "single".
3361
33622020-11-13 Gergö Barany <gergo@codesourcery.com>
3363 Thomas Schwinge <thomas@codesourcery.com>
3364
3365 * c.opt (fopenacc-kernels): Add.
3366
33672020-11-13 Jason Merrill <jason@redhat.com>
3368
3369 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_using_enum.
3370
33712020-11-13 Piotr H. Dabrowski <phd@phd.re>
3372
3373 PR c++/91318
3374 * c-cppbuiltin.c: c_cpp_builtins_optimize_pragma(): use cpp_define_unused()
3375
33762020-11-13 Martin Liska <mliska@suse.cz>
3377
3378 * c-attribs.c (build_attr_access_from_parms): Format properly.
3379
33802020-11-13 Iain Sandoe <iain@sandoe.co.uk>
3381
3382 PR objc/90707
3383 * c-common.c (c_common_reswords): null_unspecified, nullable,
3384 nonnull, null_resettable: New keywords.
3385 * c-common.h (enum rid): RID_NULL_UNSPECIFIED, RID_NULLABLE,
3386 RID_NONNULL, RID_NULL_RESETTABLE: New.
3387 (OBJC_IS_PATTR_KEYWORD): Include nullability keywords in the
3388 ranges accepted for property attributes.
3389 * c-attribs.c (handle_objc_nullability_attribute): New.
3390 * c-objc.h (enum objc_property_attribute_group): Add
3391 OBJC_PROPATTR_GROUP_NULLABLE.
3392 (enum objc_property_attribute_kind):Add
3393 OBJC_PROPERTY_ATTR_NULL_UNSPECIFIED, OBJC_PROPERTY_ATTR_NULLABLE,
3394 OBJC_PROPERTY_ATTR_NONNULL, OBJC_PROPERTY_ATTR_NULL_RESETTABLE.
3395
33962020-11-13 Iain Sandoe <iain@sandoe.co.uk>
3397
3398 PR objc/77404
3399 * c-attribs.c (handle_objc_root_class_attribute): New
3400 * c-objc.h (objc_start_class_interface): Add a location
3401 value for the position of the class name.
3402 * c.opt: Add Wobjc-root-class.
3403 * stub-objc.c (objc_start_class_interface): Add a location
3404 value for the position of the class name.
3405
a5a11525
GA
34062020-11-12 Joseph Myers <joseph@codesourcery.com>
3407
3408 * c-lex.c (c_common_has_attribute): Take argument std_syntax.
3409 Allow scope for C. Handle standard attributes for C. Do not
3410 accept unscoped attributes if std_syntax and not handled as
3411 standard attributes.
3412 * c-common.h (c_common_has_attribute): Update prototype.
3413
34142020-11-12 Nicholas Guriev <guriev-ns@ya.ru>
3415
3416 PR pch/86674
3417 * c-pch.c (c_common_valid_pch): Use cpp_warning with CPP_W_INVALID_PCH
3418 reason to fix -Werror=invalid-pch and -Wno-error=invalid-pch switches.
3419
0f5f9ed5
GA
34202020-11-11 Patrick Palka <ppalka@redhat.com>
3421
3422 PR c++/88115
3423 * c-opts.c (c_common_post_options): Update latest_abi_version.
3424
bb622641
GA
34252020-11-10 Jakub Jelinek <jakub@redhat.com>
3426
3427 PR c/97748
3428 * c-common.h (warn_if_unused_value): Add quiet argument defaulted
3429 to false.
3430 * c-warn.c (warn_if_unused_value): Likewise. Pass it down
3431 recursively and just return true instead of warning if it is true.
3432 Handle COMPLEX_EXPR.
3433
34342020-11-10 Chung-Lin Tang <cltang@codesourcery.com>
3435
3436 * c-common.h (c_omp_adjust_map_clauses): New declaration.
3437 * c-omp.c (struct map_clause): Helper type for c_omp_adjust_map_clauses.
3438 (c_omp_adjust_map_clauses): New function.
3439
2bee28dd
GA
34402020-11-09 Marek Polacek <polacek@redhat.com>
3441
3442 DR 1914
3443 * c-common.c (attribute_fallthrough_p): Tweak the warning
3444 message.
3445
34462020-11-09 Patrick Palka <ppalka@redhat.com>
3447
3448 * c-pragma.c (handle_pragma_diagnostic): Split the
3449 unknown-option -Wpragmas diagnostic into a warning and a
3450 subsequent note containing a spelling suggestion. Avoid
3451 computing the suggestion if -Wpragmas warnings are being
3452 suppressed.
3453
34542020-11-09 Patrick Palka <ppalka@redhat.com>
3455
3456 PR testsuite/97117
3457 * c-indentation.c (get_visual_column): Remove location_t
3458 parameter. Move the column-tracking diagnostic code from here
3459 to ...
3460 (should_warn_for_misleading_indentation): ... here, before the
3461 early exit for when the loci are not all distinct. Don't pass a
3462 location_t argument to get_visual_column.
3463 (assert_get_visual_column_succeeds): Don't pass a location_t
3464 argument to get_visual_column.
3465 (assert_get_visual_column_fails): Likewise.
3466
fb95de7a
GA
34672020-11-08 Iain Sandoe <iain@sandoe.co.uk>
3468
3469 * c-common.h (OBJC_IS_PATTR_KEYWORD): Add class to the list
3470 of keywords accepted in @property attribute contexts.
3471 * c-objc.h (enum objc_property_attribute_group): Add
3472 OBJC_PROPATTR_GROUP_CLASS.
3473 (enum objc_property_attribute_kind): Add
3474 OBJC_PROPERTY_ATTR_CLASS.
3475
2da7ee05
GA
34762020-11-07 Iain Sandoe <iain@sandoe.co.uk>
3477
3478 * c-common.c (c_common_reswords): Add 'atomic' property
3479 attribute.
3480 * c-common.h (enum rid): Add RID_PROPATOMIC for atomic
3481 property attributes.
3482
34832020-11-07 Iain Sandoe <iain@sandoe.co.uk>
3484
3485 * c-attribs.c (handle_nsobject_attribute): New.
3486 * c.opt: Add WNSObject-attribute.
3487
44cab2d8
GA
34882020-11-06 Iain Sandoe <iain@sandoe.co.uk>
3489
3490 * c-objc.h (enum objc_property_attribute_group): New
3491 (enum objc_property_attribute_kind): New.
3492 (OBJC_PROPATTR_GROUP_MASK): New.
3493 (struct property_attribute_info): Small class encapsulating
3494 parser output from property attributes.
3495 (objc_prop_attr_kind_for_rid): New
3496 (objc_add_property_declaration): Simplify interface.
3497 * stub-objc.c (enum rid): Dummy type.
3498 (objc_add_property_declaration): Simplify interface.
3499 (objc_prop_attr_kind_for_rid): New.
3500
35012020-11-06 Nathan Sidwell <nathan@acm.org>
3502
3503 * c-ada-spec.c (collect_ada_nodes): Rename
3504 DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
3505 (collect_ada_node): Likewise.
3506 (dump_forward_type): Likewise.
3507 * c-common.c (set_underlying_type): Rename
3508 DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
3509 (user_facing_original_type, c_common_finalize_early_debug): Likewise.
3510
35112020-11-06 Jakub Jelinek <jakub@redhat.com>
3512
3513 * c-common.c (verify_sequence_points): Remove DEBUG_FUNCTION.
3514
0cfd9109
GA
35152020-11-05 Marek Polacek <polacek@redhat.com>
3516
3517 PR c++/97675
3518 * c.opt (Wexceptions): New option.
3519
35202020-11-05 Marek Polacek <polacek@redhat.com>
3521
3522 PR c++/25814
3523 * c.opt (Wvexing-parse): New option.
3524
35c125cb
GA
35252020-11-04 Jakub Jelinek <jakub@redhat.com>
3526
3527 PR c++/97670
3528 * c-omp.c (c_omp_split_clauses): Look through array reductions to find
3529 underlying decl to clear in the allocate_head bitmap.
3530
35312020-11-04 Iain Sandoe <iain@sandoe.co.uk>
3532
3533 * c-objc.h (objc_non_constant_expr_p): New.
3534 * stub-objc.c (objc_non_constant_expr_p): New.
3535
fd2325ea
GA
35362020-11-03 Nathan Sidwell <nathan@acm.org>
3537
3538 * c.opt (MQ,MT): Reword description to be make-agnostic.
3539
88ce3d5f
GA
35402020-11-02 Nathan Sidwell <nathan@acm.org>
3541
3542 * c-opts.c (c_common_post_options): Move var decl to its
3543 initialization point.
3544
35452020-11-01 Iain Sandoe <iain@sandoe.co.uk>
3546
3547 * c-lex.c (c_lex_with_flags): When combining '@' with a
3548 keyword for Objective-C, combine the location ranges too.
3549
35502020-10-30 Qing Zhao <qing.zhao@oracle.com>
3551 H.J.Lu <hjl.tools@gmail.com>
3552
3553 * c-attribs.c (c_common_attribute_table): Add new attribute
3554 zero_call_used_regs.
3555 (handle_zero_call_used_regs_attribute): New function.
3556
e93aae4a
GA
35572020-10-28 Marek Polacek <polacek@redhat.com>
3558
3559 PR c++/97573
3560 * c-opts.c (c_common_post_options): In C++20, turn on
3561 -Wdeprecated-enum-enum-conversion and
3562 -Wdeprecated-enum-float-conversion.
3563 * c.opt (Wdeprecated-enum-enum-conversion,
3564 Wdeprecated-enum-float-conversion): New options.
3565 (Wenum-conversion): Allow for C++ too.
3566
35672020-10-28 Jakub Jelinek <jakub@redhat.com>
3568
3569 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ALLOCATE.
3570 * c-omp.c: Include bitmap.h.
3571 (c_omp_split_clauses): Handle OMP_CLAUSE_ALLOCATE.
3572
f19e7c8d
GA
35732020-10-26 Ville Voutilainen <ville.voutilainen@gmail.com>
3574
3575 * c-common.c (__is_nothrow_assignable): New.
3576 (__is_nothrow_constructible): Likewise.
3577 * c-common.h (RID_IS_NOTHROW_ASSIGNABLE): New.
3578 (RID_IS_NOTHROW_CONSTRUCTIBLE): Likewise.
3579
efe71fcc
GA
35802020-10-23 Jan Hubicka <hubicka@ucw.cz>
3581
3582 * c-common.c (c_common_finalize_early_debug): Update for new thunk api.
3583
35842020-10-23 Marek Polacek <polacek@redhat.com>
3585
3586 PR c++/91741
3587 * c-common.c (verify_tree): Handle PAREN_SIZEOF_EXPR.
3588 (c_common_init_ts): Likewise.
3589 * c-common.def (PAREN_SIZEOF_EXPR): New tree code.
3590 * c-common.h (maybe_warn_sizeof_array_div): Declare.
3591 * c-warn.c (sizeof_pointer_memaccess_warning): Unwrap NOP_EXPRs.
3592 (maybe_warn_sizeof_array_div): New function.
3593 * c.opt (Wsizeof-array-div): New option.
3594
35952020-10-23 Martin Sebor <msebor@redhat.com>
3596
3597 PR c/97463
3598 * c-warn.c (warn_parm_ptrarray_mismatch): Move null test earlier.
3599
56ddd5e2
GA
36002020-10-22 Martin Liska <mliska@suse.cz>
3601
3602 PR c/94722
3603 * c-attribs.c (handle_no_stack_protect_function_attribute): New.
3604 (handle_stack_protect_attribute): Add error message for a
3605 no_stack_protector function.
3606
36072020-10-22 Martin Liska <mliska@suse.cz>
3608
3609 * c-cppbuiltin.c (c_cpp_builtins): Use the stack_protector enum.
3610
36112020-10-22 Jan Hubicka <hubicka@ucw.cz>
3612
3613 * c-gimplify.c: Include tree-nested.h
3614 (c_genericize): Update for new nested function info.
3615
b2698c21
GA
36162020-10-14 Martin Sebor <msebor@redhat.com>
3617
3618 PR c/97413
3619 * c-attribs.c (build_attr_access_from_parms): Wrap chain of VLA
3620 bounds in an extra list.
3621
7e9282ae
GA
36222020-10-05 Richard Biener <rguenther@suse.de>
3623 Jakub Jelinek <jakub@redhat.com>
3624
3625 PR c++/97197
3626 * c-pretty-print.c: Include langhooks.h.
3627 (c_pretty_printer::postfix_expression): Handle TARGET_MEM_REF as
3628 expression.
3629 (c_pretty_printer::expression): Handle TARGET_MEM_REF as
3630 unary_expression.
3631 (c_pretty_printer::unary_expression): Handle TARGET_MEM_REF.
3632
660bfe61
GA
36332020-09-30 Martin Sebor <msebor@redhat.com>
3634
3635 PR middle-end/97189
3636 * c-attribs.c (append_access_attr): Use the function declaration
3637 location for a warning about an attribute access argument.
3638
93bca37c
GA
36392020-09-29 Marek Polacek <polacek@redhat.com>
3640
3641 PR c++/94695
3642 * c.opt (Wrange-loop-construct): New option.
3643
82b77dee
GA
36442020-09-23 Martin Sebor <msebor@redhat.com>
3645
3646 PR c/97131
3647 * c-warn.c (warn_parm_ptrarray_mismatch): Handle more invalid input.
3648
36492020-09-23 Marek Polacek <polacek@redhat.com>
3650
3651 PR c/97125
3652 * c-gimplify.c (c_genericize): Only call do_warn_duplicated_branches_r
3653 after loops and other structured control constructs have been lowered.
3654
521d2711
GA
36552020-09-22 Jakub Jelinek <jakub@redhat.com>
3656
3657 * c.opt (Wbuiltin-declaration-mismatch): Fix typo in variable name:
3658 warn_builtin_declaraion_mismatch -> warn_builtin_declaration_mismatch.
3659
44135373
GA
36602020-09-21 Marek Polacek <polacek@redhat.com>
3661
3662 * c.opt (Wctad-maybe-unsupported): New option.
3663
2fe5b7d1
GA
36642020-09-19 Martin Sebor <msebor@redhat.com>
3665
3666 PR c/50584
3667 * c-common.h (warn_parm_array_mismatch): Declare new function.
3668 (has_attribute): Move declaration of an existing function.
3669 (build_attr_access_from_parms): Declare new function.
3670 * c-warn.c (parm_array_as_string): Define new function.
3671 (plus_one): Define new function.
3672 (warn_parm_ptrarray_mismatch): Define new function.
3673 (warn_parm_array_mismatch): Define new function.
3674 (vla_bound_parm_decl): New function.
3675 * c.opt (-Warray-parameter, -Wvla-parameter): New options.
3676 * c-pretty-print.c (pp_c_type_qualifier_list): Don't print array type
3677 qualifiers here...
3678 (c_pretty_printer::direct_abstract_declarator): ...but instead print
3679 them in brackets here. Also print [static]. Strip extraneous
3680 expressions from VLA bounds.
3681
36822020-09-19 Martin Sebor <msebor@redhat.com>
3683
3684 PR c/50584
3685 * c-attribs.c (c_common_attribute_table): Add "arg spec" attribute.
3686 (handle_argspec_attribute): New function.
3687 (get_argument, get_argument_type): New functions.
3688 (append_access_attrs): Add overload. Handle internal attribute
3689 representation in addition to external.
3690 (handle_access_attribute): Handle internal attribute representation
3691 in addition to external.
3692 (build_attr_access_from_parms): New function.
3693
36942020-09-19 Sandra Loosemore <sandra@codesourcery.com>
3695
3696 * c-gimplify.c (genericize_c_loop): Rewrite to match
3697 c_finish_loop in c-typeck.c.
3698
36992020-09-19 Sandra Loosemore <sandra@codesourcery.com>
3700
3701 * c-common.c (c_block_may_fallthrough): New, split from
3702 cxx_block_may_fallthrough in the cp front end.
3703 (c_common_init_ts): Move handling of loop and switch-related
3704 statements here from the cp front end.
3705 * c-common.def (FOR_STMT, WHILE_STMT, DO_STMT): Move here from
3706 cp front end.
3707 (BREAK_STMT, CONTINUE_STMT, SWITCH_STMT): Likewise.
3708 * c-common.h (c_block_may_fallthru): Declare.
3709 (bc_state_t): Move here from cp front end.
3710 (save_bc_state, restore_bc_state): Declare.
3711 (c_genericize_control_stmt): Declare.
3712 (WHILE_COND, WHILE_BODY): Likewise.
3713 (DO_COND, DO_BODY): Likewise.
3714 (FOR_INIT_STMT, FOR_COND, FOR_EXPR, FOR_BODY, FOR_SCOPE): Likewise.
3715 (SWITCH_STMT_COND, SWITCH_STMT_BODY): Likewise.
3716 (SWITCH_STMT_TYPE, SWITCH_STMT_SCOPE): Likewise.
3717 (SWITCH_STMT_ALL_CASES_P, SWITCH_STMT_NO_BREAK_P): Likewise.
3718 (LABEL_DECL_BREAK, LABEL_DECL_CONTINUE): Likewise.
3719 * c-dump.c (dump_stmt): Copy from cp front end.
3720 (c_dump_tree): Move code to handle structured loop and switch
3721 tree nodes here from cp front end.
3722 * c-gimplify.c: Adjust includes.
3723 (enum bc_t, bc_label, begin_bc_block, finish_bc_block): Move from
3724 cp front end.
3725 (save_bc_state, restore_bc_state): New functions using old code
3726 from cp front end.
3727 (get_bc_label, expr_loc_or_loc): Move from cp front end.
3728 (genericize_c_loop): Move from cp front end.
3729 (genericize_for_stmt, genericize_while_stmt): Likewise.
3730 (genericize_do_stmt, genericize_switch_stmt): Likewise.
3731 (genericize_continue_stmt, genericize_break_stmt): Likewise.
3732 (genericize_omp_for_stmt): Likewise.
3733 (c_genericize_control_stmt): New function using code split from
3734 cp front end.
3735 (c_genericize_control_r): New.
3736 (c_genericize): Call walk_tree with c_genericize_control_r.
3737 * c-pretty-print.c (c_pretty_printer::statement): Move code to handle
3738 structured loop and switch tree nodes here from cp front end.
3739
2aad20c0
GA
37402020-09-17 Patrick Palka <ppalka@redhat.com>
3741
3742 PR c/80076
3743 * c-indentation.c (should_warn_for_misleading_indentation): Move
3744 declarations of local variables closer to their first use.
3745 Handle virtual token locations by resolving them to their
3746 respective macro expansion points. If all three tokens are
3747 produced from the same macro expansion, then instead use their
3748 loci within the macro definition.
3749
ecde1b0a
GA
37502020-09-16 Martin Sebor <msebor@redhat.com>
3751
3752 PR c/78666
3753 PR c/96126
3754 * c-attribs.c (validate_attr_args): New function.
3755 (validate_attr_arg): Same.
3756 (handle_section_attribute): Call it. Introduce a local variable.
3757 (handle_alloc_size_attribute): Same.
3758 (handle_alloc_align_attribute): Same.
3759
50a71cd0
GA
37602020-09-14 Jakub Jelinek <jakub@redhat.com>
3761
3762 * c-attribs.c (handle_optimize_attribute): Adjust
3763 cl_optimization_save, cl_optimization_restore and
3764 build_optimization_node callers.
3765 * c-pragma.c (handle_pragma_optimize): Adjust
3766 build_optimization_node caller.
3767 (handle_pragma_push_options): Adjust
3768 build_optimization_node and build_target_option_node callers.
3769 (handle_pragma_pop_options, handle_pragma_reset_options):
3770 Adjust cl_optimization_restore callers.
3771
8f7ea26a
GA
37722020-08-28 Martin Sebor <msebor@redhat.com>
3773
3774 * c.opt (Wstringop-overread): New option.
3775
a6493809
GA
37762020-08-11 Jakub Jelinek <jakub@redhat.com>
3777
3778 PR c/96545
3779 * c-common.c (get_atomic_generic_size): Require that first argument's
3780 type points to a complete type and use tree_fits_uhwi_p instead of
3781 just INTEGER_CST TREE_CODE check for the TYPE_SIZE_UNIT.
3782
48cc2e46
GA
37832020-07-31 Martin Sebor <msebor@redhat.com>
3784
3785 PR c++/96003
3786 * c-common.c (check_function_arguments_recurse): Return early when
3787 no-warning bit is set.
3788
37892020-07-31 Richard Biener <rguenther@suse.de>
3790
3791 PR debug/96383
3792 * c-common.h (c_common_finalize_early_debug): Declare.
3793 * c-common.c: Include debug.h.
3794 (c_common_finalize_early_debug): finalize_early_debug langhook
3795 implementation generating debug for extern declarations.
3796
e71dab87
GA
37972020-07-27 Nathan Sidwell <nathan@acm.org>
3798
3799 * c-common.c (try_to_locate_new_include_insertion_point): Use
3800 strcmp, not pointer equality.
3801
ae2e0bc1
GA
38022020-07-25 Martin Sebor <msebor@redhat.com>
3803
3804 PR c++/96310
3805 * c-common.c (check_nonnull_arg): Print note only when warning was
3806 issued.
3807
3ea9abca
GA
38082020-07-22 Tobias Burnus <tobias@codesourcery.com>
3809
3810 * c-omp.c (c_finish_omp_critical): Check for no name but
3811 nonzero hint provided.
3812
0933f508
GA
38132020-07-20 Jason Merrill <jason@redhat.com>
3814
3815 * c-cppbuiltin.c (c_cpp_builtins): Update
3816 __cpp_nontype_template_args for C++20.
3817
38182020-07-20 Martin Sebor <msebor@redhat.com>
3819
3820 PR c/96249
3821 * c.opt: Remove stray text.
3822
8ca07a30
GA
38232020-07-14 Lewis Hyatt <lhyatt@gmail.com>
3824
3825 PR other/86904
3826 * c-indentation.c (should_warn_for_misleading_indentation): Get
3827 global tabstop from the new source.
3828 * c-opts.c (c_common_handle_option): Remove handling of -ftabstop, which
3829 is now a common option.
3830 * c.opt: Likewise.
3831
a82c4c4c 38322020-07-08 Eric Botcazou <ebotcazou@adacore.com>
50873cc5
GA
3833
3834 * c.opt (Wscalar-storage-order): Add explicit variable.
3835
f60ee68d
GA
38362020-07-07 Nathan Sidwell <nathan@acm.org>
3837
3838 * c-opts.c (c_common_post_options): Add 'injecting' arg to
3839 cpp_read_main_file.
3840 (c_finish_options): Add linemap_line_start calls for builtin and cmd
3841 maps. Force token position to line_table's highest line.
3842 * c-ppoutput.c (print_line_1): Refactor, print line zero.
3843 (cb_define): Always increment source line.
3844
4077d74c
GA
38452020-07-06 Martin Sebor <msebor@redhat.com>
3846
3847 PR c++/95984
3848 * c-common.c (check_function_nonnull): Avoid checking syntesized calls
3849 to stub lambda objects with null this pointer.
3850 (check_nonnull_arg): Handle C++ nullptr.
3851
b5f24739
GA
38522020-07-02 Jason Merrill <jason@redhat.com>
3853 Jakub Jelinek <jakub@redhat.com>
3854
3855 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_consteval.
3856
46fbb6c6
GA
38572020-06-30 Jakub Jelinek <jakub@redhat.com>
3858
3859 PR c++/95963
3860 * c-common.c (check_function_arguments_recurse): Don't crash on
3861 calls to internal functions.
3862
69273534
GA
38632020-06-28 Martin Sebor <msebor@redhat.com>
3864
3865 PR c++/86568
3866 * c-common.c (struct nonnull_arg_ctx): Add members.
3867 (check_function_nonnull): Use nonnull_arg_ctx as argument. Handle
3868 C++ member functions specially. Consider the this pointer implicitly
3869 nonnull.
3870 (check_nonnull_arg): Use location of argument when available.
3871 (check_function_arguments): Use nonnull_arg_ctx as argument.
3872
9a33c41f
GA
38732020-06-27 Jakub Jelinek <jakub@redhat.com>
3874
3875 PR middle-end/95903
3876 * c-common.c (pointer_int_sum): Use TYPE_OVERFLOW_UNDEFINED instead of
3877 !TYPE_UNSIGNED check to see if we can apply distributive law and handle
3878 smaller precision intop operands separately.
3879
c9c05f73
GA
38802020-06-26 Marek Polacek <polacek@redhat.com>
3881
3882 * c-opts.c (c_common_init_options): Default to gnu++17.
3883
aff95ee7
GA
38842020-06-17 Jonathan Wakely <jwakely@redhat.com>
3885
bd0a89dc 3886 PR c/95378
aff95ee7
GA
3887 * c-common.c (get_atomic_generic_size): Check cv-qualifiers in
3888 pointer arguments.
3889
56638b9b
GA
38902020-06-16 Jakub Jelinek <jakub@redhat.com>
3891
3892 * c-common.h (c_omp_check_loop_iv_exprs): Add an int argument.
3893 * c-omp.c (struct c_omp_check_loop_iv_data): Add maybe_nonrect and
3894 idx members.
3895 (c_omp_is_loop_iterator): New function.
3896 (c_omp_check_loop_iv_r): Use it. Add support for silent scanning
3897 if outer loop iterator is present. Perform duplicate checking through
3898 hash_set in the function rather than expecting caller to do that.
3899 Pass NULL instead of d->ppset to walk_tree_1.
3900 (c_omp_check_nonrect_loop_iv): New function.
3901 (c_omp_check_loop_iv): Use it. Fill in new members, allow
3902 non-rectangular loop forms, diagnose multiple associated loops with
3903 the same iterator. Pass NULL instead of &pset to walk_tree_1.
3904 (c_omp_check_loop_iv_exprs): Likewise.
3905
ec6ffbb9
GA
39062020-06-10 Martin Liska <mliska@suse.cz>
3907
3908 PR tree-optimization/92860
3909 * c-attribs.c (handle_optimize_attribute):
3910 Save global options and compare it after parsing of function
3911 attribute.
3912 * c-pragma.c (opt_stack::saved_global_options): New field.
3913 (handle_pragma_push_options): Save global_options.
3914 (handle_pragma_pop_options): Compare them after pop.
3915
b952c2cf
GA
39162020-06-09 Jakub Jelinek <jakub@redhat.com>
3917
3918 PR c/95580
3919 * c-pretty-print.c (c_pretty_printer::unary_expression): Handle the
3920 case when MEM_REF's first argument has type pointer to incomplete type.
3921
1a59f3db
GA
39222020-06-05 Jason Merrill <jason@redhat.com>
3923
3924 * c-pretty-print.c (pp_c_additive_expression): Handle negative
3925 operand to POINTER_PLUS_EXPR.
3926
3add3425
GA
39272020-06-04 Martin Sebor <msebor@redhat.com>
3928
3929 PR middle-end/10138
3930 PR middle-end/95136
3931 * c-attribs.c (append_access_attrs): Handle attr_access::none.
3932 (handle_access_attribute): Same.
3933
9a5b7438
GA
39342020-06-03 Mark Wielaard <mark@klomp.org>
3935
3936 * known-headers.cc (get_cp_stdlib_header_for_string_macro_name):
3937 New function.
3938 * known-headers.h (get_cp_stdlib_header_for_string_macro_name):
3939 New function declaration.
3940
39412020-06-03 Mark Wielaard <mark@klomp.org>
3942
3943 * known-headers.cc (get_string_macro_hint): New function.
3944 (get_stdlib_header_for_name): Use get_string_macro_hint.
3945 (get_c_stdlib_header_for_string_macro_name): New function.
3946 * known-headers.h (get_c_stdlib_header_for_string_macro_name):
3947 New function declaration.
3948
39492020-06-03 Tobias Burnus <tobias@codesourcery.com>
3950
3951 * c-common.h (c_omp_predetermined_mapping): Declare.
3952 * c-omp.c (c_omp_predetermined_mapping): New.
3953
af114c38
MW
39542020-05-22 Mark Wielaard <mark@klomp.org>
3955
3956 * known-headers.cc (get_stdlib_header_for_name): Add a new
3957 stdlib_hint array for stdbool and stdint.
3958
45c50b6a
MW
39592020-05-22 Mark Wielaard <mark@klomp.org>
3960
3961 * known-headers.cc (get_stdlib_header_for_name): Return
3962 "<stdbool.h>" for "bool", "true" or "false" when STDLIB_C and
3963 flag_isoc99.
3964
c22027a0
NS
39652020-05-20 Nathan Sidwell <nathan@acm.org>
3966
38a4db21
NS
3967 * c-common.c (try_to_locate_new_include_insertion_point): Revert change.
3968
c22027a0
NS
3969 * c-common.c (try_to_locate_new_include_insertion_point): Use
3970 strcmp to compare filenames.
3971 * c-lex.c (init_c_lex): Move declaration to initialization.
3972 * c-opts.c (handle_deferred_opts): Move cpp_get_deps call into
3973 deferred count loop.
3974
29f0e90d
JM
39752020-05-15 Jason Merrill <jason@redhat.com>
3976
3977 * c-opts.c (set_std_cxx20): Set flag_coroutines.
3978
b04445d4
JM
39792020-05-13 Jason Merrill <jason@redhat.com>
3980
3981 * c.opt (std=c++20): Make c++2a the alias.
3982 (std=gnu++20): Likewise.
3983 * c-common.h (cxx_dialect): Change cxx2a to cxx20.
3984 * c-opts.c: Adjust.
3985 * c-cppbuiltin.c: Adjust.
3986 * c-ubsan.c: Adjust.
3987 * c-warn.c: Adjust.
3988
11dd3be5
EB
39892020-05-12 Eric Botcazou <ebotcazou@adacore.com>
3990
3991 * c-ada-spec.c (dump_ads): Output pragma Warnings ("U"); on entry.
3992
b224c376
NS
39932020-05-08 Nathan Sidwell <nathan@acm.org>
3994
3995 Reimplement directives only processing.
3996 * c-ppoutput.c (token_streamer): Ne.
3997 (directives_only_cb): New. Swallow ...
3998 (print_lines_directives_only): ... this.
3999 (scan_translation_unit_directives_only): Reimplment using the
4000 published interface.
4001
f1d94677
MP
40022020-05-07 Marek Polacek <polacek@redhat.com>
4003
4004 * c-format.c (badwords): Add "nonstatic".
4005
9b95bb52
JJ
4006202-05-07 Jakub Jelinek <jakub@redhat.com>
4007
4008 PR c/94968
4009 * c-common.c (speculation_safe_value_resolve_params): Return false if
4010 error_operand_p (val2).
4011 (resolve_overloaded_builtin) <case BUILT_IN_SPECULATION_SAFE_VALUE_N>:
4012 Remove extraneous semicolon.
4013
530b4409 40142020-05-06 qing zhao <qing.zhao@oracle.com>
4015
4016 PR c/94230
4017 * c-indentation.c (get_visual_column): Add a hint to use the new
4018 -flarge-source-files option.
4019
b776bdca
SSF
40202020-05-05 Stefan Schulze Frielinghaus <stefansf@linux.ibm.com>
4021
4022 * c-attribs.c (handle_vector_size_attribute): Add attribute
4023 nonnull for argument args in order to silence warning of
4024 uninitialized variable usage. Since this is local to the
4025 compilation unit and thus cannot be checked at call sides by the
4026 compiler, added an assert statement in order to verify this.
4027
6607bdd9
L
40282020-05-01 H.J. Lu <hongjiu.lu@intel.com>
4029
4030 PR target/93492
4031 * c-attribs.c (handle_patchable_function_entry_attribute): Limit
4032 value to USHRT_MAX (65535).
4033
691eeb65
JJ
40342020-04-29 Jakub Jelinek <jakub@redhat.com>
4035
4036 * c-format.c (PP_FORMAT_CHAR_TABLE): Add %{ and %}.
4037
26d76be7
JJ
40382020-04-27 Jakub Jelinek <jakub@redhat.com>
4039
4040 PR c/94755
4041 * c-common.c (resolve_overloaded_builtin): Return error_mark_node for
4042 fncode == BUILT_IN_NONE before initialization of first_param.
4043
7291b2ed
MP
40442020-04-23 Marek Polacek <polacek@redhat.com>
4045
4046 PR c++/94733
4047 * c-attribs.c (find_tm_attribute): Use get_attribute_name instead of
4048 TREE_PURPOSE.
4049
58a29af8
PP
40502020-04-14 Patrick Palka <ppalka@redhat.com>
4051
4052 PR c++/85278
4053 * c-pretty-print.c (pp_c_pointer) <case REFERENCE_TYPE>: Print a double
4054 ampersand if it's an rvalue reference type.
4055
09f04139
MS
40562020-04-13 Martin Sebor <msebor@redhat.com>
4057
4058 PR c/92326
4059 * c-pretty-print.c (c_pretty_printer::direct_abstract_declarator): Avoid
4060 printing array bound for flexible array members.
4061
ee26baf4
IS
40622020-04-13 Iain Sandoe <iain@sandoe.co.uk>
4063
4064 * c-cppbuiltin.c (c_cpp_builtins): Update coroutines builtin
4065 define, per n4861.
4066
75efe9cb
RB
40672020-04-02 Richard Biener <rguenther@suse.de>
4068
4069 PR c/94392
4070 * c-opts.c (c_common_post_options): Enable -ffinite-loops
4071 for -O2 and C++11 or newer.
4072
75defde9
PP
40732020-03-28 Patrick Palka <ppalka@redhat.com>
4074
4075 * c.opt: Add -fconcepts-diagnostics-depth.
4076
52f24a9e
MS
40772020-03-27 Martin Sebor <msebor@redhat.com>
4078
4079 PR c++/94346
4080 * c-attribs.c (handle_copy_attribute): Avoid passing expressions
4081 to decl_attributes. Make handling of different kinds of entities
4082 more robust.
4083
ccacf77b
MS
40842020-03-27 Martin Sebor <msebor@redhat.com>
4085
4086 PR c++/94098
4087 * c-attribs.c (handle_access_attribute): Avoid setting TYPE_ATTRIBUTES
4088 here.
4089
ca6c7225
JJ
40902020-03-23 Jakub Jelinek <jakub@redhat.com>
4091
4092 PR c++/91993
4093 * c-warn.c (warnings_for_convert_and_check): For expr and/or
4094 result being COMPOUND_EXPRs, skip to ultimate rhs.
4095
1aa22b19
RS
40962020-03-20 Richard Sandiford <richard.sandiford@arm.com>
4097
4098 PR middle-end/94072
4099 * c-common.c (c_common_type_for_mode): Before using a registered
4100 built-in type, check that the vectorness of the type matches
4101 the vectorness of the mode.
4102
700d4cb0
JJ
41032020-03-17 Jakub Jelinek <jakub@redhat.com>
4104
4105 * c-common.c (resolve_overloaded_builtin): Fix up duplicated word
4106 issue in a diagnostic message.
4107
b408e010
LH
41082020-03-15 Lewis Hyatt <lhyatt@gmail.com>
4109
4110 * c.opt: Avoid redundancy in the help text.
4111
e78e50d5
MP
41122020-03-02 Marek Polacek <polacek@redhat.com>
4113
4114 PR c++/93958 - add missing -std=gnu++20.
4115 * c.opt: Add -std=gnu++20.
4116
649e1741
MS
41172020-03-01 Martin Sebor <msebor@redhat.com>
4118
4119 PR c++/92721
4120 * c-attribs.c (append_access_attrs): Correctly handle attribute.
4121 (handle_access_attribute): Same.
4122
7b60f3ba
JJ
41232020-02-25 Jakub Jelinek <jakub@redhat.com>
4124
4125 PR c/93858
4126 * c-pragma.c (handle_pragma_diagnostic): Add missing ? after
4127 "did you mean" hint in diagnostics.
4128
fb260504
JM
41292020-02-15 Jason Merrill <jason@redhat.com>
4130
4131 * c.opt: Add -std=c++20.
4132
1d757b09
EB
41332020-02-14 Eric Botcazou <ebotcazou@adacore.com>
4134
4135 * c-ada-spec.c: Include bitmap.h.
4136 (dump_ada_double_name): Rename into...
4137 (dump_anonymous_type_name): ...this. Always use the TYPE_UID.
4138 (dump_ada_array_type): Adjust to above renaming. Robustify.
4139 (dump_nested_types_1): New function copied from... Add dumped_types
4140 parameter and pass it down to dump_nested_type.
4141 (dump_nested_types): ...this. Remove parent parameter. Just call
4142 dump_nested_types_1 on an automatic bitmap.
4143 (dump_nested_type): Add dumped_types parameter.
4144 <ARRAY_TYPE>: Do not dump it if already present in dumped_types.
4145 Adjust recursive calls and adjust to above renaming.
4146 (dump_ada_declaration): Adjust call to dump_nested_types.
4147 Tidy up and adjust to above renaming.
4148 (dump_ada_specs): Initialize and release bitmap obstack.
4149
0cc575e4
MS
41502020-02-10 Martin Sebor <msebor@redhat.com>
4151
4152 PR c/93640
4153 * c-attribs.c (handle_access_attribute): Correct off-by-one mistakes.
4154
a59aa302
JJ
41552020-02-10 Jakub Jelinek <jakub@redhat.com>
4156
4157 PR other/93641
4158 * c-format.c (check_plain): Fix up last argument of strncasecmp.
4159 Remove useless extra test.
4160
e464fc90
TB
41612020-02-03 Julian Brown <julian@codesourcery.com>
4162 Tobias Burnus <tobias@codesourcery.com>
4163
4164 * c-cppbuiltin.c (c_cpp_builtins): Update _OPENACC define to 201711.
4165
e3b6c052
JM
41662020-01-29 Jason Merrill <jason@redhat.com>
4167
4168 PR c++/89357
4169 * c-attribs.c (check_cxx_fundamental_alignment_constraints): Remove.
4170
6d00f052
JM
41712020-01-23 Jason Merrill <jason@redhat.com>
4172
4173 * c-warn.c (conversion_warning): Change -Wsign-conversion handling.
4174
8a990ffa
MS
41752020-01-23 Martin Sebor <msebor@redhat.com>
4176
4177 PR c/84919
4178 * c-common.c (check_function_arguments): Avoid overlap checking
4179 of sprintf functions.
4180
55b7df8b
JM
41812020-01-22 Jason Merrill <jason@redhat.com>
4182
4183 PR testsuite/93391 - PR 40752 test fails with unsigned plain char.
4184 PR c++/40752
4185 * c-warn.c (conversion_warning): Check operands only after checking
4186 the whole expression. Don't check second operand of + for sign.
4187
c77074d0
JM
41882020-01-21 Jason Merrill <jason@redhat.com>
4189 Manuel López-Ibáñez <manu@gcc.gnu.org>
4190
4191 PR c++/40752 - useless -Wconversion with short +=.
4192 * c.opt (-Warith-conversion): New.
4193 * c-warn.c (conversion_warning): Recurse for operands of
4194 operators. Only warn about the whole expression with
4195 -Warith-conversion.
4196
731dbfc3
JM
41972020-01-21 Jason Merrill <jason@redhat.com>
4198
4199 * c-common.c (unsafe_conversion_p): Don't warn, return UNSAFE_SIGN.
4200 * c-warn.c (conversion_warning): Warn about UNSAFE_SIGN.
4201
ad1a3914
NS
42022020-01-20 Nathan Sidwell <nathan@acm.org>
4203
4204 PR preprocessor/80005
4205 * c-cppbuiltins.c (c_cpp_builtins): Don't define __has_include{,_next}.
4206
49789fd0
IS
42072020-01-18 Iain Sandoe <iain@sandoe.co.uk>
4208
4209 * c-common.c (co_await, co_yield, co_return): New.
4210 * c-common.h (RID_CO_AWAIT, RID_CO_YIELD,
4211 RID_CO_RETURN): New enumeration values.
4212 (D_CXX_COROUTINES): Bit to identify coroutines are active.
4213 (D_CXX_COROUTINES_FLAGS): Guard for coroutine keywords.
4214 * c-cppbuiltin.c (__cpp_coroutines): New cpp define.
4215 * c.opt (fcoroutines): New command-line switch.
4216
4bc1899b
DM
42172020-01-10 David Malcolm <dmalcolm@redhat.com>
4218
4219 * c-format.c (local_event_ptr_node): New.
4220 (PP_FORMAT_CHAR_TABLE): Add entry for "%@".
4221 (init_dynamic_diag_info): Initialize local_event_ptr_node.
4222 * c-format.h (T_EVENT_PTR): New define.
4223
f25e33fa
MS
42242020-01-10 Martin Sebor <msebor@redhat.com>
4225
4226 PR c/93132
4227 * c-attribs.c (append_access_attrs): Validate against the translated
4228 access string rather than the human-readable representation.
4229
8d9254fc
JJ
42302020-01-01 Jakub Jelinek <jakub@redhat.com>
4231
4232 Update copyright years.
4233
39292e25
EB
42342019-12-20 Eric Botcazou <ebotcazou@adacore.com>
4235
4236 * c-ada-spec.h (decl_sloc): Delete.
4237 * c-ada-spec.c (decl_sloc): Make static.
4238
519d7496
JB
42392019-12-19 Julian Brown <julian@codesourcery.com>
4240
4241 * c-common.h (c_omp_map_clause_name): Add prototype.
4242 * c-omp.c (c_omp_map_clause_name): New function.
4243 * c-pragma.h (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ATTACH and
4244 PRAGMA_OACC_CLAUSE_DETACH.
4245
a6163563
JB
42462019-12-19 Julian Brown <julian@codesourcery.com>
4247 Maciej W. Rozycki <macro@codesourcery.com>
4248 Tobias Burnus <tobias@codesourcery.com>
4249 Thomas Schwinge <thomas@codesourcery.com>
4250
4251 * c-pragma.h (pragma_omp_clause): Add
4252 PRAGMA_OACC_CLAUSE_NO_CREATE.
4253
e8f1ade2
MS
42542019-12-17 Martin Sebor <msebor@redhat.com>
4255
4256 PR c++/61339
4257 * c.opt (-Wmismatched-tags, -Wredundant-tags): New options.
4258
368877a1
DM
42592019-12-11 David Malcolm <dmalcolm@redhat.com>
4260
4261 * c-pretty-print.c (c_pretty_printer::clone): New vfunc
4262 implementation.
4263 * c-pretty-print.h (c_pretty_printer::clone): New vfunc decl.
4264
d68f5d45
DM
42652019-12-09 David Malcolm <dmalcolm@redhat.com>
4266
4267 * c-format.c (range_label_for_format_type_mismatch::get_text):
4268 Replace label_text ctor called with true with label_text::take.
4269
d3e28653
DM
42702019-12-09 David Malcolm <dmalcolm@redhat.com>
4271
4272 * c-format.c (selftest::test_type_mismatch_range_labels): Remove
4273 initial newline from expected outputs.
4274 * c-opts.c (c_diagnostic_finalizer): Add pp_newline call before
4275 call to diagnostic_show_locus.
4276
abd6d8cc
JJ
42772019-12-06 Jakub Jelinek <jakub@redhat.com>
4278
4279 * c-cppbuiltin.c (c_cpp_builtins): Don't define __cpp_consteval for
4280 now.
4281
7906797e
MP
42822019-12-05 Marek Polacek <polacek@redhat.com>
4283 Jakub Jelinek <jakub@redhat.com>
4284
4285 PR c++/91353 - P1331R2: Allow trivial default init in constexpr contexts.
4286 * c-cppbuiltin.c (c_cpp_builtins): Adjust the value of __cpp_constexpr.
4287
5c04da88
MP
42882019-12-05 Marek Polacek <polacek@redhat.com>
4289
4290 PR c++/92271 - make __is_same alias for __is_same_as.
4291 * c-common.c: Add __is_same, an alias for __is_same_as.
4292
43aae289
MP
42932019-12-03 Marek Polacek <polacek@redhat.com>
4294
4295 PR c++/91363 - P0960R3: Parenthesized initialization of aggregates.
4296 * c-cppbuiltin.c (c_cpp_builtins): Predefine
4297 __cpp_aggregate_paren_init=201902 for -std=c++2a.
4298
d7ddfbcb
JH
42992019-11-30 Jan Hubicka <hubicka@ucw.cz>
4300
4301 * c-attribs.c (handle_symver_attribute): New function
4302 (c_common_attributes): Add symver.
4303
65ef05d0
RS
43042019-11-30 Richard Sandiford <richard.sandiford@arm.com>
4305
4306 * c-common.c (pointer_int_sum): Use verify_type_context to check
4307 whether the target allows pointer arithmetic for the types involved.
4308 (c_sizeof_or_alignof_type, c_alignof_expr): Use verify_type_context
4309 to check whether the target allows sizeof and alignof operations
4310 for the types involved.
4311
1a291106
JM
43122019-11-27 Jason Merrill <jason@redhat.com>
4313
4314 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_deduction_guides.
4315
05d6cb1a
JJ
43162019-11-26 Jakub Jelinek <jakub@redhat.com>
4317
4318 PR c++/61414
4319 * c-attribs.c (handle_mode_attribute): Add mode attribute to
4320 ENUMERAL_TYPEs.
4321
5b8d9367
JM
43222019-11-25 Joseph Myers <joseph@codesourcery.com>
4323
4324 PR c/91985
4325 * c-common.c (c_common_type_for_mode): Handle decimal
4326 floating-point types being NULL_TREE.
4327 * c-format.c (get_format_for_type_1): Handle specified types being
4328 NULL_TREE.
4329 * c-lex.c (interpret_float): Give an error for decimal
4330 floating-point constants when decimal floating-point not
4331 supported.
4332
1fbf51cb
JJ
43332019-11-23 Jakub Jelinek <jakub@redhat.com>
4334
4335 PR middle-end/83859
4336 * c-attribs.c (append_access_attrs): Avoid buffer overflow. Avoid
4337 memory leak. Use XNEWVEC macro. Use auto_diagnostic_group to
4338 group warning with inform together.
4339 (handle_access_attribute): Formatting fix.
4340
761df906
JJ
43412019-11-22 Jakub Jelinek <jakub@redhat.com>
4342
bdaf8be1
JJ
4343 PR c/90677
4344 * c-common.h (identifier_global_tag): Declare.
4345 * c-format.c (get_pointer_to_named_type): Renamed to ...
4346 (get_named_type): ... this. Use identifier_global_tag instead of
4347 identifier_global_value, handle the return value being a TYPE_P.
4348 (init_dynamic_diag_info): Adjust get_pointer_to_named_type callers
4349 to call get_named_type instead. Formatting fixes.
4350
c2ecce6d 4351 Implement P1902R1, Missing feature-test macros 2017-2019.
761df906
JJ
4352 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_init_captures
4353 and __cpp_generic_lambdas for -std=c++2a. Define
4354 __cpp_designated_initializers, __cpp_constexpr_in_decltype and
4355 __cpp_consteval for -std=c++2a. Remove a FIXME comment about
4356 __cpp_concepts for -std=c++2a.
4357
54aa6b58
MS
43582019-11-22 Martin Sebor <msebor@redhat.com>
4359
4360 PR middle-end/83859
4361 * c-attribs.c (handle_access_attribute): New function.
4362 (c_common_attribute_table): Add new attribute.
4363 (get_argument_type): New function.
4364 (append_access_attrs): New function.
4365 (get_nonnull_operand): Rename...
4366 (get_attribute_operand): ...to this.
4367 * c-common.c (get_nonnull_operand): Rename...
4368 (get_attribute_operand): ...to this.
4369
6c80b1b5
JM
43702019-11-21 Joseph Myers <joseph@codesourcery.com>
4371
4372 * c-attribs.c (handle_fallthrough_attribute): Use pedwarn instead
4373 of warning.
4374
192961ff
JM
43752019-11-19 Joseph Myers <joseph@codesourcery.com>
4376
4377 * c-common.c (attribute_fallthrough_p): In C, use pedwarn not
4378 warning for standard attributes mixed with fallthrough attributes.
4379
f8aea5e3
JM
43802019-11-15 Joseph Myers <joseph@codesourcery.com>
4381
4382 * c-attribs.c (handle_fallthrough_attribute): Remove static.
4383 * c-common.h (handle_fallthrough_attribute): Declare.
4384
2cc94aa8
JM
43852019-11-15 Joseph Myers <joseph@codesourcery.com>
4386
4387 * c-attribs.c (handle_deprecated_attribute): Remove static.
4388 * c-common.h (handle_deprecated_attribute): Declare.
4389
7c5890cc
JM
43902019-11-14 Joseph Myers <joseph@codesourcery.com>
4391
4392 * c-lex.c (lex_charconst): Make CPP_UTF8CHAR constants unsigned
4393 char for C.
4394
b2417b59
JJ
43952019-11-14 Jakub Jelinek <jakub@redhat.com>
4396
d0ec7c93
JJ
4397 * c-omp.c (c_omp_check_context_selector): Add nvidia to the list of
4398 valid vendors.
4399
b2417b59
JJ
4400 * c-omp.c (c_omp_check_context_selector): Handle name lists
4401 containing string literals. Don't diagnose atomic_default_mem_order
4402 with multiple props.
4403
00be2a5f
JM
44042019-11-13 Joseph Myers <joseph@codesourcery.com>
4405
4406 * c-cppbuiltin.c (builtin_define_float_constants): Also define
4407 NORM_MAX constants. Update call to get_max_float.
4408 (LAZY_HEX_FP_VALUES_CNT): Update value to include NORM_MAX
4409 constants.
4410
2dbad62d
EB
44112019-11-13 Eric Botcazou <ebotcazou@adacore.com>
4412
4413 * c-ada-spec.c (get_underlying_decl): Do not look through typedefs.
4414 (dump_forward_type): Do not generate a declaration for function types.
4415 (dump_nested_type) <ARRAY_TYPE>: Do not generate a nested declaration
4416 of the component type if it is declared in another file.
4417
6ed76044
ML
44182019-11-12 Martin Liska <mliska@suse.cz>
4419
4420 * c-opts.c (c_common_post_options):
4421 Use SET_OPTION_IF_UNSET.
4422
62aee289
MR
44232019-11-12 Maciej W. Rozycki <macro@codesourcery.com>
4424 Frederik Harwath <frederik@codesourcery.com>
4425
4426 gcc/c-family/
4427 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_SERIAL enumeration
4428 constant.
4429 * c-pragma.c (oacc_pragmas): Add "serial" entry.
4430
f486280c
RS
44312019-11-08 Richard Sandiford <richard.sandiford@arm.com>
4432
4433 * c-common.h (gnu_vector_type_p): New function.
4434 * c-common.c (c_build_vec_perm_expr): Require __builtin_shuffle
4435 vectors to satisfy gnu_vector_type_p.
4436 (c_build_vec_convert): Likewise __builtin_convertvector.
4437 (convert_vector_to_array_for_subscript): Likewise when applying
4438 implicit vector to array conversion.
4439 (scalar_to_vector): Likewise when converting vector-scalar
4440 operations to vector-vector operations.
4441
017c6491
JM
44422019-11-08 Joseph Myers <joseph@codesourcery.com>
4443
4444 * c.opt (Wold-style-definition): Initialize to -1.
4445 * c-opts.c (c_common_post_options): Set warn_old_style_definition
4446 to flag_isoc2x if not set explicitly.
4447
c01bd174
JM
44482019-11-07 Joseph Myers <joseph@codesourcery.com>
4449
4450 * c-attribs.c (parse_tm_stmt_attr): Handle scoped attributes.
4451
0df65305
JM
44522019-11-05 Jason Merrill <jason@redhat.com>
4453
4454 * c-opts.c (c_common_post_options): -fconcepts-ts implies
4455 -fconcepts.
4456
e0c866dd
KK
44572019-11-04 Kamlesh Kumar <kamleshbhalui@gmail.com>
4458
4459 * c-opts.c (c_common_post_options): Update
4460 latest_abi_version.
4461
f968ef9b
JJ
44622019-11-02 Jakub Jelinek <jakub@redhat.com>
4463
d0c464d2
JJ
4464 * c-common.h (c_omp_get_context_selector): Remove.
4465 * c-omp.c (c_omp_get_context_selector): Moved to omp-general.c
4466 and renamed to omp_get_context_selector.
4467
917dd789
JJ
4468 * c-omp.c (c_omp_mark_declare_variant): Use
4469 omp_context_selector_set_compare.
4470
f968ef9b
JJ
4471 PR c++/88335 - Implement P1073R3: Immediate functions
4472 * c-common.h (enum rid): Add RID_CONSTEVAL.
4473 * c-common.c (c_common_reswords): Add consteval.
4474
5f6705b7
JJ
44752019-11-01 Martin Sebor <msebor@redhat.com>
4476
4477 PR middle-end/91679
4478 PR middle-end/91647
4479 PR middle-end/91463
4480 PR middle-end/92312
4481 * c-pretty-print.c (direct_abstract_declarator): Print
4482 bound in zero-length arrays.
4483 * c.opt (-Wzero-length-bounds): New option.
4484
43f1814c
NS
44852019-10-30 Nathan Sidwell <nathan@acm.org>
4486
4487 * c-cppbuiltin.c (c_cpp_builtins): Add 'L' suffix to feature
4488 macros.
4489
ad1539d5
MS
44902019-10-28 Martin Sebor <msebor@redhat.com>
4491
4492 PR c/66970
4493 * c-common.c (c_common_nodes_and_builtins): Call c_define_builtins
4494 even when only preprocessing.
4495 * c-common.h (names_builtin_p): Declare new function.
4496 * c-lex.c (init_c_lex): Set has_builtin.
4497 (c_common_has_builtin): Define a new function.
4498 * c-ppoutput.c (init_pp_output): Set has_builtin.
4499
135df52c
JJ
45002019-10-24 Jakub Jelinek <jakub@redhat.com>
4501
4502 * c-common.h (c_omp_context_selector_matches): Remove.
4503 * c-omp.c (c_omp_context_selector_matches): Remove.
4504 * c-attribs.c (c_common_attribute_table): Add
4505 "omp declare target {host,nohost,block}" attributes.
4506
8ad0c477
JM
45072019-10-17 JeanHeyd Meneide <phdofthehouse@gmail.com>
4508
4509 * c-lex.c (c_common_has_attribute): Update nodiscard value.
4510
56898e43
RS
45112019-10-14 Richard Sandiford <richard.sandiford@arm.com>
4512
4513 * c-common.h (user_facing_original_type_p): Declare.
4514 * c-common.c: Include c-spellcheck.h.
4515 (user_facing_original_type_p): New function.
4516
20de9568
JJ
45172019-10-12 Jakub Jelinek <jakub@redhat.com>
4518
4519 * c-common.h (c_omp_mark_declare_variant,
4520 c_omp_context_selector_matches): Declare.
4521 * c-omp.c: Include attribs.h, gimplify.h, cgraph.h, symbol-summary.h
4522 and hsa-common.h.
4523 (c_omp_get_context_selector): Support second argument NULL.
4524 (c_omp_mark_declare_variant, c_omp_context_selector_matches): New
4525 functions.
4526 * c-attribs.c (c_common_attribute_table): Remove "omp declare variant"
4527 attribute, add "omp declare variant base" and
4528 "omp declare variant variant" attributes.
4529
175a85b2
JM
45302019-10-11 Joseph Myers <joseph@codesourcery.com>
4531
4532 * c.opt (Wc11-c2x-compat): Add CPP(cpp_warn_c11_c2x_compat)
4533 CppReason(CPP_W_C11_C2X_COMPAT).
4534
fe2bc27c
JM
45352019-10-11 Joseph Myers <joseph@codesourcery.com>
4536
4537 * c-common.c (c_common_reswords): Do not use D_EXT for _Decimal32,
4538 _Decimal64 and _Decimal128.
4539
27dfdc0f
JM
45402019-10-10 Joseph Myers <joseph@codesourcery.com>
4541
4542 * c-cppbuiltin.c (c_cpp_builtins): Do not define macros for DFP
4543 types if DFP not supported.
4544
94e7f906
JJ
45452019-10-10 Jakub Jelinek <jakub@redhat.com>
4546
4547 * c-common.h (c_omp_check_context_selector,
4548 c_omp_get_context_selector): Declare.
4549 * c-omp.c (c_omp_declare_simd_clauses_to_numbers): Fix spelling
4550 in diagnostic message.
4551 (c_omp_check_context_selector, c_omp_get_context_selector): New
4552 functions.
4553 * c-attribs.c (c_common_attribute_table): Add "omp declare variant"
4554 attribute.
4555 (handle_omp_declare_variant_attribute): New function.
4556
a7160771
MS
45572019-10-09 Martin Sebor <msebor@redhat.com>
4558
4559 PR tree-optimization/90879
4560 * c.opt (-Wstring-compare): New option.
4561
cb57504a
JM
45622019-10-08 Andrew Sutton <asutton@lock3software.com>
4563 Jason Merrill <jason@redhat.com>
4564
4565 Update the concepts implementation to conform to the C++20
4566 specification, improve compile times, and generally clean up
4567 the implementation.
4568
4569 * c-cppbuiltin.c (c_cpp_builtins): Use new feature test values for
4570 concepts when -std=c++2a. Bump __cpp_concepts to 201907.
4571 * c.opt: Add -Wconcepts-ts.
4572 * c-opts.c (c_common_post_options): Warn when -fconcepts is used
4573 with -std=c++2a. Disable warning for -fconcepts in C++20 mode.
4574 (set_std_cxx2a): Enable concepts by default.
4575
fbb2a6dc
JM
45762019-10-08 Joseph Myers <joseph@codesourcery.com>
4577
4578 * c-opts.c (c_common_post_options): Set
4579 -fno-fp-int-builtin-inexact for C2X.
4580
8e007055
JJ
45812019-10-05 Jakub Jelinek <jakub@redhat.com>
4582
4583 PR c++/91369 - Implement P0784R7: constexpr new
4584 * c-cppbuiltin.c (c_cpp_builtins): Predefine
4585 __cpp_constexpr_dynamic_alloc=201907 for -std=c++2a.
4586
843f104d
JM
45872019-10-04 Joseph Myers <joseph@codesourcery.com>
4588
4589 PR c/82752
4590 * c-format.c (C_STD_VER): Handle C2x.
4591 (C_STD_NAME): Likewise.
4592 (strftime_flag_specs): Add 'O' modifier with 'p' flag.
4593 (time_char_table): Use separate entry for 'B' and 'b', with 'O'
4594 modifier allowed and 'p' flag.
4595 * c-format.h (enum format_std_version): Add STD_C2X.
4596 (struct format_char_info): Mention 'p' in comment on flags2.
4597
e9c9a142
DM
45982019-10-01 David Malcolm <dmalcolm@redhat.com>
4599
4600 * c-opts.c (c_diagnostic_finalizer): Temporarily clear prefix when
4601 calling diagnostic_show_locus, rather than destroying it afterwards.
4602
7552c36a
JJ
46032019-10-01 Jakub Jelinek <jakub@redhat.com>
4604
4605 PR c++/91925
4606 * c-warn.c (check_alignment_of_packed_member): Ignore FIELD_DECLs
4607 with NULL DECL_FIELD_OFFSET.
4608
8209db25
RS
46092019-10-01 Richard Sandiford <richard.sandiford@arm.com>
4610
4611 * c-pretty-print.c (pp_c_specifier_qualifier_list): If a vector type
4612 has a type name, use it in preference to the __vector syntax.
4613
9343bf99
RS
46142019-09-30 Richard Sandiford <richard.sandiford@arm.com>
4615
4616 * c-pretty-print.c (pp_c_parameter_type_list): Avoid printing
4617 two spaces between a comma and "...".
4618
59bc434a
JJ
46192019-09-27 Jakub Jelinek <jakub@redhat.com>
4620
4621 PR c++/88203
4622 * c-common.h (c_omp_predefined_variable): Declare.
4623 * c-omp.c (c_omp_predefined_variable): New function.
4624 (c_omp_predetermined_sharing): Return OMP_CLAUSE_DEFAULT_SHARED
4625 for predefined variables.
4626
c6447c20
RS
46272019-09-27 Richard Sandiford <richard.sandiford@arm.com>
4628
4629 * c-common.h (build_function_call_vec): Take the original
4630 function decl as an optional final parameter.
4631 (check_builtin_function_arguments): Take the original function decl.
4632 * c-common.c (check_builtin_function_arguments): Likewise.
4633 Handle all built-in functions, not just BUILT_IN_NORMAL ones.
4634 Use targetm.check_builtin_call to check BUILT_IN_MD functions.
4635
c4438114
JM
46362019-09-15 Jason Merrill <jason@redhat.com>
4637
4638 * c-warn.c (warn_logical_operator): Strip location wrappers. Don't
4639 fold_for_warn in "|| mask" warning.
4640
68a57628
ML
46412019-09-10 Martin Liska <mliska@suse.cz>
4642
4643 * c.opt: Use newly added WarnRemoved.
4644
f48ef52e
ML
46452019-09-09 Martin Liska <mliska@suse.cz>
4646
4647 * c.opt: Update comment of removed
4648 options that are preserved only for backward
4649 compatibility.
4650
67f6e649
ML
46512019-09-06 Martin Liska <mliska@suse.cz>
4652
4653 PR c++/91125
4654 * c-common.c: Remove definition of flag_use_repository.
4655 * c-common.h: Likewise.
4656 * c-opts.c (c_common_handle_option):
4657 Do not handle OPT_frepo option.
4658 * c.opt: Mark the option with Deprecated.
4659
db9d2274
MP
46602019-09-04 Marek Polacek <polacek@redhat.com>
4661
4662 * c.opt (fdeduce-init-list): Ignored.
4663
68e2c199
PK
46642019-09-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4665
4666 PR c/78736
4667 * c.opt (Wenum-conversion): New option.
4668
7a4418a5
JL
46692019-09-03 Jozef Lawrynowicz <jozef.l@mittosystems.com>
4670
4671 * c-attribs.c (handle_section_attribute): Call the
4672 handle_generic_attribute target hook after performing target
4673 independent processing.
4674 (handle_noinit_attribute): Likewise.
4675
5f76ab15
ILT
46762019-09-03 Ian Lance Taylor <iant@golang.org>
4677
4678 * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Always expand
4679 when using -fgo-dump-spec.
4680
ae0d3f6a
ML
46812019-09-02 Martin Liska <mliska@suse.cz>
4682
4683 PR c++/91155
4684 * c-common.c (fname_as_string): Use cxx_printable_name for
4685 __PRETTY_FUNCTION__ same as was used before r265711.
4686
8a902edb
MP
46872019-08-28 Marek Polacek <polacek@redhat.com>
4688
4689 Implement P1152R4: Deprecating some uses of volatile.
4690 PR c++/91361
4691 * c-opts.c (c_common_post_options): Enable -Wvolatile by
4692 default for C++2a, unless -Wno-deprecated.
4693 * c.opt (Wvolatile): New warning.
4694
4742dbe7
MP
46952019-08-28 Marek Polacek <polacek@redhat.com>
4696
4697 PR c++/91360 - Implement C++20 P1143R2: constinit.
4698 * c-common.c (c_common_reswords): Add constinit and __constinit.
4699 (keyword_is_decl_specifier): Handle RID_CONSTINIT.
4700 * c-common.h (enum rid): Add RID_CONSTINIT, RID_FIRST_CXX20, and
4701 RID_LAST_CXX20.
4702 (D_CXX20): Define.
4703 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_constinit.
4704 * c-format.c (cxx_keywords): Add "constinit".
4705 * c.opt (Wc++2a-compat, Wc++20-compat): New options.
4706
6a074892
JJ
47072019-08-27 Jakub Jelinek <jakub@redhat.com>
4708
4709 PR c++/91415
4710 * c-common.c (verify_tree): For LSHIFT_EXPR, RSHIFT_EXPR,
4711 COMPONENT_REF and ARRAY_REF in cxx_dialect >= cxx17 mode handle it
4712 like COMPOUND_EXPR rather than normal expression.
4713
22f8849d
IS
47142019-08-23 Iain Sandoe <iain@sandoe.co.uk>
4715
4716 PR pch/61250
4717 * c-lex.c (c_lex_with_flags): Don't call
4718 c_common_no_more_pch () from here.
4719
df375b03
JJ
47202019-08-23 Jakub Jelinek <jakub@redhat.com>
4721
4722 PR middle-end/91283
4723 * c-common.c (c_ts18661_flt_eval_method): Use flag_excess_precision
4724 instead of flag_excess_precision_cmdline.
4725 * c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): Likewise.
4726 * c-opts.c (c_common_post_options): Likewise.
4727
14b7950f
MS
47282019-08-22 Martin Sebor <msebor@redhat.com>
4729
4730 PR middle-end/91490
4731 * c-common.c (braced_list_to_string): Add argument and overload.
4732 Handle flexible length arrays and unions.
4733
8bb2ee59
EB
47342019-08-21 Eric Botcazou <ebotcazou@adacore.com>
4735
4736 * c-ada-spec.c (dump_ada_function_declaration): Be prepared for broken
4737 function declarations where arguments are missing. Rename variables.
4738
21c1e205
RB
47392019-08-15 Richard Biener <rguenther@suse.de>
4740
4741 * c-common.c (c_stddef_cpp_builtins): When the GIMPLE FE is
4742 enabled, define __SIZETYPE__.
4743
f0033821
CL
47442019-08-14 Christophe Lyon <christophe.lyon@linaro.org>
4745
4746 * c-attribs.c (c_common_attribute_table): Add "noinit" entry. Add
4747 exclusion with "section" attribute.
4748 (attr_noinit_exclusions): New table.
4749 (handle_noinit_attribute): New function.
4750
4d732405
RS
47512019-08-13 Richard Sandiford <richard.sandiford@arm.com>
4752
4753 PR middle-end/91421
4754 * c-common.c (resolve_overloaded_builtin): Use
4755 copy_decl_built_in_function.
4756
51ad8481
MS
47572019-08-13 Martin Sebor <msebor@redhat.com>
4758
4759 PR c/80619
4760 * c-format.c (printf_length_specs): Set FMT_LEN_w for "w".
4761 (asm_fprintf_length_spec): Same.
4762 * c-format.h (format_lengths): Add FMT_LEN_w.
4763
77eb117f
JJ
47642019-08-10 Jakub Jelinek <jakub@redhat.com>
4765
4766 * c-pragma.h (enum pragma_omp_clause): Add
4767 PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
4768
398e3feb
JJ
47692019-08-07 Jakub Jelinek <jakub@redhat.com>
4770
4771 * c-pragma.h (enum pragma_omp_clause): Add
4772 PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR. Set PRAGMA_OACC_CLAUSE_USE_DEVICE
4773 equal to PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR instead of being a separate
4774 enumeration value.
4775
ab574db6
MP
47762019-08-05 Marek Polacek <polacek@redhat.com>
4777
4778 PR c++/91338 - Implement P1161R3: Deprecate a[b,c].
4779 * c-opts.c (c_common_post_options): Enable -Wcomma-subscript by
4780 default for C++2a, unless -Wno-deprecated.
4781 * c.opt (Wcomma-subscript): New warning.
4782
554a530f
JJ
47832019-07-20 Jakub Jelinek <jakub@redhat.com>
4784
4785 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_LOOP.
4786 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_BIND.
4787 * c-pragma.c (omp_pragmas_simd): Add PRAGMA_OMP_LOOP entry.
4788 * c-common.h (enum c_omp_clause_split): Add C_OMP_CLAUSE_SPLIT_LOOP.
4789 * c-omp.c (c_omp_split_clauses): Add support for 4 new combined
4790 constructs with the loop construct.
4791
1a888209
JJ
47922019-07-13 Jakub Jelinek <jakub@redhat.com>
4793
4794 PR c/91149
4795 * c-omp.c (c_omp_split_clauses): Fix a pasto in
4796 OMP_CLAUSE_REDUCTION_TASK handling.
4797
1fdd6f04
JJ
47982019-07-12 Jakub Jelinek <jakub@redhat.com>
4799
4800 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ORDER.
4801 * c-omp.c (c_omp_split_clauses): Handle splitting of OMP_CLAUSE_ORDER.
4802
99b1c316
MS
48032019-07-09 Martin Sebor <msebor@redhat.com>
4804
4805 PR c++/61339
1fdd6f04 4806 * c-opts.c (handle_deferred_opts): Change class-key of PODs to struct
99b1c316
MS
4807 and others to class.
4808 * c-pretty-print.h: Same.
4809
6c1dae73
MS
48102019-07-09 Martin Sebor <msebor@redhat.com>
4811
4812 PR c++/61339
4813 * c-format.c (check_argument_type): Change class-key from class to
4814 struct and vice versa to match convention and avoid -Wclass-is-pod
4815 and -Wstruct-no-pod.
4816 * c-pretty-print.h: Same.
4817
8ba6ea87
ML
48182019-07-03 Martin Liska <mliska@suse.cz>
4819
4820 * c-common.c (try_to_locate_new_include_insertion_point): Remove
4821 dead assignemts.
4822
83eb9522
JJ
48232019-07-03 Jakub Jelinek <jakub@redhat.com>
4824
4825 * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_REDUCTION_INSCAN
4826 clauses on OMP_FOR rather than OMP_PARALLEL when OMP_FOR is combined
4827 with OMP_PARALLEL.
4828
1c6ffbab
QZ
48292019-07-02 qing zhao <qing.zhao@oracle.com>
4830
4831 PR preprocessor/90581
4832 * c-opts.c (c_common_handle_option): Handle -fmax-include-depth.
4833 * c.opt: Add new option -fmax-include-depth.
4834
7ffc7de5
JM
48352019-06-26 Jason Merrill <jason@redhat.com>
4836
4837 PR c++/55442 - memory-hog with highly recursive constexpr.
4838 * c.opt (fconstexpr-loop-limit): New.
4839
361af3e4
JJ
48402019-06-25 Jakub Jelinek <jakub@redhat.com>
4841
4842 PR sanitizer/90954
4843 * c-omp.c (c_finish_omp_atomic): Allow tree_invariant_p in addition
4844 to SAVE_EXPR in first operand of a COMPOUND_EXPR.
4845
ab20d992
JJ
48462019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
4847
4848 * c-common.c (c_common_nodes_and_builtins): Define
4849 alternate "__intN__" name for "__intN" types.
4850
f4af4019
JH
48512019-06-24 Jan Hubicka <jh@suse.cz>
4852
4853 * c-common.c (braced_lists_to_strings): Check that
4854 type is array or integer prior checking string flag.
4855
da9e9b57
MB
48562019-06-21 Matthew Beliveau <mbelivea@redhat.com>
4857
4858 PR c++/90875 - added -Wswitch-outside-range option
4859 * c.opt (Wswitch-outside-range): Added new option.
4860 * c-warn.c (c_do_switch_warnings): Use OPT_Wswitch-outside-range.
4861
3f3d6a6f
MP
48622019-06-21 Marek Polacek <polacek@redhat.com>
4863
4864 PR c++/90953 - ICE with -Wmissing-format-attribute.
4865 * c-common.c (check_function_arguments_recurse): Use
4866 get_attribute_name.
4867 (check_missing_format_attribute): Likewise.
4868
1bf32c11
MP
48692019-06-19 Marek Polacek <polacek@redhat.com>
4870
4871 PR c++/60364 - noreturn after first decl not diagnosed.
4872 * c-attribs.c (handle_noreturn_attribute): No longer static.
4873 * c-common.h (handle_noreturn_attribute, attr_noreturn_exclusions):
4874 Declare.
4875 * c-format.c (check_function_format): Use get_attribute_name.
4876
a04c0734
MS
48772019-06-19 Martin Sebor <msebor@redhat.com>
4878
4879 PR translation/90156
4880 * c-format.c (function_format_info::format_type): Adjust type.
4881 (function_format_info::is_raw): New member.
4882 (decode_format_type): Adjust signature. Handle "raw" diag attributes.
4883 (decode_format_attr): Adjust call to decode_format_type.
4884 Avoid a redundant call to convert_format_name_to_system_name.
4885 Avoid abbreviating the word "arguments" in a diagnostic.
4886 (format_warning_substr): New function.
4887 (avoid_dollar_number): Quote dollar sign in a diagnostic.
4888 (finish_dollar_format_checking): Same.
4889 (check_format_info): Same.
4890 (struct baltoks_t): New.
4891 (c_opers, c_keywords, cxx_keywords, badwords, contrs): New arrays.
4892 (maybe_diag_unbalanced_tokens, check_tokens, check_plain): New
4893 functions.
4894 (check_format_info_main): Call check_plain. Use baltoks_t. Call
4895 maybe_diag_unbalanced_tokens.
4896 (handle_format_attribute): Spell out the word "arguments" in
4897 a diagnostic.
4898
d3786ebb
MB
48992019-06-11 Matthew Beliveau <mbelivea@redhat.com>
4900
4901 PR c++/90449 - add -Winaccessible-base option.
4902 * c.opt (Winaccessible-base): New option.
4903
bf38f7e9
JJ
49042019-06-10 Jakub Jelinek <jakub@redhat.com>
4905
4906 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_SCAN.
4907 * c-pragma.c (omp_pragmas_simd): Add #pragma omp scan.
4908 * c-omp.c (c_omp_split_clauses): Diagnose inscan reductions on
4909 combined/composite constructs where it is not allowed. Copy over
4910 OMP_CLAUSE_REDUCTION_INSCAN.
4911
0ecf545c
MS
49122019-06-05 Martin Sebor <msebor@redhat.com>
4913
4914 * c-attribs.c (handle_mode_attribute): Adjust quoting and hyphenation.
4915 (handle_alias_ifunc_attribute): Same.
4916 (handle_copy_attribute): Same.
4917 (handle_weakref_attribute): Same.
4918 (handle_nonnull_attribute): Same.
4919 * c-warn.c (warn_for_sign_compare): Same.
4920 (warn_for_restrict): Same.
4921 * c.opt: Same.
4922
36b34127
MS
49232019-06-05 Martin Sebor <msebor@redhat.com>
4924
4925 * c-pragma.c (handle_pragma_weak): Adjust quoting in a diagnostic.
4926 * c.opt (-Wformat-diag): Remove a spurious period.
4927
357a352f
JJ
49282019-05-29 Jakub Jelinek <jakub@redhat.com>
4929
4930 PR c/90628
4931 * c-common.c (check_builtin_function_arguments)
4932 <case BUILTIN_*_OVERFLOW>: Diagnose pointer to const qualified integer
4933 as last argument.
4934
2b8235ea
EB
49352019-05-23 Eric Botcazou <ebotcazou@adacore.com>
4936
4937 * c-ada-spec.c (compare_node): Compare the DECL_UIDs as a last resort.
4938
6d86ddc4
ML
49392019-05-22 Martin Liska <mliska@suse.cz>
4940
4941 PR lto/90500
4942 * c-attribs.c (handle_copy_attribute): Do not copy
4943 target_clones attribute.
4944
419ba5b9
EB
49452019-05-21 Eric Botcazou <ebotcazou@adacore.com>
4946
4947 * c-ada-spec.h (enum cpp_operation): Add IS_ASSIGNMENT_OPERATOR.
4948 * c-ada-spec.c (print_assignment_operator): New function.
4949 (dump_ada_declaration) <FUNCTION_DECL>: Call it do dump explicit copy
4950 assignment operators declared as methods and filter out the others.
4951
e03436e7
TS
49522019-05-17 Thomas Schwinge <thomas@codesourcery.com>
4953
4954 PR c/89433
4955 * c-attribs.c (c_common_attribute_table): Set min_len to -1 for
4956 "omp declare target".
4957
a9c697b8
MS
49582019-05-16 Martin Sebor <msebor@redhat.com>
4959
ab20d992
JJ
4960 * c-attribs.c (handle_no_sanitize_attribute): Quote identifiers,
4961 keywords, operators, and types in diagnostics.
4962 (handle_scalar_storage_order_attribute): Same.
4963 (handle_mode_attribute): Same.
4964 (handle_visibility_attribute): Same.
4965 (handle_assume_aligned_attribute): Same.
4966 (handle_no_split_stack_attribute): Same.
4967 * c-common.c (shorten_compare): Same.
4968 (c_common_truthvalue_conversion): Same.
4969 (cb_get_source_date_epoch): Same.
4970 * c-lex.c (cb_def_pragma): Quote keywords, operators, and types
4971 in diagnostics.
4972 (interpret_float): Same.
4973 * c-omp.c (c_finish_omp_for): Same.
4974 * c-opts.c (c_common_post_options): Same.
4975 * c-pch.c (c_common_pch_pragma): Same.
4976 * c-pragma.c (pop_alignment): Same.
4977 (handle_pragma_pack): Same.
4978 (apply_pragma_weak): Same.
4979 (handle_pragma_weak): Same.
4980 (handle_pragma_scalar_storage_order): Same.
4981 (handle_pragma_redefine_extname): Same.
4982 (add_to_renaming_pragma_list): Same.
4983 (maybe_apply_renaming_pragma): Same.
4984 (push_visibility): Same.
4985 (handle_pragma_visibility): Same.
4986 (handle_pragma_optimize): Same.
4987 (handle_pragma_message): Same.
4988 * c-warn.c (warn_for_omitted_condop): Same.
4989 (lvalue_error): Same.
a9c697b8 4990
6b943512
RB
49912019-05-15 Richard Biener <rguenther@suse.de>
4992
4993 PR c/90474
4994 * c-common.c (c_common_mark_addressable_vec): Also mark
4995 a COMPOUND_LITERAL_EXPR_DECL addressable similar to
4996 c_mark_addressable.
ab20d992 4997
b744fc85
NS
49982019-05-06 Nathan Sidwell <nathan@acm.org>
4999
5000 * c-opts.c (handle_defered_opts): Rename struct deps to struc mkdeps.
5001
598f50d7
NS
50022019-04-30 Nathan Sidwell <nathan@acm.org>
5003
5004 * c-common.c (c_common_init_ts): Use MARK_TS_EXP. Mark SIZEOF_EXPR.
5005
5bcc5a3b
ML
50062019-04-30 Martin Liska <mliska@suse.cz>
5007
5008 * c-pragma.c (handle_pragma_diagnostic): Provide hints
5009 for unknown options.
5010
e78a87f7
RS
50112019-04-26 Richard Sandiford <richard.sandiford@arm.com>
5012
5013 * c-warn.c (strict_aliasing_warning): Apply COMPLETE_TYPE_P to
5014 the pointer target rather than the pointer itself.
5015
c280b7ee
JJ
50162019-04-19 Jakub Jelinek <jakub@redhat.com>
5017
5018 PR c/89888
5019 * c-common.h (c_add_case_label): Remove orig_type and outside_range_p
5020 arguments.
5021 (c_do_switch_warnings): Remove outside_range_p argument.
5022 * c-common.c (check_case_bounds): Removed.
5023 (c_add_case_label): Remove orig_type and outside_range_p arguments.
5024 Don't call check_case_bounds. Fold low_value as well as high_value.
5025 * c-warn.c (c_do_switch_warnings): Remove outside_range_p argument.
5026 Check for case labels outside of range of original type here and
5027 adjust them.
5028
8e8225e6
JJ
50292019-04-12 Jakub Jelinek <jakub@redhat.com>
5030
63b8a166
JJ
5031 PR translation/90041
5032 * c.opt (-fhandle-exceptions): Use %< and %> around option names
5033 in the Warn diagnostics.
5034
8e8225e6
JJ
5035 PR c/89946
5036 * c-attribs.c (handle_patchable_function_entry_attribute): Add
5037 function comment. Warn if arguments of the attribute are not positive
5038 integer constants.
5039
53a3f614
EB
50402019-04-09 Eric Botcazou <ebotcazou@adacore.com>
5041
5042 * c-ada-spec.c (print_destructor): Deal with deleting destructors.
5043 (dump_ada_declaration) <FUNCTION_DECL>: Likewise.
5044
22be5873
EB
50452019-04-07 Eric Botcazou <ebotcazou@adacore.com>
5046
5047 * c-ada-spec.c (is_float128): New predicate extracted from...
5048 (dump_ada_node) <COMPLEX_TYPE>: Use it to recognize __cfloat128.
5049 <REAL_TYPE>: ...here. Call it.
5050
34facf20
DM
50512019-04-05 David Malcolm <dmalcolm@redhat.com>
5052
5053 PR c/89985
5054 * c-warn.c (check_address_or_pointer_of_packed_member): Add
5055 auto_diagnostic_group. Guard inform calls by result of
5056 warning_at call.
5057
05564120
MP
50582019-04-05 Marek Polacek <polacek@redhat.com>
5059
ab20d992 5060 PR c++/89973 - -Waddress-of-packed-member ICE with invalid conversion.
05564120
MP
5061 * c-warn.c (check_address_or_pointer_of_packed_member): Check the type
5062 of RHS.
5063
7a506c3c
JM
50642019-04-03 Jason Merrill <jason@redhat.com>
5065
5066 PR c++/86586 - -fcompare-debug=-Wsign-compare.
5067 * c-warn.c (warn_for_sign_compare): Call fold_for_warn.
5068
ddeae8c8
MS
50692019-04-01 Martin Sebor <msebor@redhat.com>
5070
5071 PR c/89685
5072 * c-attribs.c (handle_copy_attribute): Handle references and
5073 non-constant expressions.
5074
a15ffa22
JJ
50752019-03-22 Jakub Jelinek <jakub@redhat.com>
5076
5077 PR c++/87481
5078 * c.opt (-fconstexpr-ops-limit=): New option.
5079
36a3a7a3
JJ
50802019-03-21 Jakub Jelinek <jakub@redhat.com>
5081
5082 * c-common.c (per_file_includes_t): Use false as Lazy in hash_set
5083 template param.
5084
bec1da64
MS
50852019-03-19 Martin Sebor <msebor@redhat.com>
5086
5087 PR tree-optimization/89688
5088 * c-common.c (braced_list_to_string): Make static.
5089 (braced_lists_to_strings): Define new function.
5090 * c-common.h (braced_list_to_string): Remove.
5091 (braced_lists_to_strings): Declare.
5092
1fe61adf
ML
50932019-03-12 Martin Liska <mliska@suse.cz>
5094
5095 * c-opts.c (c_common_handle_option): Wrap option with %< and %>.
5096
93964ebd
ML
50972019-03-11 Martin Liska <mliska@suse.cz>
5098
5099 * c-opts.c (c_common_post_options): Wrap apostrophes
5100 in gcc internal format with %'.
5101
a3f9f006
ML
51022019-03-11 Martin Liska <mliska@suse.cz>
5103
5104 * c-attribs.c (handle_nocf_check_attribute): Wrap an option name
5105 in a string format message and fix GNU coding style.
5106 * c-common.c (vector_types_convertible_p): Likewise.
5107 (c_build_vec_perm_expr): Likewise.
5108 * c-indentation.c (get_visual_column): Likewise.
5109 * c-opts.c (c_common_handle_option): Likewise.
5110 (c_common_post_options): Likewise.
5111 (sanitize_cpp_opts): Likewise.
5112 * c-pch.c (c_common_pch_pragma): Likewise.
5113 * c-pragma.c (handle_pragma_pack): Likewise.
5114
1db01ff9
JJ
51152019-03-08 Jakub Jelinek <jakub@redhat.com>
5116
5117 PR tree-optimization/89550
5118 * c-common.c (c_common_truthvalue_conversion): Only set
5119 TREE_NO_WARNING if warning_at returned true.
5120 * c-warn.c (overflow_warning, warn_logical_operator): Likewise.
5121
ba790e6f
JJ
51222019-02-25 Sandra Loosemore <sandra@codesourcery.com>
5123 Martin Sebor <msebor@gmail.com>
5124
5125 * c.opt (Wmissing-attributes): Clean up doc string.
5126
7da73ba7
JJ
51272019-02-25 Jakub Jelinek <jakub@redhat.com>
5128
5129 PR c/89495
5130 * c-format.c (maybe_read_dollar_number): Compute nargnum in
5131 HOST_WIDE_INT type to avoid overflows and change overflow_flag
5132 checking.
5133
921bb9d1
RB
51342019-02-22 Richard Biener <rguenther@suse.de>
5135
5136 * c-pch.c (no_checksum): Remove.
5137 (pch_init): Remove assertion that executable_checksum is not
5138 all zero.
5139 (c_common_valid_pch): Likewise.
5140
e2ebb05c
MS
51412019-02-18 Martin Sebor <msebor@redhat.com>
5142
5143 PR middle-end/89294
5144 * c-common.c (invalid_array_size_error): Handle cst_size_not_constant.
5145
3fe53000
DM
51462019-02-16 David Malcolm <dmalcolm@redhat.com>
5147
5148 PR c++/88680
5149 * c-common.c (shorten_compare): Call fold_for_warn on op0 when
5150 implementing -Wtype-limits.
5151
28a8cef1
MS
51522019-02-11 Martin Sebor <msebor@redhat.com>
5153
5154 PR c++/87996
5155 * c-common.c (invalid_array_size_error): New function.
5156 (valid_array_size_p): Call it. Handle size as well as type.
5157 * c-common.h (valid_constant_size_p): New function.
5158 (enum cst_size_error): New type.
5159
ec2be203
DM
51602019-01-31 David Malcolm <dmalcolm@redhat.com>
5161
5162 PR c/89122
5163 * known-headers.cc (get_stdlib_header_for_name): Add
5164 {FLT|DBL|LDBL}_{MAX|MIN} to "hints" array.
5165
8936f047
JJ
51662019-01-31 Jakub Jelinek <jakub@redhat.com>
5167
5168 PR libstdc++/88170
5169 * c-pretty-print.c (pp_c_enumeration_constant): Print always as
5170 a C cast in pp_c_flag_gnu_v3 mode.
5171
6a335b96
JJ
51722019-01-29 Jakub Jelinek <jakub@redhat.com>
5173
5174 PR c/86125
5175 * c-common.c (c_common_nodes_and_builtins): Build type variants for
5176 builtin_structptr_types types even for C.
5177
2a06eba5
BE
51782019-01-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
5179
5180 * c-warn.c (check_address_or_pointer_of_packed_member): Handle the case
5181 when rhs is of array type correctly. Fix handling of nested structures.
5182 Fix handling of indirect_ref together with nop_expr and/or addr_expr.
5183 (check_and_warn_address_or_pointer_of_packed_member): Fix handling of
5184 type casts within nested compound expressions.
5185
18a23298
JJ
51862019-01-22 Jakub Jelinek <jakub@redhat.com>
5187
5188 PR middle-end/88968
5189 * c-omp.c (c_finish_omp_atomic): For bitfield atomics, update type
5190 variable after using BIT_FIELD_REF.
5191
420183d9
L
51922019-01-18 H.J. Lu <hongjiu.lu@intel.com>
5193
5194 PR c/51628
5195 PR c/88664
5196 * c-common.h (warn_for_address_or_pointer_of_packed_member):
5197 Remove the boolean argument.
5198 * c-warn.c (check_address_of_packed_member): Renamed to ...
5199 (check_address_or_pointer_of_packed_member): This. Also
5200 warn pointer conversion.
5201 (check_and_warn_address_of_packed_member): Renamed to ...
5202 (check_and_warn_address_or_pointer_of_packed_member): This.
5203 Also warn pointer conversion.
5204 (warn_for_address_or_pointer_of_packed_member): Remove the
5205 boolean argument. Don't check pointer conversion here.
5206
99063eee
RS
52072019-01-15 Richard Sandiford <richard.sandiford@arm.com>
5208
5209 PR inline-asm/52813
5210 * c.opt (Wdeprecated): Move documentation and variable to common.opt.
5211
a30d0196
JJ
52122019-01-14 Jakub Jelinek <jakub@redhat.com>
5213
5214 * c-cppbuiltin.c (c_cpp_builtin): Define __cpp_guaranteed_copy_elision
5215 and __cpp_nontype_template_parameter_auto. Add a comment that
5216 __cpp_template_auto is deprecated.
5217
2d91f79d
TH
52182019-01-14 Tom Honermann <tom@honermann.net>
5219
5220 Implement P0482R5, char8_t: A type for UTF-8 characters and strings
5221 * c-common.c (c_common_reswords): Add char8_t.
5222 (fix_string_type): Use char8_t for the type of u8 string literals.
5223 (c_common_get_alias_set): char8_t doesn't alias.
5224 (c_common_nodes_and_builtins): Define char8_t as a builtin type in
5225 C++.
5226 (c_stddef_cpp_builtins): Add __CHAR8_TYPE__.
5227 (keyword_begins_type_specifier): Add RID_CHAR8.
5228 * c-common.h (rid): Add RID_CHAR8.
5229 (c_tree_index): Add CTI_CHAR8_TYPE and CTI_CHAR8_ARRAY_TYPE.
5230 Define D_CXX_CHAR8_T and D_CXX_CHAR8_T_FLAGS.
5231 Define char8_type_node and char8_array_type_node.
5232 * c-cppbuiltin.c (cpp_atomic_builtins): Predefine
5233 __GCC_ATOMIC_CHAR8_T_LOCK_FREE.
5234 (c_cpp_builtins): Predefine __cpp_char8_t.
5235 * c-lex.c (lex_string): Use char8_array_type_node as the type of
5236 CPP_UTF8STRING.
5237 (lex_charconst): Use char8_type_node as the type of CPP_UTF8CHAR.
5238 * c-opts.c: If not otherwise specified, enable -fchar8_t when
5239 targeting C++2a.
5240 * c.opt: Add the -fchar8_t command line option.
5241
23db6ced
MS
52422019-01-14 Martin Sebor <msebor@redhat.com>
5243
5244 PR target/88638
5245 * c-attribs.c (positional_argument): Call valid_format_string_type_p
5246 and issue errors if it fails.
5247 * c-common.h (valid_format_string_type_p): Declare.
5248 * c-format.c (valid_stringptr_type_p): Rename...
5249 (valid_format_string_type_p): ...to this and make extern.
5250 (handle_format_arg_attribute): Adjust to new name.
5251 (check_format_string): Same.
5252
234c3818
L
52532019-01-13 H.J. Lu <hongjiu.lu@intel.com>
5254
5255 * c-warn.c (warn_for_address_or_pointer_of_packed_member):
5256 Replace "may may" with "may" in warning message.
5257
d8fcab68
JJ
52582019-01-07 Jakub Jelinek <jakub@redhat.com>
5259
5260 PR c++/85052
5261 * c-common.h (enum rid): Add RID_BUILTIN_CONVERTVECTOR.
5262 (c_build_vec_convert): Declare.
5263 * c-common.c (c_build_vec_convert): New function.
5264
29d24852
MS
52652019-01-04 Martin Sebor <msebor@redhat.com>
5266
5267 PR c/88546
5268 * c-attribs.c (handle_copy_attribute): Avoid copying attribute leaf.
5269 Handle C++ empty throw specification and C11 _Noreturn.
5270 (has_attribute): Also handle C11 _Noreturn.
5271
9069a4c9
MS
52722019-01-04 Martin Sebor <msebor@redhat.com>
5273
5274 PR c/88363
5275 * c-attribs.c (positional_argument): Also accept enumerated types.
5276
a5544970
JJ
52772019-01-01 Jakub Jelinek <jakub@redhat.com>
5278
5279 Update copyright years.
5280
da77eace
L
52812018-12-20 H.J. Lu <hongjiu.lu@intel.com>
5282
5283 PR c/51628
5284 * c-common.h (warn_for_address_or_pointer_of_packed_member): New.
5285 * c-warn.c (check_alignment_of_packed_member): New function.
5286 (check_address_of_packed_member): Likewise.
5287 (check_and_warn_address_of_packed_member): Likewise.
5288 (warn_for_address_or_pointer_of_packed_member): Likewise.
5289 * c.opt: Add -Wno-address-of-packed-member.
5290
573767d4
DM
52912018-12-20 David Malcolm <dmalcolm@redhat.com>
5292
5293 PR c++/87504
5294 * c-warn.c (get_outermost_macro_expansion): New function.
5295 (spelled_the_same_p): Use it to unwind the macro expansions, and
5296 compare the outermost macro in each nested expansion, rather than
5297 the innermost.
5298
a14feb3c
DM
52992018-12-19 David Malcolm <dmalcolm@redhat.com>
5300
5301 PR c++/87504
5302 * c-common.h (warn_tautological_cmp): Convert 1st param from
5303 location_t to const op_location_t &.
5304 * c-warn.c (find_array_ref_with_const_idx_r): Call fold_for_warn
5305 when testing for INTEGER_CST.
5306 (warn_tautological_bitwise_comparison): Convert 1st param from
5307 location_t to const op_location_t &; use it to build a
5308 binary_op_rich_location, and use this.
5309 (spelled_the_same_p): New function.
5310 (warn_tautological_cmp): Convert 1st param from location_t to
5311 const op_location_t &. Warn for macro expansions if
5312 spelled_the_same_p. Use binary_op_rich_location.
5313
dfd7fdca
DM
53142018-12-19 David Malcolm <dmalcolm@redhat.com>
5315
5316 PR c++/43064
5317 PR c++/43486
5318 * c-common.c (unsafe_conversion_p): Fold any location wrapper.
5319 (verify_tree): Handle location wrappers.
5320 (c_common_truthvalue_conversion): Strip any location wrapper.
5321 Handle CONST_DECL.
5322 (fold_offsetof): Strip any location wrapper.
5323 (complete_array_type): Likewise for initial_value.
5324 (convert_vector_to_array_for_subscript): Call fold_for_warn on the
5325 index before checking for INTEGER_CST.
5326 * c-pretty-print.c (c_pretty_printer::primary_expression): Don't
5327 print parentheses around location wrappers.
5328 * c-warn.c (warn_logical_operator): Call fold_for_warn on op_right
5329 before checking for INTEGER_CST.
5330 (warn_tautological_bitwise_comparison): Call
5331 tree_strip_any_location_wrapper on lhs, rhs, and bitop's operand
5332 before checking for INTEGER_CST.
5333 (readonly_error): Strip any location wrapper.
5334 (warn_array_subscript_with_type_char): Strip location wrappers
5335 before checking for INTEGER_CST. Use the location of the index if
5336 available.
5337
5c8b3702
JM
53382018-12-06 Jason Merrill <jason@redhat.com>
5339
5340 PR c++/88136 - -Wdeprecated-copy false positives
5341 * c.opt (Wdeprecated-copy-dtor): New.
5342 (Wdeprecated-copy): Move to -Wextra.
5343
673670da
MS
53442018-11-29 Martin Sebor <msebor@redhat.com>
5345
5346 PR c/88172
5347 PR testsuite/88208
5348 * c-attribs.c (common_handle_aligned_attribute): Silently avoid setting
5349 alignments to values less than the target requires.
5350 (has_attribute): For attribute aligned consider both the attribute
5351 and the alignment bits.
5352 * c-common.c (c_init_attributes): Optionally issue a warning for
5353 zero alignment.
5354
04864ec8
MS
53552018-11-28 Martin Sebor <msebor@redhat.com>
5356
5357 PR c/88065
5358 PR c/87297
5359 * c-warn.c (sizeof_pointer_memaccess_warning): Bail if source
5360 or destination is an error.
5361
ace83db0
JJ
53622018-11-28 Jakub Jelinek <jakub@redhat.com>
5363
5364 PR c++/88215
5365 * c-ubsan.c: Include langhooks.h.
5366 (ubsan_instrument_division): Change gcc_assert that main variants
5367 of op0 and op1 types are equal to gcc_checking_assert that the
5368 main variants are compatible types.
5369
da193a27
EB
53702018-11-27 Eric Botcazou <ebotcazou@adacore.com>
5371
5372 * c-ada-spec.c: Include stringpool.h.
5373 (has_static_fields): Return false for incomplete types.
5374 (is_tagged_type): Likewise.
5375 (has_nontrivial_methods): Likewise.
5376 (dump_ada_node) <INTEGER_TYPE>: Deal specifically with __int128.
5377 (struct overloaded_name_hash): New structure.
5378 (struct overloaded_name_hasher): Likewise.
5379 (overloaded_names): New global variable.
5380 (init_overloaded_names): New static function.
5381 (overloaded_name_p): New predicate.
5382 (dump_ada_declaration) <TYPE_DECL>: Tidy up and set TREE_VISITED
5383 on the TYPE_STUB_DECL of the original type of a typedef, if any.
5384 <FUNCTION_DECL>: Bail out for an unsupported overloaded name.
5385 Remove always-true condition and dump forward types.
5386 (dump_ada_specs): Delete overloaded_names.
5387
98f08eb8
MS
53882018-11-20 Martin Sebor <msebor@redhat.com>
5389
5390 * c-attribs.c (type_for_vector_size): New function.
5391 (type_valid_for_vector_size): Same.
5392 (handle_vector_size_attribute): Move code to the functions above
5393 and call them.
5394 (validate_attribute, has_attribute): New functions.
5395 * c-common.h (has_attribute): Declare.
5396 (rid): Add RID_HAS_ATTRIBUTE_EXPRESSION.
5397 * c-common.c (c_common_resword): Same.
5398
2674fa47
JM
53992018-11-16 Jason Merrill <jason@redhat.com>
5400
5401 * c-lex.c (c_common_has_attribute): Handle likely/unlikely.
5402 * c-attribs.c (attr_cold_hot_exclusions): Make public.
5403
258b3854
JJ
54042018-11-16 Jakub Jelinek <jakub@redhat.com>
5405
5406 PR middle-end/87854
5407 * c-common.c (fix_string_type): Reject string literals larger than
5408 TYPE_MAX_VALUE (ssizetype) bytes.
5409
1d249509
MS
54102018-11-15 Martin Sebor <msebor@redhat.com>
5411
5412 PR c++/87541
5413 PR c++/87542
5414 * c-attribs.c (positional_argument): New function.
5415 (handle_alloc_size_attribute): Use it and simplify.
5416 (handle_alloc_align_attribute): Same.
5417 (handle_assume_aligned_attribute): Same.
5418 (handle_nonnull_attribute): Same.
5419 * c-common.c (check_function_arguments): Pass fntype to
5420 check_function_format.
5421 * c-common.h (check_function_format): Add an argument.
5422 (PosArgFlags, positional_argument): Declare new type and function.
5423 * c-format.c (decode_format_attr): Add arguments.
5424 (check_format_string, get_constant): Same.
5425 (convert_format_name_to_system_name): Adjust.
5426
478dd60d
DM
54272018-11-15 David Malcolm <dmalcolm@redhat.com>
5428
5429 PR other/19165
5430 * c-opts.c (c_diagnostic_finalizer): Add diagnostic_t param.
5431
8cca0163
JJ
54322018-11-14 Jakub Jelinek <jakub@redhat.com>
5433
8ee09943
JJ
5434 P1236R1 - Signed integers are two's complement
5435 * c-warn.c (maybe_warn_shift_overflow): Don't warn for c++2a.
5436 * c-ubsan.c (ubsan_instrument_shift): Make signed shifts
5437 with in-range second operand well defined for -std=c++2a.
5438
8cca0163
JJ
5439 PR other/88007
5440 * c-common.c (parse_optimize_options): Allocate option string from
5441 opts_obstack rather than as GC memory. Move the allocation after
5442 warning for invalid option.
5443
620e594b
DM
54442018-11-13 David Malcolm <dmalcolm@redhat.com>
5445
5446 * c-common.c (c_get_substring_location): Update for renaming of
5447 get_source_location_for_substring to get_location_within_string.
5448 * c-lex.c: Replace "source_location" with "location_t".
5449 * c-opts.c: Likewise.
5450 * c-ppoutput.c: Likewise.
5451
f9731de3
MS
54522018-11-13 Martin Sebor <msebor@redhat.com>
5453
5454 PR middle-end/81824
5455 * c-attribs.c (handle_copy_attribute): Exclude inlining attributes.
5456 (handle_tls_model_attribute): Improve diagnostics.
5457
e4bd6d5e
JM
54582018-11-12 Jason Merrill <jason@redhat.com>
5459
a6bb6b07
JM
5460 * c-cppbuiltin.c (c_cpp_builtins): Define
5461 __cpp_impl_destroying_delete.
5462
e4bd6d5e
JM
5463 * c-cppbuiltin.c (c_cpp_builtins): Change __cpp_explicit_bool to
5464 __cpp_conditional_explicit.
5465
79a2c428
MS
54662018-11-09 Martin Sebor <msebor@redhat.com>
5467
5468 PR middle-end/81824
5469 * c-attribs.c (handle_copy_attribute): New function.
5470
4c7bd361
MS
54712018-11-09 Martin Sebor <msebor@redhat.com>
5472
5473 PR c/87795
5474 * c-common.c (check_user_alignment): Use MAX_OFILE_ALIGNMENT.
5475
28567c40
JJ
54762018-11-08 Jakub Jelinek <jakub@redhat.com>
5477
5478 * c-common.h (c_finish_omp_taskgroup): Add CLAUSES argument.
5479 (c_finish_omp_atomic): Replace bool SEQ_CST argument with
5480 enum omp_memory_order MEMORY_ORDER.
5481 (c_finish_omp_flush): Add MO argument.
5482 (c_omp_depend_t_p, c_finish_omp_depobj): Declare.
5483 (c_finish_omp_for): Add FINAL_P argument.
5484 * c-omp.c: Include memmodel.h.
5485 (c_finish_omp_taskgroup): Add CLAUSES argument. Set
5486 OMP_TASKGROUP_CLAUSES to it.
5487 (c_finish_omp_atomic): Replace bool SEQ_CST argument with
5488 enum omp_memory_order MEMORY_ORDER. Set OMP_ATOMIC_MEMORY_ORDER
5489 instead of OMP_ATOMIC_SEQ_CST.
5490 (c_omp_depend_t_p, c_finish_omp_depobj): New functions.
5491 (c_finish_omp_flush): Add MO argument, if not MEMMODEL_LAST, emit
5492 __atomic_thread_fence call with the given value.
5493 (check_omp_for_incr_expr): Formatting fixes.
5494 (c_finish_omp_for): Add FINAL_P argument. Allow NE_EXPR
5495 even in OpenMP loops, diagnose if NE_EXPR and incr expression
5496 is not constant expression 1 or -1. Transform NE_EXPR loops
5497 with iterators pointers to VLA into LT_EXPR or GT_EXPR loops.
5498 (c_omp_check_loop_iv_r): Look for orig decl of C++ range for
5499 loops too.
5500 (c_omp_split_clauses): Add support for combined
5501 #pragma omp parallel master and
5502 #pragma omp {,parallel }master taskloop{, simd} constructs.
5503 Handle OMP_CLAUSE_IN_REDUCTION. Handle OMP_CLAUSE_REDUCTION_TASK.
5504 Handle OMP_CLAUSE_NONTEMPORAL. Handle splitting OMP_CLAUSE_IF
5505 also to OMP_SIMD. Copy OMP_CLAUSE_LASTPRIVATE_CONDITIONAL.
5506 (c_omp_predetermined_sharing): Don't return
5507 OMP_CLAUSE_DEFAULT_SHARED for const qualified decls.
5508 * c-pragma.c (omp_pragmas): Add PRAGMA_OMP_DEPOBJ and
5509 PRAGMA_OMP_REQUIRES.
5510 * c-pragma.h (enum pragma_kind): Likewise.
5511 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_NONTEMPORAL
5512 and PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
5513
204839e7
DM
55142018-11-08 David Malcolm <dmalcolm@redhat.com>
5515
5516 * c-format.c (gcc_dump_printf_char_table): Add entry for %f.
5517
d8010ee4
DM
55182018-11-08 David Malcolm <dmalcolm@redhat.com>
5519
5520 * c-format.c (local_cgraph_node_ptr_node): New variable.
5521 (gcc_dump_printf_char_table): Add entry for %C.
5522 (get_pointer_to_named_type): New function, taken from the handling
5523 code for "gimple *" from...
5524 (init_dynamic_diag_info): ...here. Add handling for
5525 "cgraph_node *".
5526 * c-format.h (T_CGRAPH_NODE): New.
5527
4be5c72c
JM
55282018-10-19 Jason Merrill <jason@redhat.com>
5529
5530 * c-cppbuiltin.c (c_cpp_builtins): Add
5531 __cpp_nontype_template_parameter_class.
5532
f3f6029d
NS
55332018-10-31 Nathan Sidwell <nathan@acm.org>
5534
ab5324fb
NS
5535 * c-opts.c (c_finish_options): Force command line macro
5536 location. Refactor to avoid repeating main debug hook.
5537 (push_command_line_include): Clarify comment.
5538
f3f6029d
NS
5539 * c-opts.c (c_finish_options): Adjust cpp_force_token_locations call.
5540
91e3ec29
MS
55412018-10-30 Martin Sebor <msebor@redhat.com>
5542
5543 PR middle-end/87041
5544 * c-format.c (check_format_types): Avoid diagnosing null pointer
5545 arguments to printf-family of functions.
5546
b5ff4f5c
MP
55472018-10-30 Marek Polacek <polacek@redhat.com>
5548
5549 Implement P0892R2, explicit(bool).
5550 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_explicit_bool.
5551
7e2de6df
DM
55522018-10-29 David Malcolm <dmalcolm@redhat.com>
5553
5554 * name-hint.h (name_hint::take_deferred): New member function.
5555
b2bf438c
DM
55562018-10-29 David Malcolm <dmalcolm@redhat.com>
5557
5558 PR c++/56856
5559 * c-common.c (check_function_sentinel): Call fold_for_warn on the
5560 argument.
5561 (check_function_restrict): Rename param "argarray" to
5562 "unfolded_argarray", and make a copy named "argarray", calling
5563 fold_for_warn on each argument.
5564 (check_function_arguments): Add note about responsibility for
5565 folding the arguments.
5566
9f936c86
JM
55672018-10-17 Joseph Myers <joseph@codesourcery.com>
5568
5569 * c-common.c (flag_isoc2x): New variable.
5570 * c-common.h (clk_c): Update comment to reference C2X.
5571 (flag_isoc99, flag_isoc11): Update comments to reference future
5572 standard versions in general.
5573 (flag_isoc2x): Declare.
5574 * c-opts.c (set_std_c2x): New function.
5575 (c_common_handle_option): Handle -std=c2x and -std=gnu2x.
5576 (set_std_c89, set_std_c99, set_std_c11, set_std_c17): Set
5577 flag_isoc2x to 0.
5578 * c.opt (Wc11-c2x-compat, std=c2x, std=gnu2x): New options.
5579
7a8a92c4
JM
55802018-10-17 Joseph Myers <joseph@codesourcery.com>
5581
5582 * c.opt (std=c17, std=c18, std=gnu17, std=gnu18, std=iso9899:2017)
5583 (std=iso9899:2018): Document C17 as published in 2018.
5584
4dc003ff
CL
55852018-10-12 Christophe Lyon <christophe.lyon@linaro.org>
5586
5587 PR c++/87364
5588 * c-pretty-print.c (c_pretty_printer::constant): Fix typo.
5589
79371671
WW
55902018-10-11 Will Wray <wjwray@gmail.com>
5591
5592 PR c++/87364
5593 * c-pretty-print.h (pp_c_type_cast): Prototype.
5594 (pp_c_integer_constant): Likewise.
5595 * c-pretty-print.c (pp_c_type_cast): No longer static.
5596 (pp_c_integer_constant): Likewise.
5597 (pp_c_enumeration_constant): Fix loop termination when finding
5598 name of constant. No longer returns a value. Call
5599 pp_c_integer_constant.
5600 (c_pretty_printer::constant): Update for changes to
5601 pp_c_enumeration_constant.
5602
46c62690
JJ
56032018-10-11 Jakub Jelinek <jakub@redhat.com>
5604
5605 * c-lex.c (c_common_has_attribute): Return 201803 instead of 20180312
5606 for no_unique_address.
5607
c24300ba
DM
56082018-10-09 David Malcolm <dmalcolm@redhat.com>
5609
5610 * c-common.c (c_option_controlling_cpp_error): Rename to...
5611 (c_option_controlling_cpp_diagnostic): ...this, and convert
5612 "reason" from int to enum.
5613 (c_cpp_error): Rename to...
5614 (c_cpp_diagnostic): ...this, converting level and reason to enums.
5615 * c-common.h (c_cpp_error): Rename to...
5616 (c_cpp_diagnostic): ...this, converting level and reason to enums.
5617 * c-opts.c (c_common_init_options): Update for renaming.
5618
8656dafa
RS
56192018-10-08 Richard Sandiford <richard.sandiford@arm.com>
5620
5621 PR c/87286
5622 * c-common.c (vector_types_compatible_elements_p): Use
5623 INTEGRAL_TYPE_P instead of checking only for INTEGER_TYPE.
5624
8cff0652
VK
56252018-10-04 Vinay Kumar <vinay.kumar@blackfigtech.com>
5626
5627 * c-attribs.c (get_priority): Add a warning flag warn_prio_ctor_dtor
5628 to generate constructor destructor priority warning.
5629 * c.opt (-Wprio-ctor-dtor): New option.
5630
bedf03a2
JM
56312018-10-01 Jason Merrill <jason@redhat.com>
5632
5633 * c-lex.c (c_common_has_attribute): Add no_unique_address.
5634
6cc430c1
EB
56352018-10-01 Eric Botcazou <ebotcazou@adacore.com>
5636
5637 * c-ada-spec.c (get_underlying_decl): Get to the main type variant.
5638 (dump_ada_node): Add const keyword.
5639
87677ac7
ML
56402018-09-25 Martin Liska <mliska@suse.cz>
5641
5642 * c-common.c (c_common_truthvalue_conversion):
5643 Remove Pascal from documentation.
5644
518196cb
EB
56452018-09-21 Eric Botcazou <ebotcazou@adacore.com>
5646
5647 * c-ada-spec.c: Include diagnostic.h.
5648 (dump_ada_declaration) <RECORD_TYPE>: Issue a warning on packed layout.
5649
a599af84
MP
56502018-09-19 Marek Polacek <polacek@redhat.com>
5651
5652 * c.opt (Wclass-conversion): New.
5653
9c4a4b3c
DM
56542018-09-17 David Malcolm <dmalcolm@redhat.com>
5655
5656 * c-format.c (range_label_for_format_type_mismatch::get_text):
5657 Update for new param.
5658
c896ecfe
DM
56592018-09-17 David Malcolm <dmalcolm@redhat.com>
5660
5661 * c-format.c (format_warning_at_char): Update for introduction of
5662 format_string_diagnostic_t.
5663 (format_type_warning): Likewise.
5664
80c6d1f4
MJ
56652018-09-17 Martin Jambor <mjambor@suse.cz>
5666
5667 PR c/63886
5668 * c.opt (Wabsolute-value): New.
5669
6d900107
BE
56702018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
5671
5672 * c-common.c (complete_flexible_array_elts): New helper function.
5673 * c-common.h (complete_flexible_array_elts): Declare.
5674
b5764229
BE
56752018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
5676
5677 * c-common.c (braced_list_to_string): Remove eval parameter.
5678 Add some more checks. Always create zero-terminated STRING_CST.
5679 * c-common.h (braced_list_to_string): Adjust prototype.
5680
85204e23
DM
56812018-08-27 David Malcolm <dmalcolm@redhat.com>
5682
5683 PR 87091
5684 * c-common.c (c_cpp_error): Update for conversion of show_caret_p
5685 to a tri-state.
5686 (maybe_suggest_missing_token_insertion): Likewise.
5687 (maybe_add_include_fixit): Add param "override_location". If set,
5688 and source-printing is enabled, then override the rich_location's
5689 primary location with that of the insertion point for the fix-it
5690 hint, marking it with SHOW_LINES_WITHOUT_RANGE.
5691 * c-common.h (extern void maybe_add_include_fixit): Add bool
5692 param.
5693 * c-format.c (selftest::test_type_mismatch_range_labels): Update
5694 for conversion of show_caret_p to a tri-state.
5695 * c-warn.c (warn_for_restrict): Likewise.
5696 * known-headers.cc
5697 (suggest_missing_header::~suggest_missing_header): Update call to
5698 maybe_add_include_fixit to suggest overriding the location, as it
5699 is for a note.
5700
3d78e008
ML
57012018-08-27 Martin Liska <mliska@suse.cz>
5702
5703 * c-common.c (check_function_restrict): Use new function
92a285c1
ML
5704 fndecl_built_in_p and remove check for FUNCTION_DECL if
5705 possible.
3d78e008
ML
5706 (check_builtin_function_arguments): Likewise.
5707 (reject_gcc_builtin): Likewise.
5708 * c-warn.c (sizeof_pointer_memaccess_warning): Likewise.
5709
b5be6d0c
MP
57102018-08-26 Marek Polacek <polacek@redhat.com>
5711
5712 PR c++/87029, Implement -Wredundant-move.
5713 * c.opt (Wredundant-move): New option.
5714
79ca9c35
MP
57152018-08-21 Marek Polacek <polacek@redhat.com>
5716
5717 PR c++/86981, Implement -Wpessimizing-move.
5718 * c.opt (Wpessimizing-move): New option.
5719
097f82ec
DM
57202018-08-20 David Malcolm <dmalcolm@redhat.com>
5721
5722 PR other/84889
5723 * c-attribs.c (common_handle_aligned_attribute): Add
5724 auto_diagnostic_group instance.
5725 * c-indentation.c (warn_for_misleading_indentation): Likewise.
5726 * c-opts.c (c_common_post_options): Likewise.
5727 * c-warn.c (warn_logical_not_parentheses): Likewise.
5728 (warn_duplicated_cond_add_or_warn): Likewise.
5729 (warn_for_multistatement_macros): Likewise.
5730
3fb558b1
NS
57312018-08-20 Nathan Sidwell <nathan@acm.org>
5732
5733 * c-ada-spec.c (macro_length, dump_ada_macros): Adjust macro parm
5734 access.
5735
800c0e98
NS
57362018-08-17 Nathan Sidwell <nathan@acm.org>
5737
5738 * c-cppbuiltin.c (struct lazy_hex_fp_value_struct): Remove macro
5739 field.
5740 (laxy_hex_fp_value_count): Make unsigned.
5741 (lazy_hex_fp_value): Provided with macro & lazy number. Directly
5742 manipulate the macro.
5743 (builtin_defin_with_hex_fp_value): Adjust callback name, use
5744 cpp_define_lazily.
5745
6f795a92
DM
57462018-08-17 David Malcolm <dmalcolm@redhat.com>
5747
5748 * c-format.c (enum format_type): Add gcc_dump_printf_format_type.
5749 (gcc_dump_printf_length_specs): New.
5750 (gcc_dump_printf_flag_pairs): New.
5751 (gcc_dump_printf_flag_specs): New.
5752 (gcc_dump_printf_char_table): New.
5753 (format_types_orig): Add entry for "gcc_dump_printf".
5754 (init_dynamic_diag_info): Set up length_char_specs and
5755 conversion_specs for gcc_dump_printf_format_type.
5756 (handle_format_attribute): Handle gcc_dump_printf_format_type.
5757
c5d725c0
NS
57582018-08-17 Nathan Sidwell <nathan@acm.org>
5759
10f04917
NS
5760 * c-ada-spec.c (macro_length, dump_ada_macros): Constify.
5761
c5d725c0
NS
5762 * c-ada-spec.c: Don't #include "cpp-id-data.h"
5763 * c-cppbuiltin.c: Likewise.
5764
c0c12356
ML
57652018-08-17 Martin Liska <mliska@suse.cz>
5766
5767 * c.opt: Remove Warn, Init and Report for options with
92a285c1
ML
5768 Ignore/Deprecated flag. Warning is done automatically for
5769 Deprecated flags.
c0c12356 5770
10fcc142
DM
57712018-08-16 David Malcolm <dmalcolm@redhat.com>
5772
5773 PR c++/70693
5774 * c-common.c (selftest::c_family_tests): Call
5775 selftest::c_indentation_c_tests.
5776 * c-common.h (selftest::c_indentation_c_tests): New decl.
5777 * c-indentation.c: Include "selftest.h".
5778 (next_tab_stop): Add "tab_width" param, rather than accessing
5779 cpp_opts.
5780 (get_visual_column): Likewise. Clarify comment. Bulletproof
5781 against reading past the end of the line.
5782 (get_first_nws_vis_column): Add "tab_width" param.
5783 (detect_intervening_unindent): Likewise.
5784 (should_warn_for_misleading_indentation): Read tab width from
5785 cpp_opts and pass around.
5786 (selftest::test_next_tab_stop): New test.
5787 (selftest::assert_get_visual_column_succeeds): New function.
5788 (ASSERT_GET_VISUAL_COLUMN_SUCCEEDS): New macro.
5789 (selftest::assert_get_visual_column_fails): New function.
5790 (ASSERT_GET_VISUAL_COLUMN_FAILS): New macro.
5791 (selftest::test_get_visual_column): New test.
5792 (selftest::c_indentation_c_tests): New function.
5793
3f6677f4
NS
57942018-08-16 Nathan Sidwell <nathan@acm.org>
5795
5796 * c-ada-spec.c (count_ada_macro): Use cpp_user_macro_p.
5797 (store_ada_macro): Likewise.
5798 * c-ppoutput.c (cb_used_define, dump_macro): Likewise.
5799 * c-spellcheck.cc (should-suggest_as_macro_p): Likewise,
5800
96e6ae57
DM
58012018-08-15 David Malcolm <dmalcolm@redhat.com>
5802
5803 * c-format.c: Include "selftest-diagnostic.h" and
5804 "gcc-rich-location.h".
5805 (format_warning_at_char): Pass NULL for new label params of
5806 format_warning_va.
5807 (class indirection_suffix): New class.
5808 (class range_label_for_format_type_mismatch): New class.
5809 (format_type_warning): Move logic for generating "*" suffix to
5810 class indirection_suffix. Create "fmt_label" and "param_label"
5811 to show their types, and pass them to the
5812 format_warning_at_substring calls.
5813 (selftest::test_type_mismatch_range_labels): New test.
5814 (selftest::c_format_c_tests): Call it.
5815
23aa9f7c
MS
58162018-08-13 Martin Sebor <msebor@redhat.com>
5817
5818 PR tree-optimization/71625
5819 * c-common.c (braced_list_to_string): New function.
5820 * c-common.h (braced_list_to_string): Declare it.
5821
f10a9135
NS
58222018-08-08 Nathan Sidwell <nathan@acm.org>
5823
5824 * c-common.c (try_to_locate_new_include_inertion_point): Use
5825 linemap_included_from_linemap.
5826 * c-lex.c (fe_file_change): Use linemap_included_from.
5827 * c-ppoutput.c (pp_file_change): Likewise.
5828
8a45b051
MS
58292018-08-01 Martin Sebor <msebor@redhat.com>
5830
5831 PR tree-optimization/86650
ab20d992 5832 * c-format.c (gcc_tdiag_char_table): Update comment for "%G".
8a45b051
MS
5833 (gcc_cdiag_char_table, gcc_cxxdiag_char_table): Same.
5834 (init_dynamic_diag_info): Update from "gcall *" to "gimple *".
5835 * c-format.h (T89_G): Update to be "gimple *" rather than
5836 "gcall *".
5837 (local_gcall_ptr_node): Rename...
5838 (local_gimple_ptr_node): ...to this.
5839
e540ccc0
DM
58402018-07-31 David Malcolm <dmalcolm@redhat.com>
5841
5842 * c-format.c (PP_FORMAT_CHAR_TABLE): New macro, based on existing
5843 table entries for gcc_diag_char_table, and the 'Z' entry from
5844 gcc_tdiag_char_table, changing the "chain" entry for 'Z' from
5845 &gcc_tdiag_char_table[0] to &gcc_diag_char_table[0].
5846 (gcc_diag_char_table): Use PP_FORMAT_CHAR_TABLE, implicitly
5847 adding missing "Z" for this table. Remove erroneous "G" and "K"
5848 entries.
5849 (gcc_tdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
5850 (gcc_cdiag_char_table): Use PP_FORMAT_CHAR_TABLE.
5851 (gcc_cxxdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
5852
425fc685
RE
58532018-07-31 Richard Earnshaw <rearnsha@arm.com>
5854
5855 * c-common.c (speculation_safe_resolve_call): New function.
5856 (speculation_safe_resolve_params): New function.
5857 (speculation_safe_resolve_return): New function.
5858 (resolve_overloaded_builtin): Handle __builtin_speculation_safe_value.
5859 * c-cppbuiltin.c (c_cpp_builtins): Add pre-define for
5860 __HAVE_SPECULATION_SAFE_VALUE.
5861
181463c2
DM
58622018-07-20 David Malcolm <dmalcolm@redhat.com>
5863
5864 * c-common.c (c_cpp_error): Remove redundant "line_table"
5865 parameter from call to rich_location::set_range.
5866 (maybe_suggest_missing_token_insertion): Likewise.
5867
0d7f9065
MS
58682018-07-20 Martin Sebor <msebor@redhat.com>
5869
5870 PR middle-end/82063
ab20d992 5871 * c.opt (-Warray-bounds): Remove redundant -Wall.
0d7f9065 5872
00abf86c
MS
58732018-07-20 Martin Sebor <msebor@redhat.com>
5874
5875 PR middle-end/82063
5876 * c-common.h (c_common_handle_option): Change function argument
5877 to HOST_WIDE_INT.
5878 * c-opts.c (c_common_init_options): Same.
5879 (c_common_handle_option): Same. Remove special handling of
5880 OPT_Walloca_larger_than_ and OPT_Wvla_larger_than_.
5881 * c.opt (-Walloc-size-larger-than, -Walloca-larger-than): Change
5882 options to take a HOST_WIDE_INT argument and accept a byte-size
5883 suffix. Initialize.
5884 (-Wvla-larger-than): Same.
5885 (-Wno-alloc-size-larger-than, -Wno-alloca-larger-than): New.
5886 (-Wno-vla-larger-than): Same.
5887
9b452033
JJ
58882018-07-12 Jakub Jelinek <jakub@redhat.com>
5889
5890 * c-attribs.c (c_common_attribute_table): Add
5891 "omp declare target implicit" attribute.
5892
cd0762f3
RB
58932018-07-12 Richard Biener <rguenther@suse.de>
5894
5895 PR c/86453
5896 * c-attribs.c (handle_packed_attribute): Do not build a variant
5897 type with TYPE_PACKED, instead ignore the attribute if we may
5898 not apply to the original type.
5899
0b27c3ed
JJ
59002018-07-10 Jakub Jelinek <jakub@redhat.com>
5901
5902 PR c++/86443
5903 * c-omp.c (c_omp_check_loop_iv_r, c_omp_check_loop_iv): Allow declv
5904 to contain TREE_LIST for both the original class iterator and the
5905 "last" helper var.
5906
e730a0ef
EB
59072018-07-07 Eric Botcazou <ebotcazou@adacore.com>
5908
5909 * c-ada-spec.c (to_ada_name): Remove index parameter.
5910 (pp_ada_tree_identifier): Likewise.
5911 (dump_ada_macros): Adjust call to to_ada_name.
5912 (struct overloaded_name_hash): Delete.
5913 (struct overloaded_name_hasher): Likewise.
5914 (overloaded_names): Likewise.
5915 (compute_overloading_index): Likewise.
5916 (dump_ada_decl_name): Do not call compute_overloading_index and
5917 adjust calls to pp_ada_tree_identifier.
5918 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
5919 (dump_ada_import): Add spc parameter and switch to aspect syntax.
5920 (dump_ada_function_declaration): Adjust call to pp_ada_tree_identifier.
5921 (dump_ada_enum_type): Remove type and display_convention parameters.
5922 Adjust calls to pp_ada_tree_identifier.
5923 (dump_ada_node): Likewise and for dump_ada_structure.
5924 (dump_nested_type) <ENUMERAL_TYPE>: Adjust call to dump_ada_enum_type
5925 and tidy up.
5926 <RECORD_TYPE>: Adjust call to dump_ada_structure and switch to aspect
5927 syntax.
5928 (print_constructor): Adjust call to pp_ada_tree_identifier.
5929 (print_destructor): Likewise.
5930 (dump_ada_declaration): Switch to aspect syntax.
5931 (dump_ada_structure): Likewise and tidy up. Replace display_convention
5932 parameter with nested parameter.
5933 (dump_ads): Emit pragma Ada_2012 in lieu of pragma Ada_2005.
5934 (dump_ada_specs): Do not delete overloaded_names table.
5935
8de583fc
PB
59362018-07-06 Peter Bergner <bergner@linux.ibm.com>
5937
5938 PR target/86324
e730a0ef 5939 * c-attribs.c (handle_mode_attribute): Call translate_mode_attribute
8de583fc
PB
5940 target hook.
5941
09cff37b
NS
59422018-07-05 Nathan Sidwell <nathan@acm.org>
5943
5944 * c-lex.c (fe_file_change): Check SYSTEM_IMPLICIT_EXTERN_C not
5945 NO_IMPLICIT_EXTERN_C.
5946
98086b2b
ML
59472018-06-28 Martin Liska <mliska@suse.cz>
5948
5949 * cppspec.c: Include opt-suggestions.h.
5950
ab20d992
JJ
59512018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
5952 Thomas Schwinge <thomas@codesourcery.com>
829c6349
CLT
5953 Cesar Philippidis <cesar@codesourcery.com>
5954
5955 * c-pragma.h (enum pragma_omp_clause): Add
5956 PRAGMA_OACC_CLAUSE_{FINALIZE,IF_PRESENT}. Remove
5957 PRAGMA_OACC_CLAUSE_PRESENT_OR_{COPY,COPYIN,COPYOUT,CREATE}.
5958
f41b7612
JJ
59592018-06-20 Jakub Jelinek <jakub@redhat.com>
5960
5961 PR c++/86210
5962 * c-common.c (check_nonnull_arg): Use fold_for_warn. Adjust obsolete
5963 comment.
5964
4252ccd7
MS
59652018-06-18 Martin Sebor <msebor@redhat.com>
5966
5967 PR middle-end/85602
5968 * c-warn.c (sizeof_pointer_memaccess_warning): Check for attribute
5969 nonstring.
5970
e197e64e
KV
59712018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
5972
5973 * c-common.c (c_common_truthvalue_conversion): Handle ABSU_EXPR.
5974
34a7a230
JM
59752018-06-13 Jason Merrill <jason@redhat.com>
5976
5cef3733
JM
5977 * c-opts.c (c_common_post_options): Warn about useless -Wabi.
5978 (c_common_handle_option) [OPT_Wabi_]: Remove flag_abi_compat_version
5979 handling.
5980
34a7a230
JM
5981 PR c++/86094 - wrong code with defaulted move ctor.
5982 * c-opts.c (c_common_post_options): Bump the current ABI version to
5983 13. Set warn_abi_version and flag_abi_compat_version to the current
5984 version rather than 0. Fix defaulting flag_abi_compat_version from
5985 warn_abi_version.
5986
bb0f14ae
MS
59872018-06-12 Martin Sebor <msebor@redhat.com>
5988
5989 PR c/85931
5990 * c-warn.c (sizeof_pointer_memaccess_warning): Avoid warning when
5991 sizeof source and destination yields the same value.
5992
3713f2e2
ML
59932018-06-12 Martin Liska <mliska@suse.cz>
5994
5995 * c.opt: Make MPX-related options as Deprecated.
5996
4af78ef8
DM
59972018-06-08 David Malcolm <dmalcolm@redhat.com>
5998
5999 * c-pretty-print.c (c_pretty_printer::statement): Use TDF_NONE
6000 rather than 0.
6001
31db0fe0
ML
60022018-06-08 Martin Liska <mliska@suse.cz>
6003
6004 * c-attribs.c (handle_bnd_variable_size_attribute): Remove support
6005 for MPX (macros, related functions, fields in cgraph_node, ...).
6006 (handle_bnd_legacy): Likewise.
6007 (handle_bnd_instrument): Likewise.
6008 * c.opt: Likewise.
6009
fe16acf2
JJ
60102018-06-06 Jakub Jelinek <jakub@redhat.com>
6011
6012 PR c++/86068
6013 * c-cppbuiltin.c (c_cpp_builtins): Fix a typo, set
6014 __cpp_transactional_memory to 201500 instead of 210500.
6015
4dbdb49b
JM
60162018-06-06 Jason Merrill <jason@redhat.com>
6017
6018 PR c++/85710 - ICE with -Wmemset-elt-size.
6019 * c-warn.c (warn_for_memset): Don't crash on incomplete element type.
6020
f8ad043f
JM
60212018-06-01 Jason Merrill <jason@redhat.com>
6022
6023 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_deduction_guides to
6024 201703.
6025
abc24d93
EB
60262018-06-01 Eric Botcazou <ebotcazou@adacore.com>
6027
6028 * c-ada-spec.c (dump_ada_declaration) <TYPE_DECL>: Generate a forward
6029 declaration for a typedef independently of whether the declaration of
6030 the subtype is generated.
6031
d258f4aa
MS
60322018-05-31 Martin Sebor <msebor@redhat.com>
6033
6034 PR c/82063
6035 * c.opt (-Wno-alloc-size-larger-than): New option.
6036
b67b9225
DP
60372018-04-22 David Pagan <dave.pagan@oracle.com>
6038
6039 PR c/55976
6040 * c-opts.c (c_common_post_options): Set default for warn_return_type
ab20d992 6041 for C++/C++ with ObjC extensions only. For C, makes it possible to
b67b9225
DP
6042 differentiate between default (no option), -Wreturn-type, and
6043 -Wno-return-type.
6044
04eb9c55
JM
60452018-05-29 Jason Merrill <jason@redhat.com>
6046
6047 * c.opt (Winit-list-lifetime): New flag.
6048
b0c31bc6
BE
60492018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
6050
6051 * c-lex.c (get_fileinfo): Use splay_tree_compare_strings and
6052 splay_tree_delete_pointers.
6053
44284983
JJ
60542018-05-26 Jakub Jelinek <jakub@redhat.com>
6055
6056 PR bootstrap/85921
6057 * c-warn.c (diagnose_mismatched_attributes): Remove unnecessary
6058 noinline variable to workaround broken kernel headers.
6059
b46b715d
JM
60602018-05-18 Jason Merrill <jason@redhat.com>
6061
6062 * c.opt (Wdeprecated-copy): New flag.
6063
40659769
ML
60642018-05-17 Martin Liska <mliska@suse.cz>
6065
6066 * c-warn.c (overflow_warning): Do not use
6067 space in between 'G_' and '('.
6068
403962ea
JM
60692018-05-09 Jason Merrill <jason@redhat.com>
6070
6071 * c-common.c (valid_array_size_p): Add complain parameter.
6072 * c-common.h: ...which defaults to true.
6073
1c9ee609
JJ
60742018-05-11 Jakub Jelinek <jakub@redhat.com>
6075
6076 PR c/85696
6077 * c-omp.c (c_omp_predetermined_sharing): Return
6078 OMP_CLAUSE_DEFAULT_SHARED for artificial vars with integral type.
6079
19916065
ML
60802018-05-11 Martin Liska <mliska@suse.cz>
6081
92a285c1 6082 PR sanitizer/85556
19916065
ML
6083 * c-attribs.c (handle_no_sanitize_attribute): Iterate all
6084 TREE_LIST values.
6085
79e7b1fe
JJ
60862018-05-10 Jakub Jelinek <jakub@redhat.com>
6087
6088 PR c++/85662
6089 * c-common.h (fold_offsetof_1): Removed.
6090 (fold_offsetof): Add TYPE argument defaulted to size_type_node and
6091 CTX argument defaulted to ERROR_MARK.
6092 * c-common.c (fold_offsetof_1): Renamed to ...
6093 (fold_offsetof): ... this. Remove wrapper function. Add TYPE
6094 argument, convert the pointer constant to TYPE and use size_binop
6095 with PLUS_EXPR instead of fold_build_pointer_plus if type is not
6096 a pointer type. Adjust recursive calls.
6097
86c12f76
EB
60982018-05-10 Eric Botcazou <ebotcazou@adacore.com>
6099
6100 PR c++/85400
6101 * c-attribs.c (handle_visibility_attribute): Do not set no_add_attrs.
6102
ee336e84
NS
61032018-05-07 Nathan Sidwell <nathan@acm.org>
6104
6105 * c.opt (ffor-scope): Remove functionality, issue warning.
6106
6c072e21
NS
61072018-05-03 Nathan Sidwell <nathan@acm.org>
6108
6109 * c.opt (ffriend-injection): Remove functionality, issue warning.
6110
2cc7d3a7
DM
61112018-05-01 David Malcolm <dmalcolm@redhat.com>
6112
6113 PR c/84258
6114 * c-format.c (struct format_check_results): Add field
6115 "number_non_char".
6116 (check_format_info): Initialize it, and warn if encountered.
6117 (check_format_arg): Distinguish between wide char and
6118 everything else when detecting arrays of non-char.
6119
7761dfbe
DM
61202018-04-30 David Malcolm <dmalcolm@redhat.com>
6121
6122 * c-format.c (get_corrected_substring): Update for
6123 location_get_source_line returning a char_span. Use a char_span
6124 when handling the prefix of the correction.
6125 * c-indentation.c (get_visual_column): Update for
6126 location_get_source_line returning a char_span.
6127 (get_first_nws_vis_column): Likewise.
6128
62e98ef1
DM
61292018-03-29 David Malcolm <dmalcolm@redhat.com>
6130
6131 PR c++/84269
6132 * known-headers.cc (get_stdlib_header_for_name): Add various names
6133 from <assert.h>, <string.h>, and <memory.h>; add more names from
6134 <stdio.h>.
6135
a7dea617
JJ
61362018-03-27 Jakub Jelinek <jakub@redhat.com>
6137
6138 PR c++/85061
6139 * c-common.c (fold_offsetof_1) <case COMPOUND_EXPR>: Assert that
6140 get_base_address of the second operand is a VAR_P, rather than the
6141 operand itself, and use gcc_checking_assert instead of gcc_assert.
6142
889a3a30
MP
61432018-03-23 Marek Polacek <polacek@redhat.com>
6144
6145 PR c++/85045
6146 * c-pretty-print.c (c_pretty_printer::multiplicative_expression)
6147 <case RDIV_EXPR>: Tweak condition.
6148
452154b9
EB
61492018-03-20 Eric Botcazou <ebotcazou@adacore.com>
6150
6151 * c-ada-spec.c (pp_ada_tree_identifier): Deal specifically with _Bool.
6152
63ecb626
JJ
61532018-03-16 Jakub Jelinek <jakub@redhat.com>
6154
ce811fc4
JJ
6155 PR c/84909
6156 * c-warn.c (conversion_warning): Replace "to to" with "to" in
6157 diagnostics.
6158
63ecb626
JJ
6159 PR c/84910
6160 * c-warn.c (diagnose_mismatched_attributes): Remove trailing space from
6161 diagnostics.
6162
a1295eec
RB
61632018-03-16 Richard Biener <rguenther@suse.de>
6164
6165 PR c/84873
6166 * c-gimplify.c (c_gimplify_expr): Revert previous change. Instead
6167 unshare the possibly folded expression.
6168
919674fb
RB
61692018-03-15 Richard Biener <rguenther@suse.de>
6170
6171 PR c/84873
6172 * c-gimplify.c (c_gimplify_expr): Do not fold expressions.
6173
f99309b2
MS
61742018-03-13 Martin Sebor <msebor@redhat.com>
6175
6176 PR tree-optimization/84725
6177 * c-attribs.c (handle_nonstring_attribute): Allow attribute nonstring
6178 with all three narrow character types, including their qualified forms.
6179
e9b9fa4c
MS
61802018-03-12 Martin Sebor <msebor@redhat.com>
6181
6182 PR tree-optimization/83456
ab20d992 6183 * c-common.c (check_function_restrict): Return bool.
e9b9fa4c
MS
6184 Restore checking of bounded built-in functions.
6185 (check_function_arguments): Also return the result
6186 of warn_for_restrict.
ab20d992
JJ
6187 * c-common.c (check_function_restrict): Return bool.
6188 * c-warn.c (warn_for_restrict): Return bool.
e9b9fa4c 6189
0805d020
MP
61902018-03-02 Marek Polacek <polacek@redhat.com>
6191
6192 PR c++/84171
6193 * c-warn.c (warn_for_sign_compare): Bail out if any of the operands
6194 is erroneous.
6195
ed2a2f08
TS
61962018-03-02 Thomas Schwinge <thomas@codesourcery.com>
6197
6198 * c-attribs.c (c_common_attribute_table): Remove "cilk simd
6199 function".
6200
90abdde0
MP
62012018-03-01 Marek Polacek <polacek@redhat.com>
6202
6203 PR c++/84639
6204 * c-attribs.c (common_handle_aligned_attribute): Don't use invalid
6205 alignment in computation.
6206
c6db43fa
EB
62072018-02-28 Eric Botcazou <ebotcazou@adacore.com>
6208
6209 * c-ada-spec.c (dump_ada_node) <NULLPTR_TYPE>: New case.
6210 <REAL_TYPE>: Deal specifically with _Float128/__float128.
6211
9e25c7ed
EB
62122018-02-28 Eric Botcazou <ebotcazou@adacore.com>
6213
6214 * c-ada-spec.c (dump_ada_double_name) <ENUMERAL_TYPE>: New case.
6215 (is_char_array): Take a type instead of a declaration.
6216 (dump_ada_array_type): Likewise.
6217 (is_simple_enum): Minor tweak.
6218 (dump_ada_enum_type): New function extracted from...
6219 (dump_ada_node) <ENUMERAL_TYPE>: ...here. Invoke it.
6220 <INTEGER_TYPE>: Remove unreachable code.
6221 <RECORD_TYPE>: Likewise. Minor tweaks.
6222 (dump_nested_type) <ARRAY_TYPE>: Adjust to above changes.
6223 <ENUMERAL_TYPE>: New case.
6224 <RECORD_TYPE>: Factor out common code.
6225 (dump_ada_declaration) <ARRAY_TYPE>: Adjust to above changes.
6226 Minor tweaks. Deal with enumeral types.
6227 (dump_ada_structure): Minor tweaks.
6228
09de3550
EB
62292018-02-28 Eric Botcazou <ebotcazou@adacore.com>
6230
6231 * c-ada-spec.c (dump_ada_node) <POINTER_TYPE>: Do not use generic
6232 address for incomplete structures.
6233 (dump_forward_type): Do not bail out for incomplete structures.
6234 (dump_ada_declaration): Do not special-case incomplete structures
6235 for subtypes. Dump them as null records for types.
6236
095d8d4b
EB
62372018-02-28 Eric Botcazou <ebotcazou@adacore.com>
6238
6239 * c-ada-spec.c (dump_ada_import): Use boolean and fix formatting.
6240 (is_char_array): Fix formatting.
6241 (dump_template_types): Likewise.
6242 (dump_generic_ada_node): Rename into...
6243 (dump_ada_node): ...this.
6244 <POINTER_TYPE>: Remove superfluous space. Use generic address for
6245 incomplete structures and not for empty structures. Do not use it
6246 when forward declarations are needed.
6247 (dump_forward_type): New function.
6248 (dump_nested_types): Remove FORWARD parameter. Do not consider
6249 TREE_VISITED and do not generate a forward declaration. Only dump
6250 original nested types for nested declaration.
6251 (dump_nested_type) <POINTER_TYPE>: Call dump_forward_type.
6252 <ARRAY_TYPE>: Likewise if the component type is an anonymous pointer.
6253 <RECORD_TYPE>: Do not consider TREE_VISITED.
6254 (dump_ada_declaration): Use booleans and fix formatting throughout.
6255 <TYPE_DECL>: Skip incomplete structures and not empty structures.
6256 Call dump_forward_type instead of dump_nested_types for a typedef.
6257 Remove superfluous check and adjust call to dump_nested_types.
6258 <POINTER_TYPE>: Call dump_forward_type and fall through.
6259 (dump_ada_struct_decl): Rename into...
6260 (dump_ada_structure): ...this. Do not special-case empty structures.
6261
d4cfd486
MS
62622018-02-27 Martin Sebor <msebor@redhat.com>
6263
6264 PR c++/83871
6265 * c.opt (-Wmissing-attributes): New option.
6266
b22dbd03
ML
62672018-02-21 Martin Liska <mliska@suse.cz>
6268
6269 * c.opt (Wcatch-value=): Add IntegerRange.
6270
883dfe2a
JM
62712018-02-15 Jason Merrill <jason@redhat.com>
6272
6273 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_deduction_guides.
6274
0444aa9c
NS
62752018-02-09 Nathan Sidwell <nathan@acm.org>
6276
6277 PR c/84293
6278 * c-common.h (strict_aliasing_warning): Drop OTYPE arg, insert LOC
6279 arg.
6280 * c-warn.c (strict_aliasing_warning): Drop OTYPE arg, require LOC
6281 arg. Adjust.
6282
cea71f0a
MS
62832018-02-09 Martin Sebor <msebor@redhat.com>
6284
6285 PR lto/84212
6286 * c.opt (-Wstringop-overflow, -Warray-bounds): Add LTO.
6287 (-Walloc-size-larger-than, -Wformat-truncation=): Same.
6288 (-Wmaybe-uninitialized, -Wnonnull, -Wrestrict): Same.
6289 (-Wstrict-overflow, -Wsuggest-attribute): Same.
6290 (-Wuninitialized): Same.
6291
8c8b7be5
EB
62922018-02-09 Eric Botcazou <ebotcazou@adacore.com>
6293
6294 * c-ada-spec.c (dump_ada_declaration): Do not generate the 'constant'
6295 keyword for components.
6296
7c30b12a
PC
62972018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
6298
6299 * c-common.h (DECL_UNNAMED_BIT_FIELD): New.
6300
eece7fe5
JK
63012018-02-02 Julia Koval <julia.koval@intel.com>
6302
6303 * c-common.h (omp_clause_mask): Move to wide_int_bitmask.h.
6304
7d07a93a
MP
63052018-01-29 Marek Polacek <polacek@redhat.com>
6306
6307 PR c/83966
6308 * c-format.c (check_function_format): Check current_function_decl.
6309
53723269
JJ
63102018-01-27 Jakub Jelinek <jakub@redhat.com>
6311
6312 * c-cppbuiltin.c (c_cpp_builtins): Use ggc_strdup for the fp_suffix
6313 argument.
6314 (LAZY_HEX_FP_VALUES_CNT): Define.
6315 (lazy_hex_fp_values): Allow up to LAZY_HEX_FP_VALUES_CNT lazy hex fp
6316 values rather than just 12.
6317 (builtin_define_with_hex_fp_value): Likewise.
6318
7365279f
BK
63192018-01-18 Boris Kolpackov <boris@codesynthesis.com>
6320
92a285c1
ML
6321 PR other/70268
6322 * c.opt (-fmacro-prefix-map): New option.
6323 * c-opts.c (c_common_handle_option): Handle it.
6324 * c-lex.c (init_c_lex): Set remap_filename cpp callback.
6325 * c-ppoutput.c (init_pp_output): Likewise.
7365279f 6326
bb9869d5
DM
63272018-01-17 David Malcolm <dmalcolm@redhat.com>
6328
6329 PR c++/83814
6330 * c-common.c (fold_for_warn): Move to c/c-fold.c and cp/expr.c.
6331
68dc87c3
EB
63322018-01-10 Eric Botcazou <ebotcazou@adacore.com>
6333
6334 * c-ada-spec.c (dump_number): Add FLOAT_P parameter.
6335 Skip 'f' and 'F' characters if it is true.
6336 (store_ada_macro): Minor tweak.
6337 (dump_ada_macros) <CPP_COMMENT>: Likewise.
6338 <CPP_WSTRING>: Likewise.
6339 <CPP_STRING>: Output '&' in the buffer if not the first string.
6340 <CPP_NUMBER>: Adjust calls to dump_number.
6341
9a004410
DM
63422018-01-10 David Malcolm <dmalcolm@redhat.com>
6343
6344 PR c++/43486
6345 * c-common.c: Include "selftest.h".
6346 (get_atomic_generic_size): Perform the test for integral type
6347 before the range test for any integer constant, fixing indentation
6348 of braces. Call fold_for_warn before testing for an INTEGER_CST.
6349 (reject_gcc_builtin): Strip any location wrapper from EXPR.
6350 (selftest::test_fold_for_warn): New function.
6351 (selftest::c_common_c_tests): New function.
6352 (selftest::c_family_tests): Call it, and
6353 selftest::c_pretty_print_c_tests.
6354 * c-common.h (selftest::c_pretty_print_c_tests): New decl.
6355 * c-format.c (check_format_arg): Convert VAR_P check to a
6356 fold_for_warn.
6357 * c-pretty-print.c: Include "selftest.h".
6358 (pp_c_cast_expression): Don't print casts for location wrappers.
6359 (selftest::assert_c_pretty_printer_output): New function.
6360 (ASSERT_C_PRETTY_PRINTER_OUTPUT): New macro.
6361 (selftest::test_location_wrappers): New function.
6362 (selftest::c_pretty_print_c_tests): New function.
6363 * c-warn.c (warn_for_memset): Call fold_for_warn on the arguments.
6364
5c0caeb3
RS
63652018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
6366 Alan Hayward <alan.hayward@arm.com>
6367 David Sherwood <david.sherwood@arm.com>
6368
6369 * c-common.c (c_common_type_for_mode): Handle MODE_VECTOR_BOOL.
6370
73a699ae
RS
63712018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
6372 Alan Hayward <alan.hayward@arm.com>
6373 David Sherwood <david.sherwood@arm.com>
6374
6375 * c-ubsan.c (ubsan_instrument_shift): Treat GET_MODE_BITSIZE
6376 as polynomial.
6377
928686b1
RS
63782018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
6379 Alan Hayward <alan.hayward@arm.com>
6380 David Sherwood <david.sherwood@arm.com>
6381
6382 * c-common.c (vector_types_convertible_p, c_build_vec_perm_expr)
6383 (convert_vector_to_array_for_subscript): Handle polynomial
6384 TYPE_VECTOR_SUBPARTS.
6385 (c_common_type_for_mode): Check valid_vector_subparts_p.
6386 * c-pretty-print.c (pp_c_initializer_list): Handle polynomial
6387 VECTOR_CST_NELTS.
6388
85ec4feb
JJ
63892018-01-03 Jakub Jelinek <jakub@redhat.com>
6390
6391 Update copyright years.
6392
170a8bd6 63932017-12-22 Mike Stump <mikestump@comcast.net>
92a285c1 6394 Eric Botcazou <ebotcazou@adacore.com>
170a8bd6
EB
6395
6396 * c-pragma.c (init_pragma): Register pragma GCC unroll.
6397 * c-pragma.h (enum pragma_kind): Add PRAGMA_UNROLL.
6398
ab20d992 63992017-12-22 Alexandre Oliva <aoliva@redhat.com>
18408e96
AO
6400
6401 PR debug/83527
6402 PR debug/83419
6403 * c-semantics.c (only_debug_stmts_after_p): New.
6404 (pop_stmt_list): Clear side effects in debug-only stmt list.
6405 Check for single nondebug stmt followed by debug stmts only.
6406
c12d20d4
AO
64072017-12-21 Alexandre Oliva <aoliva@redhat.com>
6408
6409 PR debug/83419
6410 * c-semantics.c (pop_stmt_list): Propagate side effects from
6411 single nondebug stmt to container list.
6412
01512446
JJ
64132017-12-19 Jakub Jelinek <jakub@redhat.com>
6414
6415 * known-headers.cc (get_stdlib_header_for_name): Replace Yoda
6416 conditions with typical order conditions.
6417
82cfbd01
MP
64182017-12-18 Marek Polacek <polacek@redhat.com>
6419
6420 * c-warn.c (warn_logical_operator): Return early if -Wlogical-op is
6421 not in effect.
6422
99da11ec
MS
64232017-12-17 Martin Sebor <msebor@redhat.com>
6424
6425 * c-attribs.c (common_handle_aligned_attribute): Avoid issuing
6426 an error for attribute warn_if_not_aligned.
6427
cc8bea0a
MS
64282017-12-16 Martin Sebor <msebor@redhat.com>
6429
6430 PR tree-optimization/78918
6431 * c-common.c (check_function_restrict): Avoid checking built-ins.
6432 * c.opt (-Wrestrict): Include in -Wall.
6433
4849deb1
JJ
64342017-12-15 Jakub Jelinek <jakub@redhat.com>
6435
6436 * c-attribs.c (c_common_attribute_table,
6437 c_common_format_attribute_table): Swap affects_type_identity
6438 and handler fields, adjust comments.
6439
c65e18d3
BE
64402017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
6441
6442 * c.opt (Wcast-function-type): New warning option.
6443 * c-lex.c (get_fileinfo): Avoid warning.
6444 * c-ppoutput.c (scan_translation_unit_directives_only): Remove cast.
6445
2004617a
QZ
64462017-12-14 Qing Zhao <qing.zhao@oracle.com>
6447
7365279f 6448 PR middle_end/79538
2004617a
QZ
6449 * c-cppbuiltin.c (builtin_define_with_hex_fp_value):
6450 Adjust the size of buf1 and buf2, add a new buf to avoid
6451 format-overflow warning.
6452
ab20d992 64532017-12-12 Alexandre Oliva <aoliva@redhat.com>
96a95ac1
AO
6454
6455 * c-semantics.c (pop_stmt_list): Move begin stmt marker into
6456 subsequent statement list.
6457
5d9ae53d
MS
64582017-12-07 Martin Sebor <msebor@redhat.com>
6459
6460 PR c/81544
6461 PR c/81566
6462 * c-attribs.c (attr_aligned_exclusions): New array.
6463 (attr_alloc_exclusions, attr_cold_hot_exclusions): Same.
6464 (attr_common_exclusions, attr_const_pure_exclusions): Same.
6465 (attr_gnu_inline_exclusions, attr_inline_exclusions): Same.
6466 (attr_noreturn_exclusions, attr_returns_twice_exclusions): Same.
6467 (attr_warn_unused_result_exclusions): Same.
6468 (handle_hot_attribute, handle_cold_attribute): Simplify.
6469 (handle_const_attribute): Warn on function returning void.
6470 (handle_pure_attribute): Same.
6471 (handle_aligned_attribute): Diagnose conflicting attribute
6472 specifications.
6473 * c-warn.c (diagnose_mismatched_attributes): Simplify.
6474
c79144f8
DM
64752017-12-06 David Malcolm <dmalcolm@redhat.com>
6476
6477 PR c/83236
6478 * c-common.c (selftest::c_family_tests): Call
6479 selftest::c_spellcheck_cc_tests.
6480 * c-common.h (selftest::c_spellcheck_cc_tests): New decl.
6481 * c-spellcheck.cc: Include "selftest.h".
6482 (name_reserved_for_implementation_p): New function.
6483 (should_suggest_as_macro_p): New function.
6484 (find_closest_macro_cpp_cb): Move the check for NT_MACRO to
6485 should_suggest_as_macro_p and call it.
6486 (selftest::test_name_reserved_for_implementation_p): New function.
6487 (selftest::c_spellcheck_cc_tests): New function.
6488 * c-spellcheck.h (name_reserved_for_implementation_p): New decl.
6489
613bc14f
DM
64902017-12-06 David Malcolm <dmalcolm@redhat.com>
6491
6492 * c-spellcheck.cc: New file, taken from macro-handling code in
6493 spellcheck-tree.c.
6494 * c-spellcheck.h: New file, taken from macro-handling code in
6495 spellcheck-tree.h.
6496
e76c7157
JJ
64972017-12-01 Jakub Jelinek <jakub@redhat.com>
6498
6499 * c-attribs.c (c_common_attribute_table): Remove "cilk simd function"
6500 attribute.
6501 (handle_simd_attribute): Don't check for "cilk simd function"
6502 attribute. Reindent, formatting changes.
6503
b0da4034
JK
65042017-11-30 Julia Koval <julia.koval@intel.com>
6505
6506 * c-common.h (inv_list): Remove.
6507
058f0b9e
JJ
65082017-11-28 Jakub Jelinek <jakub@redhat.com>
6509
6510 PR sanitizer/81275
6511 * c-common.c (c_switch_covers_all_cases_p_1,
6512 c_switch_covers_all_cases_p): New functions.
6513 * c-common.h (c_switch_covers_all_cases_p): Declare.
6514
5e9d6aa4 65152017-11-28 Julia Koval <julia.koval@intel.com>
92a285c1 6516 Sebastian Peryt <sebastian.peryt@intel.com>
5e9d6aa4
JK
6517
6518 * array-notation-common.c: Delete.
6519 * c-cilkplus.c: Ditto.
6520 * c-common.c (_Cilk_spawn, _Cilk_sync, _Cilk_for): Remove.
6521 * c-common.def (ARRAY_NOTATION_REF): Remove.
6522 * c-common.h (RID_CILK_SPAWN, build_array_notation_expr,
6523 build_array_notation_ref, C_ORT_CILK, c_check_cilk_loop,
6524 c_validate_cilk_plus_loop, cilkplus_an_parts,
6525 cilk_ignorable_spawn_rhs_op,
6526 cilk_recognize_spawn): Remove.
6527 * c-gimplify.c (CILK_SPAWN_STMT): Remove.
6528 * c-omp.c: Remove CILK_SIMD check.
6529 * c-pragma.c: Ditto.
6530 * c-pragma.h: Remove CILK related pragmas.
6531 * c-pretty-print.c (c_pretty_printer::postfix_expression): Remove
6532 ARRAY_NOTATION_REF condition.
6533 (c_pretty_printer::expression): Ditto.
6534 * c.opt (fcilkplus): Remove.
6535 * cilk.c: Delete.
6536
1af4ebf5
MG
65372017-11-21 Marc Glisse <marc.glisse@inria.fr>
6538
6539 * c-pretty-print.c (pp_c_additive_expression,
6540 c_pretty_printer::expression): Handle POINTER_DIFF_EXPR.
6541
d44ed508
JJ
65422017-11-21 Jakub Jelinek <jakub@redhat.com>
6543
7d2f0f9b
JJ
6544 * c-common.c (get_nonnull_operand): Use tree_to_uhwi.
6545
d44ed508
JJ
6546 PR c++/83059
6547 * c-common.c (get_atomic_generic_size): Use TREE_INT_CST_LOW
6548 instead of tree_to_uhwi, formatting fix.
6549
26edace6
DM
65502017-11-20 David Malcolm <dmalcolm@redhat.com>
6551
6552 PR c/81404
6553 * known-headers.cc: New file, based on material from c/c-decl.c.
6554 (suggest_missing_header): Copied as-is.
6555 (get_stdlib_header_for_name): New, based on get_c_name_hint but
6556 heavily edited to add C++ support. Add some knowledge about
6557 <limits.h>, <stdint.h>, and <wchar.h>.
6558 * known-headers.h: Likewise.
6559
6c7a259b
DM
65602017-11-20 David Malcolm <dmalcolm@redhat.com>
6561
6562 * c-common.h (enum lookup_name_fuzzy_kind): Move to name-hint.h.
6563 (lookup_name_fuzzy): Likewise. Convert return type from
6564 const char * to name_hint. Add location_t param.
6565 * name-hint.h: New header.
6566
f9c59f7e
JJ
65672017-11-19 Jakub Jelinek <jakub@redhat.com>
6568
6569 PR c/66618
6570 PR c/69960
6571 * c-common.h (c_fully_fold): Add LVAL argument defaulted to false.
6572
1e39313a
JM
65732017-11-16 Joseph Myers <joseph@codesourcery.com>
6574
6575 * c.opt (-std=c17, std=gnu17, -std=iso9899:2017): Refer to 2018
6576 expected publication date of C17.
6577 (-std=c18, -std=gnu18, -std=iso9899:2018): New option aliases.
6578
3ca0dc60
JM
65792017-11-15 Joseph Myers <joseph@codesourcery.com>
6580
6581 PR c/81156
6582 * c-common.c (c_common_reswords): Add __builtin_tgmath.
6583 * c-common.h (enum rid): Add RID_BUILTIN_TGMATH.
6584
025d57f0
MS
65852017-11-10 Martin Sebor <msebor@redhat.com>
6586
6587 PR c/81117
6588 * c-common.c (catenate_strings): Use memcpy instead of strncpy.
6589 * c-warn.c (sizeof_pointer_memaccess_warning): Handle arrays.
6590 * c.opt (-Wstringop-truncation): New option.
6591
1b6fa695
ML
65922017-11-06 Martin Liska <mliska@suse.cz>
6593
6594 PR middle-end/82404
6595 * c-opts.c (c_common_post_options): Set -Wreturn-type for C++
6596 FE.
6597 * c.opt: Set default value of warn_return_type.
6598
64a5912c
DM
65992017-10-31 David Malcolm <dmalcolm@redhat.com>
6600
6601 * c-common.c (binary_op_error): Update for renaming of
6602 error_at_rich_loc.
6603 (c_parse_error): Likewise.
6604 * c-warn.c (warn_logical_not_parentheses): Likewise for
6605 renaming of inform_at_rich_loc.
6606 (warn_for_restrict): Likewise for renaming of
6607 warning_at_rich_loc_n.
6608
c76dc9c3
JM
66092017-10-30 Joseph Myers <joseph@codesourcery.com>
6610
6611 * c.opt (std=c17, std=gnu17, std=iso9899:2017): New options.
6612 * c-opts.c (set_std_c17): New function.
6613 (c_common_init_options): Use gnu17 as default C version.
6614 (c_common_handle_option): Handle -std=c17 and -std=gnu17.
6615
ee5fd23a
MM
66162017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
6617
6618 * c-cppbuiltin.c (mode_has_fma): Add support for PowerPC KFmode.
6619 (c_cpp_builtins): If a machine has a fast fma _Float<N> and
6620 _Float<N>X variant, define __FP_FAST_FMA<N> and/or
6621 __FP_FAST_FMA<N>X.
6622
d1047465
MP
66232017-10-23 Marek Polacek <polacek@redhat.com>
6624
6625 PR c/82681
6626 * c-warn.c (warnings_for_convert_and_check): Fix typos.
6627
9e878cf1
EB
66282017-10-19 Eric Botcazou <ebotcazou@adacore.com>
6629
6630 * c-common.c (check_builtin_function_arguments): Also check arguments
6631 of __builtin_alloca_with_align_and_max.
6632
89b6abbb
DM
66332017-10-17 David Malcolm <dmalcolm@redhat.com>
6634
6635 * c-format.c (format_warning_at_char): Pass UNKNOWN_LOCATION
6636 rather than NULL to format_warning_va.
6637 (check_format_types): Likewise when calling format_type_warning.
6638 Remove code to extract source_ranges and source_range * in favor
6639 of just a location_t.
6640 (format_type_warning): Convert source_range * param to a
6641 location_t.
6642
39382c09
JJ
66432017-10-13 Jakub Jelinek <jakub@redhat.com>
6644
6645 * c-gimplify.c (c_gimplify_expr): Handle [LR]ROTATE_EXPR like
6646 [LR]SHIFT_EXPR.
6647
62e1c678
DM
66482017-10-12 David Malcolm <dmalcolm@redhat.com>
6649
6650 * c-common.c (enum missing_token_insertion_kind): New enum.
6651 (get_missing_token_insertion_kind): New function.
6652 (maybe_suggest_missing_token_insertion): New function.
6653 * c-common.h (maybe_suggest_missing_token_insertion): New decl.
6654
b90c9338
NS
66552017-10-11 Nathan Sidwell <nathan@acm.org>
6656
6657 * c-opts.c (add_prefixed_path): Change chain to incpath_kind.
6658 (c_common_handle_option): Update incpath_kind names.
6659
3a266bcd
ML
66602017-10-11 Martin Liska <mliska@suse.cz>
6661
6662 PR sanitizer/82490
6663 * c-attribs.c (handle_no_sanitize_attribute): Report directly
6664 Wattributes warning.
6665
8e6cdc90
RS
66662017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
6667
6668 * c-ada-spec.c (dump_generic_ada_node): Use wi::to_wide when
6669 operating on trees as wide_ints.
6670 * c-common.c (pointer_int_sum): Likewise.
6671 * c-pretty-print.c (pp_c_integer_constant): Likewise.
6672 * c-warn.c (match_case_to_enum_1): Likewise.
6673 (c_do_switch_warnings): Likewise.
6674 (maybe_warn_shift_overflow): Likewise.
6675
802b38c9
JJ
66762017-10-10 Jakub Jelinek <jakub@redhat.com>
6677
6678 PR c/82437
6679 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_wide
6680 instead of wide_int::from.
6681
4e34b338
JJ
66822017-10-06 Jakub Jelinek <jakub@redhat.com>
6683
6684 PR c/82437
6685 * c-warn.c (warn_tautological_bitwise_comparison): Instead of
6686 using to_widest use wide_int with the larger of the two precisions.
6687
4bc4b2b4
BE
66882017-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
6689
6690 * c-pretty-print.c (pp_c_parameter_type_list): Print ... for variadic
6691 functions.
6692
a1488398
RS
66932017-10-02 Richard Sandiford <richard.sandiford@linaro.org>
6694
6695 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_widest
6696 when combining the original unconverted comparison operands.
6697
01c9fb68
JJ
66982017-09-29 Jakub Jelinek <jakub@redhat.com>
6699
6700 * c-attribs.c (handle_noipa_attribute): Don't add "stack_protect"
6701 attribute.
6702
6e3e8419
EB
67032017-09-29 Eric Botcazou <ebotcazou@adacore.com>
6704
6705 * c-ada-spec.c (to_ada_name): Add index parameter.
6706 (pp_ada_tree_identifier): Likewise.
6707 (dump_ada_macros): Adjust call to to_ada_name.
6708 (struct overloaded_name_hash): New type.
6709 (struct overloaded_name_hasher): Likewise.
6710 (overloaded_names): New hash table.
6711 (compute_overloading_index): New function.
6712 (dump_ada_decl_name): Call it and pass the result to
6713 pp_ada_tree_identifier.
6714 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
6715 (dump_ada_function_declaration): Likewise.
6716 (dump_generic_ada_node): Likewise.
6717 (print_constructor): Likewise.
6718 (print_destructor): Likewise.
6719 (dump_ada_specs): Delete overloaded_names table.
6720
79310774
EB
67212017-09-29 Eric Botcazou <ebotcazou@adacore.com>
6722
6723 * c-ada-spec.c (max_ada_macros): Move around.
6724 (store_ada_macro_index): Likewise.
6725 (source_file): Rename into...
6726 (macro_source_file): ...this.
6727 (count_ada_macro): Move around.
6728 (store_ada_macro): Likewise.
6729 (compare_macro): Likewise.
6730 (print_ada_macros): Merge in...
6731 (dump_ada_macros): ...this.
6732 (source_file_base): Rename into...
6733 (current_source_file): ...this.
6734 (print_comment): Move around.
6735 (dump_ada_nodes): Call dump_ada_declaration directly.
6736 (struct with): Change type of limited field to bool.
6737 (append_withs): Change type of limited_access parameter to bool.
6738 (pp_ada_tree_identifie): Likewise.
6739 (dump_ada_decl_nam): Likewise.
6740 (dump_generic_ada_node): Likewise. Do not print the return type.
6741 (to_ada_name): Change type of space_found parameter to bool.
6742 (dump_ada_function_declaration): Return void and change type of
6743 parameters to bool. Also print the return type for a function.
6744 (print_ada_methods): Rename into...
6745 (dump_ada_methods): ...this.
6746 (print_ada_declaration): Rename into ...
6747 (dump_ada_declaration): ...this. Do not print the return type.
6748 (print_ada_struct_decl): Rename into...
6749 (dump_ada_struct_decl): ...this.
6750
7d386d45
JJ
67512017-09-29 Jakub Jelinek <jakub@redhat.com>
6752
6753 * c-attribs.c (handle_packed_attribute): Test DECL_C_BIT_FIELD
6754 rather than DECL_INITIAL.
6755 (common_handle_aligned_attribute): Likewise.
6756
ab20d992 67572017-09-20 Alexandre Oliva <aoliva@redhat.com>
9ed32e27
AO
6758
6759 * c.opt (gen-decls): Add RejectNegative.
6760
026a79f7
AS
67612017-09-15 Andrew Sutton <andrew.n.sutton@gmail.com>
6762 Jakub Jelinek <jakub@redhat.com>
6763
6764 Add support for -std=c++2a.
6765 * c-common.h (cxx_dialect): Add cxx2a as a dialect.
6766 * opt.c: Add options for -std=c++2a and -std=gnu++2a.
6767 * c-opts.c (set_std_cxx2a): New.
6768 (c_common_handle_option): Set options when -std=c++2a is enabled.
6769 (c_common_post_options): Adjust comments.
6770 (set_std_cxx14, set_std_cxx17): Likewise.
6771
4a8ca690
EB
67722017-09-15 Eric Botcazou <ebotcazou@adacore.com>
6773
6774 * c-pragma.c (handle_pragma_scalar_storage_order): Expand on error
6775 message for non-uniform endianness and issue a warning in C++.
6776
7b936140
JJ
67772017-09-15 Jakub Jelinek <jakub@redhat.com>
6778
6779 * c.opt (Wc++1z-compat): Change from option to undocumented alias.
6780 (Wc++17-compat): Change from undocumented alias to option.
6781 (Wnoexcept-type): Enable by Wc++17-compat instead of Wc++1z-compat,
6782 change C++1z to C++17 in description.
6783 (std=c++1z, std=gnu++1z): Change from option to undocumented
6784 deprecated alias.
6785 (std=c++17, std=gnu++17): Change from undocumented alias to option.
6786 Adjust description.
6787 * c-common.h (enum cxx_dialect): Rename cxx1z to cxx17.
6788 * c-opts.c (set_std_cxx1z): Rename to ...
6789 (set_std_cxx17): ... this.
6790 (c_common_handle_option): Rename OPT_std_c__1z to OPT_std_c__17
6791 and OPT_std_gnu__1z to OPT_std_gnu__17. Adjust set_std_cxx1z
7365279f 6792 caller.
7b936140
JJ
6793 (c_common_post_options): Use cxx17 instead of cxx1z. Adjust
6794 comments.
6795
12263f13
L
67962017-09-12 H.J. Lu <hongjiu.lu@intel.com>
6797
6798 * c-attribs.c (common_handle_aligned_attribute): Don't warn
6799 function alignment if warn_if_not_aligned_p is true.
6800
6836632e
NS
68012017-09-12 Nathan Sidwell <nathan@acm.org>
6802
6803 * c-common.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
6804 resort_sorted_fields): Move to c/c-decl.c.
6805 * c-common.h (field_decl_cmp, resort_sorted_fields): Delete.
6806 (struct sorted_fields_type): Move to c/c-lang.h.
6807
019bf9ad
JW
68082017-09-09 Jonathan Wakely <jwakely@redhat.com>
6809
6810 PR c++/81852
6811 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_threadsafe_static_init.
6812
bc7fe952
MP
68132017-09-04 Marek Polacek <polacek@redhat.com>
6814
6815 PR c/81783
6816 * c-warn.c (warn_tautological_bitwise_comparison): New function.
6817 (warn_tautological_cmp): Call it.
6818
ab20d992 68192017-09-01 Boris Kolpackov <boris@codesynthesis.com>
de7c2c6a
BK
6820
6821 * c-opts.c (c_common_finish): Write dependency information even if
6822 there are errors.
6823
d2e05fcb
JJ
68242017-09-01 Jakub Jelinek <jakub@redhat.com>
6825
6826 PR c/81887
6827 * c-pragma.c (omp_pragmas): Move "ordered" entry from here to ...
6828 (omp_pragmas_simd): ... here.
6829 * c-omp.c (c_finish_omp_ordered): If clauses isn't simd clause alone,
6830 create new clauses list containing just simd clause.
6831
18e2a8b8
RS
68322017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
6833 Alan Hayward <alan.hayward@arm.com>
6834 David Sherwood <david.sherwood@arm.com>
6835
6836 * c-attribs.c (vector_mode_valid_p) Fold GET_MODE_INNER call
6837 into scalar_mode_supported_p call.
6838 (handle_mode_attribute): Update call to scalar_mode_supported_p.
6839
16d22000
RS
68402017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
6841 Alan Hayward <alan.hayward@arm.com>
6842 David Sherwood <david.sherwood@arm.com>
6843
6844 * c-common.c (c_common_fixed_point_type_for_size): Use opt_scalar_mode
6845 for the mode iterator.
6846
b397965c
RS
68472017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
6848 Alan Hayward <alan.hayward@arm.com>
6849 David Sherwood <david.sherwood@arm.com>
6850
6851 * c-lex.c (interpret_fixed): Use SCALAR_TYPE_MODE.
6852 * c-common.c (c_build_vec_perm_expr): Likewise.
6853
357b7604
RS
68542017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
6855 Alan Hayward <alan.hayward@arm.com>
6856 David Sherwood <david.sherwood@arm.com>
6857
6858 * c-common.c (c_common_type_for_mode): Use as_a <scalar_int_mode>.
6859
e05c94ba
RS
68602017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
6861 Alan Hayward <alan.hayward@arm.com>
6862 David Sherwood <david.sherwood@arm.com>
6863
6864 * c-attribs.c (handle_mode_attribute): Check for a scalar_int_mode
6865 before calling targetm.addr_space.valid_pointer_mode.
6866
5c20c4af
RS
68672017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
6868 Alan Hayward <alan.hayward@arm.com>
6869 David Sherwood <david.sherwood@arm.com>
6870
6871 * c-cppbuiltin.c (c_cpp_builtins): Use opt_scalar_float_mode.
6872
c94843d2 68732017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
92a285c1
ML
6874 Alan Hayward <alan.hayward@arm.com>
6875 David Sherwood <david.sherwood@arm.com>
c94843d2
RS
6876
6877 * c-common.c (c_common_fixed_point_type_for_size): Use new mode
6878 iterators.
6879 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
6880
4e10a5a7
RS
68812017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
6882 Alan Hayward <alan.hayward@arm.com>
6883 David Sherwood <david.sherwood@arm.com>
6884
6885 * c-cppbuiltin.c (mode_has_fma): Prefix mode names with E_ in
6886 case statements.
6887
130fcab0
ML
68882017-08-29 Martin Liska <mliska@suse.cz>
6889
6890 PR other/39851
6891 * c-common.c (parse_optimize_options): Add argument to function
6892 call.
6893 * c-pragma.c (handle_pragma_diagnostic): Likewise.
6894
14e18d71
DM
68952017-08-24 David Malcolm <dmalcolm@redhat.com>
6896
6897 * c-lex.c (interpret_float): Use token location
6898 when building an EXCESS_PRECISION_EXPR.
6899
2f687306
DM
69002017-08-21 David Malcolm <dmalcolm@redhat.com>
6901
6902 * c-common.c (check_function_arguments): Add "arglogs" param; pass
6903 it to check_function_format.
6904 * c-common.h (check_function_arguments): Add vec<location_t> *
6905 param.
6906 (check_function_format): Likewise.
6907 * c-format.c (struct format_check_context): Add field "arglocs".
6908 (check_function_format): Add param "arglocs"; pass it to
6909 check_format_info.
ab20d992 6910 (check_format_info): Add param "arglocs"; use it to initialize
2f687306
DM
6911 new field of format_ctx.
6912 (check_format_arg): Pass format_ctx->arglocs to new param of
6913 check_format_info_main.
6914 (class argument_parser): New field "arglocs".
6915 (argument_parser::argument_parser): Add "arglocs_" param and use
6916 it to initialize new field.
6917 (argument_parser::check_argument_type): Pass new arglocs field to
6918 check_format_types.
6919 (check_format_info_main): Add param "arglocs", and use it when
6920 constructing arg_parser.
6921 (check_format_types): Add param "arglocs"; use it if non-NULL when
6922 !EXPR_HAS_LOCATION (cur_param) to get at location information.
6923
00aa1fa2
L
69242017-08-18 H.J. Lu <hongjiu.lu@intel.com>
6925
6926 PR c/53037
6927 * c-attribs.c (handle_warn_if_not_aligned_attribute): New.
6928 (c_common_attribute_table): Add warn_if_not_aligned.
6929 (handle_aligned_attribute): Renamed to ...
6930 (common_handle_aligned_attribute): Remove argument, name, and add
6931 argument, warn_if_not_aligned. Handle warn_if_not_aligned.
6932 (handle_aligned_attribute): New.
6933 * c.opt: Add -Wif-not-aligned and -Wpacked-not-aligned.
6934
27be025d
MS
69352017-08-14 Martin Sebor <msebor@redhat.com>
6936
6937 PR c/81117
6938 * c-attribs.c (c_common_attribute_table): Add nonstring entry.
6939 (handle_nonstring_attribute): New function.
6940
da67acb9
MS
69412017-08-14 Martin Sebor <msebor@redhat.com>
6942
6943 PR c/81117
6944 * c-format.h (T89_G): New macro.
6945 * c-format.c (local_gcall_ptr_node): New variable.
6946 (init_dynamic_diag_info): Initialize it.
6947
a8b522b4
ML
69482017-08-11 Martin Liska <mliska@suse.cz>
6949
6950 * c-opts.c (c_common_post_options): Replace ASM_OUTPUT_DEF with
6951 TARGET_SUPPORTS_ALIASES.
6952
32129a17
DM
69532017-08-10 David Malcolm <dmalcolm@redhat.com>
6954
6955 * c-common.c (c_parse_error): Add rich_location * param, using it
6956 rather implicitly using input_location.
6957 * c-common.h (c_parse_error): Add rich_location * param.
6958
30af3a2b
MP
69592017-08-09 Marek Polacek <polacek@redhat.com>
6960
6961 * c-common.c (pointer_int_sum): Use true/false instead of 1/0.
6962 (c_common_truthvalue_conversion): Likewise.
6963 * c-omp.c (c_finish_omp_atomic): Likewise.
6964 * c-common.h (build_binary_op): Update declaration.
6965
314e6352
ML
69662017-08-08 Martin Liska <mliska@suse.cz>
6967
6968 * c-ada-spec.c: Include header files.
6969 * c-ubsan.c: Likewise.
6970 * c-warn.c: Likewise.
6971
56b5041c
JJ
69722017-08-07 Jakub Jelinek <jakub@redhat.com>
6973
6974 PR c/69389
6975 * c-omp.c (c_finish_omp_atomic): Handle atomics on bitfields.
6976
db440138
EB
69772017-08-07 Eric Botcazou <ebotcazou@adacore.com>
6978
6979 * c-ada-spec.c (has_nontrivial_methods): Test for FUNCTION_DECL.
6980 (print_ada_methods): Likewise.
6981 (print_ada_declaration): Likewise.
6982
577eec56
ML
69832017-08-07 Martin Liska <mliska@suse.cz>
6984
6985 * array-notation-common.c: Add new includes.
6986 * c-format.c( handle_format_attribute): Canonicalize a format
6987 function name.
6988 * c-lex.c (c_common_has_attribute): Canonicalize name of an
6989 attribute.
6990 * c-pretty-print.c: Add new include.
6991
b854df3c
EB
69922017-08-05 Eric Botcazou <ebotcazou@adacore.com>
6993
6994 * c-ada-spec.c (has_static_fields): Look only into variables.
6995 (print_constructor): Add TYPE parameter and use it for the name.
6996 (print_destructor): Likewise.
6997 (print_ada_declaration): Adjust to new constructor/destructor names.
6998 Adjust calls to print_constructor and print_destructor.
6999 (print_ada_struct_decl): Do not test TREE_STATIC on FIELD_DECL.
7000 Look only into variables in the final loop.
7001
9f2cb25e
EB
70022017-08-01 Eric Botcazou <ebotcazou@adacore.com>
7003
7004 * c-ada-spec.c (has_static_fields): Look only into fields.
7005 (dump_generic_ada_node): Small tweak.
7006 (dump_nested_types): Look only into fields.
7007 (print_ada_declaration): Look only into methods. Small tweak.
7008 (print_ada_struct_decl): Look only into fields. Use DECL_VIRTUAL_P.
7009
f4bcd9eb
EB
70102017-08-01 Eric Botcazou <ebotcazou@adacore.com>
7011
7012 * c-ada-spec.c (print_generic_ada_decl): Pass correctly-typed constant.
7013 (dump_ada_function_declaration): Likewise.
7014 (dump_generic_ada_node): Likewise.
7015 (print_ada_declaration): Add support for const-qualified variables.
7016
f34ebeb2
ML
70172017-07-31 Martin Liska <mliska@suse.cz>
7018
7019 PR sanitize/81530
7020 * c-ubsan.c (ubsan_maybe_instrument_array_ref):
7021 Guard condition with flag_sanitize_p also with current_function_decl
7022 non-null equality.
7023 (ubsan_maybe_instrument_reference_or_call): Likewise.
7024
218e5d04
UB
70252017-07-30 Uros Bizjak <ubizjak@gmail.com>
7026
7027 * c-format.c (asm_fprintf_char_table): Add 'z' to format_chars.
7028
942047f2
EB
70292017-07-29 Eric Botcazou <ebotcazou@adacore.com>
7030
7031 * c-ada-spec.c (dump_generic_ada_node): Take into account signedness
7032 for enumeral types.
7033 (print_ada_declaration): Add missing guard for record types.
7034
a40ff0ae
JJ
70352017-07-27 Jakub Jelinek <jakub@redhat.com>
7036
7037 PR c/45784
7038 * c-omp.c (c_finish_omp_for): If the condition is wrapped in
7039 rhs of COMPOUND_EXPR(s), skip them and readd their lhs into
7040 new COMPOUND_EXPRs around the rhs of the comparison.
7041
06bd22f6
MP
70422017-07-27 Marek Polacek <polacek@redhat.com>
7043
7044 PR c/81417
7045 * c-warn.c (warn_for_sign_compare): Tweak the warning message. Print
7046 the types.
7047
036ea399
JJ
70482017-07-27 Jakub Jelinek <jakub@redhat.com>
7049
7050 * c-attribs.c (c_common_attribute_table): Add noipa attribute.
7051 (handle_noipa_attribute): New function.
7052
417ca011
TD
70532017-07-07 Torsten Duwe <duwe@suse.de>
7054
7055 * c-attribs.c (c_common_attribute_table): Add entry for
7056 "patchable_function_entry".
7057
5aaa8fb4
NS
70582017-07-20 Nathan Sidwell <nathan@acm.org>
7059
7060 Remove TYPE_METHODS.
7061 * c-ada-spec.c (is_tagged_type, has_nontrivial_methods,
7062 dump_ada_template, print_ada_methods,
7063 print_ada_declaration): Member fns are on TYPE_FIELDS.
7064
ff22eb12
NS
70652017-07-18 Nathan Sidwell <nathan@acm.org>
7066
7067 * c-warn.c (warn_for_memset): Use TYPE_{MIN,MAX}_VALUE.
7068
eea77d1f
DM
70692017-07-14 David Malcolm <dmalcolm@redhat.com>
7070
7071 * c-common.c (try_to_locate_new_include_insertion_point): New
7072 function.
7073 (per_file_includes_t): New typedef.
7074 (added_includes_t): New typedef.
7075 (added_includes): New variable.
7076 (maybe_add_include_fixit): New function.
7077 * c-common.h (maybe_add_include_fixit): New decl.
7078
281ac396
MS
70792017-07-10 Martin Sebor <msebor@redhat.com>
7080
7081 PR other/81345
7082 * c.opt (-Wstringop-overflow): Set defaults in LangEnabledBy.
7083
b6f43128
DM
70842017-07-06 David Malcolm <dmalcolm@redhat.com>
7085
7086 * c-common.c (selftest::c_family_tests): New.
7087 * c-common.h (selftest::run_c_tests): Move decl to c/c-lang.h.
7088 (selftest::c_family_tests): New decl.
7089
efbf55b0
MP
70902017-07-04 Marek Polacek <polacek@redhat.com>
7091
7092 PR c/81231
7093 * c-common.c (sync_resolve_size): Give error for pointers to incomplete
7094 types.
7095
6c86bd88
MP
70962017-07-04 Marek Polacek <polacek@redhat.com>
7097
7098 * c-warn.c (warn_if_unused_value): Remove WITH_CLEANUP_EXPR handling.
7099
17a7218b
ML
71002017-06-28 Martin Liska <mliska@suse.cz>
7101
7102 PR ipa/81128
7103 * c-attribs.c (handle_alias_ifunc_attribute): Append ifunc alias
7104 to a function declaration.
7105
63010089
ML
71062017-06-28 Martin Liska <mliska@suse.cz>
7107
7108 PR driver/79659
7109 * c.opt: Add IntegerRange to various options.
7110
3e2becc4
MP
71112017-06-26 Marek Polacek <polacek@redhat.com>
7112
7113 PR c/80116
7114 * c-common.h (warn_for_multistatement_macros): Declare.
7115 * c-warn.c: Include "c-family/c-indentation.h".
7116 (warn_for_multistatement_macros): New function.
7117 * c.opt (Wmultistatement-macros): New option.
7118 * c-indentation.c (guard_tinfo_to_string): No longer static.
7119 Change the parameter type to "enum rid". Handle RID_SWITCH.
7120 * c-indentation.h (guard_tinfo_to_string): Declare.
7121
2db9b7cd
MG
71222017-06-23 Marc Glisse <marc.glisse@inria.fr>
7123
7124 * c-common.c (c_common_nodes_and_builtins): Use builtin_structptr_types.
7125
c3684b7b
MS
71262017-06-15 Martin Sebor <msebor@redhat.com>
7127
7128 PR c++/80560
7129 * c.opt (-Wclass-memaccess): New option.
7130
e72c4afd
BK
71312017-06-14 Boris Kolpackov <boris@codesynthesis.com>
7132
7133 * c-opts.c (c_common_finish): Handle '-' special value to -MF.
7134
8a516588
MP
71352017-06-13 Marek Polacek <polacek@redhat.com>
7136
7137 PR objc/80949
7138 * c-warn.c (do_warn_duplicated_branches): Return if any of the
7139 branches is null.
7140
45b2222a
ML
71412017-06-13 Martin Liska <mliska@suse.cz>
7142
7143 PR sanitize/78204
7144 * c-attribs.c (add_no_sanitize_value): New function.
7145 (handle_no_sanitize_attribute): Likewise.
7146 (handle_no_sanitize_address_attribute): Use the function.
7147 (handle_no_sanitize_thread_attribute): New function.
7148 (handle_no_address_safety_analysis_attribute): Use
7149 add_no_sanitize_value.
7150 (handle_no_sanitize_undefined_attribute): Likewise.
7151 * c-common.h: Declare new functions.
7152 * c-ubsan.c (ubsan_instrument_division): Use sanitize_flags_p.
7153 (ubsan_instrument_shift): Likewise.
7154 (ubsan_instrument_bounds): Likewise.
7155 (ubsan_maybe_instrument_array_ref): Likewise.
7156 (ubsan_maybe_instrument_reference_or_call): Likewise.
7157
a01f151f
JM
71582017-06-11 Jason Merrill <jason@redhat.com>
7159
7160 * c-ada-spec.c, c-pragma.c: Use id_equal.
7161
3de4ac6d
MP
71622017-06-04 Marek Polacek <polacek@redhat.com>
7163
7164 PR c/80919
7165 * c-format.c (matching_type_p): Return false if any of the types
7166 requires structural equality.
7167
2474f48f
MS
71682017-06-02 Martin Sebor <msebor@redhat.com>
7169
7170 PR c/80892
7171 * c-warn.c (conversion_warning): Use -Wconversion for integer
7172 conversion and -Wfloat-conversion for floating one.
7173
40ffd95f
BE
71742017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
7175
7176 * c.opt (Wsizeof-pointer-div): New warning option.
7177
3fa4634c
VR
71782017-06-01 Volker Reichelt <v.reichelt@netcologne.de>
7179
7180 * c.opt (Wcatch-value): New shortcut for Wcatch-value=1.
7181 (Wcatch-value=1): Enable by -Wall.
7182
f012c8ef
DM
71832017-05-30 David Malcolm <dmalcolm@redhat.com>
7184
7185 * c-format.c (gcc_cxxdiag_char_table): Add 'H' and 'I' to
7186 format_chars.
7187 * c.opt (fdiagnostics-show-template-tree): New option.
7188 (felide-type): New option.
7189
63dbcd13
VR
71902017-05-25 Volker Reichelt <v.reichelt@netcologne.de>
7191
7192 * c.opt (Wcatch-value=): New C++ warning flag.
7193
be136b5c
NS
71942017-05-24 Nathan Sidwell <nathan@acm.org>
7195
7196 * c=common.c (field_decl_cmp, resort_field_decl_cmp): Adjust T
7197 const casts to avoid warning.
7198
3cd211af
MS
71992017-05-24 Martin Sebor <msebor@redhat.com>
7200
7201 PR c/80731
7202 * c-common.h (unsafe_conversion_p): Add a function argument.
7203 * c-common.c (unsafe_conversion_p): Same.
7204 Add type names and values to diagnostics.
7205 (scalar_to_vector): Adjust.
7206 * c-warn.c (constant_expression_error): Add a function argument.
7207 Add type names and values to diagnostics.
7208 (conversion_warning): Add a function argument.
7209 Add type names and values to diagnostics.
7210 (warnings_for_convert_and_check): Same.
7211
1ff7be5a
JM
72122017-05-19 Jason Merrill <jason@redhat.com>
7213
7214 * c-warn.c (match_case_to_enum_1): Don't warn about enums with no
7215 enumerators.
7216
ff502317
BE
72172017-05-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
7218
7219 * c-format.c (locus): Move out of function scope,
7220 add GTY attribute.
7221
2a8a8d7b
NS
72222017-05-19 Nathan Sidwell <nathan@acm.org>
7223
7224 * c-opts.c (class_dump_file, class_dump_flags): Delete.
7225 (c_common_parse_file): Remove class dump handling.
7226 (get_dump_info): Likewise.
7227
39aac208
RB
72282017-05-19 Richard Biener <rguenther@suse.de>
7229
7230 PR c++/80593
7231 * c-warn.c (strict_aliasing_warning): Do not warn for accesses
7232 to alias-set zero memory.
7233
6ecd2339
BE
72342017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
7235
7236 * c-format.c (local_tree_type_node): Add GTY attribute.
7237
6574d78e
MP
72382017-05-18 Marek Polacek <polacek@redhat.com>
7239
7240 * c-common.c (c_common_type_for_size): Use NULL_TREE instead of 0.
7241 (c_common_fixed_point_type_for_size): Likewise.
7242 (c_common_type_for_mode): Likewise.
7243 (shorten_compare): Likewise.
7244 (c_promoting_integer_type_p): Use false/true instead of 0/1.
7245 * c-pragma.c (maybe_apply_renaming_pragma): Use NULL_TREE instead of 0.
7246
e3455240
MP
72472017-05-18 Marek Polacek <polacek@redhat.com>
7248
7249 * c-common.c (self_promoting_args_p): Change the return type to bool.
7250 Use false/true instead of 0/1.
7251 * c-common.h (self_promoting_args_p): Update.
7252
3fa8871b
MP
72532017-05-17 Marek Polacek <polacek@redhat.com>
7254
7255 * c-common.c: Use NULL_TREE instead of 0 where appropriate.
7256 * c-warn.c: Likewise.
7257
b42cc3ca
VV
72582017-05-17 Ville Voutilainen <ville.voutilainen@gmail.com>
7259
7260 Implement new C++ intrinsics __is_assignable and __is_constructible.
7261 * c-common.c (__is_assignable, __is_constructible): New.
7262 * c-common.h (RID_IS_ASSIGNABLE, RID_IS_CONSTRUCTIBLE): Likewise.
7263
1a817418
ML
72642017-05-17 Martin Liska <mliska@suse.cz>
7265
7266 * c-common.h: Introduce dump_flags_t type and
7267 use it instead of int type.
7268 * c-gimplify.c (c_genericize): Likewise.
7269 * c-opts.c: Likewise.
7270
b2fa0a8b
MP
72712017-05-17 Marek Polacek <polacek@redhat.com>
7272
7273 * c-common.c (c_save_expr): Remove.
7274 (c_common_truthvalue_conversion): Remove a call to c_save_expr.
7275 * c-common.h (c_save_expr): Remove declaration.
7276
31c2d57d
VR
72772017-05-09 Volker Reichelt <v.reichelt@netcologne.de>
7278
7279 PR c/35441
7280 * c-pretty-print.c (c_pretty_printer::expression): Handle MAX_EXPR,
7281 MIN_EXPR, EXACT_DIV_EXPR, RDIV_EXPR, LROTATE_EXPR, RROTATE_EXPR.
7282 (c_pretty_printer::postfix_expression): Handle MAX_EXPR, MIN_EXPR.
7283 (c_pretty_printer::multiplicative_expression): Handle EXACT_DIV_EXPR,
7284 RDIV_EXPR.
7285 (pp_c_shift_expression): Handle LROTATE_EXPR, RROTATE_EXPR.
7286
684f84de
MP
72872017-05-09 Marek Polacek <polacek@redhat.com>
7288
7289 PR c/80525
7290 * c-warn.c (unwrap_c_maybe_const): New.
7291 (warn_logical_operator): Call it.
7292
641da50a
NS
72932017-05-09 Nathan Sidwell <nathan@acm.org>
7294
7295 * c-common.c (c_register_builtin_type): Use pushdecl lang_hook.
7296 * c-common.h (pushdecl_top_level, pushdecl): Don't declare here.
7297
631238ac
MS
72982017-05-08 Martin Sebor <msebor@redhat.com>
7299
7300 PR translation/80280
7301 * c-format.h (struct format_flag_spec): Add new member.
7302 (T89_T): New macro.
7303 * c-format.c (local_tree_type_node): New global.
7304 (printf_flag_specs, asm_fprintf_flag_spec): Initialize new data.
7305 (gcc_diag_flag_specs, scanf_flag_specs, strftime_flag_specs): Ditto.
7306 (strfmon_flag_specs): Likewise.
7307 (gcc_diag_char_table, gcc_cdiag_char_table): Split up specifiers
7308 with distinct quoting properties.
7309 (gcc_tdiag_char_table, gcc_cxxdiag_char_table): Same.
7310 (flag_chars_t::validate): Add argument and handle bad quoting.
7311 (check_format_info_main): Handle quoting problems.
7312 (init_dynamic_diag_info): Simplify.
7313
49f0c04c
JM
73142017-05-08 Jason Merrill <jason@redhat.com>
7315
7316 * c-opts.c (c_common_post_options): Update defaults for
7317 flag_abi_version and flag_abi_compat_version.
7318
56d35585
DM
73192017-05-05 David Malcolm <dmalcolm@redhat.com>
7320
7321 * c-common.c (c_cpp_error): Replace report_diagnostic
7322 with diagnostic_report_diagnostic.
7323
0f2c4a8f
MS
73242017-05-04 Martin Sebor <msebor@redhat.com>
7325
7326 PR translation/80280
7327 * c-attribs.c (handle_alias_ifunc_attribute): Quote a %D directive.
7328 (handle_weakref_attribute): Same.
7329
6fe63fb4
NS
73302017-05-03 Nathan Sidwell <nathan@acm.org>
7331
7332 Canonicalize canonical type hashing
7333 * c-common.c (complete_array_type): Use type_hash_canon.
7334
815d9cc6
XR
73352017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
7336
92a285c1 7337 PR c++/80038
815d9cc6
XR
7338 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): Remove
7339 prototype.
7340 (cilk_install_body_pedigree_operations): Likewise.
7341 * cilk.c (cilk_set_spawn_marker): Mark functions that should be
7342 detatched.
7343 (cilk_gimplify_call_params_in_spawned_fn): Remove.
7344 (cilk_install_body_pedigree_operations): Likewise.
7345 (gimplify_cilk_spawn): Add EXPR_STMT and CLEANUP_POINT_EXPR
7346 unwrapping.
7347
f8a36447
JJ
73482017-04-27 Jakub Jelinek <jakub@redhat.com>
7349
7350 PR c++/80534
7351 * c-common.c (complete_array_type): Only hash TYPE_TYPELESS_STORAGE
7352 flag on non-aggregate element types.
7353
7c145456
BE
73542017-04-25 Bernd Edlinger <bernd.edlinger@hotmail.de>
7355
7356 * c-common.c (c_type_hasher, type_hash_table): Remove.
7357 (c_common_get_alias_set): Remove unreachable code.
7358 * c-opts.c (c_common_post_options): Make sure cc1 takes only one file.
7359
c3cbcd45
VR
73602017-04-20 Volker Reichelt <v.reichelt@netcologne.de>
7361
7362 * c.opt (Wextra-semi): New C++ warning flag.
7363
8a59d466
JJ
73642017-04-20 Jakub Jelinek <jakub@redhat.com>
7365
7366 PR middle-end/80423
7367 * c-common.c (complete_array_type): Preserve TYPE_TYPELESS_STORAGE.
7368
8487c9a5
JJ
73692017-04-18 Jakub Jelinek <jakub@redhat.com>
7370
7371 PR middle-end/79788
7372 PR middle-end/80375
7373 * c-common.c (c_common_type_for_mode): Don't handle
7374 widest_*_literal_type_node here.
7375 c_common_signed_or_unsigned_type): Likewise.
7376 (c_common_nodes_and_builtins): Set widest_*_literal_type_node
7377 to *intTI_type_node or *intDI_type_node depending on whether
7378 TImode is supported by the target or not.
7379
3ee0fb02
ML
73802017-04-10 Martin Liska <mliska@suse.cz>
7381
7382 PR sanitizer/80350
7383 * c-ubsan.c (ubsan_instrument_shift): Evaluate RHS before
7384 doing an UBSAN check.
7385
5764ee3c
JW
73862017-04-03 Jonathan Wakely <jwakely@redhat.com>
7387
7388 * c-warn.c (do_warn_double_promotion): Fix typo in comment.
7389
6f3af356
JJ
73902017-03-31 Jakub Jelinek <jakub@redhat.com>
7391
7392 PR c++/79572
7393 * c-ubsan.h (ubsan_maybe_instrument_reference): Change argument to
7394 tree *.
7395 * c-ubsan.c (ubsan_maybe_instrument_reference): Likewise. Handle
7396 not just NOP_EXPR to REFERENCE_TYPE, but also INTEGER_CST with
7397 REFERENCE_TYPE.
7398
f6a7a9d5
DM
73992017-03-31 David Malcolm <dmalcolm@redhat.com>
7400
7401 PR documentation/78732
7402 * c.opt (Wendif-labels): Fix description to refer to
7403 #else rather than #elif.
7404
af88f557
JJ
74052017-03-31 Jakub Jelinek <jakub@redhat.com>
7406
7407 PR libstdc++/80251
7408 * c-common.h (enum rid): Add RID_IS_AGGREGATE.
7409 * c-common.c (c_common_reswords): Add __is_aggregate trait.
7410
a9e4a1a5
JJ
74112017-03-27 Jakub Jelinek <jakub@redhat.com>
7412
7413 PR middle-end/80162
7414 * c-common.c (c_common_mark_addressable_vec): Don't set
7415 TREE_ADDRESSABLE on DECL_HARD_REGISTER.
7416
3f01b620
MS
74172017-03-21 Martin Sebor <msebor@redhat.com>
7418
7419 PR c++/79548
7420 * c-common.c (set_underlying_type): Mark type used only when
7421 original del is declared unused.
7422
2f6f187a
DM
74232017-03-10 David Malcolm <dmalcolm@redhat.com>
7424
7425 PR translation/79848
7426 * c-format.c (check_format_string): Simplify uses of "%<%s%>" to
7427 "%qs".
7428
a02fa805
DM
74292017-03-10 David Malcolm <dmalcolm@redhat.com>
7430
7431 PR c/79921
7432 * c-indentation.c (warn_for_misleading_indentation): Remove parens
7433 from inform's message, so that xgettext can locate it.
7434
822a132c
MP
74352017-03-09 Marek Polacek <polacek@redhat.com>
7436
7437 PR c++/79962
7438 PR c++/79984
7439 * c-attribs.c (handle_nonnull_attribute): Save the result of default
7440 conversion to the attribute list.
7441
bba81f1c
ML
74422017-03-09 Martin Liska <mliska@suse.cz>
7443
7444 * c-ada-spec.c (macro_length): Increment value instead of a pointer.
7445
108154ff
JM
74462017-03-03 Jason Merrill <jason@redhat.com>
7447
7448 * c.opt (Wnoexcept-type): New.
7449
eb0e7c34
RB
74502017-03-02 Richard Biener <rguenther@suse.de>
7451
7452 PR c/79756
7453 * c-common.c (c_common_mark_addressable_vec): Look through
7454 C_MAYBE_CONST_EXPR.
7455
9453ba0a
ML
74562017-02-28 Martin Liska <mliska@suse.cz>
7457
7458 * c.opt: Replace space with tabular for options of <number>
7459 type.
7460
6a825afe
ML
74612017-02-28 Martin Liska <mliska@suse.cz>
7462
7463 * c.opt: Fix --help=option -Q for options which are of
7464 an enum type.
7465
4227c9ad
JJ
74662017-02-24 Jakub Jelinek <jakub@redhat.com>
7467
7468 PR c++/79588
7469 * c-common.c (check_function_restrict): New function.
7470 (check_function_arguments): Add FNDECL argument. Call
7471 check_function_restrict if -Wrestrict.
7472 * c-warn.c (warn_for_restrict): Remove ARGS argument, add ARGARRAY
7473 and NARGS. Use auto_vec for ARG_POSITIONS, simplify.
7474 * c-common.h (check_function_arguments): Add FNDECL argument.
7475 (warn_for_restrict): Remove ARGS argument, add ARGARRAY and NARGS.
7476
59909673
EB
74772017-02-24 Eric Botcazou <ebotcazou@adacore.com>
7478
7479 * c-ada-spec.c (dump_ada_function_declaration): Add comment about the
7480 treatment of parameters with pointer-to-tagged type and tidy up.
7481 (print_ada_methods): Remove the special treatment of C++ static member
7482 functions.
7483
54dcd526
ML
74842017-02-22 Martin Liska <mliska@suse.cz>
7485
7486 * c.opt: Replace inequality signs with square brackets
7487 for -Wnornalized.
7488
00bc9de3
JJ
74892017-02-21 Jakub Jelinek <jakub@redhat.com>
7490
7491 PR c++/79641
7492 * c-attribs.c (handle_mode_attribute): Use build_qualified_type to
7493 preserve quals.
7494
97fcf744
JM
74952017-02-17 Joseph Myers <joseph@codesourcery.com>
7496
7497 * c-cppbuiltin.c (builtin_define_float_constants): Define
7498 __DECIMAL_DIG__ to the value for long double.
7499
c7545f1c
MP
75002017-02-15 Marek Polacek <polacek@redhat.com>
7501
7502 PR c/79515
7503 * c-warn.c (do_warn_double_promotion): Don't warn if an invalid
7504 conversion has occured.
7505
c2e84327
DM
75062017-01-24 David Malcolm <dmalcolm@redhat.com>
7507
7508 * c-common.c (c_common_reswords): Add "__RTL".
7509 * c-common.h (enum rid): Add RID_RTL.
7510
2ebd93e1
MP
75112017-01-20 Marek Polacek <polacek@redhat.com>
7512
7513 PR c/64279
7514 * c-common.h (do_warn_duplicated_branches_r): Declare.
7515 * c-gimplify.c (c_genericize): Walk the function tree calling
7516 do_warn_duplicated_branches_r.
7517 * c-warn.c (expr_from_macro_expansion_r): New.
7518 (do_warn_duplicated_branches): New.
7519 (do_warn_duplicated_branches_r): New.
7520 * c.opt (Wduplicated-branches): New option.
7521
0d80ab91
DM
75222017-01-17 David Malcolm <dmalcolm@redhat.com>
7523
7524 PR c++/71497
7525 * c-indentation.c (warn_for_misleading_indentation): Use the past
7526 subjunctive in the note.
7527
7f991c36
AH
75282017-01-17 Aldy Hernandez <aldyh@redhat.com>
7529
7530 PR c/79116
7531 * array-notation-common.c (cilkplus_extract_an_triplets): Convert
7532 start type to integer_type.
7533
1c70261c
JJ
75342017-01-16 Jakub Jelinek <jakub@redhat.com>
7535
7536 PR driver/49726
7537 * c.opt (gen-decls): Add Driver flag.
7538
1ddca3f3
PC
75392017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
7540
7541 Revert:
7542 2017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
7543
7544 PR c++/71737
7545 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
7546
7d2f3f1d
PC
75472017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
7548
7549 PR c++/71737
7550 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
7551
bce6f760
MS
75522017-01-12 Martin Sebor <msebor@redhat.com>
7553
7554 (-Wformat-overflow): ...to this.
7555
bf5fbf46
MS
75562017-01-11 Martin Sebor <msebor@redhat.com>
7557
7558 PR c/78768
7559 * c.opt (-Walloca-larger-than, -Wformat-length, -Wformat-truncation):
7560 Also enable for LTO.
7561
e363df3f
JM
75622017-01-10 Jason Merrill <jason@redhat.com>
7563
7564 Implement P0195R2, C++17 variadic using.
7565 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_variadic_using.
7566
bd2c6270
JJ
75672017-01-09 Jakub Jelinek <jakub@redhat.com>
7568
7569 PR translation/79019
7570 PR translation/79020
7571 * c.opt (Wnormalized=): Fix typo in description.
7572
efcc8d38
MS
75732017-01-08 Martin Sebor <msebor@redhat.com>
7574
7575 PR middle-end/77708
7576 * c.opt (-Wformat-truncation): New option.
7577
ab20d992 75782017-01-06 Alexandre Oliva <aoliva@redhat.com>
435f3f7a
AO
7579
7580 * c-pretty-print.c (pp_c_tree_decl_identifier): Convert 16-bit
7581 value to unsigned short to fit in 4 hex digits without
7582 warnings.
7583
4e89adf9
EB
75842017-01-05 Eric Botcazou <ebotcazou@adacore.com>
7585
7586 * c.opt (fsso-struct): Add 'native' value.
7587
cd445b54
ML
75882017-01-05 Martin Liska <mliska@suse.cz>
7589
7590 PR pch/78970
7591 * c-opts.c (c_common_post_options): Reject '-' filename for a precompiled
7592 header.
7593
a9342885
MP
75942017-01-04 Marek Polacek <polacek@redhat.com>
7595
7596 PR c++/64767
7597 * c.opt (Wpointer-compare): New option.
7598
fc73e60c
JJ
75992017-01-04 Jakub Jelinek <jakub@redhat.com>
7600
7601 PR driver/78957
7602 * c.opt (fsso-struct=): Add RejectNegative.
7603
cbe34bb5
JJ
76042017-01-01 Jakub Jelinek <jakub@redhat.com>
7605
7606 Update copyright years.
7607
d4a6c0ea
ML
76082016-12-29 Martin Liska <mliska@suse.cz>
7609
7610 PR c/78933
7611 * c.opt (strong-eval-order): Add RejectNegative keyword.
7612
67a5ad7c
JM
76132016-12-22 Jason Merrill <jason@redhat.com>
7614
7615 Implement P0522R0, matching of template template arguments.
7616 * c-cppbuiltin.c (c_cpp_builtins): Define
7617 __cpp_template_template_args.
7618
0dba7960
JJ
76192016-12-21 Jakub Jelinek <jakub@redhat.com>
7620
7621 PR bootstrap/78817
7622 * c-common.c (struct nonnull_arg_ctx): New type.
7623 (check_function_nonnull): Return bool instead of void. Use
7624 nonnull_arg_ctx as context rather than just location_t.
7625 (check_nonnull_arg): Adjust for the new context type, set
7626 warned_p to true if a warning has been diagnosed.
7627 (check_function_arguments): Return bool instead of void.
7628 * c-common.h (check_function_arguments): Adjust prototype.
7629
31bfc9b9
JM
76302016-12-21 Jason Merrill <jason@redhat.com>
7631
7632 * c.opt (-fnew-ttp-matching): New flag.
7633 * c-opts.c (c_common_post_options): Default on if -std=c++1z.
7634
629b3d75
MJ
76352016-12-14 Martin Jambor <mjambor@suse.cz>
7636
7637 * c-omp.c: Include omp-general.h instead of omp-low.h.
7638 (c_finish_oacc_wait): Adjusted call to find_omp_clause to use its new
7639 name.
7640
474da67e
MS
76412016-12-14 Martin Sebor <msebor@redhat.com>
7642
7643 PR c/17308
7644 * c-common.c (check_nonnull_arg): Disable when optimization
7645 is enabled.
7646
fe366b87
MP
76472016-12-12 Marek Polacek <polacek@redhat.com>
7648
7649 PR c++/78647
7650 * c-common.c (attribute_fallthrough_p): Return false for
7651 error_mark_node.
7652
8bd9f164
MS
76532016-12-08 Martin Sebor <msebor@redhat.com>
7654
7655 PR c/78284
7656 * c.opt (-Walloc-zero, -Walloc-size-larger-than): New options.
7657
060162e0
MS
76582016-12-08 Martin Sebor <msebor@redhat.com>
7659
7660 PR c/78165
92a285c1
ML
7661 * c-pretty-print (pp_c_integer_constant): Avoid formatting type
7662 suffix.
060162e0 7663
ee92e7ba
MS
76642016-12-07 Martin Sebor <msebor@redhat.com>
7665
7666 PR c/53562
7667 PR middle-end/77784
7668 PR middle-end/78149
7669 PR middle-end/78138
7670 * c.opt (-Wstringop-overflow): New option.
7671
84b0769e
MO
76722016-12-02 Maxim Ostapenko <m.ostapenko@samsung.com>
7673
7674 * c-attribs.c (asan odr indicator): New attribute.
7675 (handle_asan_odr_indicator_attribute): New function.
7676
7fa6a965
PK
76772016-11-26 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
7678
7679 * c-common.c (c_common_nodes_and_builtins): Remove initialization of
7680 ptrdiff_type_node;
7681
56d8ffc1
JG
76822016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
7683
7684 * c-common.c (excess_precision_mode_join): New.
7685 (c_ts18661_flt_eval_method): New.
7686 (c_c11_flt_eval_method): Likewise.
7687 (c_flt_eval_method): Likewise.
7688 * c-common.h (excess_precision_mode_join): New.
7689 (c_flt_eval_method): Likewise.
7690 * c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): New.
7691 (cpp_iec_559_value): Call it.
7692 (c_cpp_builtins): Modify logic for __LIBGCC_*_EXCESS_PRECISION__,
7693 call c_flt_eval_method to set __FLT_EVAL_METHOD__ and
7694 __FLT_EVAL_METHOD_TS_18661_3__.
7695
04f0fcf7
JG
76962016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
7697
7698 * c-opts.c (c_common_post_options): Add logic to handle the default
7699 case for -fpermitted-flt-eval-methods.
7700
fb2675cb
PB
77012016-11-23 Paolo Bonzini <bonzini@gnu.org>
7702
7703 * c.opt (Wexpansion-to-defined): New.
7704
ec1c5694
JJ
77052016-11-23 Jakub Jelinek <jakub@redhat.com>
7706
7707 PR target/78451
7708 * c-pragma.c (handle_pragma_target): Don't replace
7709 current_target_pragma, but chainon the new args to the current one.
7710
730c9e75
NS
77112016-11-22 Nathan Sidwell <nathan@acm.org>
7712
7713 * array-notation-common.c (cilkplus_extract_an_trplets): Fix
cacd29be 7714 indentation and formatting.
730c9e75 7715
89990732
MS
77162016-11-21 Martin Sebor <msebor@redhat.com>
7717
7718 * c.opt (-fprintf-return-value): Enable by default.
7719
48330c93
BE
77202016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
7721
7722 PR c++/71973
7723 * c.opt (-Wbuiltin-declaration-mismatch): New warning.
7724 * c-common.c (c_common_nodes_and_builtins): Initialize
7725 const_tm_ptr_type_node.
7726
0d939c95
MP
77272016-11-16 Marek Polacek <polacek@redhat.com>
7728
7729 PR c/78285
7730 * c-common.c (c_add_case_label): Turn error_at calls into inform.
7731
8e745a17
JJ
77322016-11-14 Jakub Jelinek <jakub@redhat.com>
7733
7734 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_structured_bindings.
7735
1ee62b92 77362016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17
JJ
7737 Richard Biener <rguenther@suse.de>
7738
7739 * c-common.h (c_common_resword): Add RID_GIMPLE, RID_PHI types.
7740 * c-common.h (enum rid): Add RID_GIMPLE, RID_PHI.
7741 * c.opt (fgimple): New option.
1ee62b92 7742
22b15758
UB
77432016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
7744
7745 PR c/35503
7746 * c-common.h (warn_for_restrict): Declare.
7747 * c-warn.c: Include gcc-rich-location.h.
7748 (warn_for_restrict): New function.
7749 * c-format.c (gcc_tdiag_char_table): Add entry for "Z" specifier.
7750 (gcc_cdiag_char_table): Likewise.
7751 (gcc_cxxdiag_char_table): Likewise.
7752 * c.opt (Wrestrict): New option.
7753
4be719cd
EB
77542016-11-13 Eric Botcazou <ebotcazou@adacore.com>
7755
7756 * c-ada-spec.c (print_ada_declaration): For typedef declarations, look
7757 for nested types only if the type is a record or union and dump SLOC.
7758
4a826ca6
JM
77592016-11-09 Jason Merrill <jason@redhat.com>
7760
7761 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_template_auto.
7762
2e955d50
JJ
77632016-11-09 Jakub Jelinek <jakub@redhat.com>
7764
7765 * c-ubsan.c (ubsan_instrument_shift): Handle split
7766 -fsanitize=shift-base and -fsanitize=shift-exponent.
7767
51dc6603
JM
77682016-11-07 Jason Merrill <jason@redhat.com>
7769
7770 * c.opt (Wc++1z-compat): New.
7771 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_noexcept_function_type.
7772
6dc4a604
ML
77732016-11-07 Martin Liska <mliska@suse.cz>
7774
7775 * c-warn.c (warn_for_unused_label): Save all labels used
7776 in goto or in &label.
7777
b302001e
JM
77782016-11-03 Jason Merrill <jason@redhat.com>
7779
7780 * c-cppbuiltin.c (c_cpp_builtins): Correct
7781 __cpp_inheriting_constructors.
7782
31f7f784
JM
77832016-11-01 Jason Merrill <jason@redhat.com>
7784
2bc78e3c
JM
7785 * c-cppbuiltin.c (c_cpp_builtins): Update
7786 __cpp_inheriting_constructors.
7787
31f7f784
JM
7788 * c.opt (-fnew-inheriting-ctors): New.
7789 * c-opts.c: Default to on for ABI 11+.
7790
dcb466ec
JJ
77912016-10-31 Jakub Jelinek <jakub@redhat.com>
7792
7793 PR c++/77948
7794 * c.opt (fext-numeric-literals): Add Var and Init.
7795 * c-opts.c (c_common_handle_option): Don't clear
7796 cpp_opts->ext_numeric_literals for -std=c++{11,14,1z}.
7797 (c_common_post_options): Clear it here if not set
7798 explicitly.
7799
52e1b91e
AH
78002016-10-28 Aldy Hernandez <aldyh@redhat.com>
7801
7802 PR debug/77773
7803 * c-pretty-print.c (simple_type_specifier): Do not dereference `t'
7804 if NULL.
7805
e16f1cc7
JJ
78062016-10-25 Jakub Jelinek <jakub@redhat.com>
7807
7808 * c-common.h (enum rid): Add RID_BUILTIN_LAUNDER.
7809 * c-common.c (c_common_reswords): Add __builtin_launder.
7810
f8348061
BE
78112016-10-24 Bernd Edlinger <bernd.edlinger@hotmail.de>
7812
7813 * c-common.c (c_common_truthvalue_conversion): Warn for
7814 multiplications in boolean context. Fix the quoting of '<<' and '<'
7815 in the shift warning.
7816
eff89e01
BE
78172016-10-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
7818
7819 * c-common.c (c_common_truthvalue_conversion): Fix the comment.
7820
24bc7bf4
JM
78212016-10-20 Jason Merrill <jason@redhat.com>
7822
7823 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_concepts value.
7824
4c712374
BE
78252016-10-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
7826
7827 * c-common.c (c_common_truthvalue_conversion): Warn only for signed
7828 integer shift ops in boolean context.
7829
78302016-10-18 Aldy Hernandez <aldyh@redhat.com>
adc577c5
AH
7831
7832 * c.opt (Walloca): New.
7833 (Walloca-larger-than=): New.
7834 (Wvla-larger-than=): New.
7835
8fa18c06
MP
78362016-10-17 Marek Polacek <polacek@redhat.com>
7837
7838 * c-warn.c (find_array_ref_with_const_idx_r): Remove parameter names.
7839 Return immediately when finding a match.
7840 (warn_tautological_cmp): Remove a boolean variable that is no longer
7841 needed.
7842
b12b1915
MP
78432016-10-17 Marek Polacek <polacek@redhat.com>
7844
7845 * c-attribs.c: New file.
7846 * c-common.c: Move attributes handling to c-attribs.c.
7847 (get_nonnull_operand): No longer static.
7848 * c-common.h: Move the declarations from c-attribs.c to its own section.
7849
2045acd9
JM
78502016-10-14 Jason Merrill <jason@redhat.com>
7851
7852 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_aggregate_bases
7853 and __cpp_deduction_guides.
7854
14a2c9aa
JM
78552016-10-13 Jason Merrill <jason@redhat.com>
7856
7857 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_inline_variables.
7858
4d0cdd0c
TP
78592016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
7860
7861 * c-cppbuiltin.c: Include memmodel.h.
7862 * c-opts.c: Likewise.
7863 * c-pragma.c: Likewise.
7864 * c-warn.c: Likewise.
7865
70f6d5e1
JJ
78662016-10-12 Jakub Jelinek <jakub@redhat.com>
7867
7868 * c.opt (Wextra): Add as C/C++/ObjC/ObjC++ option.
7869 (Wimplicit-fallthrough=): Enable for these languages by -Wextra.
7870 * c-opts.c (sanitize_cpp_opts): Initialize
7871 cpp_opts->cpp_warn_implicit_fallthrough.
7872
78f61294
MP
78732016-10-11 Marek Polacek <polacek@redhat.com>
7874
7875 * c-common.c (warning_candidate_p): Change the return type to bool
7876 and return true/false instead of 1/0.
7877 (vector_mode_valid_p): Likewise.
7878
038b5cc0
MP
78792016-10-11 Marek Polacek <polacek@redhat.com>
7880
7881 * c-common.c (fold_for_warn): No longer static.
7882 (bool_promoted_to_int_p): Likewise.
7883 (c_common_get_narrower): Likewise.
7884 (constant_expression_warning): Move to c-warn.c.
7885 (constant_expression_error): Likewise.
7886 (overflow_warning): Likewise.
7887 (warn_logical_operator): Likewise.
7888 (find_array_ref_with_const_idx_r): Likewise.
7889 (warn_tautological_cmp): Likewise.
7890 (expr_has_boolean_operands_p): Likewise.
7891 (warn_logical_not_parentheses): Likewise.
7892 (warn_if_unused_value): Likewise.
7893 (strict_aliasing_warning): Likewise.
7894 (sizeof_pointer_memaccess_warning): Likewise.
7895 (check_main_parameter_types): Likewise.
7896 (conversion_warning): Likewise.
7897 (warnings_for_convert_and_check): Likewise.
7898 (match_case_to_enum_1): Likewise.
7899 (match_case_to_enum): Likewise.
7900 (c_do_switch_warnings): Likewise.
7901 (warn_for_omitted_condop): Likewise.
7902 (readonly_error): Likewise.
7903 (lvalue_error): Likewise.
7904 (invalid_indirection_error): Likewise.
7905 (warn_array_subscript_with_type_char): Likewise.
7906 (warn_about_parentheses): Likewise.
7907 (warn_for_unused_label): Likewise.
7908 (warn_for_div_by_zero): Likewise.
7909 (warn_for_memset): Likewise.
7910 (warn_for_sign_compare): Likewise.
7911 (do_warn_double_promotion): Likewise.
7912 (do_warn_unused_parameter): Likewise.
7913 (record_locally_defined_typedef): Likewise.
7914 (maybe_record_typedef_use): Likewise.
7915 (maybe_warn_unused_local_typedefs): Likewise.
7916 (maybe_warn_bool_compare): Likewise.
7917 (maybe_warn_shift_overflow): Likewise.
7918 (warn_duplicated_cond_add_or_warn): Likewise.
7919 (diagnose_mismatched_attributes): Likewise.
7920 * c-common.h: Move the declarations from c-warn.c to its own section.
7921 * c-warn.c: New file.
7922
627be19f
JM
79232016-10-08 Jason Merrill <jason@redhat.com>
7924
7925 * c-common.c (c_common_truthvalue_conversion): Don't distribute
7926 into COND_EXPR in C++.
7927
7bad794a
JJ
79282016-10-08 Jakub Jelinek <jakub@redhat.com>
7929
7930 * c-lex.c (c_lex_with_flags) <case CPP_COMMENT>: For CPP_COMMENT
7931 token with PREV_FALLTHROUGH, skip all following CPP_PADDING and
7932 CPP_COMMENT tokens and set add_flags to PREV_FALLTHROUGH afterwards.
7933
be845b04
JJ
79342016-10-07 Jakub Jelinek <jakub@redhat.com>
7935
7936 Implement LWG2296 helper intrinsic
7937 * c-common.h (enum rid): Add RID_ADDRESSOF.
7938 * c-common.c (c_common_reswords): Add __builtin_addressof.
7939
c09c4992
BE
79402016-10-07 Bernd Edlinger <bernd.edlinger@hotmail.de>
7941
7942 PR c++/77700
7943 * c-common.c (c_common_truthvalue_conversion): Warn also for
7944 suspicious enum values in boolean context.
7945
342cfb3e
JJ
79462016-10-06 Jakub Jelinek <jakub@redhat.com>
7947
7948 Implement P0258R2 - helper for C++17
7949 std::has_unique_object_representations trait
7950 * c-common.h (enum rid): Add RID_HAS_UNIQUE_OBJ_REPRESENTATIONS.
7951 * c-common.c (c_common_reswords): Add
7952 __has_unique_object_representations.
7953
2e69f143
JJ
79542016-10-05 Jakub Jelinek <jakub@redhat.com>
7955
7956 PR sanitizer/66343
7957 * c-ubsan.c (ubsan_instrument_return): Don't call
7958 initialize_sanitizer_builtins here.
7959
700fff34
BE
79602016-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
7961
7962 * c-common.c (c_common_truthvalue_conversion): Warn also for suspicious
7963 conditional expression in boolean context when only one arm is
7964 non-boolean.
7965
9563bfcd
JJ
79662016-10-05 Jakub Jelinek <jakub@redhat.com>
7967
04a32443
JJ
7968 PR sanitizer/77823
7969 * c-ubsan.c (ubsan_instrument_shift): Return NULL_TREE if type0
7970 is not integral.
7971
9563bfcd
JJ
7972 * c-common.c (c_common_reswords): Update comment for C++11.
7973
f1644724
JM
79742016-10-04 Jason Merrill <jason@redhat.com>
7975
7976 * c-common.c (make_tree_vector_from_ctor): New.
7977 * c-common.h: Declare it.
7978
5a79befb
JJ
79792016-10-04 Jakub Jelinek <jakub@redhat.com>
7980
7981 * c-cppbuiltin.c (c_cpp_builtins): Don't define
7982 __LIBGCC_JCR_SECTION_NAME__.
7983
1633d3b9
BE
79842016-10-03 Bernd Edlinger <bernd.edlinger@hotmail.de>
7985
7986 * c-common.c (c_common_truthvalue_conversion): Warn for suspicious
7987 left shift in boolean context.
7988
a2c6e7f2
JJ
79892016-09-29 Jakub Jelinek <jakub@redhat.com>
7990
7991 Implement P0001R1 - C++17 removal of register storage class specifier
7992 * c.opt (Wregister): New warning.
7993 * c-opts.c (c_common_post_options): Enable -Wregister by
7994 default for C++17.
7995
75304c87
JG
79962016-09-29 James Greenhalgh <james.greenhalgh@arm.com>
7997
7998 * c-opts.c (c_common_post_options): Remove special case for
7999 TARGET_FLT_EVAL_METHOD_NON_DEFAULT with -fexcess-precision=standard
8000 in C++.
8001
bbfac6da
JJ
80022016-09-27 Jakub Jelinek <jakub@redhat.com>
8003
6e39060a
JJ
8004 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_capture_star_this for
8005 -std=c++1z.
8006
bbfac6da
JJ
8007 * c-ada-spec.c (print_ada_declaration): Remove break after return.
8008
e73cf9a2
TP
80092016-09-26 Thomas Preud'homme <thomas.preudhomme@arm.com>
8010
8011 * c-common.c: Include memmodel.h.
8012
c6147dc4
MP
80132016-09-26 Marek Polacek <polacek@redhat.com>
8014
8015 * c-lex.c (c_common_has_attribute): Handle attribute fallthrough.
8016
81fea426
MP
80172016-09-26 Marek Polacek <polacek@redhat.com>
8018
8019 PR c/7652
8020 * c-common.c (c_common_attribute_table): Add fallthrough attribute.
8021 (handle_fallthrough_attribute): New function.
8022 (attribute_fallthrough_p): New function.
8023 * c-common.h (attribute_fallthrough_p): Declare.
8024
9a2300e9
MP
80252016-09-24 Marek Polacek <polacek@redhat.com>
8026
8027 PR c/77490
8028 * c.opt (Wbool-operation): New.
8029
a09e9e35
BE
80302016-09-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
8031
8032 * c-common.c (c_common_truthvalue_conversion): Inhibit
8033 Wint-in-bool-context warning with from_macro_definition_at.
8034 Mention the expression will always evaluate to true.
8035
d43b4ccc
MS
80362016-09-21 Martin Sebor <msebor@redhat.com>
8037
8038 PR bootstrap/77676
8039 * c.opt (fprintf-return-value): Temporarily initialize to zero
8040 to unblock bootstrap failures.
8041
2e1c20b1
JJ
80422016-09-21 Jakub Jelinek <jakub@redhat.com>
8043
8044 PR c++/77651
8045 * c.opt (Waligned-new=): Add RejectNegative.
8046 (faligned-new=): Likewise. Spelling fix - change
8047 aligned_new_threshhold to aligned_new_threshold.
8048 * c-cppbuiltin.c (c_cpp_builtins): Change aligned_new_threshhold
8049 to aligned_new_threshold.
8050
88d0c3f0
MS
80512016-09-20 Martin Sebor <msebor@redhat.com>
8052
8053 PR middle-end/49905
8054 * c.opt: Add -Wformat-length and -fprintf-return-value.
8055
144a96e4
BE
80562016-09-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
8057
8058 PR c++/77434
8059 * c.opt (Wint-in-bool-context): New warning.
8060 * c-common.c (c_common_truthvalue_conversion): Warn on integer
8061 constants in boolean context.
8062
63012d9a
JM
80632016-09-19 Joseph Myers <joseph@codesourcery.com>
8064
8065 * c-common.c (max_align_t_align): Also consider alignment of
8066 float128_type_node.
8067
931388ce
JM
80682016-09-15 Jason Merrill <jason@redhat.com>
8069
8070 * c-common.c (check_cxx_fundamental_alignment_constraints): Check
8071 DECL_EXTERNAL.
8072
38711381
JM
80732016-09-14 Jason Merrill <jason@redhat.com>
8074
8075 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
8076 limit FIELD_DECL, either.
8077
e51fbec3
MP
80782016-09-14 Marek Polacek <polacek@redhat.com>
8079
8080 * c-common.c (c_common_truthvalue_conversion): Use false instead of 0.
8081 * c-common.h (build_unary_op): Change nonconvert parameter type to bool.
8082 * c-omp.c (c_finish_omp_atomic): Use false instead of 0.
8083
254830ba
DM
80842016-09-13 David Malcolm <dmalcolm@redhat.com>
8085
8086 * c-common.c (warn_logical_not_parentheses): Replace
8087 rich_location::add_fixit_insert calls with add_fixit_insert_before
8088 and add_fixit_insert_after, eliminating the "next_loc" calculation.
8089
42763690
JM
80902016-09-13 Jason Merrill <jason@redhat.com>
8091 Tom de Vries <tom@codesourcery.com>
8092
8093 PR c++/77427
8094 * c-common.c (set_underlying_type): Don't treat array as builtin type.
8095
9453eee9
JM
80962016-09-13 Jason Merrill <jason@redhat.com>
8097
8098 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
8099 limit types at all.
8100
e96809e3
JM
81012016-09-12 Jason Merrill <jason@redhat.com>
8102
8103 * c-common.c (check_cxx_fundamental_alignment_constraints): Fix
8104 bit/byte confusion, allow large alignment for types.
8105
54dcdb88
BE
81062016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
8107
8108 PR c++/77496
8109 * c-common.c (warn_for_omitted_condop): Also warn for boolean data.
8110
d1463eb9
DM
81112016-09-12 David Malcolm <dmalcolm@redhat.com>
8112
8113 PR c/72858
8114 * c-format.c (argument_parser::check_argument_type): Add params
8115 "type_start" and "conversion_char". Use the former to generate
8116 offset_to_type_start and pass it and conversion_char to
8117 check_format_types.
8118 (check_format_info_main): Capture the start of the type
8119 information as "type_start", and pass it an format_char
8120 to arg_parser.check_argument_type.
8121 (check_format_types): Provide an example in the leading comment.
8122 Add params "offset_to_type_start" and "conversion_char"; pass
8123 them to format_type_warning calls.
8124 (test_get_modifier_for_format_len): Likewise.
8125 (matching_type_p): New function.
8126 (get_format_for_type): Add param "conversion_char" and move
8127 implementation into...
8128 (get_format_for_type_1): ...new function, called twice.
8129 Use new function matching_type_p rather than checking for
8130 TYPE_CANONICAL equality.
8131 (get_corrected_substring): New function.
8132 (format_type_warning): Provide an example in the leading comment.
8133 Add params "offset_to_type_start" and "conversion_char". Replace
8134 call to get_format_for_type with call to get_corrected_substring
8135 and move rejection of hints for widths/precisions there.
8136 (assert_format_for_type_streq): Add param "conversion_char".
8137 (ASSERT_FORMAT_FOR_TYPE_STREQ): Add param CONVERSION_CHAR.
8138 (test_get_format_for_type_printf): Add conversion chars to the
8139 tests, adding coverage for various combinations of integer
8140 vs double conversions, and for preserving octal and hexadecimal
8141 conversions.
8142 (test_get_format_for_type_scanf): Add conversion chars to the
8143 tests.
8144
5b28efbb
TV
81452016-09-10 Tom de Vries <tom@codesourcery.com>
8146
8147 PR C/71602
8148 * c-common.c (build_va_arg): Handle more strict
8149 targetm.canonical_va_list_type. Replace first argument type error with
8150 assert.
8151
3f0177e7
MS
81522016-09-09 Martin Sebor <msebor@redhat.com>
8153
8154 PR c/77520
8155 PR c/77521
8156 * c-format.c (argument_parser::find_format_char_info): Use %qc
8157 format directive unconditionally.
8158
af63ba4b
JM
81592016-09-09 Jason Merrill <jason@redhat.com>
8160
8161 Implement C++17 new of over-aligned types.
8162 * c.opt: Add -faligned-new and -Waligned-new.
8163 * c-common.c (max_align_t_align): Split out from...
8164 (cxx_fundamental_alignment_p): ...here.
8165 * c-common.h: Declare it.
8166 * c-cppbuiltin.c (c_cpp_builtins): Handle aligned new.
8167
c65248cb
JM
81682016-09-09 Joseph Myers <joseph@codesourcery.com>
8169
8170 * c-cppbuiltin.c (builtin_define_type_width): New function.
8171 (builtin_define_stdint_macros, c_cpp_builtins): Define type width
8172 macros.
8173
e5106e27
DM
81742016-09-07 David Malcolm <dmalcolm@redhat.com>
8175
8176 * c-common.c (get_cpp_ttype_from_string_type): Handle being passed
8177 a POINTER_TYPE.
8178 (substring_loc::get_location): Move to substring-locations.c,
8179 keeping implementation as...
8180 (c_get_substring_location): New function, from the above, reworked
8181 to use accessors rather than member lookup.
8182 * c-common.h (class substring_loc): Move to substring-locations.h,
8183 replacing with a forward decl.
8184 (c_get_substring_location): New decl.
8185 * c-format.c: Include "substring-locations.h".
8186 (format_warning_va): Move to substring-locations.c.
8187 (format_warning_at_substring): Likewise.
8188
ab20d992 81892016-09-06 Martin Sebor <msebor@redhat.com>
a42e7952
MS
8190
8191 PR c/77336
8192 * c-format.c (check_function_format): Avoid issuing warnings for
8193 functions unless they call format functions with non-constant
8194 format strings.
8195
b772a565
RB
81962016-09-06 Richard Biener <rguenther@suse.de>
8197
8198 PR c/77450
8199 * c-common.c (c_common_mark_addressable_vec): Handle
8200 COMPOUND_LITERAL_EXPR.
8201
25ff5dd3
MP
82022016-09-05 Marek Polacek <polacek@redhat.com>
8203
8204 PR c/77423
8205 * c-common.c (bool_promoted_to_int_p): New function.
8206 (expr_has_boolean_operands_p): New function.
8207 (warn_logical_not_parentheses): Return if expr_has_boolean_operands_p.
8208 (maybe_warn_bool_compare): Use bool_promoted_to_int_p.
8209
21234eb5
TV
82102016-09-04 Tom de Vries <tom@codesourcery.com>
8211
8212 revert:
8213 2016-08-29 Tom de Vries <tom@codesourcery.com>
8214
8215 * c-common.c (build_va_arg): Replace first argument type error
8216 with assert.
8217
9dc5773f
JJ
82182016-09-02 Jakub Jelinek <jakub@redhat.com>
8219
8220 PR c/65467
8221 * c-omp.c (c_finish_omp_atomic): Reject _Atomic qualified expressions.
8222 (c_finish_omp_for): Reject _Atomic qualified iterators.
8223
82242016-09-01 Martin Sebor <msebor@redhat.com>
3d7b83b6
MS
8225
8226 * c-ada-spec.c (dump_ada_function_declaration): Increase buffer
8227 size to guarantee it fits the output of the formatted function
8228 regardless of its arguments.
8229
295844f6
MP
82302016-09-01 Marek Polacek <polacek@redhat.com>
8231
8232 PR c/7652
8233 * c-common.c (resolve_overloaded_builtin): Fix formatting. Add
8234 FALLTHRU comments.
8235
3d06b6f2
MP
82362016-08-29 Marek Polacek <polacek@redhat.com>
8237
8238 PR c/77292
8239 * c-common.c (warn_logical_not_parentheses): Don't warn for
8240 a comparison or a logical operator.
8241
34cedad5
TV
82422016-08-29 Tom de Vries <tom@codesourcery.com>
8243
8244 * c-common.c (build_va_arg): Fix type comparison assert.
8245
f162d717
TV
82462016-08-29 Tom de Vries <tom@codesourcery.com>
8247
8248 * c-common.c (build_va_arg): Replace first argument type error
8249 with assert.
8250
ba9bbd6f
TV
82512016-08-29 Tom de Vries <tom@codesourcery.com>
8252
8253 PR c/77398
8254 * c-common.c (build_va_arg): Add first argument error. Build va_arg
8255 with error_mark_node as va_list instead of with illegal va_list.
8256
ebef225f
MP
82572016-08-25 Marek Polacek <polacek@redhat.com>
8258 David Malcolm <dmalcolm@redhat.com>
8259
8260 * c-common.c (warn_logical_not_parentheses): Print fixit hints.
8261 * c-common.h (warn_logical_not_parentheses): Update declaration.
8262
b00e6e75
MP
82632016-08-22 Marek Polacek <polacek@redhat.com>
8264
8265 PR c++/77321
8266 * c-common.c (warn_for_memset): Check type for null.
8267
6dc198e3
JM
82682016-08-22 Joseph Myers <joseph@codesourcery.com>
8269
14ec014e 8270 * c-cppbuiltin.c (c_cpp_builtins): Check _FloatN and
6dc198e3
JM
8271 _FloatNx types for suffixes for built-in functions.
8272
c65699ef
JM
82732016-08-19 Joseph Myers <joseph@codesourcery.com>
8274
8275 PR c/32187
8276 * c-common.h (RID_FLOAT16, RID_FLOATN_NX_FIRST, RID_FLOAT32)
8277 (RID_FLOAT64, RID_FLOAT128, RID_FLOAT32X, RID_FLOAT64X)
8278 (RID_FLOAT128X): New enum rid values.
8279 (CASE_RID_FLOATN_NX): New macro.
8280 * c-common.c (c_common_reswords): Add _FloatN and _FloatNx
8281 keywords.
8282 (c_common_type_for_mode): Check for _FloatN and _FloatNx and
8283 corresponding complex types.
8284 (c_common_nodes_and_builtins): For non-C++, register _FloatN and
8285 _FloatNx and corresponding complex types.
8286 (keyword_begins_type_specifier): Use CASE_RID_FLOATN_NX.
8287 * c-cppbuiltin.c (builtin_define_float_constants): Check _FloatN
8288 and _FloatNx types for the widest type for determining
8289 DECIMAL_DIG. Define __LDBL_DECIMAL_DIG__ as well as
8290 __DECIMAL_DIG__ for long double. Handle FMA_SUFFIX being NULL.
8291 (c_cpp_builtins): Call builtin_define_float_constants for _FloatN
8292 and _FloatNx types.
8293 * c-lex.c (interpret_float): Handle _FloatN and _FloatNx
8294 constants.
8295 * c-pretty-print.c (pp_c_floating_constant): Handle _FloatN and
8296 _FloatNx types.
8297
cc015f3a
DM
82982016-08-18 David Malcolm <dmalcolm@redhat.com>
8299
8300 * c-opts.c (c_diagnostic_finalizer): Update for change to
8301 diagnostic_show_locus.
8302
cb18fd07
DM
83032016-08-18 David Malcolm <dmalcolm@redhat.com>
8304
8305 * c-common.c: Include "spellcheck.h".
8306 (cb_get_suggestion): New function.
8307 * c-common.h (cb_get_suggestion): New decl.
8308 * c-lex.c (init_c_lex): Initialize cb->get_suggestion to
8309 cb_get_suggestion.
8310
a76989dc
MP
83112016-08-18 Marek Polacek <polacek@redhat.com>
8312
8313 PR c/71514
8314 * c-common.c (get_atomic_generic_size): Disallow pointer-to-function
8315 and pointer-to-VLA.
8316
65e736c0
DM
83172016-08-16 David Malcolm <dmalcolm@redhat.com>
8318
8319 PR c/72857
8320 * c-common.c (substring_loc::get_range): Rename to...
8321 (substring_loc::get_location): ...this, converting param from a
8322 source_range * to a location_t *. Call
8323 get_source_location_for_substring rather than
8324 get_source_range_for_substring, and pass in m_caret_idx.
8325 * c-common.h (substring_loc::substring_loc): Add param "caret_idx".
8326 (substring_loc::get_range): Replace with...
8327 (substring_loc::get_location): ...this.
8328 (substring_loc::set_caret_index): New method.
8329 (substring_loc): Add field m_caret_idx.
8330 * c-format.c (format_warning_va): Update for above changes.
8331 Rename local "substring_loc" to "fmt_substring_loc" to avoid
8332 clashing with type name.
8333 (format_warning_at_char): Add caret_idx param to substring_loc ctor.
8334 (check_argument_type): Likewise.
8335 (format_type_warning): Rename param "fmt_loc" to "whole_fmt_loc"
8336 Use a copy when emitting warnings, setting the caret index from TYPE.
8337
7e1dde14 83382016-08-16 Eric Botcazou <ebotcazou@adacore.com>
8e745a17 8339 Arnaud Charlet <charlet@adacore.com>
7e1dde14
EB
8340
8341 * c-ada-spec.c (dump_number): New function.
8342 (handle_escape_character): Likewise.
8343 (print_ada_macros): Add handling of constant integers and strings.
8344
191816a3
MP
83452016-08-12 Marek Polacek <polacek@redhat.com>
8346
8347 PR c/7652
8348 * c-common.c (scalar_to_vector): Adjust fall through comment.
8349 * c-opts.c (c_common_handle_option): Likewise.
8350 * c-pragma.c (handle_pragma_pack): Add FALLTHRU.
8351 * c-pretty-print.c (c_pretty_printer::postfix_expression): Adjust
8352 fall through comment.
8353 * cilk.c (extract_free_variables): Add FALLTHRU.
8354
452df4a4
JM
83552016-08-10 Jason Merrill <jason@redhat.com>
8356
8357 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_if_constexpr.
8358
f3365c12
JM
83592016-08-09 Jason Merrill <jason@redhat.com>
8360
8361 * c-common.c (c_common_attribute_table): vector_size affects type
8362 identity.
8363
f0bc3323
MP
83642016-08-09 Marek Polacek <polacek@redhat.com>
8365
8366 PR c/7652
8367 * c-ada-spec.c (dump_generic_ada_node): Add return.
8368
98e5a19a
JM
83692016-08-09 Jason Merrill <jason@redhat.com>
8370
8371 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_constexpr for
8372 C++17 constexpr lambdas.
8373
895aa8e1
DM
83742016-08-08 David Malcolm <dmalcolm@redhat.com>
8375
8376 PR c/64955
8377 * c-common.h (selftest::c_format_c_tests): New declaration.
8378 (selftest::run_c_tests): New declaration.
8379 * c-format.c: Include "selftest.h.
8380 (format_warning_va): Add param "corrected_substring" and use
8381 it to add a replacement fix-it hint.
8382 (format_warning_at_substring): Likewise.
8383 (format_warning_at_char): Update for new param of
8384 format_warning_va.
8385 (argument_parser::check_argument_type): Pass "fki" to
8386 check_format_types.
8387 (check_format_types): Add param "fki" and pass it to
8388 format_type_warning.
8389 (deref_n_times): New function.
8390 (get_modifier_for_format_len): New function.
8391 (selftest::test_get_modifier_for_format_len): New function.
8392 (get_format_for_type): New function.
8393 (format_type_warning): Add param "fki" and use it to attempt
8394 to provide hints for argument types when calling
8395 format_warning_at_substring.
8396 (selftest::get_info): New function.
8397 (selftest::assert_format_for_type_streq): New function.
8398 (ASSERT_FORMAT_FOR_TYPE_STREQ): New macro.
8399 (selftest::test_get_format_for_type_printf): New function.
8400 (selftest::test_get_format_for_type_scanf): New function.
8401 (selftest::c_format_c_tests): New function.
8402
e52ed3fe
DM
84032016-08-08 David Malcolm <dmalcolm@redhat.com>
8404
8405 PR c/52952
8406 * c-format.c: Include "diagnostic.h".
8407 (location_column_from_byte_offset): Delete.
8408 (location_from_offset): Delete.
8409 (format_warning_va): New function.
8410 (format_warning_at_substring): New function.
8411 (format_warning_at_char): New function.
8412 (check_format_arg): Capture location of format_tree and pass to
8413 check_format_info_main.
8414 (argument_parser): Add fields "start_of_this_format" and
8415 "format_string_cst".
8416 (flag_chars_t::validate): Add param "format_string_cst". Convert
8417 warning_at call using location_from_offset to call to
8418 format_warning_at_char.
8419 (argument_parser::argument_parser): Add param "format_string_cst_"
8420 and use use it to initialize field "format_string_cst".
8421 Initialize new field "start_of_this_format".
8422 (argument_parser::read_format_flags): Convert warning_at call
8423 using location_from_offset to a call to format_warning_at_char.
8424 (argument_parser::read_any_format_left_precision): Likewise.
8425 (argument_parser::read_any_format_precision): Likewise.
8426 (argument_parser::read_any_other_modifier): Likewise.
8427 (argument_parser::find_format_char_info): Likewise, in three places.
8428 (argument_parser::parse_any_scan_set): Likewise, in one place.
8429 (argument_parser::handle_conversions): Likewise, in two places.
8430 (argument_parser::check_argument_type): Add param "fmt_param_loc"
8431 and use it to make a substring_loc. Pass the latter to
8432 check_format_types.
8433 (check_format_info_main): Add params "fmt_param_loc" and
8434 "format_string_cst". Convert warning_at calls using
8435 location_from_offset to calls to format_warning_at_char. Pass the
8436 new params to the arg_parser ctor. Pass "format_string_cst" to
8437 flag_chars.validate. Pass "fmt_param_loc" to
8438 arg_parser.check_argument_type.
8439 (check_format_types): Convert first param from a location_t
8440 to a const substring_loc & and rename to "fmt_loc". Attempt
8441 to extract the range of the relevant parameter and pass it
8442 to format_type_warning.
8443 (format_type_warning): Convert first param from a location_t
8444 to a const substring_loc & and rename to "fmt_loc". Add
8445 params "param_range" and "type". Replace calls to warning_at
8446 with calls to format_warning_at_substring.
8447
1c4d457e
DM
84482016-08-08 David Malcolm <dmalcolm@redhat.com>
8449
8450 * c-format.c (class flag_chars_t): New class.
8451 (struct length_modifier): New struct.
8452 (class argument_parser): New class.
8453 (flag_chars_t::flag_chars_t): New ctor.
8454 (flag_chars_t::has_char_p): New method.
8455 (flag_chars_t::add_char): New method.
8456 (flag_chars_t::validate): New method.
8457 (flag_chars_t::get_alloc_flag): New method.
8458 (flag_chars_t::assignment_suppression_p): New method.
8459 (argument_parser::argument_parser): New ctor.
8460 (argument_parser::read_any_dollar): New method.
8461 (argument_parser::read_format_flags): New method.
8462 (argument_parser::read_any_format_width): New method.
8463 (argument_parser::read_any_format_left_precision): New method.
8464 (argument_parser::read_any_format_precision): New method.
8465 (argument_parser::handle_alloc_chars): New method.
8466 (argument_parser::read_any_length_modifier): New method.
8467 (argument_parser::read_any_other_modifier): New method.
8468 (argument_parser::find_format_char_info): New method.
8469 (argument_parser::validate_flag_pairs): New method.
8470 (argument_parser::give_y2k_warnings): New method.
8471 (argument_parser::parse_any_scan_set): New method.
8472 (argument_parser::handle_conversions): New method.
8473 (argument_parser::check_argument_type): New method.
8474 (check_format_info_main): Introduce classes argument_parser
8475 and flag_chars_t, moving the code within the loop into methods
8476 of these classes. Make various locals "const".
8477
88fa5555
DM
84782016-08-05 David Malcolm <dmalcolm@redhat.com>
8479
8480 * c-common.c: Include "substring-locations.h".
8481 (get_cpp_ttype_from_string_type): New function.
8482 (g_string_concat_db): New global.
8483 (substring_loc::get_range): New method.
8484 * c-common.h (g_string_concat_db): New declaration.
8485 (class substring_loc): New class.
8486 * c-lex.c (lex_string): When concatenating strings, capture the
8487 locations of all tokens using a new obstack, and record the
8488 concatenation locations within g_string_concat_db.
8489 * c-opts.c (c_common_init_options): Construct g_string_concat_db
8490 on the ggc-heap.
8491
78169471
MP
84922016-07-29 Marek Polacek <polacek@redhat.com>
8493
638fc14f
MP
8494 PR c/71926
8495 * c-common.c (c_common_truthvalue_conversion): Use LOCATION for the
8496 parentheses warning.
8497
78169471
MP
8498 PR c/71574
8499 * c-common.c (handle_alloc_align_attribute): Also check FUNCTION_DECL.
8500
1225d6b1
ML
85012016-07-28 Martin Liska <mliska@suse.cz>
8502
8503 PR gcov-profile/68025
8504 * c-common.c (handle_no_profile_instrument_function_attribute):
8505
ec1e2a40
BE
85062016-07-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
8507
8508 * c-common.c (check_user_alignment): Use LOG2_BITS_PER_UNIT instead of
8509 BITS_PER_UNIT_LOG.
8510
5ec2cd9f
JM
85112016-07-25 Jason Merrill <jason@redhat.com>
8512
8513 PR c++/65970
8514 * c.opt (fconstexpr-loop-limit): New.
8515
9dc5773f 85162016-07-22 Martin Sebor <msebor@redhat.com>
2e6b45af
MS
8517
8518 PR c++/71675
8519 * c-common.c (resolve_overloaded_builtin): Avoid converting
8520 __atomic_compare_exchange_n return type to that of what its
8521 first argument points to.
8522
e3fe09c1
UB
85232016-07-22 Uros Bizjak <ubizjak@gmail.com>
8524
8525 * c-common.c: Use HOST_WIDE_INT_M1U instead of
8526 ~(unsigned HOST_WIDE_INT) 0.
8527
bc91c436
ML
85282016-07-22 Martin Liska <mliska@suse.cz>
8529
8530 PR gcov-profile/69028
8531 PR gcov-profile/62047
8532 * cilk.c (create_cilk_helper_decl): Set location of a new decl
8533 to the current_function_decl.
8534
451dcc66
JM
85352016-07-21 Jason Merrill <jason@redhat.com>
8536
8537 PR c++/65168
8538 * c-common.c (c_common_truthvalue_conversion): Check
8539 c_inhibit_evaluation_warnings for warning about address of
8540 reference.
8541
de6a69ee
DM
85422016-07-20 David Malcolm <dmalcolm@redhat.com>
8543
8544 * c-common.h (lookup_name_fuzzy): Convert return type from tree to
8545 const char *.
8546
d022c55a
JM
85472016-07-15 Jason Merrill <jason@redhat.com>
8548
8549 * c-opts.c (c_common_post_options): Update -fabi-version default to 11.
8550
ddbbcb19
JJ
85512016-07-15 Jakub Jelinek <jakub@redhat.com>
8552
8553 PR c/71858
8554 * c-common.h (enum lookup_name_fuzzy_kind): Add
8555 FUZZY_LOOKUP_FUNCTION_NAME.
8556
d0cf395a
JM
85572016-07-08 Jason Merrill <jason@redhat.com>
8558
8559 P0145: Refining Expression Order for C++.
8560 * c.opts (-fargs-in-order): Rename to -fstrong-eval-order.
8561 * c-opts.c: Adjust.
8562
98d44e93
MT
85632016-07-05 Markus Trippelsdorf <markus@trippelsdorf.de>
8564
8565 PR c++/71214
8566 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_rvalue_references.
8567
f9d8d994
TS
85682016-06-29 Thomas Schwinge <thomas@codesourcery.com>
8569
8570 * c-pragma.h (enum pragma_kind): Rename
8571 PRAGMA_OMP_DECLARE_REDUCTION to PRAGMA_OMP_DECLARE. Adjust all
8572 users.
8573
4aa83879
RB
85742016-06-29 Richard Biener <rguenther@suse.de>
8575
8576 PR middle-end/71002
8577 * c-common.c (c_common_get_alias_set): Remove union type punning case.
8578
a25bd9e6
JM
85792016-06-24 Jason Merrill <jason@redhat.com>
8580
8581 P0145R2: Refining Expression Order for C++.
8582 * c-common.c (verify_tree) [COMPOUND_EXPR]: Fix handling on LHS of
8583 MODIFY_EXPR.
8584
a86451b9
JJ
85852016-06-24 Jakub Jelinek <jakub@redhat.com>
8586
8587 * c-common.c (check_builtin_function_arguments): Require last
8588 argument of BUILT_IN_*_OVERFLOW_P to have INTEGER_TYPE type.
8589 Adjust wording of diagnostics for BUILT_IN_*_OVERLFLOW
8590 if the last argument is pointer to enumerated or boolean type.
8591
1a4f11c8
DM
85922016-06-22 David Malcolm <dmalcolm@redhat.com>
8593
8594 PR c/70339
8595 * c-common.h (enum lookup_name_fuzzy_kind): New enum.
8596 (lookup_name_fuzzy): New prototype.
8597
fe55692c
JDA
85982016-06-21 John David Anglin <danglin@gcc.gnu.org>
8599
8600 * c-common.c (get_source_date_epoch): Use int64_t instead of long long.
8601
4eb24e01
JM
86022016-06-14 Jason Merrill <jason@redhat.com>
8603
8604 P0145R2: Refining Expression Order for C++.
8605 * c.opt (fargs-in-order): New.
8606 * c-opts.c (c_common_post_options): Adjust flag_args_in_order.
8607
ef7cf206
JJ
86082016-06-13 Jakub Jelinek <jakub@redhat.com>
8609
0dda258b
JJ
8610 PR sanitizer/71498
8611 * c-gimplify.c (ubsan_walk_array_refs_r): Set *walk_subtrees = 0 on
8612 all BIND_EXPRs, and on all BIND_EXPRs recurse also on BIND_EXPR_BODY.
8613
ef7cf206
JJ
8614 PR preprocessor/71183
8615 * c-ppoutput.c (init_pp_output): Set cb->get_source_date_epoch
8616 to cb_get_source_date_epoch.
8617
50b15873
JJ
86182016-06-10 Jakub Jelinek <jakub@redhat.com>
8619
8620 PR c/68657
8621 * c.opt (Wpsabi): Add Warning flag.
8622
4d926e34
MS
86232016-06-10 Martin Sebor <msebor@redhat.com>
8624
8625 PR c/71392
14ec014e 8626 * c-common.c (handle_nonnull_attribute): Accept
4d926e34
MS
8627 the nonnull attribute in type-generic builtins.
8628
e01b4e16
MS
86292016-06-09 Martin Sebor <msebor@redhat.com>
8630
8631 PR c/70883
8632 * c-common.c (builtin_function_validate_nargs): Make text of error
8633 message consistent with others like it.
8634
44a845ca
MS
86352016-06-08 Martin Sebor <msebor@redhat.com>
8636 Jakub Jelinek <jakub@redhat.com>
8637
8638 PR c++/70507
8639 PR c/68120
8640 * c-common.c (check_builtin_function_arguments): Handle
8641 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
8642
a80a7051
RB
86432016-06-08 Richard Biener <rguenther@suse.de>
8644
8645 * c-common.c (parse_optimize_options): Improve diagnostic messages.
8646
bfd67b47
RB
86472016-06-07 Richard Biener <rguenther@suse.de>
8648
8649 PR c/61564
8650 * c-common.c (parse_optimize_options): Only apply CL_OPTIMIZATION
8651 options and warn about others.
8652
15c98b2e
ES
86532016-06-01 Eduard Sanou <dhole@openmailbox.org>
8654
8655 * c-common.c (get_source_date_epoch): Rename to
8656 cb_get_source_date_epoch.
8657 * c-common.c (cb_get_source_date_epoch): Use a single generic erorr
8658 message when the parsing fails. Use error_at instead of fatal_error.
8659 * c-common.h (get_source_date_epoch): Rename to
8660 cb_get_source_date_epoch.
8661 * c-common.h (cb_get_source_date_epoch): Prototype.
8662 * c-common.h (MAX_SOURCE_DATE_EPOCH): Define.
8663 * c-common.h (c_omp_region_type): Remove trailing comma.
8664 * c-lex.c (init_c_lex): Set cb->get_source_date_epoch callback.
8665 * c-lex.c (c_lex_with_flags): Remove initialization of
8666 pfile->source_date_epoch.
8667
00631022
JJ
86682016-05-30 Jakub Jelinek <jakub@redhat.com>
8669
8670 PR c++/71349
8671 * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_DEPEND to
8672 C_OMP_CLAUSE_SPLIT_TARGET. Put OMP_CLAUSE_NOWAIT to
8673 C_OMP_CLAUSE_SPLIT_TARGET if combined with target construct,
8674 instead of C_OMP_CLAUSE_SPLIT_FOR.
8675
f17a223d
RB
86762016-05-24 Richard Biener <rguenther@suse.de>
8677
8678 PR middle-end/70434
8679 PR c/69504
8680 * c-common.h (convert_vector_to_pointer_for_subscript): Rename to ...
8681 (convert_vector_to_array_for_subscript): ... this.
8682 * c-common.c (convert_vector_to_pointer_for_subscript): Use a
8683 VIEW_CONVERT_EXPR to an array type. Rename to ...
8684 (convert_vector_to_array_for_subscript): ... this.
8685
4f2e1536
MP
86862016-05-12 Marek Polacek <polacek@redhat.com>
8687
8688 PR c/70756
8689 * c-common.c (pointer_int_sum): Call size_in_bytes_loc instead of
8690 size_in_bytes and pass LOC to it.
8691
d6e83a8d
MM
86922016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
8693
8694 PR c/43651
8695 * c.opt (Wduplicate-decl-specifier): New option.
8696
5c3a10fb
MP
86972016-05-11 Marek Polacek <polacek@redhat.com>
8698
8699 PR c++/71024
8700 * c-common.c (diagnose_mismatched_attributes): New function.
8701 * c-common.h (diagnose_mismatched_attributes): Declare.
8702
deef7113
MP
87032016-05-04 Marek Polacek <polacek@redhat.com>
8704
8705 * c.opt (Wdangling-else): New option.
8706
79ce98bc
MP
87072016-05-03 Marek Polacek <polacek@redhat.com>
8708
8709 PR c/70859
8710 * c-common.c (builtin_function_validate_nargs): Add location
8711 parameter. Use it.
8712 (check_builtin_function_arguments): Add location and arguments
8713 parameters. Use them.
8714 * c-common.h (check_builtin_function_arguments): Update declaration.
8715
381cdae4
RB
87162016-05-03 Richard Biener <rguenther@suse.de>
8717
8718 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Do not
8719 allow call args to gimplify to SSA names.
8720
1d793c34
MP
87212016-05-03 Marek Polacek <polacek@redhat.com>
8722
8723 * c-common.h (enum c_omp_region_type): Remove stray comma.
8724
77886428
CP
87252016-05-02 Cesar Philippidis <cesar@codesourcery.com>
8726
8727 * c-common.h (enum c_omp_region_type): Define.
8728
697e0b28
RS
87292016-05-02 Richard Sandiford <richard.sandiford@arm.com>
8730
8731 * c-common.c (shorten_compare): Use wi::to_wide.
8732
e7ff0319
CP
87332016-04-29 Cesar Philippidis <cesar@codesourcery.com>
8734
8735 PR middle-end/70626
8736 * c-common.h (c_oacc_split_loop_clauses): Add boolean argument.
8737 * c-omp.c (c_oacc_split_loop_clauses): Use it to duplicate
8738 reduction clauses in acc parallel loops.
8739
2fff3db8
MP
87402016-04-29 Marek Polacek <polacek@redhat.com>
8741
8742 PR c/70852
8743 * c-common.c (warn_for_memset): Check domain before accessing it.
8744
509063eb
DV
87452016-04-29 Dominik Vogt <vogt@linux.vnet.ibm.com>
8746
8747 PR/69089
8748 * c-common.c (handle_aligned_attribute): Allow 0 as an argument to the
8749 "aligned" attribute.
8750
b632761d
JM
87512016-04-28 Jason Merrill <jason@redhat.com>
8752
8753 * c-lex.c (c_common_has_attribute): Handle nodiscard.
8754
174f6622
ES
87552016-04-28 Eduard Sanou <dhole@openmailbox.org>
8756 Matthias Klose <doko@debian.org>
8757
8758 * c-common.c (get_source_date_epoch): New function, gets the environment
7365279f 8759 variable SOURCE_DATE_EPOCH and parses it as long long with error
174f6622
ES
8760 handling.
8761 * c-common.h (get_source_date_epoch): Prototype.
8762 * c-lex.c (c_lex_with_flags): set parse_in->source_date_epoch.
8763
6bc2bb18
RB
87642015-04-27 Ryan Burn <contact@rnburn.com>
8765
8766 PR c++/69024
8767 PR c++/68997
8768 * cilk.c (cilk_ignorable_spawn_rhs_op): Change to external linkage.
8769 (cilk_recognize_spawn): Renamed from recognize_spawn and change to
8770 external linkage.
8771 (cilk_detect_and_unwrap): Corresponding changes.
8772 (extract_free_variables): Don't extract free variables from
8773 AGGR_INIT_EXPR slot.
8774 * c-common.h (cilk_ignorable_spawn_rhs_op): Prototype.
8775 (cilk_recognize_spawn): Likewise.
8776
c1e1f433
BS
87772016-04-27 Bernd Schmidt <bschmidt@redhat.com>
8778
8779 * c.opt (Wmemset-elt-size): New option.
8780 * c-common.c (warn_for_memset): New function.
8781 * c-common.h (warn_for_memset): Declare.
8782
d067e05f
JM
87832016-04-25 Jason Merrill <jason@redhat.com>
8784
8785 * c-common.c (handle_unused_attribute): Accept CONST_DECL.
8786 No longer static.
8787 * c-common.h: Declare it.
8788 * c-lex.c (c_common_has_attribute): Add maybe_unused.
8789
9aa36ae5
JM
87902016-04-22 Jason Merrill <jason@redhat.com>
8791
8792 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_range_based_for.
8793
477d4906
IV
87942016-04-20 Ilya Verbin <ilya.verbin@intel.com>
8795
8796 PR c++/69363
8797 * c-cilkplus.c (c_finish_cilk_clauses): Remove function.
8798 * c-common.h (c_finish_cilk_clauses): Remove declaration.
8799
fe37c7af
MM
88002016-04-18 Michael Matz <matz@suse.de>
8801
8802 * c-common.c (handle_aligned_attribute): Use SET_TYPE_ALIGN
8803 and SET_DECL_ALIGN.
8804
23f2660f
EB
88052016-04-17 Eric Botcazou <ebotcazou@adacore.com>
8806
8807 * c-ada-spec.c (get_underlying_decl): Return the typedef, if any.
8808 (dump_generic_ada_node) <POINTER_TYPE>: Clean up handling of access
8809 to incomplete types.
8810 (dump_nested_type): Remove redundant tests and tidy up.
8811 (print_ada_declaration): Also set TREE_VISITED on the declaration of
8812 a type which is the typedef of an original type.
8813
1e77281b
MP
88142016-04-15 Marek Polacek <polacek@redhat.com>
8815
8816 PR c/70651
8817 * c-common.c (build_va_arg): Change two asserts into errors and return
8818 error_mark_node.
8819
b3a77f21
MP
88202016-04-13 Marek Polacek <polacek@redhat.com>
8821
8822 PR c++/70639
8823 * c-indentation.c (should_warn_for_misleading_indentation): Bail out
8824 for switch statements, too.
8825
322b8466
JM
88262016-03-28 Jason Merrill <jason@redhat.com>
8827
8828 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_range_based_for.
8829
fbdb6baf
MP
88302016-03-23 Marek Polacek <polacek@redhat.com>
8831
8832 PR c++/69884
8833 * c.opt (Wignored-attributes): New option.
8834
5c240f4d
DM
88352016-03-22 David Malcolm <dmalcolm@redhat.com>
8836
8837 PR c/69993
8838 * c-indentation.c (warn_for_misleading_indentation): Rewrite the
8839 diagnostic text, reversing the order of the warning and note so
8840 that they appear in source order.
8841
14ba7b28
MP
88422016-03-17 Marek Polacek <polacek@redhat.com>
8843
8844 PR c/69407
8845 * c-common.c (resolve_overloaded_builtin): Set TREE_USED for the fetch
8846 operations.
8847
08a1cadc
JM
88482016-03-14 Jason Merrill <jason@redhat.com>
8849
2aaeea19
JM
8850 * c-cppbuiltin.c (c_cpp_builtins): Set __cpp_hex_float.
8851
08a1cadc
JM
8852 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_range_based_for.
8853
c06d25bb
RB
88542016-03-09 Richard Biener <rguenther@suse.de>
8855
8856 PR c/70143
8857 * c-common.c (strict_aliasing_warning): Add back
8858 alias_sets_conflict_p check.
8859
80aac5c8
JM
88602016-03-08 Jason Merrill <jason@redhat.com>
8861
8862 * c-opts.c (set_std_cxx1z): Don't enable concepts.
8863
64b23c13
DM
88642016-03-04 David Malcolm <dmalcolm@redhat.com>
8865
8866 PR c/68187
8867 * c-indentation.c (get_visual_column): Move code to determine next
8868 tab stop to...
8869 (next_tab_stop): ...this new function.
8870 (line_contains_hash_if): Delete function.
8871 (detect_preprocessor_logic): Delete function.
8872 (get_first_nws_vis_column): New function.
8873 (detect_intervening_unindent): New function.
8874 (should_warn_for_misleading_indentation): Replace call to
8875 detect_preprocessor_logic with a call to
8876 detect_intervening_unindent.
8877
729526f5
DM
88782016-03-04 David Malcolm <dmalcolm@redhat.com>
8879
8880 PR c/68187
8881 * c-indentation.c (should_warn_for_misleading_indentation): When
8882 suppressing warnings about cases where the guard and body are on
8883 the same column, only use the first non-whitespace column in place
8884 of the guard token column when dealing with "else" clauses.
8885 When rejecting aligned BODY and NEXT, loosen the requirement
8886 from equality with the first non-whitespace of guard to simply
8887 that they not be indented relative to it.
8888
e9a35493
RB
88892016-03-04 Richard Biener <rguenther@suse.de>
8890
8891 PR c++/70054
8892 * c-common.c (strict_aliasing_warning): Use alias_set_subset_of
8893 instead of alias_sets_conflict_p.
8894
1be56bc5
MP
88952016-03-01 Marek Polacek <polacek@redhat.com>
8896
8897 PR c++/69795
8898 * c-common.c (reject_gcc_builtin): Check for FUNCTION_DECL rather than
8899 any DECL.
8900
35886f0b
MS
89012016-02-22 Martin Sebor <msebor@redhat.com>
8902
8903 PR middle-end/69780
8904 * c-common.c (check_builtin_function_arguments): Validate and
8905 reject invalid arguments to __builtin_alloca_with_align.
8906
4246c8da
MW
89072016-02-20 Mark Wielaard <mjw@redhat.com>
8908
8909 PR c/28901
8910 * c.opt (Wunused-const-variable): Turn into Alias for...
8911 (Wunused-const-variable=): New option.
8912
268be88c
BE
89132016-02-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
8914
8915 PR c++/69865
8916 * c-opts.c (c_common_post_options): Move call to set_std_cxx14 from
8917 here...
8918 (c_common_init_options): ...to here.
8919 (set_std_cxx98): Initialize flag_isoc94 and flag_isoc99.
8920
871b3f47
JJ
89212016-02-19 Jakub Jelinek <jakub@redhat.com>
8922
8923 PR c++/69826
8924 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_GRAINSIZE.
8925 (init_pragma): Register PRAGMA_CILK_GRAINSIZE even for
8926 flag_preprocess_only.
8927
bf14eba2
JJ
89282016-02-16 Jakub Jelinek <jakub@redhat.com>
8929
8930 PR c/69835
8931 * c.opt (Wnonnull-compare): Enable for -Wall.
8932
ba6b3795
JJ
89332016-02-15 Jakub Jelinek <jakub@redhat.com>
8934
8935 PR c++/69797
8936 * c-common.c (sync_resolve_size): Diagnose too few arguments
8937 even when params is non-NULL empty vector.
8938
a011cd92
BS
89392016-02-08 Bernd Schmidt <bschmidt@redhat.com>
8940
8941 PR target/60410
8942 * c.opt (fshort-double): Remove.
8943
46cb9332
MS
89442016-02-05 Martin Sebor <msebor@redhat.com>
8945
8946 PR c++/69662
8947 * c.opt (Warning options): Update -Wplacement-new to take
8948 an optional argument.
8949
e1b81f2b
JJ
89502016-02-01 Jakub Jelinek <jakub@redhat.com>
8951
8952 PR preprocessor/69543
8953 PR c/69558
8954 * c-pragma.c (handle_pragma_diagnostic): Pass input_location
8955 instead of loc to control_warning_option.
8956
b6adbb9f
NS
89572016-02-01 Nathan Sidwell <nathan@codesourcery.com>
8958
8959 * c.opt (fopenacc-dim=): New option.
8960
5d70666e
RB
89612016-01-27 Ryan Burn <contact@rnburn.com>
8962
8963 PR cilkplus/69267
8964 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Change to use
8965 gimplify_arg. Removed superfluous post_p argument.
8966 * c-family.h (cilk_gimplify_call_params_in_spawned_fn): Removed
8967 superfluous post_p argument.
8968 * c-gimplify.c (c_gimplify_expr): Likewise.
8969
01e1dea3
DM
89702016-01-26 David Malcolm <dmalcolm@redhat.com>
8971
8972 PR other/69006
8973 * c-opts.c (c_diagnostic_finalizer): Replace invocation of
8974 pp_newline_and_flush with pp_flush.
8975
9f04a53e
MS
89762016-01-20 Martin Sebor <msebor@redhat.com>
8977
8978 PR c/69405
8979 * c-common.c (sync_resolve_size): Avoid printing diagnostic about
8980 an incompatible argument when the argument isn't a valid tree node.
8981
7f26f7df
JM
89822016-01-18 Jason Merrill <jason@redhat.com>
8983
8984 PR c++/68767
8985 * c-common.c (check_function_arguments_recurse): Fold the whole
8986 COND_EXPR, not just the condition.
8987
f62bf092
TV
89882016-01-18 Tom de Vries <tom@codesourcery.com>
8989
8990 * c-omp.c (c_oacc_split_loop_clauses): Don't copy OMP_CLAUSE_REDUCTION,
8991 classify as loop clause.
8992
e0a575ff
JJ
89932016-01-15 Jakub Jelinek <jakub@redhat.com>
8994
8995 PR bootstrap/68271
8996 * c-pragma.c (c_register_pragma_1): Adjust comment to note that
8997 C++ FE no longer has limit on number of pragmas.
8998
89992015-01-14 Ryan Burn <contact@rnburn.com>
b6e3db06
RB
9000
9001 PR c++/69048
9002 * cilk.c (create_cilk_wrapper_body): Call fold_build_cleanup_point_expr
c47eaca6 9003 to add missing cleanup point.
b6e3db06 9004
c7df95d8
DM
90052016-01-14 David Malcolm <dmalcolm@redhat.com>
9006
9007 PR c++/68819
9008 * c-indentation.c (get_visual_column): Add location_t param.
9009 Handle the column number being zero by effectively disabling the
9010 warning, with an "inform".
9011 (should_warn_for_misleading_indentation): Add location_t argument
9012 for all uses of get_visual_column.
9013
21efdd80
PP
90142016-01-10 Patrick Palka <ppalka@gcc.gnu.org>
9015
9016 PR c++/69029
9017 * c-indentation.c (should_warn_for_misleading_indentation):
9018 Don't warn about do-while statements.
9019
7a127fa7
MS
90202016-01-07 Martin Sebor <msebor@redhat.com>
9021
9022 PR c/68966
9023 * c-common.c (sync_resolve_size): Reject first argument when it's
9024 a pointer to _Bool.
9025
c589e975
DM
90262016-01-05 David Malcolm <dmalcolm@redhat.com>
9027
9028 PR c/69122
9029 * c-indentation.c (get_visual_column): Remove default argument.
9030 (should_warn_for_misleading_indentation): For the multiline case,
9031 update call to get_visual_column for next_stmt_exploc so that it
9032 captures the location of the first non-whitespace character in the
9033 relevant line. Don't issue warnings if there is non-whitespace
9034 before the next statement.
9035
818ab71a
JJ
90362016-01-04 Jakub Jelinek <jakub@redhat.com>
9037
9038 Update copyright years.
9039
745e411d
DM
90402015-12-21 David Malcolm <dmalcolm@redhat.com>
9041
9042 * c-common.c (binary_op_error): Convert first param from
9043 location_t to rich_location * and use it when emitting an error.
9044 * c-common.h (binary_op_error): Convert first param from
9045 location_t to rich_location *.
9046
de67c4c3
DM
90472015-12-16 David Malcolm <dmalcolm@redhat.com>
9048
9049 * c-common.h (conflict_marker_get_final_tok_kind): New prototype.
9050 * c-lex.c (conflict_marker_get_final_tok_kind): New function.
9051
4a38b02b
IV
90522015-12-15 Ilya Verbin <ilya.verbin@intel.com>
9053
9054 * c-common.c (c_common_attribute_table): Handle "omp declare target
9055 link" attribute.
9056
54d62f51
JJ
90572015-12-14 Jakub Jelinek <jakub@redhat.com>
9058
9059 PR c/68833
9060 * c.opt (Wmissing-format-attribute, Wnormalized): Add Warning option.
9061
8d4227c8
TB
90622014-12-12 Tobias Burnus <burnus@net-b.de>
9063
9064 PR fortran/68815
9065 * c-format.c (gcc_gfc_char_table): Add 'q' flag to remaining
9066 specifiers (%d, %i,%u and %c).
9067
f6069ccc
DM
90682015-12-10 David Malcolm <dmalcolm@redhat.com>
9069
9070 * c.opt (Wmisleading-indentation): Add to -Wall for C and C++.
9071
63bbf46d
JJ
90722015-12-08 Jakub Jelinek <jakub@redhat.com>
9073
9074 PR c/48088
9075 PR c/68657
9076 * c.opt (Wfloat-conversion, Wsign-conversion): Add Warning.
9077 * c-pragma.c (handle_pragma_diagnostic): Adjust
9078 control_warning_option caller.
9079
f79520bb
DM
90802015-12-07 David Malcolm <dmalcolm@redhat.com>
9081
9082 * c-common.c (c_cpp_error): Update for change to
9083 rich_location::set_range.
9084
b3d5bc62
JJ
90852015-12-04 Paolo Bonzini <bonzini@gnu.org>
9086
9087 * c-common.c (maybe_warn_shift_overflow): Warn on all overflows if
9088 shifting 1 out of the sign bit.
9089
90902015-12-04 Kirill Yukhin <kirill.yukhin@intel.com>
9091
9092 * c-common.c (c_common_attribute_table[]): Update max arguments
9093 count for "simd" attribute.
9094 (handle_simd_attribute): Parse "notinbranch" and "inbranch" arguments.
9095
6eb4a537
JJ
90962015-12-03 Jakub Jelinek <jakub@redhat.com>
9097
9098 PR preprocessor/57580
9099 * c-ppoutput.c (print): Change printed field to bool.
9100 Move src_file last for smaller padding.
9101 (init_pp_output): Set print.printed to false instead of 0.
9102 (scan_translation_unit): Fix up formatting. Set print.printed
9103 to true after printing something other than newline.
9104 (scan_translation_unit_trad): Set print.printed to true instead of 1.
9105 (maybe_print_line_1): Set print.printed to false instead of 0.
9106 (print_line_1): Likewise.
9107 (do_line_change): Set print.printed to true instead of 1.
9108 (cb_define, dump_queued_macros, cb_include, cb_def_pragma,
9109 dump_macro): Set print.printed to false after printing newline.
9110
4250754e
JM
91112015-12-02 Jason Merrill <jason@redhat.com>
9112
f479b43d
JM
9113 * c-common.c (fold_for_warn): New.
9114 (warn_logical_operator, warn_tautological_cmp)
9115 (check_function_arguments_recurse, maybe_warn_bool_compare): Use it.
9116
4250754e
JM
9117 * c-common.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
9118 (c_fully_fold_internal, decl_constant_value_for_optimization):
9119 Move to c/c-fold.c.
9120 * c-common.h: Don't declare decl_constant_value_for_optimization.
9121
e9e32ee6
JM
91222015-12-02 Joseph Myers <joseph@codesourcery.com>
9123
9124 PR c/68162
9125 * c-common.h (c_build_qualified_type): Add extra default
9126 arguments.
9127
37d5ad46
JB
91282015-12-01 Julian Brown <julian@codesourcery.com>
9129 Cesar Philippidis <cesar@codesourcery.com>
9130 James Norris <James_Norris@mentor.com>
9131
9132 * c-pragma.c (oacc_pragmas): Add PRAGMA_OACC_HOST_DATA.
9133 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_HOST_DATA.
9134 (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_USE_DEVICE.
9135
f07862c7
EB
91362015-11-30 Eric Botcazou <ebotcazou@adacore.com>
9137
9138 * c-ada-spec.c (print_ada_macros): Remove redundant blank line.
9139 (decl_sloc_common): Delete and move bulk of processing to...
9140 (decl_sloc): ...here.
9141 (pp_ada_tree_identifier): Remove reference to QUAL_UNION_TYPE.
9142 (dump_ada_double_name): Remove S parameter and compute the suffix.
9143 (dump_ada_array_type): Add PARENT parameter. Simplify computation of
9144 element type and deal with an anonymous one.
9145 (dump_ada_template): Use RECORD_OR_UNION_TYPE_P macro.
9146 (dump_generic_ada_node): Tweak. Adjust call to dump_ada_array_type
9147 and remove reference to QUAL_UNION_TYPE.
9148 (dump_nested_types): Make 2 passes on the fields and move bulk to...
9149 (dump_nested_type): ...here. New function extracted from above.
9150 Generate a full declaration for anonymous element type of arrays.
9151 (print_ada_declaration): Really skip anonymous declarations. Remove
9152 references to QUAL_UNION_TYPE. Adjust call to dump_ada_array_type.
9153 Clean up processing of declarations of array types and objects.
9154 (print_ada_struct_decl): Remove reference to QUAL_UNION_TYPE.
9155 Remove obsolete code and tidy up.
9156
75c8aac3
JH
91572015-11-29 Jan Hubicka <hubicka@ucw.cz>
9158
9159 PR c/67581
9160 * c-common.c (handle_transparent_union_attribute): Update
9161 also type variants.
9162
b58d3df2
ML
91632015-11-27 Martin Liska <mliska@suse.cz>
9164
9165 PR c++/68312
9166 * array-notation-common.c (cilkplus_extract_an_triplets):
9167 Release vector of vectors.
9168 * cilk.c (gimplify_cilk_spawn): Free allocated memory.
9169
89a01fcf
EB
91702015-11-26 Eric Botcazou <ebotcazou@adacore.com>
9171
9172 PR c++/68527
9173 * c-ada-spec.c (dump_nested_types): Add guard for error_mark_node.
9174 (print_ada_struct_decl): Likewise.
9175
cc5c5226
IZ
91762015-11-23 Igor Zamyatin <igor.zamyatin@intel.com>
9177
9178 PR c++/68001
9179 * c-gimplify.c (c_gimplify_expr): Stop the process if see an error.
9180 * cilk.c (recognize_spawn): Determine location in a more precise
9181 way.
9182
269adb9d
JM
91832015-11-19 Jason Merrill <jason@redhat.com>
9184
9185 * c-common.c (shorten_compare): But look through macros from
9186 system headers.
9187
d0eccfcd
JM
91882015-11-18 Jason Merrill <jason@redhat.com>
9189
9190 * c-common.c (shorten_compare): Don't -Wtype-limits if the
9191 non-constant operand comes from a macro.
9192
3e44547c
JM
91932015-11-17 Jason Merrill <jason@redhat.com>
9194
9195 PR bootstrap/68346
9196 * c-common.c (warn_tautological_cmp): Fold before checking for
9197 constants.
9198
0f62c7a0
MP
91992015-11-16 Marek Polacek <polacek@redhat.com>
9200
9201 PR c++/68362
9202 * c-common.c (check_case_bounds): Fold low and high cases.
9203
a868811e
MP
92042015-11-16 Marek Polacek <polacek@redhat.com>
9205
9206 * c-ada-spec.c (dump_ada_template): Use RECORD_OR_UNION_TYPE_P.
9207 * c-common.c (c_common_get_alias_set): Likewise.
9208 (handle_visibility_attribute): Likewise.
9209
fff77217
KY
92102015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
9211
9212 * c-common.c (handle_simd_attribute): New.
9213 (struct attribute_spec): Add entry for "simd".
9214 (handle_simd_attribute): New.
9215
269e63b7
KT
92162015-11-13 Kai Tietz <ktietz70@googlemail.com>
9217
9218 * c-lex.c (interpret_float): Use fold_convert.
9219
ebedc9a3
DM
92202015-11-13 David Malcolm <dmalcolm@redhat.com>
9221
9222 * c-common.c (c_fully_fold_internal): Capture existing souce_range,
9223 and store it on the result.
9224 * c-opts.c (c_common_init_options): Set
9225 global_dc->colorize_source_p.
9226
6e232ba4
JN
92272015-11-12 James Norris <jnorris@codesourcery.com>
9228 Joseph Myers <joseph@codesourcery.com>
9229
7365279f 9230 * c-pragma.c (oacc_pragmas): Add entry for declare directive.
6e232ba4
JN
9231 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_DECLARE.
9232 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT and
9233 PRAGMA_OACC_CLAUSE_LINK.
9234
e78bede6
MP
92352015-11-11 Marek Polacek <polacek@redhat.com>
9236
9237 PR c/68107
9238 PR c++/68266
9239 * c-common.c (valid_array_size_p): New function.
9240 * c-common.h (valid_array_size_p): Declare.
9241
3f8257db 92422015-11-11 Dominique d'Humieres <dominiq@lps.ens.fr>
4ac93c7c
DH
9243
9244 PR bootstrap/68271
9245 * c-pragma.c (c_register_pragma_1): Update the gcc_assert to 256.
9246
69f293c9
AM
92472015-11-11 Andrew MacLeod <amacleod@redhat.com>
9248
9249 * array-notation-common.c: Remove unused header files.
9250 * c-ada-spec.c: Likewise.
9251 * c-cilkplus.c: Likewise.
9252 * c-common.c: Likewise.
9253 * c-cppbuiltin.c: Likewise.
9254 * c-dump.c: Likewise.
9255 * c-format.c: Likewise.
9256 * c-gimplify.c: Likewise.
9257 * c-indentation.c: Likewise.
9258 * c-lex.c: Likewise.
9259 * c-omp.c: Likewise.
9260 * c-opts.c: Likewise.
9261 * c-pch.c: Likewise.
9262 * c-ppoutput.c: Likewise.
9263 * c-pragma.c: Likewise.
9264 * c-pretty-print.c: Likewise.
9265 * c-semantics.c: Likewise.
9266 * c-ubsan.c: Likewise.
9267 * cilk.c: Likewise.
9268 * stub-objc.c: Likewise.
9269
3a40d81d
NS
92702015-11-09 Thomas Schwinge <thomas@codesourcery.com>
9271 Cesar Philippidis <cesar@codesourcery.com>
9272 James Norris <jnorris@codesourcery.com>
9273 Julian Brown <julian@codesourcery.com>
9274 Nathan Sidwell <nathan@codesourcery.com>
9275
9276 * c-pragma.c (oacc_pragmas): Add "routine".
9277 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ROUTINE.
9278
ee45a32d
EB
92792015-11-08 Eric Botcazou <ebotcazou@adacore.com>
9280
9281 * c-common.c (c_common_attributes): Add scalar_storage_order.
9282 (handle_scalar_storage_order_attribute): New function.
9283 * c-pragma.c (global_sso): New variable.
9284 (maybe_apply_pragma_scalar_storage_order): New function.
9285 (handle_pragma_scalar_storage_order): Likewise.
9286 (init_pragma): Register scalar_storage_order.
9287 * c-pragma.h (maybe_apply_pragma_scalar_storage_order): Declare.
9288 * c.opt (Wscalar-storage-order): New warning.
9289 (fsso-struct=): New option.
9290
eb11eb15
MS
92912015-11-08 Martin Sebor <msebor@redhat.com>
9292
9293 * c.opt (Wplacement-new): Add a period to the end of a sentence.
9294
0aad0198
RS
92952015-11-07 Richard Sandiford <richard.sandiford@arm.com>
9296
9297 * c-common.c: Don't undef DEF_BUILTIN.
9298
8a645150
DM
92992015-11-06 David Malcolm <dmalcolm@redhat.com>
9300
9301 * c-common.c (c_cpp_error): Convert parameter from location_t to
9302 rich_location *. Eliminate the "column_override" parameter and
9303 the call to diagnostic_override_column.
9304 Update the "done_lexing" clause to set range 0
9305 on the rich_location, rather than overwriting a location_t.
9306 * c-common.h (c_cpp_error): Convert parameter from location_t to
9307 rich_location *. Eliminate the "column_override" parameter.
9308
7a5e4956
CP
93092015-11-05 Cesar Philippidis <cesar@codesourcery.com>
9310 Thomas Schwinge <thomas@codesourcery.com>
9311 James Norris <jnorris@codesourcery.com>
9312
9313 * c-omp.c (c_oacc_split_loop_clauses): Make TILE, GANG, WORKER, VECTOR,
9314 AUTO, SEQ, INDEPENDENT and PRIVATE loop clauses. Associate REDUCTION
9315 clauses with parallel and kernels and loops.
9316 * c-pragma.h (enum pragma_omp_clause): Add entries for
9317 PRAGMA_OACC_CLAUSE_{INDEPENDENT,TILE,DEFAULT}.
9318 * pt.c (tsubst_omp_clauses): Add support for OMP_CLAUSE_{NUM_GANGS,
9319 NUM_WORKERS,VECTOR_LENGTH,GANG,WORKER,VECTOR,ASYNC,WAIT,TILE,AUTO,
9320 INDEPENDENT,SEQ}.
9321 (tsubst_expr): Add support for OMP_CLAUSE_{KERNELS,PARALLEL,LOOP}.
9322
e2f5cc96
MS
93232015-11-05 Martin Sebor <msebor@redhat.com>
9324
9325 PR c++/67942
9326 * c.opt (-Wplacement-new): New option.
9327
e01d41e5
JJ
93282015-11-05 Jakub Jelinek <jakub@redhat.com>
9329
9330 * c-common.h (c_finish_omp_atomic): Add TEST argument.
9331 (c_omp_check_loop_iv, c_omp_check_loop_iv_exprs): New prototypes.
9332 * c-omp.c (c_finish_omp_atomic): Add TEST argument. Don't call
9333 save_expr or create_tmp_var* if TEST is true.
9334 (c_finish_omp_for): Store OMP_FOR_ORIG_DECLS always.
9335 Don't call add_stmt here.
9336 (struct c_omp_check_loop_iv_data): New type.
9337 (c_omp_check_loop_iv_r, c_omp_check_loop_iv,
9338 c_omp_check_loop_iv_exprs): New functions.
9339 (c_omp_split_clauses): Adjust for lastprivate being allowed on
9340 distribute.
9341 (c_omp_declare_simd_clauses_to_numbers): Change
9342 OMP_CLAUSE_LINEAR_VARIABLE_STRIDE OMP_CLAUSE_LINEAR_STEP into numbers.
9343 (c_omp_declare_simd_clauses_to_decls): Similarly change those
9344 from numbers to PARM_DECLs.
9345
595278be
MM
93462015-11-04 Mikhail Maltsev <maltsevm@gmail.com>
9347
9348 * c-omp.c (c_omp_split_clauses): Remove conditional compilation. Use
9349 flag_checking.
9350
3f8257db 93512015-11-03 Bernd Schmidt <bschmidt@redhat.com>
c85158de
MS
9352
9353 PR c++-common/67882
b3d5bc62
JJ
9354 * c-common.h (fold_offsetof_1): Add argument.
9355 * c-common.c (fold_offsetof_1): Diagnose more invalid
c85158de
MS
9356 offsetof expressions that reference elements past the end of
9357 an array.
9358
4bf9e5a8
TS
93592015-11-03 Thomas Schwinge <thomas@codesourcery.com>
9360 Chung-Lin Tang <cltang@codesourcery.com>
9361
9362 * c-pragma.c (oacc_pragmas): Add "atomic".
9363 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ATOMIC.
9364
3b1661a9
ES
93652015-10-30 Evgeny Stupachenko <evstupac@gmail.com>
9366
9367 * c-common.c (handle_target_clones_attribute): New.
9368 (c_common_attribute_table): Add handle_target_clones_attribute.
9369 (handle_always_inline_attribute): Add check on target_clones attribute.
9370 (handle_target_attribute): Ditto.
9371
2adfab87
AM
93722015-10-29 Andrew MacLeod <amacleod@redhat.com>
9373
9374 * array-notation-common.c: Reorder #include's and remove duplicates.
9375 * c-ada-spec.c: Likewise.
9376 * c-cilkplus.c: Likewise.
9377 * c-common.c: Likewise.
9378 * c-cppbuiltin.c: Likewise.
9379 * c-dump.c: Likewise.
9380 * c-format.c: Likewise.
9381 * c-gimplify.c: Likewise.
9382 * c-indentation.c: Likewise.
9383 * c-lex.c: Likewise.
9384 * c-omp.c: Likewise.
9385 * c-opts.c: Likewise.
9386 * c-pch.c: Likewise.
9387 * c-ppoutput.c: Likewise.
9388 * c-pragma.c: Likewise.
9389 * c-pretty-print.c: Likewise.
9390 * c-semantics.c: Likewise.
9391 * c-ubsan.c: Likewise.
9392 * cilk.c: Likewise.
9393 * stub-objc.c: Likewise.
9394
d90ec4f2
JM
93952015-10-28 Jason Merrill <jason@redhat.com>
9396
9397 * c-common.c (pointer_int_sum): Fold the MULT_EXPR.
9398
88bae6f4
TS
93992015-10-27 Thomas Schwinge <thomas@codesourcery.com>
9400 James Norris <jnorris@codesourcery.com>
9401 Cesar Philippidis <cesar@codesourcery.com>
9402
9403 PR c/64765
9404 PR c/64880
9405 * c-common.h (c_oacc_split_loop_clauses): Declare function.
9406 * c-omp.c (c_oacc_split_loop_clauses): New function.
9407
b1726d6c
MS
94082015-10-21 Martin Sebor <msebor@redhat.com>
9409
9410 PR driver/68043
9411 * c.opt: End each sentence that describes an option with a period.
9412
fa60eeb9
MP
94132015-10-20 Marek Polacek <polacek@redhat.com>
9414
9415 * array-notation-common.c (is_cilkplus_vector_p): Define.
9416 * c-common.h (is_cilkplus_vector_p): Declare.
9417
95979049
MP
94182015-10-20 Marek Polacek <polacek@redhat.com>
9419
9420 * c.opt (std=gnu++11): Do not describe as experimental.
9421 (std=gnu++14): Likewise.
9422
2a9fb712
JM
94232015-10-19 Jason Merrill <jason@redhat.com>
9424
9425 * c-cppbuiltin.c (c_cpp_builtins): Define
9426 __cpp_nontype_template_args.
9427
13b380a3
JM
94282015-10-19 Jason Merrill <jason@redhat.com>
9429
9430 * c-cppbuiltin.c (c_cpp_builtins): Define
9431 __cpp_enumerator_attributes, __cpp_fold_expressions,
9432 __cpp_unicode_characters.
9433
d9a6bd32
JJ
94342015-10-13 Jakub Jelinek <jakub@redhat.com>
9435 Aldy Hernandez <aldyh@redhat.com>
9436
9437 * c-common.c (enum c_builtin_type): Define DEF_FUNCTION_TYPE_9,
9438 DEF_FUNCTION_TYPE_10 and DEF_FUNCTION_TYPE_11.
9439 (c_define_builtins): Likewise.
9440 * c-common.h (enum c_omp_clause_split): Add
9441 C_OMP_CLAUSE_SPLIT_TASKLOOP.
9442 (c_finish_omp_critical, c_finish_omp_ordered): Add CLAUSES argument.
9443 (c_finish_omp_for): Add ORIG_DECLV argument.
9444 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP as
9445 201511 instead of 201307.
9446 * c-omp.c (c_finish_omp_critical): Add CLAUSES argument, set
9447 OMP_CRITICAL_CLAUSES to it.
9448 (c_finish_omp_ordered): Add CLAUSES argument, set
9449 OMP_ORDERED_CLAUSES to it.
9450 (c_finish_omp_for): Add ORIG_DECLV argument, set OMP_FOR_ORIG_DECLS
9451 to it if OMP_FOR. Clear DECL_INITIAL on the IVs.
9452 (c_omp_split_clauses): Handle OpenMP 4.5 combined/composite
9453 constructs and new OpenMP 4.5 clauses. Clear
9454 OMP_CLAUSE_SCHEDULE_SIMD if not combined with OMP_SIMD. Add
9455 verification code.
9456 * c-pragma.c (omp_pragmas_simd): Add taskloop.
9457 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKLOOP.
9458 (enum pragma_omp_clause): Add
9459 PRAGMA_OMP_CLAUSE_{DEFAULTMAP,GRAINSIZE,HINT,{IS,USE}_DEVICE_PTR}
9460 and PRAGMA_OMP_CLAUSE_{LINK,NOGROUP,NUM_TASKS,PRIORITY,SIMD,THREADS}.
9461
624d31fe
RS
94622015-10-05 Richard Sandiford <richard.sandiford@arm.com>
9463
9464 * c-lex.c (interpret_float): Use real_equal instead of
9465 REAL_VALUES_EQUAL.
9466
b8fd7909
JM
94672015-10-04 Jason Merrill <jason@redhat.com>
9468
9469 Implement N4514, C++ Extensions for Transactional Memory.
9470 * c-common.c (c_common_reswords): Add C++ TM TS keywords.
9471 (c_common_attribute_table): Add transaction_safe_dynamic.
9472 transaction_safe now affects type identity.
9473 (handle_tm_attribute): Handle transaction_safe_dynamic.
9474 * c-common.h (enum rid): Add RID_ATOMIC_NOEXCEPT,
9475 RID_ATOMIC_CANCEL, RID_SYNCHRONIZED.
9476 (OBJC_IS_CXX_KEYWORD): Add RID_SYNCHRONIZED.
9477 (D_TRANSMEM): New.
9478 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_transactional_memory.
9479 * c-pretty-print.c (pp_c_attributes_display): Don't print
9480 transaction_safe in C++.
9481
12651878
MP
94822015-10-02 Marek Polacek <polacek@redhat.com>
9483
9484 * c.opt (Wduplicated-cond): Don't enable by -Wall anymore.
9485
3e3b8d63
MP
94862015-10-02 Marek Polacek <polacek@redhat.com>
9487
9488 PR c/64249
9489 * c-common.c (warn_duplicated_cond_add_or_warn): New function.
9490 * c-common.h (warn_duplicated_cond_add_or_warn): Declare.
9491 * c.opt (Wduplicated-cond): New option.
9492
0d1a8f75
JM
94932015-10-01 Joseph Myers <joseph@codesourcery.com>
9494
9495 * c.opt (std=c11): Do not describe as experimental.
9496 (std=gnu11): Likewise.
9497 (std=iso9899:2011): Likewise.
9498
3e32ee19
NS
94992015-09-28 Nathan Sidwell <nathan@codesourcery.com>
9500
9501 * c-common.c (DEF_FUNCTION_TYPE_VAR_6): New.
9502 (DEF_FUNCTION_TYPE_VAR_11): Delete.
9503
974348ee
MP
95042015-09-25 Marek Polacek <polacek@redhat.com>
9505
9506 * c-ubsan.c (ubsan_instrument_division): Remove unnecessary code.
9507 (ubsan_instrument_shift): Likewise.
9508
15dbc1a6
MP
95092015-09-25 Marek Polacek <polacek@redhat.com>
9510
9511 PR sanitizer/64906
9512 * c-ubsan.c (ubsan_instrument_division): Also pre-evaluate OP1.
9513
6b95d7cc
PP
95142015-09-24 Patrick Palka <ppalka@gcc.gnu.org>
9515
9516 * c-indentation.c (should_warn_for_misleading_indentation):
9517 Compare next_stmt_vis_column with guard_line_first_nws instead
9518 of with guard_line_vis_column.
9519
c1822f9c
MLI
95202015-09-23 Manuel López-Ibáñez <manu@gcc.gnu.org>
9521
9522 PR c/49654
9523 PR c/49655
9524 * c-pragma.c (handle_pragma_diagnostic): Detect non-warning
9525 options and options not valid for the current language.
9526
d5398058
PP
95272015-09-22 Patrick Palka <ppalka@gcc.gnu.org>
9528
9529 * c-indentation.c (should_warn_for_misleading_indentation):
9530 Float out and consolidate the calls to get_visual_column that
9531 are passed guard_exploc as an argument. Compare
9532 next_stmt_vis_column with guard_line_first_nws instead of with
9533 body_line_first_nws.
9534
6b333269
NS
95352015-09-22 Nathan Sidwell <nathan@codesourcery.com>
9536
9537 * c.opt (Wmultiple-inheritance, Wvirtual-inheritance, Wtemplates,
9538 Wnamespaces): New C++ warnings.
9539
a75f1574
JM
95402015-09-22 Jason Merrill <jason@redhat.com>
9541
9542 * c-common.h (abi_compat_version_crosses): New.
9543 (warn_abi_version): Declare.
9544 * c-common.c: Define it.
9545 * c-opts.c (c_common_post_options): Handle it.
9546 flag_abi_compat_version defaults to 8.
9547
bdaaa8b7
VV
95482015-09-21 Ville Voutilainen <ville.voutilainen@gmail.com>
9549
9550 Complete the implementation of N4230, Nested namespace definition.
9551 * c-cppbuiltin.c: Add __cpp_namespace_attributes and
9552 __cpp_nested_namespace_definitions.
9553
eaa797e8
MLI
95542015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
9555
9556 * c-pragma.c (handle_pragma_diagnostic): Fix wrong return.
9557
c4914de6
MLI
95582015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
9559
9560 * c-pragma.c (handle_pragma_diagnostic): Use explicit location
9561 when warning.
9562 * c-pragma.h (pragma_lex): Add optional loc argument.
9563
fcb87c50
MM
95642015-09-16 Mikhail Maltsev <maltsevm@gmail.com>
9565
9566 * c-format.c (check_format_arg): Adjust to use common block size in all
9567 object pools.
9568
31bdd08a
DM
95692015-09-15 David Malcolm <dmalcolm@redhat.com>
9570
9571 * c-format.c (location_from_offset): Update for change in
9572 signature of location_get_source_line.
9573 * c-indentation.c (get_visual_column): Likewise.
9574 (line_contains_hash_if): Likewise.
9575
aa9f4b4c
MP
95762015-09-14 Marek Polacek <polacek@redhat.com>
9577
9578 * c-opts.c (c_common_post_options): Set C++ standard earlier, before
9579 setting various warnings.
9580
aa256c4a
MP
95812015-09-14 Marek Polacek <polacek@redhat.com>
9582
9583 * c-common.c (warn_for_sign_compare): Cast to unsigned when shifting
9584 a negative value.
9585
0f876f22
MW
95862015-09-11 Mark Wielaard <mjw@redhat.com>
9587
9588 PR c/28901
9589 * c.opt (Wunused-variable): Option from common.opt.
9590 (Wunused-const-variable): New option.
9591
273aa49e
PC
95922015-09-09 Paolo Carlini <paolo.carlini@oracle.com>
9593
9594 PR c++/53184
9595 * c.opt ([Wsubobject-linkage]): Add.
9596
1807ffc1
MS
95972015-09-03 Martin Sebor <msebor@redhat.com>
9598
9599 PR c/66516
9600 * c-common.h (c_decl_implicit, reject_gcc_builtin): Declare new
9601 functions.
9602 * c-common.c (reject_gcc_builtin): Define.
9603
38942840
BI
96042015-09-02 Balaji V. Iyer <balaji.v.iyer@intel.com>
9605
9606 PR middle-end/60586
9607 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): New
9608 prototype.
9609 * c-gimplify.c (c_gimplify_expr): Added a call to the function
9610 cilk_gimplify_call_params_in_spawned_fn.
9611 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): New function.
9612 (gimplify_cilk_spawn): Removed EXPR_STMT and CLEANUP_POINT_EXPR
9613 unwrapping.
9614
c316b5e4
MP
96152015-08-25 Marek Polacek <polacek@redhat.com>
9616
9617 PR middle-end/67330
9618 * c-common.c (handle_weak_attribute): Don't check whether the
9619 visibility can be changed here.
9620
584a7c46
MLI
96212015-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
9622
9623 * c-lex.c (c_lex_with_flags): Use explicit locations.
9624
a79683d5
TS
96252015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
9626
9627 * c-ada-spec.h, c-common.c, c-common.h, c-format.c, c-format.h,
9628 c-objc.h, c-ppoutput.c, c-pragma.c, c-pragma.h: Remove useless
9629
61717a45
FXC
96302015-08-18 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
9631
9632 PR middle-end/36757
9633 * c-common.c (check_builtin_function_arguments): Add check
9634 for BUILT_IN_SIGNBIT argument.
9635
329524f5
PC
96362015-08-18 Paolo Carlini <paolo.carlini@oracle.com>
9637
9638 PR c++/67160
9639 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_static_assert value
9640 in c++1z mode.
9641
4ee55665
MP
96422015-08-17 Marek Polacek <polacek@redhat.com>
9643
9644 * c-pretty-print.c (pp_c_cv_qualifiers): Remove code dealing
9645 with whitespaces before qualifier names.
9646
b893e375
MP
96472015-08-12 Marek Polacek <polacek@redhat.com>
9648
9649 PR c++/55095
9650 * c-common.c (maybe_warn_shift_overflow): Properly handle
9651 left-shifting 1 into the sign bit.
9652
c2d89095
MLI
96532015-08-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
9654
9655 * c.opt (Wchkp): Use LangEnabledBy instead of EnabledBy.
9656
971e17ff
AS
96572015-08-06 Andrew Sutton <andrew.n.sutton@gmail.com>
9658 Braden Obrzut <admin@maniacsvault.net>
9659 Jason Merrill <jason@redhat.com>
9660
9661 Add C++ Concepts TS support.
9662 * c-common.c (c_common_reswords): Add __is_same_as, concept, requires.
9663 * c-common.h (enum rid): Add RID_IS_SAME_AS, RID_CONCEPT, RID_REQUIRES.
9664 (D_CXX_CONCEPTS, D_CXX_CONCEPTS_FLAGS): New.
9665 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_concepts.
9666 * c-opts.c (set_std_cxx1z): Set flag_concepts.
9667 * c.opt (fconcepts): New.
9668
b3d5bc62
JJ
96692015-08-02 Martin Sebor <msebor@redhat.com>
9670
9671 * c.opt (-Wframe-address): New warning option.
9672
8ebca419
PP
96732015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
9674
9675 * c-indentation.c (should_warn_for_misleading_indentation):
9676 Improve heuristics.
9677
1a1e101f
PP
96782015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
9679
9680 * c-indentation.c (get_visual_column): Add parameter first_nws,
9681 use it. Update comment documenting the function.
9682 (is_first_nonwhitespace_on_line): Remove.
9683 (should_warn_for_misleading_indentation): Replace usage of
9684 of is_first_nonwhitespace_on_line with get_visual_column.
9685
992118a1
PP
96862015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
9687
9688 * c-indentation.h (struct token_indent_info): Define.
9689 (get_token_indent_info): Define.
9690 (warn_for_misleading_information): Declare.
9691 * c-common.h (warn_for_misleading_information): Remove.
9692 * c-identation.c (warn_for_misleading_indentation):
9693 Change declaration to take three token_indent_infos. Adjust
9694 accordingly.
9695 * c-identation.c (should_warn_for_misleading_indentation):
9696 Likewise. Bail out early if the body is a compound statement.
9697 (guard_tinfo_to_string): Define.
9698
e8fa3817
JM
96992015-07-30 Jason Merrill <jason@redhat.com>
9700
9701 * c-pretty-print.c (unary_expression) [INDIRECT_REF]: Don't print
9702 '*' for reference decay.
9703
173864e8
MP
97042015-07-30 Marek Polacek <polacek@redhat.com>
9705
9706 * c-common.c (warn_tautological_cmp): Bail for float types.
9707
f2afe6dd
MP
97082015-07-27 Marek Polacek <polacek@redhat.com>
9709
9710 PR bootstrap/67030
9711 * c-common.c (warn_tautological_cmp): Don't warn for macro expansion.
9712
05b28fd6
MP
97132015-07-27 Marek Polacek <polacek@redhat.com>
9714
9715 PR c++/66555
9716 PR c/54979
9717 * c-common.c (find_array_ref_with_const_idx_r): New function.
9718 (warn_tautological_cmp): New function.
9719 * c-common.h (warn_tautological_cmp): Declare.
9720 * c.opt (Wtautological-compare): New option.
9721
5a5062b8
MP
97222015-07-23 Marek Polacek <polacek@redhat.com>
9723
9724 * c-ubsan.c (ubsan_instrument_division): Use unshare_expr throughout.
9725 (ubsan_instrument_shift): Likewise.
9726
dc891fe7
MP
97272015-07-23 Marek Polacek <polacek@redhat.com>
9728
9729 PR sanitizer/66908
9730 * c-ubsan.c: Include gimplify.h.
9731 (ubsan_instrument_division): Unshare OP0 and OP1.
9732 (ubsan_instrument_shift): Likewise.
9733
451b5e48
MP
97342015-07-20 Marek Polacek <polacek@redhat.com>
9735 Richard Sandiford <richard.sandiford@arm.com>
9736
9737 PR c++/55095
9738 * c-common.c (c_fully_fold_internal): Warn about left shift overflows.
9739 Use EXPR_LOC_OR_LOC.
9740 (maybe_warn_shift_overflow): New function.
9741 * c-common.h (maybe_warn_shift_overflow): Declare.
9742 * c-opts.c (c_common_post_options): Set warn_shift_overflow.
9743 * c.opt (Wshift-overflow): New option.
9744
fb0b2914
ML
97452015-07-16 Martin Liska <mliska@suse.cz>
9746
9747 * c-format.c (static void check_format_info_main): Use
9748 object_allocator instead of pool_allocator.
9749 (check_format_arg): Likewise.
9750 (check_format_info_main): Likewise.
9751
903f5c23
AM
97522015-07-15 Andrew MacLeod <amacleod@redhat.com>
9753
9754 * c-opts.c: Remove multiline #include comment.
9755
026c3cfd
AH
97562015-07-12 Aldy Hernandez <aldyh@redhat.com>
9757
9758 * c-common.c: Fix double word typos.
9759
bb49ee66
EB
97602015-07-10 Eric Botcazou <ebotcazou@adacore.com>
9761
9762 * c-ada-spec.h (cpp_operation): Revert latest change.
9763 * c-ada-spec.c (print_ada_declaration): Likewise. Skip implicit
9764 constructors and destructors.
9765
1916bcb5
AM
97662015-07-09 Andrew MacLeod <amacleod@redhat.com>
9767
9768 * c-common.h: Adjust includes for flags.h changes.
9769 * stub-objc.c: Likewise.
026c3cfd 9770
a9dcd529
EB
97712015-07-08 Eric Botcazou <ebotcazou@adacore.com>
9772
9773 * c-ada-spec.h (cpp_operation): Add IS_CONSTEXPR.
9774 * c-ada-spec.c (print_ada_declaration): Skip constexpr constructors.
9775
b03b462f
JJ
97762015-07-08 Jakub Jelinek <jakub@redhat.com>
9777
9778 * c-omp.c (c_omp_declare_simd_clauses_to_numbers): If all clauses
9779 are to be removed, return NULL rather than original clauses list.
9780
c7131fb2
AM
97812015-07-07 Andrew MacLeod <amacleod@redhat.com>
9782
9783 * array-notation-common.c: Adjust includes.
9784 * c-ada-spec.c: Likewise.
9785 * c-cilkplus.c: Likewise.
9786 * c-common.h: Likewise.
9787 * c-cppbuiltin.c: Likewise.
9788 * c-dump.c: Likewise.
9789 * c-format.c: Likewise.
9790 * c-gimplify.c: Likewise.
9791 * c-indentation.c: Likewise.
9792 * c-lex.c: Likewise.
9793 * c-omp.c: Likewise.
9794 * c-opts.c: Likewise.
9795 * c-pch.c: Likewise.
9796 * c-ppoutput.c: Likewise.
9797 * c-pragma.c: Likewise.
9798 * c-pretty-print.c: Likewise.
9799 * c-semantics.c: Likewise.
9800 * c-ubsan.c: Likewise.
9801 * cilk.c: Likewise.
9802 * stub-objc.c: Likewise.
9803
2a7fb83f
EB
98042015-07-07 Eric Botcazou <ebotcazou@adacore.com>
9805
9806 * c-ada-spec.h (cpp_operation): Add IS_MOVE_CONSTRUCTOR.
9807 * c-ada-spec.c (print_ada_declaration): Skip move constructors.
9808
a03c9bf1
JM
98092015-07-01 Jason Merrill <jason@redhat.com>
9810
36a85135
JM
9811 * c-common.h (D_CXX11): Rename from D_CXX0X.
9812 (RID_FIRST_CXX11, RID_LAST_CXX11): Rename from *_CXX0X.
9813 * c-common.c: Adjust.
9814
e7fa68d5
JM
9815 * c-opts.c (c_common_post_options): Default to C++14.
9816
a03c9bf1
JM
9817 * c-opts.c (c_common_post_options): Highest ABI level is now 10.
9818
fe95b036
ESR
98192015-06-30 Edward Smith-Rowland <3dw4rd@verizon.net>
9820
9821 Implement N4197 - Adding u8 character literals
b3d5bc62 9822 * c-ada-spec.c (print_ada_macros): Treat CPP_UTF8CHAR like
a64be36b 9823 CPP_CHAR.
b3d5bc62 9824 * c-common.c (c_parse_error): Print CPP_UTF8CHAR and
a64be36b 9825 CPP_UTF8CHAR_USERDEF tokens.
b3d5bc62 9826 * c-lex.c (c_lex_with_flags): Treat CPP_UTF8CHAR_USERDEF
a64be36b
EB
9827 and CPP_UTF8CHAR tokens.
9828 (lex_charconst): Treat CPP_UTF8CHAR token.
fe95b036 9829
da2e71c9
MLI
98302015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
9831
9832 PR fortran/66605
9833 * c-common.c (do_warn_unused_parameter): Move here.
9834 * c-common.h (do_warn_unused_parameter): Declare.
9835
b155cfd9
MP
98362015-06-29 Marek Polacek <polacek@redhat.com>
9837
9838 PR c/66322
9839 * c-common.c (check_case_bounds): Add bool * parameter. Set
9840 OUTSIDE_RANGE_P.
9841 (c_add_case_label): Add bool * parameter. Pass it down to
9842 check_case_bounds.
9843 (c_do_switch_warnings): Add bool parameters. Implement -Wswitch-bool
9844 warning here.
9845 * c-common.h (c_add_case_label, c_do_switch_warnings): Update
9846 declarations.
9847
31521951
MP
98482015-06-27 Marek Polacek <polacek@redhat.com>
9849
9850 * c-common.c (check_main_parameter_types): Use VECTOR_TYPE_P
9851 or VECTOR_INTEGER_TYPE_P throughout.
9852 * c-gimplify.c: Likewise.
9853
22d03525
MP
98542015-06-26 Marek Polacek <polacek@redhat.com>
9855
9856 * array-notation-common.c (find_rank): Use INDIRECT_REF_P.
9857 * c-common.c (c_fully_fold_internal): Likewise.
9858 (c_alignof_expr): Likewise.
9859 * c-pretty-print.c (c_pretty_printer::postfix_expression): Likewise.
9860 * c-ubsan.c (ubsan_instrument_bounds): Likewise.
b1726d6c 9861 * cilk.c (create_parm_list): Likewise.
22d03525 9862
af05e6e5
MP
98632015-06-26 Marek Polacek <polacek@redhat.com>
9864
9865 * c-common.c (handle_unused_attribute): Use VAR_OR_FUNCTION_DECL_P.
9866
f0889939
AM
98672015-06-25 Andrew MacLeod <amacleod@redhat.com>
9868
9869 * c-common.c: Remove ipa-ref.h and plugin-api.h from include list.
9870 * c-gimplify.c: Likewise.
9871 * c-pragma.c: Likewise.
9872 * c-ubsan.c: Likewise.
9873 * cilk.c: Likewise.
9874
ca752f39
RS
98752015-06-25 Richard Sandiford <richard.sandiford@arm.com>
9876
9877 * c-common.c (c_type_hasher): Inherit from ggc_ptr_hash rather than
9878 ggc_hasher.
9879
16a16ec7
AM
98802015-06-25 Andrew MacLeod <amacleod@redhat.com>
9881
9882 * cilk.c: Move calls.h after tm.h in the include chain.
9883
0ae9bd27
MP
98842015-06-25 Marek Polacek <polacek@redhat.com>
9885
9886 * array-notation-common.c: Use VAR_P throughout.
9887 * c-ada-spec.c: Likewise.
9888 * c-common.c: Likewise.
9889 * c-format.c: Likewise.
9890 * c-gimplify.c: Likewise.
9891 * c-omp.c: Likewise.
9892 * c-pragma.c: Likewise.
9893 * c-pretty-print.c: Likewise.
9894 * cilk.c: Likewise.
9895
62f9079a
MP
98962015-06-25 Marek Polacek <polacek@redhat.com>
9897
9898 * cilk.c (extract_free_variables): Use is_global_var.
9899
0fa16060
RS
99002015-06-23 Richard Sandiford <richard.sandiford@arm.com>
9901
9902 * c-common.c: Don't include target-def.h.
9903
a68ae2e1
MP
99042015-06-23 Marek Polacek <polacek@redhat.com>
9905
9906 * c-common.c (warn_logical_operator): Use tree_int_cst_equal
9907 when comparing INTEGER_CSTs.
9908
c6a2f2d9
PMR
99092015-06-22 Pierre-Marie de Rodat <derodat@adacore.com>
9910
9911 * c-ada-spec.h (cpp_operation): Add HAS_DEPENDENT_TEMPLATE_ARGS.
9912 * c-ada-spec.c (collect_ada_nodes): Skip NAMESPACE_DECL
9913 (dump_ada_template): Skip partially specialized types.
9914
6b4db501
MM
99152015-06-22 Mikhail Maltsev <maltsevm@gmail.com>
9916
9917 * c-common.c (scalar_to_vector): Use std::swap instead of manually
9918 swapping.
9919
abb226c9
AM
99202015-06-17 Andrew MacLeod <amacleod@redhat.com>
9921
9922 * array-notation-common.c: Do not include input.h, line-map.h or is-a.h.
9923 * c-ada-spec.c: Likewise.
9924 * c-cilkplus.c: Likewise.
9925 * c-common.c: Likewise.
9926 * c-common.h: Likewise.
9927 * c-cppbuiltin.c: Likewise.
9928 * c-dump.c: Likewise.
9929 * c-format.c: Likewise.
9930 * c-gimplify.c: Likewise.
9931 * c-indentation.c: Likewise.
9932 * c-lex.c: Likewise.
9933 * c-omp.c: Likewise.
9934 * c-opts.c: Likewise.
9935 * c-pch.c: Likewise.
9936 * c-ppoutput.c: Likewise.
9937 * c-pragma.c: Likewise.
9938 * c-pretty-print.c: Likewise.
9939 * c-semantics.c: Likewise.
9940 * c-ubsan.c: Likewise.
9941 * cilk.c: Likewise.
9942 * stub-objc.c: Likewise.
9943
076fecad
PP
99442015-06-13 Patrick Palka <ppalka@gcc.gnu.org>
9945
9946 PR c++/65168
9947 * c-common.c (c_common_truthvalue_conversion): Warn when
9948 converting an address of a reference to a truth value.
9949
13fdf2e2
AM
99502015-06-08 Andrew MacLeod <amacleod@redhat.com>
9951
9952 * array-notation-common.c : Adjust include files.
9953 * c-ada-spec.c : Likewise.
9954 * c-cilkplus.c : Likewise.
9955 * c-common.c : Likewise.
9956 * c-common.h : Likewise.
9957 * c-cppbuiltin.c : Likewise.
9958 * c-dump.c : Likewise.
9959 * c-format.c : Likewise.
9960 * c-gimplify.c : Likewise.
9961 * c-indentation.c : Likewise.
9962 * c-lex.c : Likewise.
9963 * c-omp.c : Likewise.
9964 * c-opts.c : Likewise.
9965 * c-pch.c : Likewise.
9966 * c-ppoutput.c : Likewise.
9967 * c-pragma.c : Likewise.
9968 * c-pretty-print.c : Likewise.
9969 * c-semantics.c : Likewise.
9970 * c-ubsan.c : Likewise.
9971 * cilk.c : Likewise.
9972 * stub-objc.c : Likewise.
9973
a1661b90
MP
99742015-06-08 Marek Polacek <polacek@redhat.com>
9975
9976 PR c/66415
9977 * c-format.c (location_from_offset): Return LOC if LINE is null.
9978
d7438551
AH
99792015-06-05 Aldy Hernandez <aldyh@redhat.com>
9980
9981 * c-common.h (c_parse_final_cleanups): New prototype.
9982 * c-opts.c (c_common_parse_file): Call c_parse_final_cleanups.
9983
b3d5bc62
JJ
99842015-06-04 Sriraman Tallam <tmsriram@google.com>
9985
9986 * c-common.c (noplt): New attribute.
9987 (handle_noplt_attribute): New handler.
9988
ecb9f223
AM
99892015-06-04 Andrew MacLeod <amacleod@redhat.com>
9990
9991 * array-notation-common.c: Adjust includes for restructured coretypes.h.
9992 * c-ada-spec.c: Likewise.
9993 * c-cilkplus.c: Likewise.
9994 * c-common.c: Likewise.
9995 * c-common.h: Likewise.
9996 * c-cppbuiltin.c: Likewise.
9997 * c-dump.c: Likewise.
9998 * c-format.c: Likewise.
9999 * c-gimplify.c: Likewise.
10000 * c-indentation.c: Likewise.
10001 * c-lex.c: Likewise.
10002 * c-omp.c: Likewise.
10003 * c-opts.c: Likewise.
10004 * c-pch.c: Likewise.
10005 * c-ppoutput.c: Likewise.
10006 * c-pragma.c: Likewise.
10007 * c-pretty-print.c: Likewise.
10008 * c-semantics.c: Likewise.
10009 * c-ubsan.c: Likewise.
10010 * cilk.c: Likewise.
10011 * stub-objc.c: Likewise.
10012
6ac48155
DM
100132015-06-02 David Malcolm <dmalcolm@redhat.com>
10014
10015 PR c/66220:
10016 * c-indentation.c (should_warn_for_misleading_indentation): Use
10017 expand_location rather than expand_location_to_spelling_point.
10018 Don't warn if the guarding statement is more indented than the
10019 next/body stmts.
10020
773ce42e
DM
100212015-06-02 David Malcolm <dmalcolm@redhat.com>
10022
10023 * c-indentation.c (warn_for_misleading_indentation): Bail out
10024 immediately if -Wmisleading-indentation isn't enabled.
10025
4fef8379
ML
100262015-06-01 Martin Liska <mliska@suse.cz>
10027
10028 * c-format.c (check_format_arg):Use new type-based pool allocator.
10029 (check_format_info_main) Likewise.
10030
1edfb384
EB
100312015-05-31 Eric Botcazou <ebotcazou@adacore.com>
10032
10033 * c-ada-spec.c (is_tagged_type): Test for TYPE_METHODS on main variant.
10034 (has_nontrivial_methods): Likewise.
10035
9677ef52
MP
100362015-05-25 Marek Polacek <polacek@redhat.com>
10037
10038 * c-ubsan.c (ubsan_instrument_shift): Use type0.
10039
fd5c817a
MP
100402015-05-22 Marek Polacek <polacek@redhat.com>
10041
10042 PR c/47043
10043 * c-common.c (handle_deprecated_attribute): Allow CONST_DECL.
10044
a2f45fe6 100452015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
581edfa3
TS
10046
10047 * c-cppbuiltin.c (c_cpp_builtins): Use if instead of #if with
10048 STACK_GROWS_DOWNWARD.
10049
a2f45fe6 100502015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
62f9f30b
TS
10051
10052 * c-cppbuiltin.c (c_cpp_builtins): Check the value of
10053 STACK_GROWS_DOWNWARD rather than if it is defined.
10054
0fee2ac2 100552015-05-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
b1726d6c 10056
0fee2ac2
MLI
10057 PR c/52952
10058 * c-format.c (location_column_from_byte_offset): New.
10059 (location_from_offset): New.
10060 (struct format_wanted_type): Add offset_loc field.
10061 (check_format_info): Move handling of location for extra arguments
10062 closer to the point of warning.
10063 (check_format_info_main): Pass the result of location_from_offset
10064 to warning_at.
10065 (format_type_warning): Pass the result of location_from_offset
10066 to warning_at.
10067
cf4ef6f7
MP
100682015-05-20 Marek Polacek <polacek@redhat.com>
10069
10070 * c-omp.c (check_omp_for_incr_expr): Use BINARY_CLASS_P.
10071
3a65ee74
MP
100722015-05-20 Marek Polacek <polacek@redhat.com>
10073
10074 * c-ada-spec.c (dump_sloc): Use DECL_P.
10075
21b634ae
MP
100762015-05-20 Marek Polacek <polacek@redhat.com>
10077
10078 * c-pragma.c: Use VAR_OR_FUNCTION_DECL_P throughout.
10079 * c-common.c: Likewise.
10080
0e50b624
DM
100812015-05-19 David Malcolm <dmalcolm@redhat.com>
10082
10083 * c-common.h (fe_file_change): Strengthen param from
10084 const line_map * to const line_map_ordinary *.
10085 (pp_file_change): Likewise.
10086 * c-lex.c (fe_file_change): Likewise.
10087 (cb_define): Use linemap_check_ordinary when invoking
10088 SOURCE_LINE.
10089 (cb_undef): Likewise.
10090 * c-opts.c (c_finish_options): Use linemap_check_ordinary when
10091 invoking cb_file_change.
10092 (c_finish_options): Likewise.
10093 (push_command_line_include): Likewise.
10094 (cb_file_change): Strengthen param "new_map" from
10095 const line_map * to const line_map_ordinary *.
10096 * c-ppoutput.c (cb_define): Likewise for local "map".
10097 (pp_file_change): Likewise for param "map" and local "from".
10098
fab27f52
MM
100992015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
10100
10101 * c-common.c (shorten_compare): Use std::swap instead of explicit swaps.
10102
2fe1d762
TV
101032015-05-18 Tom de Vries <tom@codesourcery.com>
10104
10105 * c-common.c (build_va_arg_1): New function.
10106 (build_va_arg): Add address operator to va_list operand if necessary.
10107
7a37fa90
MM
101082015-05-15 Mikhail Maltsev <maltsevm@gmail.com>
10109
10110 PR c/48956
10111 * c-common.c (int_safely_convertible_to_real_p): Define.
10112 (unsafe_conversion_p): Check conversions involving complex types.
10113 (conversion_warning): Add new warning message for conversions which
10114 discard imaginary component.
10115 * c-common.h: (enum conversion_safety): Add new enumerator for such
10116 conversions.
10117
3aa3c9fc
MP
101182015-05-14 Marek Polacek <polacek@redhat.com>
10119
10120 PR c/66066
10121 PR c/66127
10122 * c-common.c (c_fully_fold): Pass false down to c_fully_fold_internal.
10123 (c_fully_fold_internal): Fold C_MAYBE_CONST_EXPRs with
10124 C_MAYBE_CONST_EXPR_INT_OPERANDS set. Add FOR_INT_CONST argument and
10125 use it. If FOR_INT_CONST, require that all evaluated operands be
10126 INTEGER_CSTs.
10127
c3388e62
DM
101282015-05-12 David Malcolm <dmalcolm@redhat.com>
10129
10130 * c-common.h (warn_for_misleading_indentation): New prototype.
10131 * c-indentation.c: New file.
10132 * c.opt (Wmisleading-indentation): New option.
10133
c7b38fd5
TV
101342015-05-12 Tom de Vries <tom@codesourcery.com>
10135
10136 PR tree-optimization/66010
10137 * c-common.c (build_va_arg): Don't mark ap addressable unless necessary.
10138
381bf11e
JM
101392015-05-09 Jason Merrill <jason@redhat.com>
10140
edff0c06
JM
10141 * c-opts.c (c_common_post_options): Also clear
10142 cpp_opts->cpp_warn_cxx11_compat.
10143
129211bc
JM
10144 * c-common.h (enum cxx_dialect): Add cxx_unset.
10145 * c-common.c (cxx_dialect): Initialize to cxx_unset.
10146 * c-opts.c (c_common_post_options): Set C++ dialect to C++98 if unset.
10147
381bf11e
JM
10148 * c.opt (std=c++14): Remove Undocumented flag and experimental warning.
10149 (std=gnu++0x): Mark as Undocumented.
10150 (std=gnu++1y): Add deprecated message.
10151
fe191308
JM
101522015-05-08 Jason Merrill <jason@redhat.com>
10153
765189ff
JM
10154 * c.opt (Wc++11-compat): Make primary. Rename var warn_cxx11_compat.
10155 * c-opts.c: Adjust.
10156
fe191308
JM
10157 * c.opt (Wc++0x-compat): Also set cpp_warn_cxx11_compat.
10158
755e528f
MP
101592015-05-08 Marek Polacek <polacek@redhat.com>
10160
10161 PR c/64918
10162 * c.opt (Woverride-init-side-effects): New option.
10163
0173bd2a
MP
101642015-05-07 Marek Polacek <polacek@redhat.com>
10165
10166 PR c/65179
10167 * c-common.c (c_fully_fold_internal): Warn when left shifting a
10168 negative value.
10169 * c.opt (Wshift-negative-value): New option.
10170 * c-opts.c (c_common_post_options): Set warn_shift_negative_value
10171 when -Wextra and C99/C++11 mode.
10172
e0f0d3b9
MP
101732015-05-07 Marek Polacek <polacek@redhat.com>
10174 Martin Uecker <uecker@eecs.berkeley.edu>
10175
10176 * c-ubsan.c (ubsan_instrument_bounds): Don't skip instrumenting
10177 flexible member array-like members if SANITIZE_BOUNDS_STRICT.
10178
8243e2a9
JM
101792015-05-05 Jason Merrill <jason@redhat.com>
10180
10181 * c.opt (Wterminate): New.
10182
577cd070
MP
101832015-04-30 Marek Polacek <polacek@redhat.com>
10184
10185 * c-common.c (maybe_warn_bool_compare): When comparing with 0/1,
10186 require that the non-constant be of a boolean type.
10187
0373796b
JT
101882015-04-29 Josh Triplett <josh@joshtriplett.org>
10189
e0f0d3b9
MP
10190 * c-common.c (handle_section_attribute): Refactor to reduce
10191 nesting and distinguish between error cases.
0373796b 10192
716c0ba6
MP
101932015-04-29 Marek Polacek <polacek@redhat.com>
10194
10195 PR c/64610
10196 * c-common.c (maybe_warn_bool_compare): Warn when comparing a boolean
10197 with 0/1.
10198
8848828b
JJ
101992015-04-29 Jakub Jelinek <jakub@redhat.com>
10200
10201 * c-common.h (omp_clause_mask): Unconditionally define as a class.
10202 Use uint64_t instead of unsigned HOST_WIDE_INT and 64 instead of
10203 HOST_BITS_PER_WIDE_INT.
10204
ecd0e562
TV
102052015-04-28 Tom de Vries <tom@codesourcery.com>
10206
10207 PR tree-optimization/65887
10208 * c-common.c (build_va_arg): Mark va_arg ap argument as addressable.
10209
2a877204 102102015-04-28 Eric Botcazou <ebotcazou@adacore.com>
e0f0d3b9 10211 Pierre-Marie de Rodat <derodat@adacore.com>
2a877204
EB
10212
10213 * c-ada-spec.c (in_function): Delete.
10214 (dump_generic_ada_node): Do not change in_function and remove the
10215 redundant code dealing with it.
10216 (print_ada_declaration): Do not change in_function. Use INDENT_INCR.
10217 (print_ada_methods): Output the static member functions in a nested
10218 package after the regular methods as well as associated renamings.
10219
4853031e
MP
102202015-04-24 Marek Polacek <polacek@redhat.com>
10221
10222 PR c/65830
10223 * c-common.c (c_fully_fold_internal): Use OPT_Wshift_count_negative
10224 and OPT_Wshift_count_overflow.
10225
8c2b7f79
MP
10226 PR c/63357
10227 * c-common.c (warn_logical_operator): Warn if the operands have the
10228 same expressions.
10229
b8787813
MP
102302015-04-24 Marek Polacek <polacek@redhat.com>
10231
10232 PR c/61534
10233 * c-common.c (warn_logical_operator): Bail if either operand comes
10234 from a macro expansion.
10235
8fba1830
BRF
102362015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
10237
10238 PR target/55143
10239 * c-common.c (c_default_pointer_mode): Add definition.
10240 * c-common.h (c_default_pointer_mode): Add declaration.
10241
17958621
JJ
102422015-03-11 Jakub Jelinek <jakub@redhat.com>
10243
10244 * c-common.c (c_common_nodes_and_builtins): Don't call xstrdup
10245 on record_builtin_type argument.
10246
7ccb1a11
JJ
102472015-03-10 Jakub Jelinek <jakub@redhat.com>
10248
10249 PR c/65120
10250 * c-common.c (warn_logical_not_parentheses): Don't warn for
10251 !x == 0 or !x != 0.
10252
04fd785e
MP
102532015-03-07 Marek Polacek <polacek@redhat.com>
10254
10255 PR sanitizer/65280
10256 * c-ubsan.c (ubsan_instrument_bounds): Check for COMPONENT_REF
10257 before trying to figure out whether we have a flexible array member.
10258
a4e26206 102592015-03-06 Eric Botcazou <ebotcazou@adacore.com>
8e745a17 10260 Jonathan Wakely <jwakely.gcc@gmail.com>
a4e26206
EB
10261
10262 * c-ada-spec.c (dump_ada_double_name): Fix pasto.
10263
0d2489f4
EB
102642015-03-05 Eric Botcazou <ebotcazou@adacore.com>
10265
10266 PR ada/65319
10267 * c-ada-spec.c (print_destructor): Remove obsolete code.
10268
83ed54d7
EB
102692015-03-01 Eric Botcazou <ebotcazou@adacore.com>
10270
10271 * c-ada-spec.c (is_tagged_type): Add guard for DECL_VINDEX.
10272 (dump_template_types): Adjust DECL_TEMPLATE_INSTANTIATIONS and
10273 DECL_TEMPLATE_RESULT emulations.
10274 (dump_ada_template)): Add guard for TYPE_METHODS.
10275
7631f0e2
MP
102762015-02-27 Marek Polacek <polacek@redhat.com>
10277
10278 PR c/65040
10279 * c.opt (Wformat-signedness): Don't enable by -Wformat=2.
10280
d1783ae5
KT
102812015-02-27 Kai Tietz <ktietz@redhat.com>
10282
10283 PR c/35330
10284 * c-pragma.c (handle_pragma_weak): Do not try to create
10285 weak/alias of declarations not being function, or variable
10286 declarations.
10287
56a9f6bc
TS
102882015-02-24 Thomas Schwinge <thomas@codesourcery.com>
10289
10290 PR libgomp/64625
10291 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
10292 Remove macros.
10293 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
10294
3d5cb23d
MP
102952015-02-16 Marek Polacek <polacek@redhat.com>
10296
10297 PR c/65066
10298 * c-format.c (check_format_types): Handle null param.
10299
fa008882
MP
103002015-02-13 Marek Polacek <polacek@redhat.com>
10301
10302 PR c/65040
10303 * c-format.c (check_format_types): Don't warn about different
10304 signedness if the original value is in the range of WANTED_TYPE.
10305
785f21af
JM
103062015-02-12 Jason Merrill <jason@redhat.com>
10307
10308 PR c++/64956
10309 * c-opts.c (c_common_post_options): Change flag_abi_version from 0
10310 to the current highest version.
10311 * c-cppbuiltin.c (c_cpp_builtins): Assert that it isn't 0.
10312
4886ec8e
JJ
103132015-02-04 Jakub Jelinek <jakub@redhat.com>
10314
10315 PR c/64824
10316 PR c/64868
10317 * c-omp.c (c_finish_omp_atomic): Use TRUNC_DIV_EXPR
10318 instead of RDIV_EXPR. Use build_binary_op instead of
10319 build2_loc.
10320
40fecdd6
JM
103212015-01-30 Joseph Myers <joseph@codesourcery.com>
10322
10323 * c-opts.c, c-pch.c, cppspec.c: All callers of fatal_error changed
10324 to pass input_location as first argument.
10325
a0c88d06
TV
103262015-01-23 Tom de Vries <tom@codesourcery.com>
10327
10328 PR libgomp/64672
10329 * c.opt (fopenacc): Mark as LTO option.
10330
1506ae0e
TV
103312015-01-23 Tom de Vries <tom@codesourcery.com>
10332
10333 PR libgomp/64707
10334 * c.opt (fopenmp): Mark as LTO option.
10335
31be63ab
JJ
103362015-01-21 Jakub Jelinek <jakub@redhat.com>
10337
10338 PR c/63307
b1726d6c 10339 * cilk.c (fill_decls_vec): Only put decls into vector v.
31be63ab
JJ
10340 (compare_decls): Fix up formatting.
10341
103422015-01-21 Igor Zamyatin <igor.zamyatin@intel.com>
10343
10344 PR c/63307
10345 * cilk.c: Include vec.h.
10346 (struct cilk_decls): New structure.
10347 (wrapper_parm_cb): Split this function to...
10348 (fill_decls_vec): ...this...
10349 (create_parm_list): ...and this.
10350 (compare_decls): New function.
10351 (for_local_cb): Remove.
10352 (wrapper_local_cb): Ditto.
10353 (build_wrapper_type): For now first traverse and fill vector of
10354 declarations then sort it and then deal with sorted vector.
10355 (cilk_outline): Ditto.
10356 (declare_one_free_variable): Ditto.
10357
6875457f
JM
103582015-01-21 Jason Merrill <jason@redhat.com>
10359
10360 PR c++/64629
10361 * c-format.c (check_format_arg): Call decl_constant_value.
10362
185c9e56
ML
103632015-01-19 Martin Liska <mliska@suse.cz>
10364
10365 * c-common.c (handle_noicf_attribute): New function.
10366
41dbbb37
TS
103672015-01-15 Thomas Schwinge <thomas@codesourcery.com>
10368 Bernd Schmidt <bernds@codesourcery.com>
10369 James Norris <jnorris@codesourcery.com>
10370 Cesar Philippidis <cesar@codesourcery.com>
10371 Ilmir Usmanov <i.usmanov@samsung.com>
10372 Jakub Jelinek <jakub@redhat.com>
10373
10374 * c.opt (fopenacc): New option.
10375 * c-cppbuiltin.c (c_cpp_builtins): Conditionally define _OPENACC.
10376 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
10377 New macros.
10378 * c-common.h (c_finish_oacc_wait): New prototype.
10379 * c-omp.c: Include "omp-low.h" and "gomp-constants.h".
10380 (c_finish_oacc_wait): New function.
10381 * c-pragma.c (oacc_pragmas): New variable.
10382 (c_pp_lookup_pragma, init_pragma): Handle it.
10383 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_CACHE,
10384 PRAGMA_OACC_DATA, PRAGMA_OACC_ENTER_DATA, PRAGMA_OACC_EXIT_DATA,
10385 PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP, PRAGMA_OACC_PARALLEL,
10386 PRAGMA_OACC_UPDATE, PRAGMA_OACC_WAIT.
10387 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ASYNC,
10388 PRAGMA_OACC_CLAUSE_AUTO, PRAGMA_OACC_CLAUSE_COLLAPSE,
10389 PRAGMA_OACC_CLAUSE_COPY, PRAGMA_OACC_CLAUSE_COPYIN,
10390 PRAGMA_OACC_CLAUSE_COPYOUT, PRAGMA_OACC_CLAUSE_CREATE,
10391 PRAGMA_OACC_CLAUSE_DELETE, PRAGMA_OACC_CLAUSE_DEVICE,
10392 PRAGMA_OACC_CLAUSE_DEVICEPTR, PRAGMA_OACC_CLAUSE_FIRSTPRIVATE,
10393 PRAGMA_OACC_CLAUSE_GANG, PRAGMA_OACC_CLAUSE_HOST,
10394 PRAGMA_OACC_CLAUSE_IF, PRAGMA_OACC_CLAUSE_NUM_GANGS,
10395 PRAGMA_OACC_CLAUSE_NUM_WORKERS, PRAGMA_OACC_CLAUSE_PRESENT,
10396 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPY,
10397 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYIN,
10398 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYOUT,
10399 PRAGMA_OACC_CLAUSE_PRESENT_OR_CREATE, PRAGMA_OACC_CLAUSE_PRIVATE,
10400 PRAGMA_OACC_CLAUSE_REDUCTION, PRAGMA_OACC_CLAUSE_SELF,
10401 PRAGMA_OACC_CLAUSE_SEQ, PRAGMA_OACC_CLAUSE_VECTOR,
10402 PRAGMA_OACC_CLAUSE_VECTOR_LENGTH, PRAGMA_OACC_CLAUSE_WAIT,
10403 PRAGMA_OACC_CLAUSE_WORKER.
10404
3f8257db 104052015-01-14 Marcos Diaz <marcos.diaz@tallertechnologies.com>
5434dc07
MD
10406
10407 * c-cppbuiltin.c (c_cpp_builtins): New cpp define __SSP_EXPLICIT__
10408 for the new option fstack-protector_explicit.
10409 * c-common.c (c_common_attribute_table): Add stack_protect attribute.
10410 (handle_stack_protect_attribute): New function.
10411
3f8257db 104122015-01-13 Martin Uecker <uecker@eecs.berkeley.edu>
de1b5c17
MU
10413
10414 * c.opt: New option -Warray-bounds=.
10415
adfac8df
JJ
104162015-01-09 Michael Collison <michael.collison@linaro.org>
10417
10418 * array-notation-common.c: Include hash-set.h, machmode.h,
10419 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
10420 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
10421 * c-ada-spec.c: Ditto.
10422 * c-cilkplus.c: Ditto.
10423 * c-common.c: Include input.h due to flattening of tree.h.
10424 Define macro GCC_C_COMMON_C.
10425 * c-common.h: Flatten tree.h header files into c-common.h.
10426 Remove include of tree-core.h.
10427 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
10428 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
10429 fold-const.h, wide-int.h, and inchash.h due to
10430 flattening of tree.h.
10431 * c-dump.c: Ditto.
10432 * c-format.c: Flatten tree.h header files into c-common.h.
10433 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
10434 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
10435 fold-const.h, wide-int.h, and inchash.h due to
10436 flattening of tree.h.
10437 * c-dump.c: Include hash-set.h, machmode.h,
10438 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
10439 fold-const.h, wide-int.h, and inchash.h due to
10440 flattening of tree.h.
10441 * c-format.c: Include hash-set.h, machmode.h,
10442 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
10443 fold-const.h, wide-int.h, inchash.h and real.h due to
10444 flattening of tree.h.
10445 * c-gimplify.c: Include hash-set.h, machmode.h,
10446 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
10447 fold-const.h, wide-int.h, and inchash.h due to
10448 flattening of tree.h.
10449 * cilk.c: Ditto.
10450 * c-lex.c: Ditto.
10451 * c-omp.c: Ditto.
10452 * c-opts.c: Ditto.
10453 * c-pch.c: Ditto.
10454 * c-ppoutput.c: Ditto.
10455 * c-pragma.c: Ditto.
10456 * c-pretty-print.c: Ditto.
10457 * c-semantics.c: Ditto.
10458 * c-ubsan.c: Ditto.
10459 * stub-objc.c: Ditto.
10460
f5481fc4
JM
104612015-01-08 Jason Merrill <jason@redhat.com>
10462
10463 * c-ubsan.c (ubsan_maybe_instrument_array_ref): Use
10464 do_ubsan_in_current_function.
10465 (ubsan_maybe_instrument_reference_or_call): Likewise.
10466 * c-ubsan.h: Declare it.
10467
de35aa66
MS
104682015-01-08 Mike Stump <mikestump@comcast.net>
10469
10470 * c-common.c (c_common_attribute_table): Add no_sanitize_thread.
10471
4a9a42ab
MP
104722015-01-07 Marek Polacek <polacek@redhat.com>
10473
10474 PR c/64440
10475 * c-common.c (c_fully_fold_internal): Warn for division and modulo
10476 if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST and is zero.
10477
2f42e5de
TS
104782015-01-05 Trevor Saunders <tsaunders@mozilla.com>
10479
10480 PR c++/31397
10481 * c.opt (Wsuggest-override): New option.
10482
5624e564
JJ
104832015-01-05 Jakub Jelinek <jakub@redhat.com>
10484
10485 Update copyright years.
10486
5bd012f8
MP
104872015-01-05 Marek Polacek <polacek@redhat.com>
10488
10489 PR c/64423
10490 * c-common.c (warn_array_subscript_with_type_char): Add location_t
10491 parameter. Use it.
10492 * c-common.h (warn_array_subscript_with_type_char): Update
10493 declaration.
10494
a7fa8d18
ESR
104952014-12-20 Edward Smith-Rowland <3dw4rd@verizon.net>
10496
10497 * c-cppbuiltin.c (__cpp_sized_deallocation): Uncomment and move macro.
10498 Control macro with flag_sized_deallocation.
10499
3f8257db 105002014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
10501
10502 * c.opt (Wdiscarded-array-qualifiers): New option.
10503
1f8d3e84
JJ
105042014-12-19 Jakub Jelinek <jakub@redhat.com>
10505
10506 PR preprocessor/63831
10507 * c-cppbuiltin.c (c_cpp_builtins): Don't define __has_attribute
10508 and __has_cpp_attribute here.
10509 * c-ppoutput.c (init_pp_output): Set cb->has_attribute to
10510 c_common_has_attribute.
10511 * c-common.h (c_common_has_attribute): New prototype.
10512 * c-lex.c (init_c_lex): Set cb->has_attribute to
10513 c_common_has_attribute instead of cb_has_attribute.
10514 (get_token_no_padding): New function.
10515 (cb_has_attribute): Renamed to ...
10516 (c_common_has_attribute): ... this. No longer static. Use
10517 get_token_no_padding, require ()s, don't build TREE_LIST
10518 unnecessarily, fix up formatting, adjust diagnostics, call
10519 init_attributes.
10520
20b06add
JM
105212014-12-15 Jason Merrill <jason@redhat.com>
10522
10523 * c.opt (-fsized-deallocation, -Wc++14-compat): New.
10524 (-Wsized-deallocation): New.
10525 * c-opts.c (c_common_post_options): -fsized-deallocation defaults
10526 to on in C++14 and up.
10527
94a073b2
JM
105282014-12-11 Jason Merrill <jason@redhat.com>
10529
acaa5911
JM
10530 * c-cppbuiltin.c (c_cpp_builtins): Enable C++14 __cpp_constexpr.
10531
94a073b2
JM
10532 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_runtime_arrays if
10533 we aren't complaining about VLAs.
10534
7fb66c15
MP
105352014-12-06 Marek Polacek <polacek@redhat.com>
10536
10537 PR tree-optimization/64183
10538 * c-gimplify.c (c_gimplify_expr): Don't convert the RHS of a
10539 shift-expression if it is integer_type_node. Use types_compatible_p.
10540
b731b390
JJ
105412014-11-29 Jakub Jelinek <jakub@redhat.com>
10542
10543 * c-common.c (convert_vector_to_pointer_for_subscript): Remove NULL
10544 last argument from create_tmp_var_raw and create_tmp_var calls.
10545 * cilk.c (gimplify_cilk_spawn): Likewise.
10546 * c-omp.c (c_finish_omp_atomic): Likewise.
10547
6a4da643
MP
105482014-11-28 Marek Polacek <polacek@redhat.com>
10549
10550 * c-ubsan.c (ubsan_instrument_shift): Use op1_utype for MINUS_EXPR
10551 instead of unsigned_type_node.
10552
541e35a6
MP
105532014-11-28 Marek Polacek <polacek@redhat.com>
10554
10555 PR c/63862
10556 * c-ubsan.c (ubsan_instrument_shift): Change the type of a MINUS_EXPR
10557 to op1_utype.
10558 * c-gimplify.c (c_gimplify_expr): Convert right operand of a shift
10559 expression to unsigned_type_node.
10560
dcc97066
MW
105612014-11-20 Mark Wielaard <mjw@redhat.com>
10562
10563 PR debug/38757
10564 * c-opts.c (set_std_c89): Set lang_hooks.name.
10565 (set_std_c99): Likewise.
10566 (set_std_c11): Likewise.
10567 (set_std_cxx98): Likewise.
10568 (set_std_cxx11): Likewise.
10569 (set_std_cxx14): Likewise.
10570 (set_std_cxx1z): Likewise.
10571
aa7da51a
JJ
105722014-11-21 Jakub Jelinek <jakub@redhat.com>
10573
10574 PR target/63764
10575 * c-common.h (convert_vector_to_pointer_for_subscript): Change
10576 return type to bool.
009a3480 10577 * c-common.c: Include gimple-expr.h.
aa7da51a
JJ
10578 (convert_vector_to_pointer_for_subscript): Change return type to
10579 bool. If *vecp is not lvalue_p and has VECTOR_TYPE, return true
10580 and copy it into a TARGET_EXPR and use that instead of *vecp
10581 directly.
10582
538dd0b7
DM
105832014-11-19 David Malcolm <dmalcolm@redhat.com>
10584
10585 Merger of git branch "gimple-classes-v2-option-3".
10586 * ChangeLog.gimple-classes: New.
10587 * c-gimplify.c (add_block_to_enclosing): Strengthen local "stack"
10588 from being just a vec<gimple> to a vec<gbind *>.
10589
c39a5e99
JJ
105902014-11-18 Jakub Jelinek <jakub@redhat.com>
10591
10592 PR sanitizer/63813
10593 * c-ubsan.c (ubsan_maybe_instrument_reference_or_call): Change type
10594 argument to ptype, set type to TREE_TYPE (ptype). Don't call
10595 get_pointer_alignment for non-pointers. Use ptype, or if it is
10596 reference type, corresponding pointer type, as type of kind
10597 argument.
10598 (ubsan_maybe_instrument_reference,
10599 ubsan_maybe_instrument_member_call): Adjust callers.
10600
8537a4a9
MP
106012014-11-15 Marek Polacek <polacek@redhat.com>
10602
10603 PR middle-end/63884
10604 * array-notation-common.c (is_sec_implicit_index_fn): Return false
10605 for NULL fndecl.
10606 (extract_array_notation_exprs): Return for NULL node.
10607
2079956a
JM
106082014-11-12 Joseph Myers <joseph@codesourcery.com>
10609
10610 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Define and
10611 undefine __NO_MATH_ERRNO__ based on changes to -fmath-errno state.
10612
1304953e
JJ
106132014-11-12 Jakub Jelinek <jakub@redhat.com>
10614
10615 PR c/59708
10616 * c-common.c (check_builtin_function_arguments): Handle
10617 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW.
10618
e5e44252
AK
106192014-11-10 Andi Kleen <ak@linux.intel.com>
10620
10621 PR c/60804
10622 * c-common.h (check_no_cilk): Declare.
10623 * cilk.c (get_error_location): New function.
10624 (check_no_cilk): Dito.
10625
e64b984d
AK
106262014-11-10 Andi Kleen <ak@linux.intel.com>
10627
10628 * cilk.c (recognize_spawn): Use expression location
10629 for error message.
10630
13c21655
PC
106312014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
10632
10633 * c.opt ([Wshift-count-negative, Wshift-count-overflow]): Add.
10634
42fd12b1
ESR
106352014-11-10 Edward Smith-Rowland <3dw4rd@verizon.net>
10636
10637 * c-cppbuiltin.c (__has_attribute, __has_cpp_attribute): New macros;
10638 (__cpp_rtti, __cpp_exceptions): New macros for C++98;
10639 (__cpp_range_based_for, __cpp_initializer_lists,
10640 __cpp_delegating_constructors, __cpp_nsdmi,
10641 __cpp_inheriting_constructors, __cpp_ref_qualifiers): New macros
10642 for C++11; (__cpp_attribute_deprecated): Remove in favor of
10643 __has_cpp_attribute.
10644 * c-lex.c (cb_has_attribute): New callback CPP function;
10645 (init_c_lex): Set has_attribute callback.
10646
6f450181
RB
106472014-11-04 Richard Biener <rguenther@suse.de>
10648
10649 * c-common.c (shorten_compare): Do not shorten mixed
10650 DFP and non-DFP compares.
10651
26f0e1d6
ESR
106522014-11-01 Edward Smith-Rowland <3dw4rd@verizon.net>
10653
10654 * g++.dg/cpp1y/feat-cxx11.C: Commentary and rearrangement of tests.
10655 * g++.dg/cpp1y/feat-cxx11-neg.C: Add aggregate NSDMI test.
10656 Commentary and rearrangement of tests.
10657 * g++.dg/cpp1y/feat-cxx14.C: Enable aggregate NSDMI test.
10658 Commentary and rearrangement of tests.
ab20d992 10659 * g++.dg/cpp1y/feat-cxx98-neg.C: Ditto.
26f0e1d6
ESR
10660 * g++.dg/cpp1y/feat-cxx98.C: Commentary.
10661
ef4bddc2
RS
106622014-10-29 Richard Sandiford <richard.sandiford@arm.com>
10663
10664 * c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant
10665 enum from machine_mode.
10666
c582198b
AM
106672014-10-28 Andrew MacLeod <amacleod@redhat.com>
10668
adfac8df
JJ
10669 * c-common.c: Adjust include files.
10670 * c-gimplify.c: Ditto.
10671 * cilk.c: Ditto.
10672 * c-pragma.c: Ditto.
10673 * c-ubsan.c: Ditto.
c582198b 10674
60393bbc
AM
106752014-10-27 Andrew MacLeod <amacleod@redhat.com>
10676
10677 * c-gimplify.c: Adjust include files.
10678
d723bb7c
MLI
106792014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
10680
10681 PR c++/53061
10682 * c-opts.c (c_common_diagnostics_set_defaults): Renamed from
10683 c_common_initialize_diagnostics.
10684 * c-common.h: Likewise.
10685
90f3520e
MP
106862014-10-24 Marek Polacek <polacek@redhat.com>
10687
10688 PR c/56980
10689 * c-pretty-print.c (c_pretty_printer::simple_type_specifier): Don't
10690 print "struct"/"union"/"enum" for typedefed names.
10691
59d7607a
MP
106922014-10-23 Marek Polacek <polacek@redhat.com>
10693
10694 * c-ubsan.c (ubsan_instrument_shift): Perform the MINUS_EXPR
10695 in unsigned type.
10696
d95a2703
JJ
106972014-10-22 Jakub Jelinek <jakub@redhat.com>
10698 Yury Gribov <y.gribov@samsung.com>
10699
10700 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
10701 ubsan_instrument_vla): Check bits in flag_sanitize_recover bitmask
10702 instead of flag_sanitize_recover as bool flag.
10703
8e6ef852
KY
107042014-10-21 Kirill Yukhin <kirill.yukhin@intel.com>
10705
10706 * cilk.c: Revert previous change.
10707
948cf550
IZ
107082014-10-20 Igor Zamyatin <igor.zamyatin@intel.com>
10709
10710 PR c/63307
10711 * cilk.c: Include vec.h.
10712 (struct cilk_decls): New structure.
10713 (wrapper_parm_cb): Split this function to...
10714 (fill_decls_vec): ...this...
10715 (create_parm_list): ...and this.
10716 (compare_decls): New function.
10717 (for_local_cb): Remove.
10718 (wrapper_local_cb): Ditto.
10719 (build_wrapper_type): For now first traverse and fill vector of
10720 declarations then sort it and then deal with sorted vector.
10721 (cilk_outline): Ditto.
10722 (declare_one_free_variable): Ditto.
10723
92574c7c
MP
107242014-10-17 Marek Polacek <polacek@redhat.com>
10725
10726 * c-opts.c (c_common_post_options): Set warn_implicit_int.
10727 * c.opt (Wimplicit-int): Initialize to -1.
10728
83685514
AM
107292014-10-16 Andrew MacLeod <amacleod@redhat.com>
10730
10731 * c-pragma.c: Adjust include files.
10732 * c-semantics.c: Likewise.
10733
5b8300ea
DD
107342014-10-16 DJ Delorie <dj@redhat.com>
10735
10736 * c-cppbuiltin.c (cpp_atomic_builtins): Don't assume pointers are
10737 multiples of bytes.
10738
5f83e90b
JM
107392014-10-14 Jason Merrill <jason@redhat.com>
10740
10741 PR c++/63455
10742 * c-common.h (CPP_PREPARSED_EXPR): New.
10743 (N_CP_TTYPES): Adjust.
10744
d73326ca
MP
107452014-10-15 Marek Polacek <polacek@redhat.com>
10746
10747 * c-opts.c (c_common_init_options): Make -std=gnu11 the default for C.
10748
78a7c317
DD
107492014-10-14 DJ Delorie <dj@redhat.com>
10750
10751 * c-pretty-print.c (pp_c_integer_constant): Check for all __intN
10752 types, not just __int128.
10753 * c-cppbuiltin.c (c_cpp_builtins): Add builtins for all __intN
10754 types, not just __int128.
10755 (cpp_atomic_builtins): Round pointer sizes up.
10756 (type_suffix): Use type precision, not specific types.
10757 * c-common.c (c_common_reswords): Remove __int128 special case.
10758 (c_common_type_for_size): Check for all __intN types, not just
10759 __int128.
10760 (c_common_type_for_mode): Likewise.
10761 (c_common_signed_or_unsigned_type): Likewise.
10762 (c_build_bitfield_integer_type): Likewise.
10763 (c_common_nodes_and_builtins): Likewise.
10764 (keyword_begins_type_specifier): Likewise.
10765 * c-common.h (rid): Remove RID_INT128 and add RID_INT_N_* for all
10766 __intN variants.
10767
2a22f99c
TS
107682014-10-12 Trevor Saunders <tsaunders@mozilla.com>
10769
10770 * c-common.c: Use hash_table instead of hashtab.
10771
2a8ef767
ESR
107722014-10-06 Edward Smith-Rowland <3dw4rd@verizon.net>
10773
adfac8df 10774 * c-cppbuiltin.c: Move __cpp_attribute_deprecated to the
2a8ef767
ESR
10775 C++11 section.
10776
3c9aabbd
MG
107772014-10-03 Marc Glisse <marc.glisse@inria.fr>
10778
10779 PR c++/54427
10780 PR c++/57198
10781 PR c++/58845
10782 * c-common.c (warn_logical_operator): Punt for vectors.
10783
a15f7cb8
ESR
107842014-10-01 Edward Smith-Rowland <3dw4rd@verizon.net>
10785
10786 Implement SD-6: SG10 Feature Test Recommendations
10787 * c-cppbuiltin.c (c_cpp_builtins()): Define language feature
10788 macros and the __has_header macro.
10789
8d0cf15e
JM
107902014-09-30 Jason Merrill <jason@redhat.com>
10791
dd5d5481
JM
10792 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_ASSIGNABLE and
10793 RID_IS_TRIVIALLY_CONSTRUCTIBLE.
10794 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
10795
b752325e
JM
10796 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_COPYABLE.
10797 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
10798
8d0cf15e
JM
10799 * c-common.h (enum rid): Remove RID_IS_CONVERTIBLE_TO.
10800 * c-common.c (c_common_reswords): Remove __is_convertible_to.
10801
083e891e
MP
108022014-09-24 Marek Polacek <polacek@redhat.com>
10803
10804 PR c/61405
10805 PR c/53874
10806 * c-common.h (struct c_common_resword): Don't define CPP_KEYWORD.
10807
7861b648
AK
108082014-09-23 Andi Kleen <ak@linux.intel.com>
10809
10810 * c-common.c (handle_no_reorder_attribute): New function.
10811 (c_common_attribute_table): Add no_reorder attribute.
10812
9a79452d
JM
108132014-09-22 Joseph Myers <joseph@codesourcery.com>
10814
10815 * c-cppbuiltin.c (c_cpp_builtins): Define
10816 __LIBGCC_*_EXCESS_PRECISION__ macros for supported floating-point
10817 modes.
10818
dd69f047
JM
108192014-09-18 Joseph Myers <joseph@codesourcery.com>
10820
10821 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_*_FUNC_EXT__
10822 for supported floating-point modes.
10823
737a4826
MLI
108242014-09-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
10825
10826 * c.opt (Wpsabi): Use LangEnabledBy.
10827 * c-opts.c (c_common_handle_option): Do not handle here.
10828
8cc4b7a2
JM
108292014-09-12 Joseph Myers <joseph@codesourcery.com>
10830
10831 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_HAS_%s_MODE__
10832 macros for floating-point modes.
10833
179b5a55
MG
108342014-09-11 Marc Glisse <marc.glisse@inria.fr>
10835
10836 PR target/58757
10837 * c-cppbuiltin.c (builtin_define_float_constants): Correct
10838 __*_DENORM_MIN__ without denormals.
10839
570a11fe
JJ
108402014-09-10 Jakub Jelinek <jakub@redhat.com>
10841
10842 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
10843 ubsan_instrument_vla, ubsan_instrument_return): Adjust
10844 ubsan_create_data callers.
10845 (ubsan_instrument_bounds): Don't emit UBSAN_BOUNDS at all if
10846 index is constant or BIT_AND_EXPR with constant mask and is
10847 small enough for the bound.
10848 * c-gimplify.c (ubsan_walk_array_refs_r): For ADDR_EXPR of
10849 ARRAY_REF, make sure the inner ARRAY_REF is not walked again.
10850
b559c810
MLI
108512014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
10852
10853 * c.opt: Add CppReason to various flags.
10854 (Wdate-time): Re-sort.
10855 * c-common.c: Include c-common.h earlier.
10856 (struct reason_option_codes_t): Delete.
10857 (c_option_controlling_cpp_error): Prefix global type and struct
10858 with cpp_.
10859
1ef33fd4
MLI
108602014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
10861
10862 * c.opt (Wnormalized): New.
10863 (Wnormalized=): Use Enum and Reject Negative.
10864 * c-opts.c (c_common_handle_option): Do not handle Wnormalized here.
10865
66bb34c0
JM
108662014-09-08 Joseph Myers <joseph@codesourcery.com>
10867
10868 * c-cppbuiltin.c (c_cpp_builtins): Define macros for mantissa
10869 digits of floating-point modes if -fbuilding-libgcc.
10870
53d68b9f
JM
108712014-09-05 Joseph Myers <joseph@codesourcery.com>
10872
10873 * c-cppbuiltin.c (c_cpp_builtins): Also define
10874 __LIBGCC_EH_TABLES_CAN_BE_READ_ONLY__,
10875 __LIBGCC_EH_FRAME_SECTION_NAME__, __LIBGCC_JCR_SECTION_NAME__,
10876 __LIBGCC_CTORS_SECTION_ASM_OP__, __LIBGCC_DTORS_SECTION_ASM_OP__,
10877 __LIBGCC_TEXT_SECTION_ASM_OP__, __LIBGCC_INIT_SECTION_ASM_OP__,
10878 __LIBGCC_INIT_ARRAY_SECTION_ASM_OP__,
10879 __LIBGCC_STACK_GROWS_DOWNWARD__,
10880 __LIBGCC_DONT_USE_BUILTIN_SETJMP__,
10881 __LIBGCC_DWARF_ALT_FRAME_RETURN_COLUMN__,
10882 __LIBGCC_DWARF_FRAME_REGISTERS__,
10883 __LIBGCC_EH_RETURN_STACKADJ_RTX__, __LIBGCC_JMP_BUF_SIZE__,
10884 __LIBGCC_STACK_POINTER_REGNUM__ and
10885 __LIBGCC_VTABLE_USES_DESCRIPTORS__ for -fbuilding-libgcc.
10886 (builtin_define_with_value): Handle backslash-escaping in string
10887 macro values.
10888
f65586dc
RB
108892014-09-05 Richard Biener <rguenther@suse.de>
10890
10891 PR middle-end/63148
10892 * c-format.c (check_format_arg): Properly handle
10893 effectively signed POINTER_PLUS_EXPR offset.
10894
2b71f4a4
MLI
108952014-09-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
10896
10897 * c.opt (Wc90-c99-compat,Wc++-compat,Wcomment,Wendif-labels,
10898 Winvalid-pch,Wlong-long,Wmissing-include-dirs,Wmultichar,Wpedantic,
10899 (Wdate-time,Wtraditional,Wundef,Wvariadic-macros): Add CPP, Var
10900 and Init.
10901 * c-opts.c (c_common_handle_option): Do not handle here.
10902 (sanitize_cpp_opts): Likewise.
10903 * c-common.c (struct reason_option_codes_t): Handle
10904 CPP_W_C90_C99_COMPAT and CPP_W_PEDANTIC.
10905
d2e4feca
MP
109062014-09-03 Marek Polacek <polacek@redhat.com>
10907
10908 * c.opt (Wlogical-not-parentheses): Enable by -Wall.
10909
9a771876
JJ
109102014-09-02 Jakub Jelinek <jakub@redhat.com>
10911 Balaji V. Iyer <balaji.v.iyer@intel.com>
10912 Igor Zamyatin <igor.zamyatin@intel.com>
10913
10914 * c-cilkplus.c (cilk_for_number_of_iterations): New function.
10915 * c-common.c (c_common_reswords): Added _Cilk_for.
10916 * c-common.h (enum rid): Added RID_CILK_FOR.
10917 (cilk_for_number_of_iterations): Add declaration.
10918 * c-omp.c (c_finish_omp_for): Added checks for CILK_SIMD and
10919 CILK_FOR.
10920 * c-pragma.c (init_pragma): Register "grainsize" pragma.
10921 * c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_GRAINSIZE.
10922
81b5d104
MLI
109232014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
10924
10925 * c.opt (Wbuiltin-macro-redefined,Wdeprecated,Wendif-labels,
10926 Winvalid-pch,Wliteral-suffix,Wmissing-include-dirs,Wtrigraphs,
10927 Wundef): Use CPP, Var and Init.
10928 * c-opts.c (c_common_handle_option): Do not handle the above flags here.
10929
b753b37b
MLI
109302014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
10931
10932 * c.opt (Wbuiltin-macro-redefined): Use CPP, Var and Init.
10933 * c-opts.c (c_common_handle_option): Do not handle here.
10934
028aee17
JM
109352014-08-25 Jason Merrill <jason@redhat.com>
10936
10937 * c.opt: Change -std=c++1y and -std=gnu++1y to be aliases for
10938 -std=c++14 and -std=gnu++14, rather than the reverse.
10939 * c-opts.c (c_common_handle_option): Change OPT_std_c__1y and
10940 OPT_std_gnu__1y to OPT_std_c__14 and OPT_std_gnu__14.
10941 * c-common.h (cxx_dialect): Remove cxx1y.
10942
e4276ba5
ESR
109432014-08-23 Edward Smith-Rowland <3dw4rd@verizon.net>
10944
10945 * c-common.h (enum cxx_dialect): Add cxx14.
10946 * c-opts.c (set_std_cxx1y): Rename to set_std_cxx14; Use cxx14.
10947 * c-ubsan.c (ubsan_instrument_shift): Change comment and logic from
10948 cxx_dialect == cxx11 || cxx_dialect == cxx1y to cxx_dialect >= cxx11.
10949
a545cacd
JM
109502014-08-22 Jason Merrill <jason@redhat.com>
10951
10952 * c.opt (std=gnu++17): Fix alias.
10953
59ea0364
MP
109542014-08-22 Marek Polacek <polacek@redhat.com>
10955
10956 PR c++/62199
10957 * c-common.c (warn_logical_not_parentheses): Don't check LHS. Don't
10958 check for vector types. Drop LHS argument.
10959 * c-common.h (warn_logical_not_parentheses): Adjust.
10960
596e808c
MLI
109612014-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
10962
10963 * c.opt (Wcomment): Use CPP, Var and LangEnabledBy.
10964 (Wmultichar): Likewise.
10965 (Wdate-time): Use C-family languages instead of Common. Use CPP
10966 and Var.
10967 * c-opts.c (c_common_handle_option): Do not handle the above
10968 options here.
10969 (sanitize_cpp_opts): Likewise.
10970
18767f65
MLI
109712014-08-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
10972
10973 PR fortran/44054
10974 * c-opts.c: Include tree-diagnostics.h.
10975 (c_diagnostic_finalizer): New.
10976 (c_common_initialize_diagnostics): Use it.
10977
b4413594
MLI
109782014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
10979
10980 PR preprocessor/51303
10981 * c-common.c (struct reason_option_codes_t option_codes):
10982 Add CPP_W_MISSING_INCLUDE_DIRS. Sort alphabetically.
10983
43f9a13c
MLI
109842014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
10985
10986 PR c/60975
10987 PR c/53063
10988 * c.opt (Wvariadic-macros): Use CPP and LangEnabledBy.
10989 * c-opts.c (c_common_handle_option): Call cpp_handle_option_auto.
10990 (c_common_post_options): Call init_global_opts_from_cpp.
10991 (sanitize_cpp_opts): Do not handle Wvariadic-macros here.
10992
04159acf
MP
109932014-08-19 Marek Polacek <polacek@redhat.com>
10994
10995 PR c++/62153
10996 * c-common.c (maybe_warn_bool_compare): New function.
10997 * c-common.h (maybe_warn_bool_compare): Declare.
10998 * c.opt (Wbool-compare): New option.
10999
35aff4fb
MP
110002014-08-19 Marek Polacek <polacek@redhat.com>
11001
11002 * c.opt (Wc99-c11-compat): New option.
11003
177cce46
MP
110042014-08-19 Marek Polacek <polacek@redhat.com>
11005
11006 * c-opts.c (sanitize_cpp_opts): Make warn_long_long be set according
11007 to warn_c90_c99_compat.
11008 * c.opt (Wc90-c99-compat, Wdeclaration-after-statement): Initialize
11009 to -1.
11010
6ae9194f
MLI
110112014-08-19 Manuel López-Ibáñez <manu@gcc.gnu.org>
11012 Steven Bosscher <steven@gcc.gnu.org>
11013
11014 PR c/52952
11015 * c-format.c: Add extra_arg_loc and format_string_loc to struct
11016 format_check_results.
11017 (check_function_format): Use true and add comment for boolean
11018 argument.
11019 (finish_dollar_format_checking): Use explicit location when warning.
11020 (check_format_info): Likewise.
11021 (check_format_arg): Set extra_arg_loc and format_string_loc.
11022 (check_format_info_main): Use explicit location when warning.
11023 (check_format_types): Pass explicit location.
11024 (format_type_warning): Likewise.
11025
8e54f6d3
MLI
110262014-08-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
11027
11028 PR fortran/44054
11029 * c-format.c: Handle Fortran flags.
11030
cd4e76fc
IZ
110312014-08-12 Igor Zamyatin <igor.zamyatin@intel.com>
11032
11033 PR other/61962
11034 * array-notation-common.c (find_rank): Added handling for other
11035 types of references.
11036
f3bede71
MP
110372014-08-10 Marek Polacek <polacek@redhat.com>
11038
11039 PR c/51849
11040 * c-opts.c (sanitize_cpp_opts): Pass warn_c90_c99_compat to libcpp.
11041 * c.opt (Wc90-c99-compat): Add option.
11042
9f25a338
TS
110432014-08-07 Trevor Saunders <tsaunders@mozilla.com>
11044
11045 * c-gimplify.c, cilk.c: Remove includes of pointer-set.h.
11046
62e4eb35
MP
110472014-08-03 Marek Polacek <polacek@redhat.com>
11048
ab20d992 11049 * c-common.c (check_case_value): Add location_t parameter. Use it.
62e4eb35
MP
11050 (c_add_case_label): Pass loc to check_case_value.
11051
b787e7a2
TS
110522014-08-02 Trevor Saunders <tsaunders@mozilla.com>
11053
11054 * cilk.c: Use hash_map instead of pointer_map.
11055
6e2830c3
TS
110562014-08-02 Trevor Saunders <tsaunders@mozilla.com>
11057
11058 * c-gimplify.c: Use hash_set instead of pointer_set.
11059
a7ee52fb
IZ
110602014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
11061
11062 PR middle-end/61455
11063 * array-notation-common.c (extract_array_notation_exprs): Handling
11064 of DECL_EXPR added.
11065
944fa280
JJ
110662014-08-01 Jakub Jelinek <jakub@redhat.com>
11067
11068 * c-common.h (min_align_of_type): Removed prototype.
11069 * c-common.c (min_align_of_type): Removed.
11070 * c-ubsan.h (ubsan_maybe_instrument_reference,
11071 ubsan_maybe_instrument_member_call): New prototypes.
11072 * c-ubsan.c: Include stor-layout.h and builtins.h.
11073 (ubsan_maybe_instrument_reference_or_call,
11074 ubsan_maybe_instrument_reference, ubsan_maybe_instrument_call): New
11075 functions.
11076
b4dfdc11
MG
110772014-07-31 Marc Glisse <marc.glisse@inria.fr>
11078
11079 PR c++/60517
11080 * c.opt (-Wreturn-local-addr): Move to common.opt.
11081
a41844e5
JM
110822014-07-30 Jason Merrill <jason@redhat.com>
11083
11084 PR c++/61659
11085 PR c++/61687
11086 Revert:
11087 * c.opt (-fuse-all-virtuals): New.
11088
976d5a22
TT
110892014-07-30 Tom Tromey <tromey@redhat.com>
11090
11091 PR c/59855
11092 * c.opt (Wdesignated-init): New option.
11093 * c-common.c (c_common_attribute_table): Add "designated_init".
11094 (handle_designated_init): New function.
11095
cdc94aca
MP
110962014-07-24 Marek Polacek <polacek@redhat.com>
11097
11098 PR c/57653
11099 * c-opts.c (c_finish_options): If -imacros is in effect, return.
11100
f41373b6
DS
111012014-07-16 Dodji Seketeli <dodji@redhat.com>
11102
11103 PR preprocessor/60723 - missing system-ness marks for macro tokens
11104 * c-ppoutput.c (struct print::prev_was_system_token): New data
11105 member.
11106 (init_pp_output): Initialize it.
11107 (maybe_print_line_1, maybe_print_line, print_line_1, print_line)
11108 (do_line_change): Return a flag saying if a line marker was
11109 emitted or not.
11110 (scan_translation_unit): Detect if the system-ness of the token we
11111 are about to emit is different from the one of the previously
11112 emitted token. If so, emit a line marker. Avoid emitting useless
11113 adjacent line markers. Avoid emitting line markers for tokens
11114 originating from the expansion of built-in macros.
11115 (scan_translation_unit_directives_only): Adjust.
11116
4d661eaa
MP
111172014-07-15 Marek Polacek <polacek@redhat.com>
11118
11119 * c-ubsan.c (ubsan_instrument_bounds): Don't instrument if
11120 TYPE_MAX_VALUE is NULL.
11121
b108f48f
JJ
111222014-07-14 Jakub Jelinek <jakub@redhat.com>
11123
11124 PR middle-end/61294
11125 * c.opt (Wmemset-transposed-args): New warning.
11126
c0221884
JM
111272014-07-10 Jason Merrill <jason@redhat.com>
11128
11129 PR c++/61659
11130 PR c++/61687
11131 * c.opt (-fuse-all-virtuals): New.
11132
63dfbb95
RB
111332014-07-09 Richard Biener <rguenther@suse.de>
11134
11135 PR c-family/61741
11136 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
11137 using unsigned arithmetic if overflow does not wrap instead of
11138 if overflow is undefined.
11139
773ec47f
MP
111402014-07-06 Marek Polacek <polacek@redhat.com>
11141
11142 PR c/6940
11143 * c.opt (Wsizeof-array-argument): New option.
11144
00a7ba58
JJ
111452014-07-03 Jakub Jelinek <jakub@redhat.com>
11146
b1726d6c 11147 * c-ada-spec.c (dump_ada_nodes): Don't call qsort if
00a7ba58
JJ
11148 comments->count <= 1, as comments->entries might be NULL.
11149
52ec0ea3
MP
111502014-07-01 Marek Polacek <polacek@redhat.com>
11151
11152 * c.opt (Wint-conversion): New option.
11153
d5c3d343
MP
111542014-07-01 Marek Polacek <polacek@redhat.com>
11155
11156 PR c/58286
11157 * c.opt (Wincompatible-pointer-types): New option.
11158
6e7ceb17
PC
111592014-06-30 Paolo Carlini <paolo.carlini@oracle.com>
11160
11161 PR c++/51400
11162 * c-common.c (handle_noreturn_attribute, handle_const_attribute):
11163 Do not discard TYPE_QUALS of type.
11164
da73100b
JM
111652014-06-26 Jason Merrill <jason@redhat.com>
11166
11167 * c-common.h (enum cxx_dialect): Add cxx1z.
11168 * c.opt (std=c++1z, std=c++17, std=gnu++1z, std=gnu++17): New.
11169 * c-opts.c (c_common_handle_option, set_std_cxx1z): Handle it.
11170
08eedf75
TJ
111712014-06-26 Teresa Johnson <tejohnson@google.com>
11172
11173 * c-common.h (get_dump_info): Declare.
11174 * c-gimplify.c (c_genericize): Use saved dump files.
11175 * c-opts.c (c_common_parse_file): Begin and end dumps
11176 once around parsing invocation.
11177 (get_dump_info): New function.
11178
7b56b2f8
MP
111792014-06-23 Marek Polacek <polacek@redhat.com>
11180 Andrew MacLeod <amacleod@redhat.com>
11181
11182 PR c/61553
11183 * c-common.c (get_atomic_generic_size): Don't segfault if the
11184 type doesn't have a size.
11185
0e37a2f3
MP
111862014-06-20 Marek Polacek <polacek@redhat.com>
11187
11188 * c-gimplify.c: Include "c-ubsan.h" and "pointer-set.h".
11189 (ubsan_walk_array_refs_r): New function.
11190 (c_genericize): Instrument array bounds.
11191 * c-ubsan.c: Include "internal-fn.h".
11192 (ubsan_instrument_division): Mark instrumented arrays as having
11193 side effects. Adjust ubsan_type_descriptor call.
11194 (ubsan_instrument_shift): Likewise.
11195 (ubsan_instrument_vla): Adjust ubsan_type_descriptor call.
11196 (ubsan_instrument_bounds): New function.
11197 (ubsan_array_ref_instrumented_p): New function.
11198 (ubsan_maybe_instrument_array_ref): New function.
11199 * c-ubsan.h (ubsan_instrument_bounds): Declare.
11200 (ubsan_array_ref_instrumented_p): Declare.
11201 (ubsan_maybe_instrument_array_ref): Declare.
11202
112032014-06-20 Hale Wang <hale.wang@arm.com>
dd6fe7d4
HW
11204
11205 PR lto/61123
11206 * c.opt (fshort-enums): Add to LTO.
11207 * c.opt (fshort-wchar): Likewise.
11208
5c3d09f7
MP
112092014-06-16 Marek Polacek <polacek@redhat.com>
11210
11211 PR c/60439
11212 * c.opt (Wswitch-bool): Add Var.
11213
9cf32741
JJ
112142014-06-12 Jakub Jelinek <jakub@redhat.com>
11215
11216 PR middle-end/61486
11217 * c-omp.c (c_omp_split_clauses): Don't crash on firstprivate in
11218 #pragma omp target teams or
11219 #pragma omp {,target }teams distribute simd.
11220
62984918
JM
112212014-06-12 Jason Merrill <jason@redhat.com>
11222
11223 * c.opt (Wabi=, fabi-compat-version): New.
11224 * c-opts.c (c_common_handle_option): Handle -Wabi=.
11225 (c_common_post_options): Handle flag_abi_compat_version default.
11226 Disallow -fabi-compat-version=1.
11227 * c-common.h (abi_version_crosses): New.
11228
f961457f
JH
112292014-06-11 Jan Hubicka <hubicka@ucw.cz>
11230
adfac8df 11231 * c-common.c (handle_section_attribute): Update handling for
f961457f
JH
11232 section names that are no longer trees.
11233
92d28cbb
JJ
112342014-06-10 Jakub Jelinek <jakub@redhat.com>
11235
11236 PR fortran/60928
11237 * c-pragma.c (omp_pragmas_simd): Move PRAGMA_OMP_TASK...
11238 (omp_pragmas): ... back here.
11239
742938c9
MP
112402014-06-05 Marek Polacek <polacek@redhat.com>
11241
11242 PR c/49706
11243 * c-common.c (warn_logical_not_parentheses): New function.
11244 * c-common.h (warn_logical_not_parentheses): Declare.
11245 * c.opt (Wlogical-not-parentheses): New option.
11246
9d548dfb
MP
112472014-06-04 Marek Polacek <polacek@redhat.com>
11248
11249 PR c/30020
11250 * c-common.c (check_case_bounds): Add location parameter.
11251 Use it.
11252 (c_add_case_label): Pass loc to check_case_bounds.
11253
fedfecef
MP
112542014-06-03 Marek Polacek <polacek@redhat.com>
11255
11256 PR c/60439
11257 * c.opt (Wswitch-bool): New option.
11258
f6a7cffc
TS
112592014-05-22 Thomas Schwinge <thomas@codesourcery.com>
11260
040d18b6
TS
11261 * c-common.h (c_omp_sharing_predetermined, c_omp_remap_decl):
11262 Remove prototypes.
11263 (record_types_used_by_current_var_decl): Move prototype to where
11264 it belongs.
11265
f6a7cffc
TS
11266 * c-common.c (DEF_FUNCTION_TYPE_0, DEF_FUNCTION_TYPE_6)
11267 (DEF_FUNCTION_TYPE_7, DEF_FUNCTION_TYPE_8)
11268 (DEF_FUNCTION_TYPE_VAR_5): Cosmetic fixes.
11269
632f2871
RS
112702014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
11271
11272 * c-common.h (CTI_VOID_ZERO, void_zero_node): Delete.
11273 * c-common.c (c_common_nodes_and_builtins): Don't initialize
11274 void_zero_node.
11275 * c-pretty-print.c (pp_c_void_constant): New function.
11276 (c_pretty_printer::constant, c_pretty_printer::primary_expression)
11277 (c_pretty_printer::expression): Handle VOID_CST.
11278 * cilk.c (extract_free_variables): Likewise.
11279 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift)
11280 (ubsan_instrument_vla): Use void_node instead of void_zero_node.
11281
766090c2
TS
112822014-05-17 Trevor Saunders <tsaunders@mozilla.com>
11283
11284 * c-common.h (sorted_fields_type): Remove variable_size GTY attribute.
11285 * c-pragma.c (push_alignment): Adjust.
11286 (handle_pragma_push_options): Likewise.
11287
661a0813
MP
112882014-05-09 Marek Polacek <polacek@redhat.com>
11289
11290 PR c/50459
11291 * c-common.c (check_user_alignment): Return -1 if alignment is error
11292 node.
11293 (handle_aligned_attribute): Don't call default_conversion on
11294 FUNCTION_DECLs.
11295 (handle_vector_size_attribute): Likewise.
11296 (handle_tm_wrap_attribute): Handle case when wrap_decl is error node.
11297 (handle_sentinel_attribute): Call default_conversion and allow even
11298 integral types as an argument.
11299
2793eeab
MP
113002014-05-08 Marek Polacek <polacek@redhat.com>
11301
11302 PR c/61053
11303 * c-common.c (min_align_of_type): New function factored out from...
11304 (c_sizeof_or_alignof_type): ...here.
11305 * c-common.h (min_align_of_type): Declare.
11306
f827930a
MP
113072014-05-08 Marek Polacek <polacek@redhat.com>
11308
11309 PR c/61077
11310 * c-common.c (check_main_parameter_types): Warn for _Atomic-qualified
11311 parameter type of main.
11312
ca49b74e
DD
113132014-05-07 DJ Delorie <dj@redhat.com>
11314
11315 * c-cppbuiltin.c (print_bits_of_hex): New.
11316 (builtin_define_type_minmax): Print values using hex so as not to
11317 require a pre-computed list of string values.
11318
1d60af08
KZ
113192014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
11320 Mike Stump <mikestump@comcast.net>
11321 Richard Sandiford <rdsandiford@googlemail.com>
11322
11323 * c-ada-spec.c: Include wide-int.h.
11324 (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Remove.
11325 (dump_generic_ada_node): Use wide-int interfaces.
11326 * c-common.c: Include wide-int-print.h.
11327 (shorten_compare): Use wide-int interfaces and tree_int_cst_lt.
11328 (pointer_int_sum): Use wide-int interfaces.
11329 (c_common_nodes_and_builtins): Use make_int_cst.
11330 (match_case_to_enum_1): Use tree_fits_uhwi_p and tree_fits_shwi_p.
11331 (handle_alloc_size_attribute): Use wide-int interfaces.
11332 (get_nonnull_operand): Likewise.
11333 * c-format.c (get_constant): Use tree_fits_uhwi_p.
11334 * c-lex.c: Include wide-int.h.
11335 (narrowest_unsigned_type): Take a widest_int rather than two
11336 HOST_WIDE_INTs.
11337 (narrowest_signed_type): Likewise.
11338 (interpret_integer): Update accordingly. Use wide-int interfaces.
11339 (lex_charconst): Use wide-int interfaces.
11340 * c-pretty-print.c: Include wide-int.h.
11341 (pp_c_integer_constant): Use wide-int interfaces.
11342 * cilk.c (declare_one_free_variable): Use tree_int_cst_lt instead of
11343 INT_CST_LT_UNSIGNED.
11344
b15458be
RB
113452014-05-06 Richard Biener <rguenther@suse.de>
11346
11347 * c-opts.c (c_common_post_options): For -freestanding,
11348 -fno-hosted and -fno-builtin disable pattern recognition
11349 if not enabled explicitely.
11350
6577374e
MP
113512014-05-02 Marek Polacek <polacek@redhat.com>
11352
11353 * c.opt (Wsizeof-pointer-memaccess): Describe option.
11354
d00887e8
MP
113552014-05-01 Marek Polacek <polacek@redhat.com>
11356
11357 PR c/43245
11358 * c.opt (Wdiscarded-qualifiers): Add.
11359
f8ed5150
MP
113602014-04-30 Marek Polacek <polacek@redhat.com>
11361
11362 * c-ubsan.c (ubsan_instrument_division): Handle REAL_TYPEs. Perform
11363 INT_MIN / -1 sanitization only for integer types.
11364
45484dcf
MP
113652014-04-25 Marek Polacek <polacek@redhat.com>
11366
11367 PR c/18079
11368 * c-common.c (handle_noinline_attribute): Warn if the attribute
11369 conflicts with always_inline attribute.
11370 (handle_always_inline_attribute): Warn if the attribute conflicts
11371 with noinline attribute.
11372
38e514c0
MP
113732014-04-25 Marek Polacek <polacek@redhat.com>
11374
11375 PR c/60156
11376 * c-common.c (check_main_parameter_types): Warn about variadic main.
11377
44875f92
MS
113782014-04-24 Mike Stump <mikestump@comcast.net>
11379
11380 * c.opt (Wshadow-ivar): Default to on.
11381
dcaaa5a0
DP
113822014-04-24 Dimitris Papavasiliou <dpapavas@gmail.com>
11383
11384 * c.opt (Wshadow-ivar, flocal-ivars, fivar-visibility): Add.
11385
c07d7c02
MP
113862014-04-23 Marek Polacek <polacek@redhat.com>
11387
11388 * c-common.c (handle_tm_wrap_attribute): Tweak error message.
11389
1c33c9b7
JJ
113902014-04-22 Jakub Jelinek <jakub@redhat.com>
11391
11392 PR sanitizer/60275
11393 * c-ubsan.c (ubsan_instrument_return): Return __builtin_trap ()
11394 if flag_sanitize_undefined_trap_on_error.
11395 (ubsan_instrument_division, ubsan_instrument_shift,
11396 ubsan_instrument_vla): Likewise. Use __ubsan_handle_*_abort ()
11397 if !flag_sanitize_recover.
11398
793c625f
MG
113992014-04-22 Marc Glisse <marc.glisse@inria.fr>
11400
11401 PR libstdc++/43622
11402 * c-common.c (registered_builtin_types): Make non-static.
11403 * c-common.h (registered_builtin_types): Declare.
11404
b0f1bf36 114052014-04-14 Richard Biener <rguenther@suse.de>
ab20d992 11406 Marc Glisse <marc.glisse@inria.fr>
b0f1bf36
RB
11407
11408 PR c/60819
11409 * c-common.c (convert_vector_to_pointer_for_subscript): Properly
11410 apply may-alias the scalar pointer type when applicable.
11411
3b07fa4a
IZ
114122014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
11413
11414 PR middle-end/60467
11415 * cilk.c (cilk_set_spawn_marker): Remove FUNCTION_DECL
11416 as possible argument for Cilk_spawn.
11417
cbbd2b1c
TB
114182014-04-11 Tobias Burnus <burnus@net-b.de>
11419
11420 PR c/60194
11421 * c.opt (Wformat-signedness): Add
11422 * c-format.c(check_format_types): Use it.
11423
6415bd5d
JM
114242014-04-11 Jason Merrill <jason@redhat.com>
11425
11426 PR c++/57926
11427 * c-common.c (sync_resolve_size, get_atomic_generic_size): Call
11428 default_conversion for an array argument.
11429
6525783a
MP
114302014-04-08 Marek Polacek <polacek@redhat.com>
11431
11432 PR sanitizer/60745
11433 * c-ubsan.c: Include asan.h.
11434 (ubsan_instrument_return): Call initialize_sanitizer_builtins.
11435
880a467b
NS
114362014-04-03 Nathan Sidwell <nathan@codesourcery.com>
11437
11438 * c.opt (Wnon-virtual-dtor): Auto set when Weffc++.
11439
7b59ff2d
MP
114402014-04-02 Marek Polacek <polacek@redhat.com>
11441
11442 * c-common.h (c_expand_expr): Remove declaration.
11443
8edbfaa6
JJ
114442014-03-28 Jakub Jelinek <jakub@redhat.com>
11445
11446 PR c++/60689
11447 * c-common.c (add_atomic_size_parameter): When creating new
11448 params vector, push the size argument first.
11449
07d72e1d
JJ
114502014-03-26 Jakub Jelinek <jakub@redhat.com>
11451
11452 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
11453 ubsan_instrument_vla, ubsan_instrument_return): Adjust
11454 ubsan_create_data callers.
11455
b35e0fa0
JJ
114562014-03-22 Jakub Jelinek <jakub@redhat.com>
11457
11458 PR debug/60603
11459 * c-opts.c (c_finish_options): Restore cb_file_change call to
11460 <built-in>.
11461
39a1ebb3
JJ
114622014-03-13 Jakub Jelinek <jakub@redhat.com>
11463
11464 PR middle-end/36282
11465 * c-pragma.c (apply_pragma_weak): Only look at
11466 TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl)) if
11467 DECL_ASSEMBLER_NAME_SET_P (decl).
11468 (maybe_apply_pending_pragma_weaks): Exit early if
11469 vec_safe_is_empty (pending_weaks) rather than only when
11470 !pending_weaks.
11471 (maybe_apply_pragma_weak): Likewise. If !DECL_ASSEMBLER_NAME_SET_P,
11472 set assembler name back to NULL afterwards.
11473
a07f6ed2
JM
114742014-03-11 Jason Merrill <jason@redhat.com>
11475
11476 * c.opt: Add -std=gnu++14.
11477
75b107f5
IB
114782014-03-11 Ian Bolton <ian.bolton@arm.com>
11479
11480 * c-opts.c (c_common_post_options): Don't override
11481 -ffp-contract=fast if unsafe-math-optimizations is on.
11482
f42c637e
PM
114832014-03-08 Paulo Matos <paulo@matos-sorge.com>
11484
22b15758 11485 * c.opt: Enable LTO FE for fshort-double.
f42c637e 11486
70e24808
JM
114872014-03-07 Jason Merrill <jason@redhat.com>
11488
11489 * c.opt: Add -std=c++14.
11490
3af9c5e9
MP
114912014-03-06 Marek Polacek <polacek@redhat.com>
11492
11493 PR c/60197
11494 * cilk.c (contains_cilk_spawn_stmt): New function.
11495 (contains_cilk_spawn_stmt_walker): Likewise.
11496 (recognize_spawn): Give error on invalid use of _Cilk_spawn.
11497 * c-common.h (contains_cilk_spawn_stmt): Add declaration.
11498
b3bdf019
JJ
114992014-03-03 Jakub Jelinek <jakub@redhat.com>
11500
11501 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_SIMD.
11502 (init_pragma): Call cpp_register_deferred_pragma for PRAGMA_CILK_SIMD
11503 even when flag_preprocess_only.
11504
ca7e759d
JM
115052014-02-26 Jason Merrill <jason@redhat.com>
11506
11507 PR c++/59231
11508 PR c++/11586
11509 * c-common.c (shorten_compare): Don't check
11510 c_inhibit_evaluation_warnings.
11511
28e41874
JJ
115122014-02-19 Jakub Jelinek <jakub@redhat.com>
11513
cca615af
JJ
11514 PR c/37743
11515 * c-common.c (c_common_nodes_and_builtins): When initializing
11516 c_uint{16,32,64}_type_node, also set corresponding
11517 uint{16,32,64}_type_node to the same value.
11518
28e41874
JJ
11519 PR c++/60267
11520 * c-pragma.c (init_pragma): Don't call cpp_register_deferred_pragma
11521 for PRAGMA_IVDEP if flag_preprocess_only.
11522
c2bf53a1
JJ
115232014-02-12 Jakub Jelinek <jakub@redhat.com>
11524
11525 PR c/60101
11526 * c-common.c (merge_tlist): If copy is true, call new_tlist,
11527 if false, add ADD itself, rather than vice versa.
11528 (verify_tree): For COND_EXPR, don't call merge_tlist with non-zero
11529 copy. For SAVE_EXPR, only call merge_tlist once.
11530
8fcbce72
JJ
115312014-02-08 Jakub Jelinek <jakub@redhat.com>
11532
11533 PR middle-end/60092
11534 * c-common.c (handle_alloc_size_attribute): Use tree_fits_uhwi_p
11535 and tree_to_uhwi.
11536 (handle_alloc_align_attribute, handle_assume_aligned_attribute): New
11537 functions.
11538 (c_common_attribute_table): Add alloc_align and assume_aligned
11539 attributes.
11540
0a756a3f
MP
115412014-02-06 Marek Polacek <polacek@redhat.com>
11542
11543 PR c/60087
11544 * c-common.c (warn_for_sign_compare): Call warning_at with location
11545 instead of warning.
11546
7ec4847a
MP
115472014-02-05 Marek Polacek <polacek@redhat.com>
11548
11549 PR c/53123
11550 * c-omp.c (c_finish_omp_atomic): Remove unreachable return
11551 statement.
11552
66f20604
MP
115532014-02-04 Marek Polacek <polacek@redhat.com>
11554
11555 PR c/60036
11556 * c-common.c (conversion_warning): Unwrap C_MAYBE_CONST_EXPR and/or
11557 SAVE_EXPR.
11558
5d77fb19
MG
115592014-02-03 Marc Glisse <marc.glisse@inria.fr>
11560
11561 PR c++/53017
11562 PR c++/59211
11563 * c-common.c (handle_aligned_attribute, handle_alloc_size_attribute,
11564 handle_vector_size_attribute, handle_nonnull_attribute): Call
11565 default_conversion on the attribute argument.
11566 (handle_nonnull_attribute): Increment the argument number.
11567
81e5eca8
MP
115682014-01-31 Marek Polacek <polacek@redhat.com>
11569
11570 PR c/59963
11571 * c-common.c (add_atomic_size_parameter): Pass vNULL to
11572 build_function_call_vec.
11573 (resolve_overloaded_builtin): Likewise.
11574 * c-common.h (build_function_call_vec): Adjust declaration.
11575
68fca595
MP
115762014-01-30 Marek Polacek <polacek@redhat.com>
11577
11578 PR c/59940
11579 * c-common.h (unsafe_conversion_p): Adjust declaration.
11580 (warnings_for_convert_and_check): Likewise.
11581 (convert_and_check): Likewise.
11582 * c-common.c (unsafe_conversion_p): Add location parameter. Call
11583 expansion_point_location_if_in_system_header on it.
11584 (warnings_for_convert_and_check): Add location parameter. Call
11585 expansion_point_location_if_in_system_header on it. Use it.
11586 (convert_and_check): Add location parameter. Use it.
11587 (conversion_warning): Likewise.
11588 (c_add_case_label): Adjust convert_and_check calls.
11589 (scalar_to_vector): Adjust unsafe_conversion_p calls.
11590
b72271b9
BI
115912014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
11592
11593 * c-common.c (c_define_builtins): Replaced flag_enable_cilkplus with
11594 flag_cilkplus.
11595 * c-pragma.c (init_pragma): Likewise.
11596 * c.opt: Likewise.
11597
393e8e8b
MP
115982014-01-23 Marek Polacek <polacek@redhat.com>
11599
11600 PR c/59846
11601 * c-common.c (shorten_compare): Add location_t parameter.
11602 * c-common.h (shorten_binary_op): Adjust declaration.
11603
f04dda30
MP
116042014-01-23 Marek Polacek <polacek@redhat.com>
11605
11606 PR c/58346
11607 * c-common.c (pointer_to_zero_sized_aggr_p): New function.
11608 * c-common.h: Declare it.
11609
621955cb
EB
116102014-01-20 Eric Botcazou <ebotcazou@adacore.com>
11611
11612 * c-ada-spec.h (dump_ada_specs): Revert prototype change.
11613 * c-ada-spec.c (dump_ads): Likewise.
11614 (cpp_check): Likewise.
11615 (dump_ada_specs): Likewise.
11616
116172014-01-15 Laurent Alfonsi <laurent.alfonsi@st.com>
67bf2939
LA
11618
11619 PR c++/49718
11620 * c-common.c (handle_no_instrument_function_attribute): Allow
11621 no_instrument_function attribute in class member
11622 definition/declaration.
11623
241f845a
JJ
116242014-01-15 Jakub Jelinek <jakub@redhat.com>
11625
11626 PR c/58943
11627 * c-omp.c (c_finish_omp_atomic): Set in_late_binary_op around
11628 build_modify_expr with non-NOP_EXPR opcode. Handle return from it
11629 being COMPOUND_EXPR.
11630 (c_finish_omp_for): Handle incr being COMPOUND_EXPR with first
11631 operand a SAVE_EXPR and second MODIFY_EXPR.
11632
e83b8e2e
JJ
116332014-01-09 Jakub Jelinek <jakub@redhat.com>
11634
11635 PR target/58115
11636 * c-pch.c (c_common_write_pch): Call
11637 prepare_target_option_nodes_for_pch.
11638
23a5b65a
RS
116392014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
11640
11641 Update copyright years
11642
f9030485
RS
116432014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
11644
11645 * array-notation-common.c, c-cilkplus.c: Use the standard form for
11646 the copyright notice.
11647
f2aa696b
EB
116482013-12-28 Eric Botcazou <ebotcazou@adacore.com>
11649
11650 * c-ada-spec.c (print_constructor): New function.
11651 (print_destructor): Retrieve the origin of the destructor.
11652 (print_ada_declaration): Revamp handling of constructors/destructors.
11653
3f8257db 116542013-12-23 Stuart Hastings <stuart@apple.com>
1f26ac87
JM
11655 Bill Maddox <maddox@google.com>
11656 Jason Merrill <jason@redhat.com>
11657
11658 * c.opt: Add -fdeclone-ctor-dtor.
11659 * c-opts.c (c_common_post_options): Default to on iff -Os.
11660
41958c28
BI
116612013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
11662
11663 * c-common.c (c_common_attribute_table): Added "cilk simd function"
11664 attribute.
11665 * c-pragma.h (enum pragma_cilk_clause): Remove.
ab20d992 11666 (enum pragma_omp_clause): Added the following fields:
41958c28
BI
11667 PRAGMA_CILK_CLAUSE_NOMASK, PRAGMA_CILK_CLAUSE_MASK,
11668 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_NONE,
11669 PRAGMA_CILK_CLAUSE_LINEAR, PRAGMA_CILK_CLAUSE_PRIVATE,
11670 PRAGMA_CILK_CLAUSE_FIRSTPRIVATE, PRAGMA_CILK_CLAUSE_LASTPRIVATE,
11671 PRAGMA_CILK_CLAUSE_UNIFORM.
11672
b1726d6c 11673
12893402
BI
116742013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
11675
11676 * cilk.c (cilk_outline): Made this function non-static.
11677 (gimplify_cilk_spawn): Removed pre_p and post_p arguments.
11678 (create_cilk_wrapper): Added a new parameter: a function pointer.
11679 (c_install_body_w_frame_cleanup): Remove
11680 (extract_free_variables): Added VEC_INIT_EXPR and CONSTRUCTOR case.
11681 * c-common.h (cilk_outline): New prototype.
11682 (gimplify_cilk_spawn): Removed two parameters.
11683 (cilk_install_body_with_frame_cleanup): New prototype.
11684 * c-gimplify.c (c_gimplify_expr): Added MODIFY_EXPR, CALL_EXPR and
11685 CILK_SPAWN_STMT case.
11686
085b42ed
BS
116872013-12-11 Bernd Schmidt <bernds@codesourcery.com>
11688
2ce064c3
BS
11689 * c-common.c (c_fully_fold_internal): Handle ADDR_SPACE_CONVERT_EXPR.
11690
085b42ed
BS
11691 * c-common.h (enum c_tree_index): Remove CTI_INT_ARRAY_TYPE.
11692 (int_array_type_node): Remove.
11693 * c-common.c (c_common_nodes_and_builtins): Don't build it.
11694
9e36c9ed
MP
116952013-12-05 Marek Polacek <polacek@redhat.com>
11696
11697 PR c/52023
11698 * c-common.c (c_sizeof_or_alignof_type): Move a declaration into
11699 [ADJUST_FIELD_ALIGN].
11700
296674db
JM
117012013-12-04 Joseph Myers <joseph@codesourcery.com>
11702
11703 PR c/52023
11704 * c-common.c (c_sizeof_or_alignof_type): Add parameter min_alignof
11705 and check field alignment if set.
11706 * c-common.h (c_sizeof_or_alignof_type): Update prototype.
11707 (c_sizeof, c_alignof): Update calls to c_sizeof_or_alignof_type.
11708
b1726d6c 117092013-12-04 Jakub Jelinek <jakub@redhat.com>
31e071ae
MP
11710 Marek Polacek <polacek@redhat.com>
11711
11712 * c-gimplify.c (c_gimplify_expr): If doing the integer-overflow
11713 sanitization, call unsigned_type_for only when !TYPE_OVERFLOW_WRAPS.
11714
d7947e19
L
117152013-11-29 H.J. Lu <hongjiu.lu@intel.com>
11716
11717 PR c/59309
11718 * cilk.c (gimplify_cilk_spawn): Properly handle function without
11719 arguments.
11720
fad7652e
JJ
117212013-11-29 Jakub Jelinek <jakub@redhat.com>
11722
11723 PR c/59280
11724 * c-common.c (get_priority): If TREE_VALUE (args) is IDENTIFIER_NODE,
11725 goto invalid. If it is error_mark_node, don't issue further
11726 diagnostics.
11727
8b5e1202
SO
117282013-11-28 Sergey Ostanevich <sergos.gnu@gmail.com>
11729
11730 * c.opt (Wopenmp-simd): New.
11731
0a508bb6
JJ
117322013-11-22 Jakub Jelinek <jakub@redhat.com>
11733
11734 * c-ubsan.h (ubsan_instrument_return): New prototype.
11735 * c-ubsan.c (ubsan_instrument_return): New function.
11736
2fb9a547
AM
117372013-11-22 Andrew MacLeod <amacleod@redhat.com>
11738
11739 * c-common.c: Add required include files from gimple.h.
ab20d992
JJ
11740 * c-gimplify.c: Likewise.
11741 * cilk.c: Likewise.
2fb9a547 11742
8400e75e
DM
117432013-11-22 David Malcolm <dmalcolm@redhat.com>
11744
11745 * c-common.c (unsafe_conversion_p): Remove use of
11746 EXPR_LOC_OR_HERE macro.
11747 (conversion_warning): Likewise.
11748 (warnings_for_convert_and_check): Likewise.
11749 (warn_for_collisions_1): Likewise.
11750 (shorten_compare): Likewise, and remove use of in_system_header
11751 macro, using the location from the former.
11752 * c-lex.c (dump_one_header): Remove use of input_filename macro.
11753 (cb_def_pragma): Remove use of in_system_header macro.
11754 (lex_string): Likewise.
11755 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
11756
eb1ce453
KZ
117572013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
11758 Mike Stump <mikestump@comcast.net>
11759 Richard Sandiford <rdsandiford@googlemail.com>
11760
11761 * c-ada-spec.c (is_simple_enum): Use tree_to_shwi and tree_to_uhwi
11762 instead of TREE_INT_CST_LOW, in cases where there is a protecting
11763 tree_fits_shwi_p or tree_fits_uhwi_p.
11764 (dump_generic_ada_node): Likewise.
11765 * c-format.c (check_format_arg): Likewise.
11766 * c-pretty-print.c (pp_c_integer_constant): Likewise.
11767
6b3b8c27
KZ
117682013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
11769
11770 * c-common.c (check_function_arguments_recurse): Use tree_to_uhwi.
11771
49b0aa18
JC
117722013-11-19 Joshua J Cogliati <jrincayc@yahoo.com>
11773
11774 PR c/53001
11775 * c-common.c (unsafe_conversion_p): Make this function
11776 return an enumeration with more detail.
11777 (conversion_warning): Use the new return type of
11778 unsafe_conversion_p to separately warn either about conversions
11779 that lower floating point number precision or about the other
11780 kinds of conversions.
11781 * c-common.h (enum conversion_safety): New enumeration.
8e745a17
JJ
11782 (unsafe_conversion_p): switching return type to
11783 conversion_safety enumeration.
49b0aa18
JC
11784 * c.opt: Adding new warning -Wfloat-conversion and
11785 enabling it with -Wconversion.
11786
b826515a
BS
117872013-11-19 Basile Starynkevitch <basile@starynkevitch.net>
11788
8e745a17
JJ
11789 * c-opts.c: Include plugin.h.
11790 (cb_file_change): Invoke plugin event PLUGIN_INCLUDE_FILE.
b826515a 11791
b9a55b13
MP
117922013-11-19 Marek Polacek <polacek@redhat.com>
11793
11794 * c-ubsan.c (ubsan_instrument_division): Adjust ubsan_create_data
11795 call.
11796 (ubsan_instrument_shift): Likewise.
11797 (ubsan_instrument_vla): Likewise.
11798
7d362f6c
RS
117992013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
11800
11801 * c-common.c (convert_vector_to_pointer_for_subscript): Remove
11802 cast to unsigned type.
11803
386b1f1f
RS
118042013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
11805
11806 * c-common.c (fold_offsetof_1): Use tree_to_uhwi rather than
11807 tree_low_cst.
11808 (complete_array_type): Update comment to refer to tree_to_[su]hwi
11809 rather than tree_low_cst.
11810
ae7e9ddd
RS
118112013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
11812
11813 * c-common.c, c-cppbuiltin.c: Replace tree_low_cst (..., 1) with
11814 tree_to_uhwi throughout.
11815
9439e9a1
RS
118162013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
11817
11818 * c-common.c, c-format.c, c-omp.c, c-pretty-print.c: Replace
11819 tree_low_cst (..., 0) with tree_to_shwi throughout.
11820
cc269bb6
RS
118212013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
11822
11823 * c-ada-spec.c, c-common.c, c-pretty-print.c: Replace
11824 host_integerp (..., 1) with tree_fits_uhwi_p throughout.
11825
9541ffee
RS
118262013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
11827
11828 * c-ada-spec.c, c-common.c, c-format.c, c-pretty-print.c: Replace
11829 host_integerp (..., 0) with tree_fits_shwi_p throughout.
11830
c02065fc
AH
118312013-11-15 Aldy Hernandez <aldyh@redhat.com>
11832
11833 * c-cilkplus.c: New file.
11834 * c-common.c (readonly_error): Add location argument.
11835 * c-common.h (readonly_error): Same.
11836 (c_finish_cilk_clauses): Protoize.
11837 (c_check_cilk_loop): Same.
11838 c-omp.c (c_finish_omp_for): Handle CILK_SIMD nodes.
11839 Do not fail on error_mark_node.
11840 Abstract increment canonicalization to here...
11841 (c_omp_for_incr_canonicalize_ptr): New.
11842 c-pragma.c (init_pragma): Register "simd" pragma.
11843 c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_SIMD.
11844 (enum pragma_cilk_clause): New.
11845
9cc65f15
RS
118462013-11-15 Richard Sandiford <rdsandiford@googlemail.com>
11847
11848 * c-pretty-print.c (pp_c_character_constant): Remove unnecessary
11849 wchar_type and host_integerp checks.
11850
18f429e2
AM
118512013-11-14 Andrew MacLeod <amacleod@redhat.com>
11852
11853 * c-common.c: Likewise.
11854 * c-gimplify.c: Likewise.
11855 * cilk.c: Likewise.
11856
d8a2d370
DN
118572013-11-14 Diego Novillo <dnovillo@google.com>
11858
11859 * c-common.c: Include fold-const.h.
11860 Include stor-layout.h.
11861 Include calls.h.
11862 Include stringpool.h.
11863 Include attribs.h.
11864 Include varasm.h.
11865 Include trans-mem.h.
11866 * c-cppbuiltin.c: Include stor-layout.h.
11867 Include stringpool.h.
11868 * c-format.c: Include stringpool.h.
11869 * c-lex.c: Include stringpool.h.
11870 Include stor-layout.h.
11871 * c-pragma.c: Include stringpool.h.
11872 Include attribs.h.
11873 Include varasm.h.
11874 Include gcc-symtab.h.
11875 * c-pretty-print.c: Include stor-layout.h.
11876 Include attribs.h.
11877 * cilk.c: Include stringpool.h.
11878 Include calls.h.
11879
38b7bc7f
JM
118802013-11-13 Joseph Myers <joseph@codesourcery.com>
11881
11882 * c-common.h (enum rid): Add RID_AUTO_TYPE.
11883 * c-common.c (c_common_reswords): Add __auto_type.
11884 (keyword_begins_type_specifier): Handle RID_AUTO_TYPE.
11885
45b0be94
AM
118862013-11-12 Andrew MacLeod <amacleod@redhat.com>
11887
18f429e2
AM
11888 * c-common.c: Include gimplify.h.
11889 * c-gimplify.c: Likewise.
11890 * cilk.c: Likewise.
11891 * c-omp.c: Include gimple-expr.h instead of gimple.h.
11892 * c-ubsan.c: Don't include gimple.h.
45b0be94 11893
582d9b50
JM
118942013-11-12 Joseph Myers <joseph@codesourcery.com>
11895
11896 * c-common.c (c_common_reswords): Add _Thread_local.
11897
6b28e197
JM
118982013-11-09 Joseph Myers <joseph@codesourcery.com>
11899
11900 * c-common.c (atomic_size_supported_p): New function.
11901 (resolve_overloaded_atomic_exchange)
11902 (resolve_overloaded_atomic_compare_exchange)
11903 (resolve_overloaded_atomic_load, resolve_overloaded_atomic_store):
11904 Use it instead of comparing size with a local list of sizes.
11905
267bac10
JM
119062013-11-07 Andrew MacLeod <amacleod@redhat.com>
11907 Joseph Myers <joseph@codesourcery.com>
11908
11909 * c-common.h (enum rid): Add RID_ATOMIC.
11910 * c-common.c (c_common_reswords): Add _Atomic.
11911 (sync_resolve_params): Use TYPE_MAIN_VARIANT on pointer argument.
11912 (keyword_is_type_qualifier): Accept RID_ATOMIC.
11913 * c-format.c (check_format_types): Check for extra _Atomic
11914 qualifiers in format argument.
11915 * c-pretty-print.c (pp_c_cv_qualifiers): Handle atomic qualifier.
11916 (pp_c_type_qualifier_list): Mention _Atomic in comment.
11917
5157b91e
TB
119182013-11-06 Tobias Burnus <burnus@net-b.de>
11919
11920 * c-common.c (reason_option_codes_t): Add CPP_W_DATE_TIME.
11921
6dbe0958
JM
119222013-11-06 Joseph Myers <joseph@codesourcery.com>
11923
11924 * c-opts.c (c_common_post_options): Set -ffp-contract=off in C
11925 standards modes.
11926 * c-cppbuiltin.c (cpp_iec_559_value): Consider -ffp-contract=fast
11927 to mean lack of IEEE 754 support.
11928
e8ff5196
TB
119292013-11-05 Tobias Burnus <burnus@net-b.de>
11930
11931 * c.opt (-Wdate-time): New option
11932 * c-opts.c (sanitize_cpp_opts): Pass on to libcpp.
11933
254a0760
JM
119342013-11-05 Joseph Myers <joseph@codesourcery.com>
11935
11936 * c-cppbuiltin.c (cpp_iec_559_value): Test
11937 flag_excess_precision_cmdline not flag_excess_precision.
11938
6d7f7e0a
TB
119392013-11-05 Tobias Burnus <burnus@net-b.de>
11940
11941 * c.opt (fopenmp-simd): New option.
11942 * c-pragma.c (omp_pragmas): Move pragmas which can contain simd to ...
11943 (omp_pragmas): ... this new struct.
11944 (c_pp_lookup_pragma): Also walk omp_pragmas.
11945 (init_pragma): Init pragmas for -fopenmp-simd.
11946
55a7f02f
MP
119472013-11-04 Marek Polacek <polacek@redhat.com>
11948
11949 PR c++/58979
11950 * c-common.c (invalid_indirection_error): Handle RO_ARROW_STAR case.
11951
9193fb05
JM
119522013-11-04 Joseph Myers <joseph@codesourcery.com>
11953
11954 * c-cppbuiltin.c (cpp_iec_559_value, cpp_iec_559_complex_value):
11955 New functions.
11956 (c_cpp_builtins): Define __GCC_IEC_559 and __GCC_IEC_559_COMPLEX.
11957
94159ecf
EB
119582013-11-04 Eric Botcazou <ebotcazou@adacore.com>
11959
11960 * c-ada-spec.h (cpp_operation): Add IS_TRIVIAL.
11961 (dump_ada_specs): Adjust prototype of second callback.
11962 * c-ada-spec.c (cpp_check): New global variable.
11963 (dump_ada_nodes): Remove cpp_check parameter and do not pass it down.
11964 (print_generic_ada_decl): Likewise.
11965 (has_static_fields): Change return type to bool and add guard.
11966 (has_nontrivial_methods): New predicate.
11967 (is_tagged_type): Change return type to bool.
11968 (separate_class_package): Call has_nontrivial_methods.
11969 (pp_ada_tree_identifier): Minor tweaks.
11970 (dump_ada_function_declaration): Adjust calls to dump_generic_ada_node.
11971 (dump_ada_array_domains): Likewise.
11972 (dump_ada_array_type): Likewise.
11973 (dump_template_types): Remove cpp_check parameter and do not pass it to
11974 dump_generic_ada_node.
11975 (dump_ada_template): Likewise.
11976 (dump_generic_ada_node): Remove cpp_check parameter and do not pass it
11977 recursively.
11978 (print_ada_methods): Change return type to integer. Remove cpp_check
11979 parameter and do not pass it down.
11980 (dump_nested_types): Remove cpp_check parameter and do not pass it to
11981 dump_generic_ada_node.
11982 (print_ada_declaration): Likewise. Test RECORD_OR_UNION_TYPE_P before
11983 accessing methods.
11984 (print_ada_struct_decl): Remove cpp_check parameter and do not pass it
11985 down. Use has_nontrivial_methods to recognize C++ classes. Use return
11986 value of print_ada_methods.
11987 (dump_ads): Rename cpp_check parameter to check and adjust prototype.
11988 Set cpp_check to it before invoking dump_ada_nodes.
11989 (dump_ada_specs): Likewise.
11990
b906f4ca
MP
119912013-11-03 Marek Polacek <polacek@redhat.com>
11992
11993 * c-ubsan.c: Don't include hash-table.h.
11994 (ubsan_instrument_vla): New function.
11995 * c-ubsan.h: Declare it.
11996
5e20cdc9
DM
119972013-10-31 David Malcolm <dmalcolm@redhat.com>
11998
11999 Automated part of renaming of symtab_node_base to symtab_node.
12000
12001 Patch autogenerated by rename_symtab.py from
12002 https://github.com/davidmalcolm/gcc-refactoring-scripts
12003 revision 58bb219cc090b2f4516a9297d868c245495ee622
12004
12005 * c-pragma.c (maybe_apply_pending_pragma_weaks): Rename
12006 symtab_node_base to symtab_node.
12007
7057e645
ESR
120082013-10-31 Edward Smith-Rowland <3dw4rd@verizon.net>
12009
8e745a17 12010 Implement C++14 digit separators.
7057e645
ESR
12011 * c-lex.c (interpret_float): Remove digit separators from scratch string
12012 before building real literal.
12013
193ea7bc
JJ
120142013-10-30 Jakub Jelinek <jakub@redhat.com>
12015
12016 * cilk.c (create_cilk_helper_decl): Use HOST_WIDE_INT_PRINT_DEC.
12017
939b37da
BI
120182013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
12019
12020 * c-common.c (c_common_reswords[]): Added _Cilk_spawn and _Cilk_sync
12021 fields.
12022 (c_define_builtins): Called cilk_init_builtins if Cilk Plus is
12023 enabled.
12024 * c-common.h (enum rid): Added RID_CILK_SPAWN and RID_CILK_SYNC.
12025 (insert_cilk_frame): New prototype.
12026 (cilk_init_builtins): Likewise.
12027 (gimplify_cilk_spawn): Likewise.
12028 (c_cilk_install_body_w_frame_cleanup): Likewise.
12029 (cilk_detect_spawn_and_unwrap): Likewise.
12030 (cilk_set_spawn_marker): Likewise.
12031 (build_cilk_sync): Likewise.
12032 (build_cilk_spawn): Likewise.
12033 * cilk.c: New file.
12034
67348ccc
DM
120352013-10-29 David Malcolm <dmalcolm@redhat.com>
12036
12037 Patch autogenerated by refactor_symtab.py from
12038 https://github.com/davidmalcolm/gcc-refactoring-scripts
12039 revision 58bb219cc090b2f4516a9297d868c245495ee622
12040
12041 * c-gimplify.c (c_genericize): Update for conversion of symtab types
12042 to a true class hierarchy.
12043 * c-pragma.c (maybe_apply_pending_pragma_weaks): Likewise.
12044
d570872d
RS
120452013-10-27 Richard Sandiford <rdsandiford@googlemail.com>
12046
12047 * c-lex.c (interpret_integer): Remove call to cpp_num_sign_extend.
12048
98906124
JL
120492013-10-26 Jeff Law <law@redhat.com>
12050
adfac8df
JJ
12051 * c-common.c (c_define_builtins): Remove mudflap support.
12052 * c.opt: Ignore and warn for mudflap options.
98906124 12053
d73749df 120542013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
12055
12056 PR other/33426
12057 * c-pragma.c (init_pragma) Add #pragma ivdep handling.
12058 * c-pragma.h (pragma_kind): Add PRAGMA_IVDEP.
12059
3f04b1bb
JM
120602013-10-23 Jason Merrill <jason@redhat.com>
12061
12062 * c-format.c (gcc_cxxdiag_char_table): Add %X.
12063
acf0174b
JJ
120642013-10-11 Jakub Jelinek <jakub@redhat.com>
12065
acd15a28
JJ
12066 * c-common.h (omp_clause_mask::operator !=): New method.
12067 * c-omp.c (c_omp_split_clauses): Use if ((mask & something) != 0)
12068 instead of if (mask & something) tests everywhere.
12069
acf0174b
JJ
12070 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP to
12071 201307 instead of 201107.
12072 * c-common.c (DEF_FUNCTION_TYPE_8): Define.
12073 (c_common_attribute_table): Add "omp declare target" and
12074 "omp declare simd" attributes.
12075 (handle_omp_declare_target_attribute,
12076 handle_omp_declare_simd_attribute): New functions.
12077 * c-omp.c: Include c-pragma.h.
12078 (c_finish_omp_taskgroup): New function.
12079 (c_finish_omp_atomic): Add swapped argument, if true,
12080 build the operation first with rhs, lhs arguments and use NOP_EXPR
12081 build_modify_expr.
12082 (c_finish_omp_for): Add code argument, pass it down to make_code.
12083 (c_omp_split_clauses): New function.
12084 (c_split_parallel_clauses): Removed.
12085 (c_omp_declare_simd_clause_cmp, c_omp_declare_simd_clauses_to_numbers,
12086 c_omp_declare_simd_clauses_to_decls): New functions.
12087 * c-common.h (omp_clause_mask): New type.
12088 (OMP_CLAUSE_MASK_1): Define.
12089 (omp_clause_mask::omp_clause_mask, omp_clause_mask::operator &=,
12090 omp_clause_mask::operator |=, omp_clause_mask::operator ~,
12091 omp_clause_mask::operator |, omp_clause_mask::operator &,
12092 omp_clause_mask::operator <<, omp_clause_mask::operator >>,
12093 omp_clause_mask::operator ==): New methods.
12094 (enum c_omp_clause_split): New.
12095 (c_finish_omp_taskgroup): New prototype.
12096 (c_finish_omp_atomic): Add swapped argument.
12097 (c_finish_omp_for): Add code argument.
12098 (c_omp_split_clauses): New prototype.
12099 (c_split_parallel_clauses): Removed.
12100 (c_omp_declare_simd_clauses_to_numbers,
12101 c_omp_declare_simd_clauses_to_decls): New prototypes.
12102 * c-pragma.c (omp_pragmas): Add new OpenMP 4.0 constructs.
12103 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_CANCEL,
12104 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_DECLARE_REDUCTION,
12105 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_SIMD,
12106 PRAGMA_OMP_TARGET, PRAGMA_OMP_TASKGROUP and PRAGMA_OMP_TEAMS.
12107 Remove PRAGMA_OMP_PARALLEL_FOR and PRAGMA_OMP_PARALLEL_SECTIONS.
12108 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ALIGNED,
12109 PRAGMA_OMP_CLAUSE_DEPEND, PRAGMA_OMP_CLAUSE_DEVICE,
12110 PRAGMA_OMP_CLAUSE_DIST_SCHEDULE, PRAGMA_OMP_CLAUSE_FOR,
12111 PRAGMA_OMP_CLAUSE_FROM, PRAGMA_OMP_CLAUSE_INBRANCH,
12112 PRAGMA_OMP_CLAUSE_LINEAR, PRAGMA_OMP_CLAUSE_MAP,
12113 PRAGMA_OMP_CLAUSE_NOTINBRANCH, PRAGMA_OMP_CLAUSE_NUM_TEAMS,
12114 PRAGMA_OMP_CLAUSE_PARALLEL, PRAGMA_OMP_CLAUSE_PROC_BIND,
12115 PRAGMA_OMP_CLAUSE_SAFELEN, PRAGMA_OMP_CLAUSE_SECTIONS,
12116 PRAGMA_OMP_CLAUSE_SIMDLEN, PRAGMA_OMP_CLAUSE_TASKGROUP,
12117 PRAGMA_OMP_CLAUSE_THREAD_LIMIT, PRAGMA_OMP_CLAUSE_TO and
12118 PRAGMA_OMP_CLAUSE_UNIFORM.
12119
826cacfe
MG
121202013-10-09 Marc Glisse <marc.glisse@inria.fr>
12121
12122 PR tree-optimization/20318
12123 * c-common.c (handle_returns_nonnull_attribute): New function.
12124 (c_common_attribute_table): Add returns_nonnull.
12125
2284b034
MG
121262013-10-03 Marc Glisse <marc.glisse@inria.fr>
12127
12128 PR c++/19476
12129 * c.opt (fcheck-new): Move to common.opt.
12130
b56e9788
MP
121312013-09-25 Marek Polacek <polacek@redhat.com>
12132 Jakub Jelinek <jakub@redhat.com>
12133
12134 PR sanitizer/58413
12135 * c-ubsan.c (ubsan_instrument_shift): Don't instrument
12136 an expression if we can prove it is correct.
12137 (ubsan_instrument_division): Likewise. Remove unnecessary
12138 check.
12139
ce6923c5
MP
121402013-09-18 Marek Polacek <polacek@redhat.com>
12141
12142 PR sanitizer/58411
12143 * c-common.c (handle_no_sanitize_undefined_attribute): New function.
12144 Declare it.
12145 (struct attribute_spec c_common_att): Add no_sanitize_undefined.
12146
fb5610fb
IS
121472013-09-14 Iain Sandoe <iain@codesourcery.com>
12148
12149 PR target/48094
12150 * c.opt (fgnu-runtime, fnext-runtime, fobjc-abi-version,
12151 fobjc-gc, freplace-objc-classes): Accept for LTO.
12152
88b0e79e
JC
121532013-09-13 Jacek Caban <jacek@codeweavers.com>
12154
12155 * c-target.def: New hook
12156
c9b0866a
PC
121572013-09-09 Paolo Carlini <paolo.carlini@oracle.com>
12158
12159 PR c++/43452
12160 * c.opt (Wdelete-incomplete): Add.
12161
0af94e6f
JR
121622013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
12163
12164 * c-common.c (same_scalar_type_ignoring_signedness): Delete.
12165 (vector_types_compatible_elements_p): New function.
12166 * c-common.h: (same_scalar_type_ignoring_signedness): Delete
12167 declaration.
12168 (vector_types_compatible_elements_p): Declare.
12169
7c26172c
GDR
121702013-09-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
12171
12172 * c-pretty-print.h (c_pretty_printer::simple_type_specifier): Now
12173 a virtual member function.
12174 (pp_simple_type_specifier): Remove.
12175 (pp_c_type_specifier): Likewise.
12176 * c-pretty-print.c (c_pretty_printer::simple_type_specifier):
12177 Rename from pp_c_type_specifier. Adjust.
12178 (c_pretty_printer::c_pretty_printer): Do not assign to
12179 simple_type_specifier.
12180
20059c8b
GDR
121812013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
12182
12183 * c-pretty-print.h (c_pretty_printer::type_id): Now a virtual
12184 member function.
12185 (c_pretty_printer::storage_class_specifier): Likewise.
12186 (c_pretty_printer::initializer): Likewise.
12187 (pp_declaration): Remove.
12188 (pp_declaration_specifiers): Likewise.
12189 (pp_abstract_declarator): Likewise.
12190 (pp_declarator): Likewise.
12191 (pp_type_id): Likewise.
12192 (pp_statement): Likewise.
12193 (pp_constant): Likewise.
12194 (pp_id_expression): Likewise.
12195 (pp_primary_expression): Likewise.
12196 (pp_unary_expression): Likewise.
12197 (pp_multiplicative_expression): Likewise.
12198 (pp_conditional_expression): Likewise.
12199 (pp_assignment_expression): Likewise.
12200 (pp_expression): Likewise.
12201 (pp_c_type_id): Likewise.
12202 (pp_c_storage_class_specifier): Likewise.
12203 * c-pretty-print.c (pp_c_type_cast): Tidy.
12204 (pp_c_pointer): Likewise.
12205 (pp_c_type_specifier): Likewise.
12206 (pp_c_parameter_type_list): Likewise.
12207 (pp_c_function_definition): Likewise.
12208 (pp_c_init_declarator): Likewise.
12209 (pp_c_initializer_list): Likewise.
12210 (pp_c_constructor_elts): Likewise.
12211 (c_pretty_printer::direct_abstract_declarator): Likewise.
12212 (c_pretty_printer::declaration_specifiers): Likewise.
12213 (c_pretty_printer::primary_expression): Likewise.
12214 (c_pretty_printer::postfix_expression): Likewise.
12215 (c_pretty_printer::type_id): Rename from pp_c_type_id.
12216 (c_pretty_printer::storage_class_specifier): Rename from
12217 pp_c_storage_class_specifier.
12218 (c_pretty_printer::initializer): Rename from pp_c_initializer.
12219 (c_pretty_printer::c_pretty_printer): Do not assign to type_id,
12220 storage_class_specifier, initializer, offset_list, flags.
12221
de5a5fa1
MP
122222013-08-30 Marek Polacek <polacek@redhat.com>
12223
12224 * c-ubsan.c: New file.
12225 * c-ubsan.h: New file.
12226
8f0e4d72
GDR
122272013-08-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
12228
12229 * c-pretty-print.h (c_pretty_printer::declaration): Now a virtual
12230 member function.
12231 (c_pretty_printer::declaration_specifiers): Likewise.
12232 (c_pretty_printer::declarator): Likewise.
12233 (c_pretty_printer::abstract_declarator): Likewise.
12234 (c_pretty_printer::direct_abstract_declarator): Likewise.
12235 (c_pretty_printer::direct_declarator): Likewise.
12236 (c_pretty_printer::function_specifier): Likewise.
12237 (pp_declaration): Adjust.
12238 (pp_declaration_specifiers): Likewise.
12239 (pp_abstract_declarator): Likewise.
12240 (pp_direct_declarator): Likewise.
12241 (pp_function_specifier): Likewise.
12242 (pp_direct_abstract_declarator): Remove as unused.
12243 (pp_c_declaration): Remove.
12244 (pp_c_declaration_specifiers): Likewise.
12245 (pp_c_declarator): Likewise.
12246 (pp_c_direct_declarator): Likewise.
12247 (pp_c_function_specifier): Likewise.
12248 (pp_c_direct_abstract_declarator): Likewise.
12249 * c-pretty-print.c (c_pretty_printer::abstract_declarator): Rename
12250 from pp_c_abstract_declarator. Adjust.
ab20d992 12251 (c_pretty_printer::direct_abstract_declarator): Rename from
8f0e4d72
GDR
12252 pp_c_direct_abstract_declarator. Adjust.
12253 (c_pretty_printer::function_specifier): Rename from
12254 pp_c_function_specifier. Adjust.
12255 (c_pretty_printer::declaration_specifiers): Rename from
12256 pp_c_declaration_specifiers. Adjust.
12257 (c_pretty_printer::direct_declarator): Rename from
12258 pp_c_direct_declarator. Adjust.
12259 (c_pretty_printer::declarator): Rename from pp_c_declarator. Adjust.
12260 (c_pretty_printer::declaration): Rename from pp_c_declaration. Adjust.
12261 (c_pretty_printer::c_pretty_printer): Do not assign to
12262 declaration, declaration_specifiers, declarator,
12263 direct_declarator, direct_abstract_declarator, function_specifier.
12264
00d34d3a
GDR
122652013-08-26 Gabriel Dos Reis <gdre@integrable-solutions.net>
12266
12267 * c-pretty-print.h (c_pretty_printer::unary_expression): Now a
12268 virtual member function.
12269 (c_pretty_printer::multiplicative_expression): Likewise.
12270 (c_pretty_printer::conditional_expression): Likewise.
12271 (c_pretty_printer::assignment_expression): Likewise.
12272 (c_pretty_printer::expression): Likewise.
12273 (pp_unary_expression): Adjust.
12274 (pp_multiplicative_expression): Likewise.
12275 (pp_assignment_expression): Likewise.
12276 (pp_conditional_expression): Likewise.
12277 (pp_expression): Likewise.
12278 * c-pretty-print.c (c_pretty_printer::unary_expression): Rename
12279 from pp_c_unary_expression. Adjust.
12280 (c_pretty_printer::multiplicative_expression): Rename from
12281 pp_c_multiplicative_expression. Adjust.
12282 (c_pretty_printer::conditional_expression): Rename from
12283 pp_c_conditional_expression. Adjust.
12284 (c_pretty_printer::assignment_expression): Rename from
12285 pp_c_assignment_expression. Adjust.
12286 (c_pretty_printer::expression): Rename from pp_c_expression. Adjust.
12287 (c_pretty_printer::c_pretty_printer): Do not assign to
12288 unary_expression, multiplicative_expression,
12289 conditional_expression, expression.
12290
fb22178f
GDR
122912013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
12292
12293 * c-pretty-print.h (c_pretty_printer::postfix_expression): Now a
12294 virtual member function.
12295 (pp_postfix_expression): Adjust.
12296 (pp_c_postfix_expression): Remove.
12297 * c-pretty-print.c (c_pretty_printer::postfix_expression): Rename
12298 from pp_c_postfix_expression. Adjust.
12299 (c_pretty_printer::c_pretty_printer): Do not assign to
12300 postfix_expression.
12301
7ecc2600
GDR
123022013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
12303
12304 * c-pretty-print.h (c_pretty_printer::primary_expression): Now a
12305 virtua member function.
12306 (pp_primary_expression): Adjust.
12307 (pp_c_primary_expression): Remove.
12308 * c-pretty-print.c (c_pretty_printer::primary_expression): Rename
12309 from pp_c_primary_expression. Adjust.
12310 (pp_c_initializer_list): Use pp_primary_expression.
12311 (c_pretty_printer::c_pretty_printer): Do not assign to
12312 primary_expression.
12313
0691175f
GDR
123142013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
12315
12316 * c-pretty-print.h (c_pretty_printer::translate_string): Declare.
12317 * c-pretty-print.c (M_): Remove.
12318 (c_pretty_printer::translate_string): Define.
12319 (pp_c_type_specifier): Use it.
12320 (pp_c_primary_expression): Likewise.
12321 (pp_c_expression): Likewise.
12322
66dfe4c4
GDR
123232013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
12324
12325 * c-pretty-print.h (c_pretty_printer::id_expression): Now a
12326 virtual function.
12327 (pp_c_id_expression): Remove.
12328 (pp_id_expression): Adjust.
12329 * c-pretty-print.c (c_pretty_printer::id_expression): Rename from
12330 pp_c_id_expression. Adjust.
12331 (pp_c_postfix_expression): Use pp_id_expression.
12332 (c_pretty_printer::c_pretty_printer): Do not assign to id_expression.
12333
ca43e9d5
GDR
123342013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
12335
12336 * c-pretty-print.h (c_pretty_printer::constant): Now a virtual
12337 member function.
12338 (pp_constant): Adjust.
12339 (pp_c_constant): Remove.
12340 * c-pretty-print.c (c_pretty_printer::constant): Rename from
12341 pp_c_constant. Adjust.
12342 (pp_c_constant)
12343 (pp_c_primary_expression): Call pp_constant in lieu of pp_c_constant.
12344 (c_pretty_printer::c_pretty_printer): Remove assignment to constant.
12345
da6ca2b5
GDR
123462013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
12347
12348 * c-pretty-print.h (pp_c_pretty_printer_init): Remove.
12349 (c_pretty_printer::c_pretty_printer): Declare.
12350 * c-pretty-print.c (pretty_printer::c_pretty_printer): Rename from
12351 c_pretty_printer_init. Adjust.
12352 (print_c_tree): Do not call c_pretty_printer_init.
12353 * c-ada-spec.c (dump_ads): Remove call to pp_construct.
12354
65a372f4
AC
123552013-08-09 Arnaud Charlet <charlet@adacore.com>
12356
12357 * c-ada-spec.c (print_ada_declaration): Prevent accessing null asm name
12358
fd9b0f32
PC
123592013-08-05 Paolo Carlini <paolo.carlini@oracle.com>
12360
12361 PR c++/58080
12362 * c-common.c (pointer_int_sum): Add bool parameter.
12363 * c-common.h (pointer_int_sum): Adjust declaration.
12364
e0aec1e9
GDR
123652013-08-05 Gabriel Dos Reis <gdr@integrable-solutions.net>
12366
12367 * c-pretty-print.c (print_c_tree): Simplify. Use non-static local
12368 c_pretty_printer variable.
12369
b066401f
GDR
123702013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
12371
12372 * c-pretty-print.h (c_pretty_printer): Derive from pretty_printer.
12373 (pp_base): Remove.
12374 (pp_c_base): Likewise. Adjust users.
12375 * c-pretty-print.c (pp_c_maybe_whitespace): Adjust.
12376 (pp_c_whitespace): Do not call pp_base.
12377 (pp_c_left_paren): Likewise.
12378 (pp_c_right_paren): Likewise.
12379 (pp_c_left_brace): Likewise.
12380 (pp_c_right_brace): Likewise.
12381 (pp_c_left_bracket): Likewise.
12382 (pp_c_right_bracket): Likewise.
12383 (pp_c_dot): Likewise.
12384 (pp_c_ampersand): Likewise.
12385 (pp_c_star): Likewise.
12386 (pp_c_arrow): Likewise.
12387 (pp_c_semicolon): Likewise.
12388 (pp_c_complement): Likewise.
12389 (pp_c_exclamation): Likewise.
12390 (pp_c_direct_declarator): Likewise.
12391 (pp_c_ws_string): Likewise.
12392 (pp_c_identifier): Likewise.
12393 (pp_c_statement): Likewise.
12394 (print_c_tree): Likewise.
12395
65e5a578
ESR
123962013-08-04 Ed Smith-Rowland <3dw4rd@verizon.net>
12397
12398 PR c++/58072
12399 * c-common.c (c_parse_error): Catch user-defined literal tokens and
12400 provide useful error strings.
12401
137a1a27
GDR
124022013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
12403
12404 * c-ada-spec.c (pp_ada_tree_identifier): Use specialized pretty
12405 printer functions instead of pp_string or operators and punctuators.
12406 (dump_generic_ada_node): Likewise.
12407 * c-pretty-print.c (pp_c_type_specifier): Likewise.
12408 (pp_c_relational_expression): Likewise.
12409 (pp_c_logical_or_expression): Likewise.
12410
07838b13
GDR
124112013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
12412
12413 * c-ada-spec.c (print_ada_macros): Use specialized pretty printer
12414 functions instead of pp_character.
12415 (pp_ada_tree_identifier): Likewise.
12416 (dump_ada_double_name): Likewise.
12417 (dump_ada_function_declaration): Likewise.
12418 (dump_ada_array_domains): Likewise.
12419 (dump_template_types): Likewise.
12420 (dump_generic_ada_node): Likewise.
12421 (print_ada_declaration): Likewise.
12422 (print_ada_struct_decl): Likewise.
12423 * c-pretty-print.c (pp_c_integer_constant): Likewise.
12424
433cc7b0
TT
124252013-07-23 Tom Tromey <tromey@redhat.com>
12426
12427 * c-common.h (enum rid) <RID_GENERIC>: New constant.
12428 * c-common.c (c_common_reswords): Add _Generic.
12429
688010ba
OB
124302013-07-21 OndÅ\99ej Bílka <neleai@seznam.cz>
12431
12432 * c-common.c: Fix typos.
12433 * c-common.h: Likewise.
12434
2a99e5e6
LL
124352013-07-13 Lubos Lunak <l.lunak@suse.cz>
12436
12437 PR c++/55203
12438 * c-common.c (c_common_attribute_table): Add warn_unused.
12439 (handle_warn_unused_attribute): New.
12440
c26302d5
JJ
124412013-07-10 Jakub Jelinek <jakub@redhat.com>
12442
12443 * c-ppoutput.c (scan_translation_unit): Call account_for_newlines
12444 for all CPP_TOKEN_FLD_STR tokens, not just CPP_COMMENT.
12445
dfeadaa0
PC
124462013-07-10 Paolo Carlini <paolo.carlini@oracle.com>
12447
12448 PR c++/57869
12449 * c.opt: Add Wconditionally-supported.
12450
6a2fa4b2
GS
124512013-07-08 Graham Stott <graham.stott@btinternet.com>
12452
adfac8df 12453 * array-notation-common.c (length_mismatch_in_expr_p): Delete
6a2fa4b2
GS
12454 unused variables l_length and l_node.
12455
ecdbd01a 124562013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
12457
12458 PR c/57821
12459 * c-common.c (complete_array_type): Delay folding first index
12460 like other indices. When folding, check for index overflow.
12461
bedc293e
MG
124622013-06-27 Marc Glisse <marc.glisse@inria.fr>
12463
12464 PR c++/57509
12465 * c-common.h (c_build_vec_perm_expr): New complain argument.
12466 * c-common.c (c_build_vec_perm_expr): Likewise.
12467 Use save_expr also in C++.
12468
604b2bfc
GDR
124692013-06-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
12470
12471 * c-common.c (c_common_nodes_and_builtins): Use cxx11 in lieu of cxx0x.
12472 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
12473 * c-opts.c (c_common_post_options): Likewise.
12474
dfeadaa0 124752013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
713b46fa
BI
12476
12477 * array-notation-common.c (length_mismatch_in_expr): Changed the
12478 parameter type's from a dynamic array to a vec_tree. Also removed
12479 the size parameters.
12480 * c-common.h (length_mismatch_in_expr_p): Fixed prototype's as per
12481 the change above.
12482
2ce86d2e
BI
124832013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
12484
12485 * c-common.h (struct cilkplus_an_parts): New structure.
12486 (struct cilkplus_an_loop_parts): Likewise.
12487 (cilkplus_extract_an_triplets): New prototype.
12488 (fix_sec_implicit_args): Likewise.
12489 * array-notation-common.c (cilkplus_extract_an_triplets): New function.
12490 (fix_sec_implicit_args): Likewise.
604b2bfc 12491
07a6825b
BI
124922013-06-20 Balaji V. Iyer <balaji.v.iyer@intel.com>
12493
12494 * array-notation-common.c (find_inv_trees): Removed an unwanted
12495 typecasting.
12496 * c-common.h (struct inv_list::additional_tcodes): Changed type from
12497 enum rid to enum tree_code.
12498
08346abd
JH
124992013-06-11 Jan Hubicka <jh@suse.cz>
12500
12501 * c-common.c (handle_alias_ifunc_attribute): Do not set
12502 DECL_EXTERNAL for weakref variables.
12503 * c-pragma.c (handle_pragma_weak): Make sure aliases
12504 are not declared as external.
12505
d60f1706
BI
125062013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
12507
12508 * array-notation-common.c (length_mismatch_in_expr_p): Moved this
12509 function from c/c-array-notation.c.
12510 (is_cilkplus_reduce_builtin): Likewise.
12511 (find_rank): Likewise.
12512 (extract_array_notation_exprs): Likewise.
12513 (replace_array_notations): Likewise.
12514 (find_inv_trees): Likewise.
12515 (replace_inv_trees): Likewise.
12516 (contains_array_notation_expr): Likewise.
12517 (find_correct_array_notation_type): Likewise.
12518 * c-common.h (struct inv_list): Moved this struct from the file
12519 c/c-array-notation.c and added a new field called additional tcodes.
12520 (length_mismatch_in_expr_p): New prototype.
12521 (is_cilkplus_reduce_builtin): Likewise.
12522 (find_rank): Likewise.
12523 (extract_array_notation_exprs): Likewise.
12524 (replace_array_notation): Likewise.
12525 (find_inv_trees): Likewise.
12526 (replace_inv_trees): Likewise.
12527 (find_correct_array_notation_type): Likewise.
dfeadaa0 12528
36536d79
BI
125292013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
12530
12531 * c-common.c (c_define_builtins): When cilkplus is enabled, the
12532 function array_notation_init_builtins is called.
12533 (c_common_init_ts): Added ARRAY_NOTATION_REF as typed.
12534 * c-common.def (ARRAY_NOTATION_REF): New tree.
12535 * c-common.h (build_array_notation_expr): New function declaration.
12536 (build_array_notation_ref): Likewise.
12537 (extract_sec_implicit_index_arg): New extern declaration.
12538 (is_sec_implicit_index_fn): Likewise.
12539 (ARRAY_NOTATION_CHECK): New define.
12540 (ARRAY_NOTATION_ARRAY): Likewise.
12541 (ARRAY_NOTATION_START): Likewise.
12542 (ARRAY_NOTATION_LENGTH): Likewise.
12543 (ARRAY_NOTATION_STRIDE): Likewise.
12544 * c-pretty-print.c (pp_c_postifix_expression): Added a new case for
12545 ARRAY_NOTATION_REF.
12546 (pp_c_expression): Likewise.
12547 * c.opt (flag_enable_cilkplus): New flag.
12548 * array-notation-common.c: New file.
12549
f7716d57
JJ
125502013-05-14 Jakub Jelinek <jakub@redhat.com>
12551
12552 PR c++/57274
12553 * c-common.c (verify_tree): Don't recurse into SIZEOF_EXPR.
12554
a5e0cd1d
MG
125552013-05-10 Marc Glisse <marc.glisse@inria.fr>
12556
12557 * c-common.c (vector_types_convertible_p): No TYPE_PRECISION for
12558 vectors.
12559
f6bc1c4a
HS
125602013-05-07 Han Shen <shenhan@google.com>
12561
12562 * c-cppbuiltin.c (c_cpp_builtins): Added "__SSP_STRONG__=3".
12563
3f12f6e9
SKS
125642013-04-29 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
12565
12566 * c-common.c (check_user_alignment): Emit error for negative values.
12567
61949153
PC
125682013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
12569
12570 * c-opts.c (set_std_cxx11): Use CLK_CXX1Y and CLK_GNUCXX1Y.
12571
e93e18e9
PC
125722013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
12573
12574 * c-cppbuiltin.c (c_cpp_builtins): Do not define
12575 __GXX_EXPERIMENTAL_CXX1Y__.
12576
44d90fe1 125772013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
8e745a17 12578 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
44d90fe1
PC
12579
12580 * c.opt ([Wpointer-arith]): Enabled by -Wpedantic, as documented.
12581 * c-common.c (pointer_int_sum): Change -Wpointer-arith pedwarns
12582 to simply use OPT_Wpointer_arith.
12583 (c_sizeof_or_alignof_type): Likewise.
12584
13f39b2e
PC
125852013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
12586
12587 * c-cppbuiltin.c (c_cpp_builtins): Define __GXX_EXPERIMENTAL_CXX1Y__.
12588
4b84d650
JJ
125892013-04-12 Jakub Jelinek <jakub@redhat.com>
12590
12591 * c-format.c (gcc_diag_char_table, gcc_tdiag_char_table,
12592 gcc_cdiag_char_table, gcc_cxxdiag_char_table): Add %r and %R format
12593 specifiers.
12594
fb037b5d
SB
125952013-04-07 Steven Bosscher <steven@gcc.gnu.org>
12596
12597 * c-pragma.c (add_to_renaming_pragma_list): Fix leading comment.
12598
4e856798
PC
125992013-04-03 Paolo Carlini <paolo.carlini@oracle.com>
12600
12601 * c-common.c (pointer_int_sum): Remove dead code.
12602
4b1baac8
RS
126032013-03-09 Richard Sandiford <rdsandiford@googlemail.com>
12604
12605 PR middle-end/56524
12606 * c-common.c (handle_optimize_attribute): Don't call
12607 save_optabs_if_changed.
12608
0b50e654
JJ
126092013-03-05 Jakub Jelinek <jakub@redhat.com>
12610
12611 PR middle-end/56461
12612 * c-pch.c (pch_init): Free target_validity at the end.
12613
48c41403
JJ
126142013-03-04 Jakub Jelinek <jakub@redhat.com>
12615
12616 * c-pretty-print.c (pp_c_pretty_printer_init): Clear pp->flags.
12617
e664c61c
KS
126182013-02-28 Konstantin Serebryany <konstantin.s.serebryany@gmail.com>
12619 Jakub Jelinek <jakub@redhat.com>
12620
12621 PR sanitizer/56454
12622 * c-common.c (handle_no_sanitize_address_attribute): New function.
12623 (c_common_attribute_table): Add no_sanitize_address attribute.
12624 (handle_no_address_safety_analysis_attribute): Add
12625 no_sanitize_address attribute, not no_address_safety_analysis
12626 attribute.
12627
a475fd3d 126282013-02-18 Aldy Hernandez <aldyh@redhat.com>
135204dd
AH
12629
12630 PR target/52555
12631 * c-common.c (handle_optimize_attribute): Call
12632 save_optabs_if_changed.
12633
f6007d99
JJ
126342013-02-18 Jakub Jelinek <jakub@redhat.com>
12635 Steven Bosscher <steven@gcc.gnu.org>
12636
12637 PR pch/54117
12638 * c-opts.c (c_common_post_options): If debug info is enabled
12639 and non-dwarf*, refuse to load PCH files and when writing PCH
12640 file warn.
12641
cf35e2b1
JJ
126422013-02-05 Jakub Jelinek <jakub@redhat.com>
12643
12644 PR middle-end/56167
12645 * c-common.c (handle_error_attribute): Fix condition.
12646
32887460
JJ
126472013-01-30 Jakub Jelinek <jakub@redhat.com>
12648
12649 PR c++/55742
12650 * c-common.c (handle_target_attribute): Revert 2012-12-26 change.
12651
5af057d8
JM
126522013-01-18 Jason Merrill <jason@redhat.com>
12653
12654 PR target/54908
12655 * c.opt (-fextern-tls-init): New.
12656 * c-opts.c (c_common_post_options): Handle it.
12657
cc83c823
JJ
126582013-01-09 Jakub Jelinek <jakub@redhat.com>
12659
12660 PR c/48418
12661 * c-common.c (c_fully_fold_internal): Warn for LSHIFT_EXPR and
12662 RSHIFT_EXPR, if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST
12663 and is either negative or bigger or equal to type precision
12664 of the first operand.
12665
a859517f
MP
126662012-12-03 Marek Polacek <polacek@redhat.com>
12667
12668 PR c/55570
12669 * c-common.c (check_user_alignment): Swap order of tests,
12670 check TREE_CODE first.
12671
2d7aa578
ESR
126722012-11-29 Ed Smith-Rowland <3dw4rd@verizon.net>
12673
12674 PR c++/52654
12675 * c-common.h (overflow_type): New enum.
12676 (build_userdef_literal): Add overflow_type argument.
12677 (tree_userdef_literal): Add overflow_type.
12678 (USERDEF_LITERAL_OVERFLOW): New access macro.
12679 * c-common.c (build_userdef_literal): Add overflow_type
12680 argument.
12681 * c-lex.c (c_lex_with_flags): Add overflow_type to
12682 build_userdef_literal calls.
12683 (interpret_integer, interpret_float): Add overflow_type argument.
12684
cc3c4f62
RB
126852012-11-28 Richard Biener <rguenther@suse.de>
12686
12687 PR c/35634
12688 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
12689 here and use a type with proper overflow behavior for types that would
12690 need to be promoted for the arithmetic.
12691
77bc5132
JJ
126922012-11-23 Jakub Jelinek <jakub@redhat.com>
12693
12694 PR sanitizer/55435
12695 * c-common.c (handle_no_address_safety_analysis_attribute): New
12696 function.
12697 (c_common_attribute_table): Add no_address_safety_analysis.
12698
5dc99c46
SB
126992012-11-16 Simon Baldwin <simonb@google.com>
12700
12701 * c.opt: Add f[no-]canonical-system-headers.
12702 * c-opts.c (c_common_handle_option): Handle
12703 OPT_fcanonical_system_headers.
12704
a4a0016d
ESR
127052012-11-09 Ed Smith-Rowland <3dw4rd@verizon.net>
12706
12707 PR c++/54413
12708 * c-opts.c (c_common_handle_option): Set new flags.
12709 * c.opt: Describe new flags.
12710
7dbb85a7
JM
127112012-11-09 Jason Merrill <jason@redhat.com>
12712
12713 * c.opt (Wabi-tag): New.
12714
ad7bac31
AK
127152012-11-09 Andi Kleen <ak@linux.intel.com>
12716
12717 PR 55139
12718 * c-common.c (get_atomic_generic_size): Mask with
8e745a17 12719 MEMMODEL_MASK
ad7bac31 12720
7332899a
MLI
127212012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
12722
12723 PR c/53063
12724 * c.opt (Wformat): Make it Alias Wformat=1.
12725 (Wformat-contains-nul,Wformat-extra-args,Wformat-nonliteral,
12726 Wformat-security,Wformat-y2k,Wformat-zero-length): Use
12727 LangEnabledBy.
12728 (Wformat=): RejectNegative. Use LangEnabledBy.
12729 (Wnonnull): Use LangEnabledBy.
12730 * c-opts.c (c_common_handle_option): Do not handle Wformat here.
12731 * c-format.c (set_Wformat): Delete.
12732 (decode_format_attr): Replace OPT_Wformat with OPT_Wformat_.
ab20d992
JJ
12733 (maybe_read_dollar_number): Likewise.
12734 (avoid_dollar_number): Likewise.
12735 (finish_dollar_format_checking): Likewise.
12736 (check_format_info): Likewise.
12737 (check_format_info_main): Likewise.
12738 (check_format_types): Likewise.
12739 (format_type_warning): Likewise.
12740 * c-common.c (int): Likewise.
12741 (check_function_sentinel): Likewise.
8e745a17 12742 * c-common.h (warn_format,set_Wformat): Do not declare here.
7332899a 12743
34a180a6
MLI
127442012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
12745
12746 PR c/53063
12747 * c.opt(Warray-bounds,Wdelete-non-virtual-dtor,Wenum-compare,
12748 Wmain,Woverlength-strings, Wunknown-pragmas,Wunused-macros):
12749 Use LangEnabledBy.
12750 (Wswitch,Wswitch-default,Wswitch-enum): Likewise. Move here from
12751 common.opt.
12752 (Wvariadic-macros): Init(1).
12753 * c-opts.c (c_common_handle_option): Do not handle them
12754 explicitly.
12755 (c_common_post_options): Likewise.
12756 (sanitize_cpp_opts): warn_unused_macros is now
12757 cpp_warn_unused_macros.
12758 (push_command_line_include): Likewise.
12759 * c-common.c (warn_unknown_pragmas): Do not define.
12760 * c-common.h (warn_unknown_pragmas): Do not declare.
12761
3f46d6a5
MLI
127622012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
12763
12764 PR c/51294
12765 * c-common.c (conversion_warning): Handle conditional expressions.
12766
880661a4
JW
127672012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
12768
12769 PR c++/54930
12770 * c.opt (Wreturn_local_addr): Define new option.
12771
4514a96b
JM
127722012-10-25 Jason Merrill <jason@redhat.com>
12773
f14edc1a
JM
12774 * c.opt (Wvirtual-move-assign): New.
12775
4514a96b
JM
12776 * c.opt (Winherited-variadic-ctor): New.
12777
93100c6b
MG
127782012-10-25 Marc Glisse <marc.glisse@inria.fr>
12779
12780 PR c++/54427
12781 * c-common.c (scalar_to_vector): Handle VEC_COND_EXPR.
12782
1efcb8c6
JM
127832012-10-23 Joseph Myers <joseph@codesourcery.com>
12784
12785 * c-common.h (pch_cpp_save_state): Declare.
12786 * c-target.def (c_preinclude): New hook.
12787 * c-opts.c (done_preinclude): New.
12788 (push_command_line_include): Handle default preincluded header.
12789 (cb_file_change): Call pch_cpp_save_state when calling
12790 push_command_line_include.
12791 * c-pch.c (pch_ready_to_save_cpp_state, pch_cpp_state_saved)
12792 (pch_cpp_save_state): New.
12793 (pch_init): Call pch_cpp_save_state conditionally, instead of
12794 calling cpp_save_state.
12795
4a0ae68e
MLI
127962012-10-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
12797
12798 PR c/53063
12799 PR c/40989
12800 * c.opt (Waddress,Wchar-subscripts,Wsign-conversion,Wimplicit,
12801 Wimplicit-function-declaration,Wimplicit-int,Wsizeof-pointer-memaccess,
12802 Wnarrowing,Wparentheses,Wpointer-sign,Wreturn-type,Wsequence-point,
12803 Wsign-compare,Wuninitialized,Wmaybe-uninitialized,Wunused,
12804 Wvolatile-register-var): Add LangEnabledBy or EnabledBy.
12805 * c-opts.c (c_common_handle_option): Remove explicit handling from
12806 here.
12807 (c_common_post_options): Likewise.
12808
67e4210b
EB
128092012-10-18 Eric Botcazou <ebotcazou@adacore.com>
12810
12811 * c-ada-spec.c (LOCATION_COL): Delete.
12812 (compare_location): New function.
12813 (compare_node): Use it.
12814 (compare_comment): Likewise.
12815
65d4f2cd
MLI
128162012-10-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
12817
12818 PR c/53063
12819 PR c/40989
12820 * c.opt (Wstrict-aliasing=,Wstrict-overflow=): Use LangEnabledBy.
12821 * c-opts.c (c_common_handle_option): Do not set them here. Add
12822 comment.
12823 (c_common_post_options): Likewise.
12824
909881cb
EB
128252012-10-16 Eric Botcazou <ebotcazou@adacore.com>
12826
12827 * c-ada-spec.c (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Define.
12828 (dump_generic_ada_node) <INTEGER_CST>: Deal with sizetype specially.
12829 Remove POINTER_TYPE handling, add large unsigned handling and use
12830 ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX for big numbers.
12831
3a785c97
JJ
128322012-10-12 Jakub Jelinek <jakub@redhat.com>
12833
12834 PR c/54381
12835 * c-common.h (sizeof_pointer_memaccess_warning): Adjust prototype.
12836 * c-common.c (sizeof_pointer_memaccess_warning): Take array of 3
12837 locs and array of 3 trees instead of just single loc and single
12838 sizeof_arg tree. Handle __builtin___*_chk builtins too, and
12839 also stpncpy, bcopy, bcmp, bzero, snprintf and vsnprintf builtins.
12840 For *cmp* builtins that take two sources strings report warnings
12841 about first and second source, not about destination and source.
12842
5e54f81d
MG
128432012-10-12 Marc Glisse <marc.glisse@inria.fr>
12844
12845 PR c++/53055
12846 * c-common.h (enum ref_operator) [RO_ARROW_STAR]: New.
12847
f5b02f1e
EB
128482012-10-11 Eric Botcazou <ebotcazou@adacore.com>
12849
12850 * c-ada-spec.c (dump_ada_template): Bail out for template declarations
12851 declaring something coming from another file.
12852
b46dbc6c
AC
128532012-10-10 Arnaud Charlet <charlet@adacore.com>
12854
f5b02f1e 12855 PR ada/54845
b46dbc6c
AC
12856 * c-ada-spec.c (print_ada_struct_decl): Increase buf size.
12857
5d9de0d0
PC
128582012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
12859
12860 PR c++/54194
12861 * c-common.c (warn_about_parentheses): Add location_t parameter;
12862 use EXPR_LOC_OR_LOC.
12863 * c-common.h: Update declaration.
12864
a212e43f
MG
128652012-10-09 Marc Glisse <marc.glisse@inria.fr>
12866
12867 PR c++/54427
12868 * c-common.c (scalar_to_vector): Moved from c-typeck.c. Support
12869 more operations. Make error messages optional.
12870 * c-common.h (enum stv_conv): Moved from c-typeck.c.
12871 (scalar_to_vector): Declare.
12872
b1db7f91
JM
128732012-10-08 Jason Merrill <jason@redhat.com>
12874
12875 * c-common.c (c_common_reswords): Add thread_local.
12876
e28d52cf
DS
128772012-10-08 Dodji Seketeli <dodji@redhat.com>
12878
12879 PR c++/53528 C++11 attribute support
12880 * c-common.h (bitfield_p, cxx_fundamental_alignment_p): Declare
12881 new functions.
12882 * c-common.c (check_cxx_fundamental_alignment_constraints): New
12883 static function.
12884 (handle_aligned_attribute): In choose strictest alignment
12885 among many. Use new check_cxx_fundamental_alignment_constraints.
12886 (handle_transparent_union_attribute): In c++11 attribute syntax,
12887 don't look through typedefs.
12888
3b78de56
AC
128892012-10-04 Arnaud Charlet <charlet@adacore.com>
12890
12891 * c-ada-spec.c (print_ada_declaration): Remove handling of TDF_RAW.
12892 * c.opt (-fdump-ada-spec, -fdump-ada-spec-slim): Move switch definition
12893 out of dumpfile.h.
12894
6040bb5f
DC
128952012-09-25 Dehao Chen <dehao@google.com>
12896
12897 PR middle-end/54645
3b78de56 12898 * c-pch.c (c_common_read_pch): Rebuild the location_adhoc_data
6040bb5f
DC
12899 map when read in the pch.
12900
3f8257db 129012012-09-18 Arnaud Charlet <charlet@adacore.com>
0b07a57e
AC
12902
12903 * c-ada-spec.c: Style fixes.
12904
3f8257db 129052012-09-18 Thomas Quinot <quinot@adacore.com>
da5182be
TQ
12906
12907 * c.opt (-fada-spec-parent): Define new command line switch.
12908 * c-ada-spec.c (get_ada_package): When -fada-spec-parent
12909 is specified, generate binding spec as a child of the specified unit.
12910
0ccb505d
PC
129112012-09-13 Paolo Carlini <paolo.carlini@oracle.com>
12912 Manuel López-Ibáñez <manu@gcc.gnu.org>
12913
12914 PR c++/53210
12915 * c.opt ([Winit-self]): Enabled by -Wall in C++.
12916
c583af79
AC
129172012-08-23 Arnaud Charlet <charlet@adacore.com>
12918
12919 * c-ada-spec.c (dump_generic_ada_node): Fix handling of name_only
12920 for pointers, and add missing Convention C pragma.
12921 (print_ada_struct_decl): Add missing aliased keyword.
12922 (dump_ads): Add pragma Ada_2005 and Style_Checks (Off).
12923
1a4049e7
JJ
129242012-08-17 Jakub Jelinek <jakub@redhat.com>
12925
12926 * c-common.c (sizeof_pointer_memaccess_warning): New function.
12927 * c.opt (-Wsizeof-pointer-memaccess): Add new option.
12928 * c-opts.c (c_common_handle_option): Enable it for -Wall.
12929 * c-common.h (sizeof_pointer_memaccess_warning): Add prototype.
12930 * c-common.def (SIZEOF_EXPR): Moved here from cp-tree.def.
12931
70b5e7dc
RG
129322012-08-10 Richard Guenther <rguenther@suse.de>
12933
12934 * c-pretty-print.c (pp_c_expression): Handle anonymous SSA names.
12935
f8923f7e
SB
129362012-08-07 Steven Bosscher <steven@gcc.gnu.org>
12937
12938 * c-pretty-print.c (pp_c_function_definition): Use pp_newline_and_flush
12939 instead of separate pp_newline and pp_flush.
12940 (print_c_tree): Likewise.
12941
e45abe1f
RH
129422012-07-26 Richard Henderson <rth@redhat.com>
12943
12944 * c-common.c (handle_hot_attribute): Allow labels.
12945 (handle_cold_attribute): Likewise.
12946
332f1d24
JJ
129472012-07-20 Jakub Jelinek <jakub@redhat.com>
12948
12949 PR c++/28656
12950 * c-common.c (check_function_nonnull): Handle multiple nonnull
12951 attributes properly.
12952
7ee2468b
SB
129532012-07-16 Steven Bosscher <steven@gcc.gnu.org>
12954
12955 * c-gimplify.c: Include dumpfile.h instead of tree-dump.h.
12956 * c-ada-spec.c: Likewise.
12957 * c-dump.c (dump_stmt): Move to cp/dump.c, the only user.
12958
ee7b28eb
SB
129592012-07-14 Steven Bosscher <steven@gcc.gnu.org>
12960
12961 * c-pch.c (CHECK_NO_ASM_OUT_DURING_PCH): Do not define.
12962 Remove code conditional on it.
12963
6bdf3519
SB
129642012-07-11 Steven Bosscher <steven@gcc.gnu.org>
12965
12966 * c-gimplify.c: Do not include basic-block.h.
12967 * c-common.c: Do not include linfuncs.h.
12968
532aafad
SB
129692012-07-08 Steven Bosscher <steven@gcc.gnu.org>
12970
12971 * c-common.h: Include tree.h.
12972
8d0d1915
JM
129732012-07-02 Jason Merrill <jason@redhat.com>
12974
12975 PR c++/53524
12976 * c-common.c (get_priority): Call default_conversion.
12977
fbc873ad
UB
129782012-07-01 Uros Bizjak <ubizjak@gmail.com>
12979
12980 * c-pch.c (c_common_write_pch): Remove unused variables.
12981
d4a10d0a
SB
129822012-06-29 Steven Bosscher <steven@gcc.gnu.org>
12983
12984 * cppspec.c: Moved from gcc/ to here.
12985
6f3a2e23
KT
129862012-06-27 Kai Tietz <ktietz@redhat.com>
12987
12988 PR preprocessor/37215
12989 * c-ppoutput.c (preprocess_file): Check for nonempty buffer.
12990
8ca92d04
SB
129912012-06-21 Steven Bosscher <steven@gcc.gnu.org>
12992
12993 * c-common.h (c_common_print_pch_checksum): Remove.
12994 * c-pch.c: Do not include output.h.
12995 (CHECK_NO_ASM_OUT_DURING_PCH): Define and add FIXME.
12996 (asm_out_file): Define iff CHECK_NO_ASM_OUT_DURING_PCH isdefined.
12997 (asm_file_startpos): Define iff CHECK_NO_ASM_OUT_DURING_PCH is defined.
12998 (struct c_pch_header): Remove.
12999 (get_ident): Update gpch version.
13000 (pch_init): Do not print executable_checksum to asm_out_file.
13001 Do not fail if there is no asm_out_file to read back from. Set
13002 asm_file_startpos only if CHECK_NO_ASM_OUT_DURING_PCH is defined.
13003 (c_common_write_pch): Verify that nothing was written to asm_out_file
13004 since pch_init was called. Do not write a c_pch_header, and do not
13005 copy from asm_out_file to the PCH.
13006 (c_common_read_pch): Do not read a c_pch_header, and do not restore
13007 the content of asm_out_file from the PCH.
13008 (c_common_print_pch_checksum): Remove.
13009 * c-opts.c (c_common_init): Print out executable_checksum directly.
13010
70f42967
SB
130112012-06-19 Steven Bosscher <steven@gcc.gnu.org>
13012
13013 * c-target.def (objc_declare_unresolved_class_reference,
13014 objc_declare_class_definition): Add new hooks.
13015
a8781821
SB
130162012-06-19 Steven Bosscher <steven@gcc.gnu.org>
13017
13018 * c-lex.c: Do not include output.h.
13019 (cb_ident): Try to put out .ident with targetm.asm_out.output_ident.
13020 Remove uses of ASM_OUTPUT_IDENT.
13021
9e1a8dd1
RR
130222012-06-15 Marc Glisse <marc.glisse@inria.fr>
13023
13024 PR c++/51033
13025 * c-common.h (c_build_vec_perm_expr): Move decl here.
13026 * c-common.c (c_build_vec_perm_expr): Move definition
13027 here.
13028
6f07a821
SB
130292012-06-06 Steven Bosscher <steven@gcc.gnu.org>
13030
13031 * c.opt (fconserve-space): Turn into a no-op.
13032
9faeb493 130332012-06-04 Sterling Augustine <saugustine@google.com>
c265f413
SA
13034
13035 * c-pretty-print.h (pp_c_flag_gnu_v3): New enumerator.
13036 * c-pretty-print.c (pp_c_specifier_qualifier_list): Check it at
13037 both the start and end of the function.
13038
a4b7d13c
SB
130392012-06-04 Steven Bosscher <steven@gcc.gnu.org>
13040
13041 * c-common.c: Do not include output.h.
13042 * c-pragma.c: Likewise.
13043
c265f413
SA
130442012-06-04 Steven Bosscher <steven@gcc.gnu.org>
13045
13046 * error.c (dump_decl): Check pp_c_flag_gnu_v3.
13047 (decl_as_dwarf_string, lang_decl_dwarf_name): New functions.
13048 (lang_decl_name): Handle namespace decls.
13049
be7a421e
SB
130502012-05-31 Steven Bosscher <steven@gcc.gnu.org>
13051
13052 * c-ada-spec.c: Do not include output.h.
13053 * c-semantics.c: Likewise.
13054
65de6659
JM
130552012-05-29 Joseph Myers <joseph@codesourcery.com>
13056
13057 * c-common.c: Fix typo.
13058
ca5f4331
MM
130592012-05-29 Michael Matz <matz@suse.de>
13060
13061 * c-common.h (c_expand_decl): Remove prototype.
13062
4f7f7aca
MLI
130632012-05-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
13064
13065 * c.opt (Wmissing-braces): Use LangEnabledBy(C ObjC,Wall).
13066 * c-opts.c (c_common_handle_option): Remove code handling
13067 warn_missing_braces.
13068
4a792f9b
PC
130692012-05-28 Paolo Carlini <paolo.carlini@oracle.com>
13070
13071 PR c++/25137
13072 * c-opts.c (c_common_handle_option): For C++ -Wall doesn't enable
13073 -Wmissing_braces.
13074
650dc14a
DS
130752012-05-22 Dodji Seketeli <dodji@redhat.com>
13076
13077 PR c++/53322
13078 * c.opt (Wunused-local-typedefs): Use EnabledBy(Wunused).
13079
9b095bf1
MLI
130802012-05-17 Manuel López-Ibáñez <manu@gcc.gnu.org>
13081
13082 * c.opt (--pedantic-errors,-pedantic-errors): Do not handle here.
13083 * c-opts.c (c_common_handle_option): Do not handle explicitly
13084 Wreturn-type, Wwrite-strings, warn_ecpp, and -pedantic-errors.
13085
0b2c4be5
DS
130862012-05-16 Dodji Seketeli <dodji@redhat.com>
13087
13088 PR preprocessor/7263
ab20d992 13089 * c-lex.c (c_lex_with_flags): Pass a virtual location to the call
0b2c4be5
DS
13090 to cpp_classify_number. For diagnostics, use the precise location
13091 instead of the global input_location.
13092
a1bde5af
PC
130932012-05-15 Paolo Carlini <paolo.carlini@oracle.com>
13094
d02924ef 13095 PR c++/11856
a1bde5af
PC
13096 * c-common.c (shorten_compare): Check c_inhibit_evaluation_warnings.
13097
d1ede5f4
BS
130982012-05-14 Bernd Schmidt <bernds@codesourcery.com>
13099
a1bde5af 13100 * c-common.c (DEF_ATTR_STRING): Define and undefine as necessary.
d1ede5f4 13101
f2bc201f
MLI
131022012-05-14 Manuel López-Ibáñez <manu@gcc.gnu.org>
13103
13104 PR 53063
13105 * c.opt (Wc++0X-compat,Wdelete-non-virtual-dtor,Wjump-misses-init,
13106 Wreorder): Use LangEnabledBy.
13107 * c-opts.c (c_common_handle_option): Do not enable them
13108 explicitly. Call lang-specific generated functions.
13109 (c_common_post_options): Do not set them here.
13110
95744782
MLI
131112012-05-13 Manuel López-Ibáñez <manu@gcc.gnu.org>
13112
13113 * c.opt (Wclobbered,Wempty-body,Wignored-qualifiers,
13114 Wmissing-field-initializers,Wmissing-parameter-type,
13115 Wold-style-declaration,Woverride-init): Use EnabledBy.
13116 * c-opts.c (c_common_post_options): Do not set here explicitly.
13117
7d5a5747
MLI
131182012-05-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
13119
13120 PR 53063
13121 * c-opts.c (c_common_handle_option): Use handle_generated_option
13122 to enable sub-options.
13123
5a3c9cf2
PC
131242012-05-10 Paolo Carlini <paolo.carlini@oracle.com>
13125
13126 PR c++/53158
13127 * c-common.c (warnings_for_convert_and_check): Use warning_at.
13128
3ac8781c
RG
131292012-05-10 Richard Guenther <rguenther@suse.de>
13130
13131 * c-common.c (c_sizeof_or_alignof_type): Remove assert and
13132 adjust commentary about TYPE_IS_SIZETYPE types.
13133
1e537948
MLI
131342012-05-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
13135
13136 PR c++/53261
13137 * c-common.c (warn_logical_operator): Check that argument of
13138 integer_zerop is not NULL.
13139
f2c4a785
MLI
131402012-05-05 Manuel López-Ibáñez <manu@gcc.gnu.org>
13141
13142 PR c/43772
13143 * c-common.c (warn_logical_operator): Do not warn if either side
13144 is already true or false.
13145
50f305ca
MLI
131462012-05-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
13147
13148 PR c/51712
13149 * c-common.c (expr_original_type): New.
13150 (shorten_compare): Do not warn for enumeration types.
13151
0c3641b0
MLI
131522012-05-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
13153
13154 * c.opt (fpermissive): Add Var(flag_permissive).
13155
7edaa4d2
MG
131562012-04-30 Marc Glisse <marc.glisse@inria.fr>
13157
13158 PR c++/51033
13159 * c-common.c (convert_vector_to_pointer_for_subscript): New function.
13160 * c-common.h (convert_vector_to_pointer_for_subscript): Declare it.
13161
b9c8da34
DS
131622012-04-30 Dodji Seketeli <dodji@redhat.com>
13163
13164 Add -Wvarargs option
ab20d992 13165 * c.opt (Wvarargs): Define new option.
b9c8da34 13166
e6c69da0
MLI
131672012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
13168
13169 * c-common.c (check_function_arguments): Replace
13170 Wmissing-format-attribute with Wsuggest-attribute=format.
13171
90137d8f
MLI
131722012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
13173
13174 * c.opt (Wsuggest-attribute=format): New. Alias of
13175 Wmissing-format-attribute.
13176 * c-format.c (decode_format_type): Replace
13177 Wmissing-format-attribute with Wsuggest-attribute=format.
13178 (check_function_format): Likewise.
13179
9faeb493 131802012-04-27 Ollie Wild <aaw@google.com>
7f5f5f98
OW
13181
13182 * c-common.c: Add CPP_W_LITERAL_SUFFIX mapping.
13183 * c-opts.c (c_common_handle_option): Handle OPT_Wliteral_suffix.
13184 * c.opt: Add Wliteral-suffix.
13185
c1771a20
MLI
131862012-04-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
13187
13188 PR c/44774
13189 * c.opt (Wpedantic): New.
13190 (pedantic): Alias Wpedantic.
13191 * c-opts.c (c_common_handle_option): Replace -pedantic with -Wpedantic.
13192 (c_common_post_options): Likewise.
13193 (sanitize_cpp_opts): Likewise.
13194 * c-lex.c (interpret_float): Likewise.
13195 * c-format.c (check_format_types): Likewise.
13196 * c-common.c (pointer_int_sum): Likewise.
13197 (c_sizeof_or_alignof_type): Likewise.
13198 (c_add_case_label): Likewise.
13199 (c_do_switch_warnings): Likewise.
13200 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
13201
04b391c1
JM
132022012-04-15 Jason Merrill <jason@redhat.com>
13203
13204 PR c++/52818
13205 * c-format.c (CPLUSPLUS_STD_VER): C++11 inherits from C99.
13206 (C_STD_NAME): Distinguish between C++98 and C++11.
13207
ac868f29
EB
132082012-04-11 Eric Botcazou <ebotcazou@adacore.com>
13209
13210 PR target/52624
13211 * c-common.h (uint16_type_node): Rename into...
13212 (c_uint16_type_node): ...this.
13213 * c-common.c (c_common_nodes_and_builtins): Adjust for above renaming.
13214 * c-cppbuiltin.c (builtin_define_stdint_macros): Likewise.
13215
fd4116f4
MLI
132162012-04-10 Manuel López-Ibáñez <manu@gcc.gnu.org>
13217
13218 * c-common.c (warn_if_unused_value): Move definition to here.
13219 * c-common.h (warn_if_unused_value): Move declaration to here.
13220
573ac65e
WB
132212012-03-23 William Bader <williambader@hotmail.com>
13222
13223 * c-lex.c (c_lex_with_flags): Avoid declarations after stmts.
13224
552b8185
JM
132252012-03-20 Jason Merrill <jason@redhat.com>
13226
13227 * c-common.h (enum cxx_dialect): Add cxx1y.
13228 * c-common.c (c_common_nodes_and_builtins): Use >= for cxx_dialect
13229 test.
13230 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
13231 * c-opts.c (c_common_post_options): Likewise.
13232 (set_std_cxx1y): New.
13233 (c_common_handle_option): Call it.
13234 * c.opt (-std=c++1y, -std=gnu++1y): New flags.
13235
04398fa8
PC
132362012-03-19 Paolo Carlini <paolo.carlini@oracle.com>
13237
13238 PR c++/14710
13239 * c.opt ([Wuseless-cast]): Add.
13240
d2a12ae7
RG
132412012-03-16 Richard Guenther <rguenther@suse.de>
13242
13243 * c-pretty-print.c (pp_c_initializer_list): Adjust.
13244
a12bf402
MLI
132452012-03-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
13246
13247 PR c++/44783
13248 * c.opt (ftemplate-backtrace-limit) Add.
13249
5c30094f
RO
132502012-03-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
13251
13252 * c-cppbuiltin.c (c_cpp_builtins): Remove #pragma extern_prefix
13253 handling.
13254 * c-pragma.c (handle_pragma_extern_prefix): Remove.
13255 (init_pragma): Don't register extern_prefix.
13256
21fa2faf
RG
132572012-03-12 Richard Guenther <rguenther@suse.de>
13258
13259 * c-common.c (c_common_get_narrower): Use c_common_type_for_size.
13260 (builtin_type_for_size): Likewise.
13261
e3793c6f
JJ
132622012-02-13 Jakub Jelinek <jakub@redhat.com>
13263
13264 PR c++/52215
13265 * c-common.c (sync_resolve_params): Don't decide whether to convert
13266 or not based on TYPE_SIZE comparison, convert whenever arg_type
13267 is unsigned INTEGER_TYPE.
13268
93286335
PC
132692012-02-06 Paolo Carlini <paolo.carlini@oracle.com>
13270
13271 PR c/52118
13272 * c.opt ([Wunused-local-typedefs]): Fix description.
13273
7a421706
MS
132742012-01-24 Mike Stump <mikestump@comcast.net>
13275
13276 * c-common.c (c_common_type_for_mode): Match signed/unsigned types
13277 exactly.
13278
ba9b1f11
RG
132792012-01-18 Richard Guenther <rguenther@suse.de>
13280
13281 * c-opts.c (c_common_post_options): Reset LTO flags if
13282 we are about to generate a PCH.
13283
465406be
PC
132842012-01-17 Paolo Carlini <paolo.carlini@oracle.com>
13285
13286 PR c++/51777
13287 * c-pretty-print.c (pp_c_integer_constant): For unsigned constants
13288 use pp_unsigned_wide_integer.
13289
aee15221
RG
132902012-01-10 Richard Guenther <rguenther@suse.de>
13291
13292 PR middle-end/51806
13293 * c-opts.c (c_common_handle_option): Move -Werror handling
13294 to language independent code.
13295
5720c0dc
RG
132962012-01-05 Richard Guenther <rguenther@suse.de>
13297
13298 PR middle-end/51764
13299 * c.opt (Wmudflap, fmudflap, fmudflapth, fmudflapir): Move here
13300 from common.opt.
13301
73ac190a
PC
133022011-12-30 Paolo Carlini <paolo.carlini@oracle.com>
13303
13304 PR c++/51316
13305 * c-common.c (c_sizeof_or_alignof_type): In C++ allow for alignof
13306 of array types with an unknown bound.
13307
48b0b196
JM
133082011-12-20 Joseph Myers <joseph@codesourcery.com>
13309
13310 * c-common.c (flag_isoc99): Update comment to refer to C11.
13311 (flag_isoc1x): Change to flag_isoc11.
13312 * c-common.h (flag_isoc99): Update comment to refer to C11.
13313 (flag_isoc1x): Change to flag_isoc11.
13314 * c-cppbuiltin.c (cpp_atomic_builtins): Change comment to refer to
13315 C11.
13316 * c-opts.c (set_std_c1x): Change to set_std_c11.
13317 (c_common_handle_option): Handle OPT_std_c11 and OPT_std_gnu11.
13318 Call set_std_c11.
13319 (set_std_c89, set_std_c99, set_std_c11): Use flag_isoc11.
13320 (set_std_c1): Use CLK_STDC11 and CLK_GNUC11.
13321 * c.opt (std=c1x): Change to std=c11. Document as non-draft
13322 standard.
13323 (std=c1x, std=iso9899:2011): Add as aliases of std=c11.
13324 (std=gnu1x): Change to std=gnu11. Refer to non-draft standard.
13325 (std=gnu1x): Make alias of std=gnu11.
13326
d58d6eb5
JM
133272011-12-19 Jason Merrill <jason@redhat.com>
13328
13329 PR c++/51228
13330 * c-common.c (handle_transparent_union_attribute): Check the first
13331 field if the type is complete.
13332
b3908fcc
JW
133332011-12-15 Jonathan Wakely <jwakely.gcc@gmail.com>
13334
13335 PR libstdc++/51365
13336 * c-common.c (RID_IS_FINAL): Add.
13337 * c-common.h (RID_IS_FINAL): Add.
13338
fea3ca91
IS
133392011-11-30 Iain Sandoe <iains@gcc.gnu.org>
13340
13341 * c.opt (fgnu-runtime): Provide full description.
13342 (fnext-runtime): Likewise.
13343 * c-opts.c (OPT_fgnu_runtime, OPT_fnext_runtime) Remove.
13344
62bad7cd
AM
133452011-11-28 Andrew MacLeod <amacleod@redhat.com>
13346
13347 * c-cpp-builtin.c (cpp_atomic_builtins):New. Emit all atomic
13348 predefines in one place. Add LOCK_FREE predefines.
13349 (c_cpp_builtins): Move Legacy HAVE_SYNC predefines to
13350 new func.
13351
c466c4ff
AM
133522011-11-24 Andrew MacLeod <amacleod@redhat.com>
13353
13354 PR c/51256
9faeb493 13355 * c-common.c (get_atomic_generic_size): Check for various error
c466c4ff 13356 conditions
9faeb493
UB
13357 (resolve_overloaded_atomic_exchange,
13358 resolve_overloaded_atomic_compare_exchange,
c466c4ff
AM
13359 resolve_overloaded_atomic_load, resolve_overloaded_atomic_store): Return
13360 error_mark_node for error conditions.
9faeb493 13361
a5952633
RG
133622011-11-08 Richard Guenther <rguenther@suse.de>
13363
13364 PR middle-end/51010
ab20d992 13365 * c-pretty-print.c (pp_c_expression): Handle SSA_NAMEs.
a5952633 13366
0a35513e
AH
133672011-11-07 Richard Henderson <rth@redhat.com>
13368 Aldy Hernandez <aldyh@redhat.com>
13369 Torvald Riegel <triegel@redhat.com>
13370
13371 Merged from transactional-memory.
13372
13373 * c-common.c (handle_tm_wrap_attribute,
13374 handle_tm_attribute, ignore_attribute, parse_tm_stmt_attr): New.
13375 (struct c_common_reswords): Added __transaction* keywords.
13376 (struct c_common_attribute_table): Added transaction* and tm_regparm
13377 attributes.
13378 * c-common.h: Added RID_TRANSACTION*. Added TM_ATTR* and TM_STMT*
13379 masks.
13380 (parse_tm_stmt_attr, tm_attr_to_mask, tm_mask_to_attr,
13381 find_tm_attribute): Declare.
13382
6d87092d
JM
133832011-11-07 Jason Merrill <jason@redhat.com>
13384
13385 PR c++/35688
13386 * c-common.c, c-common.h: Revert yesterday's changes.
13387
8e7860a1
JM
133882011-11-06 Jason Merrill <jason@redhat.com>
13389
13390 PR c++/35688
13391 * c-common.c (decl_has_visibility_attr): Split out from...
13392 (c_determine_visibility): ...here.
13393 * c-common.h: Declare it.
13394
d19fa6b5
JM
133952011-11-06 Joseph Myers <joseph@codesourcery.com>
13396
13397 * c-common.c (c_common_reswords): Add _Alignas and _Alignof.
13398 (c_sizeof_or_alignof_type): Diagnose alignof applied to a function
13399 type.
13400 (check_user_alignment): New. Split out of
13401 handle_aligned_attribute. Disallow integer constants with
13402 noninteger types. Conditionally allow zero.
13403 (handle_aligned_attribute): Use check_user_alignment.
13404 * c-common.h (RID_ALIGNAS, check_user_alignment): New.
13405
86951993
AM
134062011-11-06 Andrew MacLeod <amacleod@redhat.com>
13407 Richard Henderson <rth@redhat.com>
13408
13409 Merged from cxx-mem-model.
13410
13411 * c-cppbuiltin.c (c_cpp_builtins): Test both atomic and sync patterns.
9faeb493 13412 * c-common.c (sync_resolve_params, sync_resolve_return): Only tweak
86951993
AM
13413 parameters that are the same type size.
13414 (get_atomic_generic_size): New. Find size of generic
13415 atomic function parameters and do typechecking.
13416 (add_atomic_size_parameter): New. Insert size into parameter list.
13417 (resolve_overloaded_atomic_exchange): Restructure __atomic_exchange to
13418 either __atomic_exchange_n or external library call.
9faeb493 13419 (resolve_overloaded_atomic_compare_exchange): Restructure
86951993 13420 __atomic_compare_exchange to either _n variant or external library call.
9faeb493 13421 (resolve_overloaded_atomic_load): Restructure __atomic_load to either
86951993
AM
13422 __atomic_load_n or an external library call.
13423 (resolve_overloaded_atomic_store): Restructure __atomic_store to either
13424 __atomic_store_n or an external library call.
13425 (resolve_overloaded_builtin): Handle new __atomic builtins.
13426
cf9e9959
EB
134272011-11-04 Eric Botcazou <ebotcazou@adacore.com>
13428
13429 PR c++/50608
13430 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Call fold_offsetof_1.
13431 (fold_offsetof_1): Make global. Remove STOP_REF argument and adjust.
13432 <INDIRECT_REF>: Return the argument.
13433 <ARRAY_REF>: Remove special code for negative offset.
13434 Call fold_build_pointer_plus instead of size_binop.
13435 (fold_offsetof): Remove STOP_REF argument and adjust.
13436 * c-common.h (fold_offsetof_1): Declare.
13437 (fold_offsetof): Remove STOP_REF argument.
13438
25339f10
JM
134392011-11-02 Paolo Carlini <paolo.carlini@oracle.com>
13440
13441 PR c++/50810
13442 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
13443 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
13444 Wnarrowing for C++0x and C++98.
13445 * c.opt ([Wnarrowing]): Update.
13446
89401152
PC
134472011-11-01 Paolo Carlini <paolo.carlini@oracle.com>
13448
13449 PR c++/44277
13450 * c.opt: Add Wzero-as-null-pointer-constant.
13451
97e3ad20
JM
134522011-10-31 Jason Merrill <jason@redhat.com>
13453
15694fdd
JM
13454 * c.opt (-fdeduce-init-list): Off by default.
13455
97e3ad20
JM
13456 PR c++/50920
13457 * c-common.h (cxx_dialect): Add cxx11 and cxx03.
13458 * c.opt: Add -std=c++11, -std=gnu++11, -std=gnu++03,
13459 and -Wc++11-compat.
13460 * c-opts.c (set_std_cxx11): Rename from set_std_cxx0x.
13461
fb9120e3
RAV
134622011-10-27 Roberto Agostino Vitillo <ravitillo@lbl.gov>
13463
13464 PR c++/30066
13465 * c.opt (fvisibility-inlines-hidden): Description change.
13466
3ce4f9e4
ESR
134672011-10-26 Ed Smith-Rowland <3dw4rd@verizon.net>
13468
13469 Implement C++11 user-defined literals.
13470 * c-common.c (build_userdef_literal): New.
13471 * c-common.def: New tree code.
13472 * c-common.h (tree_userdef_literal): New tree struct and accessors.
13473 * c-lex.c (interpret_float): Add suffix parm.
13474 (c_lex_with_flags): Build literal tokens.
13475
5f53c243
PC
134762011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
13477
13478 PR c++/50841
13479 Revert:
13480 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
13481
13482 PR c++/50810
13483 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
13484 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
13485 Wnarrowing for C++0x and C++98.
13486 * c.opt ([Wnarrowing]): Update.
13487
263734e1
PC
134882011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
13489
13490 PR c++/50810
13491 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
13492 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
13493 Wnarrowing for C++0x and C++98.
13494 * c.opt ([Wnarrowing]): Update.
13495
d2e312d7
PC
134962011-10-21 Paolo Carlini <paolo.carlini@oracle.com>
13497
13498 PR c++/45385
13499 * c-common.c (conversion_warning): Remove code looking for
13500 artificial operands.
13501
d17687f6
DS
135022011-10-18 Dodji Seketeli <dodji@redhat.com>
13503
13504 PR bootstrap/50760
13505 * c-lex.c (fe_file_change): Use LINEMAP_SYSP when
9faeb493 13506 !NO_IMPLICIT_EXTERN_C.
d17687f6 13507
fc8396e9
PC
135082011-10-17 Michael Spertus <mike_spertus@symantec.com>
13509
13510 * c-common.c (c_common_reswords): Add __bases,
13511 __direct_bases.
13512 * c-common.h: Add RID_BASES and RID_DIRECT_BASES.
13513
135142011-10-17 Paolo Carlini <paolo.carlini@oracle.com>
13515
13516 PR c++/50757
13517 * c.opt ([Wnonnull]): Add C++ and Objective-C++.
13518
847e697a
TT
135192011-10-15 Tom Tromey <tromey@redhat.com>
13520 Dodji Seketeli <dodji@redhat.com>
13521
13522 * c.opt (fdebug-cpp): New option.
13523 * c-opts.c (c_common_handle_option): Handle the option.
13524 * c-ppoutput.c (maybe_print_line_1): New static function. Takes an
13525 output stream in parameter. Factorized from ...
13526 (maybe_print_line): ... this. Dump location debug information when
13527 -fdebug-cpp is in effect.
13528 (print_line_1): New static function. Takes an output stream in
13529 parameter. Factorized from ...
13530 (print_line): ... here. Dump location information when -fdebug-cpp
13531 is in effect.
13532 (scan_translation_unit): Dump location information when
13533 -fdebug-cpp is in effect.
13534
92582b75
TT
135352011-10-15 Tom Tromey <tromey@redhat.com>
13536 Dodji Seketeli <dodji@redhat.com>
13537
13538 * c.opt (ftrack-macro-expansion): New option. Handle it with and
13539 without argument.
13540 * c-opts.c (c_common_handle_option)<case
13541 OPT_ftrack_macro_expansion_, case OPT_ftrack_macro_expansion>: New
13542 cases. Handle -ftrack-macro-expansion with and without argument.
13543
46427374
TT
135442011-10-15 Tom Tromey <tromey@redhat.com>
13545 Dodji Seketeli <dodji@redhat.com>
13546
13547 * c-ppoutput.c (scan_translation_unit, maybe_print_line)
13548 (print_line, cb_define, do_line_change): Adjust to avoid touching
13549 the internals of struct line_map. Use the public API instead.
13550 * c-pch.c (c_common_read_pch): Likewise.
13551 * c-lex.c (fe_file_change): Likewise.
13552
fc8396e9
PC
135532011-10-14 Paolo Carlini <paolo.carlini@oracle.com>
13554
13555 PR c++/17212
13556 * c.opt ([Wformat-zero-length]): Add C++ and Objective-C++.
13557
135582011-10-11 Paolo Carlini <paolo.carlini@oracle.com>
13559
13560 PR c++/33067
13561 * c-pretty-print.c (pp_c_floating_constant): Output
13562 max_digits10 (in the ISO C++ WG N1822 sense) decimal digits.
13563
e79983f4
MM
135642011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
13565
13566 * c-common.c (def_builtin_1): Delete old interface with two
13567 parallel arrays to hold standard builtin declarations, and replace
13568 it with a function based interface that can support creating
13569 builtins on the fly in the future. Change all uses, and poison
13570 the old names. Make sure 0 is not a legitimate builtin index.
13571 * c-omp.c (c_finish_omp_barrier): Ditto.
13572 (c_finish_omp_taskwait): Ditto.
13573 (c_finish_omp_flush): Ditto.
13574
6637388f
TG
135752011-10-11 Tristan Gingold <gingold@adacore.com>
13576
13577 * c.opt: (fallow-parameterless-variadic-functions): New.
13578
3797cb21
DS
135792011-09-08 Dodji Seketeli <dodji@redhat.com>
13580
13581 PR c++/33255 - Support -Wunused-local-typedefs warning
13582 * c-common.h (struct c_language_function::local_typedefs): New
13583 field.
9faeb493
UB
13584 (record_locally_defined_typedef, maybe_record_typedef_use)
13585 (maybe_warn_unused_local_typedefs): Declare new functions.
3797cb21 13586 * c-common.c (record_locally_defined_typedef)
9faeb493
UB
13587 (maybe_record_typedef_use)
13588 (maybe_warn_unused_local_typedefs): Define new functions.
3797cb21
DS
13589 * c.opt: Declare new -Wunused-local-typedefs flag.
13590
693ddb1b
EB
135912011-09-06 Eric Botcazou <ebotcazou@adacore.com>
13592
13593 PR middle-end/50266
13594 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Fold offsetof-like
13595 computations.
13596
830c740f
RG
135972011-09-05 Richard Guenther <rguenther@suse.de>
13598
13599 * c-common.c (complete_array_type): Use ssize_int (-1) instead
13600 of integer_minus_one_node for empty array upper bounds.
13601
892a371f
DS
136022011-08-28 Dodji Seketeli <dodji@redhat.com>
13603
13604 * c-pch.c (c_common_read_pch): Call linemap_add with LC_ENTER as
13605 it's the first time it's being called on this main TU.
13606
0e3fdb48
RB
136072011-08-24 Richard Guenther <rguenther@suse.de>
13608
13609 PR c/49396
13610 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Fix conditional.
13611
136122011-08-22 Gabriel Charette <gchare@google.com>
e3dfef44
GC
13613
13614 * c-opts.c (c_finish_options): Force BUILTINS_LOCATION for tokens
13615 defined in cpp_init_builtins and c_cpp_builtins.
13616
d4a83c10
JM
136172011-08-19 Joseph Myers <joseph@codesourcery.com>
13618
13619 * c-common.c (c_common_reswords): Add __builtin_complex.
13620 * c-common.h (RID_BUILTIN_COMPLEX): New.
13621
bbceee64
JM
136222011-08-18 Joseph Myers <joseph@codesourcery.com>
13623
13624 * c-common.c (c_common_reswords): Add _Noreturn.
13625 (keyword_is_function_specifier): Handle RID_NORETURN.
13626 * c-common.h (RID_NORETURN): New.
13627
3f8257db 136282011-08-10 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
0e3a99ae
AS
13629
13630 * c-common.c (unsafe_conversion_p): New function. Check if it is
13631 unsafe to convert an expression to the type.
13632 (conversion_warning): Adjust, use unsafe_conversion_p.
13633 * c-common.h (unsafe_conversion_p): New function declaration.
13634
20906c66
JJ
136352011-08-02 Jakub Jelinek <jakub@redhat.com>
13636
13637 * c-common.h (c_finish_omp_atomic): Adjust prototype.
13638 (c_finish_omp_taskyield): New prototype.
13639 * c-omp.c (c_finish_omp_atomic): Add OPCODE, V, LHS1 and RHS1
13640 arguments. Handle OMP_ATOMIC_READ, OMP_ATOMIC_CAPTURE_OLD and
13641 OMP_ATOMIC_CAPTURE_NEW in addition to OMP_ATOMIC. If LHS1
13642 or RHS1 have side-effects, evaluate those too in the right spot,
13643 if it is a decl and LHS is also a decl, error out if they
13644 aren't the same.
13645 (c_finish_omp_taskyield): New function.
13646 * c-cppbuiltin.c (c_cpp_builtins): Change _OPENMP to 201107.
13647 * c-pragma.c (omp_pragmas): Add taskyield.
13648 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKYIELD.
13649 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_FINAL and
13650 PRAGMA_OMP_CLAUSE_MERGEABLE.
13651
770e5a2e
DS
136522011-07-25 Dodji Seketeli <dodji@redhat.com>
13653
13654 * c-common.h (set_underlying_type): Remove parm name from
13655 declaration.
13656
1baae426
RG
136572011-07-25 Romain Geissler <romain.geissler@gmail.com>
13658
13659 * c-pretty-print.h: Search c-common.h in c-family.
9faeb493 13660
fcb21722
JM
136612011-07-22 Jason Merrill <jason@redhat.com>
13662
76f86d00
JM
13663 PR c++/49793
13664 * c.opt (Wnarrowing): New.
13665
3a636414
JM
13666 PR c++/30112
13667 * c-common.h: Declare c_linkage_bindings.
13668 * c-pragma.c (handle_pragma_redefine_extname): Use it.
13669
fcb21722
JM
13670 PR c++/49813
13671 * c-opts.c (set_std_cxx0x): Set flag_isoc94 and flag_isoc99.
13672 * c-pretty-print.c (pp_c_cv_qualifiers): Check c_dialect_cxx as well
13673 as flag_isoc99 for 'restrict'.
13674 (pp_c_specifier_qualifier_list): Likewise for _Complex.
13675
02614448
ILT
136762011-07-21 Ian Lance Taylor <iant@google.com>
13677
13678 PR middle-end/49705
13679 * c-common.c (c_disable_warnings): New static function.
13680 (c_enable_warnings): New static function.
13681 (c_fully_fold_internal): Change local unused_p to bool. Call
13682 c_disable_warnings and c_enable_warnings rather than change
13683 c_inhibit_evaluation_warnings.
13684
34429675
JM
136852011-07-20 Jason Merrill <jason@redhat.com>
13686
13687 PR c++/6709 (DR 743)
13688 PR c++/42603 (DR 950)
13689 * c-common.h (CPP_KEYWORD, CPP_TEMPLATE_ID): Move from cp/parser.h.
13690 (CPP_NESTED_NAME_SPECIFIER, N_CP_TTYPES): Likewise.
13691 (CPP_DECLTYPE): New.
13692 * c-common.c (c_parse_error): Handle CPP_DECLTYPE.
13693
5d49b6a7
RG
136942011-07-19 Richard Guenther <rguenther@suse.de>
13695
13696 * c-common.c (pointer_int_sum): Use fold_build_pointer_plus.
13697 * c-omp.c (c_finish_omp_for): Likewise.
13698
e84a58ff
EB
136992011-07-12 Eric Botcazou <ebotcazou@adacore.com>
13700
13701 * c-ada-spec.c (dump_nested_types): Put semi-colon after empty loop
13702 body on the next line.
13703
329af3c7
JM
137042011-07-08 Jason Merrill <jason@redhat.com>
13705
4063e61b
JM
13706 PR c++/45437
13707 * c-omp.c (check_omp_for_incr_expr): Handle preevaluation.
13708
329af3c7
JM
13709 PR c++/49673
13710 * c-common.c (c_apply_type_quals_to_decl): Don't check
13711 TYPE_NEEDS_CONSTRUCTING.
13712
1a072294
RG
137132011-07-06 Richard Guenther <rguenther@suse.de>
13714
13715 * c-common.c (c_common_nodes_and_builtins):
13716 Merge calls to build_common_tree_nodes and build_common_tree_nodes_2.
13717
fce5dddd
RG
137182011-07-05 Richard Guenther <rguenther@suse.de>
13719
13720 * c-common.c (c_common_nodes_and_builtins): Build all common
13721 tree nodes first.
13722
45d439ac
JJ
137232011-06-27 Jakub Jelinek <jakub@redhat.com>
13724
56300785
JJ
13725 * c-common.h (c_tree_chain_next): New static inline function.
13726
45d439ac
JJ
13727 * c-common.c (check_builtin_function_arguments): Handle
13728 BUILT_IN_ASSUME_ALIGNED.
13729
e0a8ecf2
AM
137302011-06-21 Andrew MacLeod <amacleod@redhat.com>
13731
13732 * c-common.c: Add sync_ or SYNC__ to builtin names.
13733 * c-omp.c: Add sync_ or SYNC__ to builtin names.
dfb43cd5
PV
13734
137352011-06-20 Pierre Vittet <piervit@pvittet.com>
13736
13737 * c-pragma.h (pragma_handler_1arg, pragma_handler_2arg): New
13738 handler.
13739 (gen_pragma_handler): New union.
13740 (internal_pragma_handler): New type.
13741 (c_register_pragma_with_data)
13742 (c_register_pragma_with_expansion_and_data): New functions.
13743
13744 * c-pragma.c (registered_pragmas, c_register_pragma_1)
13745 (c_register_pragma, c_register_pragma_with_expansion)
13746 (c_invoke_pragma_handler): Changed to work with
13747 internal_pragma_handler.
13748 (c_register_pragma_with_data)
13749 (c_register_pragma_with_expansion_and_data): New functions.
13750
677f3fa8
JM
137512011-06-14 Joseph Myers <joseph@codesourcery.com>
13752
13753 * c-common.c: Include common/common-target.h.
13754 (handle_section_attribute): Use
13755 targetm_common.have_named_sections.
13756 * c-cppbuiltin.c: Include common/common-target.h.
13757 (c_cpp_builtins): Use targetm_common.except_unwind_info.
13758
d7fc8c14
RG
137592011-06-10 Richard Guenther <rguenther@suse.de>
13760
13761 * c-pretty-print.c (pp_c_type_specifier): Use pp_c_identifier
13762 to print a IDENTIFIER_NODE.
13763
10e48e39
RO
137642011-06-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
13765 Joseph Myers <joseph@codesourcery.com>
13766
13767 * c.opt (fbuilding-libgcc): New option.
13768 * c-cppbuiltin.c (c_cpp_builtins): Define
13769 __LIBGCC_TRAMPOLINE_SIZE__ if flag_building_libgcc.
13770
6976ae51
JM
137712011-06-07 Jason Merrill <jason@redhat.com>
13772
3ff60975
JM
13773 * c-common.c (max_tinst_depth): Lower default to 900.
13774
6976ae51
JM
13775 * c-format.c (gcc_cxxdiag_char_table): Add 'S' format.
13776
009db074
RG
137772011-06-07 Richard Guenther <rguenther@suse.de>
13778
13779 * c-common.c (c_common_nodes_and_builtins): Do not set
13780 size_type_node or call set_sizetype.
13781
b4592b92
DS
137822011-06-07 Dodji Seketeli <dodji@redhat.com>
13783
13784 PR debug/49130
13785 * c-pretty-print.c (pp_c_integer_constant): Consider the canonical
9faeb493 13786 type when using pointer comparison to compare types.
b4592b92 13787
014ab419
JW
137882011-06-02 Jonathan Wakely <jwakely.gcc@gmail.com>
13789
13790 * c.opt: Add -Wdelete-non-virtual-dtor.
13791 * c-opts.c (c_common_handle_option): Include it in -Wall.
13792
4f60111f
NF
137932011-05-30 Nathan Froyd <froydnj@gcc.gnu.org>
13794
13795 PR bootstrap/49190
13796
13797 Revert:
13798 2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
13799
13800 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
13801 not tree_common.
13802
4cc4f2f4
JJ
138032011-05-27 Jakub Jelinek <jakub@redhat.com>
13804
13805 PR c++/49165
13806 * c-common.c (c_common_truthvalue_conversion) <case COND_EXPR>: For
13807 C++ don't call c_common_truthvalue_conversion on void type arms.
13808
38e01f9e
NF
138092011-05-27 Nathan Froyd <froydnj@codesourcery.com>
13810
13811 * c-common.h (struct stmt_tree_s) [x_cur_stmt_list]: Change to a VEC.
13812 (stmt_list_stack): Define.
13813 (cur_stmt_list): Adjust for new type of x_cur_stmt_list.
13814 * c-semantics.c (push_stmt_list, pop_stmt_list): Likewise.
13815
92e948a8
NF
138162011-05-26 Nathan Froyd <froydnj@codesourcery.com>
13817
13818 * c-common.c (warning_candidate_p): Check for BLOCKs.
13819
a2fc3e63
NF
138202011-05-26 Nathan Froyd <froydnj@codesourcery.com>
13821
13822 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
13823 not tree_common.
13824
0957c029
JJ
138252011-05-25 Jakub Jelinek <jakub@redhat.com>
13826
13827 * c-common.c (def_fn_type): Remove extra va_end.
13828
828fb3ba
JM
138292011-05-23 Jason Merrill <jason@redhat.com>
13830
13831 PR c++/48106
13832 * c-common.c (c_common_get_narrower): New.
13833 (shorten_binary_op, shorten_compare, warn_for_sign_compare): Use it.
13834
dde05067
NF
138352011-05-23 Nathan Froyd <froydnj@codesourcery.com>
13836
13837 * c-common.h (check_function_arguments): Tweak prototype of
13838 check_function_arguments.
13839 * c-common.c (check_function_arguments): Likewise. Adjust
13840 calls to check_function_nonnull, check_function_format, and
13841 check_function_sentinel.
13842 (check_function_sentinel): Take a FUNCTION_TYPE rather than
13843 separate attributes and typelist arguments. Use
13844 FOREACH_FUNCTION_ARGS to iterate over argument types.
13845
3c0d13bf
PC
138462011-05-15 Paolo Carlini <paolo.carlini@oracle.com>
13847
13848 * c-common.c (c_common_reswords): Reorder.
13849 * c-common.h (rid): Likewise.
13850
8242dd04
NF
138512011-05-10 Nathan Froyd <froydnj@codesourcery.com>
13852
13853 * c-common.c (def_fn_type): Don't call build_function_type, call
13854 build_function_type_array or build_varargs_function_type_array
13855 instead.
13856 (c_common_nodes_and_builtins): Likewise.
13857
3d528853
NF
138582011-05-05 Nathan Froyd <froydnj@codesourcery.com>
13859
13860 * c-common.c (c_add_case_label): Omit the loc argument to
13861 build_case_label.
13862 * c-common.h (build_case_label): Remove.
13863 * c-semantics.c (build_case_label): Remove.
13864
a04a722b
JM
138652011-05-05 Joseph Myers <joseph@codesourcery.com>
13866
13867 * c-objc.h (objc_start_method_definition): Update prototype.
13868 * stub-objc.c (objc_start_method_definition): Add extra parameter.
13869
e19a18d4
NF
138702011-05-04 Nathan Froyd <froydnj@codesourcery.com>
13871
13872 * c-common.c (check_main_parameter_types): Reindent. Don't use
13873 TYPE_ARG_TYPES directly.
13874 (handle_nonnull_attribute): Likewise.
13875 (sync_resolve_params): Likewise.
13876 * c-format.c (handle_format_arg_attribute): Likewise. Adjust call
13877 to check_format_string.
13878 (handle_format_attribute): Likewise.
13879 (check_format_string): Take a function type to examine instead of
13880 a type list. Use a function_arg_iterator to step through argument
13881 types.
13882
c62c040f
RG
138832011-05-04 Richard Guenther <rguenther@suse.de>
13884
13885 * c-common.c (fix_string_type): Use size_int for index type bounds.
13886 (start_fname_decls): Do not pass NULL to build_int_cst.
13887 (c_init_attributes): Likewise.
13888 * c-lex.c (c_lex_with_flags): Likewise.
13889
c12ff9d8
JM
138902011-04-27 Jason Merrill <jason@redhat.com>
13891
13892 * c-common.c (make_tree_vector_from_list): New.
13893 * c-common.h: Declare it.
13894
304dfbe3
RG
138952011-04-26 Richard Guenther <rguenther@suse.de>
13896
13897 PR preprocessor/48248
13898 * c-ppoutput.c (maybe_print_line): Always optimize newlines
13899 for output size with -P.
13900
3c0d13bf
PC
139012011-04-25 Paolo Carlini <paolo.carlini@oracle.com>
13902
13903 * c-common.c (struct c_common_resword): Add __underlying_type.
13904 * c-common.h (enum rid): Add RID_UNDERLYING_TYPE.
13905
04695783
JM
139062011-04-20 Jim Meyering <meyering@redhat.com>
13907
13908 * c-format.c (init_dollar_format_checking): Remove useless
13909 if-before-free.
13910
0dc33c3c
NP
139112011-04-15 Nicola Pero <nicola.pero@meta-innovation.com>
13912
13913 * c-objc.h (objc_get_interface_ivars): Removed.
3c0d13bf 13914 (objc_detect_field_duplicates): New.
0dc33c3c 13915 * stub-objc.c: Likewise.
3c0d13bf 13916
c59633d9
NP
139172011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
13918
13919 * stub-objc.c (objc_declare_protocols): Renamed to
13920 objc_declare_protocol.
13921 * c-objc.h: Likewise.
3c0d13bf 13922
32dabdaf
NP
139232011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
13924
13925 * stub-objc.c (objc_declare_class): Updated argument name.
13926
81f653d6
NF
139272011-04-12 Nathan Froyd <froydnj@codesourcery.com>
13928
13929 * c-common.h (c_common_init_ts): Declare.
13930 * c-common.c (c_common_init_ts): Define.
13931
eb345401
NP
139322011-04-12 Nicola Pero <nicola.pero@meta-innovation.com>
13933
13934 * c-objc.h (objc_build_message_expr): Updated prototype.
13935 * stub-objc.c (objc_build_message_expr): Likewise.
9faeb493 13936
a358e188
MJ
139372011-04-12 Martin Jambor <mjambor@suse.cz>
13938
13939 * c-gimplify.c (c_genericize): Call cgraph_get_create_node instead
13940 of cgraph_node.
13941
e6313a78
RG
139422011-04-11 Richard Guenther <rguenther@suse.de>
13943
13944 * c-common.c (complete_array_type): Build a range type of
13945 proper type.
13946
dcf0c47e
NF
139472011-04-08 Nathan Froyd <froydnj@codesourcery.com>
13948
13949 * c-common.c (handle_sentinel_attribute): Don't use TYPE_ARG_TYPES.
13950 (handle_type_generic_attribute): Likewise.
13951
1ee44b26
JM
139522011-04-07 Jason Merrill <jason@redhat.com>
13953
13954 PR c++/48450
13955 * c-common.c (c_common_truthvalue_conversion): Don't ignore
13956 conversion from C++0x scoped enum.
13957
acce4e77
JM
139582011-04-06 Joseph Myers <joseph@codesourcery.com>
13959
13960 * c-target-def.h: New file.
13961 * c-target.def: New file.
13962 * c-target.h: New file.
13963 * c-common.c (targetcm): Don't define here.
13964 * c-common.h (default_handle_c_option): Declare.
13965 * c-format.c: Include c-target.h instead of target.h.
13966 * c-opts.c: Include c-target.h instead of target.h. Explicitly
13967 include tm.h.
13968 (default_handle_c_option): Move from targhooks.c.
13969
e2eefb55
JJ
139702011-03-29 Jakub Jelinek <jakub@redhat.com>
13971
13972 PR preprocessor/48248
13973 * c-ppoutput.c (print): Add src_file field.
13974 (init_pp_output): Initialize it.
13975 (maybe_print_line): Don't optimize by adding up to 8 newlines
13976 if map->to_file and print.src_file are different file.
13977 (print_line): Update print.src_file.
13978
ba78087b
KT
139792011-03-25 Kai Tietz <ktietz@redhat.com>
13980
13981 * c-ada-spec.c (compare_comment): Use filename_cmp
13982 instead of strcmp for filename.
13983
0edf1bb2
JL
139842011-03-25 Jeff Law <law@redhat.com>
13985
adfac8df 13986 * c-common.c (def_fn_type): Add missing va_end.
0edf1bb2 13987
c7dc8804
JM
139882011-03-25 Jason Merrill <jason@redhat.com>
13989
13990 * c.opt: Add -std=c++03.
13991
d1d879b1
EB
139922011-03-22 Eric Botcazou <ebotcazou@adacore.com>
13993
13994 * c-ada-spec.c (dump_ada_template): Skip non-class instances.
13995
3f8257db 139962011-03-17 Kai Tietz <ktietz@redhat.com>
62d784f7
KT
13997
13998 PR target/12171
5050afdf
KT
13999 * c-pretty-print.c (pp_c_specifier_qualifier_list):
14000 Display allowed attributes for function pointer types.
14001 (pp_c_attributes_display): New function to display
14002 attributes having affects_type_identity flag set to true.
14003 * c-pretty-print.h (pp_c_attributes_display): New prototype.
14004
62d784f7
KT
14005 * c-common.c (c_common_attribute_table):
14006 Add new element.
14007 (c_common_format_attribute_table): Likewise.
14008
82d37118
JM
140092011-03-18 Jason Merrill <jason@redhat.com>
14010
49a000c3
JM
14011 * c.opt (fconstexpr-depth): Add Var(max_constexpr_depth).
14012 * c-common.h: Don't declare it here.
14013 * c-common.c: Or define it here.
14014 * c-opts.c (c_common_handle_option): Or set it here.
14015
82d37118
JM
14016 PR c++/35315
14017 * c-common.c (handle_transparent_union_attribute): Don't
14018 make a duplicate type in C++.
14019
17bc631c
JM
140202011-03-15 Jason Merrill <jason@redhat.com>
14021
14022 * c-common.c (max_constexpr_depth): New.
14023 * c-common.h: Declare it.
14024 * c-opts.c (c_common_handle_option): Set it.
14025 * c.opt (fconstexpr-depth): New option.
14026
1b9b91a6
JM
140272011-03-11 Jason Merrill <jason@redhat.com>
14028
f231b5ff
JM
14029 * c-common.c (attribute_takes_identifier_p): Add missing const.
14030
1b9b91a6
JM
14031 PR c++/46803
14032 * c-common.c (attribute_takes_identifier_p): Assume that an
14033 unknown attribute takes an identifier.
14034
a19e4d44
NF
140352011-03-07 Nathan Froyd <froydnj@codesourcery.com>
14036
14037 PR c/47786
14038 * c-common.c (c_type_hash): Call list_length instead of iterating
14039 through DECL_CHAIN. Rename 'i' to 'n_elements'.
14040
982d62f6
JJ
140412011-02-19 Jakub Jelinek <jakub@redhat.com>
14042
14043 PR c/47809
14044 * c-common.c (c_fully_fold_internal): Handle VIEW_CONVERT_EXPR.
14045
0a256240
NP
140462011-02-17 Iain Sandoe <iains@gcc.gnu.org>
14047
14048 * c.opt (fobjc-abi-version=) New.
14049 (fobjc-nilcheck): New.
14050
ba9e6dd5
NF
140512011-02-03 Nathan Froyd <froydnj@codesourcery.com>
14052
14053 PR c++/46890
14054 * c-common.h (keyword_is_decl_specifier): Declare.
14055 * c-common.c (keyword_is_decl_specifier): Define.
14056 (keyword_is_function_specifier): New function.
14057
7273813a
JJ
140582011-01-26 Jakub Jelinek <jakub@redhat.com>
14059
14060 PR c/47473
14061 * c-lex.c (interpret_float): If CPP_N_IMAGINARY, ensure
14062 EXCESS_PRECISION_EXPR is created with COMPLEX_TYPE instead of
14063 REAL_TYPE.
14064
908ef79b
AC
140652011-01-26 Arnaud Charlet <charlet@adacore.com>
14066
14067 * c-ada-spec.c (dump_generic_ada_node): Avoid dereferencing null type.
14068
237e9384
JJ
140692011-01-26 Jakub Jelinek <jakub@redhat.com>
14070
14071 PR pch/47430
14072 * c-opts.c (c_common_post_options): Call c_common_no_more_pch
14073 after init_c_lex if pch_file is set.
14074
47ea1edf
DK
140752011-01-26 Dave Korn <dave.korn.cygwin@gmail.com>
14076
d4dba752 14077 PR c++/43601
47ea1edf
DK
14078 * c.opt (-fkeep-inline-dllexport): New switch.
14079
2aa9c6ae
RG
140802011-01-12 Richard Guenther <rguenther@suse.de>
14081
14082 PR middle-end/32511
14083 * c-common.c (handle_weak_attribute): Warn instead of error
14084 on declaring an inline function weak.
14085
7bd11157
TT
140862011-01-05 Tom Tromey <tromey@redhat.com>
14087
14088 * c-common.h (lvalue_error): Update.
14089 * c-common.c (lvalue_error): Add 'loc' argument. Call error_at,
14090 not error.
14091
0e66e494 140922010-12-29 Nicola Pero <nicola.pero@meta-innovation.com>
9faeb493 14093
b4f588c4
NP
14094 PR objc/47075
14095 * c-objc.h (objc_finish_message_expr): Added argument to
14096 prototype.
14097
f4da8dce
NF
140982010-12-22 Nathan Froyd <froydnj@codesourcery.com>
14099
14100 * c-common.c (handle_nonnull_attribute, handle_sentinel_attribute):
14101 Use prototype_p.
14102
46270f14
NP
141032010-12-18 Nicola Pero <nicola.pero@meta-innovation.com>
14104
14105 * c-objc.h (objc_maybe_warn_exceptions): New.
9faeb493 14106 * stub-objc.c (objc_maybe_warn_exceptions): New.
46270f14 14107
4816c593
NF
141082010-12-10 Nathan Froyd <froydnj@codesourcery.com>
14109
14110 * c-common.h (readonly_error): Declare.
14111 * c-common.c (readonly_error): Define.
14112
7a6daeb0
NF
141132010-12-09 Nathan Froyd <froydnj@codesourcery.com>
14114
14115 * c-common.h (invalid_indirection_error): Declare.
14116 * c-common.c (invalid_indirection_error): Define.
14117
892f6119
RG
141182010-12-03 Richard Guenther <rguenther@suse.de>
14119
14120 PR c/46745
14121 * c-pretty-print.c (pp_c_postfix_expression): Handle MEM_REF.
14122 (pp_c_unary_expression): Likewise.
14123 (pp_c_expression): Likewise.
14124
6c39e757
NP
141252010-11-30 Nicola Pero <nicola.pero@meta-innovation.com>
14126
14127 * c-common.h (objc_finish_function): New.
14128 (objc_non_volatilized_type): Removed.
14129 (objc_type_quals_match): Removed.
14130 * stub-objc.c (objc_finish_function): New.
14131 (objc_non_volatilized_type): Removed.
14132 (objc_type_quals_match): Removed.
9faeb493 14133
7c475d11
JM
141342010-11-30 Joseph Myers <joseph@codesourcery.com>
14135
14136 * c-common.h (parse_optimize_options): Declare.
14137 * c-cppbuiltin.c, c-format.c, c-gimplify.c, c-lex.c, c-omp.c,
14138 c-pch.c, c-pragma.c, c-semantics.c: Don't include toplev.h.
14139
71f3e391
JM
141402010-11-29 Joseph Myers <joseph@codesourcery.com>
14141
14142 * c-opts.c (check_deps_environment_vars): Use getenv instead of
14143 GET_ENVIRONMENT.
14144 * c-pch.c (O_BINARY): Don't define here.
14145 * c-pragma.h: Include "cpplib.h" instead of <cpplib.h>.
14146
d5fabb58
JM
141472010-11-25 Joseph Myers <joseph@codesourcery.com>
14148
14149 * c-cppbuiltin.c (c_cpp_builtins): Pass &global_options to
14150 targetm.except_unwind_info.
14151
299404a1
JM
141522010-11-23 Joseph Myers <joseph@codesourcery.com>
14153
14154 * c-opts.c (c_common_handle_option): Pass location to
14155 set_struct_debug_option.
14156
c98cd5bf
JM
141572010-11-23 Joseph Myers <joseph@codesourcery.com>
14158
14159 * c-common.c (visibility_options): Move from ../opts.c.
14160 * c-common.h (struct visibility_flags, visibility_options):
14161 Declare here.
14162 * c-opts.c (finish_options): Rename to c_finish_options.
14163 (c_common_init): Update call to finish_options.
14164
a9546771
NP
141652010-11-22 Nicola Pero <nicola.pero@meta-innovation.com>
14166
14167 PR objc/34033
14168 * c-lex.c (lex_string): Check that each string in an Objective-C
14169 string concat sequence starts with either one or zero '@', and
14170 that there are no spurious '@' signs at the end.
14171
24a57808
JM
141722010-11-20 Joseph Myers <joseph@codesourcery.com>
14173
14174 * c-pragma.c: Remove conditionals on HANDLE_PRAGMA_PACK,
14175 HANDLE_PRAGMA_PACK_PUSH_POP, HANDLE_PRAGMA_WEAK and
14176 HANDLE_PRAGMA_VISIBILITY.
14177 * c-pragma.h (HANDLE_PRAGMA_WEAK, HANDLE_PRAGMA_PACK,
14178 HANDLE_PRAGMA_VISIBILITY): Don't define.
14179 (HANDLE_SYSV_PRAGMA, HANDLE_PRAGMA_PACK_PUSH_POP): Don't test.
14180
a9aa2c3a
NF
141812010-11-20 Nathan Froyd <froydnj@codesourcery.com>
14182
14183 PR c++/16189
14184 PR c++/36888
14185 PR c++/45331
14186 * c-common.h (keyword_begins_type_specifier): Declare.
14187 (keyword_is_storage_class_specifier): Declare.
14188 (keyword_is_type_qualifier): Declare.
14189 * c-common.c (keyword_begins_type_specifier): New function.
14190 (keyword_is_storage_class_specifier): New function.
14191 (keyword_is_type_qualifier): Declare.
14192
5386338c
JM
141932010-11-19 Joseph Myers <joseph@codesourcery.com>
14194
14195 PR c/46547
14196 * c-common.c (in_late_binary_op): Define.
14197 (c_common_truthvalue_conversion): Check in_late_binary_op before
14198 calling c_save_expr.
14199 * c-common.h (in_late_binary_op): Declare.
14200
69ccdddb
JM
142012010-11-19 Joseph Myers <joseph@codesourcery.com>
14202
14203 * c-opts.c (c_common_handle_option): Update calls to
14204 set_struct_debug_option.
14205
6b192a09
NP
142062010-11-19 Nicola Pero <nicola.pero@meta-innovation.com>
14207
14208 * c-common.h (objc_declare_protocols): Added additional argument.
14209 * stub-objc.c (objc_declare_protocol): Same change.
9faeb493 14210
fb52b50a
NF
142112010-11-18 Nathan Froyd <froydnj@codesourcery.com>
14212
14213 PR c/33193
14214 * c-common.h (build_real_imag_expr): Declare.
14215 * c-semantics.c (build_real_imag_expr): Define.
14216
b37421c6
JM
142172010-11-17 Joseph Myers <joseph@codesourcery.com>
14218
14219 * c-opts.c (c_common_parse_file): Take no arguments.
14220 * c-common.h (c_common_parse_file): Update prototype.
14221
07078664
JJ
142222010-11-16 Jakub Jelinek <jakub@redhat.com>
14223
14224 PR c++/46401
14225 * c-common.c (warning_candidate_p): Don't track non-const calls
14226 or STRING_CSTs.
14227
c6a13190
ILT
142282010-11-15 Ian Lance Taylor <iant@google.com>
14229
14230 * c-lex.c (init_c_lex): Set macro debug callbacks if
14231 flag_dump_go_spec is set.
14232
925e8657
NP
142332010-11-15 Nicola Pero <nicola.pero@meta-innovation.com>
14234
14235 * c-common.h (objc_build_incr_expr_for_property_ref): New.
14236 * stub-objc.c (objc_build_incr_expr_for_property_ref): New.
14237
bb0a9581
NF
142382010-11-15 Nathan Froyd <froydnj@codesourcery.com>
14239
14240 PR preprocessor/45038
14241 * c-cppbuiltin.c (c_cpp_builtins): Use different format for C++
14242 dialects.
14243
c5fa0890
JM
142442010-11-12 Joseph Myers <joseph@codesourcery.com>
14245
14246 * c-common.h (c_family_lang_mask): Declare.
14247 * c-opts.c (c_family_lang_mask): Make extern.
14248 * c-pragma.c (handle_pragma_diagnostic): Use
14249 control_warning_option.
14250
a4d8c676
JM
142512010-11-12 Joseph Myers <joseph@codesourcery.com>
14252
14253 * c-common.c (parse_optimize_options): Update call to
14254 decode_options.
14255 * c-common.h (c_common_handle_option): Update prototype.
14256 * c-opts.c (c_common_handle_option): Take location_t parameter and
14257 pass it to other functions.
14258
f954bd2c
JM
142592010-11-11 Joseph Myers <joseph@codesourcery.com>
14260
14261 * c-opts.c (warning_as_error_callback): Remove.
14262 (c_common_initialize_diagnostics): Don't call
14263 register_warning_as_error_callback.
14264 (c_common_handle_option): Handle -Werror=normalized= here.
14265
d8a07487
JM
142662010-11-10 Joseph Myers <joseph@codesourcery.com>
14267
14268 * c-common.c (handle_mode_attribute): Use %' and word "signedness"
14269 in diagnostic.
14270 * c-opts.c (c_common_parse_file): Start diagnostics with lowercase
14271 letter.
14272 * c-pragma.c (handle_pragma_target, handle_pragma_optimize):
14273 Remove trailing '.' from diagnostics.
14274 * c.opt (Wwrite-strings_: Avoid '`' in help text.
14275
d5478783
JM
142762010-11-10 Joseph Myers <joseph@codesourcery.com>
14277
14278 * c-common.c (parse_optimize_options): Pass global_dc to
14279 decode_options.
14280 * c-opts.c (c_common_handle_option): Pass &global_options to
14281 set_Wstrict_aliasing.
14282 * c.opt (v): Don't mark Common or document here.
14283
91ebb981
IS
142842010-11-06 Iain Sandoe <iains@gcc.gnu.org>
14285
14286 PR target/44981
14287 * c-format.c (format_type): New type gcc_objc_string_format_type.
14288 (valid_stringptr_type_p): New.
14289 (handle_format_arg_attribute): Use valid_stringptr_type_p ().
9faeb493 14290 (check_format_string): Pass expected type, use
91ebb981
IS
14291 valid_stringptr_type_p (), check that the format string types are
14292 consistent with the format specification.
14293 (decode_format_attr): Warn if NSString is used outside objective-c.
14294 (format_types_orig): Add NSString.
14295 (format_name): New.
14296 (format_flags): New.
14297 (check_format_arg): Handle format strings requiring an external parser.
14298 first_target_format_type: New variable.
14299 (handle_format_attribute): Set up first_target_format_type, pass the
14300 expected format arg string type to check_format_string().
ab20d992 14301 * c-common.h (FMT_FLAG_PARSE_ARG_CONVERT_EXTERNAL): New flag.
91ebb981
IS
14302 * stub-objc.c (objc_string_ref_type_p): New.
14303 (objc_check_format_arg): New.
14304
bede2adc
NP
143052010-11-04 Nicola Pero <nicola.pero@meta-innovation.com>
14306
9faeb493 14307 Fixed using the Objective-C 2.0 dot-syntax with class names.
bede2adc
NP
14308 * c-common.h (objc_build_class_component_ref): New.
14309 * stub-objc.c (objc_build_class_component_ref): New.
14310
9a179d01
NP
143112010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
14312
14313 * c.opt (Wproperty-assign-default): New option.
14314
22d8d616
NP
143152010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
14316
14317 Implemented -fobjc-std=objc1 flag.
14318 * c.opt (fobjc-std=objc1): New option.
14319
2debdb4f
NP
143202010-11-01 Nicola Pero <nicola.pero@meta-innovation.com>
14321
14322 Implemented format and noreturn attributes for Objective-C methods.
14323 * c-common.c (handle_noreturn_attribute): Recognize 'noreturn'
14324 attribute for Objective-C methods.
14325
ec52b111
JM
143262010-10-31 Jason Merrill <jason@redhat.com>
14327
14328 * c-common.c (conversion_warning, warn_for_collisions_1): Use
14329 EXPR_LOC_OR_HERE.
14330
46a88c12
NP
143312010-10-30 Nicola Pero <nicola.pero@meta-innovation.com>
14332
14333 Implemented Objective-C 2.0 @property, @synthesize and @dynamic.
14334 * c-common.h (enum rid): Removed RID_COPIES and RID_IVAR.
14335 (objc_add_property_declaration): Removed arguments for copies and
14336 ivar.
14337 (objc_build_getter_call): Renamed to
14338 objc_maybe_build_component_ref.
14339 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
14340 (objc_is_property_ref): New.
14341 * c-common.c (c_common_reswords): Removed copies and ivar.
14342 * stub-objc.c (objc_add_property_declaration): Removed arguments
14343 for copies and ivar.
14344 (objc_build_getter_call): Renamed to
14345 objc_maybe_build_component_ref.
14346 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
14347 (objc_is_property_ref): New.
9faeb493 14348
1e4bf85b
AC
143492010-10-29 Arnaud Charlet <charlet@adacore.com>
14350 Matthew Gingell <gingell@adacore.com>
14351
14352 * c-ada-spec.c (separate_class_package): New function.
14353 (pp_ada_tree_identifier): Prefix references to C++ classes with the
14354 name of their enclosing package.
14355 (print_ada_declaration): Use separate_class_package.
14356
81f0bab2
JM
143572010-10-27 Jason Merrill <jason@redhat.com>
14358
2b08f2c5
JM
14359 * c-common.c (c_common_reswords): Add __is_literal_type.
14360 * c-common.h (enum rid): Add RID_IS_LITERAL_TYPE.
14361
81f0bab2
JM
14362 * c-common.c (check_case_value): Remove special C++ code.
14363
200290f2
NP
143642010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
14365
14366 * c-common.h (enum rid): Added RID_READWRITE, RID_ASSIGN,
14367 RID_RETAIN, RID_COPY and RID_NONATOMIC. Updated RID_FIRST_PATTR
14368 and RID_LAST_PATTR.
14369 (objc_add_property_declaration): Added additional arguments.
14370 (objc_property_attribute_kind): Removed.
14371 (objc_set_property_attr): Removed.
14372 * c-common.c (c_common_reswords): Added readwrite, assign, retain,
14373 copy and nonatomic.
14374 * stub-objc.c (objc_add_property_declaration): Added additional
14375 arguments.
14376 (objc_set_property_attr): Removed.
9faeb493 14377
f614132b
NP
143782010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
14379
14380 * c-common.h (objc_add_property_variable): Renamed to
14381 objc_add_property_declaration. Added location argument.
14382 * stub-objc.c (objc_add_property_variable): Same change.
b1726d6c 14383
b8a18805
NP
143842010-10-23 Nicola Pero <nicola.pero@meta-innovation.com>
14385
14386 * c-common.h (objc_maybe_printable_name): New.
14387 * stub-objc.c (objc_maybe_printable_name): New.
14388
3f8257db
JJ
143892010-10-22 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
14390 Andrew Pinski <pinskia@gmail.com>
30cd1c5d
AS
14391
14392 * c-common.h (c_common_mark_addressable_vec): Declare.
14393 * c-common.c (c_common_mark_addressable_vec): New function.
14394
249a82c4
NP
143952010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
14396
14397 * c-common.h (objc_set_method_type): Removed.
14398 (objc_add_method_declaration): Added boolean argument.
14399 (objc_start_method_definition): Same change.
14400 (objc_build_method_signature): Same change.
14401 * stub-objc.c (objc_set_method_type): Removed.
14402 (objc_add_method_declaration): Added boolean argument.
14403 (objc_start_method_definition): Same change.
14404 (objc_build_method_signature): Same change.
14405
977e30bc
NP
144062010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
14407
14408 * c-common.h (finish_file): Removed.
14409 (objc_write_global_declarations): New.
14410 * c-opts.c (c_common_parse_file): Do not call finish_file.
14411 * stub-objc.c (objc_write_global_declarations): New.
9faeb493 14412
da57d1b9
NP
144132010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
14414
14415 Implemented parsing @synthesize and @dynamic for
14416 Objective-C/Objective-C++.
14417 * c-common.h (enum rid): Add RID_AT_SYNTHESIZE and RID_AT_DYNAMIC.
14418 (objc_add_synthesize_declaration): New.
14419 (objc_add_dynamic_declaration): New.
14420 * c-common.c (c_common_reswords): Add synthesize and dynamic.
14421 * stub-objc.c (objc_add_synthesize_declaration): New.
14422 (objc_add_dynamic_declaration): New.
9faeb493 14423
0069111f
MM
144242010-10-18 Michael Meissner <meissner@linux.vnet.ibm.com>
14425
14426 PR target/46041
14427 * c-cppbuiltin.c (mode_has_fma): Move function here from
14428 builtins.c. Don't use the fma optab, instead just use the
14429 HAVE_fma* macros, so that __FP_FAST_FMA* will be defined when
14430 using -save-temps.
14431
e426b47b
NP
144322010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
14433
14434 Merge from 'apple/trunk' branch on FSF servers.
0069111f 14435
3f8257db 14436 2005-11-08 Fariborz Jahanian <fjahanian@apple.com>
e426b47b 14437
9faeb493 14438 Radar 4330422
e426b47b
NP
14439 * c-common.h (objc_non_volatilized_type): New declaration
14440 * stub-objc.c (objc_non_volatilized_type): New stub.
14441
90fbfdc3
NP
144422010-10-17 Nicola Pero <nicola.pero@meta-innovation.com>
14443
e426b47b 14444 Merge from 'apple/trunk' branch on FSF servers.
90fbfdc3 14445
ab20d992 14446 2006-03-27 Fariborz Jahanian <fjahanian@apple.com>
90fbfdc3 14447
9faeb493 14448 Radar 4133425
90fbfdc3 14449 * c-common.h (objc_diagnose_private_ivar): New decl.
0069111f 14450 * stub-objc.c (objc_diagnose_private_ivar): New stub.
90fbfdc3 14451
c37d8c30
IS
144522010-10-17 Iain Sandoe <iains@gcc.gnu.org>
14453
14454 * c-common.c (c_common_reswords): Add package, RID_AT_PACKAGE.
14455 * c-common.h (enum rid): Add RID_AT_PACKAGE.
14456 (objc_ivar_visibility_kind): New enum.
14457 (objc_set_visibility): Adjust prototype to use visibility enum.
0069111f 14458 * stub-objc.c (objc_set_visibility): Adjust stub to use
c37d8c30
IS
14459 visibility enum.
14460
1b1562a5
MM
144612010-10-14 Michael Meissner <meissner@linux.vnet.ibm.com>
14462
14463 * c-cppbuiltin.c (builtin_define_float_constants): Emit
14464 __FP_FAST_FMA, __FP_FAST_FMAF, and __FP_FAST_FMAL if the machine
14465 has the appropriate fma builtins.
14466 (c_cpp_builtins): Adjust call to builtin_define_float_constants.
14467
668ea4b1
IS
144682010-10-14 Iain Sandoe <iains@gcc.gnu.org>
14469
1b1562a5 14470 merge from FSF apple 'trunk' branch.
3f8257db 14471 2006 Fariborz Jahanian <fjahanian@apple.com>
1b1562a5 14472
668ea4b1
IS
14473 Radars 4436866, 4505126, 4506903, 4517826
14474 * c-common.c (c_common_resword): Define @property and its attributes.
14475 * c-common.h: Define property attribute enum entries.
14476 (OBJC_IS_PATTR_KEYWORD): New.
14477 (objc_property_attribute_kind): New enum.
14478 Declare objc_set_property_attr (), objc_add_property_variable (),
14479 objc_build_getter_call () and objc_build_setter_call ().
14480 * stub-objc.c (objc_set_property_attr): New stub.
14481 (objc_add_property_variable): Likewise.
14482 (objc_build_getter_call): Likewise.
14483 (objc_build_setter_call) Likewise.
1b1562a5 14484
a1178b30
IS
144852010-10-13 Iain Sandoe <iains@gcc.gnu.org>
14486
1b1562a5 14487 merge from FSF apple 'trunk' branch.
ab20d992 14488 2006-04-26 Fariborz Jahanian <fjahanian@apple.com>
a1178b30
IS
14489
14490 Radar 3803157 (method attributes)
14491 * c-common.c (handle_deprecated_attribute): Recognize
14492 objc methods as valid declarations.
14493 * c-common.h: Declare objc_method_decl ().
1b1562a5 14494 * stub-objc.c (objc_method_decl): New stub.
a1178b30 14495
a75bfaa6
JM
144962010-10-08 Joseph Myers <joseph@codesourcery.com>
14497
14498 * c-common.c (parse_optimize_options): Call
14499 decode_cmdline_options_to_array_default_mask before
14500 decode_options. Update arguments to decode_options.
14501 * c-common.h (c_common_init_options_struct): Declare.
14502 * c-opts.c (c_common_init_options_struct): New. Split out from
14503 c_common_init_options.
14504
f05b9d93
NP
145052010-10-06 Nicola Pero <nicola.pero@meta-innovation.com>
14506
14507 Implemented fast enumeration for Objective-C.
14508 * c-common.h (objc_finish_foreach_loop): New.
14509 * stub-objc.c (objc_finish_foreach_loop): New.
14510
1ebe4b4f
JM
145112010-10-05 Joseph Myers <joseph@codesourcery.com>
14512
14513 * c-common.h (struct diagnostic_context): Don't declare here.
14514 (c_common_initialize_diagnostics): Declare using
14515 diagnostic_context typedef.
14516 * c-opts.c (c_common_handle_option): Pass global_dc to
14517 handle_generated_option.
14518
d4d24ba4
JM
145192010-10-04 Joseph Myers <joseph@codesourcery.com>
14520
14521 * c-opts.c (c_common_handle_option): Pass &global_options_set to
14522 handle_generated_option.
14523
478a1c5b
ILT
145242010-10-03 Ian Lance Taylor <iant@google.com>
14525
14526 * c.opt (-fplan9-extensions): New option.
14527
82a1c2fe
FXC
145282010-10-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
14529
14530 * c-cppbuiltin.c (define__GNUC__, builtin_define_type_precision):
14531 Remove.
14532 (c_cpp_builtins): Call functions from cppbuiltin.c instead
14533 of duplicating code.
14534
92902b1b
IS
145352010-09-30 Iain Sandoe <iains@gcc.gnu.org>
14536
14537 * c-common.c: Add two new entries for @optional
14538 and @required keywords.
14539
14540 merge from FSF 'apple/trunk' branch.
3f8257db 14541 2006-01-30 Fariborz Jahanian <fjahanian@apple.com>
92902b1b
IS
14542
14543 Radar 4386773
14544 * c-common.h (RID_AT_OPTIONAL, RID_AT_REQUIRED): Two new
14545 objective-c keywords.
14546 (objc_set_method_opt): New declaration.
14547 * stub-objc.c (objc_set_method_opt): New stub.
9faeb493 14548
46625112
JM
145492010-09-30 Joseph Myers <joseph@codesourcery.com>
14550
14551 * c-common.c (handle_optimize_attribute): Pass &global_options to
14552 cl_optimization_save and cl_optimization_restore.
14553 * c-opts.c (c_common_handle_option): Pass &global_options to
14554 handle_generated_option.
14555 * c-pragma.c (handle_pragma_diagnostic): Use option_flag_var.
14556 (handle_pragma_pop_options, handle_pragma_reset_options): Pass
14557 &global_options to cl_optimization_restore.
14558
49b91f05
NP
145592010-09-30 Nicola Pero <nicola.pero@meta-innovation.com>
14560
14561 * c-lex.c (c_lex_with_flags): Updated comments for CPP_AT_NAME
14562 Objective-C/Objective-C++ keywords.
14563
13ed556f 145642010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
a6341d57 14565
9faeb493
UB
14566 Merge from 'apple/trunk' branch on FSF servers.
14567
3f8257db 14568 2005-10-04 Fariborz Jahanian <fjahanian@apple.com>
a6341d57
NP
14569
14570 Radar 4281748
14571 * c-common.h (objc_check_global_decl): New declaration.
14572 * stub-objc.c (objc_check_global_decl): New stub.
14573
f0036cca
JM
145742010-09-29 Joseph Myers <joseph@codesourcery.com>
14575
14576 * c.opt: Don't use VarExists.
14577
e3339d0f
JM
145782010-09-29 Joseph Myers <joseph@codesourcery.com>
14579
14580 * c-common.c (c_cpp_error): Update names of diagnostic_context
14581 members.
14582 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Update names of
14583 cl_optimization members.
14584 * c-opts.c (warning_as_error_callback, c_common_handle_option,
14585 sanitize_cpp_opts, finish_options): Update names of cpp_options
14586 members.
14587
1973201f
NP
145882010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
14589
14590 * c-common.h (OBJC_IS_CXX_KEYWORD): New macro. Updated comments.
14591 (objc_is_reserved_word): Removed.
14592 * c-common.c: Updated comments.
14593 * c-lex.c (c_lex_with_flags): Use OBJC_IS_CXX_KEYWORD instead of
14594 objc_is_reserved_word.
14595 * stub-objc.c (objc_is_reserved_word): Removed.
14596
f7e71da5
IS
145972010-09-28 Iain Sandoe <iains@gcc.gnu.org>
14598
9faeb493 14599 * c-common.h (objc_add_method_declaration): Adjust prototype to
f7e71da5
IS
14600 include attributes.
14601 (objc_start_method_definition): Likewise.
14602 (objc_build_keyword_decl): Likewise.
14603 * stub-objc.c:(objc_add_method_declaration): Handle attributes.
14604 (objc_start_method_definition): Likewise.
14605 (objc_build_keyword_decl): Likewise.
14606
c165dca7
IS
146072010-09-28 Iain Sandoe <iains@gcc.gnu.org>
14608
14609 * c-common.h (objc_start_class_interface): Adjust prototype.
14610 (objc_start_category_interface): Likewise.
14611 (objc_start_protocol): Likewise.
14612 * stub-objc.c (objc_start_protocol): Adjust for extra argument.
14613 (objc_start_class_interface): Likewise.
14614 (objc_start_category_interface): Likewise.
14615
7458026b
ILT
146162010-09-27 Ian Lance Taylor <iant@google.com>
14617
14618 * c-common.c (c_common_attribute_table): Add no_split_stack.
14619 (handle_no_split_stack_attribute): New static function.
14620
b581b85b
NP
146212010-09-27 Nicola Pero <nicola.pero@meta-innovation.com>
14622
9faeb493 14623 Merge from 'apple/trunk' branch on FSF servers.
b581b85b 14624
3f8257db 14625 2005-12-15 Fariborz Jahanian <fjahanian@apple.com>
b581b85b 14626
9faeb493 14627 Radar 4229905
b581b85b
NP
14628 * c-common.h (objc_have_common_type): New declaration.
14629 * stub-objc.c (objc_have_common_type): New stub.
14630
14631 2005-06-22 Ziemowit Laski <zlaski@apple.com>
14632
14633 Radar 4154928
14634 * c-common.h (objc_common_type): New prototype.
9faeb493 14635 * stub-objc.c (objc_common_type): New stub.
b581b85b 14636
46a4da10
JH
146372010-09-24 Jan Hubicka <jh@suse.cz>
14638
14639 * c-common.c (handle_leaf_attribute): New function.
14640 (struct attribute_spec c_common_att): Add leaf.
14641
e200444e
JM
146422010-09-22 Joseph Myers <joseph@codesourcery.com>
14643
14644 * c.opt (-all-warnings, -ansi, -assert, -assert=, -comments,
14645 -comments-in-macros, -define-macro, -define-macro=, -dependencies,
14646 -dump, -dump=, -imacros, -imacros=, -include, -include=,
14647 -include-barrier, -include-directory, -include-directory=,
14648 -include-directory-after, -include-directory-after=,
14649 -include-prefix, -include-prefix=, -include-with-prefix,
14650 -include-with-prefix=, -include-with-prefix-after,
14651 -include-with-prefix-after=, -include-with-prefix-before,
14652 -include-with-prefix-before=, -no-integrated-cpp,
14653 -no-line-commands, -no-standard-includes, -no-warnings, -output,
14654 -output=, -pedantic, -pedantic-errors, -preprocess,
14655 -print-missing-file-dependencies, -trace-includes, -traditional,
14656 -traditional-cpp, -trigraphs, -undefine-macro, -undefine-macro=,
14657 -user-dependencies, -verbose, -write-dependencies,
14658 -write-user-dependencies, no-integrated-cpp, traditional): New.
14659
29a80ea6
NP
146602010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
14661
14662 PR objc/23710
ac1fc2fc
NP
14663 * c-common.h (objc_start_method_definition): Return bool instead
14664 of void.
14665 * stub-objc.c (objc_start_method_definition): Return bool instead
14666 of void.
14667
146682010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
14669
14670 PR objc/25965
14671 * c-common.h (objc_get_interface_ivars): New declaration.
14672 * stub-objc.c (objc_get_interface_ivars): New stub.
29a80ea6 14673
de621752
ILT
146742010-09-15 Ian Lance Taylor <iant@google.com>
14675
14676 * c-common.c (parse_optimize_options): Do not capitalize warning
06730c5d 14677 messages. Remove period at end of warning message.
de621752 14678
ba885ec5
NS
146792010-09-09 Nathan Sidwell <nathan@codesourcery.com>
14680
14681 * c-common.c (handle_alias_ifunc_attribute): New, broken out of ...
14682 (handle_alias_attribute): ... here.
14683 (handle_ifunc_attribute): New.
14684
c5ee1358
MM
146852010-09-06 Mark Mitchell <mark@codesourcery.com>
14686
14687 * c-common.h (do_warn_double_promotion): Declare.
14688 * c-common.c (do_warn_double_promotion): Define.
14689
0a0b3574
MM
146902010-09-05 Mark Mitchell <mark@codesourcery.com>
14691
14692 * c.opt (Wdouble-promotion): New.
14693
d1779886
JM
146942010-09-02 Joseph Myers <joseph@codesourcery.com>
14695
14696 * c.opt (falt-external-templates, fhuge-objects, fvtable-gc,
14697 fvtable-thunks, fxref): Mark no longer supported in help text.
14698
2d2bd949
JM
146992010-09-02 Joseph Myers <joseph@codesourcery.com>
14700
14701 * c.opt (Wimport, fall-virtual, falt-external-templates,
14702 fdefault-inline, fenum-int-equiv, fexternal-templates,
14703 fguiding-decls, fhonor-std, fhuge-objects, flabels-ok,
14704 fname-mangling-version-, fnew-abi, fnonnull-objects,
14705 foptional-diags, fsquangle, fstrict-prototype, fthis-is-variable,
14706 fvtable-gc, fvtable-thunks, fxref): Mark with Ignore and Warn as
14707 applicable.
14708 (fhandle-exceptions): Mark with Alias and Warn.
14709 * c-opts.c (c_common_handle_option): Don't handle options marked
14710 as ignored.
14711
5de8299c
JM
147122010-09-02 Joseph Myers <joseph@codesourcery.com>
14713
14714 * c.opt (Wcomments, Werror-implicit-function-declaration,
14715 ftemplate-depth-, std=c89, std=c9x, std=gnu89, std=gnu9x,
14716 std=iso9899:1990, std=iso9899:1999, std=iso9899:199x): Mark as
14717 aliases.
14718 * c-common.c (option_codes): Use OPT_Wcomment instead of
14719 OPT_Wcomments.
14720 * c-opts.c (warning_as_error_callback, c_common_handle_option):
14721 Don't handle options marked as aliases.
14722
0ceb0201
RG
147232010-08-25 Richard Guenther <rguenther@suse.de>
14724
14725 * c-common.c (c_common_get_alias_set): Remove special
14726 handling for pointers.
14727
ac47786e
NF
147282010-08-20 Nathan Froyd <froydnj@codesourcery.com>
14729
14730 * c-common.c: Use FOR_EACH_VEC_ELT.
14731 * c-gimplify.c: Likewise.
14732 * c-pragma.c: Likewise.
14733
c878765b
JM
147342010-08-16 Joseph Myers <joseph@codesourcery.com>
14735
14736 * c.opt (MDX): Change back to MD. Mark NoDriverArg instead of
14737 RejectDriver.
14738 (MMDX): Change back to MMD. Mark NoDriverArg instead of
14739 RejectDriver.
14740 * c-opts.c (c_common_handle_option): Use OPT_MD and OPT_MMD
14741 instead of OPT_MDX and OPT_MMDX.
14742
603349bf
JM
147432010-08-16 Joseph Myers <joseph@codesourcery.com>
14744
14745 * c.opt (MDX, MMDX, lang-asm): Mark RejectDriver.
14746
644fa7ac
JM
147472010-08-12 Joseph Myers <joseph@codesourcery.com>
14748
14749 * c.opt (MD, MMD): Change to MDX and MMDX.
14750 * c-opts.c (c_common_handle_option): Use OPT_MMD and OPT_MMDX.
14751
481e1176
JM
147522010-08-11 Joseph Myers <joseph@codesourcery.com>
14753
14754 * c-opts.c (c_common_handle_option): Call handle_generated_option
14755 instead of handle_option.
14756
ac8dc9f7
NF
147572010-08-08 Nathan Froyd <froydnj@codesourcery.com>
14758
14759 * c-pragma.c (add_to_renaming_pragma_list): Fix call to VEC_safe_push.
14760 (maybe_apply_renaming_pragma): Delete unneeded declarations.
14761
4f8c876d
NF
147622010-08-08 Nathan Froyd <froydnj@codesourcery.com>
14763
14764 * c-pragma.c (pending_redefinition): Declare. Declare a VEC of it.
14765 (pending_redefine_extname): Change type to a VEC.
14766 (add_to_renaming_pragma_list): Update for new type of
14767 pending_redefine_extname.
ac8dc9f7 14768 (maybe_apply_renaming_pragma): Likewise.
4f8c876d 14769
3b0c690e
AC
147702010-08-04 Arnaud Charlet <charlet@adacore.com>
14771
14772 * c-ada-spec.c (dump_ada_template): Mark underlying instance type as
14773 visited.
14774 (dump_generic_ada_node): Code clean up. Use TREE_VISITED flag to
14775 decide whether a type has already been declared/seen.
14776 Do not go to the original type.
14777 (dump_nested_types): New parameter forward.
14778 Generate forward declaration if needed and mark type as visited.
14779 (print_ada_declaration): Call dump_nested_types if not already done.
14780 Mark types as visited.
14781
1890bccc
JM
147822010-08-03 Joseph Myers <joseph@codesourcery.com>
14783
14784 * c.opt (-print-pch-checksum): Remove option.
14785 * c-opts.c (c_common_handle_option): Don't handle
14786 OPT_print_pch_checksum.
14787
5f20c657
JM
147882010-07-27 Joseph Myers <joseph@codesourcery.com>
14789
14790 * c-common.h (c_common_handle_option): Update prototype and return
14791 value type.
14792 * c-opts.c (c_common_handle_option): Update prototype and return
14793 value type. Update calls to handle_option and
14794 enable_warning_as_error.
14795
f551f80c
JJ
147962010-07-27 Jakub Jelinek <jakub@redhat.com>
14797
14798 PR c/45079
14799 * c-pretty-print.c (pp_c_expression): Handle C_MAYBE_CONST_EXPR.
14800
61ff2bdc
JM
148012010-07-27 Joseph Myers <joseph@codesourcery.com>
14802
14803 * c-common.h (c_common_missing_argument): Remove.
14804 * c-opts.c (c_common_missing_argument): Remove.
14805 * c.opt (A, D, F, I, MD, MMD, MQ, MT, U, fconstant-string-class=,
14806 idirafter, imacros, include, isysroot, isystem, iquote): Add
14807 MissingArgError.
14808 * c-objc-common.h (LANG_HOOKS_MISSING_ARGUMENT): Remove.
14809
7a9bf9a4
JM
148102010-07-27 Joseph Myers <joseph@codesourcery.com>
14811
14812 * c-common.h (c_common_option_lang_mask,
14813 c_common_initialize_diagnostics, c_common_complain_wrong_lang_p):
14814 New.
14815 (c_common_init_options): Update prototype.
14816 * c-opts.c (c_common_option_lang_mask): New.
14817 (c_common_initialize_diagnostics): Split out of
14818 c_common_init_options.
14819 (accept_all_c_family_options, c_common_complain_wrong_lang_p):
14820 New.
14821 (c_common_init_options): Update prototype. Use decoded options in
14822 search for -lang-asm.
14823
910ad8de
NF
148242010-07-15 Nathan Froyd <froydnj@codesourcery.com>
14825
14826 * c-common.c: Carefully replace TREE_CHAIN with DECL_CHAIN.
14827 * c-format.c: Likewise.
14828
718f9c0f
MLI
148292010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
14830
14831 * c-common.h: Include diagnostic-core.h. Error if already
14832 included.
14833 * c-semantics.c: Do not define GCC_DIAG_STYLE here.
14834
4d451982
MLI
148352010-07-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
14836
adfac8df 14837 * c-common.c (IN_GCC_FRONTEND): Do not undef.
4d451982
MLI
14838 Do not include expr.h
14839 (vector_mode_valid_p): Move here.
14840
119fe915
SB
148412010-06-21 DJ Delorie <dj@redhat.com>
14842
14843 * c-pragma.c (handle_pragma_diagnostic): Add push/pop,
14844 allow these pragmas anywhere.
14845
148462010-06-14 Jakub Jelinek <jakub@redhat.com>
14847
14848 PR bootstrap/44509
14849 * c-cppbuiltin.c: Include gt-c-family-c-cppbuiltin.h.
14850 (lazy_hex_fp_values, lazy_hex_fp_value_count): Add GTY(()) markers.
14851 (lazy_hex_fp_value, builtin_define_with_hex_fp_value): Use
14852 ggc_strdup instead of xstrdup.
14853
148542010-06-10 Jakub Jelinek <jakub@redhat.com>
14855
14856 * c-cppbuiltin.c: Include cpp-id-data.h.
14857 (lazy_hex_fp_values, lazy_hex_fp_value_count): New variables.
14858 (lazy_hex_fp_value): New function.
14859 (builtin_define_with_hex_fp_value): Provide definitions lazily.
14860
6662d794
MLI
148612010-06-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
14862
14863 * c-gimplify.c: Do not include tree-flow.h
14864
38f8b050
JR
148652010-06-29 Joern Rennecke <joern.rennecke@embecosm.com>
14866
14867 PR other/44034
14868 * c-common.c: Rename targetm member:
14869 targetm.enum_va_list -> targetm.enum_va_list_p
14870
9589f23e
AS
148712010-06-28 Anatoly Sokolov <aesok@post.ru>
14872
14873 * c-common.c (shorten_compare): Adjust call to force_fit_type_double.
14874
3b06d379
SB
148752010-06-28 Steven Bosscher <steven@gcc.gnu.org>
14876
14877 * c-cppbuiltin.c: Do not include except.h.
14878
d166d4c3
AK
148792010-06-24 Andi Kleen <ak@linux.intel.com>
14880
9faeb493
UB
14881 * c-common.c (warn_for_omitted_condop): New.
14882 * c-common.h (warn_for_omitted_condop): Add prototype.
d166d4c3 14883
70cb8be6
JM
148842010-06-21 Joseph Myers <joseph@codesourcery.com>
14885
14886 * c.opt (lang-objc): Remove.
14887 * c-opts.c (c_common_handle_option): Don't handle OPT_lang_objc.
14888
a4c97feb
JR
148892010-06-21 Joern Rennecke <joern.rennecke@embecosm.com>
14890
14891 * c-opts.c: Include "tm_p.h".
14892
6e2f1956
JM
148932010-06-20 Joseph Myers <joseph@codesourcery.com>
14894
14895 * c-common.c (parse_optimize_options): Update call to
14896 decode_options.
14897
bc87224e
NF
148982010-06-18 Nathan Froyd <froydnj@codesourcery.com>
14899
14900 * c-common.c (record_types_used_by_current_var_decl): Adjust for
14901 new type of types_used_by_cur_var_decl.
14902
b49cf425
JR
149032010-06-17 Joern Rennecke <joern.rennecke@embecosm.com>
14904
14905 PR bootstrap/44512
14906 * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Add cast
14907 for C++ standard compliance.
14908
59f9c2ed
JM
149092010-06-16 Jason Merrill <jason@redhat.com>
14910
14911 * c.opt: Add -Wnoexcept.
14912
33766b66
RG
149132010-06-16 Richard Guenther <rguenther@suse.de>
14914
14915 PR c/44555
14916 * c-common.c (c_common_truthvalue_conversion): Remove
14917 premature and wrong optimization concering ADDR_EXPRs.
14918
eff7e30c
AC
149192010-06-15 Arnaud Charlet <charlet@adacore.com>
14920
14921 * c-ada-spec.c (dump_sloc): Remove column info.
14922 (is_simple_enum): New function.
14923 (dump_generic_ada_node, print_ada_declaration): Map C enum types to Ada
14924 enum types when relevant.
14925
6312e84d
MLI
149262010-06-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
14927
9faeb493 14928 * c-common.c (conversion_warning): Warn at expression
6312e84d
MLI
14929 location.
14930
1cb42611
JM
149312010-06-10 Joseph Myers <joseph@codesourcery.com>
14932
14933 * c-opts.c (c_common_handle_option): Don't handle
14934 OPT_fshow_column.
14935
a9429e29
LB
149362010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
14937
14938 * c-pragma.c (push_alignment): Use typed GC allocation.
14939 (handle_pragma_push_options): Likewise.
14940
14941 * c-common.c (parse_optimize_options): Likewise.
14942
14943 * c-common.h (struct sorted_fields_type): Add variable_size GTY
14944 option.
14945
5498f011
JM
149462010-06-07 Joseph Myers <joseph@codesourcery.com>
14947
14948 * c-common.c (flag_preprocess_only, flag_undef, flag_no_builtin,
14949 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
14950 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
14951 flag_signed_bitfields, warn_strict_null_sentinel,
14952 flag_nil_receivers, flag_zero_link, flag_replace_objc_classes,
14953 flag_gen_declaration, flag_no_gnu_keywords,
14954 flag_implement_inlines, flag_implicit_templates,
14955 flag_implicit_inline_templates, flag_optional_diags,
14956 flag_elide_constructors, flag_default_inline, flag_rtti,
14957 flag_conserve_space, flag_access_control, flag_check_new,
14958 flag_new_for_scope, flag_weak, flag_working_directory,
14959 flag_use_cxa_atexit, flag_use_cxa_get_exception_ptr,
14960 flag_enforce_eh_specs, flag_threadsafe_statics,
14961 flag_pretty_templates): Remove.
14962 * c-common.h (flag_preprocess_only, flag_nil_receivers,
14963 flag_objc_exceptions, flag_objc_sjlj_exceptions, flag_zero_link,
14964 flag_replace_objc_classes, flag_undef, flag_no_builtin,
14965 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
14966 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
14967 flag_const_strings, flag_signed_bitfields, flag_gen_declaration,
14968 flag_no_gnu_keywords, flag_implement_inlines,
14969 flag_implicit_templates, flag_implicit_inline_templates,
14970 flag_optional_diags, flag_elide_constructors, flag_default_inline,
14971 flag_rtti, flag_conserve_space, flag_access_control,
14972 flag_check_new, flag_new_for_scope, flag_weak,
14973 flag_working_directory, flag_use_cxa_atexit,
14974 flag_use_cxa_get_exception_ptr, flag_enforce_eh_specs,
14975 flag_threadsafe_statics, flag_pretty_templates,
14976 warn_strict_null_sentinel): Remove.
14977 * c.opt (E, Wstrict-null-sentinel, faccess-control, fasm,
14978 fbuiltin, fcheck-new, fconserve-space, felide-constructors,
14979 fenforce-eh-specs, ffor-scope, fgnu-keywords, fimplement-inlines,
14980 fimplicit-inline-templates, fimplicit-templates,
14981 flax-vector-conversions, fms-extensions, fnil-receivers,
14982 fnonansi-builtins, fpretty-templates, freplace-objc-classes,
14983 frtti, fshort-double, fshort-enums, fshort-wchar,
14984 fsigned-bitfields, fsigned-char, fstats, fthreadsafe-statics,
14985 funsigned-bitfields, funsigned-char, fuse-cxa-atexit,
14986 fuse-cxa-get-exception-ptr, fweak, fworking-directory, fzero-link,
14987 gen-decls, undef): Use Var.
14988 (fdefault-inline, foptional-diags): Document as doing nothing.
14989 * c-opts.c (c_common_handle_option): Remove cases for options now
14990 using Var. Mark ignored options as such.
14991
39dabefd
SB
149922010-06-05 Steven Bosscher <steven@gcc.gnu.org>
14993
9faeb493 14994 * c-common.c: Moved to here from parent directory.
39dabefd
SB
14995 * c-common.def: Likewise.
14996 * c-common.h: Likewise.
14997 * c-cppbuiltin.c: Likewise.
14998 * c-dump.c: Likewise.
14999 * c-format.c: Likewise.
15000 * c-format.h : Likewise.
15001 * c-gimplify.c: Likewise.
15002 * c-lex.c: Likewise.
15003 * c-omp.c: Likewise.
15004 * c.opt: Likewise.
15005 * c-opts.c: Likewise.
15006 * c-pch.c: Likewise.
15007 * c-ppoutput.c: Likewise.
15008 * c-pragma.c: Likewise.
15009 * c-pragma.h: Likewise.
15010 * c-pretty-print.c: Likewise.
15011 * c-pretty-print.h: Likewise.
15012 * c-semantics.c: Likewise.
15013 * stub-objc.c: Likewise.
15014
15015 * c-common.c: Include gt-c-family-c-common.h.
15016 * c-pragma.c: Include gt-c-family-c-pragma.h.
15017\f
6a720d41 15018Copyright (C) 2010-2024 Free Software Foundation, Inc.
39dabefd
SB
15019
15020Copying and distribution of this file, with or without modification,
15021are permitted in any medium without royalty provided the copyright
15022notice and this notice are preserved.